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...
 

Detailed Description

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.


Function Documentation

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.

Parameters
[out]outarray is the processed image
[in]inarray is the input image
[in]spatial_sigmais the spatial variance parameter that decides the filter window
[in]chromatic_sigmais the chromatic variance parameter
[in]isColorindicates if the input in is color image or grayscale
Returns
AF_SUCCESS if the filter is applied successfully, otherwise an appropriate error code is returned.
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.

Parameters
[in]inarray is the input image
[in]spatial_sigmais the spatial variance parameter that decides the filter window
[in]chromatic_sigmais the chromatic variance parameter
[in]is_colorindicates if the input in is color image or grayscale
Returns
the processed image
Examples:
image_processing/filters.cpp.