# Multiscale Feature-Based Infrared Ship Detection
## 2 Materials and Methods
### Ship Targets Extraction Based on Shape Features  
In complex sea surface scenarios, apart from the ships, there might still exist a series of interferences in the extracted CRs, such as sea clutter, islands, reefs, and buildings along the shore, which can lead to false alarms. Therefore, it is necessary to distinguish all the CRs to accurately detect the real ship targets. Shape is one of the most important features of infrared targets, and ship targets tend to have more regular shapes in the sea surface scene. In contrast, interferences are more random and have varied shape characteristics. Here, we choose aspect ratio \(F_{WH}\), compactness \(F_{z}\), duty cycle \(F_{D}\), and signal-to-clutter ratio \(F_{C}\) as the shape characteristics to measure the ships:  
\[F_{WH}(i)=\frac{Width}{Height},\ \ F_{Z}(i)=\frac{(Perimeter)^{2}}{Area},\ \ F_{D}(i)=\frac{Area}{ Rectangle},\ \ F_{C}(i)=\frac{\mu_{T}-\mu_{B}}{\sigma_{B}}, \tag{23}\]  
where _Width_ and _Height_ are the size, _Perimeter_ and _Area_ represent the circumference and the area of the CRs, _Rectangle_ is the area of the bounded rectangle of the CRs, and \(\mu_{T}\) and \(\mu_{B}\) are the average gray value of the target area and background area with \(\sigma_{B}\) as the standard deviation, respectively, as shown in Figure 7.  
The key to identifying ships using shape features is to establish an appropriate range of parameters that can accurately distinguish between targets and other disturbances on the sea surface. In order to ensure the effectiveness and stability of the parameter range, we utilize here the infrared offshore ship dataset provided by IRay Technology Co., Ltd. (Yantai, Shandong, China), which contains more than 1000 infrared images of ships. After  
Figure 7: Shape features of the ship.  
screening and deduplication, a total of 300 ships in five categories--warships, cruise ships, cargo ships, fishing boats, and yachts--are selected as positive samples to calculate and count the feature quantities according to Equation (23). Some of the ship slices and their binary images are shown in Figure 8. The statistical results are shown in Table 1.  
It should be noted that the objects of this paper are tangible ships occupying a certain area, so CRs of less than 30 pixels will be excluded. After obtaining the statistical results, the constraint ranges of the feature quantities are set as follows:  
\[F_{WH}\_L=1.0402 F_{WH}\_H=13.4242, \tag{24}\] \[F_{Z}\_L=17.6075 F_{Z}\_H=137.6387,\] (25) \[F_{D}\_L=0.3827 F_{D}\_H=0.8213,\] (26) \[F_{C}\_L=0.1035 F_{C}\_H=0.3948 \tag{27}\]  
The corresponding discriminant method is shown in Figure 9:  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Quantity** & **Minimum** & **Mean** & **Maximum** \\ \hline \(F_{WH}\) & 1.0402 & 4.2566 & 13.4242 \\ \(F_{Z}\) & 17.6075 & 65.4393 & 137.6387 \\ \hline \(F_{D}\) & 0.3827 & 0.5514 & 0.8213 \\ \hline \(F_{C}\) & 0.1035 & 0.2141 & 0.3948 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The statistical results of the shape features of the 300 ships.  
Figure 8: Positive samples and binary slices of different categories of ships.  
Figure 9: Flow chart of ship discrimination.  
In order to prove the effectiveness of the constraint range and discriminant method proposed, the disturbing substances in different sea surface scenarios are selected as negative samples, and their feature quantities are calculated and then evaluated according to the above method. The selected negative samples are shown in Figure 10, with the calculated feature quantities displayed in Table 2. It is observed that one or more of the feature quantities of the negative samples do not fall within the constraint range and are therefore determined to be non-targeted. This empirical analysis confirms that the proposed method based on constraint ranges and discriminant features can effectively distinguish between real ship targets and other interferences present on the sea surface.