Log in or register to post comments

Preview Size

June 13, 2013 - 1:45am #6

Hi,

I'd like to make the Preview Surface smaller in the ImageTargets example. So I've changed its size on the layout.

The problem is that the video itself does not scale and only a small potion of it is presented within the preview surface.

How can I scale the rendered video?

Thanks

Preview Size

June 13, 2013 - 3:10am #5

Hi, are you referring to the VideoPlayback sample (as you mention video) or the ImageTargets sample ?

Can you also clarify which Preview Surface you refer to ?

Preview Size

June 13, 2013 - 4:03am #4

Alessandro, I'm talking about the ImageTargets sample. In this sample you see the 3D model on top of the original video stream from the camera (frame by frame stream).

In the sample the preview is full screen. But I want to see the preview of a different size (let's say half a screen).

I don't care about the size of the 3D model. I only want to scale the original video stream from the camera to fit well on my preview size.

Thank you

Preview Size

June 13, 2013 - 4:43am #3

Hi, the size of the rendered video background is controlled by the opengl viewport size and the videoBackgroundConfig.

If you look at the code in ImageTargets.cpp, you find a function called configureVideoBackground(); 

in there, you can adjust the config.mSize parameter to fit your needs.

 

 

Preview Size

June 13, 2013 - 5:52am #2

Works like magic.

Thank you very much!

Preview Size

June 13, 2013 - 6:09am #1

Glad to help.

Log in or register to post comments