Files
photocraft/crates/algo
xsvm 6719f1813e Segmentation: anti-aliasing the full-resolution mask skips runs far from its edge (#8554)
* Segmentation: anti-aliasing the full-resolution mask skips runs far from its edge

Select Subject, Object Selection and Select Sky finish with antialias_u8
over the whole full-resolution mask, which read nine neighbours through a
bounds-checked closure for every pixel: 171-185 ms of an 800 ms first
Select Subject on 24 MP (ubuntu-latest, 4 cores). A run of 64 pixels whose
3x3 neighbourhood holds one value has no edge pixel, so it is only compared
now; other runs take the per-pixel rule as before. The output is byte for
byte the same, checked against the per-pixel rule over widths around the run
length, single rows and columns, discs, noise and stripes. Part of #211.

* Segmentation: the mask's anti-aliasing and its test share one per-pixel rule

The 3x3 rule moves into edge_value, which antialias_u8 calls for spans that
are not uniform and the test calls for every pixel, so the test checks only
that skipping never misses an edge pixel instead of keeping a second copy of
the rule. A small case pins the rule's values.
2026-10-24 17:13:24 -04:00
..
…