# Infrared Small Moving Target Detection via Saliency Histogram and Geometrical Invariability
## 2 In-Frame Detection Based on Saliency Histogram  
### Saliency Map  
Saliency detection is a popular and efficient tool that roughly presents the saliency distribution and locates the visually salient regions [(20; 21)]. An IR small target, regardless of whether it is bright or dark, is able to attract much more attention from human eyes because of the distinct differences of brightness and shape when compared to its surrounding background. That is to say, IR small targets can be seen as salient regions [(22)].  
In this section, a saliency map is constructed based on the amplitude spectrum in the frequency domain. Let us suppose that I(x,y) is the input IR image and its Fourier frequency spectrum F(u,v) is obtained by two-dimensional discrete Fourier transform (DFT) as Equation (1):  
\[\mathrm{F(u,v)}=\sum_{x=1}^{W}\sum_{y=1}^{H}I(x,y)\cdot\exp\left(-\mathrm{i} \cdot 2\pi\left(\frac{ux}{W}+\frac{vy}{H}\right)\right)=\mathrm{Re(u,v)}+\mathrm{ j}\cdot\mathrm{Im(u,v)} \tag{1}\]  
where W and H are the width and height of I(x,y), respectively; Re(u,v) and Im(u,v) are the real part and imaginary part of F(u,v), respectively; j is an imaginary unit. Then, we can extract the amplitude spectrum A(u,v) and phase spectrum P(u,v) as Equations (2) and (3):  
\[\mathrm{A(u,v)}=\left|F(u,v)\right|=\sqrt{\mathrm{Re^{2}(u,v)+Im^{2}(u,v)}} \tag{2}\]  
\[\mathrm{P(u,v)}=\Theta(F(u,v))=\mathrm{arctg}(\frac{\mathrm{Im(u,v)}}{ \mathrm{Re(u,v)}}) \tag{3}\]  
where \(\left|\cdot\right|\) and \(\Theta\left|\cdot\right|\) denote calculating the norm and phase angle of an arbitrary complex number, and \(\mathrm{arctg}(\cdot)\) is an \(\mathrm{arct}\) function.  
From the perspective of frequency domain, high-frequency components correspond to the salient target while low-frequency components represent the smooth background. However, the proportion of high-frequency components is much larger than that of low-frequency components, which is reflected by the fact that amplitude values of high frequencies are much smaller.  
Based on the above-mentioned analysis, an exponential function is designed to make an reversal of the amplitude distribution, but the phase spectrum P(u,v) remains unchanged. Equation (4) shows the way of amplitude adjustment:  
\[\mathrm{A^{\prime}(u,v)}=\left(\frac{1}{\gamma}\right)^{\mathrm{A(u,v)}},\ \gamma>1 \tag{4}\]  
where \(\mathrm{A^{\prime}(u,v)}\) is the adjusted amplitude spectrum and \(\gamma\) is a fixed parameter (\(\gamma\) is set as 100 uniformly). As the illustration given by Figure 2, Equation (4) is a decreasing function, which ensures that a small A(u,v) becomes larger while a large one turns to be smaller. That is to say, high frequencies (IR target) are enhanced in the spatial domain meanwhile low frequencies (background) are suppressed. Finally, the saliency map S(x,y) can be calculated by inverse discrete Fourier transform (IDFT) and smoothed by Gaussian filtering as follows:  
\[S(x,y)=\mathrm{Ga(x,y)}*\left|F^{-1}\left(A^{\prime}(u,v)\cdot\exp\left( \mathrm{j}\cdot P(u,v)\right)\right)\right|^{2} \tag{5}\]where \(\rm{Ga}(x,y)\) is a two-dimensional Gaussian filter; * is a convolution operator; and \(\rm{F}^{-1}(\cdot)\) is an IDFT operator.