Remote Video Monitoring System Based on OMAP5912

Publisher:AngelicJourneyLatest update time:2014-11-21 Source: 21icKeywords:OMAP5912 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  introduction

  At present, video surveillance systems have been widely used in various fields, and digitization and networking have become the development direction of video surveillance systems. This design uses the OMAP5912 processor [1] to design and implement a remote video surveillance system based on the B/S mode, which not only solves the shortcomings of traditional analog video surveillance systems, but also makes up for the shortcomings of single-core processors in video encoding.

  OMAP5912 is a dual-core processor composed of ARM926EJ-S MPU core and TMS320C55x DSP core. ARM926 can meet the processing needs of control and interface, and supports a wide range of operating systems, while C55x series DSP can provide support for real-time multimedia processing of low-power applications. Therefore, when OMAP5912 is used in video surveillance systems, the ARM core can be used to implement human-machine interface, control and communication, and the DSP core can be used to implement video encoding, thus forming a high-speed, clear, low-power video surveillance system with good human-machine interaction.

  System overall structure

  The overall structure of the system is shown in Figure 1. The system uses the OMAP5912 circuit board and camera as hardware, the Montavist Linux operating system, camera driver, H.264 encoder, and network communication program as software, and a PC with IE browser as the monitoring end. On the server side, the ARM core of OMAP5912 starts the camera for video acquisition through the driver, and uses DSP/BIOS Bridge to transmit the acquired video to the DSP core. The DSP core encodes the video using the optimized H.264 encoder, and then sends the encoded video back to the ARM core. The ARM core exchanges data with the monitoring end through the network communication program. The user monitoring end decodes and plays the video, and can control the camera and set parameters through the IE browser.

System overall structure diagram

  System hardware design

  The system hardware design is the design of the OMAP5912 circuit board. In the design, the power management chip uses TPS65010; DDR uses K4X56163PE chip; NOR FLASH uses two MT28F128J3FS-12 chips; the audio CODEC chip uses TLV320AIC23; the Ethernet interface chip uses LAN91C96; in addition, USB interface, UART interface, audio input and output interface, JATG/Multi-ICE simulation debugging interface and four expansion interfaces are also designed. The principle block diagram of the OMAP5912 circuit board is shown in Figure 2.

OMAP5912 circuit board schematic diagram

