Image quality estimation#
The image quality estimation evaluates an image based on several key criteria to ensure it meets the necessary standards. These criteria include:
- Blurriness: The image appears out of focus.
- Underexposure: The image is too dark.
- Overexposure: The image is too bright.
- Uneven illumination: The face in the image has significant contrast between dark and light regions.
- Specularity: The image contains flares or overly reflective areas on the face.
To perform the estimation, LUNA ID uses the LUNA SDK SubjectiveQuality estimator. For details, see Image Quality Estimation.
Default values#
Below are the default values for each criterion used in the image quality estimation:
Parameter | Default value |
---|---|
Blurriness | 0.61 |
Lightness | 0.57 |
Darkness | 0.50 |
Illumination | 0.1 |
Specularity | 0.1 |
Customizing the thresholds#
You can adjust the default values to better suit your specific requirements.
Important: The default threshold values are optimized for general use. We strongly advise against changing these values unless you fully understand the implications and have a clear reason to do so.
In LUNA ID for Android#
To change the blurriness, lightness, and darkness thresholds, modify the corresponding parameter values in LunaConfig
:
val lunaConfig = LunaConfig.create(
blurThreshold = 0.61f, // Threshold for blur detection
lightThreshold = 0.57f, // Threshold for overexposure detection
darknessThreshold = 0.50f, // Threshold for underexposure detection
)
To change the illumination and specularity thresholds:
1․ Download the faceengine.conf file and open it in a text editor.
2․ Modify the required parameter values in the QualityEstimator::Settings
section of the faceengine.conf file:
illuminationThreshold
specularityThreshold
Important: When editing the faceengine.conf file, ensure that you only change the necessary values and do not remove any sections or alter unrelated parameters.
3․ Place the modified faceengine.conf file in the assets/data/ directory.
4․ Rebuild and reinstall your application to apply the new configuration settings.
In LUNA ID for iOS#
To change image quality estimation thresholds:
1․ Download the appropriate faceengine.conf file and open it in a text editor:
OS | Download link |
---|---|
iOS (for devices) | faceengine.conf |
iOS (for simulators) | faceengine.conf |
2․ Modify the required parameter values in the QualityEstimator::Settings
section of the faceengine.conf file:
blurThreshold
lightThreshold
darknessThreshold
illuminationThreshold
specularityThreshold
Important: When editing the faceengine.conf file, ensure that you only change the necessary values and do not remove any sections or alter unrelated parameters.
3․ Place the modified faceengine.conf file in the corresponding directory for your platform:
OS | Directory |
---|---|
iOS (for devices) | fsdk.xcframework/ios-arm64/fsdk.framework/data |
iOS (for simulators) | fsdk.xcframework/ios-arm64_x86_64-simulator/fsdk.framework/data |
4․ Rebuild and reinstall your application to apply the new configuration settings.
By carefully adjusting these thresholds, you can fine-tune the image quality estimation process to better match your specific requirements. Always remember to test thoroughly after making changes to ensure that your application continues to function as expected.