rank_order(image)
New array where each pixel has the rank-order value of the corresponding pixel in image
. Pixel values are between 0 and n - 1, where n is the number of distinct unique values in image
.
Unique original values of image
Return an image of the same shape where each pixel is the index of the pixel value in the ascending order of the unique values of image
, aka the rank-order value.
>>> a = np.array([[1, 4, 5], [4, 4, 1], [5, 1, 1]])This example is valid syntax, but we were not able to check execution
... a array([[1, 4, 5], [4, 4, 1], [5, 1, 1]])
>>> rank_order(a) (array([[0, 1, 2], [1, 1, 0], [2, 0, 0]], dtype=uint32), array([1, 4, 5]))This example is valid syntax, but we were not able to check execution
>>> b = np.array([-1., 2.5, 3.1, 2.5])See :
... rank_order(b) (array([0, 1, 2, 1], dtype=uint32), array([-1. , 2.5, 3.1]))
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.filters._rank_order.rank_order
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