finds.dev

LingDong-/linedraw

Convert images to vectorized line drawings for plotters.

View on GitHub

★ 854PythonMITupdated Jul 2023

// the take

A Python script that converts raster images into plotter-ready SVG files using edge detection and Perlin-noise hatching. Output is polylines only — no fills, no paths — which is exactly what pen plotters need. Aimed at hobbyist plotter owners who want to feed photos or illustrations to their machine.

The stroke-order optimization in strokesort.py is the real value here — it minimizes pen-up travel, which matters a lot for plotter runtime on complex images. Perlin noise hatching produces a hand-drawn feel that pure edge-detection approaches miss. The Python API (returning a plain list of polylines) makes it easy to compose with other tools rather than treating SVG as a black box. OpenCV is optional, so it degrades gracefully to PIL-only if you don't have it installed.

The project is essentially abandoned — last commit was 2023, no releases, no changelog, and the README still hedges between Python 2 and 3 as if that's still a live question. The algorithm is a single-file script with no configuration persistence, so reproducing a result means remembering your exact CLI flags. Hatch density and contour detection quality are sensitive to image contrast and there's no guidance on tuning them for different input types — expect trial and error. No tests whatsoever, so if a dependency update quietly breaks the output nobody will know.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
854
Forks
116
Language
Python
License
MIT
Last commit
22 Jul 2023

// nearby

If linedraw isn't quite it.

All repos →