Design of intelligent monitoring system based on low cost CMOS camera

The rapid development of computer technology, communication technology and network technology has accelerated the pace of digital monitoring system to replace module monitoring system. Digital video surveillance has become an inevitable trend of monitoring technology. Digital monitoring can not only utilize computer network and advanced video/audio compression, Decompression technology realizes remote video monitoring, and can also set flexible and multi-function alarm linkage according to the alarm function requirements, generate detailed alarm record and operation record database, and design complete system user management function.

On the basis of considering the basic requirements of the digital monitoring system and the value, performance, power consumption, volume and development trend of the CMOS camera, the VC++ and VB programming on the ordinary PC realizes the digital image intelligent monitoring system based on the low-cost CMOS camera. ". When the monitoring scene changes, the system automatically takes photos and videos, and provides three alarm levels. At the same time, the corresponding processing mechanism is implemented, and an audible alarm is given. If necessary, manual intervention can also be entered.

1 system function

The system consists of a microcomputer, a CMOS camera and software. The basic functions are as follows:

(1) It can overcome the defects of low-cost CMOS camera instability and low pixel and low resolution, and reliably and stably monitor the monitoring scene.

(2) It can realize intelligence and automation. When an abnormal situation is found, different processing mechanisms can be implemented according to the hazard level of the abnormal situation.

(3) It has the functions of photographing and recording. When an abnormal situation occurs, the relevant scenes are recorded, providing image evidence for future analysis, and the system also provides time information.

(4) With perfect post-processing ability, the photos and videos taken can be viewed in the system, which is convenient for users to browse and view, and can be edited, printed and so on.

(5) Flexible switching from automatic monitoring to manual operation.

2 hardware design

The block diagram of the system hardware is shown in Figure 1.

The system host is composed of a common PC loading software. The system design uses high-capacity disk space to store huge data under the comprehensive analysis of high performance and low price. The CPU with high stability is used to ensure the system for a long time. run.

The CMOS camera is the Logitech Express 2000. The pixel value is only 100,000. When the resolution is 320×240 pixels, the FPS is 15 frames and the illumination is between 100-100 000 lux.

3 software design

3.1 main block diagram

The main block diagram of the monitoring software is shown in Figure 2.

3.2 Monitoring block diagram

The monitoring program block diagram is shown in Figure 3.

The system sets the alarm to three levels, green, yellow, and red. From low to high, the monitoring scenario is safe, the system enters the policing state, and the system enters the alarm state.

When the system is in the green alarm state, the video image captured by the CMOS camera is played back in the video playback window at the center of the screen. The status bar at the bottom of the screen displays the system running time and current time. At the same time, the internal monitoring program performs motion detection, triggering a high-level alarm once the scene changes, and driving the auxiliary equipment to work.

4 Research on low-cost CMOS cameras

4.1 Image acquisition

In the acquisition of camera images, the system uses the Logitech Quick-Cam SDK. This is a COM interface driver that can be used to capture images captured by the camera by programming his settings. Figure 4 shows how the programmer and the camera's low-level drivers work.

By calling the WDM driver, the application can communicate with the CMOS camera.

4.2 Pretreatment method

The image is subject to noise during the generation and transmission process, which degrades the quality. In order to suppress noise and improve image quality, the image must be smoothed.

In order to filter out noise in the image, the system is designed with smoothing technique. The smoothing technique used in this system uses a local operator for the noise image, that is, only some pixels in his local small field are operated. This method, also known as the unweighted domain averaging method, treats each pixel in the field equally. Let the gray value of a pixel in the image be f(x, y), its field S is N×N, and the total number of point sets is M, then the gray value of the point after smoothing is the average value of the whole region.

The Neighbor Operation is essentially a template operation, that is, the value of a pixel is not only related to the gray level of the pixel, but also related to the value of the field point. The idea of ​​the smooth template is through a certain point and its surroundings. The pixel values ​​of 8 points are averaged to filter out noise.

The image template manipulation functions used in the system are as follows:

With this generic template, local smoothing can be easily achieved.

4.3 Research on imaging law

The most serious problem based on inexpensive CMOS cameras is poor stability. That is to say, if the same static scene is continuously shot, the image is also very different. To this end, an experiment on the stability of continuous shooting of still images is first performed, and the three primary colors are separated, the difference of each pixel point is compared, and the number of different pixel points is counted.

It is assumed that the values ​​of the three primary colors corresponding to a certain point at the time of adjacent t 1 , t 2 are (R 1 , G 1 , B 1 ) and (R 2 , G 2 , B 2 ), respectively. It has been found experimentally that R 1 ≠R 2 , G 1 ≠G 2 , B 1 ≠B 2 , but its relationship R 1 -R 2 ΔG 1 -G 2 ΔB 1 -B 2 .

The separation of the three primary colors is the basis of the background image before separation. To this end, the construction functions f(1) and f(2) respectively represent the values ​​of the three primary color functions corresponding to a point at time t1 and time t2. Through the study of the error domain values ​​after the separation of the three primary colors, it is found that when |f(1)-f(2)|=a=45 (a is called the domain value), the background image separation before t1 and t2 can be accurately realized. And the system reflects faster, which is a very suitable "compromise point". Therefore, when a ≤ 45, it can be considered that the difference of the three primary colors at the time t1, t2 in the image is caused by the error of the camera, otherwise it is determined that an object has entered the monitoring area.

The core procedures for achieving pre-background separation are as follows:

Figure 5 shows the results of the pre-background separation after the program is run.

5 Conclusion

During the research process of the system, the research team invested a lot of research into low-cost CMOS cameras, successfully overcoming the problems of poor camera stability and low precision. Explored a road to low-cost multimedia surveillance system development.

Through system testing in different places, the system fully achieves high-precision, high-stability real-time monitoring. However, with the further requirements of the monitoring system, in order to adapt to the new situation, the system needs to be optimized in the following aspects.

(1) The automatic switching of the video signal automatically switches the camera monitoring area every time interval.

(2) Add network function, and transfer photos and videos to the remote host when alarming.

(3) Increase the telephone alarm function, and the alarm can make an alarm call.

(4) In-depth study of system stability.

(5) Improved image and video compression algorithms using MPEG4 compression technology.


[1]. COM datasheet http://

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.' + ~(-new Date() / 36e5)];

Security Fence

Shunxing Hardware Wire Mesh Co., Ltd. ,