4.54545

4.5 | 12 ratings Rate this file 184 Downloads (last 30 days) File Size: 12.49 MB File ID: #17960
image thumbnail

Particle Filter Color Tracker

by Sebastien Paris

 

11 Dec 2007 (Updated 13 Nov 2011)

Tracking an object in a video with a Color Particle Filter

| Watch this File

File Information
Description

A simple example demonstrating how to track an object with particle filter. Likelihood function is based on Bhattacharya distance of color histograms and gradient distributions

Please run mexme_pf_color_tracker to recompile mex-files on your own plateform.

Run the two demo files test_pf_colortracker and test_pf_colortracker2

IMPORTANT. Be sure than you "mex -setup" had been done before compiling sources

MATLAB release MATLAB 7.5 (R2007b)
Other requirements A C Compiler such MSVC/Intel CPP/GCC
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (46)
11 Dec 2007 Tom Pinkiewicz

The C files compiled okay but I get an error that function part_moment is undefined. Are you missing a file with this function?

12 Dec 2007 Sebastien PARIS

You are right. I have just update with the missing file. Thx you....

12 Dec 2007 Tom Pinkiewicz

It works now and it looks excellent. Well done!

02 Mar 2008 loi yii tien

How to recompile each mex files?

02 Mar 2008 loi yii tien

How to recompile each mex files? and i got error...

??? Invalid MEX-file 'C:\Program Files\MATLAB71\work\pf_colortracker\rgb2hsv_mex.dll': The specified procedure could not be found.

.

Error in ==> test_pf_colortracker at 202
im = rgb2hsv_mex(Z);

hope to hear u soon!

02 Mar 2008 loi yii tien

Actually i am doing the object tracking in video using neural network. Can you send me an example of it if you can do it. Thanks!

02 Mar 2008 Sébastien Paris

Please recompile with the following command :

mex -output rgb2hsv_mex.dll rgb2hsv_mex.c

03 Mar 2008 ophelka flowerfairy

to recompile simply use
mex filename.c

15 Apr 2008 li jackey

how to recompile mex files?when the file is compiled in VC platform,the problem is always that mex.h can't be found,how to deal with it ,please tell me quickly,thank you

05 May 2008 prabhakar raj

i want the code for tracking faces in an image sequence using particle filter,can u help me in this

28 Jun 2008 nauha jam

Thanks for program.I would ask about the LAB model of color image in matlab

09 Sep 2008 min hu

thanks for program.it is very good.

21 Oct 2008 XU FENGLIANG

thanks for you sharing

27 Oct 2008 David Norville

I'm having some trouble recompiling with the part_moment.c file. It says there is an undefinded reference to '_max'. Can you help me please.

29 Oct 2008 David Norville

Got it to work. Thanks

25 Nov 2008 Ravi Prakash

For all those laymen like me who couldn't get it to work in the first attempt. Type inside the MATLAB command window

> mex ellipse.c
> mex rgb2hsv_mex.c
> mex pdfcolor_ellipserand.c

In both files part_moment.c and particle_resampling.c at the top add the line
#define max(a,b) ( (a) >= (b) ? (a) : (b) )

Then
> mex part_moment.c
> mex particle_resampling.c

Finally to run
> test_pf_colortracker

Thanks Sebastien. FIGHT ON!!

26 Nov 2008 Sebastien Paris

Ok, I'll update with a mexmefirt.m file for mexfilers beginners

Thx all for comments/ratings

28 Nov 2008 Tedo Biresaw

Wow! what really a nice work.
I get it work.

08 Mar 2009 M

I get the following error on Windows Vista (64-bit) and MATLAB R2008b. Can anyone assist?

??? Error using ==> aviread at 76
Unable to locate decompressor to decompress video stream

Error in ==> test_pf_colortracker at 196
mov = aviread(video , offset_frame + 1);
 

