- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
skew
Complete List of ArrayFire Functions ArrayFire Functions by Category » Image Processing » | Image transformations

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

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] | out | will contain the skewed image
  [in] | in | is input image
  [in] | skew0 | is amount by which the first dimension is skewed
  [in] | skew1 | is amount by which the second dimension is skewed
  [in] | odim0 | is the first output dimension
  [in] | odim1 | is the second output dimension
  [in] | inverse | if true applies inverse transform, if false applies forward transoform
  [in] | method | is the interpolation type (Nearest by default)

Returns
  AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.

AFAPI array af::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] | in | is input image
  [in] | skew0 | is amount by which the first dimension is skewed
  [in] | skew1 | is amount by which the second dimension is skewed
  [in] | odim0 | is the first output dimension
  [in] | odim1 | is the second output dimension
  [in] | inverse | if true applies inverse transform, if false applies forward transoform
  [in] | method | is the interpolation type (Nearest by default)

Returns
  the skewed image