Journal of King Saud University: Computer and Information Sciences (Dec 2024)
Image stitching algorithm based on two-stage optimal seam line search
Abstract
Traditional feature matching algorithms often struggle with poor performance in scenarios involving local detail deformations under varying perspectives. Additionally, traditional optimal seamline search-based image stitching algorithms tend to overlook structural and texture information, resulting in ghosting and visible seams. To address these issues, this paper proposes an image stitching algorithm based on a two-stage optimal seamline search. The algorithm leverages a Homography Network as the foundation, incorporating a homography detail-aware network (HDAN) for feature point matching. By introducing a cost volume in the feature matching layer, the algorithm enhances the description of local detail deformation relationships, thereby improving feature matching performance under different perspectives. The two-stage optimal seamline search algorithm designed for image fusion introduces gradient and structural similarity features on top of traditional color-based optimal seamline search algorithms. The algorithm steps include: (1) Searching for structurally similar regions, i.e., high-frequency regions in high-gradient images, and using a color-based graph cut algorithm to search for seamlines within all high-frequency regions, excluding horizontal seamlines; (2) Using a dynamic programming algorithm to complete each vertical seamline, where the pixel energy is comprehensively calculated based on its differences in color and gradient with the surrounding area. The complete seamline energies are then calculated using color, gradient, and structural similarity differences within the seamline neighborhood, and the seamline with the minimum energy is selected as the optimal seamline. A simulation experiment was conducted using 30 image pairs from the UDIS-D dataset (Unsupervised Deep Image Stitching Dataset). The results demonstrate significant improvements in PSNR and SSIM metrics compared to other image stitching algorithms, with PSNR improvements ranging from 5.63% to 11.25% and SSIM improvements ranging from 11.09% to 24.54%, confirming the superiority of this algorithm in image stitching tasks. The proposed image stitching algorithm based on two-stage optimal seamline search, whether evaluated through subjective visual perception or objective data comparison, outperforms other algorithms by enhancing the natural transition of seamlines in terms of structure and texture, reducing ghosting and visible seams in stitched images.