Trait opencv::objdetect::prelude::FaceRecognizerSFConst [−][src]
pub trait FaceRecognizerSFConst {
fn as_raw_FaceRecognizerSF(&self) -> *const c_void;
fn align_crop(
&self,
src_img: &dyn ToInputArray,
face_box: &dyn ToInputArray,
aligned_img: &mut dyn ToOutputArray
) -> Result<()> { ... }
fn match_(
&self,
_face_feature1: &dyn ToInputArray,
_face_feature2: &dyn ToInputArray,
dis_type: i32
) -> Result<f64> { ... }
}
Expand description
DNN-based face recognizer, model download link: https://drive.google.com/file/d/1ClK9WiB492c5OZFKveF3XiHCejoOxINW/view.
Required methods
fn as_raw_FaceRecognizerSF(&self) -> *const c_void
Provided methods
fn align_crop(
&self,
src_img: &dyn ToInputArray,
face_box: &dyn ToInputArray,
aligned_img: &mut dyn ToOutputArray
) -> Result<()>
fn align_crop(
&self,
src_img: &dyn ToInputArray,
face_box: &dyn ToInputArray,
aligned_img: &mut dyn ToOutputArray
) -> Result<()>
Aligning image to put face on the standard position
Parameters
- src_img: input image
- face_box: the detection result used for indicate face in input image
- aligned_img: output aligned image
fn match_(
&self,
_face_feature1: &dyn ToInputArray,
_face_feature2: &dyn ToInputArray,
dis_type: i32
) -> Result<f64>
fn match_(
&self,
_face_feature1: &dyn ToInputArray,
_face_feature2: &dyn ToInputArray,
dis_type: i32
) -> Result<f64>
Calculating the distance between two face features
Parameters
- _face_feature1: the first input feature
- _face_feature2: the second input feature of the same size and the same type as _face_feature1
- dis_type: defining the similarity with optional values “FR_OSINE” or “FR_NORM_L2”
C++ default parameters
- dis_type: FaceRecognizerSF::FR_COSINE