Module geometric_transformations

Source
Expand description

Geometric transformations of images. This includes rotations, translation, and general projective transformations.

Structs§

Projection
A 2d projective transformation, stored as a row major 3x3 matrix.

Enums§

Interpolation
How to handle pixels whose pre-image lies between input pixels.

Functions§

rotate
Rotates an image clockwise about the provided center by theta radians. The output image has the same dimensions as the input. Output pixels whose pre-image lies outside the input image are set to default.
rotate_about_center
Rotates an image clockwise about its center. The output image has the same dimensions as the input. Output pixels whose pre-image lies outside the input image are set to default.
translate
Translates the input image by t. Note that image coordinates increase from top left to bottom right. Output pixels whose pre-image are not in the input image are set to the boundary pixel in the input image nearest to their pre-image.
warp
Applies a projective transformation to an image.
warp_into
Applies a projective transformation to an image, writing to a provided output.
warp_into_with
Warps an image using the provided function to define the pre-image of each output pixel, writing into a preallocated output.
warp_with
Warps an image using the provided function to define the pre-image of each output pixel.