-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
run camera.py error #24
Comments
I occured to this problem too. And I find out the reason is that you are using an image that is neither with 3 channels nor 4 channels. Check out your image. Probably it's already a grayscale image with only 1 channel. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /io/opencv/modules/imgproc/src/color.cpp, line 9748
Traceback (most recent call last):
File "camera_reader.py", line 17, in
frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.error: /io/opencv/modules/imgproc/src/color.cpp:9748: error: (-215) scn == 3 || scn == 4 in function cvtColor
The text was updated successfully, but these errors were encountered: