Log in or register to post comments

Is there a way to setZoom for camera input?

October 23, 2011 - 8:53pm #1

Is there a way to set camera view (input video) zoom level in ImageTargets sample code? should it be set in imageTarget.cpp?

Is there a way to setZoom for camera input?

October 8, 2013 - 10:52am #5

How were you able to do this correctly? I also wanted to have this feature, but when a certain maximum zoom threshold is crossed (dependent on device screen size) the gl window seems to shift to the left until the whole screen is black and I have to zoom out. Did you notice that also?

Re: Is there a way to setZoom for camera input?

October 27, 2011 - 6:39am #4

The best you can do is request a higher resolution camera image:

QCAR::CameraDevice::getInstance().selectVideoMode(
                                QCAR::CameraDevice::MODE_OPTIMIZE_QUALITY);

Search your native file (e.g. ImageTargets.cpp) for "MODE_DEFAULT" and change it to "MODE_OPTIMIZE_QUALITY" in each place.

Note that not all devices are guaranteed to support a higher quality camera image. In that case DEFAULT and QUALITY will look the same.

- Kim

Re: Is there a way to setZoom for camera input?

October 26, 2011 - 10:49am #3

Thanks for the suggestion. I was able to increase the zoom by doing the following
config.mSize.data[0] = config.mSize.data[0]*ZOOM;
config.mSize.data[1] = config.mSize.data[1]*ZOOM;

However, the screen image resolution seems got worse, is there a way to keep the previous resolution, the one without zoom?

Hui

Re: Is there a way to setZoom for camera input?

October 23, 2011 - 9:06pm #2

No, the camera zoom is not adjustable. You can play with the size and position of the video background in the configureVideoBackground method in ImageTargets.cpp. You could, for instance, make the video viewport much larger than the screen to "fake" a zoom.

- Kim

Log in or register to post comments