A high-performance general-purpose compute library

Skew an input image. More...

Functions

AFAPI array skew (const array &in, const float skew0, const float skew1, const dim_t odim0=0, const dim_t odim1=0, const bool inverse=true, const interpType method=AF_INTERP_NEAREST)
 C++ Interface for skewing an image. More...
 
AFAPI af_err af_skew (af_array *out, const af_array in, const float skew0, const float skew1, const dim_t odim0, const dim_t odim1, const af_interp_type method, const bool inverse)
 C Interface for skewing an image. More...
 

Detailed Description

Skew an input image.

Skew function skews the input array along dim0 by skew0 and along dim1 by skew1. The skew areguments are in radians. Skewing the data means the data remains parallel along 1 dimensions but the other dimensions gets moved along based on the angle. If both skew0 and skew1 are specified, then the data will be skewed along both directions.

Explicit output dimensions can be specified using odim0 and odim1.

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

Skew is a special case of the af::transform function.

Function Documentation

◆ af_skew()

AFAPI af_err af_skew ( af_array out,
const af_array  in,
const float  skew0,
const float  skew1,
const dim_t  odim0,
const dim_t  odim1,
const af_interp_type  method,
const bool  inverse 
)

C Interface for skewing an image.

Parameters
[out]outwill contain the skewed image
[in]inis input image
[in]skew0is amount by which the first dimension is skewed
[in]skew1is amount by which the second dimension is skewed
[in]odim0is the first output dimension
[in]odim1is the second output dimension
[in]inverseif true applies inverse transform, if false applies forward transoform
[in]methodis the interpolation type (Nearest by default)
Returns
AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.

◆ skew()

AFAPI array skew ( const array in,
const float  skew0,
const float  skew1,
const dim_t  odim0 = 0,
const dim_t  odim1 = 0,
const bool  inverse = true,
const interpType  method = AF_INTERP_NEAREST 
)

C++ Interface for skewing an image.

Parameters
[in]inis input image
[in]skew0is amount by which the first dimension is skewed
[in]skew1is amount by which the second dimension is skewed
[in]odim0is the first output dimension
[in]odim1is the second output dimension
[in]inverseif true applies inverse transform, if false applies forward transoform
[in]methodis the interpolation type (Nearest by default)
Returns
the skewed image