mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-07 02:51:24 +00:00
* Roto Brush: propagate on the band bounding box propagate() ran the signed distance, gauss, graph cut, model fit and clean over the whole frame. Work on the crop of the band bounding box (|sd| <= r plus the core, padded) and paste the labels back; fall back to the full frame when the crop is not smaller. warp_prior stays full-frame. Fixes #2323 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Roto Brush: band crop padded by the prior blur, models fitted on the full frame Review follow-up for the band bounding-box crop in propagate: - The crop pad is now the reach of the prior blur (three box passes of matting::gauss, exposed as matting::gauss_reach) instead of 1 px, so every band pixel sees the same blur window as on the full frame. - When the previous frame has no colour models they are fitted on the full frame before cropping, as the full-frame path does. - The free pixels and the clean seeds are cut out of the full-frame signed distance instead of being recomputed on the crop; the seeds equal core_of(prior.soft), which saves one signed distance per frame. - The full-frame path and the crop share recut_band/cut_band; full frame is just the whole rectangle. A frame with no band and no core (no foreground) skips the cut, which was a no-op. - The w - 1 / h - 1 underflow on zero-sized frames is gone (band_rect returns None); regression test for 4x0, 0x4 and 0x0 (panicked before in debug builds). Tests: crop vs full frame labels on a disk, a disk at the frame corner, a donut, r = 2 and r = 3 with prior edges wider than the band, and no foreground, each with fitted, given and equal colour models; the padded crop blurs the prior like the full frame at every band pixel while a 1 px pad does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>