Sorry, this content is no longer available

Ask Your Question
0

There is an error while video capturing

asked Feb 16 '18

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

Preview: (hide)

Comments

yes isOpened return false

atviko gravatar imageatviko (Feb 16 '18)edit

1 answer

Sort by » oldest newest most voted
0

answered Feb 16 '18

berak gravatar image

updated Feb 16 '18

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)

Preview: (hide)

Comments

yes it return false

atviko gravatar imageatviko (Feb 16 '18)edit

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

berak gravatar imageberak (Feb 16 '18)edit

path is set but it'll give same error

atviko gravatar imageatviko (Feb 16 '18)edit

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

atviko gravatar imageatviko (Feb 16 '18)edit
1

Is ur webcam is plugged in ?

supra56 gravatar imagesupra56 (Feb 16 '18)edit

Question Tools

1 follower

Stats

Asked: Feb 16 '18

Seen: 438 times

Last updated: Feb 16 '18