Monday 23 February 2015

Video and XML fun

This is only going to be a short over view of what I was up to over the weekend as there was a bit of time limitation with what I was up to. As I will now explain.

So over the weekend I was working on getting video up of PETS 2009 with HoG(Histogram of oriented gradients), moving average of HoG and ground truth. My first issue came when I noticed that the ground truth I was using was not accurate and missing out counting people that were in the scene. As I had trouble finding other ground truths for S2L1 scene and other scenes I created my own xml ground truth generator. This goes through the images one by one and the user can then enter the number of people in the scene. This then creates an xml document with the ground truth the user enters for the scene. This makes creating ground truth for future scenes that I can not find ground truths for a lot easier. I can then check through this and compare to the results of HoG and the moving average.

Once this was implemented then I had to generate a video displaying this information. This originally took a long time of close to an hour for 794 images which was was too long. I then reduced the number of frames to take down to 120 this meant it was a lot quicker. Then I had to turn the images into a video, originally I tried turning them straight into a .mp4 but took to long and crashed laptop several times. To overcome this I converted them to a .gif and then turned the .gif into a .mp4. This was still time consuming but more stable. I did this using the following commands.


convert -delay 30 -loop 0 *.jpg result.gif - using this source

ffmpeg -f gif -i infile.gif outfile.mp4 - using this source

Once I got them done I joined them together using the following command.

MP4Box -cat s2f.mp4 -cat s2ff.mp4 -cat s6f.mp4 -cat s6ff.mp4 -new all.mp4
 - That I found here


Now the video was done I uploaded to YouTube with a brief description. The video can be found here.

I am now looking at implementing blob tracking on the videos then move onto dealing with occlusions which will help me more accurately count people in a crowd. First I need to create some tests for the stuff I have.

No comments:

Post a Comment