Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

Area Based Motion Detection- Boss Watcher

3.00/5 (11 votes)
29 Mar 2007CPOL 1   3K  
Detect and alert according to predefined areas in motion pictures - Alert when somebody passes the door, etc.

This piece of application is a union of CodeProject articles:

Motion detection Algorithms Andrew Kirillov
Owner Drawn Resizable control Ray Cassick

Thanks to the authors of these articles. Below is what this app does:

Screenshot - article3.jpg

Introduction

Working in artificial lighted, lifted ceiling, ice air conditioned IT office departments gives me a creepy feeling of being manipulated and watched from behind. Any way one should support it behind. That is why I tried to write this application. But it can also be used for alerting when there is a motion in a special area.

Background

App uses the optimized motion detection algorithm by Andrew to alert (beep), jumps pixels defined by the user.

Usage

Put your camera where suitable and by green rectangle, point where any motion will be rejected for measure, also highly sensitive area by red rectangle. App beeps when overall motion is higher than the sensitivity.

Advices

Change the below lines if you want to do something different in MotionDetector3Optimized.cs:

C#
if (MainForm.vulRatio>0 && (diffCounter>(height*width/(100/MainForm.vulRatio ))))
{
System.Media.SystemSounds.Beep.Play() ;
}

Change the below lines if you want to process only sensitive area in MotionDetector3Optimized.cs:

C#
if ((j > ns1 && j < ns2) && (i > ns3 && i < ns4))
{
currentFrameDilatated[k] = 0;
}

How to do it is your puzzle. ;)

History

  • 30th March, 2007: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)