Image stitching method and stitching system based on adaptive multi-scale transformation

Through the image stitching method of adaptive multi-scale transformation, multi-scale feature extraction, edge detection and genetic algorithms are used to solve the shortcomings of traditional stitching methods in complex scenarios, and high-quality and high-definition image stitching is achieved.

CN118570058BActive Publication Date: 2025-06-27SICHUAN NATIONAL INNOVATION VISION UHD VIDEO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410659518.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2025-06-27
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

When traditional image stitching methods process images in complex scenes such as different scale characteristics, lighting conditions, shooting angles, etc., it is difficult to achieve the ideal stitching effect, which often leads to obvious seams and distortions in the stitching area.

Method used

The image stitching method of adaptive multi-scale transformation is adopted, and the fusion weights and parameters are calculated through multi-scale feature extraction, edge detection algorithm segmentation, and the genetic algorithm iteratively calculates the fusion weights and parameters, and dynamically adjusts the fusion parameters to generate high-quality stitching images.

Benefits of technology

More accurate and efficient image stitching is achieved, reducing seams and distortions in the stitching area, and improving the visual effect and automation of the stitching image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570058B_ABST
    Figure CN118570058B_ABST
Patent Text Reader

Abstract

The present invention provides an image stitching method and a stitching system based on adaptive multi-scale transformation, belonging to the technical field of image processing. By performing multi-scale feature extraction on the images to be stitched, adaptively assigning fusion weights to the multi-scale features extracted from adjacent images, using an edge detection algorithm to divide adjacent images into multiple regions, and adjusting the fusion parameters between regions of adjacent images according to the attributes of the regions, iteratively calculating the fusion weights and fusion parameters through a genetic algorithm, determining the optimal parameter combination based on evaluation metrics, and finally generating a high-quality and high-definition stitched image. The present invention can make full use of the feature information of images at different scales, achieve more accurate and efficient image stitching, and the method of adjusting fusion parameters based on regional attributes can reduce seams and distortions in the stitching region, improve the visual effect of the stitched image, and automatically find the stitching parameters most suitable for the current image, improving the automation degree and robustness of the stitching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular, to an image stitching method and a stitching system based on adaptive multi-scale transformation. Background Art

[0002] With the rapid development of computer vision and digital image processing technologies, image stitching technology plays an increasingly important role in many fields, such as panoramic image generation, medical image analysis, virtual reality, augmented reality, etc. The core of image stitching technology lies in how to accurately and efficiently fuse multiple images seamlessly to generate a high-quality and high-definition stitched image.

[0003] Traditional image stitching methods mainly rely on simple pixel-level fusion or feature-based fusion methods. However, when dealing with images in complex scenarios with different scale features, lighting conditions, shooting angles, etc., these methods often fail to achieve ideal stitching effects. For example, pixel-level fusion methods are prone to generating obvious seams in the stitching area, while feature-based fusion methods may introduce errors in feature matching and transformation processes, resulting in distortion or misalignment of the stitched image.

[0004] Therefore, it is necessary to provide an image stitching method and a stitching system based on adaptive multi-scale transformation to solve the above technical problems. Summary of the Invention

[0005] To solve the above technical problems, the present invention provides an image stitching method and a stitching system based on adaptive multi-scale transformation, which can solve the deficiencies of traditional image stitching methods in dealing with complex scenarios and improve the quality and clarity of the stitched image.

[0006] An image stitching method based on adaptive multi-scale transformation provided by the present invention includes the following steps:

[0007] S1: Perform multi-scale feature extraction on the images to be stitched, and adaptively assign fusion weights to the multi-scale features extracted from adjacent images to be stitched;

[0008] S2: Use an edge detection algorithm to divide adjacent images to be stitched into multiple regions, and adjust the fusion parameters of regions between adjacent images to be stitched according to the attributes of the regions;

[0009] S3: Use a genetic algorithm to iteratively calculate the fusion weights and fusion parameters, and determine the optimal parameter combination based on evaluation indicators;

