IDLive Face C++ API 1.47.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
facesdk::Image Struct Referenceabstract

Structure for storing image in Face SDK format. More...

#include <facesdk/Image.h>

Public Types

enum  COLOR_ENCODING { RGB888 , BGR888 }
 Color encoding enum. More...
 

Public Member Functions

virtual bool empty () const =0
 Check if image is empty (no dynamic data allocated)
 

Static Public Member Functions

static ImagePtr createImage ()
 Create empty Image object.
 
static ImagePtr createImage (const std::vector< uint8_t > &bytes)
 Create Image object from binary file.
 
static ImagePtr createImage (const uint8_t *bytes, size_t size)
 Create Image object from binary file in memory buffer.
 
static ImagePtr createImage (const std::string &path)
 Create Image object from disk.
 
static ImagePtr createImage (const uint8_t *data, size_t rows, size_t cols, COLOR_ENCODING format)
 Create Image object from memory buffer.
 

Detailed Description

Structure for storing image in Face SDK format.

Member Enumeration Documentation

◆ COLOR_ENCODING

Color encoding enum.

Enumerator
RGB888 

Bytes in RGB format

BGR888 

Bytes in BGR format

Member Function Documentation

◆ createImage() [1/5]

static ImagePtr facesdk::Image::createImage ( )
static

Create empty Image object.

Returns
Smart pointer to empty Image object

◆ createImage() [2/5]

static ImagePtr facesdk::Image::createImage ( const std::string &  path)
static

Create Image object from disk.

Parameters
pathPath to image file on disk
Returns
Smart pointer to Image
Exceptions
FaceException

◆ createImage() [3/5]

static ImagePtr facesdk::Image::createImage ( const std::vector< uint8_t > &  bytes)
static

Create Image object from binary file.

Parameters
bytesVector of image file bytes
Returns
Smart pointer to Image
Exceptions
FaceException

◆ createImage() [4/5]

static ImagePtr facesdk::Image::createImage ( const uint8_t *  bytes,
size_t  size 
)
static

Create Image object from binary file in memory buffer.

Parameters
bytesPointer to memory buffer with binary image file
sizeNumber of bytes in image file
Returns
Smart pointer to Image
Exceptions
FaceException

◆ createImage() [5/5]

static ImagePtr facesdk::Image::createImage ( const uint8_t *  data,
size_t  rows,
size_t  cols,
COLOR_ENCODING  format 
)
static

Create Image object from memory buffer.

Parameters
dataPointer to memory buffer (bytes)
rowsNumber of image rows
colsNumber of image cols
formatColor encoding format of input buffer
Returns
Smart pointer to Image
Exceptions
FaceException

◆ empty()

virtual bool facesdk::Image::empty ( ) const
pure virtual

Check if image is empty (no dynamic data allocated)

Exceptions
FaceException