Skip to content
Linkium-sukiPublic

About

Project "Pulse": A High-Performance, Privacy-First Mobile Scanner

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

⚡ Pulse

A High-Performance, Privacy-First Mobile Scanner — rebuilt in Kotlin + Jetpack Compose
极致离线 · 视觉重构 · 像素主权

Platform Framework CV_Engine ML_Engine

Pulse is the full native rewrite of NULLSCAN — the project codename "Project Pulse" has taken over as the product name.


📖 Introduction (简介)

Pulse is a no-compromise, 100% offline document scanner focused on paper restoration (试卷还原): removing red/blue pen ink, de-penciling, illumination normalization and OCR-aware text protection — all computed locally on your device.

The v2.0 rewrite moves from Flutter to a fully native Kotlin + Jetpack Compose (Material 3) stack, keeps the exact Lazarus restoration pipeline, and adds a self-built camera scanner, manual crop, an encrypted archive and richer exports.

Pulse 是一款拒绝妥协的全离线移动端扫描工具,专注纸张还原:去除红/蓝笔迹、去铅笔痕、 光照归一化与 OCR 文字保护——全部计算在你的设备本地完成。2.0 重制版从 Flutter 迁移到原生 Kotlin + Jetpack Compose (Material 3),完整保留 Lazarus 还原管线,并新增自研相机扫描、 手动裁剪、加密文档库与更丰富的导出能力。


✨ Features (功能亮点)

🧪 Hybrid CV Pipeline (混合视觉流水线)

  • Default scan path: Google Document Scanner — when Google Play services is available, Pulse launches the system scanner UI (auto-capture, auto-crop, multi-page). The scanner is a Play-services Dynamite module, not bundled into the APK; Pulse itself still holds no INTERNET permission (module delivery is GMS Core's own channel). Unavailable / cancelled / offline? Pulse falls back seamlessly to its built-in manual scanner. (默认走 Google 系统扫描器:自动拍摄/裁剪/多页。扫描模块由 GMS Core 按需分发、不打入 APK;本应用依旧不申请 INTERNET 权限。GMS 不可用或用户取消时无缝回退自研扫描页。)
  • Aether Lens — real-time document edge detection on the CameraX analysis stream (OpenCV Canny + largest-quad contour), plus a draggable four-corner crop with perspective warp. (基于分析流的实时边缘检测 + 可拖拽四角裁剪与透视矫正)
  • Lazarus Engine — the exact legacy pipeline, now in Kotlin/OpenCV: HSV ink separation (red wraps the hue circle in two segments), per-channel illumination normalization, gray-threshold stroke erase (De-Pencil / De-Ink), OCR-zone forced recall, USM sharpen — plus v2.1 upgrades: auto-deskew (Hough text-line median), an adaptive B&W fourth style, and CLAHE low-light boost. (原版管线逐函数移植 + 2.1 升级:自动摆正、自适应黑白第四档、CLAHE 弱光增强)
  • Cutout (new) — one-tap AI portrait segmentation with the model bundled in the APK (ML Kit Selfie Segmentation, ~256×256 f16 tflite, fully offline) or interactive GrabCut over a drawn frame; feathering and transparent / white / black backgrounds; PNG export. (抠图:内嵌端侧人像分割小模型一键抠人,或拖框 GrabCut 抠任意主体;支持羽化与透明/白/黑底)
  • i18n — full Simplified-Chinese and English resources on every screen, following the system language. (全界面中英双语,跟随系统语言)
  • OCR Protect — ML Kit on-device Chinese OCR bounding boxes force text pixels to survive aggressive erase passes. (ML Kit 中文 OCR 圈定文字保护区,强力去墨不误删文字)

🛡️ Absolute Privacy (绝对隐私)

  • Air-gapped by design — the app does not request the INTERNET permission. Not even once. (原生不申请网络权限,实现物理级隔离)
  • Encrypted archive — saved documents are AES-256-GCM encrypted with an Android Keystore key, unlockable behind BiometricPrompt. (文档库 Keystore 加密 + 生物识别锁)
  • Zero-Metadata — we process images, not your identity. (只处理像素,不触碰元数据)

🗂️ Rebuilt Experience (重制体验)

  • Material 3 UI: dynamic color, tonal surfaces, segmented controls, bottom sheets.
  • Multi-page editor with reorder / rotate / delete, tag taxonomy (23 paper tags).
  • Exports: adaptive-size PDF (optional watermark) and OCR text saved straight to Downloads/Pulse — no share sheet (sharing kept as an explicit option), PNG/JPG to the gallery.
  • Library with thumbnail grid and title / tag / OCR full-text search.

🛠️ Tech Stack (技术栈)

Component Technology
UI Kotlin · Jetpack Compose · Material 3 (dynamic color)
Computer Vision OpenCV 4 (org.opencv:opencv AAR)
Machine Learning ML Kit Text Recognition — Chinese (bundled, offline model)
Camera CameraX (Preview / ImageAnalysis / ImageCapture)
Storage Room + DataStore · Android Keystore (AES-256-GCM)

🚀 Build (构建)

# Requires JDK 17 + Android SDK (minSdk 26 / target 35)
./gradlew assembleDebug

Open the project in Android Studio, or run on-device:

./gradlew installDebug

📄 License

Licensed under Apache License 2.0. The software is provided "AS IS". 😋


Project Pulse: Refactoring the world, one pixel at a time.
Rewritten with ❤️ in Kotlin — successor of NULLSCAN

About

Project "Pulse": A High-Performance, Privacy-First Mobile Scanner

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages