skimage 0.17.2

NotesParametersReturns

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.

Parameters

img : (M, N) ndarray

Input image with nonzero values representing edges.

theta : 1D ndarray of double

Angles at which to compute the transform, in radians.

Returns

H : 2-D ndarray of uint64

Hough transform accumulator.

theta : ndarray

Angles at which the transform was 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 :

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: None#None
type: <class 'builtin_function_or_method'>
Commit: