public class FacemarkTrain extends FacemarkAbstract base class for trainable facemark models To utilize this API in your program, please take a look at the REF: tutorial_table_of_content_facemark ### Description The AAM and LBF facemark models in OpenCV are derived from the abstract base class FacemarkTrain, which provides a unified access to those facemark algorithms in OpenCV. Here is an example on how to declare facemark algorithm:
// Using Facemark in your code: Ptr<Facemark> facemark = FacemarkLBF::create();The typical pipeline for facemark detection is listed as follows:
- (Non-mandatory) Set a user defined face detection using FacemarkTrain::setFaceDetector. The facemark algorithms are designed to fit the facial points into a face. Therefore, the face information should be provided to the facemark algorithm. Some algorithms might provides a default face recognition function. However, the users might prefer to use their own face detector to obtains the best possible detection result.
- (Non-mandatory) Training the model for a specific algorithm using FacemarkTrain::training. In this case, the model should be automatically saved by the algorithm. If the user already have a trained model, then this part can be omitted.
- Load the trained model using Facemark::loadModel.
- Perform the fitting via the Facemark::fit.
Constructors Modifier Constructor Description
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description
Methods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save