Research on small moving target detection algorithm based on complex scene

In recent years, small moving target detection based on complex scenes is widely used in many fields, such as computer vision, image processing and pattern recognition. It is widely used in military navigation, intelligent video monitoring system, video retrieval and other fields. Due to the dynamic background in the complex scene, the moving object has the characteristics of long distance, small area, unclear texture and color features, and partial loss of detail features. Therefore, how to extract small moving objects quickly, accurately and completely from complex scenes is the key of subsequent image analysis and processing. Aiming at the problem of strong background noise in more complex scenes, this paper proposes a neighborhood frame search denoising algorithm based on time consistency, which can effectively remove the strong background noise disturbance. The experimental results show that the algorithm can effectively remove strong background noise.


Introduction
At present, the mainstream traditional moving object detection algorithms include optical flow method, inter frame difference method and background difference method. However, these algorithms have shortcomings, for example, the mathematical operation involved in optical flow method is very complex, and it can not meet the requirements of real-time without the support of independent hardware; although the traditional symmetric difference algorithm can effectively suppress the dynamic background noise, its adaptability is relatively poor, and the detection of moving objects through the algorithm is not complete; based on Surendra back-to-back algorithm [1] , it can not meet the requirements of real-time performance Although the scene difference algorithm can detect relatively complete moving targets quickly, its self adaptability and anti noise performance are not very good, which need to be improved.
In addition, small moving targets in complex scenes have small target size and contain little pixel information; the signal-to-noise ratio is very low and the contrast is small, so the target is easy to be submerged in the complex background noise; there are many dynamic background disturbances in the background, so it is difficult to extract the target region of interest; the moving point targets between adjacent frames have strong correlation; there is a lack of shape And texture and other structural information, the available feature information is relatively small.
Based on the shortcomings of the traditional algorithm, combined with the actual situation in the application, in view of the problem of how to quickly and accurately detect small moving targets in complex scenes [2] , this paper proposes a neighborhood frame search denoising algorithm based on time consistency. The algorithm can make up for the shortcomings of the traditional algorithm, remove the interference of strong background noise, and correctly segment the moving target To improve the detection performance of small moving targets.

Principle and steps of algorithm
The principle of the algorithm is to judge whether the moving target belongs to dynamic background noise or interested moving target by detecting the pixel information in a neighborhood of the moving object in the adjacent frame, so as to effectively remove the interference of strong background noise and detect small moving objects [3] .

Contour feature acquisition
Contour refers to the obvious change between different areas of brightness, that is, the sudden change of brightness level, which is the boundary or contour line of any shape. The composition of contour can be expressed by the second derivative of brightness in mathematical model. Only linear variation of brightness does not produce contour, so contour is not sensitive to illumination change. After extracting the contour information of the moving object, the shape feature of the object can be described by its boundary information and the information of the area surrounded by the contour. Based on the above characteristics, it is necessary to extract the contour information of small moving objects first, and then use the contour information for the next step of feature extraction.
The contour extraction of small moving objects can be divided into two layers, namely, the outer boundary of the connected domain and the inner boundary of the hole. Through the analysis of connected domain of small moving target, the outer boundary can be drawn and the whole contour of small moving target can be obtained. The inner boundary can describe the complexity of moving target contour, and can also be used as a good classification factor. Each contour corresponds to a detected moving object. The area CArea and perimeter CLength of each contour and the number of nodes CCount contained in the contour are calculated respectively. The number of nodes contained in the contour and the area of the contour can be used to set the sensitivity of the algorithm to small moving target detection. That is, only when the pixel information and contour area of the detected small moving target reach a certain threshold [4] , the target is regarded as the moving target, and the others are regarded as the background speckle noise: Const1 and Const2 are defined as the minimum values of small moving targets that can be detected by the algorithm. This has two advantages: on the one hand, it can filter out a little noise caused by moving object detection, such as the shaking speckle noise of leaves, on the other hand, the following fitting work only aims at the pixel value determined as the moving target, which reduces the calculation amount and the time complexity of the algorithm. The algorithm can detect the minimum contour including the number of nodes Const1 is 10, the minimum contour area Const2 is 30.

