Go to file
2026-07-14 22:51:07 -07:00
android Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
data Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
ios Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
lib Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
native/phash Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
test Initial commit: Flutter card recognition demo 2026-07-12 20:17:32 -07:00
test_assets Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
tool Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
.gitignore Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
.metadata Initial commit: Flutter card recognition demo 2026-07-12 20:17:32 -07:00
analysis_options.yaml Initial commit: Flutter card recognition demo 2026-07-12 20:17:32 -07:00
carddex_flutter_demo_plan.md Initial commit: Flutter card recognition demo 2026-07-12 20:17:32 -07:00
pubspec.lock Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
pubspec.yaml Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00
README.md Add card recognition features: pHash native library, feedback system, capture/preview screens, and test assets 2026-07-14 22:51:07 -07:00

Card Scan Demo

拍照 / 选图 → 预览页 ML Kit 边框锁定 → 裁剪纠偏 → rgb-phash-v1 本地比对 → 看结果。

拍照页只显示引导框不做实时检测。pHash 使用 vendored C++native/phash)经 dart:ffi 调用,图库为 data/hashes.json

完整说明(对照集换社反编译分析):docs/demo说明.md

运行

export PATH="$HOME/flutter/bin:$PATH"
cd /Users/a1518/Desktop/project/card-dex-demo
flutter pub get
flutter run

本地 pHash 脚本

export PATH="$HOME/flutter/bin:$PATH"   # dart 随 Flutter SDK 提供
cmake -S native/phash -B native/phash/build -DPHASH_BUILD_SHARED=ON
cmake --build native/phash/build
dart run tool/hashgen.dart
dart run tool/match.dart --image test_assets/30892.jpg