Package-level declarations
Types
Link copied to clipboard
Model-free card locator (pure Kotlin, no native code), meant as a fast fallback and for low-end devices.
Link copied to clipboard
A card found in a photo/frame. confidence is 0..1 and only comparable within one KtpDetector.
Link copied to clipboard
interface KtpDetector
Locates a card-shaped quadrilateral. Implementations must not decide whether it is a KTP - see KtpScanner.
Link copied to clipboard
data class KtpScanConfig(val aspectTolerance: Double = 0.15, val minCardWidthPx: Int = 500, val minBlurScore: Double = 40.0, val maxGlareRatio: Double = 0.03, val portraitRegion: Rect = Rect(0.6, 0.2, 1.0, 0.95))
Thresholds for KtpScanner. Defaults are starting points to calibrate on your own devices and backgrounds.
Link copied to clipboard
class KtpScanner(detector: KtpDetector = ClassicalKtpDetector(), faceDetector: FaceDetector? = null, config: KtpScanConfig = KtpScanConfig())
KTP capture pipeline: locate card -> rectify -> validate (shape, size, focus, glare, portrait placement).
Link copied to clipboard
data class KtpScanResult(val detection: KtpDetection?, val card: RgbImage?, val portrait: Face?, val blurScore: Double?, val glareRatio: Double?, val issues: List<KtpIssue>)