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.
Input image.
Standard deviation used for the Gaussian kernel, which is used as a weighting function for the local summation of squared differences.
How to handle values outside the image borders.
Used in conjunction with mode 'constant', the value outside the image boundaries.
Element of the structure tensor for each pixel in the input image.
Element of the structure tensor for each pixel in the input image.
Element of the structure tensor for each pixel in the input image.
Compute structure tensor using sum of squared differences.
>>> from skimage.feature import structure_tensorSee :
... 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.]])
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
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