SIGN IN SIGN UP
microsoft / PowerToys UNCLAIMED

Microsoft PowerToys is a collection of utilities that supercharge productivity and customization on Windows

0 0 183 C#

panorama: enable AnchorOverride for harmonic and small off-by-1 corrections

When the matcher's global correlation picks a harmonic false-match on
periodic dark content, or is off by 1-2 pixels from the true scroll
offset, the anchor tracker's per-row signature matching can identify
the correct value.

Gate the AnchorOverride correction on two conditions:
- largeHarmonicCorrection: abs(anchor)*2 < abs(matcher), catching
  harmonic false-matches like 238->60 on periodic content.
- smallCorrection: same scroll direction AND diff <= 2, catching
  off-by-1/2 misalignments where the anchor is more precise.

Sign inversions (matcher and anchor disagree on direction) are NOT
corrected, preventing incorrect overrides on ambiguous Phase 2
image-slice content.

Also improves test #8 (harmonic-dark-theme-override) to use
per-frame noise injection that defeats the harmonic-fallback probe
threshold guard, more faithfully reproducing the real-world failure.

Validated:
- Selftest: 44/44 stitch sessions pass, 0 failures
- Replay of real capture (panorama_20260310_063946_40956): F10
  corrected from harmonic dy=-238 to true dy=-60 (largeHarmonic),
  plus 6 off-by-1 corrections at F14/F20/F25/F40/F43/F53 (smallCorr)
M
markrussinovich committed
efafa5058642f46f1d0a2d7b08e3e3ba36beedca
Parent: bf81d1f