LivenessSettings

data class LivenessSettings(@FloatRange(from = 0.0, to = 1.0) val handToCardSizeRatio: Float = 0.15f, @FloatRange(from = 0.0, to = 1.0) val handCardOverlapThreshold: Float = 0.05f, val enableCardHeldInHandCheck: Boolean = true, val screenCheckStrictnessLevel: StrictnessLevel = StrictnessLevel.Level5, val photocopyCheckStrictnessLevel: StrictnessLevel = StrictnessLevel.Level5) : Parcelable

Configuration settings for liveness detection during card scanning.

This class defines various parameters that control the behavior of liveness detection, including thresholds for hand detection, screen and photocopy analysis, and options to skip processing certain frames based on liveness criteria.

Constructors

Link copied to clipboard
constructor(@FloatRange(from = 0.0, to = 1.0) handToCardSizeRatio: Float = 0.15f, @FloatRange(from = 0.0, to = 1.0) handCardOverlapThreshold: Float = 0.05f, enableCardHeldInHandCheck: Boolean = true, screenCheckStrictnessLevel: StrictnessLevel = StrictnessLevel.Level5, photocopyCheckStrictnessLevel: StrictnessLevel = StrictnessLevel.Level5)

Properties

Link copied to clipboard

Enables or disables the check for card held in hand. When true, the liveness detection will include a check to verify that the card is being held in hand. Defaults to true.

Link copied to clipboard

Minimum overlap threshold between detected hand and card regions. This parameter is used to adjust heuristics that eliminate cases when the hand is present in the input but it is not holding the card. handCardOverlapThreshold is the minimal ratio of hand pixels inside the frame surrounding the card and area of that frame. Only pixels inside that frame are used to ignore false-positive hand segmentations inside the card. Value must be in range \[0.0, 1.0\]. Defaults to 0.05.

Link copied to clipboard

Minimum hand-to-card size ratio for valid hand detection. This controls how large a hand must appear in the frame relative to the card to be considered valid. Lower values detect smaller/more distant hands. Hand scale is calculated as a ratio between area of hand mask and card mask. Value must be in range \[0.0, 1.0\]. Defaults to 0.15.

Link copied to clipboard

Sensitivity level for detecting frames where the presented card is a photocopy. Higher levels provide better security by being more strict in detecting photocopied cards, but may increase false positives. Defaults to StrictnessLevel.Level5.

Link copied to clipboard

Sensitivity level for detecting frames where the card is displayed on a screen. Higher levels provide better security by being more strict in detecting screen-displayed cards, but may increase false positives. Defaults to StrictnessLevel.Level5.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)