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

Not working video webcam #2

Open
AmbarishGK opened this issue May 30, 2019 · 1 comment
Open

Not working video webcam #2

AmbarishGK opened this issue May 30, 2019 · 1 comment

Comments

@AmbarishGK
Copy link

VIDEOIO ERROR: V4L2: Could not obtain specifics of capture window. VIDEOIO ERROR: V4L: can't open camera by index 1 /dev/video1 does not support memory mapping Traceback (most recent call last): File "video_from_webam.py", line 12, in <module> img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) cv2.error: OpenCV(4.0.0) /home/[user]/opencv/modules/imgproc/src/color.cpp:181: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

@IDKYamHere
Copy link
Contributor

IDKYamHere commented Jun 10, 2020

Change

cnts = cv2.findContours(dilate.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)

line number(25 or 26) to

cnts,hierarchy = cv2.findContours(edged.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)

If I'm not wrong its and OpenCV version error. Different versions of OpenCV have different values to fin Contours.

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