/Gary_LSD

Matlab_Line_Segement_Detector

Primary LanguageMATLAB

Gary_LSD

The Matlab implementation of Line Segment Detector. Most implementations are based on the standard LSD function in Opencv. For the special need, we merge the short line segments to long line segments.

  • Line Segment Detector is a fast and robust algorithm to extract lines segments in images. The details of LSD is shown in this paper.

Some Descriptions

  • Matlab version: Matlab R2017b or above.

Usage

Just download the whole repo and run:

>> test_all_image

The images with merged line segments will shown to you, if you want to get the results with unmerged line segments, just replace code in line 51 of test_all_image.m.

 line = fusion_lines; 

to

line = lines_list;

Most parameters on LSD are in flsd.m, and most parameters on line merging are in mergeLine.m. I did not find a good way to orginize the code of this project, if you find any bug, error, strange result, or you have a good way to improve the organization of the code, please don't hesitate to let me know. Let us contribute this project together.

Visual Result

The upper one is the image with merged line segements and the below one is the image with unmerged line segements.

Reference

Special thanks to: