DNN-based face recognizer.
More...
|
void | alignCrop (Mat src_img, Mat face_box, Mat aligned_img) |
| Aligns detected face with the source input image and crops it.
|
|
void | feature (Mat aligned_img, Mat face_feature) |
| Extracts face feature from aligned image.
|
|
IntPtr | getNativeObjAddr () |
|
double | match (Mat face_feature1, Mat face_feature2) |
| Calculates the distance between two face features.
|
|
double | match (Mat face_feature1, Mat face_feature2, int dis_type) |
| Calculates the distance between two face features.
|
|
void | Dispose () |
|
void | ThrowIfDisposed () |
|
|
static FaceRecognizerSF | __fromPtr__ (IntPtr addr) |
|
static FaceRecognizerSF | create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig) |
| Creates an instance of this class from a buffer containing the model weights and configuration.
|
|
static FaceRecognizerSF | create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, int backend_id) |
| Creates an instance of this class from a buffer containing the model weights and configuration.
|
|
static FaceRecognizerSF | create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, int backend_id, int target_id) |
| Creates an instance of this class from a buffer containing the model weights and configuration.
|
|
static FaceRecognizerSF | create (string model, string config) |
| Creates an instance of this class with given parameters.
|
|
static FaceRecognizerSF | create (string model, string config, int backend_id) |
| Creates an instance of this class with given parameters.
|
|
static FaceRecognizerSF | create (string model, string config, int backend_id, int target_id) |
| Creates an instance of this class with given parameters.
|
|
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
|
|
const int | FR_COSINE = 0 |
| C++: enum DisType (cv.FaceRecognizerSF.DisType)
|
|
const int | FR_NORM_L2 = 1 |
| C++: enum DisType (cv.FaceRecognizerSF.DisType)
|
|
◆ __fromPtr__()
static FaceRecognizerSF OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.__fromPtr__ |
( |
IntPtr | addr | ) |
|
|
static |
◆ alignCrop()
void OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.alignCrop |
( |
Mat | src_img, |
|
|
Mat | face_box, |
|
|
Mat | aligned_img ) |
Aligns detected face with the source input image and crops it.
- Parameters
-
src_img | input image |
face_box | the detected face result from the input image |
aligned_img | output aligned image |
◆ create() [1/6]
Creates an instance of this class from a buffer containing the model weights and configuration.
- Parameters
-
framework | Name of the framework (ONNX, etc.) |
bufferModel | A buffer containing the binary model weights. |
bufferConfig | A buffer containing the network configuration. |
backend_id | The id of the backend. |
target_id | The id of the target device. |
- Returns
- A pointer to the created instance of FaceRecognizerSF.
◆ create() [2/6]
Creates an instance of this class from a buffer containing the model weights and configuration.
- Parameters
-
framework | Name of the framework (ONNX, etc.) |
bufferModel | A buffer containing the binary model weights. |
bufferConfig | A buffer containing the network configuration. |
backend_id | The id of the backend. |
target_id | The id of the target device. |
- Returns
- A pointer to the created instance of FaceRecognizerSF.
◆ create() [3/6]
static FaceRecognizerSF OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.create |
( |
string | framework, |
|
|
MatOfByte | bufferModel, |
|
|
MatOfByte | bufferConfig, |
|
|
int | backend_id, |
|
|
int | target_id ) |
|
static |
Creates an instance of this class from a buffer containing the model weights and configuration.
- Parameters
-
framework | Name of the framework (ONNX, etc.) |
bufferModel | A buffer containing the binary model weights. |
bufferConfig | A buffer containing the network configuration. |
backend_id | The id of the backend. |
target_id | The id of the target device. |
- Returns
- A pointer to the created instance of FaceRecognizerSF.
◆ create() [4/6]
static FaceRecognizerSF OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.create |
( |
string | model, |
|
|
string | config ) |
|
static |
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 |
◆ create() [5/6]
static FaceRecognizerSF OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.create |
( |
string | model, |
|
|
string | config, |
|
|
int | backend_id ) |
|
static |
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 |
◆ create() [6/6]
static FaceRecognizerSF OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.create |
( |
string | model, |
|
|
string | config, |
|
|
int | backend_id, |
|
|
int | target_id ) |
|
static |
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 |
◆ Dispose()
override void OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.Dispose |
( |
bool | disposing | ) |
|
|
protectedvirtual |
◆ feature()
void OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.feature |
( |
Mat | aligned_img, |
|
|
Mat | face_feature ) |
Extracts face feature from aligned image.
- Parameters
-
aligned_img | input aligned image |
face_feature | output face feature |
◆ getNativeObjAddr()
IntPtr OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.getNativeObjAddr |
( |
| ) |
|
◆ match() [1/2]
double OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.match |
( |
Mat | face_feature1, |
|
|
Mat | face_feature2 ) |
Calculates 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 | defines how to calculate the distance between two face features with optional values "FR_COSINE" or "FR_NORM_L2" |
◆ match() [2/2]
double OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.match |
( |
Mat | face_feature1, |
|
|
Mat | face_feature2, |
|
|
int | dis_type ) |
Calculates 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 | defines how to calculate the distance between two face features with optional values "FR_COSINE" or "FR_NORM_L2" |
◆ FR_COSINE
const int OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.FR_COSINE = 0 |
|
static |
C++: enum DisType (cv.FaceRecognizerSF.DisType)
◆ FR_NORM_L2
const int OpenCVForUnity.ObjdetectModule.FaceRecognizerSF.FR_NORM_L2 = 1 |
|
static |
C++: enum DisType (cv.FaceRecognizerSF.DisType)
The documentation for this class was generated from the following file: