On this page, find detailed information about face detection in Face SDK Web API.
The SDK uses several parameters to detect faces, they all are collected in the
detections field of Response.
You can define whether to detect all the faces on an image or just one (the most central one) with the
onlyCentralFace parameter in Request.
The request contains the following parameters:
If set to true, returns
If set to false,
If set to true, the SDK detects only one—the most central face on the image.
If set to false, the SDK detects all faces on the image.
Default: true. If it is not mentioned, processed as true.
If set to true, returns a flag for calculating the faces attributes and the quality characteristics: occlusions, emotions, age, blur amount, noise, brightness, symmetry indicator.
Default: false. If it is not mentioned, processed as false.
The response contains the following parameters:
└── code └── msg └── results | └── detections | | └── landmarks | | └── roi | | └── rotationAngle | | └── thumbnail └── detectorType └── landmarksType
|code||The code the SDK returns.|
The message result.
If everything is OK, the result looks as follows:
See the list of error codes below.
|detections||The array of detected faces. Includes
|landmarks||Returns absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.|
|roi||Сoordinates of the rectangular area that contains the face relative to the overall image: x, y, height, width.|
|rotationAngle||Angle of rotation of the face from the vertical axis, degrees.|
|thumbnail||Base64 cropped image that contains the vertically aligned face.|
|detectorType||The type of detector. It is for internal use and can not be changed.|
|landmarksType||The type of landmarks identification. It is for internal use and can not be changed.|
Here is a list of possible errors and their meanings:
|FR_FACE_NOT_DETECTED = 2||No faces are detected, most probably, the image does not contain faces.|
|FACER_NO_LICENSE = 200||There is no license.|
|FACER_IS_NOT_INITIALIZED = 201||The library is not initialized.|
|FACER_COMMAND_IS_NOT_SUPPORTED = 202||The command is not supported.|
|FACER_COMMAND_PARAMS_READ_ERROR = 203||The request is formed incorrectly.|