Design of video surveillance algorithm along railway based on image processing

Publisher:温馨幸福Latest update time:2010-02-17 Source: 中电网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

In recent years, in many industries involving the safety of life and property, safety monitoring has attracted more and more attention. Safety monitoring in the railway industry has always been a key project of the Ministry of Railways and the country. With the continuous increase in the speed of my country's trains, safety issues cannot be ignored. How to ensure driving safety and pedestrian safety is directly related to the development of the entire railway industry.

The video surveillance method along the railway designed in this paper is to monitor pedestrians crossing the railway line through a video image processing-based method. When a target appears in the monitored area, it can automatically alarm and store the corresponding fault photos, providing a reliable basis for subsequent work. The biggest feature of the algorithm design is to propose a safety monitoring design with image processing as the core. Through image processing, it can automatically determine whether there is a dangerous situation and automatically alarm, especially when the monitoring personnel are not present.

1 Background Extraction in Video Surveillance Systems

Background image refers to an image without moving targets in the field of view. Even if there are moving targets in the field of view, the background algorithm removes the targets through technical processing to obtain a background image without moving targets. At present, conventional background extraction methods include statistical histogram method, statistical median method, multi-frame image averaging method and continuous frame difference method.

The above four methods have their own shortcomings. The problem with the statistical histogram method is that as the number of statistical frames increases, the background image effect is not obvious; the problem with the statistical median method is not much different from the statistical histogram method. In addition, the algorithm has a large amount of calculation when implemented, occupies a large amount of computer memory, and is slow to process; the background image obtained by the multi-frame image averaging method is greatly affected by the target movement. As the number of average frames increases, the noise elimination will be improved; the static background image cannot be obtained directly by the continuous frame difference method. The key is how to obtain a good background image when the target moves. Since the algorithm does not further process the frame difference itself, the problem is that the foreground overlapping area with similar texture is easily mistaken for the background.

Taking into account the above four background extraction methods, this paper adopts a combination of multi-frame image averaging and continuous frame difference to extract the background of the video sequence. Taking into account the diversity of moving targets, the changes caused by targets passing through the field of view can be ignored for a long time. In the multi-frame image averaging method, the moving target is regarded as noise, and the noise is eliminated by cumulative averaging. The background image of the field of view is obtained by averaging the sequence images of the target running for a period of time. The continuous frame difference algorithm finds the moving area through the difference between the image of the current frame and the image of the previous frame. The background of the moving area remains unchanged, while the background of the non-moving area is updated with the current frame. After a period of iteration, the background can be extracted. The combination of the two methods can make up for their respective shortcomings, can adapt to the requirements of the surrounding environment along the railway, and can extract high-quality background images for the background with moving targets. The specific process is as follows:

Considering only three frames, first randomly extract three frames from the video sequence, as shown in Figure 1(a) to Figure 1(c). Then convert the three extracted frames into grayscale images and calculate their grayscale average images, and use the grayscale average image as the first frame image (i.e., the original image) of the continuous frame difference method. The continuous frame difference method is performed on the original image and the three extracted frames, and the grayscale image of the background image is shown in Figure 1(d).

2 Delineation of dangerous areas in the field of view

Starting from the grayscale image of the background image, a series of image processing will be performed to obtain a binary image with the dangerous area marked. First, the background grayscale image is homogenized, followed by image enhancement, image binarization, region marking, image roughness removal and image expansion.

The result after image binarization is shown in Figure 2(a), and the final result is shown in Figure 2(b). From the comparison of the two images, it can be seen that after a series of processing, the dangerous area is basically calibrated. For Figure 2(b), the white area in the figure is the dangerous area inside the double track of the railway. The result image obtained by this method can achieve better results under sufficient lighting conditions, but it is not suitable for calibration of dangerous areas under insufficient lighting conditions and at night.


[page]

3 Automatic saving of images when dangerous situations exist

