Meanshift Filter. More...

Functions

AFAPI array meanShift (const array &in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color=false)
 C++ Interface for mean shift. More...
 
AFAPI af_err af_mean_shift (af_array *out, const af_array in, const float spatial_sigma, const float chromatic_sigma, const unsigned iter, const bool is_color)
 C Interface for mean shift. More...
 

Detailed Description

Meanshift Filter.

A meanshift filter is an edge-preserving smoothing filter commonly used in object tracking and image segmentation.

This filter replaces each pixel in the image with the mean of the values within a given given color and spatial radius. The meanshift filter is an iterative algorithm that continues until a maxium number of iterations is met or until the value of the means no longer changes.


Function Documentation

◆ af_mean_shift()

AFAPI af_err af_mean_shift ( af_array out,
const af_array  in,
const float  spatial_sigma,
const float  chromatic_sigma,
const unsigned  iter,
const bool  is_color 
)

C Interface for mean shift.

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]iteris the number of iterations filter operation is performed
[in]is_colorindicates 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.

◆ meanShift()

AFAPI array af::meanShift ( const array in,
const float  spatial_sigma,
const float  chromatic_sigma,
const unsigned  iter,
const bool  is_color = false 
)

C++ Interface for mean shift.

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]iteris the number of iterations filter operation is performed
[in]is_colorindicates if the input in is color image or grayscale
Returns
the processed image
Examples
image_processing/brain_segmentation.cpp.