We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am currently experiencing this on a Mi 13.3 laptop when trying to run a basic example like:
import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting frame cv2.imshow('frame',gray) if cv2.waitKey(1) & 0xFF == ord('q'): break # When everything done, release the capture cap.release() cv2.destroyAllWindows()
Complete output:
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /io/opencv/modules/imgproc/src/color.cpp, line 10638 Traceback (most recent call last): File "main.py", line 11, in <module> gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.error: /io/opencv/modules/imgproc/src/color.cpp:10638: error: (-215) scn == 3 || scn == 4 in function cvtColor
I have checked this from two distributions: a Ubuntu 17.04 and a Kali from a Live USB.
The text was updated successfully, but these errors were encountered:
Did you read the package description? It very clearly states:
IMPORTANT NOTE MacOS and Linux packages do not support video related functionality (not compiled with FFmpeg).
IMPORTANT NOTE
MacOS and Linux packages do not support video related functionality (not compiled with FFmpeg).
Unfortunately you'll have to compile OpenCV manually until I get an FFmpeg enabled build working on Linux.
Sorry, something went wrong.
@skvark sorry, totally missed that. Where do I get instructions to compile opencv manually?
This is a very good guide: http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
@skvark thank you!
No branches or pull requests
I am currently experiencing this on a Mi 13.3 laptop when trying to run a basic example like:
Complete output:
I have checked this from two distributions: a Ubuntu 17.04 and a Kali from a Live USB.
The text was updated successfully, but these errors were encountered: