Convolution Integral for three dimensional data. More...
Functions | |
AFAPI array | convolve3 (const array &signal, const array &filter, const convMode mode=AF_CONV_DEFAULT, const convDomain domain=AF_CONV_AUTO) |
C++ Interface for convolution on three dimensional data. More... | |
AFAPI af_err | af_convolve3 (af_array *out, const af_array signal, const af_array filter, const af_conv_mode mode, af_conv_domain domain) |
C Interface for convolution on three dimensional data. More... | |
Convolution Integral for three dimensional data.
A convolution is a common operation between a source array, a, and a filter (or kernel) array b. The answer to the convolution is the same as computing the coefficients in polynomial multiplication, if a and b are the coefficients.
Another way to think about it is that the filter kernel is centered on each pixel in a, and the output for that pixel or data point is the sum of the products.
Depending on the dimensions of the input signal and the filter signal, any one of the following batch mode convolutions take place.
For example, if the signal is three dimensional with m, n & p sizes along the 0th, 1st & 2nd dimensions respectively, then the possible batch operations are as follows.
Input Signal Dimensions | Filter Signal Dimensions | Batch Mode | Explanation |
---|---|---|---|
[m n p 1] | [m n p 1] | One to One | Output will be a single convolve array |
[m n p 1] | [m n p q] | One to Many | Output will be 4d array with 3rd dimension length as q - q filters applied to same input |
[m n p q] | [m n p 1] | Many to One | Output will be 4d array with 3rd dimension length as q - 1 filter applied to q inputs |
[m n p q] | [m n p q] | Many to Many | Output will be 4d array with 3rd dimension length as q - q filter applied to q inputs in one-to-one correspondence |
AFAPI af_err af_convolve3 | ( | af_array * | out, |
const af_array | signal, | ||
const af_array | filter, | ||
const af_conv_mode | mode, | ||
af_conv_domain | domain | ||
) |
C Interface for convolution on three dimensional data.
[out] | out | is convolved array |
[in] | signal | is the input signal |
[in] | filter | is the signal that shall be flipped for the convolution operation |
[in] | mode | indicates if the convolution should be expanded or not(where output size equals input) |
[in] | domain | specifies if the convolution should be performed in frequency os spatial domain |
domain
, AF_CONV_AUTO, heuristically switches between frequency and spatial domain. AFAPI array af::convolve3 | ( | const array & | signal, |
const array & | filter, | ||
const convMode | mode = AF_CONV_DEFAULT , |
||
const convDomain | domain = AF_CONV_AUTO |
||
) |
C++ Interface for convolution on three dimensional data.
[in] | signal | is the input signal |
[in] | filter | is the signal that shall be flipped for the convolution operation |
[in] | mode | indicates if the convolution should be expanded or not(where output size equals input) |
[in] | domain | specifies if the convolution should be performed in frequency os spatial domain |
domain
, AF_CONV_AUTO, heuristically switches between frequency and spatial domain.