Wrap takes an unwrapped image (see unwrap()) and converts it back to an image. More...

Functions

AFAPI array wrap (const array &in, const dim_t ox, const dim_t oy, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px=0, const dim_t py=0, const bool is_column=true)
 C++ Interface wrapper for wrap. More...
 
AFAPI af_err af_wrap (af_array *out, const af_array in, const dim_t ox, const dim_t oy, const dim_t wx, const dim_t wy, const dim_t sx, const dim_t sy, const dim_t px, const dim_t py, const bool is_column)
 C Interface wrapper for wrap. More...
 

Detailed Description

Wrap takes an unwrapped image (see unwrap()) and converts it back to an image.

The inputs to this function should be the same as the inputs used to generate the unwrapped image.

Function Documentation

AFAPI af_err af_wrap ( af_array out,
const af_array  in,
const dim_t  ox,
const dim_t  oy,
const dim_t  wx,
const dim_t  wy,
const dim_t  sx,
const dim_t  sy,
const dim_t  px,
const dim_t  py,
const bool  is_column 
)

C Interface wrapper for wrap.

Parameters
[out]outis an array after converting
[in]inis the input array
[in]oxis the 0th-dimension of out
[in]oyis the ist-dimension of out
[in]wxis the block window size along 0th-dimension between
[in]wyis the block window size along 1st-dimension between
[in]sxis the stride along 0th-dimension
[in]syis the stride along 1st-dimension
[in]pxis the padding used along 0th-dimension between [0, wx).
[in]pyis the padding used along 1st-dimension between [0, wy).
[in]is_columnspecifies the layout for the unwrapped patch. If is_column is false, the rows are treated as the patches
Returns
AF_SUCCESS if the color transformation is successful, otherwise an appropriate error code is returned.
Note
The padding used in af_unwrap is calculated from the provided parameters
AFAPI array af::wrap ( const array in,
const dim_t  ox,
const dim_t  oy,
const dim_t  wx,
const dim_t  wy,
const dim_t  sx,
const dim_t  sy,
const dim_t  px = 0,
const dim_t  py = 0,
const bool  is_column = true 
)

C++ Interface wrapper for wrap.

Parameters
[in]inis the input image (or set of images)
[in]oxis the 0th-dimension of output
[in]oyis the ist-dimension of output
[in]wxis the block window size along 0th-dimension between
[in]wyis the block window size along 1st-dimension between
[in]sxis the stride along 0th-dimension
[in]syis the stride along 1st-dimension
[in]pxis the padding used along 0th-dimension between [0, wx).
[in]pyis the padding used along 1st-dimension between [0, wy).
[in]is_columnspecifies the layout for the unwrapped patch. If is_column is false, the rows are treated as patches
Returns
an array of images after converting rows or columns into image windows