Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. data->capture =cvCaptureFromCAM(data->config.device); // open the device
  2. ...
  3. IplImage *grabFrame=cvQueryFrame(data->capture);
  4.  
  5. cvSetCaptureProperty(data->capture,CV_CAP_PROP_FRAME_WIDTH,1920);
  6. cvSetCaptureProperty(data->capture,CV_CAP_PROP_FRAME_HEIGHT,1080);
  7.  
  8. The function cvSetCaptureProperty() sets the specified property of video capturing.
  9. Currently the function supports only video files: CV_CAP_PROP_POS_MSEC, CV_CAP_PROP_POS_FRAMES, CV_CAP_PROP_POS_AVI_RATIO.
  10.  
  11. static const int MAX_WIDTH_RESOLUTION = 7680;
  12. static const int MAX_HEIGHT_RESOLUTION = 4800;
  13.  
  14. cvCreateCameraCapture(...);
  15. cvSetCaptureProperty(pCam, CV_CAP_PROP_FRAME_WIDTH, MAX_WIDTH_RESOLUTION);
  16. cvSetCaptureProperty(pCam, CV_CAP_PROP_FRAME_HEIGHT, MAX_HEIGHT_RESOLUTION);
  17. cvQueryFrame(...);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement