Introduction to video capture and
Motion Detection

Written by Joe Janson, updated May 22nd 2014
Project lead at Omega Unfold Inc

I have a motion detection project, what do I need to know?

webcam for motion detectionA motion detector system can give your PC eyes, letting it respond to external events by capturing images, or triggering actions. However, there are many different possible setups, not all of them useful to you. You need to carefully identify your needs, and then get tools that are good enough without overkill.

You'll require both hardware and software, and also advice because motion detection and video capture are still emerging technologies and might not be as "plug & play" as you would like.

Hopefully, the following will help you get started….

What does motion detection software do?

Motion detection software captures video from an input device and processes these video images in real-time to find differences between frames. How it responds to these differences depends on what you’ve programmed it to do.

This is usually associated with security systems, however, general purpose motion detection software like Zone Trigger is now available.
hot spot motion detection zones
Using motion detection Hot Spots for simple computer vision

General purpose motion detection software is intended for the ordinary users by providing simple tools to create all kinds of projects that would otherwise require costly custom hardware. For example, the following applications may give an idea of what such software can provide, at very low cost. These are often things that weren't possible before:
  • Make a home security system that record video and send emails with pictures upon detection.
  • Monitor the state of boxes on a shelf using a single standard camera rather than many specialized sensors.
  • Enhance interaction with clients with an interactive booth by using a multi-zone motion detection.
  • Achieve a new level of audience immersion by adding motion detection to an artistic installation.
  • Optimize flow through your store by monitoring traffic  through various sales areas.

Good general purpose motion detection software should let you determine exactly what kind of motion to look for and then permit a range of responses, e.g. taking pictures, recording videos or sending e-mail notifications. The best software should also be able to analyze the movement itself. Typical operations include:
  • Motion Detection: This is the simplest and most versatile technique. The software looks for any difference between frames by comparing pixel color and brightness without trying to identify anything. These differences can be caused by moving objects, lights on/off, shadows, and even vibrations.
  • Presence Detection: The software figures out is someone is present, but not moving, in front of the camera.
  • Flow Control: The software determines in which direction where people are travelling.
  • Pattern Matching: The software tries to match the input image to a reference image to figure out the state of certain objects.

What kinds of cameras work for motion detection?

USB cameras (“webcams”)
USB webcams
Usually called “webcams”, they are the quick solution for connecting a camera to your PC.  All you need is the supplied driver software, so you can be up and running in minutes. Better yet, USB cameras are Direct-X compatible and work with almost any video capture software.

However, there are some snags. Although you can connect many webcams to a single computer, they are more or less limited to arm’s reach because a USB cable is not designed for long distance.

More importantly, USB cameras vary widely in their quality. Cheap ones don’t always provide clear or accurate images. Artefacts (visible defects) include motion blur and the oddness caused by compressing the image before sending it to your PC. Some also perform badly in poor lighting conditions, providing grainy images and low frame rate.

The good news is that some good quality USB cameras have a high resolution and a fast frame rate video. Some even come with zoom lens (note that an automatic variable focus lens is not desirable as it may introduce movement when auto-focusing). Resolution varies greatly depending on the model, from standard 320x240 to "doesn't fit the screen". Don't let the amount of pixels be your only guide for judging the quality of a camera; the price of the camera is your first clue about the quality of its images.

3D cameras
microsoft kinect cameraThe Microsoft Kinect is probably the most famous 3D camera, but there are others, such as the SoftKinetic DepthSense. Zone Trigger has a special mode to support 3D cameras. The software will detect not only if something is moving within a certain zone, but also how far away from the camera it should check for motion.

Most 3D cameras are very reliable because they only use infra-red, therefore visible light will not interfere with the motion detection. This is a HUGE advantage. One of the downsides is that most 3D cameras cannot see very far ahead, thus they cannot be used inevery situation. However, they usually have both a 3D and a Color sensor embedded, and it is possible to use both at the same time.

DV cameras (“camcorders”)
Firewire connections for camcordersThe DV stands for “Digital Video”. Often called “camcorders”, these provide awesome image quality and a fast frame-rate. They are almost always equipped with a zoom lens,  and may have desirable features such as night-vision. They are compatible with Direct-X, they should work with most any recent video capture software. 

Like USB cameras, DV cameras are connected to your PC with limited cable length, this time Fire-Wire (IEEE 1394). Note that some camcorders can be connected with a USB connector and may have webcam drivers available. Most new camcorders can also be connected to a PC using a HDMI connector , if your PC is equipped with a HDMI capture adapter.

