skimage 0.17.2

ParametersReturnsBackRef
structure_tensor(image, sigma=1, mode='constant', cval=0)

The structure tensor A is defined as:

A = [Axx Axy]
    [Axy Ayy]

which is approximated by the weighted sum of squared differences in a local window around each pixel in the image.

Parameters

image : ndarray

Input image.

sigma : float, optional

Standard deviation used for the Gaussian kernel, which is used as a weighting function for the local summation of squared differences.

mode : {'constant', 'reflect', 'wrap', 'nearest', 'mirror'}, optional

How to handle values outside the image borders.

cval : float, optional

Used in conjunction with mode 'constant', the value outside the image boundaries.

Returns

Axx : ndarray

Element of the structure tensor for each pixel in the input image.

Axy : ndarray

Element of the structure tensor for each pixel in the input image.

Ayy : ndarray

Element of the structure tensor for each pixel in the input image.

Compute structure tensor using sum of squared differences.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage.feature import structure_tensor
... square = np.zeros((5, 5))
... square[2, 2] = 1
... Axx, Axy, Ayy = structure_tensor(square, sigma=0.1)
... Axx array([[0., 0., 0., 0., 0.], [0., 1., 0., 1., 0.], [0., 4., 0., 4., 0.], [0., 1., 0., 1., 0.], [0., 0., 0., 0., 0.]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.feature.corner.structure_tensor skimage.feature.corner.structure_tensor_eigvals

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/feature/corner.py#47
type: <class 'function'>
Commit: