3DiVi Face SDK  3.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
pbio::IRawImage Class Referenceabstract

Raw image interface. To use this interface, you need to inherit it and create your own implementation for a specific image type. See an example of implementation in pbio/example/CVRawImage.h. More...

#include <IRawImage.h>

Public Types

enum  Format {
  FORMAT_GRAY = 0, FORMAT_RGB = 1, FORMAT_BGR = 2, FORMAT_YUV_NV21 = 3,
  FORMAT_YUV_NV12 = 4
}
 Format of image data. More...
 
typedef HeavySmartPtr
< IRawImage >::tPtr 
Ptr
 Alias for the type of a smart pointer to IRawImage.
 

Public Member Functions

virtual ~IRawImage ()
 Virtual destructor.
 
virtual const unsigned char * data () const =0
 Get a pointer to the image data buffer. All pixels must be stored continuously row by row, without gaps at the end of each row. More...
 
virtual int32_t width () const =0
 Get image width. More...
 
virtual int32_t height () const =0
 Get image height. More...
 
virtual int32_t format () const =0
 Get image format. More...
 

Detailed Description

Raw image interface. To use this interface, you need to inherit it and create your own implementation for a specific image type. See an example of implementation in pbio/example/CVRawImage.h.

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.

Member Function Documentation

virtual const unsigned char* pbio::IRawImage::data ( ) const
pure virtual

Get a pointer to the image data buffer. All pixels must be stored continuously row by row, without gaps at the end of each row.

Returns
Pointer to the image data buffer.

Implemented in pbio::CVRawImage.

virtual int32_t pbio::IRawImage::format ( ) const
pure virtual

Get image format.

Returns
Number of the image format (see IRawImage::Format).

Implemented in pbio::CVRawImage.

virtual int32_t pbio::IRawImage::height ( ) const
pure virtual

Get image height.

Returns
Number of rows in the image.

Implemented in pbio::CVRawImage.

virtual int32_t pbio::IRawImage::width ( ) const
pure virtual

Get image width.

Returns
Number of columns in the image.

Implemented in pbio::CVRawImage.