Log in or register to post comments

Grabbing video background as rendered

September 4, 2014 - 8:55am #1

Hi!

I would like to know if there's any way of grabbing the video background as it is rendered on the device's screen (iOS/C++).

Currently I've only been able to get either the whole scene (video background + 3D models) with a glReadPixels() or just a QCAR::Image from a QCAR::State, but with dimension completely unrelated (i.e. on my iPad I get a 1280*720 image, while the screen resolution is 2048*1536).

Moreover, the quality of the QCAR image was terrible (with some aliasing).

Is there another method to grab only the video background and in the device's native resolution? (i.e. as rendered).

Thanks,

Jean-Baptiste Lorteau

Grabbing video background as rendered

September 11, 2014 - 2:31am #4

Ok so I finally managed to get what I wanted. What I actually did: a glReadPixels in between the drawVideoBackground and my scene rendering. That way I get the whole screen without my models at the correct resolution. It may not be the most elegant solution but at least it works! 

Grabbing video background as rendered

September 10, 2014 - 9:37am #3

The link you pasted is the method I was actually referring to when saying I tried to get it via a QCAR::State and then a QCAR::Image and it does not work well, as the image I get has a size of 1280*720 while my screen resolution is 2048*1536.

What I actually want to know is if there's a possibility to get an image of the video background as it is rendered on my screen, i.e. if I have a 2048*1536 resolution, I end up with a 2048*1536 image. Currently I can only have either an image too small which is NOT the video background as rendered but the background as... i don't even really know? (I don't understand why when I use the technique where I get an image following the scheme QCAR::State -> QCAR::Frame -> QCAR::Image, I get an image which is not the same as the video background in terms of size and quality, but something smaller and of poorer image quality), or an image which contains also my 3D scene which I do not want.

I've also looked at the BackgroundTextureAccess but it does not seem to fit my needs for a simple solution for this trivial problem.

Thanks in advance! 

Grabbing video background as rendered

September 8, 2014 - 9:27pm #2

Have you checked out the technique used in the BackgroundTextureAccess sample app? Also, there's an FAQ about how to access the camera image:

https://developer.vuforia.com/forum/faq/android-how-can-i-access-camera-image
 

Log in or register to post comments