SYSTEM_METADATA
ARCHITECTURE_PROTOCOLARCH: 4-POINT PERSPECTIVE CORRECTION
CORE_INTEGRATIONSCORE: TESSERACT.JS + CANVAS API
PROJECT_NODE: DOC-SCANNER-OCR
Doc Scanner + OCR
PROJECT_ABSTRACT
Doc Scanner + OCR takes a photo of a physical document (receipt, letter, book page, ID card) and runs the full pipeline locally: draggable 4-point perspective correction frames the document in real time, a custom 8-DOF perspective transform warps it into a flat rectangular scan, and Tesseract.js v6 runs the OCR engine inside a Web Worker. No image ever leaves the browser, the entire pipeline (warp matrix solve, raster resampling, text recognition) executes on-device. Ships as a pure static SPA.
KEY_CAPABILITIES
- ▶Full in-browser pipeline: drag-to-frame document corners → 8-DOF perspective warp via Gaussian elimination → Tesseract.js v6 OCR in a Web Worker.
- ▶Interactive corner handles with real-time overlay: dark vignette outside the selection region plus dashed border gives instant visual feedback.
- ▶Custom perspective transform solver: it solves the 8×8 linear system from 4 point correspondences, then inverse-maps every output pixel back to source coordinates.
- ▶Progress tracking during OCR: Tesseract logger feeds a percentage bar, and the recognized text is displayed in a copyable block with one-click TXT download.
React 19Tesseract.jsCanvas APIPerspective TransformComputer Vision