|
Bilateral Filter. More...
Functions | |
AFAPI array | bilateral (const array &in, const float spatial_sigma, const float chromatic_sigma, const bool is_color=false) |
C++ Interface for bilateral filter. More... | |
AFAPI af_err | af_bilateral (af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const bool isColor) |
C Interface for bilateral filter. More... | |
Bilateral Filter.
A bilateral filter is a edge-preserving filter that reduces noise in an image. The intensity of each pixel is replaced by a weighted average of the intensities of nearby pixels. The weights follow a Gaussian distribution and depend on the distance as well as the color distance.
The bilateral filter requires the size of the filter (in pixels) and the upper bound on color values, N, where pixel values range from 0–N inclusively.
The return type of the array is f64 for f64 input, f32 for all other input types.
AFAPI af_err af_bilateral | ( | af_array * | out, |
const af_array | in, | ||
const float | spatial_sigma, | ||
const float | chromatic_sigma, | ||
const bool | isColor | ||
) |
C Interface for bilateral filter.
[out] | out | array is the processed image |
[in] | in | array is the input image |
[in] | spatial_sigma | is the spatial variance parameter that decides the filter window |
[in] | chromatic_sigma | is the chromatic variance parameter |
[in] | isColor | indicates if the input in is color image or grayscale |
AFAPI array af::bilateral | ( | const array & | in, |
const float | spatial_sigma, | ||
const float | chromatic_sigma, | ||
const bool | is_color = false |
||
) |
C++ Interface for bilateral filter.
[in] | in | array is the input image |
[in] | spatial_sigma | is the spatial variance parameter that decides the filter window |
[in] | chromatic_sigma | is the chromatic variance parameter |
[in] | is_color | indicates if the input in is color image or grayscale |