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

run camera.py error #24

Open
wei123021 opened this issue May 15, 2017 · 1 comment
Open

run camera.py error #24

wei123021 opened this issue May 15, 2017 · 1 comment

Comments

@wei123021
Copy link

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

@Donny-Hikari
Copy link

Donny-Hikari commented Sep 27, 2017

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants