Metadata-Version: 2.4
Name: lsdetect
Version: 0.2.0
Requires-Dist: numpy
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Summary: Line segment detector (LSD) in pure Rust, with Python bindings
Author: Patrick Zwerschke
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/p5k369/lsdetect

# lsdetect

Line segment detector (LSD) for Rust and Python.

Implements ["LSD: a Line Segment Detector"](https://www.ipol.im/pub/art/2012/gjmr-lsd/) (Grompone von
Gioi, Jakubowicz, Morel, Randall. Image Processing On Line, 2012).

## Python

```
pip install lsdetect
```

```python
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

```toml
[dependencies]
lsdetect = "0.2"
```

```rust
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.

