#include <Predictor.h>
Public Member Functions | |
| virtual void | movePredicted (const TomGine::tgPose &poseIn, TomGine::tgPose &poseOut, float &c) |
| Interface for Prediction/Motion systems. | |
| Predictor () | |
| virtual void | resample (Distribution &d, int num_particles, Particle variance, bool useMotion=true) |
| Resample particles according to current likelihood distribution (move particles) | |
| virtual void | sample (Distribution &d, int num_particles, Particle mean, Particle variance) |
| Sample new distribution. | |
| virtual void | sampleFromGaussian (Distribution &d, int num_particles, Particle mean, Particle variance, float sigma=1.0) |
| Adds samples/particles to a distribution d by adding gaussian noise. | |
| void | setCamViewVector (TomGine::tgVector3 v) |
| Set vector pointing from camera to object mean, to enable zooming. | |
| void | setNoConvergence (float v) |
| Set the number of particles (in percent) which are voting for no convergence (for capturing fast movement) | |
| virtual void | updateTime (double dTime) |
| Updates time of prediction system for higher order motion model. | |
Protected Member Functions | |
| Particle | genNoise (float sigma, Particle pConstraint, unsigned int type=GAUSS) |
| float | noise (float sigma, unsigned int type=GAUSS) |
Protected Attributes | |
| float | c_pred |
| TomGine::tgVector3 | m_cam_view |
| double | m_dTime |
| float | m_noConvergence |
| float | m_powTime |
| float | m_powTimeSteps |
class Predictor
Definition at line 24 of file Predictor.h.
Definition at line 8 of file Predictor.cpp.
| Particle Predictor::genNoise | ( | float | sigma, |
| Particle | pConstraint, | ||
| unsigned int | type = GAUSS |
||
| ) | [protected] |
Definition at line 37 of file Predictor.cpp.
| void Predictor::movePredicted | ( | const TomGine::tgPose & | poseIn, |
| TomGine::tgPose & | poseOut, | ||
| float & | c | ||
| ) | [virtual] |
Interface for Prediction/Motion systems.
| poseIn | actual pose |
| poseOut | predicted/moved pose |
| c | confidence about prediction/movement ( 1.0 = high confidence; 0.0 = no confidence ) |
Definition at line 88 of file Predictor.cpp.
| float Predictor::noise | ( | float | sigma, |
| unsigned int | type = GAUSS |
||
| ) | [protected] |
Definition at line 15 of file Predictor.cpp.
| void Predictor::resample | ( | Distribution & | d, |
| int | num_particles, | ||
| Particle | variance, | ||
| bool | useMotion = true |
||
| ) | [virtual] |
Resample particles according to current likelihood distribution (move particles)
| d | pointer to distribution |
| num_particles | number of particles of resampled likelihood distribution |
| variance | variance of sampling in each degree of freedom (represented as particle) |
Definition at line 95 of file Predictor.cpp.
| void Predictor::sample | ( | Distribution & | d, |
| int | num_particles, | ||
| Particle | mean, | ||
| Particle | variance | ||
| ) | [virtual] |
Sample new distribution.
| d | pointer to distribution |
| num_particles | number of particles to represent likelihood distribution |
| mean | mean particle of distribution |
| variance | variance of sampling in each degree of freedom (represented as particle) |
Definition at line 184 of file Predictor.cpp.
| void Predictor::sampleFromGaussian | ( | Distribution & | d, |
| int | num_particles, | ||
| Particle | mean, | ||
| Particle | variance, | ||
| float | sigma = 1.0 |
||
| ) | [virtual] |
Adds samples/particles to a distribution d by adding gaussian noise.
| d | particle distribution |
| num_particles | number of particles of resampled likelihood distribution |
| mean | mean particle of distribution |
| variance | variance of sampling in each degree of freedom (represented as particle) |
| sigma | standard variation of sampling (dependent on confidence value -> sigma(c)) |
Reimplemented in Tracking::myPredictor.
Definition at line 65 of file Predictor.cpp.
| void Tracking::Predictor::setCamViewVector | ( | TomGine::tgVector3 | v | ) | [inline] |
Set vector pointing from camera to object mean, to enable zooming.
Definition at line 43 of file Predictor.h.
| void Tracking::Predictor::setNoConvergence | ( | float | v | ) | [inline] |
Set the number of particles (in percent) which are voting for no convergence (for capturing fast movement)
Definition at line 46 of file Predictor.h.
| void Predictor::updateTime | ( | double | dTime | ) | [virtual] |
Updates time of prediction system for higher order motion model.
| dTime | Time since last frame |
Definition at line 189 of file Predictor.cpp.
float Tracking::Predictor::c_pred [protected] |
Definition at line 30 of file Predictor.h.
TomGine::tgVector3 Tracking::Predictor::m_cam_view [protected] |
Definition at line 34 of file Predictor.h.
double Tracking::Predictor::m_dTime [protected] |
Definition at line 27 of file Predictor.h.
float Tracking::Predictor::m_noConvergence [protected] |
Definition at line 32 of file Predictor.h.
float Tracking::Predictor::m_powTime [protected] |
Definition at line 28 of file Predictor.h.
float Tracking::Predictor::m_powTimeSteps [protected] |
Definition at line 29 of file Predictor.h.