5 #ifndef OPENCV_OBJDETECT_FACE_HPP
6 #define OPENCV_OBJDETECT_FACE_HPP
8 #include <opencv2/core.hpp>
87 const Size& input_size,
88 float score_threshold = 0.9f,
89 float nms_threshold = 0.3f,
109 const Size& input_size,
110 float score_threshold = 0.9f,
111 float nms_threshold = 0.3f,
DNN-based face detector.
Definition: face.hpp:21
static CV_WRAP Ptr< FaceDetectorYN > create(const String &framework, const std::vector< uchar > &bufferModel, const std::vector< uchar > &bufferConfig, const Size &input_size, float score_threshold=0.9f, float nms_threshold=0.3f, int top_k=5000, int backend_id=0, int target_id=0)
virtual CV_WRAP void setScoreThreshold(float score_threshold)=0
Set the score threshold to filter out bounding boxes of score less than the given value.
virtual CV_WRAP void setTopK(int top_k)=0
Set the number of bounding boxes preserved before NMS.
virtual CV_WRAP float getNMSThreshold()=0
virtual CV_WRAP Size getInputSize()=0
virtual CV_WRAP int getTopK()=0
virtual CV_WRAP float getScoreThreshold()=0
virtual CV_WRAP int detect(InputArray image, OutputArray faces)=0
Detects faces in the input image. Following is an example output.
virtual CV_WRAP void setInputSize(const Size &input_size)=0
Set the size for the network input, which overwrites the input size of creating model....
virtual CV_WRAP void setNMSThreshold(float nms_threshold)=0
Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the g...
virtual ~FaceDetectorYN()
Definition: face.hpp:23
static CV_WRAP Ptr< FaceDetectorYN > create(CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config, const Size &input_size, float score_threshold=0.9f, float nms_threshold=0.3f, int top_k=5000, int backend_id=0, int target_id=0)
Creates an instance of face detector class with given parameters.
DNN-based face recognizer.
Definition: face.hpp:123
virtual CV_WRAP void feature(InputArray aligned_img, OutputArray face_feature)=0
Extracting face feature from aligned image.
DisType
Definition of distance used for calculating the distance between two face features.
Definition: face.hpp:129
@ FR_COSINE
Definition: face.hpp:129
static CV_WRAP Ptr< FaceRecognizerSF > create(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.
virtual ~FaceRecognizerSF()
Definition: face.hpp:125
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.
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.
Template class for specifying the size of an image or rectangle.
Definition: types.hpp:335
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:296
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition: mat.hpp:442
#define CV_EXPORTS_W
Definition: cvdef.h:472
#define CV_WRAP_FILE_PATH
Definition: cvdef.h:487
#define CV_WRAP
Definition: cvdef.h:481
"black box" representation of the file storage associated with a file on disk.
Definition: calib3d.hpp:441
Definition: cvstd_wrapper.hpp:74