KtpScanner

class KtpScanner(detector: KtpDetector = ClassicalKtpDetector(), faceDetector: FaceDetector? = null, config: KtpScanConfig = KtpScanConfig())

KTP capture pipeline: locate card -> rectify -> validate (shape, size, focus, glare, portrait placement).

Supplying a faceDetector enables portrait validation, 180-degree orientation recovery, and gives you the portrait for selfie-to-KTP matching (embedder.embed(result.card, result.portrait)).

This validates that the object looks like a KTP; it does not read text, verify authenticity, or detect forgeries. KTP images are personal data - keep processing on-device and do not persist raw images.

Constructors

Link copied to clipboard
constructor(detector: KtpDetector = ClassicalKtpDetector(), faceDetector: FaceDetector? = null, config: KtpScanConfig = KtpScanConfig())

Functions

Link copied to clipboard