# Technical Research on Moving Target Monitoring and Intelligent Tracking Algorithm Based on Machine Vision

Authors: Pengfei Xu; Zhiqing Zhou; Zexun Geng
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Machine vision is an important branch of the rapid development of modern artificial intelligence, and it is a key technology to convert the image information of monitoring targets into digital signals. However, due to the wide range of machine vision applications, this research focuses on its application in video surveillance. In the era of artificial intelligence, the detection and tracking of moving objects have always been a key issue in video surveillance. The simulation of human vision is realized by combining the relevant functions of the computer and the image acquisition device, which enables the computer to have the ability to recognize the surrounding environment through images. The intelligent video analysis technology can automatically analyze and extract the key useful information from the video source with the powerful data processing ability of the computer, so as to realize the computer’s “understanding” of the video. It allows the computer to “understand” what is shown in the video or what kind of “event” happened and provides a new method and reliable basis for accident detection and accident analysis. Therefore, after a brief introduction to machine vision, moving target monitoring methods, and intelligent tracking algorithms, this paper will focus on moving target monitoring and intelligent tracking strategies for video surveillance. In addition, this paper will focus on introducing the principle of intelligent tracking algorithm through formulas and compare the accuracy and success rate of target monitoring and intelligent tracking between the machine vision-based algorithm and other algorithms during the experiment. Finally, experiments show that the monitoring and tracking effect of machine vision combined with “cloud” is the best, and the overall average can reach 85.7%. Based on this, this paper fully confirms the feasibility of the moving target monitoring and intelligent tracking algorithm based on machine vision.


---

## Body

## 1. Introduction

With the continuous development of science and technology, video surveillance has been widely used in banking, electricity, transportation, and other fields. The global demand for video surveillance is also growing rapidly, and the expectations for its personalization and intelligence are getting higher and higher. However, the basic operation of surveillance video is still mainly processed manually. Moreover, due to many limitations of hardware, the monitored images are sometimes not clear, especially when there are multiple moving targets at the same time; there may be cases where effective information cannot be obtained. At this time, only relying on video surveillance staff to identify surveillance images or videos and make corresponding judgments will bring huge challenges to the real time and accuracy of information. In the era of artificial intelligence, moving target monitoring and intelligent tracking are not only an important part of computer vision research but also the focus of cloud storage and cloud computing. The application of video surveillance technology based on machine vision can transform traditional manual passive monitoring into active machine monitoring, thereby freeing the on-duty personnel in the monitoring room from the heavy work of “staring” at the screen. Machine vision can quickly detect and track video information with the same characteristics from massive data, greatly improving the efficiency of information and resource utilization and improving the overall performance of video surveillance systems. Cloud-based machine vision technology enables object detection and identification of moving objects with little or no human intervention. Therefore, in today’s environment, the research of machine vision is very necessary.The innovation of this study is the following:(1)
The machine vision tracking algorithm combined with “cloud” is used to realize the capture of video surveillance targets, and at the same time, the robustness of the algorithm is also well reflected in the aspect of intelligent tracking(2)
This research takes video surveillance as a specific direction and proposes a cloud-based machine vision technology that integrates identification, monitoring, and tracking, which will provide new ideas for future research in this field(3)
This study also studies the specific movements of the moving target, which is novel to a certain extent, and there is no research that is the same as this part in the existing research materials


## 2. Related Work

Many experts and scholars at home and abroad have put forward a lot of opinions on the research related to machine vision, moving target monitoring, and tracking algorithms.Robie et al. have mainly studied several methods based on machine vision: methods for recording high-quality videos for automated analysis, video-based tracking algorithms for estimating the position of interacting animals, and machine learning methods for identifying interaction patterns [1].Zhao et al. first proposed an IoT and digital twin tracking solution framework for security management and then developed an indoor security tracking mechanism for detecting stationary behavior and possessing automatic learning genetic localization technology. It is mainly used to identify abnormal situations and obtain accurate location information in real time [2].Liang and Zhi locate the region of interest and select it by automatically adjusting the rotation of the camera to achieve the purpose of tracking and identifying moving targets, and on the basis of further analysis, the target monitoring is achieved [3].Wang et al. proposed a system for remotely monitoring the displacement of moving objects. It uses quadrature self-injection-locked (QSIL) radars and additional phase shifters for conventional SIL radars to repeatedly switch the phase delay of the injected signal between 0 and 90 degrees. Therefore, it can be used to determine the displacement of moving targets without distortion due to large injection angles. In addition, they also proposed a measurement-and-difference-based method for calibrating the DC and phase offsets before performing arctangent demodulation to extract displacement information [4].Danion and Randall point out that the ability to track moving objects with smooth eye movements is crucial in both perception and action tasks. In the study, they had participants observe a visual target. The target follows a smooth but unpredictable trajectory in the horizontal plane and is instructed to track the target with their gaze or a joystick-controlled cursor [5].Wu et al. studied the tracking of moving targets by single-photon lidar (SPL) in the marine aerosol environment and introduced a tracking algorithm to deal with the ion-scattered electrical signals of SPL. In addition, they also proposed a two-stage (TS) dynamic model with an adaptive strong Kalman filter based on the SPL tracking technique [6].From the perspective of control system design, Li et al. studied the two guidance laws of multiple autonomous UAVs for coordinated tracking of static and moving targets outside the defense zone. It adopts quantitative analysis method, fixes relevant parameters, only measures one neighbor in the communication topology network, and uses guidance laws to track static or moving targets [7].


## 3. Machine Vision and Moving Target Monitoring and Intelligent Tracking Algorithms

### 3.1. Machine Vision

Machine vision is a comprehensive technology in artificial intelligence, which mainly deals with target information including images and videos [8]. After that, the target image information is output as digital information through machine vision processing, so as to achieve the purpose of processing target object information and performing other analysis operations. The application areas of machine vision are shown in Figure 1.Figure 1
Application areas of machine vision.Machine vision is generally used in working environments that are unbearable for manual operations or occasions where artificial vision is difficult to meet the needs. At the same time, machine vision monitoring and tracking can greatly improve the automation of production. Moreover, machine vision can easily realize the integration of information, which is one of the basic technologies of modern computer integrated manufacturing [9]. The working principle of machine vision is shown in Figure 2.Figure 2
The working principle of machine vision.


### 3.2. Moving Target Monitoring in Video Surveillance

In order to realize real-time monitoring of moving objects in video surveillance, the first thing to do is to detect the moving objects from the image sequence. The background model is obtained by the statistical method, and the model is updated in real time to adapt to the changes of light and scene, and then, the morphological method and the area of the connected domain are used for postprocessing. The detection effect directly depends on the accuracy of the image preprocessing operation. The specific implementation process of moving target monitoring is shown in Figure3.Figure 3
The specific implementation process of moving target monitoring.


#### 3.2.1. Image Filtering

