Had a moment of curiosity about AI and wondered if I could write a simple motion capture program. This is what I came up with. It uses the Aforge Motion Detection library.
The motion capture library works by grey scaling each frame and then superimposing it onto the previous frame and calculating the difference in white space. When the sensitivity slider is adjusted it is adjusting the amount of white space before firing a function. I also added some extra features like capturing images on detection in the settings panel so this could be used as a simple alert system for the home.