🛂 Passport Auto-Capture
The SDK automates capturing the passport data page (the page with the photo and machine-readable zone): it detects the page boundary in the live camera feed, waits for a sharp stable frame, perspective-corrects the crop, and submits it to the Passport OCR API — 0.75 IC per request. It is the same auto-capture engine as ID cards, tuned for the larger ID-3 passport geometry.
Flutter
import 'package:iapp_ekyc_sdk/iapp_ekyc_sdk.dart';
final client = IappEkycClient(apiKey: 'YOUR_API_KEY');
final result = await DocumentCaptureView.start(
context,
client: client,
documentType: DocumentType.passport,
locale: EkycLocale.en,
);
Web
import { IappEkyc } from '@iapp-technology/ekyc-sdk';
const ekyc = new IappEkyc({ apiKey: 'YOUR_API_KEY' });
const result = await ekyc.captureDocument({
mount: document.getElementById('ekyc-mount'),
documentType: 'passport',
locale: 'en',
});
The result exposes typed accessors plus the raw OCR response (result.raw), including the parsed MRZ fields — see the Passport OCR field reference.
How auto-capture works
- Boundary detection — adaptive Canny edge detection and contour analysis (OpenCV) find a convex quadrilateral matching the ID-3 passport data-page aspect ratio (1.42, i.e. 125 × 88 mm, ±0.25 tolerance) inside the on-screen guide.
- Stability — capture only triggers after the page 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, protecting the fine MRZ print from motion blur before any credit is spent.
- Perspective correction — the detected corners are warped to a flat ~300 DPI page image (1476 × 1039 px) before upload.
- Manual fallback — a manual shutter button appears after 10 seconds if auto-capture has not fired.
Learn more
- Product API: Passport OCR
- SDK setup: Getting Started
- Source & algorithm spec: github.com/iapp-technology/iapp-ekyc-sdk