Images or videos collected by machines are usually easily interfered by external factors such as illumination transformation or object motion [10, 11], thus affecting the useful information in detection. Interference is usually called noise, which is mainly generated under the influence of the external environment. Due to the interference of noise, several isolated pixels will appear on the image or video. If these pixels are not filtered in advance, it will have a huge impact on our subsequent image monitoring, judgment, and tracking. Different filters can be used to denoise according to the characteristics of the noise. Several commonly used filtering methods are introduced.(1) Mean Filter. Mean filtering, as the name suggests, is to filter the video image by taking the average value. The working principle of the filter is to first select an area composed of several pixels for the pixel to be processed m,n and then randomly take the average value of the pixel values in the area to replace the original pixel value. The formula can be expressed as
(1)fm,n=1M∑i,j∈Ngi,j.In the formula,fm,n represents the final result value of filtering, N is the target area, and M is the number of pixels in the target area N. The degree of filtering is related to the size of N.(2) Median Filter. Median filtering and mean filtering have certain commonality in method. The difference is that the median filter replaces the value of each pixel in the region with the median value.The specific method is shown in(2)f=meda1,a2=mn+1,12mm+1.In the formula,a1 and a2 are ordered number sequences and f represents the median value in the number sequence.In order to objectively evaluate the effect of these two filtering methods, this paper introduces the peak signal-to-noise ratio (PSNR) as the standard of image evaluation. PSNR is one of the most widely used image quality evaluation methods at present, and its definition is shown in(3)PSNR=10×lgxmax2MSE.In the formula,xmax is the maximum value of the original image noise, MSE is the mean square error, and its definition formula is as follows:
(4)MSE=1AB∑m=1M∑n−1Nyka,b−yk−1a,b2.In the formula,A and B represent the length and width of the image, respectively, and yka,b and yk‐1a,b represent the current image noise value and the reference noise value, respectively.By calculating the PSNR value of the filtering method, we found that the PSNR value of the median filter is the highest, which means that the median filter has the best filtering effect, and the noise suppression effect is the best choice in the filtering technology. Moreover, since the median filter does not produce image edge blur, it can better preserve the edge characteristics of the image to facilitate subsequent edge extraction. Therefore, in this study, median filtering is selected as the image filtering processing technique in image preprocessing.


#### 3.2.2. Moving Target Monitoring Method

After preprocessing the image, we believe that we can easily find and detect the region containing moving objects in the video or image sequence. At the same time, we use methods such as image segmentation to detect and optimize the best description function of the moving target area to avoid the dynamic environment and the impact on the detection. The following are some commonly used moving target monitoring methods.(1) Time Difference Method. The time difference method, also known as the interframe difference method, is one of the simplest and most commonly used moving target monitoring methods. The working principle of the method is to calculate the time difference between the images of two adjacent frames or adjacent multiple frames in the image and perform thresholding processing on the difference image. The time difference method is relatively simple to implement in principle and operation method and can realize fast positioning and detection of moving targets. It has a good self-adaptive ability to the real-time changes of the monitoring scene and is suitable for monitoring occasions with high real-time requirements. However, this method is limited by the moving speed of the target. On the one hand, if the target moves too fast, the intersection of two consecutive frames may be empty, and it will be very difficult to precisely locate the moving target. On the other hand, if the target stops moving, there will be cases where the presence of a moving target cannot be detected.(2) Background Subtraction. In order to better obtain the complete information of the moving target area, the background subtraction method came into being. It first analyzes the sequence of the acquired video or image on the time scale and then uses the sequence to analyze the pattern changes in the video surveillance scene and then establishes a mathematical model of the video or image. Finally, it realizes the monitoring of moving objects by comparing the background of the image and the video surveillance scene. The advantage of this method is that the principle and calculation are very simple, and the operation speed is relatively fast.(3) Optical Flow Method. The optical flow method refers to the speed of pattern motion in time-varying images, which was first proposed in the 1940s [12]. In moving object detection, the optical flow method estimates the motion field according to the image sequence and then distinguishes the background and foreground of the image according to the change of the motion field. The optical flow method contains the motion information of the monitored target, so it not only can be used for moving target detection but also can be used for target tracking directly. At the same time, the optical flow method can realize the monitoring and tracking of moving objects in dynamic and static backgrounds.(4) Feature Matching Method. When the camera moves, the foreground and background points of the video image will become indistinguishable, and background modeling is difficult to establish. Considering the interference of system noise and environmental noise in the real monitoring environment, the idea of using the relevant features of moving objects to realize moving object detection comes into being. The core content of the so-called feature matching method is to use different methods for target modeling for different types of moving targets and then use the target classification method of pattern recognition to achieve real-time detection of moving targets. The process generally includes the following:Learning process: use the foreground and background information of the target as positive samples and negative samples to train the classifier, and the classifier uses a large amount of training data to achieve certain results through operations.Judgment process: calculate the similar features of the current image, use the trained classifier to judge the category, and update the corresponding parameters of the classifier in time according to the judgment result.


### 3.3. Target Intelligent Tracking in Video Surveillance

Intelligent tracking of moving objects is achieved on the basis of successful detection in videos or images [13]. The key to the real-time and effective tracking of moving objects is how to quickly and effectively realize the correlation matching of each moving object in the video image sequence. The basic realization process is shown in Figure 4. Its operation process mainly includes the following:
(1)
Use the moving object detection method to realize the effective detection of motion, extract the characteristics of the moving object on the basis of the effective segmentation of the moving object, and construct a representation model of the moving object feature(2)
Detect the newly entered moving object in the scene, extract its effectively expressed motion features, and define the state of the newly detected moving object through the analysis and matching of the motion features(3)
Utilize the tracking result of the target to update the feature information of the moving target and its tracking model, and estimate the possible motion state information of the tracking targetFigure 4
Target intelligent tracking process realization.


#### 3.3.1. Target Matching

Target matching is to calculate the similarity and relevance of the target to be detected and use data to measure. The association matching of moving objects will change due to changes in the video surveillance scene. The plane elastic constraint is an effective target constraint method, which can match the points at the same position in the two video images through the plane homography matrix to obtain the matching target. At the same time, for the points in different video images, it can also reestablish the matching between the target and the target by means of 3D reconstruction. There are generally the following methods to obtain the association matching between moving objects.(1) SURF Feature Detection Method. In 1999, some scholars proposed the SIFT algorithm to sample and reconstruct images to obtain multi-image data, but its computational complexity was too high and was discarded later. In 2006, on the basis of SIFT, a SURF (Speed-up Robust Feature) method based on acceleration robustness was proposed. Its basic idea is to use the median filter to construct the scale space and use the integral in the scale space to quickly complete the image matching.(2) Feature Point Recognition Method. After the features of the two video images are basically generated and determined, the SURF algorithm describes the Euclidean distance of the vector based on this feature as a measure of the similarity between the images. But this method has certain limitations. The specific method of feature point-based recognition is to randomly acquire a feature point in the image A at first. Then, it looks for the feature point with the smallest Euclidean distance in the image B and finds two points with the smallest distance from it, namely, the optimal matching point and the second optimal matching point. At this time, if the ratio of the closest distance to the next closest distance is less than a fixed value, this pair of matching points is selected. But if the two are very close, it might be wrong to choose one of them, thus rejecting both matching points. By reducing the preset ratio threshold, although the number of matching feature points obtained will be less, the matching result will be more accurate and stable.(3) Local Feature Method. The three-dimensional matching method based on local features includes several steps such as key point search, key point quality calculation, feature extraction, and target matching. The initialization of the 3D model can be described as follows: first, the local features of the scene image are extracted, and the scene is matched with a series of local depth images from different perspectives used in the reconstruction of the 3D model to find the depth image with the largest matching point with the scene. This shows that in this series of depth images from different perspectives, this image is the most similar to the pose of the target in the scene. After initializing the 3D model offline, the scene image is retrieved with the described algorithm to retrieve the target to be matched in the cluttered scene, that is, to find some key points that roughly match the model. All the point clouds outside the continuous surface where these key points are located are removed, which is background segmentation.(4) ICP Method of Fusion Texture. Using two point sets, Euclidean distance sum formula and singular value decomposition method to calculate the value, iteratively update until the preset error threshold is met. The algorithm only considers the geometric information of the image, which is prone to more mismatch points. It also expands the idea of the traditional ICP algorithm and changes the traditional ICP algorithm using only the Euclidean distance of geometric coordinates as the basis for finding the closest point to a six-dimensional distance formula that combines geometric information and texture information. It uses the geometric information and texture information separately. Compared with the Color_ICP algorithm, since only the geometric information is used in the search, it improves the speed of the nearest point search; that is, the matching efficiency can be improved.


