skimage2.transform.probabilistic_hough_line#

skimage2.transform.probabilistic_hough_line(image, threshold=10, line_length=50, line_gap=10, theta=None, rng=None)[source]#

Return lines from a progressive probabilistic line Hough transform.

Parameters:
imagendarray, shape (M, N)

Input image with nonzero values representing edges.

thresholdint, optional

Threshold

line_lengthint, optional

Minimum accepted length of detected lines. Increase the parameter to extract longer lines.

line_gapint, optional

Maximum gap between pixels to still form a line. Increase the parameter to merge broken lines more aggressively.

thetandarray of dtype, shape (K,), optional

Angles at which to compute the transform, in radians. Defaults to a vector of 180 angles evenly spaced in the range [-pi/2, pi/2).

rng{numpy.random.Generator, int}, optional

Pseudo-random number generator. By default, a PCG64 generator is used (see numpy.random.default_rng()). If rng is an int, it is used to seed the generator.

Returns:
lineslist

List of lines identified, lines in format ((x0, y0), (x1, y1)), indicating line start and end.

References

[1]

C. Galamhos, J. Matas and J. Kittler, “Progressive probabilistic Hough transform for line detection”, in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1999.