WORKSHOP : This work can be edited and updated at any moment. It may eventually be submitted for publication.

Contacts

References

  1. Rafael Grompone von Gioi, Jérémie Jakubowicz, Jean-Michel Morel, Gregory Randall, LSD: A Fast Line Segment Detector with a False Detection Control, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, no. 4, pp. 722-732, Apr. 2010. doi:10.1109/TPAMI.2008.300 preprint

Overview

A linear-time line segment detector that gives accurate results, a controlled number of false detections, and requires no parameter tuning. The method is based in Burns et al. method, and uses an a contrario validation approach.

Online Demo

An on-line demo that allows you to try LSD with your own images is available here.

Software

Ansi C implementation of LSD version 1.3 here.

An older version in Megawave2 framework is available here.

Video

The video here (mp4 file, 56 MB) shows the result of applying LSD, frame per frame, to the original video here.

Examples

The following set of examples try to give an idea of the kind of results obtained with LSD, both good and and bad results:

office: A good result. The line segments detected corresponds to straight structures in the image. The detection corresponds roughly with the expected result.

marilyn: Another good result. Most detected line segments corresponds to structures whose projection in the image is locally straight, even if in reality they are not straight or flat objects.

lsd: Note that LSD detect locally straight edges, so each black strokes produce two detections, one for each white to black transition.

pipi: Note that when curves are present, LSD produce short line segments corresponding to curve sections that are locally straight. The result is a polygonal approximation for curves.

noise: LSD was designed to provide a good false detection control. Its false detection control is based in automatically providing detections thresholds that prevent detections that could happen by chance in a non-structured image.

square: The square is masked by noise and is not detected by LSD. But the square can be detected if the image is analyzed at a different scale by Gaussian sub-sampling.

square-subsampling: When a Gaussian sub-sampling is applied to the previous image, the noise is partially removed and the expected line segments are detected.

wall: Some regions are partially anisotropic and partially straight. This regions can produce unexpected detections.

map: In some images we get detections that seems strange at first sight, even if they are correct.

gibbs2: Image compression Gibbs effect is responsible of many unexpected detections.

gibbs: Another image with Gibbs effect artifacts.

chess: More Gibbs effect artifacts.

quantized: An unexpected result. Due to quantization, the input image presents a strong staircase effect on lines. LSD analyze the image at full resolution and almost vertical or horizontal lines are detected cut into many vertical and horizontal small line segments. More slanted lines shows a stronger staircase effect and LSD will not detect line segments. In a sense, line segments are not present in the image. But one would like to detect them. Using a Gaussian sub-sampling all the line segments are detected by LSD, as the next images shows.

quantized-subsampled: When a Gaussian sub-sampling is applied to the previous image, the quantization noise is removed and the expected line segments are detected.

π