-
Notifications
You must be signed in to change notification settings - Fork 50
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
Assertion Failed on OPENCV cvtColor #2
Comments
Nope, tried three different power sources for the PI, not the problem. Tested the camera on my PC, worked. |
The following snippet is printing ten times "cannot read image", so it is definitely a driver problem on my side: import cv2
from PIL import Image
camera = cv2.VideoCapture(0)
for i in range (10):
ret, img = camera.read()
if ret:
break
else:
print ("cannot read img"); Maybe we should add an if and read the first value on the tuple returned by camera.read() (line 7x on your code I think), printing an understandable error to the developer. What's your opinion? |
And for my problem, I'll try a clean install of raspbian and see what happens. |
I think that's a good idea. Send over a pull request and I'll accept it. |
So, I had a problem here with my camera (it broke) and I bought a new one, same model, same brand. Plugged it in and got an error. Tried again on your code, same error. Not sure if it's a driver problem, since I'm using the exact same camera. Maybe the power is not being enough? I'll check on that on my side.
I looked it up online and it was saying as if the frame is empty and then there is no conversion. So I feel like it could be a driver issue.
The text was updated successfully, but these errors were encountered: