FaceRecognizerSF class
DNN-based face recognizer.
model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_recognition_sface
- Inheritance
- Available extensions
Constructors
- FaceRecognizerSF.fromFile(String model, String config, {int backendId = 0, int targetId = 0})
-
Creates an instance of this class with given parameters.
factory
- FaceRecognizerSF.fromPointer(FaceRecognizerSFPtr ptr, [bool attach = true])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this object has been disposed.
no setterinherited
-
props
→ List<
Object?> -
no setterinherited
-
ptr
↔ Pointer<
FaceRecognizerSF> -
getter/setter pairinherited
- ref → FaceRecognizerSF
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
alignCrop(
Mat srcImg, Mat faceBox) → Mat - Aligns detected face with the source input image and crops it.
-
alignCropAsync(
Mat srcImg, Mat faceBox) → Future< Mat> -
Available on FaceRecognizerSF, provided by the FaceRecognizerSFAsync extension
-
dispose(
) → void -
Releases the underlying native resources. Idempotent: calling it more
than once is safe, but the object must not be used after dispose.
inherited
-
feature(
Mat alignedImg, {bool clone = false}) → Mat - Extracts face feature from aligned image.
-
featureAsync(
Mat alignedImg, {bool clone = false}) → Future< Mat> -
Available on FaceRecognizerSF, provided by the FaceRecognizerSFAsync extension
-
freeNative(
) → void -
Frees the native resources owned by this object. Subclasses implement the
concrete free logic here; callers must use dispose instead.
override
-
match(
Mat faceFeature1, Mat faceFeature2, {int disType = FR_COSINE}) → double - Calculates the distance between two face features.
-
matchAsync(
Mat faceFeature1, Mat faceFeature2, {int disType = FaceRecognizerSF.FR_COSINE}) → Future< double> -
Available on FaceRecognizerSF, provided by the FaceRecognizerSFAsync extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- finalizer → NativeFinalizer
-
final
Constants
- DIS_TYPE_FR_NORM_L2 → const int
- DIS_TYPR_FR_COSINE → const int
- FR_COSINE → const int
- Definition of distance used for calculating the distance between two face features.
- FR_NORM_L2 → const int
- Definition of distance used for calculating the distance between two face features.