📇 Official Card Auto-Capture
The same auto-capture engine handles other official Thai documents: driver licenses, bank passbooks (book bank), and ID card copies with signature. The SDK detects the document boundary, waits for a sharp stable frame, perspective-corrects the crop, and submits it to the matching iApp OCR API — 1.0–1.25 IC per page depending on the document type.
Supported document types
DocumentType (Flutter) | documentType (Web) | API called | Cost |
|---|---|---|---|
DocumentType.thaiDriverLicense | 'thaiDriverLicense' | Thai Driver License OCR | 1.25 IC/page |
DocumentType.bookBank | 'bookBank' | Book Bank OCR | 1.25 IC/page |
DocumentType.thaiIdWithSignature | 'thaiIdWithSignature' | Thai National ID Card with Signature | 1.0 IC/page |
Flutter
import 'package:iapp_ekyc_sdk/iapp_ekyc_sdk.dart';
final client = IappEkycClient(apiKey: 'YOUR_API_KEY');
// Thai driver license
final license = await DocumentCaptureView.start(
context,
client: client,
documentType: DocumentType.thaiDriverLicense,
locale: EkycLocale.th,
);
// Bank passbook
final bookBank = await DocumentCaptureView.start(
context,
client: client,
documentType: DocumentType.bookBank,
);
Web
import { IappEkyc } from '@iapp-technology/ekyc-sdk';
const ekyc = new IappEkyc({ apiKey: 'YOUR_API_KEY' });
const license = await ekyc.captureDocument({
mount: document.getElementById('ekyc-mount'),
documentType: 'thaiDriverLicense',
locale: 'th',
});
const idCopy = await ekyc.captureDocument({
mount: document.getElementById('ekyc-mount'),
documentType: 'thaiIdWithSignature',
});
How auto-capture works
- Boundary detection — adaptive Canny edge detection and contour analysis (OpenCV) find a convex quadrilateral matching the ID-1 card aspect ratio (1.586, ±0.25 tolerance) inside the on-screen guide — driver licenses, bank books, and ID copies all share the ID-1 geometry.
- Stability — capture only triggers after the document has been steady across a sliding window of recent frames (corner drift under 2% of the frame diagonal).
- Sharpness — Laplacian-variance scoring rejects blurry frames before any credit is spent.
- Perspective correction — the detected corners are warped to a flat ~300 DPI image (1011 × 637 px) before upload.
- Manual fallback — a manual shutter button appears after 10 seconds if auto-capture has not fired.
Learn more
- Product APIs: Thai Driver License · Book Bank · ID Card with Signature
- SDK setup: Getting Started
- Source & algorithm spec: github.com/iapp-technology/iapp-ekyc-sdk