Problem with setting width and height of webcam
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 ?
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...
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!The solution can also be OS-dependent. Check the forum, there are several topics (and solutions) on this subject!
@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
@StevenPuttemans: https://github.com/apc-llc/opencv-2.4.10 ??