Commit Graph
6 Commits
Author SHA1 Message Date
dotCooCoo 3dad1013a4 Image Trace: Noise leaves cut-edge blends out of a speck's color
When Noise picks the nearest color for a speck, the speck's average now
leaves out the semi-transparent pixels along a cut-out image's edge that
are the color beside them blended with the transparent background.
settle_cut_edges returns which pixels those are. A speck made only of
them merges by border. In Grayscale the speck's gray is read with luma,
the gray Grayscale traces with, and the test probe shift_probe denoises
as a trace does.

The docs now say the rule applies in Color and Grayscale (in Black and
White a region has only one neighboring color, so Black and White Logo
changes only by its Noise value), name `ea3f81d9c3` as the base of the
measurements, and say that the gradient-border test sets Noise 15
because at Noise 8 its borders stray 0.92 px against a 0.9 px limit.
2026-11-15 09:01:14 -08:00
dotCooCoo 1727c171ef Image Trace: Noise merges a dark speck into the line beside it, not the ground
A region below Noise joined the color it shares the longest border with, so
the specks of a thin dark line on a light ground joined the ground and the
line broke into dashes. When that color is 10 or more apart from the region's
own (Oklab x 100), the region now joins the neighboring color nearest its
source pixels, among the colors sharing at least a tenth of the longest
border. A single pixel tied between colors still joins by border.

6 Colors and 16 Colors move from Noise 15 to 8, and Black and White Logo from
25 to 5.
2026-11-15 07:20:42 -08:00
vangel76andClaude Sonnet 5.5 c0465969c8 Denoise: comment fixes from review (#5462)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 08:13:25 +07:00
vangel76andClaude Sonnet 5.5 63b8c88168 Image Trace: noise removal keeps its regions in u32 arrays (#5462)
Regions are a linked list of pixels with a union-find over region ids instead of a Vec<usize> per region and BTreeMaps per merge. Same merge order and output; about 2.7x less peak memory and up to 1.9x faster on 25 MP noisy labels.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 08:13:25 +07:00
Dylan M. Taylor 7b05e55a69 refactor(trace): separate graph construction and quantization 2026-10-27 17:47:12 +00:00
aiongg 22f59b6aea refactor(trace): move quantize.rs items to quantize/{cut_edge,denoise,palette,rare}.rs 2026-10-26 22:01:25 +00:00