lsdetect 0.3.0

Line segment detector (LSD) in pure Rust, with a fast perspective warp and Python bindings
Documentation

lsdetect

Line segment detector (LSD) for Rust and Python.

Implements "LSD: a Line Segment Detector" (Grompone von Gioi, Jakubowicz, Morel, Randall. Image Processing On Line, 2012).

Python

pip install lsdetect
import lsdetect

segments = lsdetect.detect(gray)

for s in segments:
    print(s.x1, s.y1, s.x2, s.y2, s.width, s.precision, s.angle, s.length)

Rust

[dependencies]
lsdetect = "0.2"
let segments = lsdetect::detect(&gray, width, height, lsdetect::SCALE)?;

License

MIT or Apache-2.0, at your option. Independent implementation from the article. No code from the AGPL reference implementation was used.