[0010] S4: Perform fusion processing on the multi-scale features according to the fusion weights and fusion parameters of the optimal parameter combination to generate a stitched image.

[0011] Preferably, step S1 specifically includes:

[0012] S101: Decompose each image to be stitched into multi-scale features using the discrete wavelet transform method. For a two-dimensional image I to be stitched, the first-order wavelet decomposition is expressed as:

[0013] [C A , C H , C V , C D = DWT(I)

[0014] where C A is the approximation coefficient, and C H , C V , C D are the detail coefficients in the horizontal, vertical, and diagonal directions respectively, and DWT(I) is the discrete wavelet transform performed on the image I to be stitched;

[0015] S102: Use the local feature matching algorithm SIFT to extract the key features of each pair of adjacent images to be stitched at each scale, and then calculate the feature similarity at each scale according to the Euclidean distance between the key features;

[0016] S103: Calculate the content contribution value of the features at each scale to the image to be stitched;

[0017] S104: According to the calculated feature similarity and content contribution value, assign fusion weights to the features at each scale. Among them, the calculation formula for the fusion weight is:

[0018] W i = αS i + βI i

[0019] where W i is the fusion weight, α and β are weight factors, S i is the feature similarity, and I i is the content contribution value.

[0020] Preferably, step S2 specifically includes:

[0021] S201: Based on the edge detection algorithm, perform region segmentation on adjacent images to be stitched, and segment them into an edge region, a texture region, and a smooth region;

[0022] S202: Obtain the respective attributes of the edge region, the texture region, and the smooth region. Among them, the attributes include texture density and color change rate;

[0023] S203: Dynamically adjust the fusion parameters of the regions between adjacent images to be stitched based on the texture density and color change rate of the edge region, the texture region, and the smooth region.

[0024] Preferably, step S3 specifically includes:

[0025] S301: Construct an initial population based on the genetic algorithm for the parameter combination, and the chromosomes in the initial population correspond to the fusion parameters;

[0026] S302: Perform fusion of the images to be stitched based on each chromosome in the initial population, and calculate the corresponding fitness value using the selected evaluation index;

[0027] S303: Perform iterative genetics of the parameter combination according to the fitness value until convergence, and use the parameter combination corresponding to the chromosome with the highest current fitness value as the optimal parameter combination, where the genetic operations include selection, crossover, and mutation.

[0028] Preferably, step S4 specifically includes:

[0029] S401: Perform weighted fusion on the multi-scale features of adjacent images to be stitched based on the fusion weights in the optimal parameter combination to obtain fusion features;

[0030] S402: After weighted fusion, adjust the fusion features belonging to the edge region, texture region, and smooth region according to the fusion parameters in the optimal parameter combination to obtain local features;

[0031] S403: Comprehensively process the local features and the unadjusted fusion features, and generate a stitched image.

[0032] The present invention also provides an image stitching system for adaptive multi-scale transformation, which is applied to an image stitching method for adaptive multi-scale transformation. The stitching system includes:

[0033] A weight allocation module, configured to perform multi-scale feature extraction on the images to be stitched, and adaptively allocate fusion weights to the multi-scale features extracted from adjacent images to be stitched;

[0034] A parameter adjustment module, configured to use an edge detection algorithm to divide adjacent images to be stitched into multiple regions, and adjust the fusion parameters of the regions between adjacent images to be stitched according to the attributes of the regions;

[0035] An optimal parameter combination determination module, configured to perform iterative calculations on the fusion weights and fusion parameters using the genetic algorithm, and determine the optimal parameter combination based on the evaluation index;

[0036] An image generation module, configured to perform fusion processing on the multi-scale features according to the fusion weights and fusion parameters of the optimal parameter combination to generate a stitched image.

[0037] Compared with the related technologies, an image stitching method and its stitching system for adaptive multi-scale transformation provided by the present invention have the following beneficial effects:

[0038] The present invention extracts multi-scale features from the images to be stitched, adaptively assigns fusion weights to the multi-scale features extracted from adjacent images, uses an edge detection algorithm to divide adjacent images into multiple regions, adjusts the fusion parameters of the regions between adjacent images according to the attributes of the regions, iteratively calculates the fusion weights and fusion parameters through a genetic algorithm, and determines the optimal parameter combination based on evaluation metrics, and finally generates a stitched image with high quality and high definition. The present invention can make full use of the feature information of the images at different scales, achieve more accurate and efficient image stitching. At the same time, the method of adjusting the fusion parameters based on the region attributes can reduce the seams and distortions in the stitching region, improve the visual effect of the stitched image, and can also automatically find the most suitable stitching parameters for the current image, improving the automation degree and robustness of the stitching process. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flowchart of an image stitching method with adaptive multi-scale transformation provided by the present invention;

[0040] Figure 2 is a module structure diagram of an image stitching system with adaptive multi-scale transformation provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all structures. Furthermore, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0042] Additionally, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as being processed sequentially, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but there can also be additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0043] Embodiment 1

