Files
OrcaSlicer/tests/libslic3r
ExPikaPaka e30b9fe93e Stop reading a two-colour ramp as an image of flat colours
A layer whose image is "flat colours" is matched against the loaded filaments
alone, no mixes. The verdict came from one signal: the share of the image
covered by the eight fullest bins of a coarse histogram, flat above 0.85.

A ramp between two colours is a straight line through colour space, so it
occupies as few bins as the two colours on their own and scores just as high.
The shipped "Colour Bricks.png" measures 0.96 and gets no mixes at all; a
green-to-red gradient measures 0.90 and prints as two flat areas.

Judged on a second signal as well: the share of the image's principal colour
axis that carries pixels, in 32 steps. A ramp fills it end to end, a handful of
flat colours sits in spikes with gaps between them. An image counts as flat only
when both agree, so this can only restore mixes where they were refused, never
take them away. Measured coverage: 1.00 for a gradient, 0.06 for a two-colour
logo, 0.41 to 0.62 for photographs, against a threshold of 0.25.

Colour Bricks.png goes from 0 mixes to 6, a green-to-red gradient from 0 to 11.
2026-10-15 08:16:15 +02:00
..
2025-12-08 22:42:11 +08:00