EstervQrCode 1.1.1
Library for qr code manipulation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cv::FaceRecognizerSF Class Referenceabstract

DNN-based face recognizer. More...

#include <face.hpp>

Public Types

enum  DisType { FR_COSINE =0 , FR_NORM_L2 =1 }
 Definition of distance used for calculating the distance between two face features. More...
 

Public Member Functions

virtual ~FaceRecognizerSF ()
 
virtual CV_WRAP void alignCrop (InputArray src_img, InputArray face_box, OutputArray aligned_img) const =0
 Aligning image to put face on the standard position. More...
 
virtual CV_WRAP void feature (InputArray aligned_img, OutputArray face_feature)=0
 Extracting face feature from aligned image. More...
 
virtual CV_WRAP double match (InputArray face_feature1, InputArray face_feature2, int dis_type=FaceRecognizerSF::FR_COSINE) const =0
 Calculating the distance between two face features. More...
 

Static Public Member Functions

static CV_WRAP Ptr< FaceRecognizerSFcreate (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config, int backend_id=0, int target_id=0)
 Creates an instance of this class with given parameters. More...
 

Detailed Description

DNN-based face recognizer.

model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_recognition_sface

Member Enumeration Documentation

◆ DisType

Definition of distance used for calculating the distance between two face features.

Enumerator
FR_COSINE 
FR_NORM_L2 

Constructor & Destructor Documentation

◆ ~FaceRecognizerSF()

virtual cv::FaceRecognizerSF::~FaceRecognizerSF ( )
inlinevirtual

Member Function Documentation

◆ alignCrop()

virtual CV_WRAP void cv::FaceRecognizerSF::alignCrop ( InputArray  src_img,
InputArray  face_box,
OutputArray  aligned_img 
) const
pure virtual

Aligning image to put face on the standard position.

Parameters
src_imginput image
face_boxthe detection result used for indicate face in input image
aligned_imgoutput aligned image

◆ create()

static CV_WRAP Ptr<FaceRecognizerSF> cv::FaceRecognizerSF::create ( CV_WRAP_FILE_PATH const String model,
CV_WRAP_FILE_PATH const String config,
int  backend_id = 0,
int  target_id = 0 
)
static

Creates an instance of this class with given parameters.

Parameters
modelthe path of the onnx model used for face recognition
configthe path to the config file for compability, which is not requested for ONNX models
backend_idthe id of backend
target_idthe id of target device

◆ feature()

virtual CV_WRAP void cv::FaceRecognizerSF::feature ( InputArray  aligned_img,
OutputArray  face_feature 
)
pure virtual

Extracting face feature from aligned image.

Parameters
aligned_imginput aligned image
face_featureoutput face feature

◆ match()

virtual CV_WRAP double cv::FaceRecognizerSF::match ( InputArray  face_feature1,
InputArray  face_feature2,
int  dis_type = FaceRecognizerSF::FR_COSINE 
) const
pure virtual

Calculating the distance between two face features.

Parameters
face_feature1the first input feature
face_feature2the second input feature of the same size and the same type as face_feature1
dis_typedefining the similarity with optional values "FR_OSINE" or "FR_NORM_L2"

The documentation for this class was generated from the following file: