Sunday 8 May 2011

Two things for reliable motion detection

You are using webcams for a computer vision project. Your project may require good image quality if you are saving the live images, but also you may not care about the quality of the images as long as you get reliable motion detection. Here are the two most important things you can do to get reliable motion detection...

Light

Most webcams, even good models, take a dramatic performance hit in low light. They spend more time exposing for each frame, which reduces the amount of frame per seconds sent to the computer. It will also increase the voltage in the video sensor to make it more sensitive, which has the side-effect of producing noisy images (the live video will be grainy). Still, this may not be enough to get clear images; if the scene if not sufficiently light, the camera will provide a noisy, dark gray/brown-ish image.

Low-contrast, noisy images make for a very poor start for motion detection. The processing can only be as good as the source images.

Good Light / Low Light

You don't need to light up the whole scene, just the area of interest. The keyword here is contrast. For the software to see motion, there must be a clearly visible change on the image.

Hot Spots

Don't run the motion detection on the whole image, especially if the image is noisy. Target a strategic zone on the image, the smaller the better. This way you can set the motion detection hot spot's sensitivity to be just right.

Pick a zone on the image that is sufficiently light, and that will yield a clear contrast when the motion occurs.

Put the Hot Spot over a strategic zone

The weird thing is that very few motion detection software use hot spots. Here is a tip: check out Webcam Zone Trigger, download the webcam software here.