|
visageSDK
|
Objective-C wrapper of the VisageSDK::VisageFeaturesDetector class. More...
#import <objc_VisageFeaturesDetector.h>
Inherits NSObject.
Instance Methods | |
| (VisageFeaturesDetector *) | - init: |
| Constructor. More... | |
| (int) | - detectFaces:withRect:withMaxFaces:withMinFaceScale:withMaxFaceScale:withRefinementStep: |
| Performs face detection in a still image. More... | |
| (int) | - detectFacialFeatures:withFaceData:withMaxFaces:withMinFaceScale:withMaxFaceScale:withOutputOnly2DFeatures: |
| Performs faces and facial features detection in a still image. More... | |
Objective-C wrapper of the VisageSDK::VisageFeaturesDetector class.
Definition at line 23 of file objc_VisageFeaturesDetector.h.
| - (int) detectFaces: | (VisageImage *) | frame | |
| withRect: | (NSMutableArray *) | faces | |
| withMaxFaces: | (int) | maxFaces | |
| withMinFaceScale: | (float) | minFaceScale | |
| withMaxFaceScale: | (float) | maxFaceScale | |
| withRefinementStep: | (bool) | useRefinementStep | |
Performs face detection in a still image.
The algorithm detects one or more faces. For each detected face a square facial bounding box is returned.
The results are returned in form of CgRect objects. An NSMutableArray of CgRect objects passed to this method as output parameter should be allocated to maxFaces size. For example:
After this call, n contains the number of detected faces. The first n members of the faces array are filled with resulting bounding boxes for each detected face. If maxFaces is smaller than the number of faces actually detected in the image, the function will return only first maxFaces detected faces.
VisageFeaturesDetector expects input image to be in the RGB, RGBA or grayscale color space with bit depth set to 8 and with origin in the top left pixel of the image.
Note that the input image is internally converted to grayscale.
| frame | the input image. |
| faces | pointer to an array of CgRect objects in which the results will be returned. |
| maxFaces | maximum number of faces to be detected |
| minFaceScale | scale of smallest face to be searched for, defined as decimal fraction [0.0 - 1.0] of input image size (min(width, height)) |
| maxFaceScale | scale of largest face to be searched for, defined as decimal fraction [0.0 - 1.0] of input image size (min(width, height)) |
| useRefinementStep | if set to true, additional refinement algorithm will be used resulting with more precise facial bounding boxes and lower FPR, but higher detection time |
| - (int) detectFacialFeatures: | (VisageImage *) | frame | |
| withFaceData: | (FaceDataCollection *) | output | |
| withMaxFaces: | (int) | maxFaces | |
| withMinFaceScale: | (float) | minFaceScale | |
| withMaxFaceScale: | (float) | maxFaceScale | |
| withOutputOnly2DFeatures: | (bool) | outputOnly2DFeatures | |
Performs faces and facial features detection in a still image.
The algorithm detects one or more faces and their features. The results are, for each detected face, the 3D head pose, gaze direction, eye closure, the coordinates of facial feature points (e.g. chin tip, nose tip, lip corners etc.) and 3D face model fitted to the face. If outputOnly2DFeatures is set, only the 2D feature points will be returned.
The results are returned in form of FaceData objects. A FaceDataCollection passed to this method as output parameter should be allocated to maxFaces size. For example:
After this call, n contains the number of faces actually detected. The first n members of the data array are filled with resulting data for each detected face. Please refer to the FaceData documentation for detailed description of returned parameters. If maxFaces is smaller than the number of faces actually present in the image, the function will return only first maxFaces detected faces.
VisageFeaturesDetector expects input image to be in the RGB, RGBA or grayscale color space with bit depth set to 8 and with origin in the top left pixel of the image.
Note that the input image is internally converted to grayscale.
| frame | the input image. |
| output | pointer to a FaceDataCollection object in which the results will be returned. |
| maxFaces | maximum number of faces to be detected |
| minFaceScale | scale of smallest face to be searched for, defined as decimal fraction [0.0 - 1.0] of input image size (min(width, height)) |
| maxFaceScale | scale of largest face to be searched for, defined as decimal fraction [0.0 - 1.0] of input image size (min(width, height)) |
| outputOnly2DFeatures | if set, detection time will be reduced and only FeaturePoints2D will be returned |
| - (VisageFeaturesDetector *) init: | (NSString *) | detectorConfigFile |
Constructor.
Initialises the features detector.
Several data files are needed for facial features detection. In the current distribution these files are contained within the Samples/data folder.
To successfully initialize VisageFeaturesDetector, provide path to the configuration file that is located in folder with the following folder structure and data files:
| detectorConfigFile | the name of the detector configuration file (.cfg) relative to the current working directory, e.g. "Face Detector.cfg", assuming it's located in the current working directory. |
1.8.15