Saliency-based smart crop #2

Merged
zyberzero merged 5 commits from smart-crop into main 2026-11-03 18:12:20 +00:00
5 Commits
Author SHA1 Message Date
zyberzeroandClaude Opus 5.5 fcd8a1b2db Mark MQTT auto-reconnect increment done
Landed in #1 but the checkbox was never ticked.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 19:04:42 +01:00
zyberzeroandClaude Opus 5.5 d910187c53 Document smart crop in IMPLEMENTATION.md
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 19:04:42 +01:00
zyberzeroandClaude Opus 5.5 4695b65a1b Add unit tests for SaliencySmartCropper
The golden fixtures only prove determinism; these assert the crop
actually biases toward the edge-rich side on both axes, reaches the
source edge for an edge-hugging subject, and always returns an in-bounds
rect at the target aspect.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 19:04:25 +01:00
zyberzeroandClaude Opus 5.5 36782f15a1 Search only the max-fitting crop window, including edge positions
Edge energy is non-negative, so the 85% and 70% candidate windows could
never outscore the full-size window containing them; drop them. Also
always evaluate the last x/y position so a subject touching the right
or bottom edge isn't cut by up to one step of grid misalignment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 19:03:53 +01:00
zyberzeroandClaude Opus 5.5 ac9a0b43a8 Add saliency-based smart crop before resize
Replace the center-crop cover resize with a Sobel edge-density search
that picks the target-aspect window with the most edge energy, so a
subject off-center isn't sliced when the input aspect differs from the
frame's. Failures fall back to the centered crop. Golden fixtures are
regenerated and an asymmetric-edges input exercises the bias.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 19:03:22 +01:00