# Accurate Tracking Algorithm for Cluster Targets in Multispectral Infrared Images
## 3 Methods
### Construction of the Target Observation Model
Firstly, using the HSV color region histogram \(\hat{p}(x)\) representing \(x\), the candidate particle, and \(\hat{q}\), the HSV color region histogram representing the target reference model, the Pap distance coefficient between them is:  
Figure 1:0  
where \(\Re\) represents the Babbitt distance coefficient between \(\hat{p}(w)\) and \(\hat{q}\); \(v\) represents the specific dimension of the vector; \(\hat{p}_{v}(w)\) represents the HSV color region histogram of the candidate particle \(w\) under the \(v\)-dimensional vector; and \(\hat{q}_{v}\) represents the HSV color region histogram of the target reference model under the \(v\)-dimensional vector. The observation model is constructed by defining the actual measurement distribution of two HSV color region histograms, as shown in the following formula:  
\[\left\{ \begin{array}{c}\frac{[\hat{p}(w),\hat{q}]}{\chi}=\Re[\hat{p}(w),\hat {q}]\\ p(w_{k}|x_{k})\infty\exp(\gamma)\end{array} \right. \tag{14}\]  
where \(\chi\) represents the actual measured distribution of two HSV color regions, \(p(w_{k}|x_{k})\) represents the observation model, \(\lambda\) represents the observation threshold, and \(\gamma\) usually has a value of 20. Additionally, we update the weight of particles in the observation model. The update algorithm is as follows:  
\[\sum_{i=1}^{N}w_{k+1}^{i}=1 \tag{15}\]  
Figure 3: Improved SIR particle filtering algorithm flow. The circles represent the process of change of the particles. where \(N\) represents the total number of particles; \(i\) represents the update threshold; and \(w_{k+1}^{j}\) represents a particle in the observation model, which satisfies:  
\[w_{k+1}^{j}\infty p\left(w_{k}\middle|x_{x}^{i}\right) \tag{16}\]  
where \(p\left(w_{k}\middle|x_{x}^{i}\right)\) represents the updated observation model. Then, the target box corresponding to the maximum weight particle is taken as the final position of the target box. Finally, resampling is performed. The particles are sorted in descending order according to the weight of the particles. When the total number of particles is fixed, the total number of particles with larger weights is increased, the total number of particles with smaller weights is decreased, or the particles with smaller weights may even be dropped. Target Analysis and Tracking of Infrared Dim and Small Images Based on the Optical Flow Estimation Model  
This paper uses an optical flow estimation model to analyze dim and small targets in infrared images. According to the relationship between the pixel strength and time parameter of the detected image, the intensity of the infrared image is set at a certain time scale using the moving vector algorithm [21]. At a given time, the intensity value can be expressed as follows:  
\[U(x,y)=H(x,y,t) \tag{17}\]  
where \(H(x,y,t)\) represents the intensity of the pixels at the time \(t\), and \(x\) and \(y\) represent the positions of the pixels. Assuming that the pixels of the infrared image increase within the fixed period \(\Delta t\) of the infrared image, the pixels can be represented as follows:  
\[H(x+\Delta x,y+\Delta y,\Delta t)=\frac{\partial U}{\partial t}(\Delta x+ \Delta y+\Delta t) \tag{18}\]  
In the above calculation formula, the meaning of each parameter remains unchanged. By synthesizing the numerical relationship between the two pixels, the numerical relationship before and after the change in the pixels can be calculated and expressed as follows:  
\[\frac{\partial U}{\partial t}V_{x}+\frac{\partial U}{\partial t}V_{y}+\frac {\partial U}{\partial t}=0 \tag{19}\]  
where \(V_{x}\), \(V_{y}\) is the optical flow component of \(U(x,y,t)\) and \(\frac{\partial U}{\partial t}\) is the partial derivative between pixels. After repeated processing, the numerical relationship of the optical flow field model can be expressed as:  
\[U_{x}V_{x}+U_{y}V_{y}=-t_{U} \tag{20}\]  
The above represents the scale change time of the optical flow field model.