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

Abstract: In view of the high cost and long cycle of developing digital video surveillance equipment, the ARM+Linux embedded platform uses the open source free software MJPG_Streamer to capture video images and transmit them to the host computer through TCP/IP network protocol. Perform remote display. At the same time, a target detection algorithm combining three-frame difference algorithm and background subtraction is proposed to realize intelligent control. The experimental results show that the system can perform real-time and remote monitoring, and can quickly perform voice alarm on the invading target.

1 Introduction

In recent years, with the continuous development of computer technology, optoelectronic technology, digital image processing technology, embedded technology and network communication technology, highly integrated digital, networked and intelligent digital video technology has replaced traditional analog video surveillance technology. . At present, the demand and application of video surveillance in the world continues to expand, driving the rapid development of the global video surveillance market. According to market research firm IMSResearch, the global video surveillance market will increase from $11.5 billion in 2008 to $37.7 billion in 2015, with a compound annual growth rate of 20.4%. In this market, surveillance cameras, servers, and encoders And the software is the protagonist of the video surveillance system.

This paper proposes an intelligent video surveillance system based on ARM+Linux embedded platform, which makes full use of the characteristics of open source operating system and open source free software MJPG_Streamer to realize online real-time monitoring. At the same time, a target detection algorithm is proposed, which runs in the background, realizes intelligent control, and can perform voice alarm on the intrusion target. This monitoring is suitable for monitoring for specific situations.

2 system hardware platform

The video surveillance system is based on the S3C2440 processor. The peripheral devices include Flash, SDRAM, Ethernet card DM9000, sound card UDA1341 and CMOS interface camera OV9650. The original image frames collected by the camera are processed and compressed in the Linux environment and transmitted through the network protocol. Go to the PC host computer for display. The system hardware platform structure is shown in Figure 1.

3 Building an ARM+Liunx embedded platform

To build an embedded Liunx system on the system hardware platform, you need to boot the BootLoader and Linux source code. This system needs to transplant the bootloader source code, then use the Jtag interface to burn it into Flash, boot from Flash, and boot after cross-compilation on the PC. Linux image and root file system, then boot Linux system.

3.1 NIC and sound card driver porting

