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).
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)[dependencies]
lsdetect = "0.2"let segments = lsdetect::detect(&gray, width, height, lsdetect::SCALE)?;MIT or Apache-2.0, at your option. Independent implementation from the article. No code from the AGPL reference implementation was used.