Log in or register to post comments

Apply filter to image

September 24, 2013 - 5:08am #1

Hi.

I wish to manipulate augmented frames before sending them to the display ,

For example : applying a black/white filter to an augmented frame.

I know i can change specific pixel colors by using the vertex & fragment shaders, but i wish to know if there is a way to apply filters directly to the augmented frames (not through the shaders)?

 

i am currently working under IOS.

is there a way to do so ? 

 

 

thanks

 

ozi

Apply filter to image

September 24, 2013 - 6:45am #3

Hi, to achieve that without using Shaders you would need to render the background video in a first step, then capture it into a buffer using glReadPixels(), then manipulating / editing the pixels in the buffer, reupload it to a texture, bind the texture and render normally.

The approach above is technically possible, however it will be very slow, due to the need to read and write the texture buffer several times.

So, for performance reasons, realistically the only viable way is through the Shaders, as shown in the Background Texture Access sample.

Apply filter to image

September 24, 2013 - 6:42am #2

The background texture access sample shows how to manipulate the image.

https://developer.vuforia.com/resources/sample-apps/background-texture-access-sample-app

 

N

 

Log in or register to post comments