mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-27 03:27:14 -06:00
Split out of #1887 (part 2 of 3, stacked on part 1). The modules land on their own; the HDR merge starts using them in part 3. - refine.rs: an alignment found on <= 1200 px versions refined at full size. One 48 px patch at the most textured spot (smaller structure-tensor eigenvalue) of each of ~24 cells along the long edge, matched by masked normalised cross-correlation over the pixels usable in both frames with a sub-pixel peak (ambiguous and textureless patches dropped), fitted by RANSAC at 0.75 px with the simplest of translation / similarity / homography. Also recovers a frame with no alignment, searching +-16 px. - flow.rs: what one homography leaves (parallax, distortion), measured on ~96 tiles along the long edge within +-5 px, outliers against their neighbours' median dropped, gaps filled, the field smoothed; flow::warp resamples once through the homography plus the local shift (Lanczos-3). align::warp is flow::warp with no shift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>