Thursday 26 March 2015

Kalman filter pain


So over the past weeks I have been having some issues trying to get the Kalman filter to work to predict location of the people in the scene. This is going to be used to determine if they are in scene but occluded so still need to count them.

Several problems I was having involved everywhere I looked the tutorials told me to use something which wasn't in the OpenCV version I had or wasn't recognised. As such I was upgraded OpenCV to 2.4.11 rather than my current
version, 2.4.10.

Upgrading OpenCV was more of an issue than expected and had a few issues with the building. My first issue was I ran out of space on my laptop.

Turns out issue I was having was with using cv2 not cv which I just thought the way the examples were named. So after importing cv2.cv as cv I managed to get the Kalman filter working. Now I can start using it to determine where people are heading. First I need to get it so it stays on one person as HoG(Histogram of orientated gradients) sometimes picks a different person to find first.

 As well as trying to get the Kalman filter working I also did some tests to determine best moving average background subtraction to use. As well as this I calculated the time for completion on a set of 795 images, my PETs 2009 s2l1 data set. Results can be seen in the graphs below.



Compared moving average bg subtraction with photo shopped image using technique from here





I am still working on trying to get a outline of a person for my ROI(Region of interest) rather than a tight box to reduce the errors that are thrown. I am currently very close to getting this working but needs a few more tweaks and should be good.

A bit of house cleaning was in order as I had a few Python files in my directory that needed removing. It still needs a bit of a clean but it is much easier to navigate now.


 When everything is implemented properly then I can start work on different combinations of detection and see which combinations are the most accurate and the fastest. I can try this on other data sets as well to see how well they preform under different circumstances.

With the features implemented I can also catch up on my tests for them. As well as cleaning up my code with more comments and better layout.

Hopefully the next lot of stuff to do after Kalman filter will be a little less frustrating.

No comments:

Post a Comment