44#ifndef __SAF_TRACKER_INTERNAL_H_INCLUDED__
45#define __SAF_TRACKER_INTERNAL_H_INCLUDED__
55#ifdef SAF_ENABLE_TRACKER_MODULE
65#define TRACKER3D_MAX_NUM_TARGETS ( 24 )
67#define TRACKER3D_MAX_NUM_EVENTS ( 24 )
69#define TRACKER3D_MAX_NUM_PARTICLES ( 100 )
82 struct {
float m0, m1, m2, m3, m4, m5; };
91 float p00, p01, p02, p03, p04, p05,
92 p10,
p11, p12, p13, p14, p15,
93 p20, p21, p22, p23, p24, p25,
94 p30, p31, p32, p33, p34, p35,
95 p40, p41, p42, p43, p44, p45,
96 p50, p51, p52, p53, p54, p55;
114#ifdef TRACKER_VERBOSE
121typedef struct _tracker3d
139#ifdef TRACKER_VERBOSE
Include header for SAF externals.
void * voidPtr
Void pointer (just to improve code readability when working with arrays of handles)
Particle filtering based 3D multi-target tracker (SAF_TRACKER_MODULE)
void tracker3d_update(void *const hT3d, float *Y, int Tinc)
Prediction update.
#define TRACKER3D_MAX_NUM_EVENTS
Maximum number of possible events during update.
void tracker3d_particleDestroy(void **phPart)
Destroys an instance of a particle / Monte-Carlo Sample.
float gamma_cdf(float x, float gam, float beta, float mu)
Cumulative density function of a Gamma distribution.
void kf_update6(void *const hUp6, float X[6], float P[6][6], float y[3], float H[3][6], float R[3][3], float X_out[6], float P_out[6][6], float *LH)
Kalman Filter update step.
void tracker3d_particleReset(void *hPart)
Resets a particle structure to defaults.
int categ_rnd(float *P, int len_P)
Draws samples from a given one dimensional discrete distribution.
void kf_update6_create(void **const phUp6)
Creates helper structure for kf_update6()
void tracker3d_particleCopy(void *hPart1, void *hPart2)
Copies particle structure "hPart1" into structure "hPart2".
void tracker3d_predict(void *const hT3d, int Tinc)
Prediction step.
void lti_disc(float *F, int len_N, int len_Q, float *opt_L, float *opt_Qc, float dt, float *A, float *Q)
LTI_DISC Discretize LTI ODE with Gaussian Noise.
int tracker3d_getMaxParticleIdx(void *const hT3d)
Returns the index of the most important particle.
void tracker3d_particleCreate(void **phPart, float W0, float dt)
Creates an instance of a particle / Monte-Carlo Sample.
void normalise_weights(voidPtr *SS, int NP)
Normalises the weights of the given particles.
float gauss_pdf3(void *const hUp6, float X[3], float M[3], float S[3][3])
Multivariate Gaussian PDF.
void * voidPtr
Void pointer (just to improve code readability when working with arrays of handles)
float eff_particles(voidPtr *SS, int NP)
Estimate the number of effective particles.
void kf_update6_destroy(void **const phUp6)
Destroys helper structure for kf_update6()
void kf_predict6(float M[6], float P[6][6], float A[6][6], float Q[6][6])
Perform Kalman Filter prediction step.
void resampstr(voidPtr *SS, int NP, int *s)
Stratified resampling - returns a new set of indices according to the probabilities P.
Main header for the utilities module (SAF_UTILITIES_MODULE)
static const double p11[19]
Table 1: Coefficients for Eqs.
Union struct for 3-D mean values.
Monte-Carlo Sample (particle) structure.
P66 * P
Current target variances; nTargets x ([6][6])
float dt
Elapsed time between each observation/measurement.
float W
Importance weight.
int * targetIDs
Unique ID assigned to each target; nTargets x 1.
float W0
PRIOR importance weight.
int nTargets
Number of targets being tracked.
int * Tcount
Time elapsed since birth of target (Tcount * dt); nTargets x 1.
float W_prev
Previous importance weight.
M6 * M
Current target means; nTargets x ([6])
Union struct for 3-D variance values.
User parameters for tracker3d.
Main structure for tracker3d.
int incrementTime
Number steps of "tpars.dt" to increment time by.
float W0
PRIOR importance weight.
tracker3d_config tpars
User parameters struct.
voidPtr * SS_resamp
Resampled particles; tpars.Np x 1.
voidPtr * SS
The particles; tpars.Np x 1.
void * hKF6
kf_update6 handle