kaderkita_ocr 0.3.0 copy "kaderkita_ocr: ^0.3.0" to clipboard
kaderkita_ocr: ^0.3.0 copied to clipboard

On-device Flutter OCR for Indonesian KTP and Kartu Keluarga (KK). Camera scanners with optional debug pipeline / ROI inspection.

Changelog #

0.3.0 #

No breaking changes; all public API changes are additive.

Added #

  • onResult callback on KtpScanner and KkScanner. When provided, the scanner delivers the result via callback and stays alive, so navigating back from a result page returns to the live camera (retake) instead of closing the scanner. Without it, scanners keep popping KtpScanResult / KkScanResult.
  • Multi-example glyph templates — OCR-A digit templates now support multiple examples per digit (folder-per-digit assets/glyphs/ocr-a-number/<d>/), matched by best score, with fallback to the single <d>.png seed.
  • Dev/QA hooks on KaderkitaOcrConfig (both default null → button hidden, so the picker packages stay in the app, not this library):
    • pickImageBytes — KTP scanner "pick from photo library" button; runs the chosen image through the same pipeline as a live capture.
    • pickStreamZipBytes — KK scanner "pick stream ZIP" button; re-runs the KK pipeline on a previously exported image-stream ZIP.
  • Glyph-crop export/share from the debug glyph-compare panel, to curate template assets.
  • Nomor KK glyph-compare pipeline documentation.

Changed #

  • Color glyph pipeline (Methods A/B/C) for the KTP NIK and KK number: select-black (A/B) plus a grayscale + contrast + Otsu path (C) for faint digits; the crop geometry source is auto-selected per image and results are voted across methods.
  • The KK number now reuses this same color glyph pipeline, gated to the final capture pass for performance.
  • KTP NIK pipeline docs updated for Methods A/B/C and multi-example templates.

Fixed #

  • KK number multi-frame assembly — the strip mosaic now splits a merged digit cluster at monospace pitch boundaries, fixing a dropped digit (15 instead of 16) on some pans.
  • KK head-of-family + address on ZIP reprocess — the dev/QA ZIP reprocess now runs the same cross-frame voting for namaKepalaKeluarga and alamat as a live scan (they were previously left blank on that path).

0.2.3 #

  • Cleanup

0.2.2 #

  • Correct the README install snippet to reference the current version.

0.2.1 #

  • Cleanup
  • No public API changes from 0.2.0. (0.2.0 is retracted; do not use it.)

0.2.0 #

Added #

  • KK header extractionKkData.namaKepalaKeluarga (head of family) and KkData.alamat are now populated by voting across the camera image-stream frames. Each value is read from the text to the right of its label, bounded to the left column and to its own row (no bleed into the row below or the Kecamatan/Kabupaten/Provinsi right column).
  • Head-of-family flagKkMember.isKepalaKeluarga (bool) marks the member whose name matches the extracted head-of-family name (exact, else nearest by Levenshtein). Emitted in toFieldMap() as is_kepala_keluarga.
  • Data-model reference for KtpData / KkData / KkMember added to the README.

Changed #

  • Breaking: KkMember.toFieldMap() now returns Map<String, dynamic> (was Map<String, String?>) to carry the is_kepala_keluarga boolean.
  • The result view's member table no longer shows the Golongan Darah column. The golonganDarah field and golongan_darah output key are retained.

0.1.0 #

  • Initial publishable package API for on-device KTP and KK scanning.
  • Public scanners: KtpScanner, KkScanner (pop KtpScanResult / KkScanResult).
  • Opt-in debug payload via KaderkitaOcrConfig(debug: true) with ScanDebug, ScanDebugPanel, and ImagePipelineViewer.
  • Example app under example/.
1
likes
130
points
312
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

On-device Flutter OCR for Indonesian KTP and Kartu Keluarga (KK). Camera scanners with optional debug pipeline / ROI inspection.

Repository (GitHub)
View/report issues

Topics

#ocr #ktp #kk #indonesia #mlkit

License

Apache-2.0 (license)

Dependencies

archive, camera, flutter, google_mlkit_text_recognition, image, path, path_provider, permission_handler, share_plus, shared_preferences, wakelock_plus

More

Packages that depend on kaderkita_ocr