#### 3.3.2. Target Tracking

The tracking problem of moving objects is a very challenging research direction. When the moving target moves in the scene, its motion state and its corresponding motion information are changing in real time, and the objective environment of the monitoring scene is also dynamically adjusted. At the same time, it takes into account the mutual occlusion between moving objects when moving and the reciprocating entry and exit of the moving target in the monitoring scene building; also, the movement of the related monitoring and acquisition equipment and the network transmission rate of the monitoring video data may have a huge impact on the results of target tracking. Therefore, in practical applications, target tracking is carried out in experiments and tests in a hypothetical monitoring environment. For different monitoring environments and moving target characteristics, researchers have proposed many classical tracking algorithms [14, 15].(1) Kalman Filter. The Kalman filter problem is simply a problem of predicting a target state, that is, using the existing state information to predict and estimate its possible motion state through statistical operations. And it reduces the gap between the estimated value and the actual measured value as much as possible, and its description formula is as follows:
(5)Yk+1=Cxk+Duk+vk.Among them,C and D are both system state matrices, and random signals uk and vk represent system process noise and measurement noise, respectively.(2) Mean Shift Tracking Method. The mean shift algorithm was first proposed in 1975, and its original meaning was the mean vector of the shift. But with the development of the theory, its meaning has undergone many changes. Now usually it refers to an iterative step, which is a hill-climbing algorithm based on kernel density estimation, which can be used for clustering, image segmentation, tracking, etc. The tracking of moving objects using the mean shift method is mainly composed of the following steps:
(1)
Construct the feature representation model of the moving target(6)Qu=C∑i=1ngx0−xihi∂axi2−u.The kernel function isgx, h represents the bandwidth of the function, and C is the correlation coefficient of the normalized function. When ∑u=1mQu=1, it can get
(7)C=1∑i=1nkx0−hi.(2)
Establish a description model of the target candidate regionSimilar to the steps, if the particle coordinate of the candidate target region isy, then the kernel function can be calculated by the following formula:
(8)Puy=Ch∑i=1nk∂bxi−u,where Ch is the correlation coefficient of the normalized function, when ∑u=1mPuy=1:
(9)Ch=1∑i=1nkx0−hi.(3)
Similarity measurement between the moving target feature description model and the candidate region modelIn the similarity measurement of the color histogram distribution between the moving target feature description model and the candidate region model, the Bhattacharyya coefficient is commonly used in the mean shift tracking method. The formula for calculating the coefficient is as follows:(10)dy=1−qy.Among them,qy represents the Bhattacharyya coefficient of the moving target description model and the candidate area model.
(11)qy=qqy,s=∑u=1mquy,s.The mathematical meaning of this coefficient is that the larger the value ofqy, the higher the similarity between the moving target description model and the candidate area model; that is, the moving target candidate area corresponding to qy is the current real coordinate position of the moving target we are looking for.
(4)
Positioning of moving targetsAccording to the similarity measurement result between the moving object description model and the candidate area model, when positioning the moving object, the center positiony of the moving object in the previous frame of the image is the starting point. It calculates the best matching moving object location area in the current image frame and assigns the centroid of this area to y. Using Taylor’s formula for the candidate region model qy in the current graphics frame, it can be expanded to get
(12)pqy,q^≈12∑u=1mqy0,qu+Ch2∑i=1nhwiky−xi2,(13)wi=∑u=1m∂bxi−uqupuy0.It is observed that formula (12) has nothing to do with y, then let
(14)gn,k=Ch2∑i=1nwiky−xi2.When formula (14) reaches the maximum value, the matching and positioning of the moving target are completed. Through correlation calculation, the particle y of the current moving target position region can be obtained by iterative calculation from y0, as shown in
(15)y1=∑i=1nhxiwigy−xi2∑i=1nhwigy−xi2.Among them,gk=−kx. The target monitoring efficiency of this algorithm is better than that of other algorithms, but this method often needs multiple iterations to complete the positioning of moving targets during calculation.Through the analysis and calculation of the Kalman filter and the mean shift method, we can conclude that the Kalman filter realizes the prediction and update of the motion state of the moving target through the ideal linear estimation of the real-time monitoring scene. Its implementation is relatively simple, and it has good real-time application capabilities for monitoring scenarios with relatively simple environments. Unfortunately, the state model and measurement model of the real tracking system are mostly nonlinear. When the nonlinearity is relatively strong, the Kalman filter usually cannot obtain practical results. The mean shift tracking method uses the color histogram distribution of the moving target area as a feature description model. It calculates the optimal value of the similarity through the iterative recursive formula through the similarity measure of the feature model between each moving target, so as to realize the real-time tracking and positioning of the moving target. The algorithm is a parameter-free similarity matching algorithm for kernel density estimation, which has a good adaptability to the nonlinear changing monitoring scene environment. But its disadvantage is that it often ignores the spatial information of the moving target, especially when the tracking target moves too fast or is occluded.Therefore, according to the environmental characteristics of actual video surveillance, this paper decides to use the basic principle of the mean shift tracking algorithm and organically integrate the median filter image processing technology and proposes a target intelligent tracking strategy based on machine vision.


## 3.1. Machine Vision

Machine vision is a comprehensive technology in artificial intelligence, which mainly deals with target information including images and videos [8]. After that, the target image information is output as digital information through machine vision processing, so as to achieve the purpose of processing target object information and performing other analysis operations. The application areas of machine vision are shown in Figure 1.Figure 1
Application areas of machine vision.Machine vision is generally used in working environments that are unbearable for manual operations or occasions where artificial vision is difficult to meet the needs. At the same time, machine vision monitoring and tracking can greatly improve the automation of production. Moreover, machine vision can easily realize the integration of information, which is one of the basic technologies of modern computer integrated manufacturing [9]. The working principle of machine vision is shown in Figure 2.Figure 2
The working principle of machine vision.


## 3.2. Moving Target Monitoring in Video Surveillance

In order to realize real-time monitoring of moving objects in video surveillance, the first thing to do is to detect the moving objects from the image sequence. The background model is obtained by the statistical method, and the model is updated in real time to adapt to the changes of light and scene, and then, the morphological method and the area of the connected domain are used for postprocessing. The detection effect directly depends on the accuracy of the image preprocessing operation. The specific implementation process of moving target monitoring is shown in Figure3.Figure 3
The specific implementation process of moving target monitoring.


### 3.2.1. Image Filtering

Images or videos collected by machines are usually easily interfered by external factors such as illumination transformation or object motion [10, 11], thus affecting the useful information in detection. Interference is usually called noise, which is mainly generated under the influence of the external environment. Due to the interference of noise, several isolated pixels will appear on the image or video. If these pixels are not filtered in advance, it will have a huge impact on our subsequent image monitoring, judgment, and tracking. Different filters can be used to denoise according to the characteristics of the noise. Several commonly used filtering methods are introduced.(1) Mean Filter. Mean filtering, as the name suggests, is to filter the video image by taking the average value. The working principle of the filter is to first select an area composed of several pixels for the pixel to be processed m,n and then randomly take the average value of the pixel values in the area to replace the original pixel value. The formula can be expressed as
(1)fm,n=1M∑i,j∈Ngi,j.In the formula,fm,n represents the final result value of filtering, N is the target area, and M is the number of pixels in the target area N. The degree of filtering is related to the size of N.(2) Median Filter. Median filtering and mean filtering have certain commonality in method. The difference is that the median filter replaces the value of each pixel in the region with the median value.The specific method is shown in(2)f=meda1,a2=mn+1,12mm+1.In the formula,a1 and a2 are ordered number sequences and f represents the median value in the number sequence.In order to objectively evaluate the effect of these two filtering methods, this paper introduces the peak signal-to-noise ratio (PSNR) as the standard of image evaluation. PSNR is one of the most widely used image quality evaluation methods at present, and its definition is shown in(3)PSNR=10×lgxmax2MSE.In the formula,xmax is the maximum value of the original image noise, MSE is the mean square error, and its definition formula is as follows:
(4)MSE=1AB∑m=1M∑n−1Nyka,b−yk−1a,b2.In the formula,A and B represent the length and width of the image, respectively, and yka,b and yk‐1a,b represent the current image noise value and the reference noise value, respectively.By calculating the PSNR value of the filtering method, we found that the PSNR value of the median filter is the highest, which means that the median filter has the best filtering effect, and the noise suppression effect is the best choice in the filtering technology. Moreover, since the median filter does not produce image edge blur, it can better preserve the edge characteristics of the image to facilitate subsequent edge extraction. Therefore, in this study, median filtering is selected as the image filtering processing technique in image preprocessing.


### 3.2.2. Moving Target Monitoring Method

After preprocessing the image, we believe that we can easily find and detect the region containing moving objects in the video or image sequence. At the same time, we use methods such as image segmentation to detect and optimize the best description function of the moving target area to avoid the dynamic environment and the impact on the detection. The following are some commonly used moving target monitoring methods.(1) Time Difference Method. The time difference method, also known as the interframe difference method, is one of the simplest and most commonly used moving target monitoring methods. The working principle of the method is to calculate the time difference between the images of two adjacent frames or adjacent multiple frames in the image and perform thresholding processing on the difference image. The time difference method is relatively simple to implement in principle and operation method and can realize fast positioning and detection of moving targets. It has a good self-adaptive ability to the real-time changes of the monitoring scene and is suitable for monitoring occasions with high real-time requirements. However, this method is limited by the moving speed of the target. On the one hand, if the target moves too fast, the intersection of two consecutive frames may be empty, and it will be very difficult to precisely locate the moving target. On the other hand, if the target stops moving, there will be cases where the presence of a moving target cannot be detected.(2) Background Subtraction. In order to better obtain the complete information of the moving target area, the background subtraction method came into being. It first analyzes the sequence of the acquired video or image on the time scale and then uses the sequence to analyze the pattern changes in the video surveillance scene and then establishes a mathematical model of the video or image. Finally, it realizes the monitoring of moving objects by comparing the background of the image and the video surveillance scene. The advantage of this method is that the principle and calculation are very simple, and the operation speed is relatively fast.(3) Optical Flow Method. The optical flow method refers to the speed of pattern motion in time-varying images, which was first proposed in the 1940s [12]. In moving object detection, the optical flow method estimates the motion field according to the image sequence and then distinguishes the background and foreground of the image according to the change of the motion field. The optical flow method contains the motion information of the monitored target, so it not only can be used for moving target detection but also can be used for target tracking directly. At the same time, the optical flow method can realize the monitoring and tracking of moving objects in dynamic and static backgrounds.(4) Feature Matching Method. When the camera moves, the foreground and background points of the video image will become indistinguishable, and background modeling is difficult to establish. Considering the interference of system noise and environmental noise in the real monitoring environment, the idea of using the relevant features of moving objects to realize moving object detection comes into being. The core content of the so-called feature matching method is to use different methods for target modeling for different types of moving targets and then use the target classification method of pattern recognition to achieve real-time detection of moving targets. The process generally includes the following:Learning process: use the foreground and background information of the target as positive samples and negative samples to train the classifier, and the classifier uses a large amount of training data to achieve certain results through operations.Judgment process: calculate the similar features of the current image, use the trained classifier to judge the category, and update the corresponding parameters of the classifier in time according to the judgment result.


## 3.2.1. Image Filtering

Images or videos collected by machines are usually easily interfered by external factors such as illumination transformation or object motion [10, 11], thus affecting the useful information in detection. Interference is usually called noise, which is mainly generated under the influence of the external environment. Due to the interference of noise, several isolated pixels will appear on the image or video. If these pixels are not filtered in advance, it will have a huge impact on our subsequent image monitoring, judgment, and tracking. Different filters can be used to denoise according to the characteristics of the noise. Several commonly used filtering methods are introduced.(1) Mean Filter. Mean filtering, as the name suggests, is to filter the video image by taking the average value. The working principle of the filter is to first select an area composed of several pixels for the pixel to be processed m,n and then randomly take the average value of the pixel values in the area to replace the original pixel value. The formula can be expressed as
(1)fm,n=1M∑i,j∈Ngi,j.In the formula,fm,n represents the final result value of filtering, N is the target area, and M is the number of pixels in the target area N. The degree of filtering is related to the size of N.(2) Median Filter. Median filtering and mean filtering have certain commonality in method. The difference is that the median filter replaces the value of each pixel in the region with the median value.The specific method is shown in(2)f=meda1,a2=mn+1,12mm+1.In the formula,a1 and a2 are ordered number sequences and f represents the median value in the number sequence.In order to objectively evaluate the effect of these two filtering methods, this paper introduces the peak signal-to-noise ratio (PSNR) as the standard of image evaluation. PSNR is one of the most widely used image quality evaluation methods at present, and its definition is shown in(3)PSNR=10×lgxmax2MSE.In the formula,xmax is the maximum value of the original image noise, MSE is the mean square error, and its definition formula is as follows:
(4)MSE=1AB∑m=1M∑n−1Nyka,b−yk−1a,b2.In the formula,A and B represent the length and width of the image, respectively, and yka,b and yk‐1a,b represent the current image noise value and the reference noise value, respectively.By calculating the PSNR value of the filtering method, we found that the PSNR value of the median filter is the highest, which means that the median filter has the best filtering effect, and the noise suppression effect is the best choice in the filtering technology. Moreover, since the median filter does not produce image edge blur, it can better preserve the edge characteristics of the image to facilitate subsequent edge extraction. Therefore, in this study, median filtering is selected as the image filtering processing technique in image preprocessing.


## 3.2.2. Moving Target Monitoring Method

