3DiVi Face SDK  3.24.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
pbio::CVRawImage Class Reference

Example of implementation of the pbio::IRawImage interface via OpenCV. More...

#include <CVRawImage.h>

Public Member Functions

 CVRawImage ()
 Contructor.
 
virtual ~CVRawImage ()
 Virtual destructor.
 
virtual const unsigned char * data () const
 Get a pointer to the image data buffer. More...
 
virtual int32_t width () const
 Get an image width. More...
 
virtual int32_t height () const
 Get an image height. More...
 
virtual int32_t format () const
 Get an image format. More...
 
cv::Mat & mat ()
 Get a reference to the stored cv::Mat object. More...
 
const cv::Mat & mat () const
 Get a constant reference to the stored cv::Mat object. More...
 
- Public Member Functions inherited from pbio::IRawImage
virtual ~IRawImage ()
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from pbio::IRawImage
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.
 

Detailed Description

Example of implementation of the pbio::IRawImage interface via OpenCV.

Member Function Documentation

const unsigned char * pbio::CVRawImage::data ( ) const
inlinevirtual

Get a pointer to the image data buffer.

Returns
  • NULL, if the stored cv::Mat object is invalid
  • pointer to the image data buffer, otherwise.

Implements pbio::IRawImage.

int32_t pbio::CVRawImage::format ( ) const
inlinevirtual

Get an image format.

Returns

Implements pbio::IRawImage.

int32_t pbio::CVRawImage::height ( ) const
inlinevirtual

Get an image height.

Returns
Number of rows in the image.

Implements pbio::IRawImage.

cv::Mat & pbio::CVRawImage::mat ( )
inline

Get a reference to the stored cv::Mat object.

Returns
Reference to the stored cv::Mat object.
const cv::Mat & pbio::CVRawImage::mat ( ) const
inline

Get a constant reference to the stored cv::Mat object.

Returns
Constant reference to the stored cv::Mat object.
int32_t pbio::CVRawImage::width ( ) const
inlinevirtual

Get an image width.

Returns
Number of columns in the image.

Implements pbio::IRawImage.