Log in or register to post comments

Converting Vuforia byte array to to Color32[] - Unity Webcam Texture equiv

July 8, 2012 - 3:22am #1

How do you convert a Vuforia byte/image array to Color32[], the same that you would get from the Unity webcam texture? 

Converting Vuforia byte array to to Color32[]

July 8, 2012 - 7:11am #2

You need to map the bytes to Unity Color structs based upon their pixel format. Unity utilizes RGBA, Vuforia supports a variety of formats..

from the API ( QCAR::PIXEL_FORMAT )

UNKNOWN_FORMAT 

Unknown format - default pixel type for undefined images

RGB565 

A color pixel stored in 2 bytes using 5 bits for red, 6 bits for green and 5 bits for blue

RGB888 

A color pixel stored in 3 bytes using 8 bits each

GRAYSCALE 

A grayscale pixel stored in one byte.

YUV 

A color pixel stored in 12 or more bits using Y, U and V planes

Log in or register to post comments