Add a sensor dial under the camera with live scan readings

Shows the mouse's rotation on the page since the scan started (a big "A",
coloured by tracking), direction and speed (arrow), and heading, speed,
distance, offset, area, tracking, laser quality, exposure, paper level
and fps. Also drops the "Read text", "Auto" and "Save text" toolbar
actions (OCR runs automatically on every finished page or opened image).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
erik
2026-10-11 21:44:03 +00:00
co-authored by Claude Opus 4.7
parent 61b6cf70a7
commit 0dd807a4e7
4 changed files with 219 additions and 39 deletions
+6 -3
View File
@@ -20,17 +20,20 @@ Linux driver tools for the Hama myScan (00052343) scanner mouse, a Dacuda design
(re-solved every 1.5 s, current position outlined), Start/Stop buttons, PNG/JPEG download of the finished
page and a Screenshot button (camera + page + status as one PNG)
- `tools/app.py` — desktop app (Qt/PySide6; Linux, Windows, macOS): live camera and page view while scanning
(Start/Stop or the scan button, F5), then OCR of the finished page with RapidOCR (`myscan/ocr.py`;
(Start/Stop or the scan button, F5). Under the camera a dial shows how the mouse is turned on the page since the
scan started (a big "A", coloured by tracking), its direction and speed (arrow), and the live readings: speed,
distance, offset from the start, area covered, tracking (share of recent frames matched by image rather than
the lasers alone), the lasers' surface quality, exposure, paper brightness and frame rate. Then OCR of the finished page with RapidOCR (`myscan/ocr.py`;
multilingual PP-OCRv6 models bundled in the wheel, works offline; an upside-down page is detected and turned). Level (Ctrl+L, on by default) shows the page rotated so its lines
are horizontal, using the text direction found by OCR; switch it off to see the page as stitched. Save image saves
what is shown. Recognised lines are outlined on the page by
confidence, and the text is selected right on the page like in a PDF viewer: drag (in reading order across
lines), double-click a word, triple-click a line, shift-click to extend, Ctrl+A; Ctrl+C or right-click copies.
With Paragraphs on (Ctrl+J, the default), copied and saved text has each paragraph on one line:
With Paragraphs on (Ctrl+J, the default), copied text has each paragraph on one line:
line breaks inside a paragraph become spaces and words hyphenated across lines are rejoined; a line ends a
paragraph if the next line is indented or its first word would have fitted on it (works for justified and
ragged text), and rows with several columns are left alone. Right-click offers the other form. Middle-drag or
Space+drag pans, the wheel zooms. Copy all and Save text (.txt) take the whole page. `python tools/app.py [image]` also opens and reads existing images (Open, or
Space+drag pans, the wheel zooms. Copy all takes the whole page. `python tools/app.py [image]` also opens and reads existing images (Open, or
drag and drop), which is all it does on machines without the mouse
- `myscan/scanner.py` — the scan loop shared by `scan.py` and the app (finds the mouse's `/dev/videoN` itself)
- `myscan/live.py`, `myscan/webview.py` — the live preview and its browser viewer (standard library only)