[0044] An image stitching method with adaptive multi-scale transformation provided by the present invention, referring to Figure 1 as shown, the stitching method includes the following steps:

[0045] S1: Perform multi-scale feature extraction on the images to be stitched, and adaptively assign fusion weights to the multi-scale features extracted from adjacent images to be stitched.

[0046] In this embodiment, multi-scale feature extraction is to capture the structural information of the image at different resolutions, which is crucial for processing image edge matching and content continuity. Adaptive assignment of fusion weights can optimize the contribution of different feature scales to the final stitching effect and ensure a natural transition at the stitching boundary.

[0047] Specifically, use the discrete wavelet transform method to perform multi-scale decomposition on the images to be stitched, obtaining a series of feature maps at different resolutions. For the similar feature regions between adjacent images, calculate their correlations at each scale, and dynamically assign fusion weights based on the strength of the correlations and the saliency of the features. Features with high saliency (such as regions with rich edges and textures) are assigned higher weights to ensure the retention of these key information during the fusion process, enhance the matching accuracy of features between images, reduce mis-matching situations, and at the same time ensure the clarity of image details and improve the overall stitching quality.

[0048] S2: Use an edge detection algorithm to divide adjacent images to be stitched into multiple regions, and adjust the fusion parameters of the regions between adjacent images to be stitched according to the attributes of the regions.

[0049] In this embodiment, edge detection can accurately identify the boundaries of different objects or features in the image. By dividing into multiple regions, the fusion parameters can be optimized separately for different types of regions, improving the realism of the stitching.

[0050] Specifically, first, use an edge detection algorithm to identify the image edges, and then divide the image into several sub-regions based on these edges. For each region, analyze its attributes including texture density and color change rate, and accordingly adjust the parameters when this region is fused with other adjacent regions. Exemplarily, for edge regions with high texture contrast, increase the fineness of local alignment and the gradient change of transparency. This regional processing method can effectively solve the problem that global parameters cannot adapt to the characteristics of all regions, making the stitched image more natural and realistic in details.

[0051] S3: Use a genetic algorithm to perform iterative calculations on the fusion weights and fusion parameters, and determine the optimal parameter combination based on evaluation metrics.

[0052] In this embodiment, encode the fusion weights and regional fusion parameters as individual genes to construct an initial population, calculate the fitness value of each individual through evaluation metrics, and continuously generate new populations through genetic operations such as selection, crossover, and mutation until convergence, and then find the optimal solution from a large number of candidate parameters, improving the overall quality and visual appearance of the stitched image.

[0053] S4: performing fusion processing on multi-scale features according to the fusion weights and fusion parameters of the optimal parameter combination to generate a spliced ​​image.

[0054] In this embodiment, according to the optimal fusion weights and fusion parameters obtained by the genetic algorithm, weighted fusion is performed on the features of each scale, and then the regional features are adjusted and synthesized. Finally, the fused features are mapped back to the pixel space to generate the final stitched image. Finally, seamless stitching of the images is achieved, the continuity and visual consistency of the image content are maintained, and the visual effect and practicality of the stitched image are improved.

