CvCapture* pCapture=NULL;
pCapture = cvCreateCameraCapture(-1);
if(pCapture == NULL)
{
printf("打开摄像头失败!\n");
exit(-1);
}
cvSetCaptureProperty(pCapture,CV_CAP_PROP_FRAME_WIDTH,1920);
cvSetCaptureProperty(pCapture,CV_CAP_PROP_FRAME_HEIGHT,1080);
fps= cvGetCaptureProperty(pCapture,CV_CAP_PROP_FPS);
cvReleaseCapture(&pCapture);
OpenCV 设置摄像头输出分辨率
最新推荐文章于 2025-06-12 15:10:47 发布