Ask Your Question
0

Opencv 3.3 - VideoCapture not working [closed]

asked 2018-01-28 11:34:48 -0600

Nbb gravatar image

updated 2018-01-28 12:09:36 -0600

I am using visual studio 2015 with opencv 3.3 on windows.

VideoCapture vidCap(fileName);
Mat image;
vidCap.read(image);

But image is empty. I have verified that filename is correct. How do I check what went wrong ? Can anybody tell me what went wrong ?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2018-01-28 12:06:53.752953

Comments

1

try

VideoCapture vidCap(fileName);
Mat frame;
vidCap.read(frame);
sturkmen gravatar imagesturkmen ( 2018-01-28 11:41:56 -0600 )edit

^^ indeed, VideoCapture::read() returns a bool, not the image

berak gravatar imageberak ( 2018-01-28 11:45:12 -0600 )edit

I have tried that sturkmen but it does not work as well. Berak, where can I find the opencv_ffmpeg340.dll ?

Nbb gravatar imageNbb ( 2018-01-28 11:45:55 -0600 )edit

I have edited my code. That is what I have tried but the image is still empty

Nbb gravatar imageNbb ( 2018-01-28 11:52:29 -0600 )edit
1

first search opencv_ffmpeg330_64.dll in your computer

sturkmen gravatar imagesturkmen ( 2018-01-28 11:55:23 -0600 )edit
1

@Nbb, <your_opencv_folder>\build\bin

berak gravatar imageberak ( 2018-01-28 11:55:42 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-01-28 12:04:51 -0600

Nbb gravatar image

thank you very much ! it works now !

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-01-28 11:34:48 -0600

Seen: 635 times

Last updated: Jan 28 '18