mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 21:27:00 +00:00
Image Trace: Full Tone merges and cuts with less repeated work
merge_mixed works out each color's Oklab value once, and again only for the color that takes in another, and skips the distance for two colors mixed too little to merge under either test. Median cut plans the cut of a narrow box only while there are fewer boxes than the least count. The traced SVGs are byte-identical for the six presets on 19 test images; High Fidelity Photo's trace time for all 19 falls from 35.3 to 31.5 s. The quality notes give High Fidelity Photo in Full Tone its own section, say how far merging can bring the color count below the least count, and state the measured trace time, memory and cost on grainy flat grays. A test checks that a grainy dark gray traces with about as many colors and shapes as a grainy light one, and the noisy ramp test's comment gives the counts this tree measures.
This commit is contained in:
@@ -315,7 +315,7 @@ pub(crate) fn tests_oklab(c: [u8; 3]) -> [f64; 3] {
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
enum Alike {
|
||||
/// Close in RGB: under 30 levels apart and thoroughly mixed, or under 12 and mixed in patches.
|
||||
/// A limited palette's colors are few and far apart, so two this close are one color.
|
||||
/// Used for Grayscale and for every Color palette but Full Tone (Automatic included).
|
||||
Rgb,
|
||||
/// Close to the eye: under [`FULL_TONE_ALIKE`] apart in Oklab and thoroughly mixed, or under
|
||||
/// [`FULL_TONE_PATCHES`] and mixed in patches (compression blocks). Full Tone's neighboring tones
|
||||
@@ -335,13 +335,13 @@ const FULL_TONE_PATCHES: f64 = 1.5;
|
||||
/// `q` with the colours that noise made of one colour merged, largest mix first.
|
||||
///
|
||||
/// Asked for more colours than a picture has, k-means splits a flat colour along its noise, and
|
||||
/// the two halves would trace as specks of one all over the other. Such halves are close (under 30
|
||||
/// levels apart: noise is about as strong in a dark colour as in a light one, so the distance is
|
||||
/// taken in RGB) and thoroughly mixed: the pixels of the lesser one have, on average, more than
|
||||
/// half a neighbour of the other each; or they are closer still (under 12 levels) and mixed in
|
||||
/// patches (compression blocks). The bands of a gradient are close too, but each keeps to itself
|
||||
/// and they stay apart. The colours in `keep` merge with none. With [`Alike::Seen`], the distances are
|
||||
/// taken in Oklab (see [`FULL_TONE_ALIKE`] and [`FULL_TONE_PATCHES`]).
|
||||
/// the two halves would trace as specks of one all over the other. Such halves are close and
|
||||
/// thoroughly mixed: the pixels of the lesser one have, on average, more than half a neighbour of
|
||||
/// the other each; or they are closer still and mixed in patches (compression blocks). The bands
|
||||
/// of a gradient are close too, but each keeps to itself and they stay apart. The colours in
|
||||
/// `keep` merge with none. Close is under 30 RGB levels apart for thoroughly mixed colours and
|
||||
/// under 12 for patches with [`Alike::Rgb`], and in Oklab under [`FULL_TONE_ALIKE`] and
|
||||
/// [`FULL_TONE_PATCHES`] with [`Alike::Seen`].
|
||||
fn merge_mixed(q: Quantized, w: usize, h: usize, keep: &[[u8; 3]], alike: Alike) -> Quantized {
|
||||
let k = q.palette.len();
|
||||
// A rare colour kept on purpose (see `rare_colours`) is distinct by choice: it merges with none.
|
||||
@@ -364,6 +364,13 @@ fn merge_mixed(q: Quantized, w: usize, h: usize, keep: &[[u8; 3]], alike: Alike)
|
||||
}
|
||||
}
|
||||
let mut color: Vec<[f64; 3]> = q.palette.iter().map(|c| c.map(f64::from)).collect();
|
||||
// Each colour in Oklab, for `Alike::Seen`, worked out once and again only for a colour that
|
||||
// takes in another.
|
||||
let mut lab: Vec<[f64; 3]> = if alike == Alike::Seen { color.iter().map(|&c| oklab(c)).collect() } else { vec![] };
|
||||
let seen_apart = |lab: &[[f64; 3]], a: usize, b: usize| match (lab.get(a), lab.get(b)) {
|
||||
(Some(la), Some(lb)) => (0..3).map(|c| (la[c] - lb[c]).powi(2)).sum::<f64>().sqrt(),
|
||||
_ => f64::INFINITY,
|
||||
};
|
||||
// Which colour each has merged into (itself when none).
|
||||
let mut into: Vec<usize> = (0..k).collect();
|
||||
loop {
|
||||
@@ -374,15 +381,18 @@ fn merge_mixed(q: Quantized, w: usize, h: usize, keep: &[[u8; 3]], alike: Alike)
|
||||
continue;
|
||||
}
|
||||
let mixed = touch[a * k + b] / count[a].min(count[b]);
|
||||
// Two colours this little mixed merge under neither test.
|
||||
if mixed <= 0.15 {
|
||||
continue;
|
||||
}
|
||||
let merges = match alike {
|
||||
Alike::Rgb => {
|
||||
let apart = (0..3).map(|c| (color[a][c] - color[b][c]).powi(2)).sum::<f64>().sqrt();
|
||||
mixed > 0.5 && apart < 30.0 || mixed > 0.15 && apart < 12.0
|
||||
mixed > 0.5 && apart < 30.0 || apart < 12.0
|
||||
}
|
||||
Alike::Seen => {
|
||||
let (la, lb) = (oklab(color[a]), oklab(color[b]));
|
||||
let apart = (0..3).map(|c| (la[c] - lb[c]).powi(2)).sum::<f64>().sqrt();
|
||||
mixed > 0.5 && apart < FULL_TONE_ALIKE || mixed > 0.15 && apart < FULL_TONE_PATCHES
|
||||
let apart = seen_apart(&lab, a, b);
|
||||
mixed > 0.5 && apart < FULL_TONE_ALIKE || apart < FULL_TONE_PATCHES
|
||||
}
|
||||
};
|
||||
if merges && best.is_none_or(|x| mixed > x.0) {
|
||||
@@ -392,6 +402,9 @@ fn merge_mixed(q: Quantized, w: usize, h: usize, keep: &[[u8; 3]], alike: Alike)
|
||||
}
|
||||
let Some((_, a, b)) = best else { break };
|
||||
color[a] = [0, 1, 2].map(|c| (color[a][c] * count[a] + color[b][c] * count[b]) / (count[a] + count[b]));
|
||||
if let Some(l) = lab.get_mut(a) {
|
||||
*l = oklab(color[a]);
|
||||
}
|
||||
count[a] += count[b];
|
||||
count[b] = 0.0;
|
||||
into[b] = a;
|
||||
|
||||
@@ -328,8 +328,10 @@ fn median_cut_apart(used: &[Used], k: usize, spread: f64, apart: f64, least: usi
|
||||
widest: f64,
|
||||
best: Option<(f64, Vec<usize>, usize)>,
|
||||
}
|
||||
// Boxes no wider than this are never cut.
|
||||
let narrowest = if least > 0 { 0.0 } else { spread.max(0.0) };
|
||||
// Boxes no wider than `spread` are cut only while there are fewer than `least` boxes. A box made
|
||||
// when there are already `least` boxes or more is never cut unless it is wider, so its cut is
|
||||
// not planned.
|
||||
let narrowest = |boxes_after: usize| if boxes_after < least { 0.0 } else { spread.max(0.0) };
|
||||
// How much of a cut's gain counts when its sides' mean colors are `a` and `b`: all of it when
|
||||
// they look different or either is not a dark gray, less as two dark grays look more alike.
|
||||
let dark_gray = |c: [f64; 3]| c[0] < DARK && c[1].hypot(c[2]) < GRAY;
|
||||
@@ -340,7 +342,8 @@ fn median_cut_apart(used: &[Used], k: usize, spread: f64, apart: f64, least: usi
|
||||
}
|
||||
((0..3).map(|q| (a[q] - b[q]).powi(2)).sum::<f64>() / (apart * apart)).min(1.0)
|
||||
};
|
||||
let plan = |bins: Vec<usize>| {
|
||||
let plan = |bins: Vec<usize>, boxes_after: usize| {
|
||||
let narrowest = narrowest(boxes_after);
|
||||
let mut best: Option<(f64, Vec<usize>, usize)> = None;
|
||||
let widest = (0..3)
|
||||
.map(|ch| {
|
||||
@@ -388,7 +391,7 @@ fn median_cut_apart(used: &[Used], k: usize, spread: f64, apart: f64, least: usi
|
||||
}
|
||||
Cut { bins, widest, best }
|
||||
};
|
||||
let mut boxes = vec![plan((0..used.len()).collect())];
|
||||
let mut boxes = vec![plan((0..used.len()).collect(), 1)];
|
||||
while boxes.len() < k {
|
||||
let gain = |c: &Cut| c.best.as_ref().map_or(f64::NEG_INFINITY, |b| b.0);
|
||||
// The boxes wider than `spread` first; when none is left and there are fewer than `least`,
|
||||
@@ -403,8 +406,9 @@ fn median_cut_apart(used: &[Used], k: usize, spread: f64, apart: f64, least: usi
|
||||
};
|
||||
let Some((_, mut sorted, at)) = boxes.swap_remove(bi).best else { break };
|
||||
let tail = sorted.split_off(at);
|
||||
boxes.push(plan(sorted));
|
||||
boxes.push(plan(tail));
|
||||
let after = boxes.len() + 2;
|
||||
boxes.push(plan(sorted, after));
|
||||
boxes.push(plan(tail, after));
|
||||
}
|
||||
boxes
|
||||
.iter()
|
||||
|
||||
@@ -1726,7 +1726,7 @@ fn jitter(x: u32, y: u32, salt: u32) -> f64 {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn full_tone_keeps_a_noisy_ramps_neighboring_tones() {
|
||||
fn full_tone_keeps_more_of_a_noisy_ramps_tones() {
|
||||
// Gray to green with grain: Full Tone's neighboring tones are close in RGB and mixed along
|
||||
// their borders, and still look different.
|
||||
let img = Raster::from_fn(256, 96, |x, y| {
|
||||
@@ -1734,8 +1734,8 @@ fn full_tone_keeps_a_noisy_ramps_neighboring_tones() {
|
||||
[v(0, 100.0, 0.0), v(1, 40.0, 0.7), v(2, 100.0, 0.0), 255]
|
||||
});
|
||||
let params = TraceParams { mode: Mode::Color, palette: Palette::FullTone, color_detail: 85.0, ..TraceParams::default() };
|
||||
// Median cut gives at least 85 (one per step of Color detail); merged where they look alike, 6
|
||||
// are left, and merged as close RGB colors, 5 would be.
|
||||
// Median cut gives at least 85 (one per step of Color detail). Merging the ones that look alike
|
||||
// leaves 6 (one per 30 or so levels of the ramp); merging close RGB colors would leave 4.
|
||||
let n = quantize(&img, ¶ms).palette.len();
|
||||
assert!(n >= 6, "{n} tones");
|
||||
// Automatic traces continuous tone without Full Tone's least count and keeps merging close RGB colors.
|
||||
@@ -1743,6 +1743,23 @@ fn full_tone_keeps_a_noisy_ramps_neighboring_tones() {
|
||||
assert!(automatic < n, "{automatic} tones with Automatic, {n} with Full Tone");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn full_tone_traces_a_noisy_dark_ground_like_a_light_one() {
|
||||
// A gray ground with up to 8 levels of grain a channel. The same grain lies farther apart in
|
||||
// Oklab in a dark gray than in a light one; the dark ground still takes about as many colors
|
||||
// and shapes as the light one (32 and 53 against 31 and 52 when measured).
|
||||
let ground = |gray: f64| {
|
||||
let img = Raster::from_fn(192, 128, |x, y| {
|
||||
let c = |k: u32| (gray + 8.0 * jitter(x, y, k)).round().clamp(0.0, 255.0) as u8;
|
||||
[c(0), c(1), c(2), 255]
|
||||
});
|
||||
trace(&img, &preset("High Fidelity Photo").unwrap())
|
||||
};
|
||||
let (dark, light) = (ground(28.0), ground(200.0));
|
||||
assert!(dark.palette.len() <= light.palette.len() + 2, "{} colors dark, {} light", dark.palette.len(), light.palette.len());
|
||||
assert!(dark.paths.len() <= light.paths.len() + 6, "{} shapes dark, {} light", dark.paths.len(), light.paths.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn full_tone_merges_a_flat_colors_compression_blocks() {
|
||||
// Three flat colors stored in 8 × 8 blocks, each block off by up to 8 levels a channel, with a
|
||||
|
||||
@@ -24,8 +24,9 @@ Logo, Line Art and Outline, and 50 in the other eight. Noise is 1 px in Technica
|
||||
and 16 Colors, 10 in Low Fidelity Photo, 15 in 3 Colors and Shades of Gray, 20 in Sketched Art, Line
|
||||
Art and Outline, 25 in Default, and 90 in Silhouettes (see
|
||||
[image-trace-quality.md](image-trace-quality.md#preset-paths-corners-and-noise)). High Fidelity Photo
|
||||
traces with Palette › Full Tone at Color detail 85 and Method › Abutting (VectorCraft's own values); Low
|
||||
Fidelity Photo traces with a Limited palette of 20 colors, Overlapping.
|
||||
traces with Palette › Full Tone at Color detail 85 and Method › Abutting (VectorCraft's own values; see
|
||||
[image-trace-quality.md](image-trace-quality.md#high-fidelity-photo-in-full-tone)); Low Fidelity Photo
|
||||
traces with a Limited palette of 20 colors, Overlapping.
|
||||
|
||||
Sliders apply on release, and their numeric fields can be edited directly. Each committed
|
||||
adjustment re-traces the selected object as one undo step and changes the preset to Custom.
|
||||
@@ -86,8 +87,8 @@ color nearest to it in lightness and hue, with a difference in hue or chroma cou
|
||||
as much as one in lightness, so a gray or a muted brown takes a black, white or other neutral
|
||||
library color rather than a saturated color of the same lightness.
|
||||
**Abutting and Overlapping.** Abutting is the default Method, and the Default, Auto Color, High Fidelity
|
||||
Photo, 3 Colors, 6 Colors and 16 Colors presets use it. With Abutting, two neighboring colors share one exact edge. The
|
||||
canvas smooths the edges of each path on its own, so each of the two paths covers only part of the
|
||||
Photo, 3 Colors, 6 Colors and 16 Colors presets use it. With Abutting, two neighboring colors share one
|
||||
exact edge. The canvas smooths the edges of each path on its own, so each of the two paths covers only part of the
|
||||
pixels along that edge, and a thin line of the background can show between the colors. Web browsers
|
||||
and PDF viewers usually draw an exported SVG or PDF file the same way and show the same line. Raster
|
||||
exports (PNG, JPEG, TIFF and the other bitmap formats) with None anti-aliasing do not show it at any
|
||||
|
||||
+46
-32
@@ -83,8 +83,9 @@ gradient, texture, sensor noise):
|
||||
Photo trace was 86,000 anchors under the old limit; a noisier scan of the same size would have been
|
||||
refused. At 8,000,000 anchors a trace keeps about 0.7 GB, with a peak of about 0.9 GB while tracing.
|
||||
The preset rows were measured with the earlier preset values: High Fidelity Photo at Paths 90, Corners 25
|
||||
and Noise 4 with a Limited palette of 64 colors and Overlapping, Low Fidelity Photo at Paths 60, Noise 12 and 16 Colors at Paths 70, Corners 55 and Noise 10
|
||||
(see [Preset Paths, Corners and Noise](#preset-paths-corners-and-noise)).
|
||||
and Noise 4 with a Limited palette of 64 colors and Overlapping, Low Fidelity Photo at Paths 60, Noise 12
|
||||
and 16 Colors at Paths 70, Corners 55 and Noise 10 (see [Preset Paths, Corners and
|
||||
Noise](#preset-paths-corners-and-noise) and [High Fidelity Photo in Full Tone](#high-fidelity-photo-in-full-tone)).
|
||||
## Collapsed loops keep few segments
|
||||
A small closed loop (or a piece that returns to its own junction) whose fit collapsed to a single
|
||||
cubic cannot stay as one, so it kept every positioned point as a straight segment. A looser Paths
|
||||
@@ -250,36 +251,8 @@ Every built-in preset other than Auto Color and Flat Logo traces at Paths 50. Co
|
||||
The palettes, color counts, thresholds and other options of the presets did not change. The enhanced
|
||||
versions of these presets use the same Paths, Corners and Noise. 6 Colors and 16 Colors were at Noise 15
|
||||
and Black and White Logo at 25 until [Noise joins the nearest color](#noise-joins-the-nearest-color);
|
||||
the measurements below were made at those values.
|
||||
|
||||
High Fidelity Photo later moved to Palette › Full Tone at Color detail 85 and Method › Abutting (it was a
|
||||
Limited palette of 64 colors, Overlapping); Paths, Corners and Noise stay 50, 50 and 5. These are
|
||||
VectorCraft's own values. Palette › Full Tone splits its colors until none spans more than its width
|
||||
limit, then, while it has fewer colors than Color detail's value (85 at 85), splits the narrower ones
|
||||
too, where the image has that many colors; the colors that look alike then merge, so a trace can end
|
||||
with fewer. Automatic's continuous-tone colors do not take that count. Full Tone's colors merge as one
|
||||
color when they are thoroughly mixed and less than 5 apart in Oklab × 100, or mixed in patches
|
||||
(compression blocks) and less than 1.5 apart; the other palettes, Automatic included, keep the RGB test
|
||||
(under 30 levels and thoroughly mixed, or under 12 and mixed in patches). These rules apply to every
|
||||
trace with Palette › Full Tone, so an existing Full Tone trace or saved preset traces differently when
|
||||
it is traced again.
|
||||
|
||||
On 19 photos, cartoons and synthetic shapes of 400 to 4,000 px, the mean pixel difference summed over the
|
||||
inputs fell from 80.5 to 65.6 levels. It fell by more than 1% on 14 inputs (2.88 to 2.19 and 2.59 to 2.48
|
||||
on two photos, the second a JPEG at quality 40; 1.88 to 1.45 on a 4000 × 3000 photo; 12.40 to 7.44 on an
|
||||
upscaled cartoon) and changed by less than 1% on the other 5. Anchors rose 1.66 times (1.98 million to
|
||||
3.29 million), the SVG size 1.31 times, and the trace time 1.9 times (14.1 to 27.1 s for all 19, 3 at a
|
||||
time). Flat synthetic art costs the most: 12 to 400 anchors on a 4000 × 3000 image of two flat colors, and
|
||||
about 3 times the anchors on two images of synthetic shapes (400 × 300 and 1600 × 1200), with the same
|
||||
pixel difference. Peak memory fell on every input in the same pass:
|
||||
942 to 626 MiB on a 1536 × 2048 cartoon. Low Fidelity Photo, 16 Colors, 6 Colors, Black and White Logo
|
||||
and Auto Color give byte-identical SVGs. On three flat colors stored in 8 × 8 blocks, each block off by
|
||||
up to 8 levels a channel, High Fidelity Photo traces 3 colors as 3 paths; without the patch rule it traced
|
||||
7 colors as 74 paths. Tests: `high_fidelity_photo_traces_in_full_tone`,
|
||||
`full_tone_keeps_a_noisy_ramps_neighboring_tones` and `full_tone_merges_a_flat_colors_compression_blocks`
|
||||
in `crates/trace/src/tests.rs`, `full_tone_merges_only_mixed_colors_that_look_alike` in
|
||||
`crates/trace/src/quantize.rs`, and `full_tone_makes_one_color_per_step_of_color_detail` in
|
||||
`crates/trace/src/quantize/palette.rs`.
|
||||
the measurements below were made at those values. High Fidelity Photo's palette and Method changed
|
||||
later (see [High Fidelity Photo in Full Tone](#high-fidelity-photo-in-full-tone)).
|
||||
|
||||
Measured with the harness below (section 1, each preset on the inputs it is meant for), before and after:
|
||||
anchors fall in 10 of the 12 changed presets, for example 5,494 to 3,136 (High Fidelity Photo), 33 to 27
|
||||
@@ -300,6 +273,47 @@ the other sections of this file, and in the Image Trace entries of
|
||||
[target-app-parity.md](target-app-parity.md), were measured at the earlier values.
|
||||
Test: `presets_have_their_paths_corners_and_noise` in `crates/trace/src/tests.rs`.
|
||||
|
||||
## High Fidelity Photo in Full Tone
|
||||
High Fidelity Photo traces with Palette › Full Tone at Color detail 85 and Method › Abutting. It traced
|
||||
with a Limited palette of 64 colors, Overlapping, before. Paths, Corners and Noise stay 50, 50 and 5.
|
||||
These are VectorCraft's own values. Low Fidelity Photo keeps its Limited palette of 20 colors.
|
||||
|
||||
Palette › Full Tone splits its colors until none spans more than its width limit. Then, while it has
|
||||
fewer colors than Color detail's value (85 at 85), it splits the narrower ones too, where the image has
|
||||
that many colors. The colors that look alike merge after that, and a merged color can merge again, so a
|
||||
trace can end with far fewer colors than that count: a gray-to-green ramp 256 px wide with up to 8 levels
|
||||
of grain a channel ends with 6 colors at Color detail 85, where the RGB test leaves 4. Full Tone's colors
|
||||
merge when they are thoroughly mixed and less than 5 apart in Oklab × 100, or mixed in patches
|
||||
(compression blocks) and less than 1.5 apart. The other palettes, Automatic included, keep the RGB test
|
||||
(under 30 levels and thoroughly mixed, or under 12 and mixed in patches), and Automatic's continuous-tone
|
||||
colors do not take the least count. These rules apply to every trace with Palette › Full Tone, so an
|
||||
existing Full Tone trace or saved preset traces differently when it is traced again.
|
||||
|
||||
On 19 photos, cartoons and synthetic shapes of 400 to 4,000 px, the mean pixel difference summed over the
|
||||
inputs fell from 80.5 to 65.6 levels. It fell by more than 1% on 14 inputs (2.88 to 2.19 and 2.59 to 2.48
|
||||
on two photos, the second a JPEG at quality 40; 1.88 to 1.45 on a 4000 × 3000 photo; 12.40 to 7.44 on an
|
||||
upscaled cartoon) and changed by less than 1% on the other 5. Anchors rose 1.66 times (1.98 million to
|
||||
3.29 million) and the SVG size 1.31 times. The trace time rose 1.7 times (18.9 to 31.5 s for all 19, with
|
||||
both builds tracing 3 images at a time in the same run). Flat synthetic art costs the most: 12 to 400
|
||||
anchors on a 4000 × 3000 image of two flat colors, and about 3 times the anchors on two images of
|
||||
synthetic shapes (400 × 300 and 1600 × 1200), with the same pixel difference. A flat gray 192 × 128 with
|
||||
up to 3 levels of grain a channel traces as 25 colors and 244 anchors, where the Limited palette of 64
|
||||
traced 1 color and 4 anchors; with up to 5 or 8 levels both trace it as 25 to 37 colors, on each of the
|
||||
grays tested (28, 60, 128 and 200).
|
||||
|
||||
In the same run, peak memory fell on 16 of the 19 inputs, for example 906 to 625 MiB on a 1536 × 2048
|
||||
cartoon, and rose on 3 small ones (by 5 to 11 MiB). Abutting accounts for the fall: the earlier preset
|
||||
with Method › Abutting peaked at 523 MiB on the same cartoon, against 924 MiB with Overlapping, in another
|
||||
run. Low Fidelity Photo, 16 Colors, 6 Colors, Black and White Logo and Auto Color give byte-identical
|
||||
SVGs. On three flat colors stored in 8 × 8 blocks, each block off by up to 8 levels a channel, High
|
||||
Fidelity Photo traces 3 colors as 3 paths; without the patch rule it traced 7 colors as 74 paths.
|
||||
|
||||
Tests: `high_fidelity_photo_traces_in_full_tone`, `full_tone_keeps_more_of_a_noisy_ramps_tones`,
|
||||
`full_tone_traces_a_noisy_dark_ground_like_a_light_one` and
|
||||
`full_tone_merges_a_flat_colors_compression_blocks` in `crates/trace/src/tests.rs`,
|
||||
`full_tone_merges_only_mixed_colors_that_look_alike` in `crates/trace/src/quantize.rs`, and
|
||||
`full_tone_makes_one_color_per_step_of_color_detail` in `crates/trace/src/quantize/palette.rs`.
|
||||
|
||||
## A simpler contour walk
|
||||
`contour::trace_mask` follows each region's outline along the pixel cracks with the inside on the
|
||||
right. It used to build a table of outgoing directions for every pixel corner in a raster pass and
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user