[0055] Specifically, step S1 specifically includes:

[0056] S101: Decompose each image to be stitched into multi-scale features using a discrete wavelet transform method. For a two-dimensional image to be stitched I, the first-order wavelet decomposition is expressed as:

[0057] [C A ,C H ,C V ,C D ]=DWT(I)

[0058] Among them, C A is the approximate coefficient, C H ,C V ,C D are the detail coefficients in the horizontal, vertical and diagonal directions respectively, and DWT(I) is the discrete wavelet transform performed on the image I to be stitched.

[0059] In this embodiment, discrete wavelet transform (DWT) can be used to separate low-frequency approximate information and high-frequency detail information of images from different scales. For a two-dimensional image to be spliced, the first-order wavelet decomposition decomposes the image into four parts through a low-pass filter and a high-pass filter: the approximate coefficient C A , and along the horizontal C H , vertical C V , diagonal C D The detail coefficient of the direction, this process is carried out recursively, and each level of decomposition will further refine the scale information of the image. In this way, the structure and texture information of the image are hierarchically represented at different scales. At this point, after discrete wavelet transform processing, not only the image data is compressed, but also the important structural features of the image are retained, which provides a basis for subsequent key feature matching and weight allocation, and improves processing efficiency and matching accuracy.

[0060] S102: Use the local feature matching algorithm SIFT to extract the key features of each pair of adjacent images to be stitched at various scales, and then calculate the feature similarity at each scale based on the Euclidean distance between the key features.

[0061] In this embodiment, for each pair of adjacent images to be stitched, the SIFT algorithm is applied to detect key points and extract descriptors at various scales. These descriptors are then used to calculate the Euclidean distance between the key features, which is used as a measure of feature similarity. The smaller the distance, the better the feature matching, thus enhancing the stability and accuracy of the matching. Especially in the case of rotation, scaling, or illumination changes between images, the reliability of the stitching is improved.

[0062] S103: Calculate the content contribution value of the features at each scale to the images to be stitched.

[0063] In this embodiment, features at different scales contribute differently to the image content. For example, high-frequency details are more important for edges and textures, while low-frequency information is related to the overall structure of the image. Quantifying this contribution value helps to more reasonably allocate fusion weights in the subsequent process.

[0064] Specifically, the content contribution value is evaluated by analyzing factors such as the distribution, contrast, or position of the features in the image. Among them,

[0065] Method based on contrast: Calculate the gray or color contrast around the feature points. The higher the contrast, the more prominent the feature in the image content, and the corresponding higher the contribution value.

[0066] Analysis of structural information: Analyze whether the features are located on the key structural elements of the image, such as straight lines, curves, corner points, etc. Features at these positions are more critical for maintaining the continuity of the image structure and should be given higher weights.

[0067] Context relevance: Consider the position of the feature in the global structure of the image and its surrounding environment. If the feature is in the main part of the image or forms a coherent structure with other features, its contribution value should also increase.

[0068] Finally, the above various indicators are weighted and averaged to assign a comprehensive content contribution value to each feature point. Clarifying the importance of each feature helps to optimize the subsequent fusion process, ensure that important information is fully emphasized, and thus improve the quality of the stitched image.

[0069] S104: According to the calculated feature similarity and content contribution value, assign fusion weights to the features at each scale. Among them, the calculation formula for the fusion weight is:

[0070] W i =αS i +βI i

[0071] Among them, W i is the fusion weight, α and β are weight factors, and S i is the feature similarity, and I i is the content contribution value.

[0072] In this embodiment, the fusion weight is allocated based on the feature similarity and the content contribution value. The purpose is to ensure that during the stitching process, important and well-matched features have more opportunities to be presented, so as to achieve a better visual effect.

[0073] Specifically, the calculation formula of the fusion weight combines the feature similarity S i and the content contribution value I i , and balances the influence of the two through the weight factors α and β. Generally, features with high similarity and high contribution value will obtain a larger weight. This dynamic weight allocation mechanism optimizes the quality of image stitching, making the stitching result maintain structural continuity while also taking into account the authenticity of details and visual consistency.

