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>