After preprocessing the image, we believe that we can easily find and detect the region containing moving objects in the video or image sequence. At the same time, we use methods such as image segmentation to detect and optimize the best description function of the moving target area to avoid the dynamic environment and the impact on the detection. The following are some commonly used moving target monitoring methods.(1) Time Difference Method. The time difference method, also known as the interframe difference method, is one of the simplest and most commonly used moving target monitoring methods. The working principle of the method is to calculate the time difference between the images of two adjacent frames or adjacent multiple frames in the image and perform thresholding processing on the difference image. The time difference method is relatively simple to implement in principle and operation method and can realize fast positioning and detection of moving targets. It has a good self-adaptive ability to the real-time changes of the monitoring scene and is suitable for monitoring occasions with high real-time requirements. However, this method is limited by the moving speed of the target. On the one hand, if the target moves too fast, the intersection of two consecutive frames may be empty, and it will be very difficult to precisely locate the moving target. On the other hand, if the target stops moving, there will be cases where the presence of a moving target cannot be detected.(2) Background Subtraction. In order to better obtain the complete information of the moving target area, the background subtraction method came into being. It first analyzes the sequence of the acquired video or image on the time scale and then uses the sequence to analyze the pattern changes in the video surveillance scene and then establishes a mathematical model of the video or image. Finally, it realizes the monitoring of moving objects by comparing the background of the image and the video surveillance scene. The advantage of this method is that the principle and calculation are very simple, and the operation speed is relatively fast.(3) Optical Flow Method. The optical flow method refers to the speed of pattern motion in time-varying images, which was first proposed in the 1940s [12]. In moving object detection, the optical flow method estimates the motion field according to the image sequence and then distinguishes the background and foreground of the image according to the change of the motion field. The optical flow method contains the motion information of the monitored target, so it not only can be used for moving target detection but also can be used for target tracking directly. At the same time, the optical flow method can realize the monitoring and tracking of moving objects in dynamic and static backgrounds.(4) Feature Matching Method. When the camera moves, the foreground and background points of the video image will become indistinguishable, and background modeling is difficult to establish. Considering the interference of system noise and environmental noise in the real monitoring environment, the idea of using the relevant features of moving objects to realize moving object detection comes into being. The core content of the so-called feature matching method is to use different methods for target modeling for different types of moving targets and then use the target classification method of pattern recognition to achieve real-time detection of moving targets. The process generally includes the following:Learning process: use the foreground and background information of the target as positive samples and negative samples to train the classifier, and the classifier uses a large amount of training data to achieve certain results through operations.Judgment process: calculate the similar features of the current image, use the trained classifier to judge the category, and update the corresponding parameters of the classifier in time according to the judgment result.


## 3.3. Target Intelligent Tracking in Video Surveillance

Intelligent tracking of moving objects is achieved on the basis of successful detection in videos or images [13]. The key to the real-time and effective tracking of moving objects is how to quickly and effectively realize the correlation matching of each moving object in the video image sequence. The basic realization process is shown in Figure 4. Its operation process mainly includes the following:
(1)
Use the moving object detection method to realize the effective detection of motion, extract the characteristics of the moving object on the basis of the effective segmentation of the moving object, and construct a representation model of the moving object feature(2)
Detect the newly entered moving object in the scene, extract its effectively expressed motion features, and define the state of the newly detected moving object through the analysis and matching of the motion features(3)
Utilize the tracking result of the target to update the feature information of the moving target and its tracking model, and estimate the possible motion state information of the tracking targetFigure 4
Target intelligent tracking process realization.


### 3.3.1. Target Matching

Target matching is to calculate the similarity and relevance of the target to be detected and use data to measure. The association matching of moving objects will change due to changes in the video surveillance scene. The plane elastic constraint is an effective target constraint method, which can match the points at the same position in the two video images through the plane homography matrix to obtain the matching target. At the same time, for the points in different video images, it can also reestablish the matching between the target and the target by means of 3D reconstruction. There are generally the following methods to obtain the association matching between moving objects.(1) SURF Feature Detection Method. In 1999, some scholars proposed the SIFT algorithm to sample and reconstruct images to obtain multi-image data, but its computational complexity was too high and was discarded later. In 2006, on the basis of SIFT, a SURF (Speed-up Robust Feature) method based on acceleration robustness was proposed. Its basic idea is to use the median filter to construct the scale space and use the integral in the scale space to quickly complete the image matching.(2) Feature Point Recognition Method. After the features of the two video images are basically generated and determined, the SURF algorithm describes the Euclidean distance of the vector based on this feature as a measure of the similarity between the images. But this method has certain limitations. The specific method of feature point-based recognition is to randomly acquire a feature point in the image A at first. Then, it looks for the feature point with the smallest Euclidean distance in the image B and finds two points with the smallest distance from it, namely, the optimal matching point and the second optimal matching point. At this time, if the ratio of the closest distance to the next closest distance is less than a fixed value, this pair of matching points is selected. But if the two are very close, it might be wrong to choose one of them, thus rejecting both matching points. By reducing the preset ratio threshold, although the number of matching feature points obtained will be less, the matching result will be more accurate and stable.(3) Local Feature Method. The three-dimensional matching method based on local features includes several steps such as key point search, key point quality calculation, feature extraction, and target matching. The initialization of the 3D model can be described as follows: first, the local features of the scene image are extracted, and the scene is matched with a series of local depth images from different perspectives used in the reconstruction of the 3D model to find the depth image with the largest matching point with the scene. This shows that in this series of depth images from different perspectives, this image is the most similar to the pose of the target in the scene. After initializing the 3D model offline, the scene image is retrieved with the described algorithm to retrieve the target to be matched in the cluttered scene, that is, to find some key points that roughly match the model. All the point clouds outside the continuous surface where these key points are located are removed, which is background segmentation.(4) ICP Method of Fusion Texture. Using two point sets, Euclidean distance sum formula and singular value decomposition method to calculate the value, iteratively update until the preset error threshold is met. The algorithm only considers the geometric information of the image, which is prone to more mismatch points. It also expands the idea of the traditional ICP algorithm and changes the traditional ICP algorithm using only the Euclidean distance of geometric coordinates as the basis for finding the closest point to a six-dimensional distance formula that combines geometric information and texture information. It uses the geometric information and texture information separately. Compared with the Color_ICP algorithm, since only the geometric information is used in the search, it improves the speed of the nearest point search; that is, the matching efficiency can be improved.


### 3.3.2. Target Tracking

