Convert hough to determine lines and their width

Are there any implementations or documents that modify the Hough transform to determine the width of the line segments? Hi-spatial maxima can be used to identify potential lines, and line segments are groups of pixels that are on the line for sufficient time intervals. After that, I try to determine the width of each line segment.

All I could find is this poster: http://www.cse.cuhk.edu.hk/~lyu/staff/SongJQ/poster_47_song_j.pdf

+4
source share
2 answers

Depending on whether you want to spend some money, there is a package called Halcon that has the kind of things that you are after.

For example, http://www.mvtec.com/download/reference/lines_gauss.html (this is not a Hough transformation, but there is one in the main package too).

I used Google to search for a paper called "Extracting Curved Lines from Images" that mentions the line width (I can't get the link to work).

+2
source

If you have a binary mask for each line segment, could you take the maximum remote conversion in that segment? It should tell you how far from the center of the line from the edge, the width should be 2*max(distanceTranform(segment)) - 1 for odd width and 2*max(distanceTranform(segment)) for uniform width.

OpenCV has an implementation of this method here . They also have HoughLinesP for defining line segments, but it looks like you already developed it.

+2
source

Source: https://habr.com/ru/post/1385542/


All Articles