Module geometric_transformations

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.
rotate90
Rotates an image 90 degrees clockwise.
rotate180
Rotates an image 180 degrees clockwise.
rotate270
Rotates an image 270 degrees clockwise.
rotate180_mut
An in-place version of rotate180().
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.
rotate_about_center_no_crop
Rotates an image clockwise about its center by theta radians without cropping. The output image has dimensions calculated to fit the entire rotated image. 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.