3DiVi Face SDK  3.21.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
VDT.FaceRecognition.SDK.RawImage Class Reference

Class to provide raw image data and optional crop information. More...

Public Types

enum  Format {
  Format.FORMAT_GRAY = 0, Format.FORMAT_RGB = 1, Format.FORMAT_BGR = 2, Format.FORMAT_YUV_NV21 = 3,
  Format.FORMAT_YUV_NV12 = 4
}
 Format of image data. More...
 

Public Member Functions

 RawImage (int width, int height, Format format, byte[] data)
 Constructor. More...
 
RawImage crop (RawSample.Rectangle rectangle)
 Create a RawImage object that represents the specified rectangle area of this image.
 

Public Attributes

int width
 Image width.
 
int height
 Image height.
 
Format format
 Format of image data.
 
byte[] data
 The array of bytes that stores image data.
 
bool with_crop
 Flag, which indicates that crop info is initialized. This value is set in the RawImage.crop member function.
 
int crop_info_offset_x
 Crop offset along the x axis. This value is set in the RawImage.crop member function.
 
int crop_info_offset_y
 Crop offset along the y axis. This value is set in the RawImage.crop member function.
 
int crop_info_data_image_width
 Image width before RawImage.crop. This value is set in the RawImage.crop member function.
 
int crop_info_data_image_height
 Image height before RawImage.crop. This value is set in the RawImage.crop member function.
 

Detailed Description

Class to provide raw image data and optional crop information.

Member Enumeration Documentation

Format of image data.

Enumerator
FORMAT_GRAY 

Grayscale, 8 bit per pixel.

FORMAT_RGB 

RGB, 24 bit per pixel, 8 bit per channel.

FORMAT_BGR 

BGR, 24 bit per pixel, 8 bit per channel.

FORMAT_YUV_NV21 

NV21 format in the YUV color coding system, the standard image format used on the Android camera preview.

FORMAT_YUV_NV12 

NV12 format in the YUV color coding system.

Constructor & Destructor Documentation

VDT.FaceRecognition.SDK.RawImage.RawImage ( int  width,
int  height,
Format  format,
byte[]  data 
)
inline

Constructor.

Parameters
[in]widthImage width.
[in]heightImage height.
[in]formatFormat of image data.
[in]dataThe array of bytes of image data.