[0074] Specifically, step S2 specifically includes:

[0075] S201: Regionally segment adjacent images to be stitched based on an edge detection algorithm, and segment them into an edge region, a texture region, and a smooth region.

[0076] In this embodiment, in order to more finely process different feature regions in image stitching and ensure that different fusion strategies can be adopted when processing edge details, complex textures, and large-area color transitions, adjacent images to be stitched are regionally segmented into an edge region, a texture region, and a smooth region, thereby improving the naturalness and authenticity of the stitching.

[0077] Specifically, first, use the Canny edge detection algorithm to perform edge detection on adjacent images to be stitched. Based on the detected edge information, the image is segmented into an edge region, that is, the contour part of the image; then, by analyzing the color difference and texture change between pixels, the region with dense texture is defined as the texture region; the remaining part, the region with gentle color change and less texture, is classified as the smooth region. Through such a zoning strategy, subsequent processing can be optimized according to the characteristics of each region. For example, the edge region focuses on precise alignment and smooth transition, the texture region emphasizes detail retention, and the smooth region focuses on color consistency, thereby improving the overall stitching quality.

[0078] S202: Obtain the respective attributes of the edge region, the texture region, and the smooth region, where the attributes include texture density and color change rate.

[0079] In this embodiment, in order to quantify the feature strength of different regions and provide a quantitative basis for subsequent personalized adjustment of parameters, it is necessary to obtain the attributes of each region. The specific attributes are texture density and color change rate, which are directly related to visual continuity and naturalness.

[0080] Specifically, for each region, the gray-level co-occurrence matrix (GLCM) is used to analyze the texture density, and the texture complexity is quantified by calculating the frequency of changes in pixel values ​​in different directions. The color change rate is evaluated by calculating the statistical average of the color difference between pixels in the region, reflecting the intensity of the color transition. By quantifying the attributes of the region, the fusion parameters can be adjusted more objectively and accurately, avoiding errors caused by subjective judgment and ensuring the consistency and high quality of the stitching effect.

[0081] S203: Dynamically adjust the fusion parameters of the adjacent areas between the images to be stitched based on the texture density and color change rate of the edge area, the texture area and the smooth area.

[0082] In this embodiment, in order to maximize the retention of the original image information while ensuring a natural and seamless transition between the stitching areas, it is necessary to dynamically adjust the fusion parameters according to the properties of different areas.

[0083] Specifically, based on texture density and color change rate, the fusion parameters are customized for each area. For example, in the edge area, the weights of edge preservation and blur reduction are increased to reduce jagged and fault phenomena; in the texture area, the parameters of texture preservation and contrast optimization are increased to maintain the continuity of the texture; and for the smooth area, the color gradient parameters are adjusted to ensure a uniform transition of colors. Specifically, these adjustments can be calculated through mathematical models, such as linear or nonlinear mapping functions, to achieve highly adaptive parameter optimization, so that the stitched image can achieve the best visual effect in different areas, improving the authenticity and viewing quality of the stitching.

[0084] Specifically, step S3 specifically includes:

[0085] S301: constructing an initial population based on a genetic algorithm for a parameter combination, and the chromosomes in the initial population correspond to the fusion parameters.

[0086] In this embodiment, constructing the initial population is the starting point of the genetic algorithm, which provides a basis for subsequent optimization search by randomly generating a set of fusion parameter combinations (ie, chromosomes).

[0087] Specifically, first, the length of the chromosome is defined according to the specific number of fusion weights and the fusion parameters of the regions. For example, if the fusion weights of three scales and the fusion parameters of five different regions are considered, the chromosome length is 3 (weights) + 5 (regional parameters) = 8. Subsequently, a certain number of chromosomes are randomly generated, and each chromosome represents a specific combination of parameters. These parameters are initialized to random values within a certain range to ensure that the possible solution space is covered. This way of constructing the initial population not only guarantees diversity but also provides sufficient exploration space for the genetic algorithm, which helps to avoid premature convergence to local optima.

