skimage 0.17.2

NotesParameters

Perform a projective transformation (homography) of a floating point image (single or double precision), using interpolation.

For each pixel, given its homogeneous coordinate $\mathbf{x} = [x, y, 1]^T$ , its target position is calculated by multiplying with the given matrix, $H$ , to give $H \mathbf{x}$ . E.g., to rotate by theta degrees clockwise, the matrix should be:

[[cos(theta) -sin(theta) 0]
 [sin(theta)  cos(theta) 0]
 [0            0         1]]

or, to translate x by 10 and y by 20:

[[1 0 10]
 [0 1 20]
 [0 0 1 ]].

Notes

Modes 'reflect' and 'symmetric' are similar, but differ in whether the edge pixels are duplicated during the reflection. As an example, if an array has values [0, 1, 2] and was padded to the right by four values using symmetric, the result would be [0, 1, 2, 2, 1, 0, 0], while for reflect it would be [0, 1, 2, 1, 0, 1, 2].

Parameters

image : 2-D array

Input image.

H : array of shape ``(3, 3)``

Transformation matrix H that defines the homography.

output_shape : tuple (rows, cols), optional

Shape of the output image generated (default None).

order : {0, 1, 2, 3}, optional

Order of interpolation0: Nearest-neighbor * 1: Bi-linear (default) * 2: Bi-quadratic * 3: Bi-cubic

mode : {'constant', 'edge', 'symmetric', 'reflect', 'wrap'}, optional

Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of numpy.pad .

cval : string, optional (default 0)

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

Projective transformation (homography).

Examples

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: