3DiVi Face SDK  3.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
face_sdk.modules.raw_image.RawImage Class Reference

Raw image interface. More...

Public Member Functions

def __init__
 Get a pointer to the image data buffer. More...
 
def crop
 Create a RawImage object that represents the specified rectangle area of this image.
 
def __del__
 Virtual destructor.
 

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 face_sdk_3divi/example/cv_raw_image.py.

WARNING: Member functions RawImage.data, RawImage.width, RawImage.height and RawImage.format can't throw any exceptions, since they will be called from the dynamic library and throwing an exception can cause a crash.
So instead of throwing an exception you can return some invalid values:

  • NULL pointer - from the RawImage.data,
  • non-positive number - from the RawImage.width and RawImage.height,
  • negative number - from the RawImage.format.
    The facerec library will handle incorrect data and will throw a Error exception object that you will be able to catch.