0

When I used OpenCV to do some image processing like generating depth, I wanted to set the camera resolution to 512*512.

But the function 'cvSetCaptureProperty' didn't work for 512*512. Once I set it to 512*512, the captured frame's size will be 288*352. It's very strange. But if I set it to 640*480, it worked well.

Did anybody meet the same problem?

TeaEra
  • 1
  • 1
  • [This question seems to be a repeat of this?][1] [1]: http://stackoverflow.com/questions/14287/increasing-camera-capture-resolution-in-opencv –  May 13 '13 at 10:13

1 Answers1

0

This is expected behavior. Your (web)camera only supports several resolutions. OpenCV will try to provide you with the resolution that is as close as possible as the requested resolution.

You can not get a 512*512 image from a camera that captures 640*480 because it has a different aspect ratio.

Nallath
  • 2,100
  • 20
  • 37