wrap

Functions
wrap
Complete List of ArrayFire Functions ArrayFire Functions by Category » Image Processing » | Wrapping and unwrapping image windows

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

## ◆ af_wrap()

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] | out | is an array after converting
  [in] | in | is the input array
  [in] | ox | is the 0th-dimension of `out`
  [in] | oy | is the ist-dimension of `out`
  [in] | wx | is the block window size along 0th-dimension between
  [in] | wy | is the block window size along 1st-dimension between
  [in] | sx | is the stride along 0th-dimension
  [in] | sy | is the stride along 1st-dimension
  [in] | px | is the padding used along 0th-dimension between [0, wx).
  [in] | py | is the padding used along 1st-dimension between [0, wy).
  [in] | is_column | specifies 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

## ◆ wrap()

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] | in | is the input image (or set of images)
  [in] | ox | is the 0th-dimension of output
  [in] | oy | is the ist-dimension of output
  [in] | wx | is the block window size along 0th-dimension between
  [in] | wy | is the block window size along 1st-dimension between
  [in] | sx | is the stride along 0th-dimension
  [in] | sy | is the stride along 1st-dimension
  [in] | px | is the padding used along 0th-dimension between [0, wx).
  [in] | py | is the padding used along 1st-dimension between [0, wy).
  [in] | is_column | specifies 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