A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://arrayfire.github.io/arrayfire-rust/arrayfire/fn.transform.html below:

arrayfire::transform - Rust

[−][src]Function arrayfire::transform
pub fn transform<T: HasAfEnum>(
    input: &Array<T>,
    trans: &Array<f32>,
    odim0: i64,
    odim1: i64,
    method: InterpType,
    is_inverse: bool
) -> Array<T>

Transform(Affine) an Image

The transform function uses an affine transform matrix to tranform an input image into a new one. The transform matrix tf is a 3x2 matrix of type float. The matrix operation is applied to each location (x, y) that is then transformed to (x', y') of the new array. Hence the transformation is an element-wise operation.

The operation is as below: tf = [r00 r10 r01 r11 t0 t1]

x' = x * r00 + y * r01 + t0; y' = x * r10 + y * r11 + t1;

Interpolation types of NEAREST, LINEAR, BILINEAR and CUBIC are allowed. Affine transforms can be used for various purposes. translate, scale and skew are specializations of the transform function.

This function can also handle batch operations.

Transformed Array


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4