#include <hypothesis_filter.h>
Inheritance diagram for mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >:
Public Member Functions | |
double | max_weight (void) |
gives the maximum weight of the particules, can serve to normalise measures for instance. | |
void | track (void) |
This method is implemented by the compiler only if it is called. | |
void | reset (Hypothesis_T &init) |
To re-initialize the filter, very usefull to regroup around one hypothesis the different hypothesis when they are wide-spreaded and the measurment is "good enough". | |
void | filter (void) |
When all has been set call this method to measure hypothesis validity. | |
hypothesis_filter (Hypothesis_T &initial, int n, typename image_loader_P< Pixel_T >::set il_param, typename Observer_P< Hypothesis_T, Pixel_T >::set obs_param, typename Analyse_result_T< Hypothesis_T, Pixel_T >::set analyse_param) | |
The constructor, you right it looks awful but it does a hell of a lot for you. | |
hypothesis_filter (Hypothesis_T &initial, int n, typename image_loader_P< Pixel_T >::set il_param) | |
~hypothesis_filter () | |
Protected Attributes | |
int | nb_hypothesis |
for plublic access look at the vector size record the number of hypothesis used for re-initialisation |
It hosts different policy classes; if you want to do modifications you should start to examine this class and its policies.
If you just want to use this class browse through the provided examples. It might already provide you with an all ready solution.
Particle filter is a very versatile method, you can use it to do tracking using active contours, template matching in 2-D, 3-D... To take this into account we developed a generic implementation that shall adapt to a broad range of situations and that should save time to the programmer by providing the basic bricks common to different implementations. We thus used the policy idiom which is arguably faster than usual polymorphism since links are established at compile time. It is yet more flexible as it is possible to add unforcast functionalities to our tracking object without deep modifications. As a result the code might be more complex for the library programmer however the user get easier life as you may convince yourself by looking at the examples.
If you want to add building block to the library you may continue to read.
Following, the "raison d'�tre" of the different template parametres, what they implement and wether they are necessary for the hypothesis_filter class to work:
The number of hypothesis you have to take depends a lot on the choice of your observer and the system you are observing. To give you an idea, for the first application of this class I was using 1000.
As a rule of thumbs, the more hypothesis you have, the better your filtering and the slowler the computation.
Definition at line 142 of file hypothesis_filter.h.
mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::hypothesis_filter | ( | Hypothesis_T & | initial, | |
int | n, | |||
typename image_loader_P< Pixel_T >::set | il_param, | |||
typename Observer_P< Hypothesis_T, Pixel_T >::set | obs_param, | |||
typename Analyse_result_T< Hypothesis_T, Pixel_T >::set | analyse_param | |||
) | [inline] |
The constructor, you right it looks awful but it does a hell of a lot for you.
Definition at line 194 of file hypothesis_filter.h.
mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::hypothesis_filter | ( | Hypothesis_T & | initial, | |
int | n, | |||
typename image_loader_P< Pixel_T >::set | il_param | |||
) | [inline] |
Definition at line 210 of file hypothesis_filter.h.
mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::~hypothesis_filter | ( | ) | [inline] |
Definition at line 223 of file hypothesis_filter.h.
double mimas::hf::hypothesis_filter< Image_Loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::max_weight | ( | void | ) |
gives the maximum weight of the particules, can serve to normalise measures for instance.
Complexity: O(nb_hypothesis)
Definition at line 284 of file hypothesis_filter.h.
void mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::track | ( | void | ) | [inline] |
This method is implemented by the compiler only if it is called.
However policies won't necessarily provide the necessary method (here next() or analyse()). The compiler will tell you if it is the case. You may use this method as a reference how to use the hypothesis filter class to track.
Definition at line 160 of file hypothesis_filter.h.
Here is the call graph for this function:
void mimas::hf::hypothesis_filter< Image_Loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::reset | ( | Hypothesis_T & | init | ) |
To re-initialize the filter, very usefull to regroup around one hypothesis the different hypothesis when they are wide-spreaded and the measurment is "good enough".
May reduce the robustness of your tracker if used.
Definition at line 306 of file hypothesis_filter.h.
void mimas::hf::hypothesis_filter< Image_Loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::filter | ( | void | ) |
When all has been set call this method to measure hypothesis validity.
The behaviour of this method is affected by the observer policy, the compensate policy, the picking policy, and the drift method of the hypothesis.
<provided by the picking policy
< drift() provided by the hypothesis itself
<provided by the observer policy
<provided by the compensate policy
Definition at line 247 of file hypothesis_filter.h.
Referenced by mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::track().
int mimas::hf::hypothesis_filter< image_loader_P, Observer_P, Analyse_result_T, Hypothesis_T, Picking_P, Compensate_P, Pixel_T >::nb_hypothesis [protected] |
for plublic access look at the vector size record the number of hypothesis used for re-initialisation
Definition at line 227 of file hypothesis_filter.h.