Research on remote video surveillance system based on ARM platform

Source: Internet
Author: User
Research on remote video surveillance system based on ARM platform The Research of Remote Video Monitor System Based on the armWang Xian, Liu jingquan Dai Yu Source: Micro-Computer Information (School of Communication and control engineering, Jiangnan University, Wuxi 214122, China) SummaryThis paper introduces the overall design scheme of a remote video surveillance system based on the S3C2440 [1] hardware platform and the embedded Linux operating system [2, the overall structure of the system and the features of each part are elaborated in detail. The realization of Video Acquisition and MPEG-4 compression is analyzed in detail, and the software implementation method of key functions is given, compared with traditional video surveillance systems, this solution has the advantages of small size, low cost, stability and reliability. KeywordsVideo collection; MPEG-4 coding; embedded Linux; driver; AbstractA scheme of the long-distance monitor and control system based on S3C2440 hardware platform and embedded Linux is introduced, and the framework and each functions is detailedly expatiated, also the video data collection and MPEG-4 of Data coding is detailedly analyzed, besides the software of key functions is givened, the scheme features small volume, low cost and stabilization by comparing with the traditional video system. Key WordsVideo collection; MPEG-4 coding; embedded Linux; drviers IntroductionThe video surveillance system is an integral part of the security defense system. It is a comprehensive system with strong defense capabilities. Nowadays, the monitoring system has entered the digital and network era, that is, when the video is output from the front-end image collection device, it is a digital signal, and the network as the transmission media, based on TCP/IP protocol, stream Media technology is used to achieve multiplexing transmission of videos on the Internet. The use of embedded systems to achieve remote video monitoring technology is in line with the characteristics of network digitalization and has an important practical significance for public security, security, and other industries. Video Monitoring systems generally adopt the form of PC-based platform + video acquisition card. This solution is large in size and costly, making it difficult to implement in long distance and multi-point systems. This design uses Samsung's S3C2440 [1] hardware platform (CPU chip contains Video Acquisition Interface), the software platform is the Linux-2.4.20 operating system kernel, thanks to the open features of the Linux operating system, excellent network support performance, and modular structure, the system needs to be better met. 1. System Hardware DesignThe system consists of video collection and transmission. Embedded Processor, CMOS image sensor, memory, Ethernet interface, serial port, and power management circuit. The embedded processor is a 16/32-bit CPU (type: S3C2440) based on the ARM920T kernel of Samsung Korea. It is mainly applicable to cost-effective and low-power applications. To process image data, the CPU can work at 400 MHz. Resources of S3C2440 include LCD controller, SDRAM Controller, camera interface, 3-way serial interface, IIC Bus Interface, USB interface, and touch screen interface. On the basis of abundant processor resources, related extensions are also carried out, with 32 M Flash ROM and 256 mb sdram configured. Under the control of an embedded processor, the data collected by the CMOS image sensor (On-Chip) is copied to the SDRAM after being interrupted due to frame synchronization signals, after the MPEG-4 code, the network port is sent to the remote monitoring center for display, system diagram 1 shows. 1.1 The design of the image sensor interface circuit in the video acquisition module is a key part of the hardware design. How to effectively collect data is also a key issue of the system. The video acquisition module uses an OV9640 image sensor [3]. It is a high-integration, high-resolution (1280*960) CMOS sensor chip. It integrates a timing circuit and analog signal processing circuit, digital signal processing circuit. The chip supports RGB (), YUV (), and ycrcb () data output formats. It has 138 built-in Device Control registers with addresses ranging from 0x00 to 0x8a, sccb (Serial camera control bus) interface allows you to easily set the sensor window size, gain, white balance correction, exposure control, saturation, tone, and so on. Since the S3C2440 chip has a dedicated video interface, the CPU can be directly connected to the CMOS image sensor. Data output by image sensors and control signals include

The pixel clock (pclk), horizontal reference (href), frame synchronization (vsync), and data bus (D0-D7) are connected to the corresponding signal of the master processor, respectively. Pclk and href generate valid pixel clock signals in the internal phase of the processor, and lock the data in the rising or falling edge of the valid clock signal [4]. Module and S3C2440 interface circuit 2 are shown. 1.2 The network interface is designed to have no network interface on the S3C2440 chip. To achieve system debugging, download the operating system kernel and file system image, and network transmission of video data during system operation. Therefore, the network interface module (dm90000) is extended in the system ). The chip is a 10 M/M Ethernet physical layer chip with a general processor interface. Module and Interface 3 are shown in the following figure: CMD is the command type pin. In high-power mode, it is the data cycle, and in low-power mode, it is the address cycle. 54 internal control and status registers can be accessed through cmd and data bus. When the AS9-AS8 is set to high, SA7 is set to low, the SA6-4 matches the TXD2-0, dm90000 is uniquely controlled by the aen pin to see if it is selected. In addition, dm9000 works in normal mode, the TEST1-4 is 1, 1, 0, 0. To ensure that the dm90000 can be sent and received normally, a 25 m crystal oscillator should be added. 2. System Software Design

The software platform consists of three parts: System Boot Loader, embedded Linux kernel, file system and application. In this design, By porting u-boot-1.1.1 to the ARM platform to realize the system boot loading

