Ask Your Question
0

There is an error while video capturing

asked 2018-02-16 04:46:16 -0600

atviko gravatar image

error: C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\imgproc\src\color.cpp:11111: error: (-215) scn == 3 || scn == 4 in function cv::cvtColor

edit retag flag offensive close merge delete

Comments

yes isOpened return false

atviko gravatar imageatviko ( 2018-02-16 05:02:48 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-02-16 04:57:51 -0600

berak gravatar image

updated 2018-02-16 05:01:28 -0600

your VideoCapture either did not open, or you reached the end of the movie. anyway, your image is invalid

please:

  • check cap.isOpened()

  • and the ret value in: ret,frame = cap.read()


if any of it returns False, you have to handle that condition. (i.e. break out of the loop)

edit flag offensive delete link more

Comments

yes it return false

atviko gravatar imageatviko ( 2018-02-16 05:03:16 -0600 )edit

if you're using a video file, make sure, that opencv_ffmpeg340_x64.dll is on your PATH

berak gravatar imageberak ( 2018-02-16 05:17:31 -0600 )edit

path is set but it'll give same error

atviko gravatar imageatviko ( 2018-02-16 05:34:48 -0600 )edit

I am trying to open the cap bit it won't??????????

atviko gravatar imageatviko ( 2018-02-16 05:56:31 -0600 )edit
1

Is ur webcam is plugged in ?

supra56 gravatar imagesupra56 ( 2018-02-16 06:33:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-16 04:46:16 -0600

Seen: 419 times

Last updated: Feb 16 '18