hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10, threshold=None, num_peaks=inf)
Identifies most prominent lines separated by a certain angle and distance in a Hough transform. Non-maximum suppression with different sizes is applied separately in the first (distances) and second (angles) dimension of the Hough space to identify peaks.
Hough space returned by the hough_line
function.
Angles returned by the hough_line
function. Assumed to be continuous. (:None:None:`angles[-1] - angles[0] == PI`
).
Distances returned by the hough_line
function.
Minimum distance separating lines (maximum filter size for first dimension of hough space).
Minimum angle separating lines (maximum filter size for second dimension of hough space).
Minimum intensity of peaks. Default is :None:None:`0.5 * max(hspace)`
.
Maximum number of peaks. When the number of peaks exceeds :None:None:`num_peaks`
, return :None:None:`num_peaks`
coordinates based on peak intensity.
Peak values in Hough space, angles and distances.
Return peaks in a straight line Hough transform.
>>> from skimage.transform import hough_line, hough_line_peaksSee :
... from skimage.draw import line
... img = np.zeros((15, 15), dtype=np.bool_)
... rr, cc = line(0, 0, 14, 14)
... img[rr, cc] = 1
... rr, cc = line(0, 14, 14, 0)
... img[cc, rr] = 1
... hspace, angles, dists = hough_line(img)
... hspace, angles, dists = hough_line_peaks(hspace, angles, dists)
... len(angles) 2
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.transform.hough_transform.hough_line_peaks
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them