Monday 13 April 2015

People are objects

Well I am back and I have been working hard on my dissertation. I have gotten the people detected to be stored as objects after a bit of an issue. Never having done much Python before this dissertation and no object orientated Python at that, I can up on a few issues. My first was treating it like Java and putting global variables at the top of the class file. This I later found out that these were shared by all the objects, so when modifying one object global variable I modified them all. This was resolved by initializing them in the __init__ which is the first method that is run when the object is created. This involved me putting self.var_name = value. The self lets it know that that variable belongs to only that instance of the object. This link really helped me, especially 9.3.5.

The second issue was checking all the objects to see if they were a new person or the same person object and just needed location updating. This was partially resolved by checking the location of the new detections and comparing them to the location of the people objects. This will later incorporate the Kalman filter, and will target in a set direction making it a more accurate verifier.

As can be seen here the Kalman filter is not starting at the centre of the people which needs to be worked on. This will make initial tracking more accurate rather than having to wait for it to align.

The blue Xs are the start location of the Kalman filter



My next lot of tasks to do is to add in the mean shift and cam shift to improve the tracking. This will help determine if there is still a person at a location as well as helping determine if new detections are accurate. As well as this I need to track the location of people exiting the scene. If they are disappearing along the edge of the scene then it can be assumed that they wandered off screen. If they disappear on screen or are not detected then you can increase the likely hood of something such as a door existing at that location. The same can be assumed if reappearing at the same location.

Another possibility that could be happening is that there is an obstacle obscuring the view of the person for an extended period of time.

No comments:

Post a Comment