-
lineartization v1.7.0 Stable
released this
2026-09-26 06:39:51 +00:00 | 0 commits to main since this releaselineartization v1.7.0
Convert color illustrations / posters into clean black-and-white line art.
Pure Python + OpenCV + scikit-image. No deep-learning models required.Highlights
minimummode — newmin_true_blackswitch (defaultTrue= unchanged v1.6.1 behaviour)min_true_black=Truemin_true_black=FalseTrue-black gate applied not applied Colored regions excluded kept as strokes Cleanup median → open → CC filter → median despeckle → drop short fragments Thinning none (original stroke weight) distance transform to a thin even line Best for mostly-black line work colorful posters Pick per image — a math worksheet reads best with the gate on, a colorful
festival poster reads best with it off.skeletonmode — region-agnostic. The flat-color smoothing step previously
keyed on one specific hue and assumed the region lay on the left half of the
image. It now selects any strongly saturated area (color_sat_min,
color_area_range), so it works on any layout or palette. Measured difference
on a test poster: 0.11% of pixels.Other changes
- All comments, docstrings and messages moved to English.
- No built-in default paths anywhere;
examples/demo.pynow requires
<input_image> <output_dir>. - README rewritten: resolution guidance, both minimum variants, full parameter
reference, pipeline documentation. - 18 unit tests covering I/O, both modes and both minimum variants.
Compatibility
min_true_blackdefaults toTrue, so existingminimumcallers get the
same behaviour as v1.6.1. The renamed skeleton fields
(enable_green_smoothing→enable_color_smoothing,green_sat_min→
color_sat_min,green_area_range→color_area_range) are a breaking change
for code that passed the old names explicitly.Resolution note
Extraction quality depends directly on the source resolution: the higher the
resolution, the cleaner and more complete the result. For low-resolution
sources prefermethod="minimum".Install
pip install lineartizationQuick start
lineartization poster.jpg lineart.png # skeleton lineartization handwriting.jpg lineart.png -m minimum # minimum, true-black lineartization colorful.jpg lineart.png -m minimum --no-true-blackDownloads