I am trying to compile this program:
https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py
but I got:
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 3483 Traceback (most recent call last): File "face.py", line 31, in small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25) cv2.error: /io/opencv/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize
error message.
Basically that means OpenCV wasn't able to grab an image from your webcam. Either you don't have a webcam hooked up or OpenCV isn't configured to be able to access it. So you'll have to figure out why OpenCV can't access your webcam.
@ageitgey
OpenCV isn't configured to be able to access it.
What special config it might be? Any suggestions?
I also mentioned my proof of the assertion issue in #191
I wish I had a better answer, but the best I can say is to check OpenCV's github and related forums. There are huge variety of operating systems, video cameras and ways of compiling OpenCV and I can't really help debug OpenCV installation issues since I don't know all the answers for every platform.
The goal of using OpenCV there in the demo program is just to grab an image from your webcam and load it into a numpy array. If you can find some other library or solution for doing that which works on you computer, it should work just as well as a replacement.
Again, I wish I had a better answer to help you fix it. But I don't know what's wrong specifically on your system with OpenCV and it's not really a problem with face_recognition, so I'm not sure how to help.
Closing this since it's a duplicate of #191
error: OpenCV(3.4.1) C:Miniconda3conda-bldopencv-suite_1533128839831workmodulesimgprocsrcresize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize
i have got this error..in the line => image = cv2.resize(image, fixed_size)
how can i fix this error..can somebody help me out
Most helpful comment
I wish I had a better answer, but the best I can say is to check OpenCV's github and related forums. There are huge variety of operating systems, video cameras and ways of compiling OpenCV and I can't really help debug OpenCV installation issues since I don't know all the answers for every platform.
The goal of using OpenCV there in the demo program is just to grab an image from your webcam and load it into a numpy array. If you can find some other library or solution for doing that which works on you computer, it should work just as well as a replacement.
Again, I wish I had a better answer to help you fix it. But I don't know what's wrong specifically on your system with OpenCV and it's not really a problem with face_recognition, so I'm not sure how to help.
Closing this since it's a duplicate of #191