Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' #2

Open
yensan0512 opened this issue Jul 15, 2019 · 2 comments

Comments

@yensan0512
Copy link

This is the error

Traceback (most recent call last):
File "object_tracker.py", line 87, in
blob2 = cv2.dnn.blobFromImage(face_img, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

[ WARN:0] terminating async callback

@esmacolak
Copy link

blob2 = cv2.dnn.blobFromImage(face_img, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False)
replace this with
blob2 = cv2.dnn.blobFromImage(frame, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False)

@gaitanignacio
Copy link

gaitanignacio commented Oct 29, 2019

Hi yensan0512,

Try to uncomment line 58 at object_tracker.py frame = imutils.resize(frame, width=400).

BR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants