Comparing bitmap images for differences?

Dave Johnston johnsto at gmail.com
Thu May 3 08:15:52 EDT 2007


On May 2, 10:36 am, "lanwrang... at gmail.com" <lanwrang... at gmail.com>
wrote:
> Thanks for the tip for an algorithm - I can see how that could work
> really nicely (and it gives me some ideas for other things, too!)
> Thanks also for the link to the OpenCV bindings.  I'll give 'em a try
> and see what happens.

I did similar stuff for a project at Uni, but for tracking
pedestrians... in (eurgh) Java.
Tad boring, but might help a little bit: http://uni.johnsto.co.uk/crowd/

Unfortunately it only got tested on pre-recorded feeds, not live ones.
The background removal was fun. I think I ended up getting the
background by converting every 5th frame to grayscale, and calculating
the median for each pixel position across the sample. A couple filters
to remove tiny 1 or 2 pixel specks of noise, and then went onto blob
detection for identifying people and tracking their movement across
the entire video.

The same filtering in numpy should be really quite fast indeed!




More information about the Python-list mailing list