vectorcraft/crates/trace/src
mateususa ae9cd2a03c #819: more noise removal never gives more paths
Remove Noise merged each small component into its most common neighbour
in one pass. When a speck was merged into a small region that was itself
merged away later, the region's flood fill skipped the speck's pixels
(already seen), so they stayed behind as a new island of the region's old
label. Higher Noise values merge more regions, so they left more such
islands: on noisy images the path count rose with Noise (70 -> 126 -> 206
paths from Noise 50 to 200 on one test image). denoise now repeats its pass
until one changes nothing; each merge joins two components, so it ends
(with a cap of 64 passes as a backstop). Labels shorter than w x h are left
alone instead of indexed past their end.

Tests: the minimal one-row case, a property test on random blocky noise
(no mergeable region under the minimum is left, and a larger minimum never
leaves more regions), and two noisy images whose path count must not rise
with Noise (both fail without the fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:00:31 +07:00
..
logo Image Trace: Flat Logo mode (sub-pixel edges, restored corners, true lines and circles) 2026-10-09 17:57:04 +11:00
centerline.rs Part of #641: Image Trace: Create Strokes 2026-10-09 10:11:09 +07:00
contour.rs continued work 2026-09-30 09:43:24 -04:00
fit.rs Part of #641: Image Trace: Create Strokes 2026-10-09 10:11:09 +07:00
lib.rs Image Trace: Flat Logo mode (sub-pixel edges, restored corners, true lines and circles) 2026-10-09 17:57:04 +11:00
mosaic.rs M12.7: Object → Create Object Mosaic… (trace::mosaic tile averages; columns/rows, new size, spacing, gray, delete raster; follows the image transform) 2026-10-02 08:16:36 -04:00
quantize.rs #819: more noise removal never gives more paths 2026-10-11 16:00:31 +07:00
tests.rs #819: more noise removal never gives more paths 2026-10-11 16:00:31 +07:00