using CVCaptureFromCAM(CV_CAP_DSHOW)

asked 2013-06-04 03:45:53 -0500

sachin_rt gravatar image

I am using opencv 2.4.9 .I am capturing live from a webcam and want to extract properties like frame rate , frame count , timestamp , etc . I heard that the videoInput library will be helpful in this case and learnt that it has been integrated into opencv .Can anybody give me a small piece of code how I can use the videoInput functions in opencv . I have tried in this fashion , but have been unsuccessful.

CVCapture* capture = CVCaptureFromCAM(CV_CAP_DSHOW)

IplImage * image = cvQueryFrame(capture);

opencv mentions that CV_CAP_DSHOW means we can use DirectShow via VideoInput . Now how do I use the functions of videoInput for ex , listOfDevices() of videoInput which will give me the number of devices attached ?? What are the extra advantages I get from mentioning CV_CAP_DSHOW and how do I use them ?

edit retag flag offensive close merge delete