CURRENT ISSUE
Contests
Feature Article
|
|
Issue #203 June 2007
Video-Based Motion Sensor
Third Prize Atmel AVR Design Contest 2006
by Naubert Aparicio
Start | System Overview | System Design | Hardware Design | Software Design | Sources & PDF
SYSTEM DESIGN
The motion-detection algorithm is based on the difference in brightness between the corresponding blocks of two consecutive, compressed frames. If the difference exceeds your defined threshold, then motion is reported at the block and it is flagged in the 12 × 15 matrix. Most of the motion sensor’s major components are involved in compressing the video signal (see Figure 2). To compress the video into 12 × 15 blocks, every video line must be divided into twelve 4.3-µs segments. The luminance of the video signal is then averaged into each of the segments through an analog integrator. The integrator sums the voltage of the video signals in each 4.3-µs period, creating a value that is proportional to the average of the segment’s brightness. Analog voltage is converted to digital with a fast ADC. Before integrating the signal, the inverter and clamper circuits prepare it to fit in the ADC’s range. After the signal has been converted to digital, the firmware vertically averages each of the 12 segment values into 15 groups to form a 12 × 15 block frame. Because this averaging process uses most of the available CPU, it is only performed while the video even fields are analyzed. During the odd fields, the software performs the motion-detection algorithm. It will still follow the video signal in the even fields because the video highlighting requires output in both fields.
![]() |
| Figure 2—This block diagram shows the major components of the sensor and analog video signal processing. An inverter and clamper are used to fix the signal. After the integrator, every one of the 12 averaged line segments are in the 1- to 2-V range of the ADC. |
|
