Documentation


The C interface for dilate. More...
afError  af_dilate_B (bool *d_out, unsigned in_ndims, const unsigned *in_dims, const bool *d_in, unsigned nhood_ndims, const unsigned *nhood_dims, const bool *d_nhood, unsigned batch) 
Dilate an image. More...  
afError  af_dilate_S (float *d_out, unsigned in_ndims, const unsigned *in_dims, const float *d_in, unsigned nhood_ndims, const unsigned *nhood_dims, const float *d_nhood, unsigned batch) 
Single precision, Image Dilation. More...  
afError  af_dilate_D (double *d_out, unsigned in_ndims, const unsigned *in_dims, const double *d_in, unsigned nhood_ndims, const unsigned *nhood_dims, const double *d_nhood, unsigned batch) 
Double precision, Image Dilation. More...  
The C interface for dilate.
The dilation function takes two pieces of data as inputs. The first is the input image
to be morphed, and the second is the mask
indicating the neighborhood around each pixel to match.
In dilation, for each pixel, the mask is centered at the pixel. If the center pixel of the mask matches the corresponding pixel on the image, then the mask is accepted. If the center pixels do not matches, then the mask is ignored and no changes are made.
Dilation supports nchannel images (ie. 3D matrices). However each tile must be 2D and will be the same for all channels. If you wish to use separate masks for channels, you can extract the channel, apply the operation and store the resulting channel back in the array.
Image dilation is useful for bluring and smoothing edges.
For further reference, see: Dilation (morphology)
afError af_dilate_B  (  bool *  d_out, 
unsigned  in_ndims,  
const unsigned *  in_dims,  
const bool *  d_in,  
unsigned  nhood_ndims,  
const unsigned *  nhood_dims,  
const bool *  d_nhood,  
unsigned  batch  
) 
Dilate an image.
[out]  d_out  The dilated image 
[in]  in_ndims  Number of dimension elements in in_dims 
[in]  in_dims  Dimensions of d_in 
[in]  d_in  Input image 
[in]  nhood_ndims  Number of dimension elements in nhood_dims 
[in]  nhood_dims  Dimensions of h_nhood 
[in]  d_nhood  neighborhood patch (device) 
[in]  batch  Number of input images 
h_nhood
must be square and odd (3x3,5x5,7x7,...)Boolean, Image Dilation afError af_dilate_S  (  float *  d_out, 
unsigned  in_ndims,  
const unsigned *  in_dims,  
const float *  d_in,  
unsigned  nhood_ndims,  
const unsigned *  nhood_dims,  
const float *  d_nhood,  
unsigned  batch  
) 
Single precision, Image Dilation.
afError af_dilate_D  (  double *  d_out, 
unsigned  in_ndims,  
const unsigned *  in_dims,  
const double *  d_in,  
unsigned  nhood_ndims,  
const unsigned *  nhood_dims,  
const double *  d_nhood,  
unsigned  batch  
) 
Double precision, Image Dilation.