I\'m using OpenCV to capture images from A4Tech camera. When I try to decrease image resolution, image assertion fails:
CvCapture *camera = cvCreateCameraCap
You seem to be doing it the right way, but OpenCV is known to have issues doing this kind of stuff. Are you sure your camera supports 160x140? Cheese says my camera supports 160x120, but when I select this format nothing seems to change.
One thing though, it's best to always check the return of OpenCV calls, for instance:
CvCapture *camera = cvCreateCameraCapture(1);
if (!camera)
{
// print error and exit
}
One thing you could do is resize the captured frame to the resolution you want. It's not ideal, I know, your CPU is going to do this task and therefore there will be some performance cost to your application, but if you need the image to be of a certain size and OpenCV is not playing nice there ain't much you can do, unless you are willing to make a surgery on OpenCV.
EDIT:
One thing you should do is check whether these values were really set. So after setting them, retrieve them with cvGetCaptureProperty()
.