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 ]].
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].
Input image.
Transformation matrix H that defines the homography.
Shape of the output image generated (default None).
Order of interpolation0: Nearest-neighbor * 1: Bi-linear (default) * 2: Bi-quadratic * 3: Bi-cubic
Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of numpy.pad
.
Used in conjunction with mode 'C' (constant), the value outside the image boundaries.
Projective transformation (homography).
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