[0088] S302: Perform the fusion of the images to be stitched based on each chromosome in the initial population, and calculate the corresponding fitness value using the selected evaluation metrics.

[0089] In this embodiment, the fitness value evaluation is a very crucial step in the genetic algorithm. It quantifies the goodness or badness of each chromosome (i.e., parameter combination) in solving the problem and directly affects the selection process of the genetic operations.

[0090] Specifically, for the parameter combination corresponding to each chromosome in the initial population, it is applied to the fusion process of the images to be stitched to complete the image stitching. Then, a pre-set evaluation metric is used to measure the quality of the stitched image. A higher-quality stitched result will obtain a higher fitness value. The evaluation metrics include, but are not limited to, the peak signal-to-noise ratio (PSNR) and the structural similarity index measure (SSIM). Calculating the fitness value can objectively evaluate the advantages and disadvantages of each group of parameters and guide the genetic algorithm to evolve towards a better solution.

[0091] S303: Perform iterative genetics of the parameter combinations according to the fitness value until convergence, and use the parameter combination corresponding to the chromosome with the highest current fitness value as the optimal parameter combination, where the genetic operations include selection, crossover, and mutation.

[0092] In this embodiment, the core of the genetic algorithm lies in gradually optimizing the individuals in the population by simulating the process of natural selection to find the optimal solution. The iterative, selection, crossover, and mutation operations ensure that the algorithm can gradually eliminate the individuals with low fitness, retain and improve the individuals with high fitness, and thus approach the optimal solution.

[0093] Specifically, according to the calculated fitness value, perform the following genetic operations:

[0094] Selection: According to the fitness proportion selection strategy, individuals with high fitness have a higher probability of being selected as "parents".

[0095] Crossover: Randomly select a pair of "parents" and exchange some of their chromosome segments to generate new offspring.

[0096] Mutation: Randomly change one or more gene values on some offspring chromosomes with a low probability to introduce new genetic diversity. Repeatedly perform these operations to form a new generation of population. After multiple generations of iterative evolution and reaching convergence, the population gradually converges to the individual with the highest fitness value, that is, the optimal fusion parameter combination.

[0097] Specifically, step S4 specifically includes:

[0098] S401: Based on the fusion weights in the optimal parameter combination, perform weighted fusion on the multi-scale features of adjacent images to be stitched to obtain fusion features.

[0099] In this embodiment, the fusion weights optimized by directly applying the genetic algorithm are used to integrate the multi-scale features. Through the weighted combination of different-scale features, the global structure and local details of the image can be comprehensively considered, providing a high-quality basis for subsequent local feature adjustment.

[0100] Specifically, for the multi-scale feature maps of each pair of adjacent images, perform a weighted average operation according to the previously determined optimal fusion weights. If the weight of a certain feature scale is larger, its contribution to the fusion result is also greater. For example, if the weight of the edge feature is higher, then more edge information will be retained during the fusion process to ensure the edge continuity of the stitched image. Ultimately, the effective integration of multi-scale features is achieved, which not only retains the important structural information of the image but also avoids the excessive interference of irrelevant or noisy features, improving the structural integrity and detail expressiveness of the stitched image.

[0101] S402: After weighted fusion, adjust the fusion features belonging to the edge region, texture region, and smooth region according to the fusion parameters in the optimal parameter combination to obtain local features.

[0102] In this embodiment, considering that different regions of the images to be stitched (such as the edge region, texture region, and smooth region) have different fusion requirements, this step further optimizes the local features by refining and adjusting the fusion parameters to ensure that the fusion effects of each region are more natural and coordinated.

[0103] Specifically, according to the fusion features obtained in S401, for the edge region, enhance the gradient changes of local alignment and transparency to eliminate stitching traces; for the texture region, adjust the brightness and contrast to match the adjacent regions; and in the smooth region, only slightly adjust the color consistency to maintain a smooth transition between regions. These adjustments are all based on the previously determined optimal fusion parameters, ultimately enhancing the local adaptability of the stitched image, enabling different characteristic regions to be processed most appropriately, and thus improving the realism and visual fluency of the overall image.

