Skip to content

Issue with detecting a particular sign #11

@animeshkalita82

Description

@animeshkalita82

Hi
I have run the main.py file with the sample video and encountered the an error. The program could correctly predict the first two signs(one way, speed limit 30) of the video but when it tries to predict the third sign(right turn) it fails and throws the below error.

File "main.py", line 316, in main
roi = cv2.cvtColor(roi, cv2.COLOR_BGR2HSV)
cv2.error: OpenCV(3.4.8) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

I have noticed that the roi value for that third image has become empty roi=[]

roi = frame[tl[1]:br[1], tl[0]:br[0]]
print('roi=======', roi) // here it is empty
roi = cv2.cvtColor(roi, cv2.COLOR_BGR2HSV)

Please help to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions