Commit Graph
7 Commits
Author SHA1 Message Date
erikandClaude Opus 5.5 36e714cd62 Faster frame registration, page rendering and compose
PageGraph.add registers consecutive frames on half-resolution high-pass
images (ECC without pre-blur, phase correlation on a half-size window) and
builds the high-pass with the illumination blur done on a 4x smaller copy;
full-resolution high-pass images are made on demand for keyframes only. The
flat field is pre-warped into undistorted coordinates, so a frame is
remapped as uint8 and corrected with one multiply. add() goes from ~13-20
to ~3-7 ms per frame with the same registration.

image() draws the page on one thread per row strip of the canvas, with the
flat-field gain and feather weight folded into one multiply. compose crops
before normalising and takes the white point from a 1/16 subsample.
_agree computes its moments with OpenCV, which releases the GIL; its
decisions are unchanged on all 1425 checks of a 2525-frame scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:46:03 +00:00
erikandClaude Opus 5.5 f47df93c97 Live browser view while scanning, with downloads and screenshots
scan.py --view serves a page (myscan/webview.py, standard library only) with
MJPEG streams of the latest camera frame and the page as it is stitched,
Start/Stop buttons, PNG/JPEG download of the finished page and a screenshot
of the current view.

myscan/live.py keeps a downscaled preview: new frames are pasted at their
current best pose, and a background thread re-solves the pose graph every
1.5 s (throttled to at most ~50% duty) and redraws the preview off the
registration thread. PageGraph.solve can now run on a prefix of the frames
while add() continues, keeping loop closures and features between solves,
so the final solve after the stop press is much shorter. Frame PNGs are
saved on their own thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:51:59 +00:00
erikandClaude Opus 5.5 a0ae1ffc0d README: note that the committed EEPROM dump is one unit's calibration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:08:04 +00:00
erikandClaude Opus 5.5 998f0fd42b Add this unit's EEPROM calibration dump
calib/eeprom_3000.bin is the 0x3000 header plus the signed HardwareData blob
(19417 bytes) read from the mouse, mapped field by field in EEPROM.md. The rest
of calib/ stays ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:07:14 +00:00
erikandClaude Opus 5.5 026aa6c894 Global page assembly with loop closures and lens undistortion
The frame-by-frame stitcher accumulated drift, so later passes landed rotated
and offset, doubling text. myscan/pagegraph.py instead solves all frame poses
together: ECC odometry between consecutive frames (bridging single corrupt
frames), SIFT+RANSAC loop closures between overlapping passes, and a robust
Gauss-Newton pose graph. Loop matches must agree over the whole overlap, which
rejects matches on repeated text. Off-page frames and frames that disagree
with the mosaic are left out of the render.

calib.Undistort applies the EEPROM lens model (OpenCV k1..k3, p1, p2 plus
the tilt homography, as decoded in EEPROM.md); up to 8.8 px at the corners.

scan.py registers frames on a worker thread so capture no longer drops
frames, then assembles the page after the stop press (~11 s for a full
page). stitch.py uses the new assembly by default; --live keeps the old one.

EEPROM.md documents the full calibration blob layout, checksum and signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:06:45 +00:00
erikandClaude Opus 5.5 e70d56d957 Live button-driven scanning with EEPROM calibration
- ScanSession: scan-mode context manager with bright-pixel auto-exposure and
  sensor colour gains; tools/scan.py scans on the scan button with live stitching
- Read-only EEPROM access and calib.py parser (laser geometry, intrinsics,
  colour gains, black/white flat-field samples); flat-field correction in Stitcher
- OV7740 sensor access via the MCU proxy; colour gains from EEPROM fix green cast
- Stitcher: colour support, high-passed registration (robust on blank paper)
- RE notes on the Mac app's colour, exposure, stitching and button handling

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 11:13:59 +00:00
erikandClaude Opus 5.5 e1c1012c1c Hama myScan Linux driver tools: scan mode, frame decoding, stitching
UVC extension-unit control (mouse/scan mode, LEDs, exposure), JPEG header
fix and embedded laser record decoding, session recorder, and a stitcher
that combines laser dead reckoning with phase correlation and ECC refinement.
FINDINGS.md holds the reverse-engineered protocol and laser calibration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:41:22 +00:00