Apply an arbitrary filter to an image. More...

Modules

 filter
 The C++ interface for filter.
 
 af_filter
 The C interface for filter.
 

Detailed Description

Apply an arbitrary filter to an image.

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.