IP cameras (“network cameras”)
RJ45 connections for IP cams
Often known as “network cameras”, they are more complex remote-controlled devices that connect to a network instead of directly to your PC. Some can supply very high-resolution images, often with superior image quality, however the price difference is very steep between a normal IP cam and a hi-resolution one.

IP cameras are not physically connected to your PC since they can broadcast video over a local network (CCTV) or the Internet. Most have embedded web-servers, and some have internal motion detection systems. They are now usually wireless and will connect directly to your Wifi network.

Usually lacking Direct-X drivers, they rarely work with motion detection software unless it specifically supports them. I usually recommend Axis IP cameras and Foscam as they use a standard http protocol, and some models even have optional Direct-X windows drivers for optimal compatibility. Zone Trigger has been tested with Axis and Foscam network cameras (but not Foscam H264 models).

Analogue cameras
RCA connections for analog camerasAnalogue cameras belong to a whole different world. They are fast, provide images with no compression, no artefacts, little motion blur, and use any cable length you need. They may be equipped with a zoom lens or infra-red vision. Some are even “wireless” (but watch the reception quality, since local interference might compromise motion detection). 

The downside of analogue cameras is that they are complicated to connect, and they are resource-intensive. Connecting one to a PC requires video capture hardware. Many analogue cameras produce interlaced images, requiring special, often 3rd party software filters, which may introduce artefacts or reduce picture quality. Overall, using an analogue camera requires a more powerful computer than a standard USB camera would.

Progressive and Interlaced video image examples

The compatibility of the motion detection software is dependent on the video capture device. Here are a few capture device types:

  • TV capture cards: These turn your PC into a TV tuner and DVR, and they usually have inputs for external devices such as cameras, and often have HDMI input. Most are compatible with Direct-X, but not all software has options to control channels and inputs. Webcam Zone Trigger can use them.
TV capture card, used for connecting a camera to a computer
  • USB video capture dongles: These are easy-to-use connectors enabling you to plug your analogue camera into a USB port. This is great because they are portable, can be used on laptops, and you can have several connected to the same PC. As for TV capture cards, not all software will be able to use them properly. Make sure to select the correct signal from the settings (PAL / NTSC)  Webcam Zone Trigger can use them.
USB video capture dongle, this is the EasyCap device.
  • Multi-channel cards: These support between 4 and 16 cameras at the time, and vary in quality and price. Unfortunately, at present there is no standard for software compatibility. They are usually not Direct-X compatible, meaning that you are probably stuck with the bundled software.
Multi-channel video capture card

What are good conditions for motion detection?

In the best conditions you must have the following:
  • A well fixed camera - stability is key if you want to isolate motion.
  • Stable light, no flickering.
  • Contrasting background - white objects against white background might not produce good results.
  • Reasonable camera frame rate and resolution. It goes without saying that if you want to detect a race car, you'll need a fast camera. The motion detection process can only be as good as the input images. If your motion detection needs are simple, than a low end webcam might be sufficient.

What is Zone Trigger, and what can it bring to my project?

Webcam Zone Trigger motion detection softwareThe Zone Trigger software series is all about enabling anyone to incorporate motion or sound detection in their custom projects. This software can be downloaded and installed in less than a minute, and you can setup a custom system in just a few more.

On detecting motion, Zone Trigger can do a multitude of tasks, such as play sounds, run programs or commands, take control of other software or hardware, send email and files over the internet. Plus it has many extra features such as archive services and a built in HTTP server for remote viewing.

Zone Trigger can save you time, money and effort:
  • No technical skills required, no development time needed.
  • No costly or complicated custom hardware to install.
  • Technical support and advice to get your projects done and operating.
  • One-stop solution for most interaction and automation scenarios.
Hopefully this information has shed some light for you on the various technical aspects of motion detection and video capture.

Good luck with your project!

References - Motion Detection software download site, download a trial copy of the Zone Trigger software. - Network cameras - Network cameras

If you have questions about the Zone Trigger products or if you require consultation and advice on your computer vision projects, please contact Omega Unfold's technical support:

More articles...
Introduction to motion detection and video capture

How to setup a home HTTP server

3 things to check for better motion detection

Interactive Digital Signage How-To

Troubleshooting Webcams

Using Zone Trigger software with the microsoft Kinect

USB bandwidth and connection issues

High-framerate webcams (60-120fps+)

Support  |  Site Map   |  Privacy Policy  |  Omega Unfold, 2014