Input Image¶
-
ErrorCode
Trueface::SDK
::
setImage
(std::string imageFile)¶ Set the image that is processed by the other methods.
- Return
error code, see ErrorCode. Note, it is highly encouraged to check the return value from setImage before proceeding. If the license is invalid, the INVALID_LICENSE error will be returned.
- See
setImage(uint8_t* image, uint16_t width, uint16_t height, ColorCode color, int stride)
- Parameters
[in] imageFile
: the path of a JPEG, JPG, PNG, or TIFF file (path must not contain ~ ).
-
ErrorCode
Trueface::SDK
::
setImage
(uint8_t *image, uint16_t width, uint16_t height, ColorCode color, int stride = 0)¶ Set the image that is processed by the other methods.
- Return
error code, see ErrorCode. Note, it is highly encouraged to check the return value from setImage before proceeding. If the license is invalid, the INVALID_LICENSE error will be returned.
- See
- Parameters
[in] image
: an 8-bit decoded image array, in the CPU memory or the GPU memory.[in] width
: the image width.[in] height
: the image height.[in] color
: the image color model, see ColorCode.[in] stride
: the distance between image array rows in bytes, also known as step size (used only for pointers to the GPU memory).
-
ErrorCode
Trueface::SDK
::
setImage
(const std::vector<uint8_t> &encodedImageBuffer)¶ Set the image that is processed by the other methods.
- Return
error code, see ErrorCode. Note, it is highly encouraged to check the return value from setImage before proceeding. If the license is invalid, the INVALID_LICENSE error will be returned.
- See
- Parameters
[in] encodedImageBuffer
: encoded image buffer, supports JPG, PNG, and TIFF