Abstract
Underwater image stitching is challenging because light absorption, color distortion, and poor visibility reduce image quality and the number of reliable feature matches, often resulting in inaccurate alignment. This paper proposes a stitching methodology that combines image enhancement with iterative colormap integration to improve feature matching. First, underwater images are enhanced using RGB stretching and Contrast Limited Adaptive Histogram Equalization (CLAHE). Next, 22 colormaps are applied iteratively to generate alternative image representations. The Scale-Invariant Feature Transform (SIFT) is used for keypoint detection and description, while feature matching is performed using k-nearest neighbors and Lowe’s ratio test. A median-based filtering procedure removes unsuitable correspondences, and the remaining matches are combined to estimate the homography matrix using Random Sample Consensus (RANSAC). Perspective warping produces the stitched images. Experiments on real-world and synthetic underwater images show that RGB stretching and CLAHE increase total keypoint matches by 119.99% and good matches by 30.94%. Colormap integration increases keypoint and good matches by approximately 15-fold and 16-fold, respectively. In 50 scenarios, the proposed method achieves successful stitching in 27 cases, compared with 13 using the OpenCV-based approach.
1. Introduction
Image stitching is an important image processing technique that combines multiple overlapping images into a single, wider representation of a scene. By extending the field of view, it enables the visualization and analysis of areas that cannot be captured in a single image. This is particularly valuable in underwater applications, including seabed mapping, marine habitat monitoring, underwater exploration, archaeological documentation, and the inspection of submerged structures. However, underwater image stitching remains challenging due to the optical properties of water, which cause light absorption, scattering, color distortion, and reduced image contrast. Limited visibility and non-uniform illumination further affect image quality, while camera movement, viewpoint changes, and insufficient visual features can make the identification of corresponding points between images difficult. These factors may lead to inaccurate image alignment, visible artifacts, and incomplete panoramas. Therefore, developing reliable and efficient stitching methods that can address the specific challenges of underwater imaging is essential for producing accurate and comprehensive representations of underwater environments.
Several approaches have been proposed to improve image stitching performance. In [1], an automatic panoramic stitching method is presented, using SIFT for feature extraction and matching, RANSAC for geometric verification, and bundle adjustment for global alignment optimization. In [2], an improved underwater SIFT-based method is introduced, combining dynamic-threshold white balance and CLAHE preprocessing with coarse and precise feature matching, followed by an improved fade-in/fade-out fusion technique. In [3], an adaptive redundant keypoint elimination method is proposed, which adjusts the elimination threshold according to image characteristics and distortion, reducing unnecessary keypoints and improving matching performance. In [4], the FASTITCH algorithm reuses previously extracted feature points and transformation information to avoid repeated feature extraction, achieving approximately 20% faster stitching. Finally, in [5], an underwater video mosaicing method is presented, combining camera trajectory estimation, loop detection, and superpixel-based stitching to address motion and parallax distortions.
Despite the progress in image stitching techniques, achieving reliable results in underwater environments remains challenging. Most existing approaches rely heavily on the detection and matching of local image features, which can be significantly affected by the degraded visual quality of underwater images. Light absorption and scattering, color distortion, low contrast, and non-uniform illumination can reduce the number and distinctiveness of detectable keypoints, leading to inaccurate or insufficient feature correspondences. Furthermore, variations in camera position and orientation, scale changes, and parallax effects can introduce geometric inconsistencies between overlapping images. These difficulties may result in incorrect image alignment, ghosting, visible seams, and incomplete panoramas. Although preprocessing and feature-matching strategies can partially mitigate these issues, their effectiveness may vary depending on the underwater conditions and the characteristics of the captured scene. Therefore, there is still a need for robust and adaptable approaches that enhance image quality and improve feature detection and matching, ultimately enabling more accurate and consistent underwater image stitching.
This paper introduces a novel approach to underwater image stitching that combines colormaps and image preprocessing techniques to address major challenges associated with underwater imaging, such as light absorption, color distortion, and limited visibility. The proposed approach was developed based on the observation that these degradations adversely affect keypoint detection and matching, which are critical stages in image stitching. To address these limitations, colormaps and preprocessing techniques are employed with the common objective of improving the quality and number of detected keypoint matches, thereby facilitating more reliable image alignment and stitching. The proposed methodology is evaluated using a dataset comprising both real-world and synthetic underwater images. Several image quality assessment metrics, including Underwater Color Image Quality Evaluation (UCIQE) and Underwater Image Quality Measure (UIQM), are considered to assess the effectiveness of the enhancement techniques. Furthermore, the proposed approach aims to improve the robustness of feature matching, particularly in challenging cases where conventional stitching methods, such as the approach of Brown and Lowe [1], as implemented in OpenCV, fail to establish sufficient correspondences. The main contributions of this paper are summarized as follows:
- An iterative multi-colormap feature integration approach that applies 22 different colormaps to the input images and combines the resulting SIFT keypoint matches to improve feature correspondence in challenging underwater scenes;
- An integrated image enhancement strategy that combines RGB stretching and CLAHE before feature extraction, aiming to improve the visibility of image details and increase the availability of distinctive keypoints;
- A match selection and aggregation procedure that employs a median-based filtering strategy to identify suitable feature correspondences across the different colormap representations before estimating the homography using RANSAC;
- An experimental assessment of the proposed approach using real-world and synthetic underwater images, examining the individual and combined effects of image enhancement and colormap integration on feature matching and stitching performance;
The remainder of this paper is organized as follows. An overview of the related research is provided in Section 2, while Section 3 includes details about the proposed underwater image stitching methodology. Section 4 contains the experimental evaluation, and Section 5 provides the conclusions alongside future improvements and limitations.
2. Related Work
2.1. Enhancement Approaches for Underwater Imagery
Underwater image enhancement is an important preprocessing stage in underwater vision applications, as image degradation caused by light absorption and scattering can significantly affect the reliability of subsequent image analysis and computer vision tasks. Conventional enhancement approaches have primarily focused on correcting color distortions and improving global and local contrast through histogram modification and color-space transformations. For example, the Relative Global Histogram Stretching (RGHS) method proposed in [6] combines contrast correction in the RGB color space with color correction in the CIE-Lab space to improve underwater image visibility while suppressing noise and preserving image details. Similarly, the approach presented in [7] modifies image histograms using the RGB and HSV color models, incorporating Rayleigh-based stretching to improve contrast, color representation, and detail visibility. Although these methods address fundamental underwater image degradation problems, their effectiveness may vary depending on the characteristics and degradation levels of the input images.
Subsequent research has explored more advanced strategies to address multiple degradation factors simultaneously. In [8], a multi-purpose enhancement framework decomposes underwater images into illumination and reflectance components, allowing brightness compensation, color correction, and contrast enhancement to be performed separately. Another direction involves combining multiple enhancement operations through image fusion. In [9], a multi-scale weighted fusion framework integrates color compensation, homomorphic filtering, gamma correction, and CLAHE to improve image brightness, contrast, and color fidelity. Its performance is evaluated using several objective image-quality indicators, including PSNR, entropy, UCIQE, and UIQM, alongside visual comparisons. Learning-based approaches have also gained attention. In [10], a CNN-based framework employs image-quality metrics to guide underwater image enhancement, reducing its dependence on paired ground-truth reference images for evaluating the enhanced output.
More recent studies have increasingly focused on adaptive enhancement and the relationship between image quality and downstream vision tasks. In [11], a comprehensive review of underwater image enhancement and restoration methods examines their performance across publicly available datasets and discusses commonly used image-quality assessment metrics. Similarly, Ref. [12] systematically reviews underwater color-correction methods, identifying limitations related to computational complexity, data dependency, and inconsistent performance across different underwater conditions. Building on this research direction, Ref. [13] introduces a deep learning framework that automatically selects an appropriate enhancement technique according to the visual characteristics of the input image. The framework combines multiple underwater image-quality metrics into a fused objective measure and employs a Swin Transformer to predict the most suitable enhancement method. Furthermore, Ref. [14] investigates the influence of image enhancement on underwater 3D reconstruction, demonstrating the importance of evaluating preprocessing techniques not only through visual quality indicators but also through their impact on feature extraction and geometric reconstruction.
2.2. Recent Advances in Underwater Image Stitching
Image stitching methods have traditionally relied on identifying corresponding visual features in overlapping image regions and estimating the geometric transformation required to align the images. A foundational contribution in this field is the automatic panoramic stitching framework presented in [1], which combines invariant local features, geometric verification, global alignment optimization, and image blending. In feature-based approaches, SIFT [15] is used to detect and describe distinctive local keypoints that remain relatively robust to scale and rotation changes. The corresponding feature descriptors are matched between images, while RANSAC [16] is employed to reject incorrect correspondences and estimate a reliable geometric transformation, such as a homography. These components form an established basis for conventional image stitching pipelines.
Subsequent studies have sought to improve different stages of this process, particularly feature matching, geometric alignment, and seam quality. For instance, ref. [17] combines SIFT-based feature detection with a redundant keypoint elimination mechanism to reduce unnecessary features and computational requirements during image registration. Rather than relying exclusively on point-based correspondences, ref. [18] introduces line-guided warping and line-point constraints to preserve structural information across overlapping regions, reducing distortion and visual artifacts. Another direction is represented by the quaternion rank-1 alignment (QR1A) model introduced in [19]. This method performs color image alignment using a quaternion-based representation and incorporates a perceptual seam quality (PSQ) measure to evaluate local misalignment along stitching boundaries. Its experimental evaluation considers challenging scenarios involving parallax, low-texture regions, moving objects, and occlusions.
Video stitching has also motivated methods that consider temporal consistency in addition to spatial alignment. In [20], fast structure deformation and double-seam selection are combined with gradient-domain fusion to reduce visual inconsistencies between video frames. Similarly, ref. [21] introduces spatial-temporal content-preserving warping and graph-cut optimization to maintain temporal consistency while minimizing stitching artifacts. For unstructured camera arrays, ref. [22] proposes pairwise warp optimization and weighted extrapolation to reduce parallax and improve temporal stability. These approaches demonstrate that image alignment and seam optimization must often be considered together, particularly when the input images contain significant geometric differences or moving objects.
Underwater image stitching introduces additional difficulties because degraded image quality can reduce the number and reliability of detectable feature correspondences. Consequently, several approaches have been specifically developed to address underwater image characteristics. In [23], a system for underwater video stitching combines image stitching, RGHS-based image enhancement, and projection techniques to generate panoramic videos. Its evaluation considers SSIM, UCIQE, UIQM, and a stitching score, addressing both image quality and stitching performance. For underwater terrain images acquired using side-scan sonar, ref. [24] proposes a spatial-gradient-based feature-block strategy. The method partitions images using spatial-gradient fuzzy C-means clustering and applies accelerated KAZE (A-KAZE) for feature matching, followed by RANSAC-based geometric verification and homography-based fusion. This approach specifically addresses the limited number of distinctive features in underwater terrain images while reducing computational requirements.
Mosaic-Library (version 2.0.1) [25] is a Python-based software package implemented using Python 3.11. It is a video mosaicking framework specifically developed for underwater seabed mapping. It processes video sequences by detecting and matching visual features across consecutive frames to estimate their geometric transformations and align overlapping regions. The aligned frames are progressively combined to generate a continuous underwater mosaic, with additional processing for colour and contrast balancing. Other studies have focused on more complex geometric distortions. In [26], a parallax-tolerant stitching method based on robust elastic warping is introduced, combining an analytical warping function with Bayesian feature refinement to improve alignment in challenging scenes. Similarly, Ref. [27] investigates stitching of sonar images acquired by autonomous underwater vehicles, employing sliding-window seabed detection to handle intensity variations and multiple-frame overlaps. Although sonar-based approaches address important underwater mapping challenges, their imaging characteristics differ from those of conventional optical underwater cameras and therefore require separate consideration.
More recent research has increasingly combined image enhancement with geometric alignment. In [28], a decoupled variational Retinex model is integrated with image registration and seam optimization to reconstruct underwater scenes affected by shallow depth of field, parallax, and moving objects. The method refines control-point correspondences and optimizes overlapping regions to improve the consistency of the reconstructed images. Moving beyond the alignment stage, ref. [29] introduces a framework for rectifying and enhancing underwater stitched images. It employs content-aware mesh warping to correct irregular image boundaries, followed by adaptive color correction and attention-guided fusion to improve visual perception. More recently, ref. [30] proposed a degradation-aware feature collaboration network for underwater image stitching. Its alignment stage combines multi-differential feature extraction, visual enhancement constraints, and semantic-aware feature fusion, while a seam-aware loss is introduced during image composition. The method is evaluated using a real-world underwater stitching dataset containing 700 image pairs, illustrating the growing interest in jointly addressing image degradation and geometric alignment within a unified framework.
While numerous preprocessing and stitching techniques exist for underwater environment images, this paper introduces a novel approach that sets itself apart by incorporating colormaps and combining CLAHE with RGB stretching. This unique method aims to enhance keypoint matches, offering a distinctive contribution not found in existing techniques. Table 1 presents a comparative overview of existing image stitching methods alongside the proposed approach.
Table 1.
Comparative analysis of stitching methods based on key evaluation criteria.
3. Underwater Image Stitching
The methodology starts by gathering two images with a shared overlapping region, and then it applies the preprocessing methods described below to enhance them. Subsequently, 22 distinct colormaps are employed for each enriched image iteratively, and key-point matches are identified between the two images. Once keypoints are established, homography is estimated, and stitching is performed using perspective warping. Fine-tuning follows, involving the cropping of potential black pads in the image. Further details of the image stitching methodology are described in Section 3.2. A visual representation of the proposed methodology is shown in Figure 1.
Figure 1.
Overview of the proposed methodology. Arrows indicate the processing flow, while the ellipsis represents intermediate colormap operations omitted for simplicity. The orange and green backgrounds distinguish the Colormap Module and Stitching Module, respectively.
3.1. Underwater Image Enhancement
Image enhancement for underwater images is a critical step that improves visibility and extracts valuable information from images coming from a challenging environment. Using preprocessing methods improves the overall image quality, and hidden details are revealed. The goal is to produce a better representation of the underwater scene. It is the first methodology’s step, and it helps increase the keypoint matches between the images.
RGB stretching [7] is the first preprocessing technique that was tested. It refers to the histogram stretching of the red, green, and blue channels. It increases the image contrast, and the image pixels are better distributed, covering the entire dynamic range of the intensity level. Water absorbs colors differently based on their wavelengths, and color limitation appears as the depth increases. For example, red disappears first at 5 m, followed by orange at 10 m, yellow at 20 m, green at 30 m, and blue at 60 m. The formula is presented below
where and are the input and output pixels. and are the minimum and maximum intensity level values for the input image, and and denote the intensity values for the output images.
Another similar preprocessing method is RGHS [6]. It consists of two parts. Firstly, the contrast is corrected in RGB, using a formula similar to (1), and then the colors are corrected in the CIE-Lab color space using the following formula:
where represents the output pixels and the represents the input pixels. C value belongs to the A and B components, coming from the CIE-Lab color space, and is in the range of [−128, 127], while is a constant value.
Another methodology used for image enhancement is the CLAHE [31] method. It enriches image contrast by using adaptive histogram equalization to redistribute the intensity levels in local regions. Firstly, it divides the image into tiles and then performs histogram equalization for each tile. Gamma correction [32] was also used as a preprocessing method. It refers to adjusting the image brightness so colors appear correctly on-screen. It involves mapping input values through a correction function tailored to display colors accurately. The formula used for gamma correction is shown below
where is the corrected output intensity, and is the input intensity raised to the power of , given by the user and adjusted based on the desired correction characteristics.
After testing individual preprocessing methods, various combinations were explored and evaluated. The most effective combination was identified and selected based on the achieved results. This combination includes RGB stretching and CLAHE. Firstly, the image is stretched according to its RGB channels, and then CLAHE is applied. The results of each preprocessing method are shown in Figure 2. The selection of this combination was not based solely on visual inspection. Its effectiveness was further investigated through quantitative evaluation of image quality and feature-matching performance, as presented in Table 2. These results provide additional experimental evidence supporting the selection of RGB stretching combined with CLAHE.
Figure 2.
Highlighting the efficiency of underwater image enhancement methods through advanced techniques.
Table 2.
Evaluation metrics for image quality after preprocessing.
Two metrics were employed to assess the outcomes and reveal any image quality improvement. The first metric is the UCIQE [33]. It is a linear combination of saturation, chroma, and contrast, and is proposed to quantify blurring, non-uniform colors, and low contrast that characterize underwater images. The formula used to calculate UCIQE is shown below
where is the chroma standard deviation, while is the saturation’s average, is the contrast of luminance, and C1, C2, C3 are weighted coefficients.
The second metric used to quantify underwater image enhancement is the UIQM [34]. It comprises three underwater image attribute measures, such as the Underwater Image Colorfulness Measure (UICM), the Underwater Image Contrast Measure (UICoM), and the Underwater Image Sharpness Measure (UISM). Generally, a higher UIQM value means an increase in image quality. The formula is shown as follows:
where D1, D2, and D3 are constants, and UICM, UISM, and UICoM are described above.
3.2. Image Stitching Integrating Different Colormaps
The methodology of stitching starts by gathering two images. It works with two images as input, but can extend to take more and stitch them together. The input images can be enhanced using the techniques outlined in Section 3.1 to achieve higher accuracy and increase keypoint matches.
The subsequent phase involves the application of 22 distinct colormaps to each image, followed by optimal keypoint match identification and retention for each colormap. The utilized colormap names are autumn, bone, jet, winter, rainbow, ocean, summer, spring, cool, hsv, pink, hot, parula, magma, inferno, plasma, viridis, cividis, twilight, twilight_sifted, turbo, and deepgreen. The reason for choosing these colormaps focuses on providing a limited but diverse set of colormaps, aiming to balance the need for effective visualization with the number of options. This set ensures simplicity and ease of use. Fewer colormaps reduce computational costs but also affect stitching accuracy. The limited selection aims to balance efficiency and performance. This step is significant as it sets this methodology apart from others by facilitating higher keypoint numbers in detection. The colors of underwater images make keypoint detection difficult, but in this way, an increase in their contrast is achieved.
In detail, the images are provided as input, and a color map is selected from a list containing all 22. Then, the keypoint matches are found using the SIFT algorithm, which is used in similar tasks [35] and is not affected by scale, rotation, lighting conditions, or viewpoint, which makes it ideal for similar scenarios. SIFT starts with keypoint detection and continues with localization, orientation, and descriptor generation. SIFT is a feature detection and description algorithm designed to identify distinctive local image features that can be reliably matched across images. Initially, it detects potential keypoints at different scales by identifying local extrema in a scale-space representation of the image. These keypoints are then localized to improve their spatial accuracy, and a dominant orientation is assigned to each one based on the local image gradients. Finally, a descriptor is generated for each keypoint by analyzing the distribution of local gradient orientations within its neighborhood. This descriptor provides a distinctive representation of the surrounding image region, allowing corresponding features to be identified even when images exhibit scale or rotational differences.
After obtaining all the keypoints, the k-nearest neighbors algorithm is employed to identify matches between the two input images, utilizing the keypoint descriptors. The k-nearest neighbors (k-NN) algorithm compares the descriptors of keypoints between the two images based on their descriptor distances and identifies the closest candidates. Lowe’s ratio test [1] then evaluates the distances of the two nearest candidates. A match is retained when the distance to the closest candidate is sufficiently smaller than the distance to the second-closest candidate, indicating a more distinctive correspondence. This filtering step helps eliminate ambiguous matches and reduces the number of incorrect correspondences used in the subsequent geometric estimation. Additionally, another function has been implemented to reduce the number of keypoint matches. The process operates by calculating the median of all distances between matches and eliminating those that deviate significantly from it, employing a predefined threshold. Matches differing from the median by more than this threshold are removed.
Subsequently, the well-suited matches are systematically accumulated in a list, initiating an iterative process with each colormap iteration. Following 22 iterations, this compiled list encompasses a significantly augmented number of keypoints compared to what would be achieved without colormap utilization. This variety of well-suited matches contributes to an enhanced stitching outcome. The well-suited matches from all iterations are then employed for the homography matrix calculation. It should be noted that correspondences detected across different colormaps may include repeated detections of the same physical features. Although geometric filtering and RANSAC are applied to reduce inconsistent matches, explicit deduplication of correspondences across colormaps is not currently implemented. Therefore, the accumulated number of matches should not be interpreted as an equivalent increase in independent geometric information.
The homography between the matched keypoints is estimated using RANSAC, a robust method for estimating geometric transformations in the presence of incorrect feature correspondences (outliers). RANSAC iteratively selects a minimal subset of matched keypoints to estimate a candidate homography matrix and evaluates its consistency with the remaining correspondences. Matches that agree with the estimated transformation within a predefined reprojection error threshold are considered inliers. This process is repeated to identify the homography supported by the largest number of consistent correspondences, reducing the influence of incorrect matches. The resulting homography matrix represents the projective transformation between the two image planes and is subsequently used for image alignment and perspective warping. Subsequently, the image warping follows. To achieve this, firstly, the maximum dimensions of the warped image should be determined. This task is accomplished using Algorithm 1.
After applying the homography matrix to the four image corners, the warping is performed by affine transformation using the second image, the homography matrix, and the new image dimensions. The first image is padded with black pixels on the edges to match the warped image size. The location of the padding depends on how the images are stitched together. For example, if they form a left-right panorama, the padding should be on the right side of the first image. Although the methodology is initially designed to stitch two images at a time, it is extended to handle multiple images by repeatedly applying the same process. Additionally, the approach is flexible in terms of image orientation, allowing for stitching in all directions, including left to right, right to left, top to bottom, and bottom to top, making it adaptable to various imaging scenarios.
| Algorithm 1 Warping Dimensions Calculation |
|
3.3. Implementation Details
The implementation specifications for the evaluated image-processing techniques and quality metrics were based on parameter values reported in the relevant literature. Specifically, the value for RGHS was set to 1.3 according to [6], while the value for gamma correction was set to 0.7 according to [36]. For the UCIQE metric, the coefficients , , and were set to 0.4680, 0.2745, and 0.2576, respectively, according to [33]. Similarly, for the UIQM metric, the corresponding coefficients (, , and ) were set to 0.0282, 0.2953, and 3.5753, respectively, according to [34]. Finally, the CLAHE method was configured using a rectangular tile grid of size (4, 4) and a clip limit of 2, according to [31].
These parameter values were adopted from previous studies rather than optimized specifically for the experimental dataset. This approach was followed to maintain consistency with established implementations and enable a fair comparison between the evaluated preprocessing techniques. All parameter settings were kept fixed throughout the experiments and applied consistently to the evaluated images. Since no model training or dataset-specific hyperparameter optimization was performed, a conventional training/validation/test split was not required for parameter selection. Nevertheless, adapting the methodology to a new dataset may require reconsidering the parameter settings to account for different imaging conditions.
4. Experimental Evaluation
The experimental evaluation includes a comprehensive overview of the dataset, implementation details, and the experiments carried out. Performance and effectiveness are assessed through both quantitative metrics and qualitative observations.
4.1. Dataset
A dataset consisting of 50 panoramic scenes was created to assess the effectiveness. Each scene was selected from a pool of 100 underwater images. This dataset was designed to encompass diverse underwater scenarios, allowing for a comprehensive experimental evaluation across a spectrum. Most images were sourced from real underwater videos, while some of the scenes were created by downloading panoramic images, subsequently divided into two segments. To evaluate the methodology’s performance on stitching more than two images, an additional dataset comprising 10 panoramic scenes from two underwater wrecks was used. Each set contained between 3 and 9 images, allowing for varied testing scenarios and demonstrating the method’s scalability. Incorporating images extracted from real-world videos and diverse cameras was a deliberate choice, aiming at the method’s efficacy evaluation across a range of resolutions and color profiles. This approach ensures a comprehensive performance assessment under different visual conditions and enhances adaptability to real-world scenarios.
4.2. Results
Both qualitative and quantitative analyses were conducted to provide a comprehensive understanding of the data. The qualitative analysis focused on identifying insights from non-numerical information. Meanwhile, the quantitative analysis involved statistical methods to measure and analyze numerical data, ensuring a balanced and data-driven approach. The evaluation started with the entire dataset preprocessing with a spectrum of techniques specifically designed for enhancing underwater images. Each original image underwent seven different versions of preprocessing, resulting in a total of 700 images subjected to testing. Afterward, the image quality metrics provided some feedback about the preprocessing methods. The detailed results are presented in Table 2.
The UCIQE metric showed that RGB–CLAHE achieved the highest value, indicating better chroma, contrast, and saturation in the resulting image. The UIQM metric, on the other hand, obtained its highest value for RGB stretching, indicating a more visually appealing result from a human visual perception perspective. The CLAHE and Gamma methods, together with their combination, closely followed, while the combination of RGB stretching and CLAHE was 0.04 behind.
Following the evaluation of the enhancement process, in terms of metrics, there was an assessment by quantifying the number of matches to determine the efficiency of the applied techniques in image stitching. The image enhancement techniques that were examined included RGB stretching, RGHS, Gamma correction, CLAHE, and some combinations of those that had the highest results, such as RGB stretching or RGHS, gamma correction, and CLAHE, as well as RGB together with CLAHE, which demonstrated the highest results. The comprehensive results of these evaluations are presented in Table 3.
Table 3.
Colormaps and image enhancement evaluation on keypoint matches.
The “total matches” column presents how many matches were found by the methodology, while the “good matches” column specifies how many are well-suited for stitching. The approach initially calculates the Euclidean distance between pairs and determines the median of all differences to find the keypoints that will help most in stitching. Then, only those that were close to the median were kept. A threshold was provided, and if the difference was more than the median + threshold or less than the median − threshold, the pairs were excluded. In the methodology, if the number of well-suited matches falls short, the threshold rises until there are at least four well-suited matches. In the evaluation, the threshold remained at 10 to maintain consistent conditions across all experiments.
The results demonstrated that the best preprocessing method for increasing the match numbers was the combination of RGB stretching with the CLAHE method. The keypoint matches increased by 119.99% and 30.94% for “total” and “good” matches, respectively. This combination was tested because the color stretching technique of RGB had the most well-suited matches, and among the other preprocessing methods, CLAHE stood out. Their combination is working and giving the best “good match” numbers.
The RGHS method had the least well-suited matches despite having the best metrics about image quality, which shows that the factors that play crucial roles in stitching are different and that brightness is a key element when trying to find keypoint matches, which is the reason that RGB stretching and CLAHE had helped. The experiments involved comparing stitched images following the optimal preprocessing combination, specifically RGB and CLAHE. In these initial tests, comparisons were conducted with and without colormap utilization. The findings revealed a remarkable increase of 1586.55% for total matches and 1611.68% for well-suited matches, translating to an approximately 16-fold increase in the number of keypoint matches. Having more keypoint matches does not necessarily lead to enhanced stitching results. Therefore, it is essential to focus on the number of high-quality matches and assess overall stitching performance across a diverse set of images. In a comparison of stitching results for 50 images, the methodology utilized by OpenCV often failed to deliver satisfactory outcomes, while the proposed method consistently achieved better performance. In 50 challenging underwater scenarios, the proposed methodology achieved accurate stitching 27 times, compared to 13 times with OpenCV. This represents an improvement of approximately 107.69%. The remaining instances were unsuccessful due to significant movement between frames or the motion of objects within the images. An advantage of the method is its insensitivity to scale variations, enabling effective results even when images are resized, which can lead to faster results.
The experimental evaluation of the stitching process revealed that preprocessing proved beneficial in stitching cases where unprocessed images encountered difficulties. The methodology demonstrated efficiency even in scenarios where the robust approach of Brown and Lowe [1], which is utilized by OpenCV, failed. An illustrative result, showcasing a stitched image alongside the initial images that contributed to its creation, is presented in Figure 3.
Figure 3.
Stitching results for nine real-life underwater images.
Furthermore, in Figure 4, the impact of colormaps becomes evident. The initial image is presented without colormaps, and corresponding matches are visualized. Beyond this, the figure showcases five distinct colormap images alongside their matches. These matches are stored in a list, contributing to a significantly larger total match count. A specialized function, previously analyzed, is then employed to filter and retain only the well-suited matches. This approach enhances the stitching process and is valuable in challenging underwater scenarios.
Figure 4.
Visualization of the matches when colormaps are applied.
In Figure 5, the increase in the number of SIFT keypoints after applying colormaps is demonstrated. The image initially contains a limited number of keypoints, which increases significantly after the colormap application. While some of the additional keypoints may introduce incorrect matches, these can be effectively filtered out using appropriate mismatch removal techniques. This paradigm illustrates that in scenarios where the original image lacks sufficient keypoints for reliable stitching, the use of colormaps can enhance keypoint richness.
Figure 5.
Comparison of SIFT keypoint detection results under different colormaps and their fusion.
In a scenario involving the stitching of 9 images at 1920 × 1080 resolution, the process completed in approximately 102.80 s. The operation maintained a minimal memory footprint of just 1.392 MB, with a moderate CPU utilization of 26.3%. Notably, the procedure was entirely CPU-bound, requiring no GPU acceleration, indicating a lightweight yet computationally focused approach. Despite the lack of parallel GPU processing, the system efficiently handled the workload, making it suitable for environments where GPU resources are limited or unavailable.
To further investigate the performance of the proposed methodology, a comparative evaluation was conducted against two alternative approaches, namely Mosaic-Library [25] and OpenCV [1]. For the Mosaic-Library comparison, which is designed to operate on video sequences, the two images forming each panorama were initially converted into a video before applying the stitching procedure. OpenCV was also considered as a baseline, as it employs a similar feature-based stitching approach. However, its processing strategy is more restrictive, since it may reject image pairs that do not satisfy its matching requirements, rather than producing a partially acceptable stitching result. Consequently, some cases that were classified as partially successful by the proposed methodology resulted in complete failures when processed with OpenCV.
The results are shown in Table 4. They demonstrate that the proposed approach outperforms both alternatives in terms of the overall acceptance rate. In particular, the proposed colormaps with enhancement configuration achieved the highest performance, with 27 fully successful and 12 partially successful stitching results, corresponding to an overall acceptance rate of 78%. In comparison, Mosaic-Library achieved an acceptance rate of 42%, while OpenCV achieved 26%. In addition, image blurring was observed in several mosaics generated using Mosaic-Library. These findings indicate that the proposed approach is more effective in handling challenging underwater image pairs, where conventional stitching methods may fail to establish sufficient correspondences or produce an acceptable panorama.
Table 4.
Comparative evaluation of stitching methods based on processing outcomes.
Additionally, an ablation study was conducted to investigate the individual and combined contributions of colormaps and image enhancement to the stitching performance. Four configurations were evaluated: (i) without colormaps or enhancement, (ii) without colormaps but with enhancement, (iii) with colormaps but without enhancement, and (iv) with both colormaps and enhancement. The configuration incorporating both colormaps and enhancement achieved the highest number of fully successful stitches (27), demonstrating the benefit of combining these two processing stages.
It is worth noting that the primary comparison within the ablation study is between the original configuration, without colormaps or enhancement, and the fully enhanced configuration. This comparison highlights the contribution of the proposed methodology, which introduces additional image-processing stages to improve the visibility and detectability of features in underwater images, aiming to increase the number of usable feature correspondences between overlapping images. The objective is not to introduce a universally superior stitching algorithm, but rather to improve the robustness of the stitching process under challenging underwater conditions, where conventional feature detection and matching may be insufficient. The evaluation also distinguishes between fully successful, partially successful, and failed stitching cases. Partially successful results correspond to panoramas that are not entirely satisfactory but exhibit substantial alignment and stitching quality, approaching an acceptable result.
To further validate the proposed stitching methodology, an additional evaluation was conducted using synthetic images with known ground-truth panoramas. Specifically, six synthetic panoramas were divided into two overlapping images each, resulting in a total of 12 images to be stitched. Since the original panoramas were available, the Structural Similarity Index (SSIM) was used to quantitatively assess the similarity between the reconstructed panoramas and their corresponding ground-truth images. The comparison was performed between the proposed colormap-based method combined with image enhancement and Mosaic-Library. In the proposed approach, colormaps and enhancement are applied exclusively during feature detection and matching, while the final panorama is generated using the original, unenhanced images. Therefore, the reconstructed results can be directly compared with the ground-truth panoramas.
OpenCV was excluded from this evaluation because it failed to produce successful stitching results for these image pairs, despite their relatively simpler characteristics compared to the real-world underwater images. Furthermore, the synthetic image pairs required less processing time to stitch than the real-world cases. The proposed method achieved an average SSIM value of 0.81, compared to 0.61 for Mosaic-Library, representing a relative improvement of approximately 32.79%. The lower SSIM value obtained by Mosaic-Library was associated with greater image blurring and loss of fine details in the resulting panoramas. The results are presented in Table 5.
Table 5.
SSIM comparison between the proposed colormap-based stitching method and Mosaic-Library for the six synthetic panoramas.
Regarding the synthetic image evaluation and the ablation study presented in Table 4, the proposed method achieved five successful stitching results without colormaps, both with and without enhancement. When colormaps were applied, all six panoramas were successfully stitched, both with and without enhancement. Mosaic-Library also achieved six successful results, whereas OpenCV achieved only one.
5. Conclusions
Color information could be enhanced using the proposed methodology, and in underwater image cases, the stitching results could benefit from it. The findings from both qualitative and quantitative analyses offer a well-rounded perspective on the research topic. The qualitative insights revealed key patterns, while the quantitative results provided measurable evidence to support the conclusions. The results highlight the positive impact of colormaps, leading to a 15-fold increase in detected keypoint matches across all cases and a 16-fold increase in well-suited matches. The preprocessing enhancement techniques increased detected keypoint matches by 119.99%. Furthermore, there was a 30.94% improvement in the number of suitable stitching matches, underscoring the significance of these techniques in underwater scenarios. When stitching faced challenges, preprocessing and colormaps proved instrumental in achieving superior results and completing the task, overcoming limitations associated with unprocessed images. In 50 demanding underwater scenarios, the proposed methodology successfully achieved accurate stitching in 27 cases, while OpenCV managed 13, leading to an increase of 107.69%. Additionally, the scale-invariance of the methodology leads to improved processing speeds when the resolution is reduced.
The methodology supports stitching multiple image pairs through iterative application, enabling the creation of full panoramas. Its directional flexibility, allowing stitching in any orientation, makes it highly adaptable to various underwater scenarios. Combined with the enhanced accuracy from colormap usage, it proves especially effective in low-light, low-visibility conditions, offering a more reliable alternative to traditional approaches.
One methodology’s limitation is that using colormaps tends to be slower compared to approaches that do not employ them. However, colormaps greatly enhance accuracy in challenging, low-light conditions, such as underwater environments, making the trade-off worthwhile in scenarios where precision is more important than speed.
In future research, it would be valuable to investigate the significance of each employed colormap. Identifying the most crucial colormaps could reduce computational costs, establishing an optimal balance between precise stitching outcomes and computational efficiency. Also, future work will focus on expanding the dataset and conducting a broader experimental evaluation to further strengthen the generalizability of the proposed methodology. Additionally, exploring dynamic adjustments to the threshold for reducing matches in each image case, rather than a fixed threshold, could further economize computational resources. Another plan is to improve the stitching pipeline by incorporating more advanced seam blending and image cropping techniques to minimize visible boundaries, colour discontinuities, and black regions, ultimately producing more seamless and visually consistent panoramas. Furthermore, conducting experiments on stitching datasets unrelated to underwater scenarios would assess the general applicability of the preprocessing techniques in different contexts, potentially extending their utility beyond underwater imagery. Lastly, future work will investigate the incorporation of a deduplication mechanism to identify and eliminate repeated correspondences across different colormaps. This would enable a more accurate estimation of the number of unique correspondences and a better understanding of their contribution to homography estimation and the overall stitching quality.
Author Contributions
Conceptualization, A.V. and S.K.; methodology, A.V.; software, A.V.; validation, A.V. and S.K.; formal analysis, S.K.; investigation, S.K.; data curation, S.K.; writing—original draft preparation, A.V.; writing—review and editing, A.V.; visualization, A.V.; supervision, D.T. and S.K.; project administration, D.T. and S.K.; funding acquisition, D.T. All authors have read and agreed to the published version of the manuscript.
Funding
This research has been financed by the European Regional Development Fund of the European Union and Greek national funds through the Action “Investment Plans of Innovation” in the framework of the Operational Program “Central Macedonia 2014-2020” (project code: i-ScubaDiving, KMP6-0082362). This support is gratefully acknowledged.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The original contributions presented in this study are included in the article.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Brown, M.; Lowe, D. Automatic Panoramic Image Stitching using Invariant Features. Int. J. Comput. Vis. 2007, 74, 59–73. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Zheng, R.; Zhang, W.; Shao, J.; Miao, J. An Improved SIFT Underwater Image Stitching Method. Appl. Sci. 2023, 13, 12251. [Google Scholar] [CrossRef] [Scilit]
- Hossein-Nejad, Z.; Agahi, H.; Mahmoodzadeh, A. Image Matching based on the Adaptive Redundant Keypoint Elimination Method in the SIFT Algorithm. Pattern Anal. Appl. 2021, 24, 669–683. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.; Tang, Z.; Huang, J.; Li, J. Fast Calibration Stitching Algorithm for Underwater Camera. Multimed. Tools Appl. 2023, 82, 27707–27726. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Randall, C.J.; van Woesik, R.; Ribeiro, E. Underwater Video Mosaicing using Topology and Superpixel-based Pairwise Stitching. Expert Syst. Appl. 2019, 119, 171–183. [Google Scholar] [CrossRef] [Scilit]
- Huang, D.; Wang, Y.; Song, W.; Sequeira, J.; Mavromatis, S. Shallow-water Image Enhancement using Relative Global Histogram Stretching Based on Adaptive Parameter Acquisition. In MultiMedia Modeling: 24th International Conference, Bangkok, Thailand; Springer: Berlin/Heidelberg, Germany, 2018; pp. 453–465. [Google Scholar] [CrossRef] [Scilit]
- Abdul Ghani, A.S.A.; Mat Isa, N.A.M. Underwater Image Quality Enhancement through Integrated Color Model with Rayleigh Distribution. Appl. Soft Comput. 2015, 27, 219–230. [Google Scholar] [CrossRef] [Scilit]
- Mi, Z.; Li, Y.; Wang, Y.; Fu, X. Multi-purpose Oriented Real-world Underwater Image Enhancement. IEEE Access 2020, 8, 112957–112968. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Gong, L.; Li, X.; Liu, F.; Yin, J. An Underwater Imaging Method of Enhancement via Multi-Scale Weighted Fusion. Front. Mar. Sci. 2023, 10, 1150593. [Google Scholar] [CrossRef] [Scilit]
- Barbosa, W.V.; Amaral, H.G.; Rocha, T.L.; Nascimento, E.R. Visual-quality-driven Learning for Underwater Vision Enhancement. In 25th IEEE International Conference on Image Processing (ICIP); IEEE: New York, NY, USA, 2018; pp. 3933–3937. [Google Scholar] [CrossRef] [Scilit]
- Wang, M.; Zhang, K.; Wei, H.; Chen, W.; Zhao, T. Underwater Image Quality Optimization: Researches, Challenges, and Future Trends. Image Vis. Comput. 2024, 146, 104995. [Google Scholar] [CrossRef] [Scilit]
- Lai, Y.L.; Ang, T.F.; Bhatti, U.A.; Ku, C.S.; Han, Q.; Por, L.Y. Color Correction Methods for Underwater Image Enhancement: A Systematic Literature Review. PLoS ONE 2025, 20, e0317306. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Vrochidis, A.; Krinidis, S. Adaptive Underwater Image Enhancement Techniques Using Deep Learning. Appl. Syst. Innov. 2026, 9, 88. [Google Scholar] [CrossRef] [Scilit]
- Vrochidis, A.; Tzovaras, D.; Krinidis, S. Enhancing 3D Reconstructions in Underwater Environments: The Impact of Image Enhancement on Model Quality. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2025, XLVIII-2/W10-2025, 317–324. [Google Scholar] [CrossRef] [Scilit]
- Lowe, D.G. Distinctive Image Features from Scale-Invariant Keypoints. Int. J. Comput. Vis. 2004, 60, 91–110. [Google Scholar] [CrossRef] [Scilit]
- Fischler, M.A.; Bolles, R.C. Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Commun. ACM 1981, 24, 381–395. [Google Scholar] [CrossRef] [Scilit]
- Hossein-Nejad, Z.; Nasri, M. Clustered Redundant Keypoint Elimination Method for Image Mosaicing using a New Gaussian-Weighted Blending Algorithm. Vis. Comput. 2022, 38, 1991–2007. [Google Scholar] [CrossRef] [Scilit]
- Jia, Q.; Li, Z.; Fan, X.; Zhao, H.; Teng, S.; Ye, X.; Latecki, L.J. Leveraging line-point consistence to preserve structures for wide parallax image stitching. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2021; pp. 12186–12195. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Zhou, Y. Automatic Color Image Stitching using Quaternion Rank-1 Alignment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2022; pp. 19720–19729. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Xu, W.; Zhang, J.; Zhang, M.; Wang, Z.; Li, X. Efficient video stitching based on fast structure deformation. IEEE Trans. Cybern. 2014, 45, 2707–2719. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Jiang, W.; Gu, J. Video stitching with spatial-temporal content-preserving warping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops; IEEE: New York, NY, USA, 2015; pp. 42–48. [Google Scholar] [CrossRef] [Scilit]
- Perazzi, F.; Sorkine-Hornung, A.; Zimmer, H.; Kaufmann, P.; Wang, O.; Watson, S.; Gross, M. Panoramic video from unstructured camera arrays. Comput. Graph. Forum 2015, 34, 57–68. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.; Wu, H.; Yu, T.; Fu, M.; Liu, B.; Cheng, J.; Ye, Q.; Zhang, N.; Huang, S.; Lu, X.; et al. A video stitching system of underwater image. In Proceedings of the 2021 IEEE 23rd International Conference on High Performance Computing & Communications (HPCC); IEEE: New York, NY, USA, 2021; pp. 1006–1013. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.; Li, J.; Wang, X.; Niu, X. Underwater Terrain Image Stitching Based on Spatial Gradient Feature Block. Comput. Mater. Contin. 2022, 72, 4157–4171. [Google Scholar] [CrossRef] [Scilit]
- Thompson, F.; O’Brien-Møller, D.; Lundgren, B.; Mariani, P. Mosaic-library: A Python video mosaicking library specialised for seabed mapping. SoftwareX 2025, 29, 102022. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Wang, Z.; Lai, S.; Zhai, Y.; Zhang, M. Parallax-tolerant image stitching based on robust elastic warping. IEEE Trans. Multimed. 2017, 20, 1672–1687. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Z.; Wu, R.; Li, D.; Lin, M.; Xiao, S.; Lin, R. Image stitching and target perception for Autonomous Underwater Vehicle-collected side-scan sonar images. Front. Mar. Sci. 2024, 11, 1418113. [Google Scholar] [CrossRef] [Scilit]
- Zhou, J.; Wang, S.; Zhang, D.; Jiang, Q.; Jiang, K.; Lin, Y. Decoupled Variational Retinex for Reconstruction and Fusion of Underwater Shallow Depth-of-Field Image with Parallax and Moving Objects. Inf. Fusion 2024, 111, 102494. [Google Scholar] [CrossRef] [Scilit]
- Chang, L.; Wang, Y.; Du, B.; Xu, C. Rectangling and Enhancing Underwater Stitched Image via Content-Aware Warping and Perception Balancing. Neural Netw. 2025, 181, 106809. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, J.; Shang, X.; Zhang, Z.; Liu, J. Degradation-Aware Feature Collaboration for Underwater Image Stitching. Pattern Recognit. 2026, 175, 113082. [Google Scholar] [CrossRef] [Scilit]
- Otsuka, R.; Shoji, Y.; Ogino, Y.; Toizumi, T.; Ito, A. IA-CLAHE: Image-Adaptive Clip Limit Estimation for CLAHE. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops; IEEE: New York, NY, USA, 2026; pp. 2259–2268. [Google Scholar] [CrossRef] [Scilit]
- Lepcha, D.C.; Goyal, B.; Dogra, A.; Vullikanti, V.; Mayan, J.A.; Sahu, P.K.; Kumar, S.; Siddaraj, U. Underwater Image Enhancement Using Colour Balancing and Morphological Residual Processing through Gamma Correction. Sci. Rep. 2026, 16, 3182. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yang, M.; Sowmya, A. An Underwater Color Image Quality Evaluation Metric. IEEE Trans. Image Process. 2015, 24, 6062–6071. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Panetta, K.; Gao, C.; Agaian, S. Human-visual-system-inspired Underwater Image Quality Measures. IEEE J. Ocean. Eng. 2015, 41, 541–551. [Google Scholar] [CrossRef] [Scilit]
- Vrochidis, A.; Tzovaras, D.; Krinidis, S. Enhancing Three-Dimensional Reconstruction Through Intelligent Colormap Selection. Sensors 2025, 25, 2576. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gao, F.; Wang, K.; Yang, Z.; Wang, Y.; Zhang, Q. Underwater Image Enhancement Based on Local Contrast Correction and Multi-Scale Fusion. J. Mar. Sci. Eng. 2021, 9, 225. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the International Institute of Knowledge Innovation and Invention. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




