Real-Time Video Analysis on an Embedded Smart Camera for Traffic Surveillance Presenter: Yu-Wei Fan Outline • Introduction • System Architecture – Hardware – Software • Algorithm – Stationary Vehicle Detection • Algorithm Mapping – External memory access – Data transfer – Number format issues • Computing Performance Introduction Traffic surveillance consider about: • Real time. • Limited resources such like memory and power. The system include: • • • • CMOS image sensor Performs high-level video analysis Compresses the video stream using MPEG-4 Transfers the compressed data via an IP-based network to a base station Outline • Introduction • System Architecture – Hardware – Software • Algorithm – Stationary Vehicle Detection • Algorithm Mapping – External memory access – Data transfer – Number format issues • Computing Performance Hardware Hardware 1. Video Sensor: LM-9618 CMOS sensor 2. Processing Unit : A rough estimation results in 10 GIPS computing performance. TMS320C6415 DSPs (600 MHz) 3.Communications Unit: Intel XScale IXP425 processor Software • DSPs: The DSP/BIOS real-time operating system operates the DSPs. • Xscale: Linux (Kernel 2.6.8.1) operates the network processor, allowing access to a broad variety of open source software modules. Outline • Introduction • System Architecture – Hardware – Software • Algorithm – Stationary Vehicle Detection • Algorithm Mapping – External memory access – Data transfer – Number format issues • Computing Performance Stationary Vehicle Detection Requirements: 1. A stationary camera position 2. Pretty static ambient light conditions Stationary Vehicle Detection Algorithm: 1. The statistics of the pixel’s intensity is computed and stored in the observation distribution (OD) matrix of size n × m. 2. The OD values are used to adapt the values of the background model (BG). Typically : α=0.1 a=1 3. The algorithm identifies long-term intensity changes between the BG and the OD distribution. 4. If a connected component exceeds a predefined area a stationary vehicle has been identified. Outline • Introduction • System Architecture – Hardware – Software • Algorithm – Stationary Vehicle Detection • Algorithm Mapping – External memory access – Data transfer – Number format issues • Computing Performance External memory access • Excessive access to external memory is a major source for poor performance on embedded DSP architectures. • In many high-level languages memory management is hidden from the programmer. External memory access Consider the example: For image data at full PAL resolution (720 × 576, 8-bit pixels), this results in a total of 7.12 MB of transferred data. The poor performance is poor. External memory access Image-based vs. pixel-based The transferred data is reduced to 2.47 MB Data transfer • Direct memory access (DMA) to improve the memory transfer between the external memory and processor. • A regular data access pattern is an important precondition for effective DMA. • Use “ping-pong” buffers. Number format issues • Memory is a crucial resource in embedded systems. Especially, internal memory has to be handled very carefully. • Parallelism can be improved by exploiting packed-data processing capabilities of current DSPs. Outline • Introduction • System Architecture – Hardware – Software • Algorithm – Stationary Vehicle Detection • Algorithm Mapping – External memory access – Data transfer – Number format issues • Computing Performance Computing Performance 1. SVD algorithm in Matlab 6.1R12 with 2.4 GHz Pentium 4 desktop computer. 2. C++ implementation directly derive from the SVD Matlab code. 3. Use algorithm mapping tactics.