[][src]Trait opencv::face::FacemarkKazemi

pub trait FacemarkKazemi: Facemark {
    fn as_raw_FacemarkKazemi(&self) -> *mut c_void;

    fn training(
        &mut self,
        images: &mut VectorOfMat,
        landmarks: &mut VectorOfVectorOfPoint2f,
        configfile: &str,
        scale: Size,
        model_filename: &str
    ) -> Result<bool> { ... }
fn get_faces(
        &mut self,
        image: &dyn ToInputArray,
        faces: &mut dyn ToOutputArray
    ) -> Result<bool> { ... } }

Required methods

Loading content...

Provided methods

fn training(
    &mut self,
    images: &mut VectorOfMat,
    landmarks: &mut VectorOfVectorOfPoint2f,
    configfile: &str,
    scale: Size,
    model_filename: &str
) -> Result<bool>

This function is used to train the model using gradient boosting to get a cascade of regressors *which can then be used to predict shape.

Parameters

  • images: A vector of type cv::Mat which stores the images which are used in training samples.
  • landmarks: A vector of vectors of type cv::Point2f which stores the landmarks detected in a particular image.
  • scale: A size of type cv::Size to which all images and landmarks have to be scaled to.
  • configfile: A variable of type std::string which stores the name of the file storing parameters for training the model.
  • modelFilename: A variable of type std::string which stores the name of the trained model file that has to be saved.

Returns

A boolean value. The function returns true if the model is trained properly or false if it is not trained.

C++ default parameters

  • model_filename: "face_landmarks.dat"

fn get_faces(
    &mut self,
    image: &dyn ToInputArray,
    faces: &mut dyn ToOutputArray
) -> Result<bool>

Loading content...

Methods

impl<'_> dyn FacemarkKazemi + '_[src]

pub fn create(parameters: &FacemarkKazemi_Params) -> Result<PtrOfFacemarkKazemi>[src]

C++ default parameters

  • parameters: FacemarkKazemi::Params()

Implementors

Loading content...