skimage 0.17.2

ParametersReturns

The orientation of corners is computed using the first order central moment i.e. the center of mass approach. The corner orientation is the angle of the vector from the corner coordinate to the intensity centroid in the local neighborhood around the corner calculated using first order central moment.

Parameters

image : 2D array

Input grayscale image.

corners : (N, 2) array

Corner coordinates as (row, col) .

mask : 2D array

Mask defining the local neighborhood of the corner used for the calculation of the central moment.

Returns

orientations : (N, 1) array

Orientations of corners in the range [-pi, pi].

Compute the orientation of corners.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage.morphology import octagon
... from skimage.feature import (corner_fast, corner_peaks,
...  corner_orientations)
... square = np.zeros((12, 12))
... square[3:9, 3:9] = 1
... square.astype(int) array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])
This example is valid syntax, but we were not able to check execution
>>> corners = corner_peaks(corner_fast(square, 9), min_distance=1)
... corners array([[3, 3], [3, 8], [8, 3], [8, 8]])
This example is valid syntax, but we were not able to check execution
>>> orientations = corner_orientations(square, corners, octagon(3, 2))
... np.rad2deg(orientations) array([ 45., 135., -45., -135.])
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 'fused_cython_function'>
Commit: