Predictor.h
Go to the documentation of this file.
00001 
00010 #ifndef __PREDICTOR_H__
00011 #define __PREDICTOR_H__
00012 
00013 #include <blort/Tracker/headers.h>
00014 #include <blort/Tracker/Distribution.h>
00015 #include <blort/TomGine/tgVector3.h>
00016 #include <blort/Tracker/Timer.h>
00017 
00018 namespace Tracking{
00019 
00020 #define GAUSS  0
00021 #define NORMAL 1
00022 
00024 class Predictor
00025 {
00026 protected:
00027         double m_dTime;
00028         float m_powTime;
00029         float m_powTimeSteps;
00030         float c_pred;
00031         
00032         float m_noConvergence;
00033         
00034         TomGine::tgVector3 m_cam_view;
00035         
00036         float noise(float sigma, unsigned int type=GAUSS);
00037         Particle genNoise(float sigma, Particle pConstraint, unsigned int type=GAUSS);
00038 
00039 public:
00040         Predictor();
00041         
00043         void setCamViewVector(TomGine::tgVector3 v){ m_cam_view = v; m_cam_view.normalize(); }
00044         
00046         void setNoConvergence(float v){ if(v>=0.0f && v<=1.0f) m_noConvergence = v; }
00047         
00054         virtual void sampleFromGaussian(Distribution& d, int num_particles, Particle mean, Particle variance, float sigma=1.0);
00055         
00060         virtual void movePredicted(const TomGine::tgPose& poseIn, TomGine::tgPose& poseOut, float &c);
00061         
00066         virtual void resample(Distribution& d, int num_particles, Particle variance, bool useMotion=true);
00067         
00073         virtual void sample(Distribution& d, int num_particles, Particle mean, Particle variance);
00074         
00077         virtual void updateTime(double dTime);
00078         
00079 };
00080 
00081 } /* namespace Tracking */
00082  
00083  #endif


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Thu Jan 2 2014 11:38:25