#include <bsta_mean_shift.h>
Public Types | |
typedef bsta_parzen_sphere< T, n >::vector_type | vector_ |
Public Member Functions | |
bsta_mean_shift () | |
bool | find_modes (bsta_sample_set< T, n > &set, vnl_random &rng, float percentage=10.0f, T epsilon=10e-3) |
initializes seeds randomly and finds all the resulting modes. | |
bool | find_modes (bsta_sample_set< T, n > &set, T epsilon=10e-3) |
use all the samples to get its mode, no need for random seed picking. | |
bool | trim_modes (bsta_sample_set< T, n > &set, T epsilon=10e-3) |
trim modes that are within epsilon distance to each other. | |
bool | merge_modes (bsta_sample_set< T, n > &set, int cnt, T epsilon) |
merge the mode with samples less than cnt to one of the modes depending on its samples mean-shift paths. | |
void | clear () |
unsigned | size () const |
vcl_vector< vector_ > & | modes () |
void | set_max_iter (unsigned iter) |
the default for maximum iterations to quit search starting from a seed is 1000. | |
Private Attributes | |
vcl_vector< vector_ > | modes_ |
unsigned | max_iter_ |
Definition at line 28 of file bsta_mean_shift.h.
typedef bsta_parzen_sphere<T,n>::vector_type bsta_mean_shift< T, n >::vector_ |
Definition at line 31 of file bsta_mean_shift.h.
bsta_mean_shift< T, n >::bsta_mean_shift | ( | ) | [inline] |
Definition at line 35 of file bsta_mean_shift.h.
void bsta_mean_shift< T, n >::clear | ( | ) | [inline] |
Definition at line 52 of file bsta_mean_shift.h.
bool bsta_mean_shift< T, n >::find_modes | ( | bsta_sample_set< T, n > & | set, |
vnl_random & | rng, | ||
float | percentage = 10.0f , |
||
T | epsilon = 10e-3 |
||
) |
initializes seeds randomly and finds all the resulting modes.
epsilon
: the difference required for updating to come to a halt percentage:
the percentage of the sample set to initialize as seed
Definition at line 12 of file bsta_mean_shift.txx.
bool bsta_mean_shift< T, n >::find_modes | ( | bsta_sample_set< T, n > & | set, |
T | epsilon = 10e-3 |
||
) |
use all the samples to get its mode, no need for random seed picking.
Definition at line 63 of file bsta_mean_shift.txx.
bool bsta_mean_shift< T, n >::merge_modes | ( | bsta_sample_set< T, n > & | set, |
int | cnt, | ||
T | epsilon | ||
) |
merge the mode with samples less than cnt to one of the modes depending on its samples mean-shift paths.
Definition at line 100 of file bsta_mean_shift.txx.
vcl_vector<vector_ >& bsta_mean_shift< T, n >::modes | ( | ) | [inline] |
Definition at line 55 of file bsta_mean_shift.h.
void bsta_mean_shift< T, n >::set_max_iter | ( | unsigned | iter | ) | [inline] |
the default for maximum iterations to quit search starting from a seed is 1000.
Definition at line 58 of file bsta_mean_shift.h.
unsigned bsta_mean_shift< T, n >::size | ( | ) | const [inline] |
Definition at line 54 of file bsta_mean_shift.h.
bool bsta_mean_shift< T, n >::trim_modes | ( | bsta_sample_set< T, n > & | set, |
T | epsilon = 10e-3 |
||
) |
trim modes that are within epsilon distance to each other.
epsilon
: the difference required for two modes to be merged
Definition at line 168 of file bsta_mean_shift.txx.
unsigned bsta_mean_shift< T, n >::max_iter_ [private] |
Definition at line 64 of file bsta_mean_shift.h.
vcl_vector<vector_ > bsta_mean_shift< T, n >::modes_ [private] |
Definition at line 62 of file bsta_mean_shift.h.