Monday, January 23, 2006

Motion Detection

Finding background image by erasing moving objects...
Finding moving objects and drawing rectangles around them...

Motion detection is one of the most challenging and also the most exciting working area of computer vision. The most important point in motion detection is finding background image correctly.
If you find it truly than you can catch all moving objects easily. If you can't, then your program crates new moving objects by itself and makes you mad. (I know how it is:))
To find background image you should use voting system. What is voting system?
Voting system is giving vote to pixels which you think that can be part of background.
In my algorithm, program compares each image in order and finds same pixels. If these pixels are also in background image, it increases their vote by one. If they are not in background image then decreases each pixels' vote by one. If any pixel's vote becomes zero it changes background pixel with image's related pixel.
This method is working pretty good and quite successful for eliminating even slow moving objects.
I wrote a motion detection program in matlab by using this method. Before show you some images generated by my program; here are some hints:
  • use a median filter to eliminate noise created by cameras.
  • use object size filter to eliminate very small moving objects which causes mesh only.
  • work on grayscale images. This decreases your work. My all background images are grayscale. But after I found background, I showed moving objects on RGB images.

Here are some images:



6 comments:

MRINAL said...

plz send me the code at
desaimrinal@yahoo.com

MRINAL said...

plz send me the code at
desaimrinal@yahoo.com

Sunil Kumar Reddy said...

Can you please send me the code of motion detection in matlab to buddalasunil_vit@yahoo.com
Thank You if i get it.

hteksan said...

Sayın Baştürk Bu yapmış olduğunuz proje benim bitirme tezim daha yeni başladım matlab kodlarını benimle paylaşırsan cok mutlu olurum şimdiden tesekkürler
hteksan@gmail.com

Anonymous said...

Thanks to Mr. Tolga as I mailed him he sent the sample code to us. It was very hepfull since the code was written in a way that easy to understand.

Anonymous said...

mesothelioma support and information!
[url=http://www.mesothelioma-support.org/]mesothelioma support[/url]