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

**Abstract:** In response to the high cost and long development cycle associated with digital video surveillance equipment, this paper presents an intelligent video surveillance system based on the ARM+Linux embedded platform. The system utilizes open-source software, specifically MJPG_Stream, to capture and transmit video images over a TCP/IP network protocol to a host computer for remote display. Additionally, a target detection algorithm combining the three-frame difference method and background subtraction is proposed 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 rapid advancement of computer technology, optoelectronics, digital image processing, embedded systems, and network communication, modern digital video surveillance has gradually replaced traditional analog systems. The global demand for video surveillance continues to grow, driving significant 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%. In this context, surveillance cameras, servers, encoders, and software have become key components of modern video surveillance systems. This paper introduces an intelligent video surveillance system built on an ARM+Linux embedded platform. It leverages the advantages of open-source operating systems and free software like MJPG_Stream to enable real-time online monitoring. A background-running target detection algorithm is also implemented, enabling intelligent control and triggering voice alarms when an intruder is detected. This system is particularly suitable for specific monitoring scenarios. **2. System Hardware Platform** The video surveillance system is built around the S3C2440 processor, supported by peripheral devices such as Flash, SDRAM, an Ethernet card (DM9000), a sound card (UDA1341), and a CMOS camera (OV9650). The captured image frames are processed and compressed within the Linux environment before being transmitted over the network to a PC for display. The hardware architecture is illustrated in Figure 1. **3. Building the ARM+Linux Embedded Platform** To establish an embedded Linux system on the hardware platform, it is necessary to boot the bootloader and Linux kernel. The process involves transplanting the bootloader source code, burning it into Flash via the JTAG interface, and then cross-compiling the Linux kernel and root file system on a PC. After booting from Flash, the Linux system is successfully started. **3.1 Network Interface Card and Sound Card Driver Porting** The Ethernet card DM9000 driver functions are largely provided within the Linux kernel. During the transplantation, only minor modifications are required to match the actual parameters of the DM9000. Similarly, the Linux kernel already includes standard audio programming models, making it easier to adapt the UDA1341 sound card driver. **3.2 Implementation of Voice Playback Function** After completing the sound card driver migration, a high-precision MP3 decoder called Madplay is transplanted. Madplay uses the MAD algorithm for excellent decoding performance and is well-suited for embedded environments. It is compiled using the zlib, libid3tag, and libmad libraries, and then deployed on the system to allow playback of recorded audio files. Following the successful setup of the embedded platform, tests were conducted using commands like ifconfig and madplay. As shown in Figure 2, the Linux system booted correctly, network and sound card drivers were configured successfully, and audio files could be played using the Madplay player. **4. MJPG_Stream Function Implementation** MJPG_Stream is a free video streaming server that uses the V4L2 framework to capture video from a camera and transmit it in JPEG format over TCP/IP to a host computer. **4.1 MJPG_Stream Porting** By modifying the Makefiles in the MJPG_Stream source directory to use `arm-linux-gcc` instead of `gcc`, the system compiles successfully. Key components include: - **Input_uvc.so**: Captures and compresses images from the camera. - **Input_control.so**: Controls the camera's rotation direction for PTZ functionality. - **Output_http.so**: Provides HTTP-based video streaming. - **Output_file.so**: Stores captured JPEG images for later retrieval. **4.2 Target Detection Algorithm Research** The paper proposes a hybrid algorithm combining the three-frame difference method and background subtraction. Compared to other methods like the Gaussian mixture model, this approach reduces computational complexity while maintaining accuracy on the ARM platform. The algorithm works as follows: 1. **Background Modeling and Foreground Extraction**: Convert the color image to grayscale, average the first n frames to build a background model, and subtract it from the current frame to extract foreground objects. 2. **Threshold Adjustment**: Automatically update the threshold based on the differential frame to improve accuracy. 3. **Three-Frame Difference**: Use three consecutive frames to detect moving targets. 4. **Fusion and Morphological Processing**: Combine results from both methods and apply filtering to remove noise and fill gaps. As shown in Figure 3, the algorithm effectively detects moving targets and eliminates cavities, producing accurate results. The system can then trigger a voice alarm using Madplay. **4.4 Monitoring Platform Test** On the Linux platform, the monitoring system is launched using commands. The MJPG_Stream software provides a graphical interface or web browser access for viewing. Testing confirmed that the system can quickly trigger a voice alarm when an object enters the scene. The system is set to run automatically after Linux boots, as shown in Figure 5. **5. Conclusion** The MJPG_Stream-based video surveillance system described in this paper offers real-time performance, remote monitoring capabilities, a simple user interface, and a short development cycle. It integrates voice alarm functionality without requiring additional hardware. Future work will focus on supporting PTZ control, implementing pattern recognition, and enhancing overall system performance.

Store Inspection Analytics

Store Inspection Analytics,Retail Audit Analytics For Retail Store,Retail Audit Analytics For Shopping Mall,Retail Audit Analytics For Restaurant

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

Posted on