The tracking problem of moving objects is a very challenging research direction. When the moving target moves in the scene, its motion state and its corresponding motion information are changing in real time, and the objective environment of the monitoring scene is also dynamically adjusted. At the same time, it takes into account the mutual occlusion between moving objects when moving and the reciprocating entry and exit of the moving target in the monitoring scene building; also, the movement of the related monitoring and acquisition equipment and the network transmission rate of the monitoring video data may have a huge impact on the results of target tracking. Therefore, in practical applications, target tracking is carried out in experiments and tests in a hypothetical monitoring environment. For different monitoring environments and moving target characteristics, researchers have proposed many classical tracking algorithms [14, 15].(1) Kalman Filter. The Kalman filter problem is simply a problem of predicting a target state, that is, using the existing state information to predict and estimate its possible motion state through statistical operations. And it reduces the gap between the estimated value and the actual measured value as much as possible, and its description formula is as follows:
(5)Yk+1=Cxk+Duk+vk.Among them,C and D are both system state matrices, and random signals uk and vk represent system process noise and measurement noise, respectively.(2) Mean Shift Tracking Method. The mean shift algorithm was first proposed in 1975, and its original meaning was the mean vector of the shift. But with the development of the theory, its meaning has undergone many changes. Now usually it refers to an iterative step, which is a hill-climbing algorithm based on kernel density estimation, which can be used for clustering, image segmentation, tracking, etc. The tracking of moving objects using the mean shift method is mainly composed of the following steps:
(1)
Construct the feature representation model of the moving target(6)Qu=C∑i=1ngx0−xihi∂axi2−u.The kernel function isgx, h represents the bandwidth of the function, and C is the correlation coefficient of the normalized function. When ∑u=1mQu=1, it can get
(7)C=1∑i=1nkx0−hi.(2)
Establish a description model of the target candidate regionSimilar to the steps, if the particle coordinate of the candidate target region isy, then the kernel function can be calculated by the following formula:
(8)Puy=Ch∑i=1nk∂bxi−u,where Ch is the correlation coefficient of the normalized function, when ∑u=1mPuy=1:
(9)Ch=1∑i=1nkx0−hi.(3)
Similarity measurement between the moving target feature description model and the candidate region modelIn the similarity measurement of the color histogram distribution between the moving target feature description model and the candidate region model, the Bhattacharyya coefficient is commonly used in the mean shift tracking method. The formula for calculating the coefficient is as follows:(10)dy=1−qy.Among them,qy represents the Bhattacharyya coefficient of the moving target description model and the candidate area model.
(11)qy=qqy,s=∑u=1mquy,s.The mathematical meaning of this coefficient is that the larger the value ofqy, the higher the similarity between the moving target description model and the candidate area model; that is, the moving target candidate area corresponding to qy is the current real coordinate position of the moving target we are looking for.
(4)
Positioning of moving targetsAccording to the similarity measurement result between the moving object description model and the candidate area model, when positioning the moving object, the center positiony of the moving object in the previous frame of the image is the starting point. It calculates the best matching moving object location area in the current image frame and assigns the centroid of this area to y. Using Taylor’s formula for the candidate region model qy in the current graphics frame, it can be expanded to get
(12)pqy,q^≈12∑u=1mqy0,qu+Ch2∑i=1nhwiky−xi2,(13)wi=∑u=1m∂bxi−uqupuy0.It is observed that formula (12) has nothing to do with y, then let
(14)gn,k=Ch2∑i=1nwiky−xi2.When formula (14) reaches the maximum value, the matching and positioning of the moving target are completed. Through correlation calculation, the particle y of the current moving target position region can be obtained by iterative calculation from y0, as shown in
(15)y1=∑i=1nhxiwigy−xi2∑i=1nhwigy−xi2.Among them,gk=−kx. The target monitoring efficiency of this algorithm is better than that of other algorithms, but this method often needs multiple iterations to complete the positioning of moving targets during calculation.Through the analysis and calculation of the Kalman filter and the mean shift method, we can conclude that the Kalman filter realizes the prediction and update of the motion state of the moving target through the ideal linear estimation of the real-time monitoring scene. Its implementation is relatively simple, and it has good real-time application capabilities for monitoring scenarios with relatively simple environments. Unfortunately, the state model and measurement model of the real tracking system are mostly nonlinear. When the nonlinearity is relatively strong, the Kalman filter usually cannot obtain practical results. The mean shift tracking method uses the color histogram distribution of the moving target area as a feature description model. It calculates the optimal value of the similarity through the iterative recursive formula through the similarity measure of the feature model between each moving target, so as to realize the real-time tracking and positioning of the moving target. The algorithm is a parameter-free similarity matching algorithm for kernel density estimation, which has a good adaptability to the nonlinear changing monitoring scene environment. But its disadvantage is that it often ignores the spatial information of the moving target, especially when the tracking target moves too fast or is occluded.Therefore, according to the environmental characteristics of actual video surveillance, this paper decides to use the basic principle of the mean shift tracking algorithm and organically integrate the median filter image processing technology and proposes a target intelligent tracking strategy based on machine vision.


## 3.3.1. Target Matching

Target matching is to calculate the similarity and relevance of the target to be detected and use data to measure. The association matching of moving objects will change due to changes in the video surveillance scene. The plane elastic constraint is an effective target constraint method, which can match the points at the same position in the two video images through the plane homography matrix to obtain the matching target. At the same time, for the points in different video images, it can also reestablish the matching between the target and the target by means of 3D reconstruction. There are generally the following methods to obtain the association matching between moving objects.(1) SURF Feature Detection Method. In 1999, some scholars proposed the SIFT algorithm to sample and reconstruct images to obtain multi-image data, but its computational complexity was too high and was discarded later. In 2006, on the basis of SIFT, a SURF (Speed-up Robust Feature) method based on acceleration robustness was proposed. Its basic idea is to use the median filter to construct the scale space and use the integral in the scale space to quickly complete the image matching.(2) Feature Point Recognition Method. After the features of the two video images are basically generated and determined, the SURF algorithm describes the Euclidean distance of the vector based on this feature as a measure of the similarity between the images. But this method has certain limitations. The specific method of feature point-based recognition is to randomly acquire a feature point in the image A at first. Then, it looks for the feature point with the smallest Euclidean distance in the image B and finds two points with the smallest distance from it, namely, the optimal matching point and the second optimal matching point. At this time, if the ratio of the closest distance to the next closest distance is less than a fixed value, this pair of matching points is selected. But if the two are very close, it might be wrong to choose one of them, thus rejecting both matching points. By reducing the preset ratio threshold, although the number of matching feature points obtained will be less, the matching result will be more accurate and stable.(3) Local Feature Method. The three-dimensional matching method based on local features includes several steps such as key point search, key point quality calculation, feature extraction, and target matching. The initialization of the 3D model can be described as follows: first, the local features of the scene image are extracted, and the scene is matched with a series of local depth images from different perspectives used in the reconstruction of the 3D model to find the depth image with the largest matching point with the scene. This shows that in this series of depth images from different perspectives, this image is the most similar to the pose of the target in the scene. After initializing the 3D model offline, the scene image is retrieved with the described algorithm to retrieve the target to be matched in the cluttered scene, that is, to find some key points that roughly match the model. All the point clouds outside the continuous surface where these key points are located are removed, which is background segmentation.(4) ICP Method of Fusion Texture. Using two point sets, Euclidean distance sum formula and singular value decomposition method to calculate the value, iteratively update until the preset error threshold is met. The algorithm only considers the geometric information of the image, which is prone to more mismatch points. It also expands the idea of the traditional ICP algorithm and changes the traditional ICP algorithm using only the Euclidean distance of geometric coordinates as the basis for finding the closest point to a six-dimensional distance formula that combines geometric information and texture information. It uses the geometric information and texture information separately. Compared with the Color_ICP algorithm, since only the geometric information is used in the search, it improves the speed of the nearest point search; that is, the matching efficiency can be improved.


## 3.3.2. Target Tracking

