Design of video surveillance for car anti-theft alarm system based on 3G network

Publisher:真诚相伴Latest update time:2016-07-20 Source: eechina Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  Introduction
  With the mature development of the third generation mobile communication network, the application of video surveillance technology based on mobile communication network is becoming more and more extensive. Based on the advantages of high coverage, strong reliability and fast transmission rate of 3G network, this paper designs and implements the visual monitoring of the car anti-theft alarm system. Based on the existing electronic car anti-theft alarm, this design realizes the functional expansion of the original alarm system of the car body by expanding the general interface. Its overall structure block diagram is shown in Figure 1. This paper focuses on the design and implementation of the video surveillance part of the system. The
  


  video surveillance part of this system is based on the hardware platform with InterPXA270 as the core, and the upper-level application is realized by building software development of embedded WindowsCE operating system. This design develops the camera driver in the form of stream interface, and uses the interface provided by the camera driver to realize the data acquisition of real-time images under embedded WindowsCE, and compresses the original images in MPEG-4 format. At the same time, SOCKET programming is used on the WindowsCE side to realize the transmission of monitoring data.
  1 Hardware platform
  The structure of the existing car anti-theft alarm system is shown in the dotted box in Figure 1. This paper focuses on the design and implementation of the video surveillance part of this system. The hardware of the video surveillance part includes three parts: the camera for collecting monitoring data, the multimedia processor and the communication module. The hardware construction structure diagram is shown in Figure 2. The hardware platform of the video surveillance part is based on the InterPXA270 processing chip of the InterXScale microarchitecture as the core, and the SIM5218 module is selected as the 3G communication module. The dual-port RAM technology is used to realize the communication between the dual CPUs of the video processing and 3G communication module. Among them, the main frequency of the InterPXA270 chip is 520Hz, and the addition of WirelssMMX technology greatly improves the multimedia processing capability. In addition, the InterSpeedStep dynamic power management technology of PXA270 reduces the power consumption of the device while ensuring the CPU performance; Siemens' 3G communication module SIM5218 supports a data transmission rate of up to 7.2Mb/s, and provides a wealth of peripheral interfaces such as UART, USB 2.0, GPIO and I2C, which reduces the design difficulty; the camera in this design chooses the Mesh 2000, which uses the OV511 chip as the core, has a COMS 350,000-pixel clarity, and uses USB communication. It can use the stream interface to collect monitoring data in real time.
  


  2 Software Functions
  The software architecture based on WindowsCE operating system includes two parts.
  Using PlatformBuilder to customize WindowsCE system and develop USB camera driver and data transmitter, this article introduces the design of USB camera driver and programming of transmitter in detail. The software structure diagram of the system is shown in Figure 3.
  


  WindowsCE stream interface driver is a driver with customized interface, which is a dynamic link library DLL at the user level and is a general type of device driver. The stream interface driver is used to implement a set of fixed functions called stream interface functions, which enable applications to access these drivers through the file system. The stream interface driver supports almost any type of external device that can be connected to the WindowsCE.net-based platform, including USB devices. The
  main task of the stream interface driver is to pass the use of the peripheral to the application, which is achieved by representing the device as a special file in the file system. The application calls the stream interface function through the API function of the file system, and then the stream interface driver calls the native driver or interacts with the system kernel or peripherals through the device manager.
  2.1 Implementation of the stream interface function of the camera driver
  The development of the camera driver involves a set of standard stream interface driver functions, such as CAM_Init(), CAM_Deinit(), CAM_Open(), CAM_Read(), etc. These functions are the DLL interface of the interface driver, among which CAM_Init(), CAM_Open(), CAM_Read() and CAM_IOControl() are the most important. The following is a detailed introduction to these important functions.
  (1) CAM_Init()
  The CAM_Init() function is called by the ActiveDeviceEx() function provided by the device manager. When the device is initialized, the device handle information is written to Drivers\Active through ActiveDeviceEx(). When the application is initialized, the address of the registry will be passed to CAM_Init() in the form of the Context parameter. Functions such as RegOpenKeyEx() and RegQueryValueEx() are used to perform the operations of opening and reading and writing the registry. After successful execution, the handle information of the USB device is returned. Part of the source code of the driver:
  


  (2) CAM_Open()
  Before reading the device, you must first call CAM_Open() by executing CeratFile() to open the device. The first parameter required by CAM_Open() is the device handle and other information returned by CAM_Init() when the application is initialized, and then set the device shutdown event to a no-signal state.
  The following is part of the source code:
  


  The two functions EnterCriticalSection() and LeaveCriticalSection() involved in the program are used to ensure that all resources accessed in the critical section are not accessed by other threads until the current thread completes the execution of the critical section code. EnterCriticalSection() and LeaveCriticalSection() represent entering the critical section and exiting the critical section, respectively.
  (3) CAM_IOControl()
  In the program design, the CreatFile() function is used to call CAM_Open() to open the camera device, and the return value is passed to the CAM_IOControl() stream interface function through ReadFile(), and CAM_IOControl() calls OV51xReadOneFrame() to read the USB device data. The following is part of the source code: There are four types of data transmission on
  


  the USB bus , namely control transmission, interrupt transmission, bulk transmission and real-time transmission. These four types of transmission are applied to different USB devices. Among them, real-time transmission is suitable for transmission at a fixed rate or within a specific time, and can tolerate occasional erroneous streaming data. For devices with high real-time requirements such as USB cameras, real-time transmission is generally used. Therefore, in CAM_Read(), the real-time transmission function IssueIsochTransfer() is needed to read the data collected by the camera. If IssueIsochTransfer() returns a handle after execution, it means that the execution is successful. If there is no return value, it means that the execution failed.
  Each time a packet of data is obtained, the frame start mark is searched. If it is found, all the remaining data is copied to the application buffer. In the Ov51xReadOneFrame() function of the program, pDataBuff applies for 9610B space, and dwFrameLen is the length of each of the 10 transmissions, which is set to 961 here. Figure 4 is the Ov51ReadFrame() software flow chart.
  


  2.2 Design and implementation of the communication sender
  The communication sender mainly completes RTP/RTCP protocol encapsulation and decapsulation, network transmission and data acquisition. This paper implements MPEG-4 real-time streaming media transmission based on the RTP/UDP/IP protocol stack, which is a submodule of the network transmission part of the mobile video surveillance system. The JRTPLIB library function is used to realize the real-time transmission of RTP. The system architecture of the transmission part is shown in Figure 5. The
  


  main function of the sender is to encapsulate the audio and video stream into the RTP packet and transmit it to the receiver through the 3G network, and send and receive RTCP packets for feedback control at the same time, in order to achieve the best effect. Based on the WindowsCE platform, the real-time streaming media transmission is realized by calling the JRTPLIB function library.
  Since the RTP protocol is not implemented as an independent network layer, it adopts the concept of application layer framing as part of the application code. This paper implements RTP encapsulation and grouping through the application for a specific media application, and then hands the RTP grouping to the UDP interface, using JTHREAD as the thread library to complete the multi-threaded operation. The use of RTP for video transmission is completed in two sessions: one is responsible for sound transmission; the other is responsible for video transmission.
  Part of the main program of the sender is as follows:
  


  3 Conclusion
  Based on the existing car anti-theft alarm system, this paper implements the video monitoring function based on the 3G network through the expansion of the interface, and elaborates on the design of the camera's stream interface function and the communication sender. In addition, through the expansion of the system's general interface, the system can also be combined with specific industries or home applications to realize the visual monitoring of a small range of environments by mobile phones. The design and implementation of this system is not only of great significance to the development of car anti-theft products, but also provides a good application prospect for the development of visual monitoring based on 3G networks.
Reference address:Design of video surveillance for car anti-theft alarm system based on 3G network

Previous article:Design of a fast charging system for electric vehicles
Next article:Design of vehicle acceleration test system based on single chip microcomputer

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号