47 #include <visp/vpOpenCVGrabber.h>
49 #if defined(VISP_HAVE_OPENCV)
51 #include <visp/vpImageConvert.h>
52 #include <visp/vpFrameGrabberException.h>
92 capture = cvCreateCameraCapture(DeviceType);
103 "Initialization not done : camera already used or no camera found") );
152 "Initialization not done") );
155 cvGrabFrame(capture);
156 im = cvRetrieveFrame(capture);
176 "Initialization not done") );
179 cvGrabFrame(capture);
180 im = cvRetrieveFrame(capture);
200 "Initialization not done") );
203 cvGrabFrame(capture);
204 im = cvRetrieveFrame(capture);
214 cvReleaseCapture( &capture );
227 framerate = cvGetCaptureProperty(capture, CV_CAP_PROP_FPS);
239 cvSetCaptureProperty(capture, CV_CAP_PROP_FPS, framerate);
255 if ( cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, width))
260 "Impossible to set the size of the grabber") );
278 if ( cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, height))
283 "Impossible to set the size of the grabber") );
307 if ( DeviceType != 0 && DeviceType != 100 &&DeviceType != 200 && DeviceType != 300)
309 vpTRACE(
"The expected type of device may be unknown.");