The tracking problem of moving objects is a very challenging research direction. When the moving target moves in the scene, its motion state and its corresponding motion information are changing in real time, and the objective environment of the monitoring scene is also dynamically adjusted. At the same time, it takes into account the mutual occlusion between moving objects when moving and the reciprocating entry and exit of the moving target in the monitoring scene building; also, the movement of the related monitoring and acquisition equipment and the network transmission rate of the monitoring video data may have a huge impact on the results of target tracking. Therefore, in practical applications, target tracking is carried out in experiments and tests in a hypothetical monitoring environment. For different monitoring environments and moving target characteristics, researchers have proposed many classical tracking algorithms [14, 15].(1) Kalman Filter. The Kalman filter problem is simply a problem of predicting a target state, that is, using the existing state information to predict and estimate its possible motion state through statistical operations. And it reduces the gap between the estimated value and the actual measured value as much as possible, and its description formula is as follows:
(5)Yk+1=Cxk+Duk+vk.Among them,C and D are both system state matrices, and random signals uk and vk represent system process noise and measurement noise, respectively.(2) Mean Shift Tracking Method. The mean shift algorithm was first proposed in 1975, and its original meaning was the mean vector of the shift. But with the development of the theory, its meaning has undergone many changes. Now usually it refers to an iterative step, which is a hill-climbing algorithm based on kernel density estimation, which can be used for clustering, image segmentation, tracking, etc. The tracking of moving objects using the mean shift method is mainly composed of the following steps:
(1)
Construct the feature representation model of the moving target(6)Qu=C∑i=1ngx0−xihi∂axi2−u.The kernel function isgx, h represents the bandwidth of the function, and C is the correlation coefficient of the normalized function. When ∑u=1mQu=1, it can get
(7)C=1∑i=1nkx0−hi.(2)
Establish a description model of the target candidate regionSimilar to the steps, if the particle coordinate of the candidate target region isy, then the kernel function can be calculated by the following formula:
(8)Puy=Ch∑i=1nk∂bxi−u,where Ch is the correlation coefficient of the normalized function, when ∑u=1mPuy=1:
(9)Ch=1∑i=1nkx0−hi.(3)
Similarity measurement between the moving target feature description model and the candidate region modelIn the similarity measurement of the color histogram distribution between the moving target feature description model and the candidate region model, the Bhattacharyya coefficient is commonly used in the mean shift tracking method. The formula for calculating the coefficient is as follows:(10)dy=1−qy.Among them,qy represents the Bhattacharyya coefficient of the moving target description model and the candidate area model.
(11)qy=qqy,s=∑u=1mquy,s.The mathematical meaning of this coefficient is that the larger the value ofqy, the higher the similarity between the moving target description model and the candidate area model; that is, the moving target candidate area corresponding to qy is the current real coordinate position of the moving target we are looking for.
(4)
Positioning of moving targetsAccording to the similarity measurement result between the moving object description model and the candidate area model, when positioning the moving object, the center positiony of the moving object in the previous frame of the image is the starting point. It calculates the best matching moving object location area in the current image frame and assigns the centroid of this area to y. Using Taylor’s formula for the candidate region model qy in the current graphics frame, it can be expanded to get
(12)pqy,q^≈12∑u=1mqy0,qu+Ch2∑i=1nhwiky−xi2,(13)wi=∑u=1m∂bxi−uqupuy0.It is observed that formula (12) has nothing to do with y, then let
(14)gn,k=Ch2∑i=1nwiky−xi2.When formula (14) reaches the maximum value, the matching and positioning of the moving target are completed. Through correlation calculation, the particle y of the current moving target position region can be obtained by iterative calculation from y0, as shown in
(15)y1=∑i=1nhxiwigy−xi2∑i=1nhwigy−xi2.Among them,gk=−kx. The target monitoring efficiency of this algorithm is better than that of other algorithms, but this method often needs multiple iterations to complete the positioning of moving targets during calculation.Through the analysis and calculation of the Kalman filter and the mean shift method, we can conclude that the Kalman filter realizes the prediction and update of the motion state of the moving target through the ideal linear estimation of the real-time monitoring scene. Its implementation is relatively simple, and it has good real-time application capabilities for monitoring scenarios with relatively simple environments. Unfortunately, the state model and measurement model of the real tracking system are mostly nonlinear. When the nonlinearity is relatively strong, the Kalman filter usually cannot obtain practical results. The mean shift tracking method uses the color histogram distribution of the moving target area as a feature description model. It calculates the optimal value of the similarity through the iterative recursive formula through the similarity measure of the feature model between each moving target, so as to realize the real-time tracking and positioning of the moving target. The algorithm is a parameter-free similarity matching algorithm for kernel density estimation, which has a good adaptability to the nonlinear changing monitoring scene environment. But its disadvantage is that it often ignores the spatial information of the moving target, especially when the tracking target moves too fast or is occluded.Therefore, according to the environmental characteristics of actual video surveillance, this paper decides to use the basic principle of the mean shift tracking algorithm and organically integrate the median filter image processing technology and proposes a target intelligent tracking strategy based on machine vision.


## 4. Moving Target Monitoring and Intelligent Tracking Strategy Based on Machine Vision

