Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Improving line extraction from HoughLinesP

Hi,

I am using HoughLinesP to extract lines from grayscale image.

As seen in below image single edge (i.e single line in image) is returning more than one line. 16,22 and 0,28 and 10,11 and 23,18,24 lines correspond to single line.

How can i get single line for single edge, any suggestions ?

Input image:

Input image

Extracted lines

image description

Zoomed image

image description

thanks.

Improving line extraction from HoughLinesP

Hi,

I am using HoughLinesP to extract lines from grayscale image.

Below is my psudo code.

threshold(img_tmp,bin_img,30,255,cv::THRESH_BINARY);
Canny(bin_img, canny_img, 50, 255, 3);
vector<Vec4i> tmp_lines;
HoughLinesP(canny_img,tmp_lines, 1, CV_PI/360,10, 10, 1);

As seen in below image single edge (i.e single line in image) is returning more than one line. 16,22 and 0,28 and 10,11 and 23,18,24 lines correspond to single line.

How can i get single line for single edge, any suggestions ?

Input image:

Input image

Extracted lines

image description

Zoomed image

image description

thanks.