Struct opencv::objdetect::FaceRecognizerSF
source · pub struct FaceRecognizerSF { /* private fields */ }
Expand description
DNN-based face recognizer
model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_recognition_sface
Implementations§
source§impl FaceRecognizerSF
impl FaceRecognizerSF
sourcepub fn create(
model: &str,
config: &str,
backend_id: i32,
target_id: i32
) -> Result<Ptr<FaceRecognizerSF>>
pub fn create( model: &str, config: &str, backend_id: i32, target_id: i32 ) -> Result<Ptr<FaceRecognizerSF>>
Creates an instance of this class with given parameters
Parameters
- model: the path of the onnx model used for face recognition
- config: the path to the config file for compability, which is not requested for ONNX models
- backend_id: the id of backend
- target_id: the id of target device
C++ default parameters
- backend_id: 0
- target_id: 0
sourcepub fn create_def(model: &str, config: &str) -> Result<Ptr<FaceRecognizerSF>>
pub fn create_def(model: &str, config: &str) -> Result<Ptr<FaceRecognizerSF>>
Creates an instance of this class with given parameters
Parameters
- model: the path of the onnx model used for face recognition
- config: the path to the config file for compability, which is not requested for ONNX models
- backend_id: the id of backend
- target_id: the id of target device
Note
This alternative version of [create] function uses the following default values for its arguments:
- backend_id: 0
- target_id: 0
Trait Implementations§
source§impl Boxed for FaceRecognizerSF
impl Boxed for FaceRecognizerSF
source§impl Debug for FaceRecognizerSF
impl Debug for FaceRecognizerSF
source§impl Drop for FaceRecognizerSF
impl Drop for FaceRecognizerSF
source§impl FaceRecognizerSFTrait for FaceRecognizerSF
impl FaceRecognizerSFTrait for FaceRecognizerSF
fn as_raw_mut_FaceRecognizerSF(&mut self) -> *mut c_void
source§fn feature(
&mut self,
aligned_img: &impl ToInputArray,
face_feature: &mut impl ToOutputArray
) -> Result<()>
fn feature( &mut self, aligned_img: &impl ToInputArray, face_feature: &mut impl ToOutputArray ) -> Result<()>
Extracting face feature from aligned image Read more
source§impl FaceRecognizerSFTraitConst for FaceRecognizerSF
impl FaceRecognizerSFTraitConst for FaceRecognizerSF
fn as_raw_FaceRecognizerSF(&self) -> *const c_void
source§fn align_crop(
&self,
src_img: &impl ToInputArray,
face_box: &impl ToInputArray,
aligned_img: &mut impl ToOutputArray
) -> Result<()>
fn align_crop( &self, src_img: &impl ToInputArray, face_box: &impl ToInputArray, aligned_img: &mut impl ToOutputArray ) -> Result<()>
Aligning image to put face on the standard position Read more
source§fn match_(
&self,
face_feature1: &impl ToInputArray,
face_feature2: &impl ToInputArray,
dis_type: i32
) -> Result<f64>
fn match_( &self, face_feature1: &impl ToInputArray, face_feature2: &impl ToInputArray, dis_type: i32 ) -> Result<f64>
Calculating the distance between two face features Read more
source§fn match__def(
&self,
face_feature1: &impl ToInputArray,
face_feature2: &impl ToInputArray
) -> Result<f64>
fn match__def( &self, face_feature1: &impl ToInputArray, face_feature2: &impl ToInputArray ) -> Result<f64>
Calculating the distance between two face features Read more
impl Send for FaceRecognizerSF
Auto Trait Implementations§
impl RefUnwindSafe for FaceRecognizerSF
impl !Sync for FaceRecognizerSF
impl Unpin for FaceRecognizerSF
impl UnwindSafe for FaceRecognizerSF
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more