Face detection bounding box size estimation#
The face detection bounding box size estimation ensures that the detected face's bounding box matches a specified size. This estimation helps determine if the subject is too far from the camera, affecting image quality.
Recommended minimum size#
The minimum recommended size for the face bounding box is 200 x 200 pixels.
Default values#
- LUNA ID for iOS: 200 pixels
 - LUNA ID for Android: 350 dp (density-independent pixels)
> If the converted pixel value is less than 100 pixels, the frame size will automatically be set to 100 pixels to maintain a minimum acceptable quality. 
Configuration details#
Below are the configuration details for setting the minimum detectable frame size:
| Platform | Configuration | 
|---|---|
| LUNA ID for Android | public const val DEFAULT_MIN_DETECT_FRAME_SIZE: Int = 350 | 
| LUNA ID for iOS | LCLunaConfiguration → bestShotConfiguration → minDetSize = 200; | 
Implementation#
| Platform | Implementation | 
|---|---|
| LUNA ID for Android | public val detectFrameSize: Int = DEFAULT_MIN_DETECT_FRAME_SIZE | 
| LUNA ID for iOS | @property (nonatomic, assign) NSInteger minDetSize; |