2004 5
IP TCP/IP PC OS µclinux MPEG4 Blackfin DSP MPEG4 IP UDP Winsock I/O DirectShow Filter DirectShow MPEG4 µclinux TCP/IP IP COM, DirectShow I
Abstract The techniques of digital video processing, transferring and controlling have been developing quickly these years. They make the digital video surveillance possible to use computer processing, digital video compressing and video data streaming techniques to develop a versatile surveillance system. It becomes the trend to combine IP networking, embedded system and multimedia techniques into the modern video surveillance system, and make the system flexible, proficient, extensible and robust. In the dissertation, the author discuss the design and implementation of a digital video surveillance system based on an embedded terminal. The terminal of the surveillance system is designed on an embedded platform. It integrates all the function needed by a terminal into one embedded board, which uses ethernet as its transfer media, and implements a TCP/IP protocol stack. Compared with other systems based on PC or industrial controlling computer, the embedded architecture has more advantages, such as lower cost and power consumption, easier to assembling and maintaining, more stability and robustness, etc. The author discusses two design schemes in this dissertation, one is based on single task system, the other based on embedded OS(µClinux). The system uses MPEG4 protocol to coding its video data. To make the MPEG4 coder less computation complexity and easier to run on the ADSP-BF533 chip, the author optimized the algorithm of MPEG4 coding. The methods used by the author are Zero Block Detecting and Preprocessing of Motion Estimation, which effectively reduce the computation complexity of the coding system. Based on this optimization, the embedded surveillance terminal implement realtime video coding. The data transferring technique used by the system is IP multicasting and overlapped I/O modal of Winsock. The whole system performs well under this implementation. A Group- Managing Server is designed to control and manage multiple multicasting groups and multiuser accessing. The dissertation also presents the design of a source DirectShow filter, which is used on the surveillance center end to receive and decode the stream, and show the video image. Using the DirectShow architecture, the whole software system can be more modularized and facilitates the frontend developing. Key Words: Video Surveillance, MPEG4, Embedded System, TCP/IP stack, IP Multicast, COM, DirectShow II
I ABSTRACT II 1 1.1................................ 1 1.1.1.......................... 1 1.1.2.......................... 2 1.1.3..................... 2 1.2...................... 4 1.3................................. 4 5 2.1............................ 5 2.2 PC............................. 5 2.3................................ 6 2.3.1 LAN....................... 6 2.3.2 Internet...................... 7 2.4.............................. 8 10 3.1.............................. 10 3.1.1 Blackfin........................... 10 3.1.2...................... 10 3.2............................ 12 3.2.1.............................. 12 3.2.2................... 12 3.3 OS.............................. 14 3.3.1 µclinux............................... 14 3.3.2 µclinux........................... 15 3.3.3 µclinux........................... 17 III
3.3.4 µclinux TCP/IP........................ 19 3.3.4.1 µclinux.................. 19 3.3.4.2 µclinux skbuff......... 20 3.3.4.3 µclinux............ 23 MPEG4 26 4.1 MPEG4................................... 26 4.1.1 MPEG4............................ 26 4.1.2 MPEG4.................... 28 4.1.3 MPEG4........................... 28 4.2 MPEG4.............................. 29 4.3 Blackfin.......................... 30 4.3.1......................... 30 4.3.1.1 DCT...................... 30 4.3.1.2..................... 30 4.3.2.......................... 32 4.3.2.1......................... 32 4.3.2.2....................... 33 35 5.1 IP.................................... 35 5.1.1 IP......................... 35 5.1.2 IP......................... 35 5.1.2.1..................... 35 5.1.2.2 IP..................... 36 5.1.2.3 InternetIGMP................... 37 5.2 Winsock2...................... 39 5.2.1 Winsock............................... 39 5.2.2 Windows...................... 40 5.2.3...................... 41 5.2.4 I/O......................... 42 5.3......................... 44 5.3.1....................... 44 5.3.2...................... 45 IV
47 6.1...................... 47 6.2 DirectShow............................... 47 6.2.1 COM.............................. 47 6.2.2 DirectShow.......................... 49 6.2.2.1 DirectShow........................ 49 6.2.2.2 DirectShow.................... 50 6.2.3 Filter Graph......................... 51 6.3 DirectShow.................... 53 6.3.1 DirectShowGraph.................. 53 6.3.2 Filter....................... 53 57 7.1..................................... 57 7.2..................................... 58 59 61 A 62 64 V
1.1 911 SARS 1.1.1 PC 1
1.1.2 / 1.1.3 PC Post-PC CPU OS 21 2
1997 (DARPA) VSAM [24] (Video Surveillance and Monitoring) IEEE 1998 International Journal 0f Computer Vision IEEE Trans On Pattern Analysis and Machine Intelligence 2000 2003 12 3
1.2 TCP/IP µclinux MPEG4 DirectShow Blackfin DSP MPEG4 TCP/IP DirectShow 1.3 1.1 1.1 MPEG4 DirectShow 4
2.1 [1 3] 1 1000m 2 3 2.2 PC PC 5
2.1 [3] 2.2 PC 2.3 2.3.1 LAN PC 2.3 6
2.3 LAN 2.3.2 Internet 2.4 Internet 7
2.4 Internet 2.4 Internet 2.5 LAN 100M Multicast Internet 8
2.5 1. 2. 3. MCU 4. DirectShow 5. 6. MPEG4 25 fps 9
OS CPU TCP/IP OS 3.1 3.1.1 Blackfin Analog Devices, Inc. 2003 3 Blackfin [4] DSP ADSP-BF533 600MHz1.2GMACS ADSP-BF531 300MHz/600MMACS Blackfin ADI Intel MSA DSPMCU µclinux ThreadX Nucleus Blackfin 32 RISC-like 16 MAC Blackfin D1/VGA Blackfin MPEG-4 H.264 Windows Media BF533 CPU MPEG4 3.1.2 [5] 3.1 ADSP-BF533 MPEG4 ADSP-BF533 600MHz 10