In addition to Linux, you can easily switch to the download and update mode, and use the TFTP function to update the kernel image and file system in real time. The embedded operating system uses linux2.4.20 and the development mode adopts the most common host development mode, that is, compiling the kernel and applications on the host machine and then downloading them to the target platform through the network port, print debugging information by printing the terminal. The file system is the largest part of the storage used by the embedded system software platform. It stores system configuration files, system programs, and system peripheral drivers. After porting the embedded Linux kernel [2], the main task is to write the driver in the operating system. Here we focus on the development of OV9640 driver and the implementation of MPEG-4 coding.2.1 Development of the OV9640 driver [6]

To write an OV9640 CMOS image sensor driver in Linux, you must first enable OV9640. Use the sccb bus to set the OV9640 working mode and various parameters to allocate continuous memory space. The capacity matches the number of lattice numbers of the captured images. Then, use the request_irq () function to register the interruption for OV9640, with the disconnection number 06. When the S3C2440 captures the vsync signal, an interruption is triggered, and an image data frame is copied to the user space. Over and over again, video data is continuously collected to SDRAM.

We know that user processes are dealing with hardware through device files, and operations on device files are system calls. To associate system calls with device drivers, you must use a very critical data structure: struct file_operations {}. Therefore, the main task of writing a device driver is to write the sub-functions defined in the data structure and fill the fields of file_operations. The data structure of the camera file_operations is as follows: static struct file_operations cam_fops = {owner: this_module, open: cam_open, read: cam_read, IOCTL: cam_ioctl, release: cam_release, compile module_init () and module_exit (). Module_init () is the entry to the driver. It runs automatically when the module is loaded using the insmod command. This function includes ① initial CMOS image sensor ② allocation of continuous memory address space ③ registration of Device Files ④ registration interruption. The module_exit () function is called when rmmod uninstalls the module. Functions include ① releasing memory space ② releasing interruption ③ canceling device files. Now, the driver module has been compiled. After compilation and loading, we can read data to the camera like an ordinary file. 2.2 MPEG4-based Data Compression Algorithm 2.2.1 MPEG-4 [7] Compression of standard digital video stream data volume is huge, taking a qvga image with 20 frames per second as an example, the data volume per second is 2.92 MB. Assume that the system has ten sensors, it is quite difficult to realize the multiplexing transmission of data on the Internet. For the reliable operation of the system, this design adopts the MPEG-4 video compression coding with high compression ratio. The most significant feature of MPEG-4 is the content-based encoding method, which regards a video sequence as composed of different video object Vo, encoder according to the actual situation of each video object surface VOP encoding, the maximum compression ratio is. 2.2.2 MPEG-4 implementation and optimization Xvid is an open-source MPEG-4 video coding software, is currently all open-source video coding software is a relatively good, it strictly according to the GPL release, the image quality can achieve the effect of the DVD, while the data size is only 1/8 of that of the DVD. The latest version of XviD is xvidcore1.1.0. Here we select xvidcore1.1.0 as the basis for further optimization. Download xvidcore1.1.0 source code from www.xvidcore.org, modify the MAKEFILE file, and port Xvid to the ARM platform. For specific implementation methods, refer to the example in example and write your own applications based on the actual project. Then enter the xvidcore-1.1.0/build/Generic Directory and execute. /configure-Disable-assembly command to manually configure platform. inc file, modify cc =/opt/host/armv41/bin/arm4l-unknown-linux-gcc, and then execute make clean, make. Finally, copy the generated Library to the example directory, modify the MAKEFILE file under example, compile and download it to the target board for running.

After testing, the compression ratio of XviD is very high, which can reach. The most important thing is that the encoding speed is fast, and the image quality after compression and decompression is slightly reduced, which can fully meet practical requirements.

3. Conclusion

The use of embedded systems for remote video monitoring conforms to the development trend of digitalization and networking, and features centralized wiring, simple equipment, small size, and low cost, compared with traditional video monitoring solutions, this solution has incomparable advantages. The front-end collection uses the S3C2440 microprocessor and uses its own video interface to achieve the dynamic display speed (at a clock frequency of MB, qvga images can display at 20 frames per second ). The author's Innovation: Image Compression and network technology can achieve multiplexing of video data transmission. The monitoring end adopts the Video Object Segmentation Method Based on MPEG-4, and uses the difference of adjacent frames video object to realize intelligent alarm function. This series

It is cost-effective and easy to use and is worth promoting. 4. References[1] s3c2440x Proteus microprocessor Date Sheet. samsung electronics.2003 [2] Zhang Jihong, Wu Qiang. research on Embedded Linux and Its Transplantation on arm. computer Knowledge and Technology, 2005, (8) [3] OV9640 version1.0.omnivision effecies.2003 [4] Wang Xiaoming, A MPEG-4 video acquisition and transmission system research and implementation, Computer Measurement and Control, 2005, (8) [5] Chen Fu, Mary, etc. research and Implementation of video image capture Based on Embedded Systems. micro-Computer Information, 2005, (12) [6] Li qianguang, Zheng. development of Device Drivers Based on Embedded Linux (2 ). computer programming skills and maintenance, 2005, (12) [7] ISO/IEC JTC1/sc29/wg11 document n4668, Overview of the MPEG-4 standard. march 2002

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.