Scale an input image. More...

Functions

AFAPI 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. More...
 
AFAPI 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. More...
 

Detailed Description

Scale an input image.

Scale is the same functionality as af::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 af::transform function.

Function Documentation

AFAPI 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.
AFAPI array af::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
Examples:
image_processing/image_editing.cpp.