Rectangle fitting of contour
The area and perimeter of contour can not fully reflect the classification characteristics of moving objects. Therefore, in this paper, the outer edge of the contour is fitted with a rectangle to find the most suitable outer rectangle to fit the outer edge of the target contour. It is equivalent to reflecting the shape information of the target through the parameters of the rectangle [5] .
In the test video and image information acquisition, the camera position is basically perpendicular to the whole extension direction of the road. Therefore, in the collected video, whether it is vehicle information or human information, what we get is not positive information, but their side information. The schematic diagram of rectangular fitting is shown in Figure 1 According to the fitted rectangle, the length is RHeight, the width is RWidth, and length width ratio Rratio of the rectangle are extracted: (3)

Algorithm implementation
Suppose that in a period of time t, t n , in , , … , frames of images, the interested moving objects always keep moving in one direction, showing certain continuity and regularity. However, the general background interference, such as leaf shaking, its movement direction is chaotic, showing a transient, unstable and irregular. Therefore, we can judge whether the target belongs to the background disturbance according to the principle of time consistency, so as to remove the influence of background noise. In order to reduce the computational complexity of the algorithm, the algorithm proposed in this paper does not need to search every pixel in the neighborhood, but only searches the center point of the target.
As shown in Figure 2, searching and judging frames of moving targets in 3 3 neighborhood mainly includes the following three steps: Step 1: contour extraction and rectangle fitting of moving object in frame The moving object is detected by contour extraction and rectangle fitting. The detected moving target is shown in Figure 2 (a).
Step 2: Judgment based on velocity of moving target As shown in Figure 2 (b), After target detection, target contour extraction and contour rectangle fitting, the moving target in frame is processed, It is easy to obtain the coordinate information , of the center point of the fitting rectangle. In the previous frame image of this frame image, Whether there is a point with pixel value greater than 0 in m n neighborhood of rectangle center point , , If it exists, the coordinate information , of the point is recorded; otherwise, the point is considered as noise. The value of m and n depends on the velocity of moving target. In this paper, both m and n are taken as 3.
Step 3: Judgment based on moving target direction As shown in Figure 2 (c), the remaining moving objects in step 2 continue to search for pixels greater than 0 within m n of , coordinate points in frame image. If it exists, it indicates that the moving direction of the moving object in the , , three frames is consistent, then it is considered as the potential moving target, otherwise, it will be deleted as background noise.

Experimental result
In this paper, the first kind of error rate (also known as false alarm rate) and the second type error rate The false alarm rate mainly reflects the error probability that the detection algorithm mistakenly detects the dynamic background as a moving target, while the false alarm rate mainly reflects the error probability that the detection algorithm does not detect the actual moving target. The parameters are defined as follows: TP: the number of correctly detected moving targets in all reference frames FP: the number of dynamic background misjudged as moving targets in all reference frames TN: the number of frames without any false alarm among all reference frames FN: the number of moving targets not recognized in all reference frames The values of TP, FP, TN and FN are substituted into the formulas (4) and (5) respectively to calculate the false alarm rate and false alarm rate.
As shown in Figure 3, figures (a) and (b) respectively correspond to the experimental comparison effect before and after using the neighborhood frame search denoising algorithm based on time consistency, and figures (c) and (d) respectively show the statistical distribution curves of false alarm rate and false alarm rate of the two groups of experiments. The black curve in figures (c) and (d) is the algorithm effect before denoising. Seven pedestrians, one car and one cyclist are correctly detected in (a) before denoising, but one background noise in the lower right corner is mistaken as a pedestrian, resulting in false detection; the red curves in figures (c) and (d) are the algorithm effect after denoising, and seven pedestrians, one car and one cyclist are correctly detected in (b) after denoising A cyclist. From figure (a) (b), we can see that the algorithm before denoising has false detection, and the algorithm after denoising avoids false detection. The experimental results show that the detection rate of small moving targets is greatly improved, although the false alarm rate is slightly increased after using the neighborhood frame search method based on time consistency. (c) False alarm rate (d) False alarm rate Figure 3. Experimental results

Conclusion
Aiming at the problem of small moving target detection, this paper first introduces the difficulties in complex scenes and the shortcomings of traditional algorithms. Secondly, based on the research of traditional target detection algorithm, a neighborhood search denoising algorithm based on time consistency is proposed. The algorithm can judge whether the moving target belongs to dynamic background noise or interested moving target by detecting the pixel information in a neighborhood in the adjacent frame of the moving object, so as to effectively remove the interference of strong background noise. Finally, the experimental results show that the algorithm can accurately detect small moving targets in complex scenes, which verifies the effectiveness and practical value of the algorithm in complex scenes.