0 Introduction
Traditional video surveillance systems are mainly based on analog signal monitoring systems and plug-in card-based digital monitoring systems. Among them, the analog signal monitoring system has a large amount of wiring engineering, consumes a lot of storage media, and query and evidence collection is also very cumbersome; the plug-in card-based digital monitoring system is completed by a PC plus an image acquisition card. The system cost is high, and the PC needs to be manned and cannot be used in harsh environments. In the field of video surveillance, how to make information transmission faster, more stable, farther, and lower the cost, volume, and power consumption of the system are the primary issues facing current technical researchers.
A wireless video surveillance system based on embedded Windows CE5.0 is proposed here. It solves the problems of high cost, large volume, limited transmission distance, high power consumption, and inconvenient installation of traditional video surveillance systems. The design of this system will provide a new idea, method, and technical route for wireless video surveillance; it has broad application prospects in wireless video fields such as security, distance education, remote video conferencing, and medical systems.
The hardware block diagram of the system is introduced.
The hardware system of the wireless monitoring system based on embedded WinCE5.0 is mainly composed of an embedded terminal and a PC on the server side. The microprocessor of the embedded terminal platform is S3C2440 based on the ARM9T20 core. S3C2440 has a rich interface, among which the camera interface is connected to the CMOS camera, and the serial port is connected to the GPRS transmitter module; the server side is mainly a PC and a GPRS receiver module. The whole block diagram is shown in Figure 1.
The system first uses the S3C2440 microprocessor to control the CMOS camera to collect image data. After compression encoding, the compressed data is transmitted through the GPRS wireless transmission module. The PC on the server side receives the data through the GPRS receiving module, and decodes the video data through the corresponding application program and displays it on the screen. The core control board of the embedded terminal platform containing the S3C2440 microprocessor is shown in Figure 2.
2 System expansion interface design
2.1 Camera interface design
The image acquisition chip used in the camera is the OV9650 image sensor, which has a 10-bit data interface and a standard SCCB interface. It uses a CSP-28 package and is small in size.
The chip supports three data output formats: RGB (4:2:2), YUV (4:2:2), and YCrCb (4:2:2). It has 138 built-in device control registers with addresses ranging from Ox00 to Ox8A. The sensor window size, gain, white balance correction, exposure control, saturation, hue and other parameters can be easily set through the SCCB interface. The camera module containing the image sensor OV9650 is shown in Figure 3.
S3C2440 has a dedicated camera interface. The CPU can be directly connected to the CMOS image sensor. When the 0V9650 outputs data in 8-bit YUV format, data lines D2 to D9 (D9 is the MSB bit, D2 is the LSB bit) are used; when the output data format is 10-bit RGB, data lines D0 to D9 (D9 is the MSB bit, D0 is the LSB bit) are used. The system uses the YUV format. The camera module is connected to the Camera interface of S3C2440. Its circuit diagrams are shown in Figures 4 to 6.
The TI level conversion chip 74LVC4245 is used, which is a dual-power level shifter. The level shift is performed inside it. The 5 V end uses a 5 V power supply as VDD_CAM, while the 3.3 V end uses 3.3 V as VCC33. The dual power supply can ensure that the output swing of both ports can reach the full power supply amplitude. [page]
2.2 Interface design of GPRS module
S3C2440 has 3 UART channels. One of the channels is used to design the serial port to connect it to the GPRS module. Due to the built-in UART controller of S3C2440, the hardware development and software design are relatively simple. However, the high and low level signals defined by the RS 232 standard are completely different from the high and low level signals defined by the circuit of the general microcontroller system. For example, the standard logic "1" of the S3C2440 system corresponds to the level of 2 to 3 V, and the standard logic "O" corresponds to the level of 0 to 4 V. Obviously, it is completely different from the level signal described in the RS 232 standard. In order for the two to communicate, the signal level must be converted. The commonly used level conversion chips are MAX232, MAX3221 and MAX324.3. The specific design circuits are shown in Figures 7 and 8.
3 Customization of the operating system platform
Windows CE is a highly modular embedded operating system. Because of this, users customize the operating system to meet specific requirements. If you customize the Windows CE operating system for your own embedded device, you must perform a series of operations such as creating, building, running, and publishing the OS. In the wireless video surveillance system, according to the functional requirements, the process of using Platform Builder5.0 to customize the system is as follows:
(1) Import the BSP development package. Since Samsung's S3C2440 based on the ARM920T core is used, find the SMDK2440.CEC file under the SMDK2440 file in the BSP package and import it. Open "Platform Builder5.0" and select "Manage Catalog Features" under the "File" menu, as shown in Figure 9. Click "Import" in the pop-up dialog box, browse to the smdk2440.cec file under the SMDK2440 file, and import it.
(2) Create a project. According to the requirements of the WinCE wireless monitoring system, select appropriate components to implement it during the customization of the system. The components include: MFC components that support application development and related components that support the network.
(3) Compile the project: Click the menu "Build OS" → "Sysgen" to start compiling the project.
(4) Download the runtime image and start it after successful debugging. After successful compilation, files such as nk.bin and nk.nb0 will be generated in the directory WinCES00PBWorkspaces estlRelDirsmdk2 440_ARMV4I_Release. Download nk.nb0 to the hardware platform for operation.
4 Driver Development
4.1 Camera Driver Development
Camera driver development is a difficult point in the design and also a key part. Since the video data collected by the camera can be processed as a data stream, the camera driver will be developed using the streaming interface method.
(1) Open the previously customized operating system project in Platform Builder, then create a new WIN32 DLL project and add two C++ source files, namely: camera.cpp and IIc.cpp. Among them, camera.cpp contains the driver's entry function DLLMain(); the driver prefix is "CIS", and IIc.cpp contains the function to configure the camera-related registers through the ICC interface.
(2) According to the previous hardware circuit and the working timing of the OV9650 chip, the OV9650 initialization is realized by writing the CIS_Init function of the streaming interface. It mainly includes the following three steps: call the InterruptInitialize(SYSINTR_CAM, CameraEvent, NULL, 0) function to notify the system to register an interrupt; call the CreateEvent() function to create a CameraEvent event; call the CreateThread() function to create a CameraThread thread. In the Camera Capture Thread service function, call the WaitForSingleObject (CameraEvent, Display Time) function to wait for the Camera Event event to occur. This event is triggered by the SYSINTR_CAM interrupt associated with it. In addition, other stream interface functions (CIS_IOControl, etc.) can also be implemented in a similar way.
(3) Write the DLL's export function definition file .DEF. The .DEF file defines the DLL's export function class table. The .DEF file can be edited with a general Notepad, and the suffix name can be changed to .DEF when saving. The contents of the .DEF file for this camera driver are as follows:
(4) Configure the registry for the driver. Add the following registry entry in platform.reg:
After the camera driver is developed, it is displayed on the touch screen of the embedded terminal by writing an application, as shown in Figure 10. First, a window for displaying images is created through the CreateWindow API function, and then a thread of the callback function CaptureThreadProc is created. In the callback function, different message values are sent to the operating system according to different operations to process image reading and display, etc. The test results are shown in Figure 11.
4.2 Serial port driver development
In Windows CE, the serial port driver implementation has a fixed model, based on the stream driver model, and adopts a layered structure. The steps of serial port driver development are the same as those of the camera driver development above. The key is to implement the stream interface function. Since a layered structure is adopted here, the code of the MDD layer can refer to the source code provided by Microsoft in the %WINCEROOT%\PUBUC\COMMON\OAK\DRIVERS\SERIAL\COMMDD2 directory. The code in the PDD layer is hardware-related code and needs to be written for different devices. The code in the MDD layer calls the code in the PDD layer to implement specific hardware operations. The structure of the serial port driver is shown in Figure 12.
5 Development of PC-side monitoring center program
The monitoring center is the core part of the wireless video monitoring system. It is responsible for managing the entire system and displaying the monitored images. In this paper, the application of the monitoring center realizes real-time monitoring, timed recording, snapshot and other functions. In the development of the monitoring program in the system, C# language and WIN32 API are used at the same time. The program graphical interface is designed by using the event-based programming method of C# language, and the reading and display of the underlying image data are designed based on the message mechanism using the API function in the VFW interface. The API functions in this system mainly come from the VFW software toolkit. VFW (Video for Windows) provides a series of application programming interfaces (APIs), through which users can easily realize common functions such as video capture, video editing and video playback, and can also use callback functions to develop more complex video applications. Its characteristics are that when playing videos, no dedicated hardware equipment is required, and the application is flexible, which can meet the needs of video application development. The program debugging and running effect of the monitoring center is shown in Figure 13. [page]
6 Research on video compression coding and transmission theory
6.1 Research on video compression coding
Images and videos contain a huge amount of information, and their transmission and storage require a wide bandwidth. Multimedia video data must be compressed before wireless transmission. Common digital compression technologies mainly include H. 261 compression coding for conference video systems, JPEG for computer still image compression, MPEG digital compression technology for moving image compression, and H. 263 and H. 264 compression coding technologies, which have been hot in recent years. MPEG-4 uses a new generation of video coding technology. For the first time in the history of video coding development, it expands the coding object from image frames to video objects of any shape with practical significance, thereby realizing the transformation from traditional pixel-based coding to modern object-based and content-based coding, and thus leading the development trend of a new generation of intelligent image coding.
Since the MPEG-4 compression coding system is relatively complex, the paper will focus on the study of MPEG-4 compression coding technology, analyze its compression coding source code on PC, and lay the foundation for future transplantation on embedded devices such as ARM. The process of MPEG-4 encoding of a frame of image is shown in Figure 14.
Compiling the source code of the open source MPEG-4 XVID model will generate an xvidcore.dIl file, and calling the relevant functions in the library in the application development. The program execution process is shown in Figure 15. The program is tested on a PC, first reading video data from the camera, and then performing MPEG-4 encoding.
6.2 Wireless Transmission Research
GPRS uses wireless IP technology based on packet transmission mode to transmit data at high speed in an effective way. It supports the most widely used IP protocol and X.25 protocol on the Internet, and the transmission rate is up to 117 KB/s. Therefore, after the video data is compressed by MPEG-4, it can be transmitted through the GPRS module. In this transmission process, the establishment of communication connection, data transmission and other operations are all realized through the API and Socket interface of the TCP/IP network. The whole wireless transmission effect is shown in Figure 16.
7 Conclusion
The wireless monitoring system based on Windows CE5.0 involves computer programming technology, embedded technology, video encoding, wireless transmission and other knowledge. A lot of work has been completed in this subject, and the test results have achieved the expected purpose of this paper. The embedded terminal platform has the characteristics of small size, low power consumption, fast running speed, and clear collected images. The design of the monitoring center program also has a friendly human-computer interaction interface, realizing functions such as timed monitoring, video recording, and photo taking. The feasibility of the method of video compression and wireless transmission is theoretically studied, and specific solutions are proposed, which lays a solid foundation for further improvement of the system in the future.
Previous article:Research and Implementation of Linux System Transplantation Based on ARM
Next article:Design of USB host system based on μCOS-II
Recommended ReadingLatest update time:2024-11-16 16:01
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- Easy to get started with mobile communications
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- LOTO Practice [Dry Goods] 2- Quick Application of Voltage Comparator
- GD32E230C Test 2: I2C and EEPROM
- 【XMC4800 Relax EtherCAT Kit Review】+DAVE integrated development environment construction and demo operation
- Design of data acquisition card based on FPGA.pdf
- Xunwei 4412 development board cross-compiles Qt application code
- Actual development and experience of the first phase
- 【National Technology N32G430】02 Small expansion, communication from top to bottom
- PCB and PCB LAYOUT (dry goods sharing)
- BlueNRG beacon+serial port transparent transmission
- KiCad Diff Tool