kaderkita_ocr 0.3.0
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 #
onResultcallback onKtpScannerandKkScanner. 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 poppingKtpScanResult/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>.pngseed. - Dev/QA hooks on
KaderkitaOcrConfig(both defaultnull→ 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
namaKepalaKeluargaandalamatas 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 extraction —
KkData.namaKepalaKeluarga(head of family) andKkData.alamatare 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 flag —
KkMember.isKepalaKeluarga(bool) marks the member whose name matches the extracted head-of-family name (exact, else nearest by Levenshtein). Emitted intoFieldMap()asis_kepala_keluarga. - Data-model reference for
KtpData/KkData/KkMemberadded to the README.
Changed #
- Breaking:
KkMember.toFieldMap()now returnsMap<String, dynamic>(wasMap<String, String?>) to carry theis_kepala_keluargaboolean. - The result view's member table no longer shows the Golongan Darah column.
The
golonganDarahfield andgolongan_darahoutput key are retained.
0.1.0 #
- Initial publishable package API for on-device KTP and KK scanning.
- Public scanners:
KtpScanner,KkScanner(popKtpScanResult/KkScanResult). - Opt-in debug payload via
KaderkitaOcrConfig(debug: true)withScanDebug,ScanDebugPanel, andImagePipelineViewer. - Example app under
example/.