Design of Intelligent Video Surveillance System Based on Open Source Software MJPG_Streamer

**Abstract:** In response to the high cost and long development cycle of digital video surveillance equipment, this paper presents an intelligent video surveillance system based on the ARM+Linux embedded platform. It leverages open-source software such as MJPG_Streamers to capture and transmit video images over a TCP/IP network to a host computer for remote display. Additionally, a target detection algorithm combining the three-frame difference method with background subtraction is introduced to achieve intelligent control. Experimental results demonstrate that the system supports real-time remote monitoring and can quickly trigger voice alarms upon detecting intruding targets. **1. Introduction** With the continuous advancement of computer technology, optoelectronics, digital image processing, embedded systems, and network communication, digital, networked, and intelligent video surveillance has gradually replaced traditional analog methods. The global demand for video surveillance continues to grow, driving market expansion. According to IMS Research, the global video surveillance market was valued at $11.5 billion in 2008 and is expected to reach $37.7 billion by 2015, reflecting a compound annual growth rate of 20.4%. Surveillance cameras, servers, encoders, and software are key components of modern video surveillance systems. This paper introduces an intelligent video surveillance system built on the ARM+Linux platform. By utilizing the features of an open-source operating system and free software like MJPG_Streamers, the system enables real-time online monitoring. A background-running target detection algorithm is also proposed, allowing for intelligent control and voice alarms when intrusions are detected. This system is particularly suitable for specific monitoring scenarios. **2. System Hardware Platform** The video surveillance system is based on the S3C2440 processor. Peripheral devices include Flash memory, SDRAM, an Ethernet card (DM9000), a sound card (UDA1341), and a CMOS camera (OV9650). The camera captures raw image frames, which are processed and compressed in the Linux environment before being transmitted over the network to a PC for display. The hardware structure of the system is illustrated in Figure 1. **3. Building the ARM+Linux Embedded Platform** To build an embedded Linux system, the BootLoader and Linux source code must be loaded onto the hardware. This involves transplanting the bootloader code, burning it into Flash via the JTAG interface, and booting from Flash after cross-compiling the Linux kernel and root file system on a PC. **3.1 NIC and Sound Card Driver Porting** The Ethernet card DM9000 driver functions are largely included in the Linux kernel. During transplantation, the kernel code is modified according to the actual parameters of the DM9000 chip. Similarly, the Linux kernel already includes standard audio programming models with unified interfaces, making it easy to adapt the UDA1341 sound card during migration. **3.2 Implementation of Voice Playback Function** After the sound card driver is successfully ported, a high-precision MP3 decoder called Madplay is transplanted to enable control of audio playback. Madplay uses the MAD algorithm and is well-suited for embedded systems. After compiling the zlib, libid3tag, and libmad libraries, the Madplay executable is downloaded to the system, allowing playback of recorded audio files. Once the embedded platform is built, tests are conducted using commands like `ifconfig` and `madplay`. As shown in Figure 2, the Linux system boots successfully, the network and sound card drivers are configured correctly, and audio files can be played using Madplay. **4. MJPG_Streamer Function Implementation** MJPG_Streamer is a free video streaming server that uses the V4L2 framework to capture images from a camera and stream them in JPEG format via TCP/IP to a host computer. **4.1 MJPG_Streamer Porting** In the MJPG_Streamer source directory, all Makefiles are modified by changing `CC=gcc` to `CC=arm-linux-gcc`, then compiled. Key components include: - **Input_uvc.so**: Captures and converts YUV images to JPEG. - **Input_control.so**: Controls camera rotation and PTZ functions. - **Output_http.so**: Acts as a web server to stream JPEG images. - **Output_file.so**: Stores captured JPEG images in a specified folder. **4.2 Target Detection Algorithm Research** This paper proposes a hybrid algorithm combining the three-frame difference method and background subtraction. Compared to traditional methods like the Gaussian mixture model, this approach reduces computational complexity while maintaining accuracy on the ARM platform. The algorithm steps include: 1. Establishing a background model and extracting foreground targets by converting color images to grayscale, averaging pixel values, and subtracting the background frame. 2. Updating the background model in real time to adapt to lighting changes. 3. Using the three-frame difference algorithm to extract moving targets and reduce hollow artifacts. 4. Fusing the results of background subtraction and three-frame difference to improve detection accuracy. 5. Applying morphological operations to remove noise and fill voids in the final image. Simulation results using Visual C++ 2005 show that the algorithm effectively detects moving targets, eliminates cavities, and provides accurate results. When an intrusion is detected, the system triggers a voice alarm using Madplay. **4.3 Monitoring Platform Test** On the Linux platform, the command is used to start the monitoring system. The PC displays the video through the MJPG_Streamer graphical interface or a web browser. Testing confirmed that the system can quickly trigger voice alarms when an object enters the scene. The system is set to start automatically after Linux boots, as shown in Figure 5. **5. Conclusion** The MJPG_Streamer-based video surveillance system designed in this paper offers good real-time performance, remote monitoring capabilities, and a simple user interface. It supports voice alarms without requiring additional hardware circuits. The system’s target detection function has been successfully implemented. Future work will focus on integrating PTZ control, pattern recognition, and tracking algorithms to enhance the system's functionality and applicability.

Store Inspection

Store Inspection,Loss Prevention For Drugstore,Retail Audit Analytics For Drugstore,Retail Audit Analytics For Grocery Store

OP Retail (Suzhou) Technology Co., Ltd , https://www.opretailtech.com