C++ Utils API¶
Utilities for using oneML.
-
class
oneML
::
Utils
: public oneML::oneMLAPI¶ The oneML Utils API object.
Class to create and use oneML Utils.
Public Functions
-
explicit
Utils
(oneML::LicenseManager &manager)¶ Construct a Utils object.
- Parameters
manager
: LicenseManager instance
-
ReturnStatus
read_image_cv
(const std::string &file, Image &image)¶ Reads a file into an Image object using openCV.
- Return
ReturnStatus: return ParseError if anything go worng
- Parameters
-
ReturnStatus
crop_align_face_landmark
(Image &image, oneML::face::FaceLandmark5 &landmarks, Image &align_face)¶ Crop and align face image by similarity transformation.
The method uses 5 points of face landmark in original-size image to transform. The order of position points must be as followings:
left eye
right eye
nose
mouth left corner
mouth right corner
- Return
ReturnStatus: return ParseError if anything go wrong
- Parameters
image
: Image objectlandmarks
: landmarks from face detector outputsalign_face
: Cropped and aligned face in 112x112 px (default size).
-
explicit