Log in or register to post comments

GetPixel access

April 12, 2013 - 8:02am #1

Hi, I need an approach to grabbing specific pixel colors from the live image every frame similar to GetPixel/GetPixels for Texture2D.

I first had this set up with unity's native WebCamTexture but it seems that Vuforia blocks/conflicts with this access on the device.

I tried looking at the BackgroundTextureAccess project but even though it appears the image is being set by that, I can't read out a changing pixel value by doing Color single_color = mTexture.GetPixel(200,200); in update in VideoTextureBehavior.cs for example. 

If I create and destroy the texture every frame I get a changing value but that yields some funky results overall :)

I'm a bit at a loss as to how I'm supposed to get color values and what the correct practice is for this. Hope someone can help.

GetPixel access

April 13, 2013 - 1:19pm #2

Hi,

this tutorial explaines how to read camera frame pixels in Unity:

https://developer.vuforia.com/resources/dev-guide/unity-camera-image-access

 

Log in or register to post comments