Re: [Bayes++] Using Bayes++ with Player/Stage
Brought to you by:
mistevens
From: Michael S. <m-s...@ly...> - 2005-01-10 07:18:18
|
Hello Emmanuel, > > I'm working on object tracking using particle > filtering method by simulations on Player/Stage. > > Right now, I'm at a total loss on how to use Bayes++ > to > do tracking in Player/Stage. Please advice me. This is rather a general question! I don't think I can give you a full answer regarding object tracking with particle filters, it is something worthy of a a PhD topic! First it is worth noting, that particle filters are not always the best solution in object tracking. They are only appropriate and necessary when your problem inherently result in complex proability distributions. Highly non linear systems or multi-modal likelihoods are usually good candidates. That said the PV example in Bayes++ is a good starting point for a tracker. It already implements a Position and Velocity tracker in 1D. It can easily be converted to use a particle filter. I have attached a version that does this. There are only a few changes to the original linear filter version. Firstly the Scheme used changes so we have: // Choose Filtering Scheme to use typedef SIR_kalman_scheme FilterScheme; instead of // Choose Filtering Scheme to use typedef UD_scheme FilterScheme; A particle filter and in this case the SIR_scheme need an observe model that provides the Likelihood function. Previously the model was specified with a linearised uncorrelated additive noise model thus: class PVobserve : public Linrz_uncorrelated_observe_model In Bayes++ this can automatically be generalised and the Likelihood function computed using a model from "model.hpp" /* * Position Observation model * Linear observation is addative uncorrelated model */ class PVobserve : public General_LzUnAd_observe_model Similarly the predict model must be able to sample from a distribution for a particle filter. Therefore the original predict model changes from class PVpredict : public Linear_predict_model to /* * Prediction model * Sample from a Linear prediction with additive noise model */ class PVpredict : public Sampled_LiInAd_predict_model The only other requirement of the particle filter is a good source of random numbers. This is easily provided in Bayes++ be a seperate class which uses the Boost Random library for this purpose. The filters in the example are then simply constructed with arguments specifying the required number of particles and the random functions. FilterScheme f1(NX,1000,rnd); Bayes++ is quick even with 10s of millons of particles! Hope this gets you started, Michael -- ___________________________________ Michael Stevens Systems Engineering Navigation Systems, Estimation and Bayesian Filtering http://bayesclasses.sf.net ___________________________________ |