## 2 Morphological Reconstruction and Multi-feature Analysis for TIR Ship Images
### Gray-Level Morphological Reconstruction for Sea Clutter Suppression and Saliency Detection  
#### 2.2.1 Application of Classical Mathematical Morphology in TIR Image Processing  
Mathematical morphology has become a well-known non-linear analysis tool in the field of digital image processing due to its highly parallel processing properties and structured element set theory [34]. In general, the mathematical morphology is constructed with two parts: Structuring element and two basic morphological operators (dilation and erosion). In grayscale TIR image, given the original image \(f\) and the selected structuring element \(B\), the two basic morphological operators of \(f(x,y)\) by \(B(m,n)\) are defined as follows:  
\[f\oplus B(x,y)= \begin{array}{l}\sup\limits_{\begin{array}{l}m,n\in D_{b} \\ x,y\in D_{f}\end{array}}f(x+m,y+n),\\ \end{array}  \tag{2}\]  
Figure 2: The three representative TIR ship images with complex sea background clutter. (**a**) Original image with a bright ship target submerged in long ribbon-like sea clutter, (**b**) original image with a dark ship target buried in strongly fluctuant sun-glint clutter, (**c**) original image with multiple bright point ship targets that appeared near the sea-sky line/coastline. \[f\Theta B(x,y) = \inf_{ \begin{array}{c}m,n\in D_{b}\\ x,y\in D_{f}\end{array} }f(x+m,y+n), \tag{3}\]  
here, the \(f\oplus B(x,y)\) and \(f\Theta B(x,y)\) are named as dilation and erosion operator of \(f\) at coordinate pixel \((x,y)\), respectively. \(D_{f}\) is the domain of \(f\), and \(D_{B}\) is the domain of \(B\). In our experiments, \(B\) is selected as a 15-pixel disk-shaped structuring element. The dilation (erosion) operator makes the image intensity bigger (smaller) than the original infrared image by using the supremum (infimum) operation. Based on the two basic morphological operators, the definitions of the opening and closing operation of the original image are expressed as:  
\[f\circ B(x,y) = (f\Theta B)\oplus B(x,y), \tag{4}\] \[f\bullet B(x,y) = (f\oplus B)\Theta B(x,y), \tag{5}\]  
where the \(f\circ B\) is the opening operation and the \(f\bullet B\) is the closing operation of \(f\). The opening and closing operators can separately remove the bright and dark regions that are smaller than the selected structuring element \(B\). Therefore, the opening (closing) operators can be used to approximately forecast the backgrounds in the infrared bright (dark) ship target image \(f\). Then, the classical top-hat filter and bot-hat filter of \(f\), expressed as \(THF\) and \(BHF\), are defined as:  
\[THF(x,y) = f(x,y)-f\circ B(x,y), \tag{6}\] \[BHF(x,y) = f\bullet B(x,y)-f(x,y), \tag{7}\]  
therefore, the \(THF\) extracts bright interesting regions and \(BHF\) highlights dark interesting regions in image \(f\). In TIR ship image, the ship target is usually a bright (dark) region, so THF/BHF can be directly used to detect ship targets [6; 35]. For infrared ship image with high SCR, the classical THF/BHF filters can achieve good detection performance. However, for low SCR, where the ship target is dim and the sea clutter is heavy, the classical THF/BHF filters may suffer serious detection performance degradation, as presented in Figure 3d-f. Figure 3 shows the processing results of classical THF/BHF filters on three representative TIR ship images with complex sea background clutter. The first row are the original TIR images. Figure 3d,f are the results of Figure 3a,c directly filtered by classical THF, and Figure 3e is the result of Figure 3b filtered by classical BHF. It can be seen from Figure 3d-f that classical morphological filter is robust to the horizon line, island and sky region, but cannot sufficiently enhance weak ship target signal under heavy sea clutter in three images.