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/../arrayfire/../arrayfire/fn.translate.html below:

arrayfire::translate - Rust

[−][src]Function arrayfire::translate
pub fn translate<T: HasAfEnum>(
    input: &Array<T>,
    trans0: f32,
    trans1: f32,
    odim0: i64,
    odim1: i64,
    method: InterpType
) -> Array<T>

Translate an Image

Translating an image is moving it along 1st and 2nd dimensions by trans0 and trans1. Positive values of these will move the data towards negative x and negative y whereas negative values of these will move the positive right and positive down. See the example below for more.

To specify an output dimension, use the odim0 and odim1 for dim0 and dim1 respectively. The size of 2rd and 3rd dimension is same as input. If odim0 and odim1 and not defined, then the output dimensions are same as the input dimensions and the data out of bounds will be discarded.

All new values that do not map to a location of the input array are set to 0.

Translate is a special case of the transform function.

Translated Image(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