Since the main data structure and functions of the Ethernet card DM9000 device driver function layer are provided in the Linux kernel, when the network device driver is actually transplanted, the work to be completed is to modify the corresponding kernel code according to the actual Ethernet card DM9000 parameters. Similarly, the standard audio programming model in the Linux kernel source code already includes a complete set of kernel driver modules that provide a unified and easy-to-use programming interface for a wide variety of sound cards, such as open(), read(), Ioctl (() and other functions, so the kernel source code can be easily modified during the sound card UDA1341 migration process.

3.2 Implementation of voice playback function

After the completion of the sound card driver migration, in order to facilitate the control of the playback, stop and other operations of the audio file, it is also necessary to transplant a professional high-precision decoder Madplay. Madplay is an MP3 player written according to the MAD algorithm, and the decoding effect is quite excellent, and Support for command line, especially suitable for use in embedded systems. The zlib library, the libid3tag library, and the libmad library are compiled separately during the migration process. Finally, the madplay source code is compiled and the compiled madplay is downloaded to the system, and then the recorded audio file can be played.

After the embedded platform is built, the command network and voice module tests are performed with the commands ifcongfig and madplay. It can be seen from Figure 2 that the Linux system is successfully booted, the network card and sound card driver configuration is successful, and the recorded audio file can be played using the Madplay player. .

4 MJPG_Streamer function implementation

MJPG_Streamer is a free video streaming server software, which uses the V4L2 video device development framework. It can transfer images captured from the camera to the host computer for transmission in JPEG format via TCP/IP network protocol.

4.1 MJPG_Streamer porting

In the MJPG_Streamer source directory, change the CC=gcc of all Makefiles to CC=arm-linux-gcc, and then compile. The main components and functions generated are as follows:

Input_uvc.so component: mainly completes the capture of the camera image, and converts and compresses the original YUV format image into a JPEG format image.

Input_control.so component: mainly completes the control of the rotation direction of the camera supporting the adjustment direction. For example, the PTZ controller, PTZ control is to achieve multi-angle monitoring.

Output_http.so component: This is a fully functional WEB server that outputs compressed JPEG images as an HTTP video data service stream.

Output_file.so component: The function of this component is to store the compressed JPEG image in a specific folder for capturing and storing still images in the network camera monitoring.

4.2 Research on target detection algorithm

Based on the inter-frame difference method, it is not sensitive to illumination variation, and the extraction of foreground targets is prone to "cavity". The background subtraction is sensitive to illumination changes. This paper proposes a target detection based on three-frame difference algorithm and background subtraction. algorithm. Compared with the commonly used algorithms, such as the mixed Gaussian model and the improved hybrid Gaussian model, the algorithm of this paper not only reduces the complexity of the operation, but also works well on the ARM platform, and at the same time can achieve accurate detection results. The algorithm implementation process is as follows:

(1) Establishing the background model, extracting the foreground target, first converting the acquired color image into a grayscale image by using equation (1), taking the first n frame image, and averaging the pixel values ​​of each position pixel as a background pixel, expressed as Formula (2). The image containing the foreground is obtained by subtracting the background frame from the current frame, and the image is binarized according to the threshold Th to obtain T(x, y), as shown by equations (3) and (4).

Where, Th represents a threshold and T(x, y) represents a binarized image.

Considering that the camera is fixed, the gray value of the background pixel changes slowly, while the gray value of the foreground target pixel changes relatively quickly. In order to adapt the background model to slow changes in the light, the background model needs to be updated in real time. Where a is the background update rate, and the value range is (0, 1).

Bn+1(x,y)=(1-a)Bn(x,y)+apn(x,y) (5) A large amount of gray value exists in the difference image S(x, y) The foreground pixels and background pixels with lower gray values.

Therefore, a method is proposed in which the threshold is automatically updated according to the current differential frame S(x, y).

Find the maximum and minimum values ​​of the gradation of the current differential frame S(x, y) image, and obtain the mean value of the two. T. Use the mean to divide the image into two parts: the target and the background. Find the two-part mean by using equation (6). K1 and k2, and finally the threshold Th is obtained by the equation (7).

(2) Using the three-frame difference algorithm to extract the target, select three consecutive frames of images Dk-1(x, y), Dk(x, y) and Dk+1(x, y), and perform a pairwise difference to obtain D1 (x, y). And D2 (x, y), after the binarization process, the two perform the AND operation to extract the foreground target.

(3) The foreground target fusion performs the OR operation of the background subtraction foreground image T(x, y) and the three-frame difference algorithm to obtain the image D(x, y), which takes advantage of the background subtraction and avoids the use of the three frames alone. The hollow phenomenon brought by the difference method. At the same time, the three-frame difference method is used to adapt to dynamic background changes.

(4) Prospect target morphological processing Since there are noise points and some voids in the fused image Q(x, y), it is necessary to perform median filtering on the image, and then alternately apply the opening and closing operations to Deburring and filling the double filtering purpose.

According to the algorithm of this paper, a video camera is acquired using a stationary camera. Figure 3 shows the simulation results on the Visual C++ 2005 platform. According to the results, the algorithm can extract the moving target completely, effectively eliminate the cavity, and the detection result is accurate.

(4) Prospect target morphological processing Since there are noise points and some voids in the fused image Q(x, y), it is necessary to perform median filtering on the image, and then alternately apply the opening and closing operations to Deburring and filling the double filtering purpose.

According to the algorithm of this paper, a video camera is acquired using a stationary camera. Figure 3 shows the simulation results on the Visual C++ 2005 platform. According to the results, the algorithm can extract the moving target completely, effectively eliminate the cavity, and the detection result is accurate. At this point, the system can quickly detect the invading object, and use Madplay to play the recorded audio file for voice alarm. The intelligent monitoring implementation process is shown in Figure 4.

4.4 Monitoring platform test

Enter the following command on the Linux platform to start the monitoring system. The PC can be displayed by the graphical interface provided by the MJPG_Streamer software, or by the web browser. After testing, when an object enters the scene, it can quickly make a voice alarm. When the platform is tested, set MJPG_Streamer to run automatically after Linux starts. See Figure 5.

5 Conclusion

The software-based MJPG_Streamer video surveillance system designed in this paper has the characteristics of good real-time performance, remote monitoring, simple upper computer, short development cycle and easy implementation. The system implements the function of voice alarm, making full use of the characteristics of the ARM platform, without the need to design additional voice module circuits. The target detection function of the system has been completed. The next research direction is to use the software MJPG_Streamer to support the PTZ control, realize the pattern recognition and tracking algorithm, and make the system more powerful and applicable.

0 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

The glass beads are used for road marking paints and thermoplastic road marking material to provide excellent night retro-reflectivity.  reflctvie BS 6088 A glass beads , BS6088 B glass beads ,  can be treated with drop on and intermixt  road marking glass beads when used for the marking line for the road. 

Specification for solid glass beads for use with road marking compounds and for other industrial uses,Glass, Waterproof materials, Particle size distribution, Defect counting, Marking, Sampling methods, Refractive index, Optical measurement, Magnetic materials, Corrosion tests, Water-resistance tests, Coatings, Reinforced materials, Plastics, Road marking, Quality assurance, Particle size measurement, Spherical shape, Weight measurement, Flotation agents, Acid-resistance tests.

BS6088 Standard Roadmarking Glass Beads are solid, spherical glass beads for use with thermosplastic roadmarking materials and traffic paint.Class A and Class B are high quality glass microspheres resulting from the specialized processing of selected glass cullet.

glass beads are a major factor in increasing road safety in an economical manner.Thanks to the beads' retro-reflective action at night, a vehicle's headlight beam is returned to the driver's eye.The microspheres not only multiply the visibility of the road markings at night, but also increase the marking's durability in general. glass beads are used as a drop-on agent and as premix beads for roadmarking materials.

Coated : Higher reflectivity than uncoated.Therefore best suited to use on high rainfall highway roads.

Uncoated:Increase the visibility of traffic lines /road markings especially at night.

Available in various sizes suitable for water based / solvent based road marking paints and thermoplastic material.

Can be used in a drop on application or premixed with road marking paint or thermoplastic.

Chemically inert and environmentally friendly.






BS6088 Glass Beads

BS 6088 Reflective Glass Beads, BS 6088 Retro reflective Glass Beads, BS 6088 Glass Beads Road Marking, BS 6088 Micro Spherical Glass Beads

YONGQING BAILUYUAN GLASS PRODUCTS CO.,LTD , http://www.blyglassbeads.com