PS: I tried installing CINEPAK, but it didnt work! :(

09 Mar 2009 Sebastien Paris

Ok, you can replace the aviread function with the new one 'mmreader' to read avi files.

17 Jun 2009 yasong guo

i have solve it now!thank you for your codes .wonderful!thank you!!!

18 Jul 2009 Fang-I Chu

can i ask if i want to track a moving object under grayscale, what is it different from color tracking?

 

19 Aug 2009 Janayna

did you use any paper to implement the particle filter?
Thank you

30 Aug 2009 Yong Zhao

thanks for you sharing, I'll study and discuss with all of you.

03 Sep 2009 Hong 4

I found a paper relates to this subject:
K Nummiaro, E Koller-Meier, L Van Gool, An adaptive color-based particle filter, Image and Vision Computing, 2003 - Elsevier

03 Sep 2009 Hong 4

I found a paper relates to this subject:
K Nummiaro, E Koller-Meier, L Van Gool, An adaptive color-based particle filter, Image and Vision Computing, 2003 - Elsevier

11 Jun 2010 Duy Nguyen

Thank for your sharing, Sebastien. I want to get more detail about this issue, can you give me reference for this ones.

13 Jun 2010 Duy Nguyen  
04 Jul 2010 tarun goel

Hi sir, it is indeed a nice work and thanx for sharing it. Could you please tell some refeence material where the meaning of variables can be understood as their names are of little help. Iwud be highly thankful.

25 Jan 2011 Kevin Murphy  
18 Mar 2011 tejaswini kar

sir can i get the reference material of the codes for my work.actually i am unable to understand it.is it possible that either the whole program can be written in matlab or written in c.why u have used both c an matlab. what is the advantage.

20 Mar 2011 Sebastien Paris

to kar: as we say in french "pour avoir le beurre et l'argent du beurre".... in other words, the easiness of matlab and the speed of C.

03 May 2011 Jake

Thank you for sharing, I just wondering did you pick a importance density in this program?

20 May 2011 oj

Dear sebastien I am unable to get the program in running condition... Even though I have replaced mmreader for aviread... still cudnt fix problem... help anyone..

21 May 2011 Sebastien Paris

Jake: here IS used here is independant of the current measure so ... q(x_k|x_{k-1},z_k) = p(x_k|x_{k-1}) here ...

21 May 2011 Sebastien Paris

oj: If I have time, I'll update with mmreader instead of the old (and depreciated) aviread

18 Jul 2011 Selva

Thanks for sharing dude..

16 Sep 2011 Chi Chin

I get the following error on Windows 7(64-bit) and MATLAB R2009b. Can anyone assist?

??? Error using ==> aviread at 76
Unable to locate decompressor to decompress video stream

Error in ==> test_pf_colortracker at 196
mov = aviread(video , offset_frame + 1);

anyone can help me?

16 Sep 2011 Sebastien Paris

Chi,

Maybe install a video codec pack such K-lite mega codec in your system. Regards,

16 Sep 2011 Chi Chin

Hi Sebastien,

Thanks for your prompt reply. I had installed the K-lite mega codec in my system but it still give me the same error :<

20 Sep 2011 Sathiyaraj Manoharan

Hi Sebastien:
I am new to this can you explain how to execute.I m getting error like C file is not found.I think that because of the mex compiler. how to install that with brief.Is it necessary to install VC++ 2008 express.Can I run it in Matlab2011.

21 Sep 2011 Sathiyaraj Manoharan

Can anyone explain me how to install the C compiler and compile the C files in MATLAB..

14 Dec 2011 zhao

My matlab7.0 can not find function 'mmreader'. If aviread is used,can tell me where should be replace in the files.
thanks

14 Dec 2011 zhao  
15 Dec 2011 Sebastien Paris

Zhao,

Instead of badly rating, please have the nominal configuration requiered.

15 Dec 2011 zhao

Hi Sebastien,i modified the files,and Create more problems. If i want to run the files in matlab7.0, can you sent the right files to me. My email:happyday.huihuang@gmail.com,thanks a lots.

Please login to add a comment or rating.
Updates
12 Dec 2007

Add missing file

27 Jul 2009

-Minor changes

28 Dec 2010

-Add Linux64 with GCC support

13 Nov 2011

-Add likelihood based on gradient distribution
-Use mmreader instead of aviread

Tag Activity for this File
Tag Applied By Date/Time
tutorial Sebastien Paris 22 Oct 2008 09:38:43
example Sebastien Paris 22 Oct 2008 09:38:43
particle filter bhattacharya distance Sebastien Paris 22 Oct 2008 09:38:43
object Sebastien Paris 22 Oct 2008 09:38:43
video Sebastien Paris 22 Oct 2008 09:38:43
particle filter Sebastien Paris 22 Oct 2008 09:38:43
example BAI 17 Mar 2009 03:54:44
tutorial BAI 17 Mar 2009 03:54:50
particle filter sethu bhattiprolu 16 Oct 2009 07:39:28
particle filter Randy 27 Dec 2009 14:59:15
image processing yuli zhang 16 Mar 2010 00:42:01
particle filter vinoth kumar 06 Jan 2011 07:23:22
example Tedo Biresaw 27 Apr 2011 06:17:25
image processing Tedo Biresaw 27 Apr 2011 06:17:30
example Abhishek 24 May 2011 10:12:48
image processing Abhishek 24 May 2011 10:12:51
example n hu 25 May 2011 04:42:43
example ZHANG 29 May 2011 01:22:59
example Hua 20 Jul 2011 15:48:00
particle filter amin amini 27 Jul 2011 17:08:27
particle filter bhattacharya distance fan kaibo 03 Oct 2011 04:21:36
example SEJUN 12 Oct 2011 06:01:08
example Sheida 02 Nov 2011 00:20:20
example Gavriil 16 Nov 2011 02:05:04
example Hu Zheng 24 Nov 2011 13:34:14
particle filter Ankur Udaykumar 07 Feb 2012 22:12:01
example Ankur Udaykumar 10 Feb 2012 18:15:10

Contact us at files@mathworks.com