[0104] S403: Comprehensively process the local features and the unadjusted fusion features, and generate a stitched image.

[0105] In this embodiment, comprehensively processing the features after local adjustment and the fusion features without special adjustment is to ensure a balance between the global consistency of the entire image and the optimization of local details, and finally form a high-quality stitching result.

[0106] Specifically, synthesize the local features adjusted by S402 and the fusion features without special adjustment. Specifically, it is to moderately expand and mix the local features to eliminate possible boundary effects and ensure the uniformity of the tone, brightness, and texture of the entire image. Then, map these features back to the pixel space through inverse transformation technology to form the final image. Finally, the transformation from the feature space to the pixel space is realized, ensuring the naturalness and authenticity of the stitched image, eliminating possible visual discontinuities or artificial traces, and improving the ornamental value and practicality of the image.

[0107] The working principle of an image stitching method based on adaptive multi-scale transformation provided by the present invention is as follows: The present invention extracts multi-scale features from the images to be stitched, adaptively assigns fusion weights to the multi-scale features extracted from adjacent images, uses an edge detection algorithm to divide adjacent images into multiple regions, and adjusts the fusion parameters of the regions between adjacent images according to the attributes of the regions. Iteratively calculate the fusion weights and fusion parameters through a genetic algorithm, and determine the optimal parameter combination based on evaluation indicators. Finally, generate a high-quality and high-definition stitched image. The present invention can make full use of the feature information of the image at different scales to achieve more accurate and efficient image stitching. At the same time, the method of adjusting fusion parameters based on regional attributes can reduce the seams and distortions in the stitching region, improve the visual effect of the stitched image, and can also automatically find the most suitable stitching parameters for the current image, improving the automation degree and robustness of the stitching process.

[0108] Embodiment 2

[0109] The present invention also provides an image stitching system based on adaptive multi-scale transformation, which is applied to an image stitching method based on adaptive multi-scale transformation. Refer to Figure 2 As shown, the stitching system includes:

[0110] A weight assignment module, configured to extract multi-scale features from the images to be stitched, and adaptively assign fusion weights to the multi-scale features extracted from adjacent images to be stitched;

[0111] A parameter adjustment module, configured to use an edge detection algorithm to divide adjacent images to be stitched into multiple regions, and adjust the fusion parameters of the regions between adjacent images to be stitched according to the attributes of the regions;

[0112] An optimal parameter combination determination module, configured to iteratively calculate the fusion weights and fusion parameters by using a genetic algorithm, and determine an optimal parameter combination based on evaluation metrics;

[0113] An image generation module, configured to fuse multi-scale features according to the fusion weights and fusion parameters of the optimal parameter combination to generate a stitched image.

[0114] The working principle of an image stitching system with adaptive multi-scale transformation provided by the present invention is as follows: The present invention extracts multi-scale features from the images to be stitched, and adaptively assigns fusion weights to the multi-scale features extracted from adjacent images. The adjacent images are segmented into multiple regions by using an edge detection algorithm, and the fusion parameters between regions of adjacent images are adjusted according to the attributes of the regions. The fusion weights and fusion parameters are iteratively calculated by using a genetic algorithm, and an optimal parameter combination is determined based on evaluation metrics. Finally, a high-quality and high-definition stitched image is generated. The present invention can make full use of the feature information of the images at different scales to achieve more accurate and efficient image stitching. At the same time, the fusion parameter adjustment method based on regional attributes can reduce the seams and distortions in the stitching region, improve the visual effect of the stitched image, and can automatically find the most suitable stitching parameters for the current image, improving the automation degree and robustness of the stitching process.

[0115] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0116] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.

[0117] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or still includes elements inherent in such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of another identical element in the process, method, commodity or device comprising the element.

Claims

