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

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
  • [in] file: path of Image

  • [out] image: Image class

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:

  1. left eye

  2. right eye

  3. nose

  4. mouth left corner

  5. mouth right corner

Return

ReturnStatus: return ParseError if anything go wrong

Parameters
  • image: Image object

  • landmarks: landmarks from face detector outputs

  • align_face: Cropped and aligned face in 112x112 px (default size).