@@ -411,8 +411,8 @@ AFAPI array histEqual(const array& in, const array& hist);
411411/* *
412412 C++ Interface for generating gausian kernels
413413
414- \param[in] rows number of kernel rows
415- \param[in] cols number of kernel columns
414+ \param[in] rows number of rows of the kernel
415+ \param[in] cols number of columns of the kernel
416416 \param[in] sig_r (default 0) (calculated internally as 0.25 * rows + 0.75)
417417 \param[in] sig_c (default 0) (calculated internally as 0.25 * cols + 0.75)
418418 \return an array with values generated using gaussian function
@@ -476,22 +476,45 @@ AFAPI array dog(const array& in, const int radius1, const int radius2);
476476/* *
477477 C++ Interface wrapper for unwrap
478478
479- \param[in] in is the input array
479+ \param[in] in is the input image (or set of images)
480480 \param[in] wx is the block window size along 0th-dimension between [1, input.dims[0] + px]
481481 \param[in] wy is the block window size along 1st-dimension between [1, input.dims[1] + py]
482482 \param[in] sx is the stride along 0th-dimension
483483 \param[in] sy is the stride along 1st-dimension
484484 \param[in] px is the padding along 0th-dimension between [0, wx). Padding is applied both before and after.
485485 \param[in] py is the padding along 1st-dimension between [0, wy). Padding is applied both before and after.
486486 \param[in] is_column specifies the layout for the unwrapped patch. If is_column is false, the unrapped patch is laid out as a row.
487- \returns an array with the image blocks as columns
487+ \returns an array with the image blocks as rows or columns
488488
489489 \ingroup image_func_unwrap
490490*/
491491AFAPI array unwrap (const array& in, const dim_t wx, const dim_t wy,
492492 const dim_t sx, const dim_t sy, const dim_t px=0 , const dim_t py=0 ,
493493 const bool is_column = true );
494494
495+ /* *
496+ C++ Interface wrapper for wrap
497+
498+ \param[in] in is the input image (or set of images)
499+ \param[in] ox is the 0th-dimension of output
500+ \param[in] oy is the ist-dimension of output
501+ \param[in] wx is the block window size along 0th-dimension between
502+ \param[in] wy is the block window size along 1st-dimension between
503+ \param[in] sx is the stride along 0th-dimension
504+ \param[in] sy is the stride along 1st-dimension
505+ \param[in] px is the padding used along 0th-dimension between [0, wx).
506+ \param[in] py is the padding used along 1st-dimension between [0, wy).
507+ \param[in] is_column specifies the layout for the unwrapped patch. If is_column is false, the rows are treated as patches
508+ \returns an array of images after converting rows or columns into image windows
509+
510+ \ingroup image_func_wrap
511+ */
512+ AFAPI array wrap (const array& in,
513+ const dim_t ox, const dim_t oy,
514+ const dim_t wx, const dim_t wy,
515+ const dim_t sx, const dim_t sy,
516+ const dim_t px = 0 , const dim_t py = 0 ,
517+ const bool is_column = true );
495518
496519/* *
497520 C++ Interface wrapper for summed area tables
@@ -913,8 +936,8 @@ extern "C" {
913936 C Interface generating gaussian kernels
914937
915938 \param[out] out is an array with values generated using gaussian function
916- \param[in] rows number of kernel rows
917- \param[in] cols number of kernel columns
939+ \param[in] rows number of rows of the gaussian kernel
940+ \param[in] cols number of columns of the gaussian kernel
918941 \param[in] sigma_r (default 0) (calculated internally as 0.25 * rows + 0.75)
919942 \param[in] sigma_c (default 0) (calculated internally as 0.25 * cols + 0.75)
920943 \return \ref AF_SUCCESS if gaussian distribution values are generated successfully,
@@ -990,8 +1013,8 @@ extern "C" {
9901013 /* *
9911014 C Interface wrapper for unwrap
9921015
993- \param[out] out is an array with image blocks as columns.
994- \param[in] in is the input array
1016+ \param[out] out is an array with image blocks as rows or columns.
1017+ \param[in] in is the input image (or set of images)
9951018 \param[in] wx is the block window size along 0th-dimension between [1, input.dims[0] + px]
9961019 \param[in] wy is the block window size along 1st-dimension between [1, input.dims[1] + py]
9971020 \param[in] sx is the stride along 0th-dimension
@@ -1008,6 +1031,35 @@ extern "C" {
10081031 const dim_t sx, const dim_t sy, const dim_t px, const dim_t py,
10091032 const bool is_column);
10101033
1034+ /* *
1035+ C Interface wrapper for wrap
1036+
1037+ \param[out] out is an array after converting
1038+ \param[in] in is the input array
1039+ \param[in] ox is the 0th-dimension of \p out
1040+ \param[in] oy is the ist-dimension of \p out
1041+ \param[in] wx is the block window size along 0th-dimension between
1042+ \param[in] wy is the block window size along 1st-dimension between
1043+ \param[in] sx is the stride along 0th-dimension
1044+ \param[in] sy is the stride along 1st-dimension
1045+ \param[in] px is the padding used along 0th-dimension between [0, wx).
1046+ \param[in] py is the padding used along 1st-dimension between [0, wy).
1047+ \param[in] is_column specifies the layout for the unwrapped patch. If is_column is false, the rows are treated as the patches
1048+ \return \ref AF_SUCCESS if the color transformation is successful,
1049+ otherwise an appropriate error code is returned.
1050+
1051+ \note The padding used in \ref af_unwrap is calculated from the provided parameters
1052+
1053+ \ingroup image_func_wrap
1054+ */
1055+ AFAPI af_err af_wrap (af_array *out,
1056+ const af_array in,
1057+ const dim_t ox, const dim_t oy,
1058+ const dim_t wx, const dim_t wy,
1059+ const dim_t sx, const dim_t sy,
1060+ const dim_t px, const dim_t py,
1061+ const bool is_column);
1062+
10111063 /* *
10121064 C Interface wrapper for summed area tables
10131065
0 commit comments