skimage 0.17.2

NotesParametersReturnsBackRef
hough_line(image, theta=None)

Notes

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.

Parameters

image : (M, N) ndarray

Input image with nonzero values representing edges.

theta : 1D ndarray of double, optional

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

Returns

hspace : 2-D ndarray of uint64

Hough transform accumulator.

angles : ndarray

Angles at which the transform is computed, in radians.

distances : ndarray

Distance values.

Perform a straight line Hough transform.

Examples

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.py
    
See :

Back References

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

Local connectivity graph

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


File: /skimage/transform/hough_transform.py#167
type: <class 'function'>
Commit: