Enumerations | |
| enum | afConv { afConvSame = 0, afConvValid = -1, afConvFull = 1 } |
Specify which part of convolution to retain. More... | |
Functions | |
| array | filter (const array &image, const array &kernel) |
| Image Filter. | |
| array | medfilt (const array &image, const unsigned height=3, const unsigned width=3) |
| Median filtering within window (default 3x3) | |
| array | convolve (const array &f1, const array &f2, const array &signal, afConv shape=afConvFull) |
| Separable convolution (2D) with device arrays. | |
| template<typename ty > | |
| array | convolve (unsigned n1, const ty *f1, unsigned n2, const ty *f2, const array &signal, afConv shape=afConvFull) |
| Separable convolution (2D) with host arrays. | |
| array | convolve (const array &signal, const array &filter, afConv shape=afConvFull) |
| Convolution (1D,2D,3D). | |
| template<typename ty > | |
| array | convolve (const array &signal, unsigned ndims, unsigned *dims, const ty *h_kernel, afConv shape=afConvFull) |
| Convolution (1D,2D,3D) with host filter. | |
| enum afConv |
Specify which part of convolution to retain.
array x3 = randu(1,3), x5 = randu(1,5); print(convolve(x3, x5, afConvSame)); // 1x3 output print(convolve(x5, x3, afConvSame)); // 1x5 output print(convolve(x3, x5, afConvFull)); // 1x7 output print(convolve(x5, x3, afConvValid)); // 1x3 output print(convolve(x3, x5, afConvValid)); // empty output since filter bigger than signal
| array af::filter | ( | const array & | image, |
| const array & | kernel | ||
| ) |
Image Filter.
| [in] | image | |
| [in] | kernel | coefficient matrix |
| array af::medfilt | ( | const array & | image, |
| const unsigned | height = 3, |
||
| const unsigned | width = 3 |
||
| ) |
Median filtering within window (default 3x3)
| [in] | image | |
| [in] | height | of window (default 3) |
| [in] | width | of window (default 3) |
| array af::convolve | ( | const array & | f1, |
| const array & | f2, | ||
| const array & | signal, | ||
| afConv | shape = afConvFull |
||
| ) |
Separable convolution (2D) with device arrays.
| [in] | f1 | filter along the columns (first dimension) |
| [in] | f2 | filter along the rows (second dimension) |
| [in] | signal | |
| [in] | shape | type of convolution (default: afConvFull) |
| array af::convolve | ( | unsigned | n1, |
| const ty * | f1, | ||
| unsigned | n2, | ||
| const ty * | f2, | ||
| const array & | signal, | ||
| afConv | shape = afConvFull |
||
| ) |
Separable convolution (2D) with host arrays.
| [in] | n1 | number of elements in f1 |
| [in] | f1 | host pointer containing the column filter |
| [in] | n2 | number of elements in f2 |
| [in] | f2 | host pointer containing the row filter |
| [in] | signal | |
| [in] | shape | type of convolution (default: afConvFull) |
| array af::convolve | ( | const array & | signal, |
| const array & | filter, | ||
| afConv | shape = afConvFull |
||
| ) |
Convolution (1D,2D,3D).
| [in] | signal | |
| [in] | filter | |
| [in] | shape | type of convolution (default: afConvFull) |
| array af::convolve | ( | const array & | signal, |
| unsigned | ndims, | ||
| unsigned * | dims, | ||
| const ty * | h_kernel, | ||
| afConv | shape = afConvFull |
||
| ) |
Convolution (1D,2D,3D) with host filter.
| [in] | signal | |
| [in] | ndims | Number of dimensions for the filter h_kernel |
| [in] | dims | Array containing dimension sizes of filter h_kernel |
| [in] | h_kernel | Host-side array containing the filter kernel coefficients |
| [in] | shape | type of convolution (default: afConvFull) |