Embossed-Text-Reader icon indicating copy to clipboard operation
Embossed-Text-Reader copied to clipboard

Not working video webcam

Open AmbarishGK opened this issue 5 years ago • 1 comments

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'

AmbarishGK avatar May 30 '19 12:05 AmbarishGK

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.

IDKYamHere avatar Jun 10 '20 15:06 IDKYamHere