# Real-Time Moving Ship Detection from Low-Resolution Large-Scale Remote Sensing Image Sequence
## 2 Low-Resolution Sequence Target Detection Algorithm
### Preprocessing  
In ship target detection, especially in low resolution and low signal-to-noise ratio image data, it is often difficult to distinguish the gray information of the target from the surrounding background, and it is difficult to eliminate the complex sea state interference information. At the same time, for wide-area and large-width images, the amount of data in a single frame is large, so it is challenging to ensure the real-time performance of the calculation by directly using high-performance and large-parameter CNN networks. To solve the above problems, morphological enhancement was first carried out, and iterative TopHat transform was used to improve the contrast of the target edge relative to the background and reconstruct the target contour. Secondly, contrast-based binary segmentation was used to remove background noise information. Finally, the connected  
Figure 1: The basic framework of ship target detection algorithm in low-resolution broad area sequence remote sensing images. domain was labeled, and the regions with larger or smaller related domain areas were removed to obtain the first-level suspected targets. I. Morphological Reconstruction  
Define I as an image matrix of size \(M\times N\), \(I_{0}=I\), then the iterative TopHat transformation process is as follows:  
\[I_{m+1}=(OTH_{\beta}(x,y)\mu_{1}+CTH_{\beta}(x,y)\mu_{2}) \tag{1}\]  
where \(OTH_{\beta}(x,y)=(I_{m}-(I_{m}\,\Theta\,\,\beta)\oplus\beta)(x,y)\), \(CTH_{\beta}(x,y)=((I_{m}\oplus\beta)\,\,\Theta\,\,\beta-I_{m})(x,y)\), \(\beta\) stands for square full 1 structure elements, \(x\in[0,M-1]\), \(y\in[0,N-1]\), \(m\in[0,R-1]\), \(R\) stands for the number of iterations, \(OTH\) and \(CTH\), respectively, stand for forward and inverse top-hat transformation, \(\oplus\) stands for expansion operation, \(\Theta\) stands for corrosion operation, \(\mu_{1}\) and \(\mu_{2}\), respectively, stand for weight parameters (the default is 1). The result of morphological reconstruction is \(I_{R}\). Figure 2 shows the gray distribution of the ship target before and after reconstruction and the gray distribution of the cloud fragmentation target before and after reconstruction. It can be seen that after reconstruction, the ship target energy is more concentrated, the contour edge is easier to distinguish compared with the background noise, and the background interference noise is effectively suppressed. After reconstruction, the contour of the broken cloud target is also more apparent, and most false alarm targets can be eliminated by contour. In the reconstruction process, the number of reconstruction iterations needs to be set according to the target size. If the number of iterations is too small, the effect cannot be enhanced, and the computation will be increased if the number of iterations is too large. II. Adaptive Threshold Segmentation  
The enhanced image data \(I_{R}\) is segmented with an adaptive threshold. The detection process includes the information statistics of three-square Windows: target window \(T_{a}\), protection window \(P\), and background window \(B\). The length parameters of three types of windows are \(r_{T_{a}}\), \(r_{P}\) and \(r_{B}\), respectively. The target window mainly includes the gray information of the target to be detected. The protection window mainly consists of the gray information between the target and the background, which is used to protect the dispersion part of the target from being counted into the background window. The background  
Figure 2: Gray distribution comparison before (**left**) and after (**right**) reconstruction of ship target and broken clouds. window mainly covers the sea surface noise information.