Please, I will use this code to track the face of person how do I change the resampling function given that I used the intesection of HSV histogram as a function likelhood. Please help me. it is critical to know this. thanks a lot.

Hello!
I think that you used the exp() in the resampling function to convert the -Inf values of L() to zero. If you didn't convert these values, when you make Q, you will obtain a NaN values. Tahnks a lot for your cooperation.
If you are interested by the image processing and video processing we can work in cooperation. happy weekend.

thanks a lot,
really my problem is in the resampling task, when w e change the likelhood distance. I used the intersection between histogramme to determine the likelhood for each particle but in the resampling task. I think that you must change the first line of your programm exp(L-max(L)) by L-max(L). Thanks

Hi!
I want to fit a square a round a face of a person. I consider each particle as a square and I added the square orienatation caracteristic the system of mouvemnt. Thus, I have, (position,speed,orientation). My problem is when I compare the histogram of the reference model and each particle using the distance of Bhattacharya and I do the resampling task, the result is very bad. Thus, I think that it is due to the result comparaison. Therefore, I used your method by modelate the color by gaussian but the result is also very bad. Please, have you any idea? thanks a lot.

A and B are used for the calculation of log likelihood. This log likelihood is calculated under the assumption that RGB color of the object is observed with gaussian noise. But this assumption might not be true. Please think this is a toy to understand particle filter.

thank you for sharing code.My question is why do you use the formulaļ¼
A = -log(sqrt(2 * pi) * Xstd_rgb);
B = - 0.5 / (Xstd_rgb.^2);
to make the likelihood,which reasons was it based on?

Comment only