cap_vfw no more working on win10 / opencv3

asked 2016-08-08 04:45:44 -0600

berak gravatar image

since migrating to win10, CAP_VFW seems no more working.

i still get a dialog box, prompting to choose a camera, but




does not open. can anyone side this / double check ?

(i'm not so much worried about using vfw myself, it's more like 99% of opencv's samples use -1 (which again uses vfw) as default for webcam capture, which would leave noobs on win quite puzzled...)

edit retag flag offensive close merge delete



System win 10 vs2013 debug ocv 3.1

VideoCapture cc(-1); in console windows :

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

in capture windows a gray frame

Videocapture(0) in console windows

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

SETUP: Setting up device 0
SETUP: Webcam C170
SETUP: Couldn't find preview pin using SmartTee
SETUP: Default Format is set to 640x480
SETUP: trying specified format RGB24 @ 640x480
SETUP: trying format RGB24 @ 640x480
SETUP: trying format RGB32 @ 640x480
SETUP: trying format RGB555 @ 640x480
SETUP: trying format RGB565 @ 640x480
SETUP: trying format YUY2 @ 640x480
SETUP: Capture callback set
SETUP: Device is setup and ready to capture.

Videocapture(0|CAP_VFW) same as VideoCapture(-1)

LBerger gravatar imageLBerger ( 2016-08-08 06:38:33 -0600 )edit

thanks !

(still weird, all your output is from cap_dshow.cpp, and not from cap_vfw.cpp. imho, 0 should call dshow, while both -1 and 0|CAP_VFW should call vfw )

berak gravatar imageberak ( 2016-08-08 07:51:16 -0600 )edit

may be it is due to this line

LBerger gravatar imageLBerger ( 2016-08-08 09:55:58 -0600 )edit

i think, that is only used in the c-api part, the c++ graph follows another path

berak gravatar imageberak ( 2016-08-08 10:15:55 -0600 )edit

No. with VideoCapture cc(0|CAP_VFW); program reach breakpoint

LogPolar.exe!get_capture_debug_flag() Ligne 127 C++
LogPolar.exe!cvCreateCameraCapture(int index) Ligne 187 C++
LogPolar.exe!cv::VideoCapture::open(int index) Ligne 588    C++
LogPolar.exe!cv::VideoCapture::VideoCapture(int index) Ligne 557    C++
LogPolar.exe!main(int argc, char * * argv) Ligne 101    C++

If i set flag to true in console windows I have got

VIDEOIO(cvCreateCameraCapture_VFW(index)): trying ...
VIDEOIO(cvCreateCameraCapture_VFW(index)): result=000001A59EE89CB0 ...
LBerger gravatar imageLBerger ( 2016-08-08 10:59:16 -0600 )edit

ahh, right , thanks again.. will have to think it over ...

berak gravatar imageberak ( 2016-08-08 11:03:08 -0600 )edit