1. An image stitching method based on adaptive multi-scale transformation, characterized in that: The splicing method includes the following steps: S1: extract multi-scale features from the images to be stitched, and adaptively assign fusion weights to the multi-scale features extracted from adjacent images to be stitched; S2: using edge detection algorithm to divide adjacent images to be stitched into multiple regions, and adjusting the fusion parameters of the regions between adjacent images to be stitched according to the attributes of the regions; S3: Iteratively calculating the fusion weights and fusion parameters using a genetic algorithm, and determining an optimal parameter combination based on an evaluation index, wherein the iterative calculation includes selecting, crossing over, and mutating the fusion weights and fusion parameters; S4: performing fusion processing on multi-scale features according to the fusion weight and fusion parameter of the optimal parameter combination to generate a spliced ​​image; Step S1 specifically includes: S101: Decompose each image to be stitched into multi-scale features using a discrete wavelet transform method. For a two-dimensional image to be stitched I, the first-order wavelet decomposition is expressed as: in, is the approximate coefficient, are the detail coefficients in the horizontal, vertical and diagonal directions respectively, is a discrete wavelet transform performed on the spliced ​​image I; S102: extracting key features of each pair of adjacent images to be stitched at each scale using a local feature matching algorithm SIFT, and then calculating feature similarity at each scale based on the Euclidean distance between the key features; S103: Calculate the content contribution value of the features at each scale to the stitched image; S104: According to the calculated feature similarity and content contribution value, a fusion weight is assigned to the features at each scale, wherein the calculation formula of the fusion weight is: in, is the fusion weight, and is the weight factor, is the feature similarity, Content contribution; Step S2 specifically includes: S201: performing region segmentation on adjacent images to be stitched based on an edge detection algorithm, and segmenting the images into edge regions, texture regions, and smooth regions; S202: Acquire the attributes of the edge area, the texture area, and the smooth area, wherein the attributes include texture density and color change rate; S203: Dynamically adjust the fusion parameters of the adjacent areas between the images to be stitched based on the texture density and color change rate of the edge area, the texture area and the smooth area.

2. The image stitching method of adaptive multi-scale transformation according to claim 1, characterized in that: Step S3 specifically includes: S301: constructing an initial population based on a genetic algorithm for the parameter combination, and the chromosomes in the initial population correspond to the fusion parameters; S302: fusing the images to be spliced ​​based on each chromosome in the initial population, and calculating the corresponding fitness value using the selected evaluation index; S303: Perform iterative inheritance of parameter combinations according to the fitness values ​​until convergence, and take the parameter combination corresponding to the chromosome with the highest current fitness value as the optimal parameter combination.

3. The image stitching method of adaptive multi-scale transformation according to claim 2, characterized in that: Step S4 specifically includes: S401: performing weighted fusion on multi-scale features of adjacent images to be stitched based on the fusion weights in the optimal parameter combination to obtain fusion features; S402: After weighted fusion, adjusting the fusion features belonging to the edge area, the texture area and the smooth area according to the fusion parameters in the optimal parameter combination to obtain local features; S403: Comprehensively process the local features and the unadjusted fusion features, and generate a spliced ​​image.

4. An adaptive multi-scale transform image stitching system, applied to an adaptive multi-scale transform image stitching method as claimed in any one of claims 1 to 3, characterized in that: The splicing system includes: A weight allocation module, used for extracting multi-scale features from the images to be stitched, and adaptively allocating fusion weights for multi-scale features extracted from adjacent images to be stitched; A parameter adjustment module, used to divide the adjacent images to be spliced ​​into multiple regions using an edge detection algorithm, and adjust the fusion parameters of the regions between the adjacent images to be spliced ​​according to the attributes of the regions; An optimal parameter combination determination module, used to iteratively calculate the fusion weights and fusion parameters using a genetic algorithm, and determine the optimal parameter combination based on an evaluation index; The image generation module is used to fuse the scale features of multiple claims according to the fusion weights and fusion parameters of the optimal parameter combination to generate a spliced ​​image.