Since the video is shot parallel to the ground, the field of view is very wide. If the entire railway line is monitored, the surrounding environment will cause great interference to the image processing. Therefore, in order to achieve a better monitoring effect, only a certain area along the line is considered. The monitoring area selected in this paper is: the row position is from 346 to 386 pixels, and the column position is from 341 to 370 pixels. The video to be monitored is 25 frames/s, and one frame is extracted from the video every second for monitoring. For each frame of the image to be monitored, the image must be preprocessed first. The processing steps include conversion to grayscale, binarization, image expansion, etc. The preprocessed image is ANDed with Figure 2(b), and then the resulting image is counted for pixels in the monitoring area.

First, set a counter counter and set its initial value to 0. Perform binary judgment on each pixel in the monitoring area. If the value of the pixel is 0 (i.e., a black point), the counter automatically increases by 1. After each point in the monitoring area has been judged, the value of the counter is judged again. If the value of the counter is greater than 200 (indicating that the monitoring area is greatly disturbed, i.e., someone has entered), the current frame to be monitored is automatically saved in the form of a grayscale image. If the value of the counter is less than or equal to 200 (indicating that the monitoring area is not disturbed enough), the monitoring of this frame ends, the image is not saved, and the next frame is monitored.

The above processing is performed on each frame. After a period of monitoring, the system will automatically save some images (in grayscale form) when dangerous situations exist. The flow chart of the automatic image saving method is shown in Figure 3.


From the monitoring results, we can see that we get a series of images when dangerous situations exist. Some of the results of automatically saved images are shown in Figure 4. These images are automatically extracted from 10 minutes of video data. From these images, we can analyze the recognition rate of the entire design. The recognition rate affects the quality of algorithm design and program writing.


[page]

The total number of people passing through the railway track is about 114. The computer successfully identified 99 people's deviance, 15 people's deviance was not identified by the computer, and 9 people were identified by the computer even though they did not have any deviance. The success rate of monitoring results = (99÷114)×100%=86.8%; the underreporting rate of monitoring results = (15÷114)×100%=13.2%; the false alarm rate of monitoring results = (9÷114)×100%=7.9%.

4. A target recognition algorithm

Moving targets on the railway are mainly divided into: pedestrians, vehicles, small animals and others.

Before identifying the target, the necessary image processing must be performed on the automatically saved grayscale image when the dangerous situation exists. The purpose is to lay the foundation for subsequent target recognition and make the processed image more convenient for target recognition. Here, image preprocessing mainly includes enhancing image contrast, median filtering and smoothing. The flowchart of the target recognition algorithm is shown in Figure 5.

According to the classification of moving targets, the circumference of a vehicle is the longest, so first directly determine the circumference of the moving target in the image. If it is greater than a certain set threshold, it can be easily determined that the target in the field of view belongs to a vehicle. Among the remaining targets, pedestrians have a larger ratio of the vertical axis to the horizontal axis than small animals. The vertical axis ratio threshold is set, and the target can be determined to be a pedestrian. Finally, an area threshold is set. If the area is greater than this threshold, it can be determined that the target belongs to a small animal. Otherwise, the target belongs to some other environmental interference.

5 Conclusion

This paper first extracts the background of the captured video, and finally delineates the dangerous area in the field of view through a series of image processing based on the extracted background. Then the system automatically monitors the video data and automatically saves the image when the dangerous situation exists in the form of grayscale images for the purpose of subsequent target recognition. Finally, based on the possible moving targets along the railway, a moving target recognition algorithm is proposed. It can be seen from the monitoring results that the entire algorithm design has certain feasibility and can be used as an algorithm for video monitoring along the railway based on image processing, which has certain reference value.

Reference address:Design of video surveillance algorithm along railway based on image processing

Previous article:Application of fanless industrial computers in electronic police intelligent monitoring system
Next article:Application of BIS-6591 in intelligent monitoring system

Recommended Content
Latest Security Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号