Skip to main content

Passport Auto-Capture

The SDK finds the passport data page, the page with the photo and the machine-readable zone (MRZ), in the live camera feed, captures a sharp, flattened image and sends it to the Passport OCR API: 0.75 IC per page.

Call​

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,
);

Install: Getting started for Flutter and Web, iOS, Android & React Native for the native wrappers and camera permission.

Options​

  • documentType: passport (DocumentType.passport in Flutter).
  • locale: the on-screen language, en, th or zh (EkycLocale.en in Flutter).

Result​

The result has typed fields plus the raw OCR response in result.raw (result.document?.rawJSON on iOS), including the parsed MRZ fields. Field list: Passport OCR API.

How auto-capture works
  • Boundary: a four-sided shape in the on-screen guide matching the ID-3 passport data-page aspect ratio of 1.42 (125 × 88 mm), within ±0.25.
  • Stability: the page must stay steady across recent frames, its corners drifting less than 2% of the frame diagonal.
  • Sharpness: blurry frames are rejected before any credit is spent, which keeps the fine MRZ print free of motion blur.
  • Perspective correction: the corners are warped to a flat page image of about 300 DPI (1476 × 1039 px) before upload.
  • Manual fallback: a shutter button appears after 10 seconds if auto-capture has not fired.

The full algorithm specification is in the SDK source.

© 2026 iApp Technology Co., Ltd.TermsPrivacyStatussale@iapp.co.th