Skip to content

Getting the best shot with faces with closed eyes#

In LUNA ID, you can define whether images with faces with one or two closed eyes can be considered best shots.

In LUNA ID for Android#

One closed eye#

To get the best shot with a closed eye, use the acceptOneEyeClose parameter. The parameter has the following values:

Value Description
true Default. Specifies that frames that contain faces with a closed eye can be best shots.
false Specifies that frames that contain faces with a closed eye cannot be best shots. However, it is possible to get the best shot with an occluded eye. For details, see Getting the best shot with faces with occluded eyes.

Important: The acceptOneEyeClose parameter requires the acceptOneEyed parameter to be enabled. For details, see Performing Dynamic Liveness estimation.

Two closed eyes#

To get the best shot with two closed eyes, use the acceptEyesClosed parameter. The parameter has the following values:

Value Description
true Specifies that frames that contain faces with closed eyes can be best shots.
false Default. Specifies that frames that contain faces with closed eyes cannot be best shots.

Consider an example below:

LunaConfig.create(
acceptEyesClosed = false,
)

Important: The acceptEyesClosed parameter requires the lunaid-common-x86-X.X.X.aar, lunaid-common-arm-X.X.X.aar dependencies. For details, see Distribution kit.

In LUNA ID for iOS#

One closed eye#

To get the best shot with a closed eye, use the eyeInjury parameter. The parameter has the following values:

Value Description
true Default. Specifies that frames that contain faces with a closed eye can be best shots.
false Specifies that frames that contain faces with a closed eye cannot be best shots. However, it is possible to get the best shot with an occluded eye. For details, see Getting the best shot with faces with occluded eyes.

Two closed eyes#

In LUNA ID for iOS, it is impossible to get the best shot with two closed eyes.