A high-performance general-purpose compute library

Scale an input image. More...

Functions

array scale (const array &in, const float scale0, const float scale1, const dim_t odim0=0, const dim_t odim1=0, const interpType method=AF_INTERP_NEAREST)
 C++ Interface for scaling an image.
 
af_err af_scale (af_array *out, const af_array in, const float scale0, const float scale1, const dim_t odim0, const dim_t odim1, const af_interp_type method)
 C Interface for scaling an image.
 

Detailed Description

Scale an input image.

Scale is the same functionality as resize except that the scale function uses the transform kernels. The other difference is that scale does not set boundary values to be the boundary of the input array. Instead these are set to 0.

Scale is a special case of the transform function.

Function Documentation

◆ af_scale()

af_err af_scale ( af_array * out,
const af_array in,
const float scale0,
const float scale1,
const dim_t odim0,
const dim_t odim1,
const af_interp_type method )

C Interface for scaling an image.

Parameters
[out]outwill contain the scaled image
[in]inis input image
[in]scale0is amount by which the first dimension is scaled
[in]scale1is amount by which the second dimension is scaled
[in]odim0is the first output dimension
[in]odim1is the second output dimension
[in]methodis the interpolation type (Nearest by default)
Returns
AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.

◆ scale()

array scale ( const array & in,
const float scale0,
const float scale1,
const dim_t odim0 = 0,
const dim_t odim1 = 0,
const interpType method = AF_INTERP_NEAREST )

C++ Interface for scaling an image.

Parameters
[in]inis input image
[in]scale0is amount by which the first dimension is scaled
[in]scale1is amount by which the second dimension is scaled
[in]odim0is the first output dimension
[in]odim1is the second output dimension
[in]methodis the interpolation type (Nearest by default)
Returns
the scaled image