Before the experiment, we first use the median filter image processing technology to preliminarily process the detection results of moving objects, and then, we can use the position functionq∧II=1,⋯L corresponding to multiple subblocks to characterize. In the function, the letter L represents the number of blocks in the moving area, and q∧I is the subblock position kernel function of the moving target. Then, the position of the moving target can be characterized by the similarity measure with the candidate region model whose position is y:
(16)q^y=∂1q1+∂2q2+⋯∂LqL=∑i=1L∂iqi.Among them,∂i represents the weight of moving target monitoring, and the definitions of ∑i=1L∂i=1 and ∂i are shown in
(17)∂i=qq∧1y,p∑i=1Lqq∧1y,p.The larger the value of∂i, the higher the similarity. p represents the maximum value of the Bhattacharyya coefficient of the moving target description model and the candidate area model. Therefore, as long as the absolute values of p and qy are minimized, the minimum value of the spatial distance can be obtained.
(18)qi≡pq∧1y,q∧Ly∑i=1Lq∧1y=∑u=1mpuyqu.After the possible target position of the moving target is calculated, the activity range of the moving area can be roughly obtained. When there is only a single moving object in the scene area, the relative motion state of the moving object can be directly updated.During the intelligent tracking of moving objects, the motion position of the moving object can be calculated and predicted by using the motion state mimic formula. It achieves the purpose of reducing the calculation iteration times of the mean shift algorithm and narrowing the search range of the moving target and effectively improves the matching accuracy of the moving target [16, 17].Let the motion state of the moving target at timen be
(19)xn=x_centern,y_centern,x_vn,y_vn,width,height.Taking the motion state corresponding to formula (19) as the input of the median filter, then the possible position of the moving target at time n+1 is calculated as follows:
(20)x_centert+1=x_centert+x_vt⋅θt,(21)y_centert+1=y_centert+y_vt⋅θt.Considering the limited range of motion displacement of moving objects in adjacent multiframe images, this paper defines an evaluation function as follows:(22)Vi,j=α⋅Ci.j+β⋅Di,j.Ci,j represents the distance similarity between the ith moving object and the jth object between adjacent frames in the video surveillance scene. Di,j represents the displacement position between the ith moving object and the jth object between adjacent frames [18, 19].The results of median filter, Kalman filter, mean shift, and our method under the DP (%) criterion are shown in Tables1 and 2.Table 1
Result 1.
Median filterKalman filterMean shiftOursDavid80.2240.1366.1270.95Car71.2111.5445.2389.21Car chase34.1922.9843.6565.32Table 2
Result 2.
Median filterKalman filterMean shiftOursVolkswagen11.7617.7819.3120.09Motocross22.3225.3125.1130.16Couple22.1923.8324.9125.16Tables1 and 2 show that our machine vision-based target intelligent tracking results perform the best, with an overall average of 60.95%. The closer the tracking samples are to the real target, the better the tracking performance can be guaranteed.The tracking attribute test results of the target intelligent tracking algorithm based on machine vision on OTB100 are shown in Figure5.Figure 5
The tracking test success and accuracy results of the tracking algorithm.
(a)(b)Figures5(a) and 5(b) show the average tracking accuracy and success rate of mainstream tracking algorithms including the mean shift algorithm on 11 target tracking attributes. These tracking properties are Ray Change (IV), In-Plane Auto Rotation (IPR), Out of View (OV), Occlusion Change Rate (OCC), Moving Object Deformation (DEF), Out-of-Plane Auto Rotation (OPR), Moving Objects Scale Change (SV), Moving Object Ambiguity (MB), Fast Object Movement (FM), Video Background (BC), and Resolution Change (LR) [19, 20].After combining the “cloud” technology, we upload this algorithm to the cloud, and let the computer train itself to capture the moving target to complete the training. As shown in Figure6, when the number of training times reaches about 3k, the recognition rate of target monitoring based on machine vision is stable at 90%. And with the continuous deepening of training, its recognition rate tends to be stable.Figure 6
Recognition rate and training times.In order to better verify the cloud-based machine vision technology, we finally obtained the data in Table3 by monitoring and judging the different movements of moving objects in the video. The results show that after using the machine vision tracking algorithm combined with “cloud,” the success rate of the algorithm in recognizing moving objects has been upgraded to a certain extent.Table 3
Success rate of specific action.
WalkBeatStoopRunWanderSquatWalk100319159Beat512091853Stoop321032312Run1299902Wander101206905Squat4311810100Success rate (%)80.1291.1186.3285.7586.1190.54Table3 shows that after adding cloud technology, the algorithm based on machine vision is very stable, and the overall average success rate of action recognition for a single moving object reaches 86.95%. At the same time, in order to find the shortcomings of the algorithm, we will test the behavior of the characteristics.It can be seen from Table4 that our algorithm has certain advantages in identifying characteristic target actions, but for some actions, our algorithm has a relatively low recognition rate.Table 4
The success rate of recognizing moving objects.
OursMedian filterKalman filterMean shiftKCFTGPRWalk0.7780.7160.70.6840.6540.643Beat0.70.6530.6130.60.5530.512Stoop0.6240.5790.5060.5310.4760.486Run0.4150.4260.3990.2980.3240.33Wander0.1410.0840.10.0630.0420.039Squat0.1120.0830.20.040.0920.396Figure7 clearly compares our recognition rate with other algorithms.Figure 7
Success and accuracy rate of recognizing moving objects.
(a)(b)As shown in Figure7(a), in terms of the accuracy of recognizing moving objects, our algorithm can basically complete the goal and has a high success rate. Figure 7(b) shows that the recognition accuracy of our algorithm is above 80% on average.In order to better characterize the detection accuracy results based on machine vision, this study selects other traditional algorithm transformations to compare with the algorithm used in this study.Tables5 and 6 present our detection results for the same video image.Table 5
Detection frame comparison.
OursMedian filterKalman filterMean shiftKCFTGPRTotal frames800800800800800800False frames701219810180107Error frames506899729469Table 6
Detection accuracy comparison.
OursMedian filterKalman filterMean shiftKCFTGPRFalse detection rate (%)8.7515.1212.1112.510.0113.21Error detection rate (%)6.258.512.1710.9411.988.32Accuracy rate (%)85.772.171.5274.275.174.8Through statistical analysis of Tables5 and 6, the algorithm designed in this study has better reproducibility and anti-interference than traditional monitoring and tracking methods [21, 22]. The reason is that, first of all, we divide the detection area, which effectively avoids the interference of the video information in the nondetection area. At the same time, the median filter used in this study plays a good filtering and suppressing role in the case of cluttered information and interference noise, so the false detection rate and missed detection rate are greatly reduced [23, 24].The overall situation of the number of false detections and missed detections in the experiment is shown in Figure8.Figure 8
Detection accuracy comparison.
(a)(b)(c)It can be seen from Figure8(a) that our algorithm maintains more than 80% accuracy, but the error and false detection data are still relatively high. Figure 8(b) shows that the median filter differs from us in the dimension of accuracy; that is, its recognition accuracy is not as good as our algorithm, but its error rate is lower than ours. As can be seen from Figure 8(c), the recognition accuracy of the Kalman filter is significantly different from ours.The accuracy of intelligent tracking of moving targets is shown in Figure9.Figure 9
Tracking accuracy changes.
(a)(b)As can be seen from Figure9(a), after comparing the error rate and the omission rate horizontally, our algorithm has the least number of error frames and lost frames. The reason for this can be attributed to the low error rate of our algorithm for specific target actions. As can be seen from Figure 9(b), other algorithms significantly lag behind us in both accuracy and speed.Although our algorithm is somewhat lower than other algorithms in terms of missed detection and false detection rate, the average success rate of comprehensive tracking monitoring is 85.7%. But in addition, we can also observe that other algorithms have certain advantages in false detection or missed detection. Although they lag slightly behind this algorithm, they also have good performance. At the same time, it also shows that the monitoring and tracking algorithm designed in this paper has considerable room for improvement.


## 5. Discussion

Video surveillance technology based on machine vision plays an increasingly important role in modern surveillance systems. It can not only improve the security of our social governance and effectively avoid accidents but also improve the utilization and processing efficiency of information. At the same time, the combination of machine vision and smart city technologies will become one of the important components of the digital earth, so as to realize the integration of information collection and processing [25, 26]. At present, with the performance improvement and cost reduction of equipment such as digital processors and cameras, machine vision-based video surveillance strategies will become the mainstream. On this basis, the moving target monitoring and intelligent tracking algorithms are constantly being upgraded and adjusted, giving different attention to the different states and actions of moving targets. After acquiring its different states and behaviors, the tracking algorithm will be further iterated to meet the actual needs. Based on this, in the context of artificial intelligence, video surveillance will be automatically captured and analyzed by machine vision by capturing and analyzing moving objects in images or videos [27, 28]. With the help of machine vision, the staff can quickly monitor and track moving targets in the scene, so as to give full play to the maximum effect of machine vision. After combining with cloud technology, the abnormal behavior of moving objects will be quickly detected by video surveillance and tracked and alerted in the fastest and best way [29].


## 6. Conclusion

Video surveillance is a research hotspot in the field of machine vision in recent years, and its related research results have played a huge role in intelligent traffic management, social public safety management, and smart city construction. This paper proposes the research on moving target monitoring and intelligent tracking algorithm based on machine vision technology combined with “cloud.” However, there are still many technical difficulties to make the video surveillance system play a greater role in future social governance and security work. First of all, in the intelligent tracking method based on machine vision and moving target monitoring, the theoretical support of the algorithm needs to be further studied. Second, this article only discusses how to combine machine vision and video surveillance. In real life, if considering the machine vision application of other platforms and other types of sensory data, this kind of combination method has to break through slowly in technology. How to closely link the relevant algorithms and technologies of the monitoring of moving objects and the effective tracking of moving objects in this paper with the actual needs and development direction of the current video surveillance system to provide necessary technical support for building a safe and harmonious social environment will be an urgent problem to be solved in the future.



---

*Source: 7277926-2022-05-27.xml*