Getting Started with EasyAR
Inherits:Base

Description

Image stores an image data and represents an image in memory.

Image raw data can be accessed as byte array. The width/height/stride information are also accessible.

Public Types

enumPixelFormat{Unknown, Gray, YUV_NV21, YUV_NV12, RGB888, BGR888, RGBA8888}

Public Properties

intWidth
intHeight
intStride
PixelFormatFormat
byte[]Pixels

Public Functions

Image()

enum PixelFormat

ConstantValueDescription
Unknown0The Unknown format.
Gray1The gray format.
YUV_NV212The YUV (NV21) format.
YUV_NV123The YUV (NV12) format.
RGB8884The RGB888 format.
BGR8885The BGR888 format.
RGBA88886The RGBA8888 format.

Image()

Creates a Image object.

int Width

Returns image width.

int Height

Returns image height.

int Stride

Returns image stride.

PixelFormat Format

Returns image format. Generally, you will get a YUV image from camera on mobile devices and BGR image from camera on desktop devices.

byte[] Pixels

Returns image raw data as a byte array.