ArrayFire: meanshift (original) (raw)
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... | |
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.
◆ 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] | 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] | iter | is the number of iterations filter operation is performed |
| [in] | is_color | indicates 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 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] | 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] | iter | is the number of iterations filter operation is performed |
| [in] | is_color | indicates if the input in is color image or grayscale |
Returns
the processed image