Dilation(morphological operator) for images. More...
Functions | |
AFAPI array | dilate (const array &in, const array &mask) |
C++ Interface for image dilation (max filter) More... | |
AFAPI af_err | af_dilate (af_array *out, const af_array in, const af_array mask) |
C Interface for image dilation (max filter) More... | |
Dilation(morphological operator) for images.
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.
For further reference, see: Dilation (morphology)
Sample input and output are shown below:
C Interface for image dilation (max filter)
[out] | out | array is the dilated image |
[in] | in | array is the input image |
[in] | mask | is the neighborhood window |
mask
is all ones, this function behaves like max filter