Skip to main content

affine_transform

Function affine_transform 

Source
pub fn affine_transform(
    image: &Array2<f64>,
    matrix: [[f64; 2]; 2],
    offset: (f64, f64),
    output_shape: (usize, usize),
    order: usize,
    mode: Mode,
) -> Result<Array2<f64>, ErrorsJSL>
Expand description

The affine transform (SciPy’s affine_transform): output pixel o takes the input value at matrix · o + offset, interpolated. Note the direction: the matrix maps output coordinates to input coordinates, so to rotate an image by θ the matrix is the rotation by −θ.