## Materials and Methods  
### Pre-Processing and LEPA-Processing  
Scale-invariant feature transform feature detection is a very effective method for extracting regions of interest (ROIs) [27 ; 2]. A large amount of research on SIFT algorithm is used for extraction of targets, such as airports [2], vehicles [2], and robots [2]. However, the classical SIFT feature detection algorithm is not suitable for extracting the ROIs of remote-sensing images due to the high resolution and complex background [2]. In order to improve the extraction of SIFT keypoints and reduce the computational complexity and interference from complex textures, we use two methods: First, the SIFT detection method usually extracts keypoints in grayscale, so we convert the original image from RGB space to CIE Lab [2]. Then we use the luminance channel L of Lab to extract the SIFT keypoints. Next, image downsampling is used to reduce the number of pixels. I\({}^{2}\) represents an image which resulted from downsampling the original image I by 2\({}^{2}\), and we used the original image I(x, y) and the downsampling image I\({}^{2}\)(x, y) as input images for post-processing. After preprocessing, the next step is to process the edges of the images. Some previous algorithms mainly do image segmentation based on local information [2], whereas others do some edge smoothing to reduce the detail information [2]. However, the former cannot effectively reduce the computational complexity of the feature extraction algorithm, and the latter reduces both useful edge information and useless edge information, which is not the results we hoped for. Therefore, we propose a local edge preservation algorithm (LEPA), which can reduce the edge information of the background and retain the useful edge information. For the harbor target extraction algorithm, we regard small targets (such as ships, rocks, buildings) as backgrounds; reducing their edge information helps us to remove some useless feature points. Next, we introduce this algorithm in detail. In order to achieve the above objectives, we have improved the image segmentation method. First, we divide the original image \(R\) into n sub-regions \(R_{1}\), \(R_{2}\),..., \(R_{n}\). Then we use regional growth method to achieve image segmentation; we set a threshold variable SCOPE when the size of the region \(R_{i}\) is smaller than the threshold SCOPE; we think that region \(R_{i}\) needs to grow, otherwise region \(R_{i}\) stops growing. Finally, we repeat this cycle until the image is split. For the region growth method, we use a function \(DIFF\) to achieve the two most similar regions merged; we use a threshold variable MD when the value of the function \(DIFF\) is larger than MD, and the size of the region \(R_{i}\) is smaller than SCOPE; it is considered that this region \(R_{i}\) is a small ground target (for example, a small building), so it can be regarded as a background region; we can use the surrounding background region instead of this region because its details are useless. The function \(DIFF\) consists of two parts. The first part \(FD\) is defined as the difference in characteristics between \(R_{i}\) and \(R_{j}\), and it is defined as:  
\[FD(A,B)=\sum_{i=1}^{n}\parallel\left(T_{i}\right)^{A}-\left(T_{i}\right)^{B} \parallel\times W_{i} \tag{1}\]  
where \(A\), \(B\) represent the two image regions, \(\left(T_{i}\right)^{A}\) and \(\left(T_{i}\right)^{B}\) are the feature vector sets of two image regions \(A\) and \(B\), respectively, \(n\) is the number of selected feature vectors for the region, and \(W_{i}\) is the weight of \(T\). The second part \(VAR\) is defined as the difference in regional variance function, and it is defined as:  
\[VAR(A,\ B)=\parallel var^{A}-var^{B}\parallel \tag{2}\]  
Where \(var^{A}\) and \(var^{B}\) are the variance of \(A\) and \(B\), respectively. The reason we add _VAR_ to the _DIFF_ function is that some regions have shadows due to occlusion; this may affect regional segmentation and the determination of small ground targets.