Best shot error notifications#
In LUNA ID for Android#
A best shot error notification is displayed as soon as an error occurs. The next notification may not be sent earlier than in half a second. If half a second has passed, a new notification will be displayed immediately.
When multiple errors occur within a second, notifications are sent simultaneously. The number of notifications sent depends on the maxMessages
parameter in the event-receiving function.
The default parameter value is 0,5.
The maximum parameter value is 3.
fun allEvents(maxMessages: Int = 0,5)
If you need to hide a notification, you can link the hiding to the appropriate event, for example, to ResultSuccess
.
The table below lists best shot errors in descending order by their priority:
Error | Description |
---|---|
PrimaryFaceLostCritical |
The primary face that was detected in the video stream has been lost. |
PrimaryFaceLost |
The primary face was not detected in the video stream or has been lost. |
FaceLost |
Unable to detect a face in the video stream. |
TooManyFaces |
The frame must contain only one face for LUNA ID to perform a series of estimations, and then select the best shot. |
FaceOutOfFrame |
A face is too close to the camera and does not fit the face recognition area. |
FaceDetectSmall |
The size of the detected face does not correspond to the specified bounding box size size. |
BadHeadPose |
Head rotation angles are not between the minimal and maximum valid head position values. |
BadQuality |
The input image does not meet the AGS estimation threshold. |
BlurredFace |
The input image does not meet the blurriness threshold. |
TooDark |
The input image does not meet the darkness threshold. |
TooMuchLight |
The input image does not meet the lightness threshold. |
GlassesOn |
The person in the input image is wearing sunglasses. |
OccludedFace |
The face is not properly visible in the input image. |
BadEyesStatus |
The eye state estimation failed. |
In case there are more than 3 errors, the first 3 highest priority ones are selected, the rest are discarded.
In LUNA ID for iOS#
The LMErrorPresenter
class has an object that allows you to manage error notifications. LMErrorPresenter
accumulates an array of errors that occurred over the past second, and then passes them out via the LMErrorPresenterDelegate
protocol in the func send(errors: [Error])
method.
The error presenter object is contained in the LMBestShotService
class and is not accessible directly. It only works with the LMBestShotServiceDelegate
delegate, which forwards the LMErrorPresenterDelegate
methods.
The errors: [Error]
array can contain from 0 to 3 errors. You can specify the number of errors by using the errorLimit: Int
argument in the LMBestShotService
constructor. The limit can take values from 0 to 3. The default value is 3.
Errors are sorted in descending order by two criteria:
- The most common ones
- The most critical ones
Important: Even one critical error will be of a higher priority than a repeatedly occurring non-critical one. In the absence of critical errors, errors will be displayed according to priorities. The list of error priorities (in descending order) is given below.
Critical errors#
The below errors lead to an immediate session termination.
Error | Code | Description |
---|---|---|
INTERACTION_TIMEOUT |
1007 | The frame was not received in the time interval allotted for the best shot. |
PRIMARY_FACE_CRITICAL_LOST |
1027 | The primary face that was detected in the video stream has been lost. |
LIVENESS_ERROR |
1004 | The OneShotLiveness estimation failed. |
Non-critical errors#
Non-critical errors inform you that you are doing something wrong when trying to get the best shot.
Error | Code | Description |
---|---|---|
MULTIPLE_FACES |
1003 | The frame must contain only one face for LUNA ID to perform a series of estimations, and then select the best shot. |
FACE_LOST |
1022 | The face that was detected in the video stream has been lost. The session will not be terminated. |
BORDERS |
1017 | The bounding box size with the detected face does not correspond to the specified size. |
TOO_FAR |
1016 | The bounding box size with the detected face does not correspond to the specified size. |
OCCLUDED_FACE |
1010 | The face is not properly visible in the input image. |
BAD_HEAD_POSE |
1002 | Head rotation angles are not between the minimal and maximum valid head position values. |
IMAGE_IS_BLURRED |
1011 | The input image does not meet the blurriness threshold. |
IMAGE_IS_UNDEREXPOSED |
1012 | The input image does not meet the darkness threshold. |
IMAGE_IS_OVEREXPOSED |
1013 | The input image does not meet the lightness threshold. |
SUNGLASSES_DETECTED |
1024 | The person in the input image is wearing sunglasses. |
EYES_CHECK_FAILED |
1026 | The eye state estimation failed. |
BAD_QUALITY |
1001 | The input image does not meet the AGS estimation threshold. |
Other errors that are not listed above have a lower priority. For a full list of errors, see Status codes and errors.
In case there are more than 3 errors, the first 3 highest priority ones are selected, the rest are discarded.