Figure 2 OMAP5912 circuit board block diagram

  System software design

  The function of the system is to collect video and transmit it remotely. The software design mainly includes the construction of the software platform, the implementation of the camera driver, the implementation of video collection and video encoding, the construction of the embedded WEB server, and the implementation of video network transmission.

  1) Establishment of development platform

  Before developing an application, you first need to build a software platform in the OMAP5912 circuit board. The main steps are as follows:

  (1) Install the MontaVista Linux embedded operating system on the PC.

  (2) Port u_boot to the target board

  (3) Configure the Linux kernel and add the following two modules:

  ①Multimedia devices→<*>Video For Linux→[*]V4L information in proc filesystem;

  ②USB Support→USB Multimedia devices→<*>USB OV511 Camera support;

  Modify some parameters, the most important of which is to modify the Makefile file:

  ARCH:= OMAP

  CROSS_COMPILE=arm_v4t_le-

  Finally, execute the following command to generate the kernel image file:

  #make dep #Create kernel dependencies

  #make clean #Clear intermediate files

  #make uImage #Create kernel image file (4) Use tftp to download the kernel image file

  (5) Mount the root file system

  In the process of application development, the file system on the Linux host is usually mounted via the network in NFS mode, so that there is no need to re-burn the file system image file every time there is a change. Its implementation is based on the corresponding configuration of the host and starting the NFS service, adding the following line to the /etc/exports file of the Linux host:

  /home/luowei/montavista/filesys *(rw,no_root_squash,no_all_squash,sync)

  And run the following command to make the settings take effect:

  #exportfs –a

  #service nfs restart

  Note: /home/luowei/montavista/filesys is the root file system on my host machine and can be modified according to actual conditions.

  (6) System testing

  Create a hello.c file in /home/luowei/montavista/filesys/home and compile it into the target board executable file hello using the following command:

  /opt/montavista/previewkit/arm/v4t_le/bin/arm_v4t_le-gcc –o hello hello.c

  Enter the same directory on the target board and execute ./hello. If it runs correctly, it indicates that the system has been built successfully.

 

  2) Video capture and encoding

  (1) Camera driver design

  The role of the driver is to map the device to a special device file. The user program can operate on this device file like other files [2]. The system's camera driver includes the camera opening module Camera_Open(), the camera control module (including interrupt request, camera initialization, startup, camera register setting, DMA request and startup) and the camera closing module Camera_Release(). The driver is then defined in struct file_operations for the API function call of the kernel Video4Linux. Considering that Linux comes with the driver of OV511, the mesh camera OV3000 using the OV511 chip is designed.

  (2) Video acquisition

  The design uses the API functions provided by the Video4Linux module [5] for video capture. The main functions include:

  ①dev?=?open(Camera_Open?,O_?RDWR);Open the video capture device.

  ②ioctl (dev, VIDIOCGCAP, &vid_caps) gets the relevant performance of the video device.

  ③ioctl?(dev?,?VIDIOCGCHAN?,?&vid_chnl);Get the relevant parameters of the camera channel.

  ④ioctl?(dev?,?VIDIOCGFBUF?,?&vid_buf)?;Get the properties of the frame buffer.

  ⑤ioctl?(dev?,?VIDIOCGPICT?,?&vid_pi);Get the settings for image acquisition.

  ⑥ioctl?(dev?,?VIDIOCSPICT?,?&vid_pic); Set the relevant parameters of image acquisition, including color depth, palette type, brightness, contrast, etc.

  ⑦ioctl?(dev?,?VIDIOCSWIN?,?&vid_win);Set the view area parameters for image acquisition.

  ⑧fwrite?(m_buf?,1?,230400?,p)?;The collected data is stored.

  ⑨ioctl?(?dev?,?VIDIOCMCAPTURE?,?&vid_mmap); start capturing a frame.

  The design uses memory mapping mmap()[3] to capture video frames, that is, first use the ioctl() function to obtain the frame information of the camera storage buffer, then modify the settings in video_mmap, and then use mmap() to map the device file corresponding to the camera to the memory area to complete the video acquisition. [page]

  (3) Video Coding

  The design uses the DSP core of OMAP5912 for video encoding, which can give full play to the dual-core advantages of OMAP5912. In the selection of encoders, considering that H.264 has a significant improvement in compression performance compared with previous video encoding standards (such as H.263 and MPEG-4), this design chooses the x264-20060612 version H.264 encoder suitable for embedded systems. Considering the characteristics of the surveillance video scene, the following encoding scheme is selected:

  ①H.264 baseline, without B-frame encoding and CABAC;

  ②Select 16 in the search range;

  ③The quantization parameter is selected as 32;

  ④1/2 pixel interpolation;

  ⑤ Only use 1 reference frame;

  ⑥ When encoding P frame macroblocks, only five modes are used: 16×16, 16×8, 8×16, 8×8, and Intra16×16.

  The H.264 encoder can be used in this system after a series of optimizations. Its workflow is shown in Figure 3.

work process

  3) Video network transmission

  Considering the advantages of B/S mode such as good scalability, easy maintenance and upgrade, and high security, the system adopts B/S mode. Users only need to enter the server's IP address in the web address bar of the remote client and view the live video screen in real time through the browser.

  The design of the system network communication program includes the design of the server and the monitoring end. The monitoring end can use the general IE browser. The main part is the design of the server part, including the construction of the WEB server [4] (mainly involving the transplantation and configuration of the BOA Web Server and the creation of CGI scripts), the implementation of CGI (Common Gateway Interface) in C language, the implementation of embedded databases and the creation of simple web pages. Among them, CGI is the interface between the WEB server and the application program, such as setting parameters of the remote device through the CGI program; the embedded database MSQL is used to store and access important information of the system, such as user accounts, passwords, camera parameters, etc. After adopting the B/S mode, the communication program structure diagram of the server and the monitoring end is shown in Figure 4.

Communication program structure diagram between server and monitoring end

Figure 4 Communication program structure diagram between server and monitoring end

  Some programs of embedded WEB server are as follows.

program

  The system fully utilizes the dual-core advantage of OMAP5912 to achieve real-time video acquisition, storage, encoding and network transmission. The video surveillance user interface effect diagram is shown in Figure 5.

Video surveillance user interface renderings

  Conclusion

  The remote video monitoring system based on OMAP5912 is designed and implemented. The system gives full play to the dual-core advantage of OMAP5912, and realizes the real-time video acquisition, storage, encoding and network transmission on the server side. The PC on the monitoring side can view the video of the monitoring point through the IE browser, and can also set the video resolution, brightness, contrast and other parameters. The actual operation shows that the system runs stably and the video is smooth, which can meet the requirements of remote video monitoring.

Keywords:OMAP5912 Reference address:Remote Video Monitoring System Based on OMAP5912

Previous article:MCU voltage output selection
Next article:IMA E1 Data Acquisition System Based on MPC8280

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号