Log in or register to post comments

dealing with video input from the camera

March 4, 2013 - 1:16pm #1

Hi. 

is there a way to deal with the video stream recieved from the camera ?, i mean for example changing the colors of specific pixels in a frame recieved from the camera prior to sending it to the screen

 

 

thanks

ozi

dealing with video input from the camera

March 6, 2013 - 11:22am #8

Ok, let me know if you need more help later on.

dealing with video input from the camera

March 6, 2013 - 5:26am #7

Hi Alessandro.

 

thanks for your reply,

i'll give it a try.

 

 

ozi

dealing with video input from the camera

March 5, 2013 - 8:27am #6

Those two approaches are the only possibilities that I can think of.

 

dealing with video input from the camera

March 5, 2013 - 7:52am #5

Hi.

 

first, thanks for the fast reply..

i'll try to be more specific:

in the frames received from the camera i am currenty marking few pixels/ interest points, and i wish to see on screen in real-time if i am marking them correctly.

for that goal i need to find a way do deal with the frame received from the camera before it is sent to the display.

 

doing that through the shader requires me to find the transformation that clips each pixel from the camera buffer to the proper pixel/location on screen, but i wish to avoid this procedure if possible..

the other way you mantioned is actually mapping the frame from the camera into a texture- which will be displayed on screen (will overlap the "real" video), and as i see  it can not be preformed at a high rate (currently i am working at ~25 FPS)

any other ideas?

 

 

thanks

ozi

 

dealing with video input from the camera

March 5, 2013 - 7:09am #4

Hi, thanks for the clarifications.

The shader approach is not the only possible one; 

you could also get the camera frame image, process the pixel buffer in C++ and then update the video background texture "manually" by using glTexImage() to update the pixels in the texture memory;

however the preferrable way is to use the shader, especially for performance reasons

dealing with video input from the camera

March 5, 2013 - 4:31am #3

Hi Alesandro.

 

thanks for your reply.

i already know the 2 ways to mantioned in order to "edit" frames from the camera.

but the question is how can i  send the frames i edited back to the screen (in order to see in real-time the edited video) ?

using the shader  can achive this goal, but is it the only way?

 

thanks

ozi

dealing with video input from the camera

March 4, 2013 - 1:22pm #2

Hi, it is definitely possible to access (and also edit) the pixels of the camera image;

for instance, you may want to have a look at the BackgroundTextureAccess sample, where a specific shader is used for rendering the videobackground texture in grayscale.

The appraoch in that sample is probably the most elegant and effective way of doing that (as in the shader you have direct access to each pixel of the video texture); however this approach requires a bit of familiarity with OpenGL and shader programming.

More in general (if you don't want to use the shader approach), retrieving and processing the pixels of the camera image can also be done using the QCAR API, as explained in this tutorial:

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

HTH.

 

Log in or register to post comments