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>
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>
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>