Multi state particle filter [closed]
Hi, I have a particle filter with state vector as(xposition, yposiiton, width). I want to modify the particle filter to a multistate particle filter where the state vector is (xposition, yposiiton, width,pose angle). Here the xposition, yposition and width are continuous variables and pose angle is a discrete variable.
How can I modify the code to make the state vector a 4D and do the tracking?
I do not see any code here.
I will try to put in words. 1. A particle filter which is used for object tracking has a state vector of the form (x,y,width,height) where x and y denotes the position of the object and width and height defines the object size 2. Tracking happens by finding the observation model in each frame 3. Now I want to modify the particle filter according to this paper http://www.idiap.ch/~odobez/publicati... so that I can increase the pose recognition accuracy.
According to this paper, the state vector is of the form (x,y,width,height,pose). I wanted to implement this to estimate the pose of a person.
All that I have is a c++ code for object tracking using particle filter. Now I wanted it to modify for this problem.
just put it on some pastebin, and let me do it ;)
for (int p = 0; p < partn; p++) {
oArr[p].x = pArr[p].x ; oArr[p].y = pArr[p].y; oArr[p].scale = pArr[p].scale; oArr[p].dx=pArr[p].dx; oArr[p].dy=pArr[p].dy; oArr[p].ds=pArr[p].ds; //assign new position and scale
}
//select the particle with greater weight particle getBest(particle* pArr,int partn) { particle part; part = pArr[0]; for(int k=1; k < partn; k++) { if(pArr[k].w > part.w) { part = pArr[k]; } } return part; } particle* resampleParticles(particle* pArr,int partn) { int pNum; int m=0,i;
return newArr}
void sortParticles(particle* pArr, int partn) { particle temp; bool swapped; do { swapped = false; for(int p=1; p < partn; p++) { temp = pArr[p]; if(pArr[p].w > pArr[p-1].w) { pArr[p] = pArr[p-1]; pArr[p-1] = temp; swapped = true; } } } while(swapped); }