Documentation


The C interface for filter. More...
afError  af_filter_S (float *d_out, unsigned xi, unsigned yi, const float *d_in, unsigned xf, unsigned yf, const float *d_filter, unsigned type, float value, bool conv, bool full, unsigned batchA, unsigned batchF) 
2D Image filtering/convolution. More...  
afError  af_filter_D (double *d_out, unsigned xi, unsigned yi, const double *d_in, unsigned xf, unsigned yf, const double *d_filter, unsigned type, float value, bool conv, bool full, unsigned batchA, unsigned batchF) 
Double precision, Image filtering. More...  
The C interface for filter.
Apply an arbitrary filter (also known as a kernel) to an image. This function can be used for several tasks in image processing including noise removal or blurring (especially when combined with the gaussiankernel).
This function involves specifying a 1D or 2D filter, a (usually) small array with an odd number of pixels in each dimension. Each pixel in the output image is the weighted sum of the original pixels and all neighboring pixels, where the weight is specified by the filter.
Pixels outside of the image contribute a 0 to the average. This occurs when processing pixels on the edge of an image, or pixels that are close to the edge when a large filter is used.
afError af_filter_S  (  float *  d_out, 
unsigned  xi,  
unsigned  yi,  
const float *  d_in,  
unsigned  xf,  
unsigned  yf,  
const float *  d_filter,  
unsigned  type,  
float  value,  
bool  conv,  
bool  full,  
unsigned  batchA,  
unsigned  batchF  
) 
2D Image filtering/convolution.
[out]  d_out  The filtered output 
[in]  xi  Number of rows in input image 
[in]  yi  Number of columns in input image 
[in]  d_in  Input image 
[in]  xf  Number of rows in the input filter 
[in]  yf  Number of columns in the input filter 
[in]  d_filter  Input filter (on device) 
[in]  type  used to specify behavior near the boundaries {Symmetric(1), Repeating(2), Circular(3), Value(4)} 
[in]  value  if type=4, this value is used for out of bounds 
[in]  conv  true for convolution, false for correlation 
[in]  full  true for expanded convolution, false otherwise 
[in]  batchA  Number of input images (gfor) 
[in]  batchF  Number of input filters (gfor)Single precision, Image filtering 
afError af_filter_D  (  double *  d_out, 
unsigned  xi,  
unsigned  yi,  
const double *  d_in,  
unsigned  xf,  
unsigned  yf,  
const double *  d_filter,  
unsigned  type,  
float  value,  
bool  conv,  
bool  full,  
unsigned  batchA,  
unsigned  batchF  
) 
Double precision, Image filtering.