hough_line(image, theta=None)
The origin is the top left corner of the original image. X and Y axis are horizontal and vertical edges respectively. The distance is the minimal algebraic distance from the origin to the detected line. The angle accuracy can be improved by decreasing the step size in the :None:None:`theta`
array.
Input image with nonzero values representing edges.
Angles at which to compute the transform, in radians. Defaults to a vector of 180 angles evenly spaced from -pi/2 to pi/2.
Hough transform accumulator.
Angles at which the transform is computed, in radians.
Distance values.
Perform a straight line Hough transform.
Generate a test image:
This example is valid syntax, but we were not able to check execution>>> img = np.zeros((100, 150), dtype=bool)
... img[30, :] = 1
... img[:, 65] = 1
... img[35:45, 35:50] = 1
... for i in range(90):
... img[i, i] = 1
... img += np.random.random(img.shape) > 0.95
Apply the Hough transform:
This example is valid syntax, but we were not able to check execution>>> out, angles, d = hough_line(img)
.. plot:: hough_tf.pySee :
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.transform.hough_transform.hough_line
skimage.transform.hough_transform.hough_line_peaks
skimage.transform._hough_transform._hough_line
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