Problem with setting width and height of webcam

asked 2016-04-07 20:49:13 -0600

Rmmal gravatar image

I have a webcam ( microsoft camlife 5000 ) , it's an HD camera but everytime i access the camera through opencv 2.4.10 i get the resolution to be 640*480 also i used the function

camera.set(CV_CAP_PROP_FRAME_HEIGHT,720); camera.set(CV_CAP_PROP_FRAME_WIDTH,1280);

but still the width and the height of the frames are 640 , 480. so what shall i do now to solve this problem ?

edit retag flag offensive close merge delete

Comments

It seems from what I've seen on Google that this camera does not support MJPEG HD resolution. You have to go through YUV instead. To the best of my knowledge, this is not supported by OpenCV VideoCapture. You have to read the YUV stream through UVC directly...

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2016-04-08 02:37:36 -0600 )edit

Also, opencv 2.4.10 is outdated and has tons of bugs. Please use the latest 2.4 branch from Github to ensure that noone has fixed this before!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-08 03:25:10 -0600 )edit
1

The solution can also be OS-dependent. Check the forum, there are several topics (and solutions) on this subject!

kbarni gravatar imagekbarni ( 2016-04-08 04:27:23 -0600 )edit

@Mathieu Barnachon: can you get me the link that says that this camera doesn't support MJPEG HD resolution ?

@StevenPuttemans you mean that i have to download opencv 2.4.10 from github ? or download 2.4.12 ?

@kbarni: tell me one of them or give me any working solution as i've tried many and no one worked

Rmmal gravatar imageRmmal ( 2016-04-08 14:17:03 -0600 )edit