# An Improved SIFT Underwater Image Stitching Method
## 1 Introduction
Insufficient feature matches can pose a considerable challenge, especially in the context of underwater environments. Scale-invariant feature transform (SIFT) and speeded-up robust features (SURF) stand out as potent tools in terms of their ability to handle image transformation and deformation invariance. [PERSON] [9] proposed a method for extracting unique invariant features from images, which are invaluable for reliable matching across different objects or scenes. These features maintain their invariance to image scaling and rotation, and remarkably, SIFT remains robust even in the presence of variations in image illumination or affine distortion. SIFT's capacity to generate a substantial number of feature vectors, even from a small number of objects, renders it particularly suited for precise matching within large-scale feature databases. [PERSON] et al. [10] introduced the SURF algorithm in response to the slow computational speed of SIFT. However, SURF exhibits lower stability and matching accuracy compared to SIFT, making it less effective in the context of stitching underwater images, particularly in regions with blurred features. In the deep sea, where underwater light rapidly diminishes due to attenuation, natural illumination becomes scarce beyond just a few tens of meters in depth. Consequently, most optical imaging in the deep sea relies on artificial lighting, often resulting in uneven illumination. Therefore, the use of SIFT for image registration in underwater image stitching is highly appropriate. In regions with rich and stable texture features, SIFT excels at extracting a sufficient number of features, enabling the generation of accurate matching pairs. However, underwater stitching frequently encounters challenges in flat areas with limited texture, unclear target contours in captured images, and the presence of underwater microorganisms, all of which can further complicate image quality. Solely relying on SIFT for feature extraction in such cases may result in an insufficient feature set and an inadequate number of accurate matching pairs, ultimately leading to alignment errors and ghosting artifacts in the stitching process. In contrast to existing stitching techniques, our goal is to introduce an underwater image stitching method that is capable of seamlessly merging arbitrarily acquired underwater images. This method remains effective even when the images exhibit blurred feature contours, and it does not depend on detector-related information. In this paper, we present an enhanced SIFT underwater image stitching method designed to address images with blurred feature contours without relying on detector information. The overview of our approach is illustrated in Figure 1 and consists of three stages: the underwater image preprocessing stage, the SIFT-based coarse matching stage, and the SIFT-based precise matching stage. In the first stage, we employ the dynamic threshold white balance method and the contrast limited adaptive histogram equalization (CLAHE) algorithm to adjust colors and enhance brightness. In the second stage, we perform coarse feature extraction using the SIFT algorithm on both the reference image (image A) and the training image (image B). The training image represents the image to be transformed into the target image. Then, we match the features in both images using the nearest neighbor ratio algorithm and the random sample consensus (RANSAC) algorithm. Following this matching process, we rotate the training image using the homography matrix and correct the coordinate origin. Finally, any redundant blank areas are removed to obtain the target image (image C). In the third stage, we conduct accurate feature extraction based on the SIFT algorithm for both the reference image (image A) and the target image (image C). This precise feature extraction is followed by matching the features in both images, culminating in an image-paste-type fusion stitching. Ultimately, the panoramic image is created using the enhanced fade-in and fade-out method for seamless fusion.