ofVideoGrabber Height and Width

Hello,

The behavior of ofVideoGrabber has been changed when it comes to height and width. The documentation and the wiki state that ofVideoGrabber will:

…Attempt to setup capture at the width and height specified. If the capture dimensions are not available it will setup capture for the next closest dimensions available…

In testing openFrameworks with my ADC110 I was a bit surprised that when I requested 320 x 240 and after the call checked height and width and the were 320 and 240. The command window stated that the camera was running at 720 x 480 and didn’t support 320 x 240.

Looking at the source code it appears that if the requested height and width are not available the module scales the output. As a result height and width are always equal to what you request even if the camera does not support it.

It isn’t too difficult to avoid the scaling by making sure you request a height and width that the camera supports. However, I wanted to know if always scaling the height and width was what should happen or am I missing something.

Thanks,

digitalhack

yes, is the expected behavior, it’s done like that to be sure that it just works no matter what resolution you use. it will be good to add a warning message telling that the resolution is not native and it’s being resized

arturo,

Thanks,

digitalhack