IMAGE STICKING METHOD, IMAGE STICKING DEVICE, COMPUTER DEVICE, STORAGE MEDIUM, AND COMPUTER PROGRAM

The image stitching method uses a deep learning neural network to iteratively extract and update features based on similarity metrics, addressing memory and ghosting issues in conventional methods, resulting in efficient and accurate stitching of large-sized images.

JP7562036B1Active Publication Date: 2024-10-04SHANGHAI HANSHI INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024062062
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-09-11
Filing Date
2024-04-08
Publication Date
2024-10-04
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

Conventional image stitching methods face challenges with large-sized images, leading to memory issues and poor splicing effects due to large parallax, especially when using deep learning-based approaches.

Method used

An image stitching method utilizing a deep learning neural network model to extract features with different sizes, performing an inter-image similarity metric to determine target stitching features, and iteratively updating these features until the maximum size is reached, allowing for accurate and efficient stitching.

Benefits of technology

Improves the accuracy, speed, and robustness of feature extraction, enabling efficient stitching of large-sized images with reduced memory consumption and minimizing ghosting effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007562036000001_ABST
    Figure 0007562036000001_ABST
Patent Text Reader

Abstract

The present invention provides an image stitching method and apparatus that improves the efficiency, accuracy and applicability of image stitching. [Solution] The image stitching method of the present invention extracts stitching features from a target image based on a deep learning neural network model, determines the stitching feature on the stitching side at the minimum feature size of the reference image as a first stitching feature, calculates a similarity metric value between the first stitching feature and each second stitching feature based on the second stitching feature at the minimum feature size of the image to be registered, determines an object stitching feature, and repeatedly updates the first stitching feature, the second stitching feature, and the target object stitching feature until the object stitching feature at the maximum feature size of the image to be registered is determined, thereby performing image stitching on the stitching side of the reference image and the image to be registered.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical fields of image processing and artificial intelligence, and in particular to a method and apparatus for stitching images together. [Background technology]

[0002] This section is intended to provide a background or context for the claimed embodiments of the invention. Nothing herein is admitted as prior art for inclusion in this section.

[0003] Image stitching technology refers to a method of stitching multiple overlapping images of the same scene into a larger image. The general pattern of traditional image stitching methods consists of feature point extraction, feature matching, transformation matrix estimation, image transformation, and image fusion. Different traditional image stitching methods also adopt different forms at different stages in the pattern. With the rise of deep learning, image stitching based on deep learning has also developed rapidly. Most deep learning-based image stitching methods are similar to traditional image stitching methods, mainly using deep neural networks to extract features and learn optimal transformation matrix parameters to perform subsequent image transformation and image fusion. Summary of the Invention [Problem to be solved by the invention]

[0004] However, in many real image stitching scenes, there are problems of close distance, large parallax, multiple images, and large size, and many problems exist when using the above stitching method. For example, when stitching large-sized images, traditional stitching methods cannot extract features (memory is too large), and when stitching images with large parallax, the current stitching method based on deep learning has many ghosts and poor stitching effect. [Means for solving the problem]

[0005] An embodiment of the present invention provides an image stitching method for improving the applicability of image stitching, improving the accuracy and speed of feature extraction of image stitching, and improving the efficiency and accuracy of image stitching, the method comprising: Extracting stitching features from the target image based on a deep learning neural network model to obtain the stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metrics with different feature sizes; selecting a reference image and a registration target image from the target image; a step of determining a first stitching feature at the stitching side of a reference image at a minimum feature size, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of the image to be registered, and determining a second stitching feature whose similarity metric value between the first stitching feature and the second stitching feature exceeds a predetermined value as a target stitching feature; updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of the image to be registered is determined; The method includes a step of performing image stitching on the stitching side between the reference image and the image to be registered based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the image to be registered.

[0006] An embodiment of the present invention further provides an image stitching apparatus for improving the applicability of image stitching, improving the accuracy and speed of feature extraction of image stitching, and improving the efficiency and accuracy of image stitching, the apparatus comprising: A stitching feature extraction module for extracting stitching features from a target image based on a deep learning neural network model to obtain stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metric with different feature sizes; a reference image and registration to-be-registered image selection module for selecting a reference image and a registration to-be-registered image from the target image; a target stitching feature determination module for determining a stitching feature at the stitching side of a reference image at a minimum feature size as a first stitching feature, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of the image to be registered, and determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature; a target stitching feature updating module for repeatedly performing the steps of: updating the first stitching feature with a stitching feature at the stitching side at a next feature size of a minimum feature size of a reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of a target stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of an image to be registered is determined; The method includes a stitching side image stitching module that performs image stitching on the stitching side between the reference image and the image to be registered based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the image to be registered.

[0007] An embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the computer program is executed by the processor to realize the above image stitching method.

[0008] An embodiment of the present invention further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above image stitching method.

[0009] An embodiment of the present invention further provides a computer program product which, when executed by a processor, implements the above image stitching method. Effect of the Invention

[0010] In an embodiment of the present invention, based on a deep learning neural network model, a stitching feature is extracted from a target image, and the stitching feature of the target image is obtained, and the stitching feature is a feature of the target image for performing an inter-image similarity metric with different feature sizes. A reference image and a registration target image are selected from the target image, and for the stitching side of the reference image, a stitching feature at the minimum feature size of the reference image is set as a first stitching feature, and the first stitching feature and the minimum feature size of the registration target image are set as a second stitching feature. a step of calculating a similarity metric value between the first stitching feature and each second stitching feature based on the second stitching feature in the first stitching feature, determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature, updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image, and updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature. and repeatedly performing the steps of updating the feature, recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature exceeds a predetermined value until a target stitching feature at a maximum feature size of the image to be registered is determined, and performing image stitching at the stitching side of the reference image and the registration target image based on the first stitching feature at the maximum feature size of the reference image and the target stitching feature at the maximum feature size of the image to be registered, compared with the feature point extraction means according to the conventional technology, by extracting the stitching feature using a deep learning neural network model, the accuracy, speed and robustness of the stitching feature extraction are improved, and at the same time, the target stitching feature at the maximum feature size of the image to be registered can be quickly determined based on the similarity metric for the stitching features at different feature sizes to perform image stitching, thereby improving the efficiency and accuracy of image stitching;It can be applied to stitching large size images at close distances or with large parallax, improving the applicability of image stitching. [Brief description of the drawings]

[0011] In order to more clearly describe the embodiments of the present invention or the technical solutions in the prior art, the following will briefly describe the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without making any inventive efforts. In the drawings,

[0012] [Figure 1] 1A to 1C are diagrams illustrating a specific example of an image joining method according to an embodiment of the present invention. [Diagram 2] 1A to 1C are diagrams illustrating a specific example of an image joining method according to an embodiment of the present invention. [Diagram 3] 1A to 1C are diagrams illustrating a specific example of an image joining method according to an embodiment of the present invention. [Figure 4] 1A to 1C are diagrams illustrating a specific example of an image joining method according to an embodiment of the present invention. [Diagram 5] 1A to 1C are diagrams illustrating a specific example of an image joining method according to an embodiment of the present invention. [Figure 6] 1 is a schematic flowchart of an image stitching method according to an embodiment of the present invention. [Figure 7] 1 is a diagram illustrating the structure of an image stitching device according to an embodiment of the present invention; [Figure 8] FIG. 2 is a schematic diagram of a computer device for image stitching according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in more detail below with reference to the drawings, where the exemplary embodiments of the present invention and the description thereof are for interpreting the present invention, but are not intended to limit the present invention.

[0014] The term "and / or" in this specification is merely for describing one related relationship, and indicates that three types of relationships may exist, for example, A and / or B can indicate three situations, that is, A exists alone, A and B exist simultaneously, and B exists alone. In addition, in this specification, the term "at least one" indicates any one type among a plurality of types or any combination of at least two types among multiple types, for example, including at least one type among A, B, and C, and including any one or more types of elements selected from the set consisting of A, B, and C.

[0015] In the description of this specification, the terms "including," "comprise," "have," "contain," and the like are all open terms, i.e., including but not limited to. Descriptions referring to terms such as "one embodiment," "one specific embodiment," "several embodiments," "for example," and the like, mean that the specific features, structures, or characteristics described with reference to the embodiment or example are included in at least one embodiment or example of this application. In this specification, schematic expressions of the above terms do not necessarily refer to the same embodiment or example. And, the specific features, structures, or characteristics described can be combined in any one or more embodiments or examples in an appropriate manner. The order of steps according to each embodiment is intended to explain the implementation of this application in a schematic manner, and the order of steps is not limited and can be appropriately adjusted as necessary.

[0016] In the technical solutions of this application, the acquisition, storage, use, processing, etc. of data are all in accordance with the provisions of national laws and regulations.

[0017] Image stitching technology refers to a method of stitching multiple overlapping images of the same scene into a larger image. The general pattern of traditional image stitching methods consists of feature point extraction, feature matching, transformation matrix estimation, image transformation, and image fusion. Different traditional image stitching methods also adopt different forms at different stages in the pattern. With the rise of deep learning, image stitching based on deep learning has also developed rapidly. Most deep learning-based image stitching methods are similar to traditional image stitching methods, mainly using deep neural networks to extract features and learn optimal transformation matrix parameters to perform subsequent image transformation and image fusion.

[0018] However, in many real image stitching scenes, there are problems of close distance, large parallax, multiple images, and large size, and there are many problems when using the above stitching methods. For example, when stitching large-sized images, traditional stitching methods cannot extract features (memory is too large), and when stitching images with large parallax, there are currently many ghosts due to the stitching method based on deep learning.

[0019] For example, currently, the following solutions are often adopted to extract image stitching features and perform image stitching.

[0020] 1. Feature extraction operators, such as the Harris operator, SIFT operator, SURF operator, and LBF operator, are used to extract feature points from the reference image and the image to be registered, similar feature points between the two images are matched, a transformation matrix is ​​calculated, the image to be registered is transformed, and then the two images are stitched together.

[0021] 2. A deep convolutional neural network is used to extract features from the reference image and the image to be registered, and the optimal transformation matrix is ​​learned using the transformation matrix as a learning parameter. After that, the image to be registered is transformed and then the images are stitched together.

[0022] However, the above-mentioned conventional techniques have the following problems.

[0023] 1. It is necessary to use the feature extraction operator to extract feature points from the entire image. If the image resolution is too large, the memory consumption during feature extraction will be too large, which will cause the feature extraction process to be unable to be completed. That is, images with too high resolution cannot be stitched together.

[0024] 2. The transformation matrix is ​​used as the learning parameter to learn the optimal transformation matrix, and then the registration target image is transformed and the image is stitched together. When the disparity is large, the ghosting is serious. Although features can be extracted for large-resolution images, the stitching effect is poor.

[0025] In order to solve the above problems, an embodiment of the present invention provides an image stitching method that is applicable to short-distance, large-parallax, multi-image, and large-size image stitching, improves the applicability of image stitching, improves the accuracy and speed of feature extraction for image stitching, and improves the efficiency and accuracy of image stitching, and can effectively stitch short-distance, large-parallax, multi-image, and large-size images, and can avoid memory shortage and ghost phenomenon when extracting features. Refer to FIG. 6. The method includes: Step 601: extracting stitching features from the target image based on a deep learning neural network model to obtain stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metric with different feature sizes; selecting 602 a reference image and a registration target image from the target image; Step 603: for the stitching side of the reference image, a stitching feature at the minimum feature size of the reference image is set as a first stitching feature, and based on the first stitching feature and a second stitching feature at the minimum feature size of the image to be registered, a similarity metric value between the first stitching feature and each second stitching feature is calculated, and a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value is determined as a target stitching feature; updating the first stitching feature with a stitching feature at the stitching side with a next feature size of the minimum feature size of the reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of the image to be registered is determined; This may include a step 605 of performing image stitching on the stitching side between the reference image and the image to be registered based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the image to be registered.

[0026] In an embodiment of the present invention, based on a deep learning neural network model, a stitching feature is extracted from a target image, and the stitching feature of the target image is obtained, and the stitching feature is a feature of the target image for performing an inter-image similarity metric with different feature sizes. A reference image and a registration target image are selected from the target image, and for the stitching side of the reference image, a stitching feature at the minimum feature size of the reference image is set as a first stitching feature, and the first stitching feature and the minimum feature size of the registration target image are set as a second stitching feature. a step of calculating a similarity metric value between the first stitching feature and each second stitching feature based on the second stitching feature in the first stitching feature, determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature, updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image, and updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature. and repeatedly performing the steps of updating the feature, recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature exceeds a predetermined value until a target stitching feature at a maximum feature size of the image to be registered is determined, and performing image stitching at the stitching side of the reference image and the registration target image based on the first stitching feature at the maximum feature size of the reference image and the target stitching feature at the maximum feature size of the image to be registered, compared with the feature point extraction means according to the conventional technology, by extracting the stitching feature using a deep learning neural network model, the accuracy, speed and robustness of the stitching feature extraction are improved, and at the same time, the target stitching feature at the maximum feature size of the image to be registered can be quickly determined based on the similarity metric for the stitching features at different feature sizes to perform image stitching, thereby improving the efficiency and accuracy of image stitching;It can be applied to stitching large size images at close distances or with large parallax, improving the applicability of image stitching.

[0027] In a specific implementation, firstly, based on a deep learning neural network model, a stitching feature is extracted from a target image, and the stitching feature of the target image is obtained, and the stitching feature is the feature of the target image for performing inter-image similarity metric with different feature sizes.

[0028] In the embodiment, the stitching feature is a feature for performing inter-image similarity metric, and is finally used for image stitching.Furthermore, the stitching feature can be extracted from the target image to obtain the stitching feature of the target image, and the present invention is not specifically limited thereto, and the solution "based on deep learning neural network model" of the present invention is one embodiment.

[0029] In one embodiment, The method further includes a step of performing an image padding process and an image normalization process on the target image to obtain the processed target image; The step of extracting a stitching feature from the target image and acquiring the stitching feature of the target image includes: Extracting a stitching feature from the processed target image and obtaining a stitching feature of the processed target image.

[0030] In one embodiment, the step of performing an image padding process and an image normalization process on the target image to obtain the processed target image includes: Performing image padding processing on the target image by setting the maximum value of the image height and width as the image size after image padding; After the image padding process, an image normalization process is performed to obtain a processed target image.

[0031] In an embodiment, image pre-processing may include operations such as resizing, edge padding, normalization, etc. on the image.

[0032] In one embodiment, the step of extracting stitching features from the target image based on a deep learning neural network model and obtaining the stitching features of the target image includes: The method includes inputting a target image into an image stitching feature extraction model to obtain stitching features of the target image, the image stitching feature extraction model corresponding to a type of target image stitching task, the image stitching feature extraction model being obtained by training a deep learning neural network using a historical stitched image dataset as training data, the historical stitched image dataset including historical stitched images corresponding to the stitching task type and stitching features corresponding to the historical stitched images.

[0033] In an embodiment, a deep convolutional neural network can be used to extract the pre-processed image.

[0034] Here, the image stitching feature extraction model corresponds to the type of target image stitching task. For example, according to the task type of image stitching, features can be extracted using a backbone trained by the target detection network. For example, shelf image stitching uses the backbone of the product detection network as much as possible to perform image stitching feature extraction, where the backbone is a feature extraction network whose role is to extract information in the image, and the backbone may be a neural network model formed by directly loading trained model parameters.

[0035] In one embodiment, the image stitching feature extraction model includes multiple feature pyramid layers for extracting stitching features at different sizes of images.

[0036] In the embodiment, compared with the conventional method of extracting features based on feature points, the present invention uses a deep neural network to extract features, and the image stitching feature may use a single-layer output network or a multi-layer feature pyramid, where the stitching feature with the minimum feature size is the minimum feature output from the pyramid feature layer.

[0037] In one embodiment, selecting a first feature pyramid layer based on an object size equal to the product of the image width and height of the object image and a predetermined ratio; updating the object size by a product of the image width and height of the object size and a predetermined ratio, and selecting a feature pyramid layer of a size corresponding to the updated object size; and determining a plurality of feature pyramid layers by iteratively performing the iterations until a size of the selected feature pyramid layer is less than a predetermined value.

[0038] In an embodiment, by performing the steps of updating the object size as described above and selecting a feature pyramid layer of a corresponding size at the updated object size, a overlapping downsampling process for the feature size can be realized, thereby determining the feature pyramid layer at each feature size.

[0039] For example, referring to FIG. 2, pic_size in FIG. 2 is the width and height of the image after image pre-processing padding (large-sized images generally have a resolution of 4k or more), and the size of the first layer selected is a feature layer of pic_size / 4, and then continues to select feature layers that are downsampled by 2 times, and the selection ends when the size of the feature layer becomes smaller than a predetermined value (e.g., 40 pixels).

[0040] In particular, in accordance with the deep learning neural network model, a stitching feature is extracted from the target image, and after obtaining the stitching feature of the target image, a reference image and a registration target image are selected from the target image; For the stitching side of the reference image, the stitching feature on the stitching side at the minimum feature size of the reference image is designated as a first stitching feature, and based on the first stitching feature and a second stitching feature at the minimum feature size of the image to be registered, a similarity metric value between the first stitching feature and each second stitching feature is calculated, and a second stitching feature whose similarity metric value with the first stitching feature exceeds a predetermined value is determined as a target stitching feature.

[0041] In one embodiment, the similarity metric value is calculated based on Euclidean distance and cosine similarity between stitched features; A similarity metric value between the first stitching feature and each second stitching feature is calculated according to the following formula:

number

[0042]

number

[0043]

number

[0044] In the embodiment, the feature metric is mainly performed on Euclidean distance, cosine similarity, Mahalanobis distance, Manhattan distance, etc., and the feature metric is performed on the extracted features to obtain the most similar feature regions of the two images to be stitched together. Here, the feature metric selection regions for horizontal stitching and vertical stitching are also different.

[0045] In one embodiment, When the stitching sides of the reference image are on both sides of the reference image in the horizontal direction, each stitching feature in a direction perpendicular to the horizontal direction at a minimum feature size of the image to be registered is defined as a second stitching feature; The method further includes a step of determining, when the stitching sides of the reference image are on both vertical sides of the reference image, each stitching feature in a direction perpendicular to the vertical direction at a minimum feature size of the image to be registered as a second stitching feature.

[0046] For example, When the stitching sides of the reference image are on both horizontal sides of the reference image, take FIG. 3 as an example. FIG. 3 shows a case where left and right padding is performed on an image whose height is greater than its width. For the reference image (i.e., the left diagram in FIG. 3), first, the rightmost feature patch (i.e., the vector block corresponding to the stitching feature) from which the padding portion has been removed is selected, and a similarity metric between the rightmost feature patch and all patch features of the image to be registered is performed. Similarity metric values ​​between the rightmost feature patch and each patch among all patch features of the image to be registered are calculated, and the patch whose similarity metric value with the rightmost feature patch exceeds a predetermined value is determined as the target patch. When the stitching sides of the reference image are on both vertical sides of the reference image, using Figure 4 as an example, Figure 4 shows the case of left and right padding of an image whose height is greater than its width, as in horizontal stitching, and for the reference image (i.e., the left image in Figure 4), first, the feature patch in the bottom layer from which the padding has been removed is selected and feature metrics are performed with all corresponding patch features of the image to be registered, and similarity metric values ​​are calculated between the feature patch in the bottom layer and each patch among all patch features of the image to be registered, and the patch whose similarity metric value with the feature patch in the bottom layer exceeds a predetermined value is determined as the target patch.

[0047] In a specific implementation, after determining a second stitching feature whose similarity metric value with the first stitching feature exceeds a predetermined value as a target stitching feature, the steps of updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image, updating the second stitching feature with a stitching feature within a predetermined range of the location of the corresponding stitching feature at the next feature size of the target stitching feature, and recalculating the similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value with the updated first stitching feature exceeds a predetermined value are repeatedly performed until a target stitching feature at the maximum feature size of the image to be registered is determined.

[0048] In an embodiment, by repeatedly executing the above-mentioned steps of updating the first stitching feature, updating the second stitching feature, and updating the object stitching feature, it is possible to determine the object stitching feature in ascending order of feature size, and to achieve accurate matching with the object stitching feature at the maximum feature size of the registration target image.

[0049] In the above embodiment, the predetermined range is used to represent a specified number of stitching features on the side where the corresponding stitching feature is located, and the specified number is the product of the total number of stitching features contained in the reference image at the current feature size and a specified ratio, and the specified ratio may be 5%, or may be freely set according to actual usage needs.

[0050] As shown in FIG. 5, in an image to be registered with the feature sizes in the second column shown in FIG. 5, K=5 indicates a predetermined range (i.e., the color block numbered 5a in FIG. 5) in which a specified number (5) of stitching features are located on the side (i.e., the left side) of the location of the corresponding stitching feature (shown by the black dotted line in FIG. 5).

[0051] In the above embodiment, by updating the second stitching feature with a stitching feature within a predetermined range of the location of the corresponding stitching feature in the next feature size of the object stitching feature, the selection range of the object stitching feature in the next feature size can be limited, and the process of selecting all stitching features in the next feature size can be avoided, thereby improving the selection efficiency of the object stitching feature; at the same time, by setting the predetermined range, the location of the corresponding object quasi-stitching feature in the next feature size of the object stitching feature is also further limited, thereby improving the selection efficiency of the stitching feature.

[0052] Specifically, when this method is implemented, an object stitching feature at the maximum feature size of the image to be registered is determined, and then image stitching is performed on the stitching side between the reference image and the image to be registered based on a first stitching feature at the maximum feature size of the reference image and an object stitching feature at the maximum feature size of the image to be registered.

[0053] In an embodiment, after obtaining the most similar feature regions (i.e., the first stitching feature at the maximum feature size of the reference image and the target stitching feature at the maximum feature size of the image to be registered), the images can be stitched together. When stitching horizontally, the overlapping region of the image to be registered is reserved, and when stitching vertically, the overlapping region of the image to be registered as close as possible to the bottom is reserved.

[0054] In one embodiment, the step of performing image stitching on the stitching side between the reference image and the registration target image based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the registration target image includes: When the reference image is joined horizontally, the position of the target joining feature at the maximum feature size of the registration target image is used as a joining line to join the reference image and the registration target image horizontally, and in the process of joining the images horizontally, the image located on the right side of the reference image and the registration target image is reserved in the overlapping area; When stitching the reference image vertically, the position of the target stitching feature at the maximum feature size of the image to be registered is used as the stitching line to stitch the reference image and the image to be registered vertically, and in the process of stitching the images vertically, the image located below of the reference image and the image to be registered is reserved in the overlapping area.

[0055] In an embodiment, when stitching images side-to-side, if the right image is the back image, after determining the location of the stitching line, the right image is overlapped behind the stitching line of the left image, that is, the back image is reserved in the overlapping area.

[0056] For example, when stitching a reference image horizontally, select stitching features on both the left and right sides of the stitched image and select vertical stitching features of the image to be registered, and calculate a similarity metric value between the stitching features on both the left and right sides of the reference image and different vertical stitching features of different images to be registered; Based on the similarity metric values, vertical stitching features of the registration target image whose similarity metric values ​​with the left and right stitching features of each reference image exceed a predetermined value are determined as target stitching features.

[0057] In another example, when stitching the reference image vertically, select stitching features on both the top and bottom of the stitched image, select horizontal stitching features of the image to be registered, and calculate a similarity metric value between the stitching features on both the top and bottom of the reference image and different horizontal stitching features of different images to be registered; Based on the similarity metric values, horizontal stitching features of the registration target images having similarity metric values ​​between the stitching features on both the top and bottom of each reference image that exceed a predetermined value are determined as target stitching features.

[0058] In another example, when the reference image is to be stitched horizontally, the determined location of the object stitching feature is used as a stitching line to perform image horizontal stitching of the reference image and the registration target image, and the rear image is reserved in the overlapping area during the image horizontal stitching process; In another example, when stitching the reference image vertically, the location of the determined object stitching feature is used as the stitching line to stitch the reference image and the image to be registered vertically, and an intermediate image is reserved in the overlapping area during the image stitching process.

[0059] Specific applications of the method of the present invention will now be described with reference to specific examples.

[0060] As shown in FIG. 1, the flow of this embodiment can be mainly divided into four parts: image pre-processing, feature extraction, feature metric, and image stitching.

[0061] 1. Image preprocessing Image preprocessing refers to the necessary measures such as size adjustment, edge padding, and normalization for an image so that it can be input to a deep learning neural network for learning. In the present invention, edge padding and normalization operations are mainly adopted.

[0062] 2. Feature Extraction Compared with the conventional method of extracting features based on feature points, the deep neural network has already demonstrated superior performance in all aspects. Therefore, the present invention uses the deep neural network to extract features, and the features for image stitching may use either a single-layer output network or a multi-layer feature pyramid.

[0063] 3. Feature Metrics The feature metric is mainly performed on Euclidean distance, cosine similarity, Mahalanobis distance, Manhattan distance, etc., and the feature metric is performed on the extracted features to obtain the most similar feature regions of the two target images to be stitched. Here, the selection regions of the feature metric for horizontal stitching and vertical stitching are different, and for details, please refer to the specific implementation flow.

[0064] 4. Transmitting information from general to detailed First, a stitching feature at a minimum feature size is determined, then, from the stitching feature at the minimum feature size, a stitching feature at the next feature size is obtained, and so on, until the most similar feature vector is obtained more and more finely until the original image size is reached, and finally, a stitching line, i.e., the location of the determined target stitching feature, is obtained.

[0065] 5. Image stitching After obtaining the most similar feature regions (i.e., stitching lines), the images can be stitched together. For horizontal stitching, the overlapping regions of the images to be registered are retained, and for vertical stitching, the lowest overlapping regions of the images to be registered are retained.

[0066] As shown in FIG. 2, this embodiment further describes a close-distance, large-disparity, multi-image, large-size image stitching method based on deep learning, and the specific implementation details are as follows:

[0067] 1. Image preprocessing (a necessary step to input images into a deep learning neural network) (1) Image padding: The maximum value of the image height (i.e., height) and width (i.e., width) is the image size after padding (i.e., padding to a rectangle), and the size of the padding on the short side is p. The formula is as shown below.

number

[0068] 2. Feature pyramid (extracting features at different scales for subsequent feature metrics) (1) Feature Extraction: Extract preprocessed images using deep convolutional neural networks (depending on the task type of image stitching, feature extraction can be performed using a backbone network trained by an object detection network, e.g., feature extraction for image stitching is performed using the backbone of a product detection network for shelf image stitching). (2) Feature pyramid layer selection: pic_size in Figure 2 is the width and height of the padded image in image preprocessing (large-sized images generally have a resolution of 4k or more), that is, the first layer selected is a feature layer of pic_size / 4, and then continues to select feature layers downsampled by 2 times. When the size of the feature layer becomes smaller than a predetermined size, for example (feature block of 40 pixels x 40 pixels), the selection ends.

[0069] 3. Feature metric (determine the most similar regions and obtain stitching lines for image stitching) (1) Feature metric method The feature metric in this embodiment combines Euclidean distance and cosine similarity, and takes into account not only the pure pixel distance between features but also the structural similarity distance between features. Equation (2) is the Euclidean distance, Equation (3) is the cosine similarity, and Equation (4) is the sum of the normalized Euclidean distance and the cosine similarity, where XA is a feature of the image to be registered, and ya is a feature of the reference image.

[0070] A similarity metric value between the first stitching feature and each second stitching feature is calculated according to the following formula:

number

[0071]

number

[0072] Here, the L2 Euclidean distance calculation method is the pixel difference value, that is, the similarity between pixels, and the Cosine calculation method is the cosine similarity between two features, which represents the similarity between structures.

[0073] (2) Selection of feature metric regions Horizontal stitching: As shown in FIG. 3, FIG. 3 shows a case where left and right padding is performed on an image whose height is greater than its width (the light gray areas are padding). Each feature block in FIG. 3 has gray padding on the left and right, that is, each block area is padded with pixel values ​​of 0 or 255. For the reference image (i.e., the left side of FIG. 3), first, the rightmost feature patch (i.e., the vector block corresponding to the stitching feature) from which the padding has been removed is selected, and a similarity metric is performed between all patch features of the image to be registered, and the similarity metric value between the rightmost feature patch and each patch among all patch features of the image to be registered is calculated, and the patch whose similarity metric value with the rightmost feature patch exceeds a predetermined value is determined as the target patch; Vertical stitching: As shown in Figure 4, Figure 4 shows the case of left and right padding of an image whose height is greater than its width, similar to horizontal stitching. For a reference image (i.e., the left image in Figure 4), first, the feature patch in the bottom layer from which the padding has been removed is selected, and feature metrics are performed with all corresponding patch features of the image to be registered. Similarity metric values ​​are calculated between the feature patch in the bottom layer and each patch among all patch features of the image to be registered. The patch whose similarity metric value with the feature patch in the bottom layer exceeds a predetermined value is determined as the target patch.

[0074] 4. Transmitting information from general to detailed As shown in FIG. 5, taking horizontal stitching as an example, the feature metric is started for the feature map (this feature map is the feature output by the first pyramid layer in the feature pyramid layer) of the smallest size (e.g., a feature block of 40 pixels x 40 pixels) extracted first, and for the reference image, the last one-dimensional patch (i.e., the stitching feature on the stitching side at the minimum feature size of the reference image is taken as the first stitching feature) is always selected, and the metric is performed with each patch of the registration target image (i.e., the second stitching feature at the minimum feature size of the registration target image), and the patch with the best matching features is searched for; The smallest feature size in FIG. 5 is the feature map where x1 is located, and the x1 color block area represents the second stitching feature whose similarity metric value with the first stitching feature exceeds a predetermined value, i.e., represents the target stitching feature at the smallest feature size, and x1 also represents the coordinates of the target stitching feature at the smallest feature size; then, transfer to the feature map of the next size with 2x upsampling, where the upsampling process can include transferring the stitching information to a feature map that is twice as large as the feature map; for example, in the feature size of the second row in FIG. 5, update the second stitching feature with the stitching feature within a predetermined range (i.e., 5a color block area) of the location of the corresponding stitching feature at the next feature size of the target stitching feature x1; specifically, the location of the corresponding stitching feature at the next feature size of the target stitching feature x1 is twice the value of x1; In the third feature size, the location of the corresponding stitching feature in the third feature size of the object stitching feature x1 is twice the value of x2, and by successive inference, the location of the most similar patch vector is obtained more and more precisely until it is transferred to the original image size, and finally the object stitching feature of xn, i.e., the stitching line, is obtained.

[0075] Similarly, take the last one dimension of the reference image as the reference patch, and for the image to be registered, only take 2x and its left and right adjacent patches as the features to be registered in the current region (i.e., update the second stitching feature with the stitching feature within a predetermined range of the location of the corresponding stitching feature at the next feature size of the target stitching feature), and successively obtain the most similar patch vector location more and more finely until it reaches the original image size, and finally obtain the stitching line, i.e. the location of the determined target stitching feature; Take for example, in Fig. 5, for the reference image, the last one-dimensional patch vector is selected to represent the stitching feature of the stitching side, for the registration target image, the patch with the highest similarity retrieved is taken as the target stitching feature, and when the representative metric information is transferred from coarse to fine, k adjacent patches in each left and right region are taken as fine adjustment, in the example, k=5 for left and right. Here, the patch usually takes a feature vector with a width between 2 and 4.

[0076] 5. Image stitching Horizontal stitching: Horizontal stitching stitches according to the found stitching lines and reserves the back image in the overlapping area. Vertical stitching: In the case of multi-image stitching, vertical stitching reserves all intermediate images in the overlapping area to ensure a frontal viewing angle.

[0077] Take the example of stitching together supermarket shelf images. Preferably, three cameras, one above, one in the middle and one below, are used to move and capture shelf images.

[0078] About vertical stitching After obtaining the most similar area to the image stitching line, the most similar area of ​​the middle camera is first reserved to perform top, middle and bottom stitching, thereby ensuring that the products displayed in the stitched image are all captured from the front, and can be more easily used in subsequent operations.

[0079] About horizontal joining Taking 12 horizontal images as an example, divide them into half at the boundary, that is, into the first 6 images and the last 6 images, and for the first 6 images, reserve the most similar area from the right image to be stitched together, and for the last 6 images, reserve the most similar area from the left image to be stitched together, thereby ensuring that the products are all facing forward when stitched together horizontally.

[0080] In this embodiment, 1. A deep neural network is adopted to extract and metric the similarity features of the stitched images, which greatly improves the accuracy, speed and robustness compared with the conventional feature point extraction method. 2. A metric method that combines Euclidean distance and cosine similarity is used, while considering the similarity between pixels and between structures. 3. The method of transmitting from coarse information to fine information greatly accelerates the calculation of feature metrics at each layer of the image feature pyramid, while ensuring the transmission of feature metrics with high accuracy.

[0081] It has the following beneficial effects: 1. It can stitch together ultra-large images; 2. It can solve the problem of ghosts caused by stitching with large parallax; and 3. By adopting a method of transmitting information from rough to fine information, the stitching speed can be significantly accelerated compared to methods using feature point extraction.

[0082] Of course, it is understood that the above detailed flow may have other modifications, and all related modifications should fall within the scope of the present invention.

[0083] In an embodiment of the present invention, based on a deep learning neural network model, a stitching feature is extracted from a target image, and the stitching feature of the target image is obtained, and the stitching feature is a feature of the target image for performing an inter-image similarity metric with different feature sizes. A reference image and a registration target image are selected from the target image, and for the stitching side of the reference image, a stitching feature at the minimum feature size of the reference image is set as a first stitching feature, and the first stitching feature and the minimum feature size of the registration target image are set as a second stitching feature. a step of calculating a similarity metric value between the first stitching feature and each second stitching feature based on the second stitching feature in the first stitching feature, determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature, updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image, and updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature. and repeatedly performing the steps of updating the feature, recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature exceeds a predetermined value until a target stitching feature at a maximum feature size of the image to be registered is determined, and performing image stitching at the stitching side of the reference image and the registration target image based on the first stitching feature at the maximum feature size of the reference image and the target stitching feature at the maximum feature size of the image to be registered, compared with the feature point extraction means according to the conventional technology, by extracting the stitching feature using a deep learning neural network model, the accuracy, speed and robustness of the stitching feature extraction are improved, and at the same time, the target stitching feature at the maximum feature size of the image to be registered can be quickly determined based on the similarity metric for the stitching features at different feature sizes to perform image stitching, thereby improving the efficiency and accuracy of image stitching;It can be applied to stitching large size images at close distances or with large parallax, improving the applicability of image stitching.

[0084] The embodiment of the present invention further provides an image stitching device for improving the applicability of image stitching, improving the accuracy and speed of feature extraction of image stitching, and improving the efficiency and accuracy of image stitching. As shown in FIG. 7, the device includes: A stitching feature extraction module 701 for extracting stitching features from a target image based on a deep learning neural network model to obtain stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metric with different feature sizes; a reference image and registration to-be-registered image selection module 702 for selecting a reference image and a registration to-be-registered image from the target image; a target stitching feature determination module 703 for determining a stitching feature at the stitching side of a reference image at a minimum feature size as a first stitching feature, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of an image to be registered, and determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature; a target stitching feature updating module 704 for repeatedly performing the steps of updating the first stitching feature with a stitching feature at the stitching side at a next feature size of the minimum feature size of the reference image, updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature, recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of the image to be registered is determined; and a stitching side image stitching module 705 for performing image stitching on the stitching side between the reference image and the image to be registered based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the image to be registered.

[0085] In one embodiment, the method further includes an image padding and image normalization module for performing an image padding process and an image normalization process on the target image to obtain a processed target image; The step of extracting a stitching feature from the target image and acquiring the stitching feature of the target image includes: Extracting a stitching feature from the processed target image and obtaining a stitching feature of the processed target image.

[0086] In one embodiment, the image padding and image normalization processing module specifically includes: The maximum value of the height and width of the image is set as the image size after image padding, and image padding processing is performed on the target image; After the image padding process, an image normalization process is performed to obtain a processed target image.

[0087] In one embodiment, the stitching feature extraction module specifically includes: The image stitching feature extraction model is used to input a target image into a target image stitching feature extraction model to obtain stitching features of the target image, the image stitching feature extraction model corresponds to a type of target image stitching task, and the image stitching feature extraction model is obtained by training a deep learning neural network using a historical stitched image dataset as training data, and the historical stitched image dataset includes historical stitched images corresponding to the stitching task type and stitching features corresponding to the historical stitched images.

[0088] In one embodiment, the image stitching feature extraction model includes multiple feature pyramid layers for extracting stitching features at different sizes of images.

[0089] In one embodiment, selecting a first feature pyramid layer with a first size equal to a first product of the image width and height after the image padding process and a first predetermined ratio; repeating the downsampling process on the first size based on a second predetermined ratio to determine a second size; and selecting a second feature pyramid layer at the second size. The method further includes a feature pyramid layer instantiation module for determining a plurality of feature pyramid layers by performing the iterative execution until the size of the selected feature pyramid layer is less than a predetermined value.

[0090] In one embodiment, the similarity metric value is calculated based on Euclidean distance and cosine similarity between stitched features; Specifically, the object stitching feature determination module: A similarity metric value between the first stitching feature and each second stitching feature is used to calculate according to the following formula:

number

[0091]

number

[0092] In one embodiment, When the stitching sides of the reference image are on both sides of the reference image in the horizontal direction, each stitching feature in a direction perpendicular to the horizontal direction at a minimum feature size of the image to be registered is defined as a second stitching feature; The method further includes a second stitching feature determination module used in a step of determining, when the stitching sides of the reference image are on both vertical sides of the reference image, each stitching feature in a direction perpendicular to the vertical direction at the minimum feature size of the image to be registered as a second stitching feature.

[0093] In one embodiment, the stitching side image stitching module specifically includes: When the reference image is joined horizontally, the position of the target joining feature at the maximum feature size of the registration target image is used as a joining line to join the reference image and the registration target image horizontally, and in the process of joining the images horizontally, the image located on the right side of the reference image and the registration target image is reserved in the overlapping area; When stitching a reference image vertically, the location of the target stitching feature at the maximum feature size of the image to be registered is used as the stitching line to stitch the reference image and the image to be registered vertically, and in the process of stitching the images vertically, the image that is located below between the reference image and the image to be registered is retained in the overlapping area.

[0094] An embodiment of the present invention provides an embodiment of a computer device for implementing all or part of the content of the above image stitching method, and the computer device specifically includes: The computer device includes a processor, a memory, a communications interface, and a bus, where the processor, memory, and communications interface complete communication with each other through the bus, and the communications interface is used to realize information transmission between related devices, and the computer device may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the computer device can be implemented with reference to the embodiments for realizing an image stitching method and an embodiment for realizing an image stitching device, the contents of which are incorporated herein and will not be described again.

[0095] Fig. 8 is a schematic block diagram of a system configuration of a computer device 1000 according to an embodiment of the present application. As shown in Fig. 8, the computer device 1000 may include a central processor 1001 and a memory 1002 coupled to the central processor 1001. It should be noted that Fig. 8 is exemplary and may be supplemented or substituted with other types of structures to realize telecommunication functions or other functions.

[0096] In one embodiment, the image stitching functionality may be incorporated into the central processor 1001, where the central processor 1001: Extracting stitching features from the target image based on a deep learning neural network model to obtain the stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metrics with different feature sizes; selecting a reference image and a registration target image from the target image; a step of determining a first stitching feature at the stitching side of a reference image at a minimum feature size, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of the image to be registered, and determining a second stitching feature whose similarity metric value between the first stitching feature and the second stitching feature exceeds a predetermined value as a target stitching feature; updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of the image to be registered is determined; and performing image stitching on the stitching side between the reference image and the image to be registered based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the image to be registered.

[0097] In another embodiment, the image stitching device may be located separately from the central processor 1001, for example, the image stitching device may be located as a chip connected to the central processor 1001, and the image stitching function may be realized under the control of the central processor.

[0098] As shown in Fig. 8, the computer device 1000 may further include a communication module 1003, an input unit 1004, an audio processor 1005, a display 1006, and a power supply 1007. Note that the computer device 1000 does not necessarily include all the components shown in Fig. 8, and the computer device 1000 may include components not shown in Fig. 8, and may refer to the prior art.

[0099] As shown in FIG. 8, a central processor 1001, which may also be referred to as a controller or operator, may include a microprocessor or other processor and / or logic device, which receives input and controls the operation of each component of the computing device 1000.

[0100] Here, the memory 1002 may be, for example, one or more of a buffer, a flash memory, a hard disk, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices. Information about the above-mentioned devices may be stored, and programs of information to be executed may be stored. The central processor 1001 may execute the programs stored in the memory 1002 to realize information storage or processing, etc.

[0101] The input unit 1004 provides input to the central processor 1001. The input unit 1004 is, for example, a key or a touch input device. The power supply 1007 is used to supply power to the computer device 1000. The display 1006 is used to display objects such as images and characters. The display may be, for example, but is not limited to, an LCD display.

[0102] The memory 1002 may be, for example, a solid-state memory such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. Furthermore, it may be a memory in which information is stored even when the power is turned off and can be selectively erased and more data can be set, and an example of such a memory may be called an EPROM, etc. The memory 1002 may be some other type of device. The memory 1002 includes a buffer memory 1021 (sometimes called a buffer). The memory 1002 may include an application / function storage unit 1022 that is used to store application programs and function programs and to execute the flow of operations of the computer device 1000 via the central processor 1001.

[0103] The memory 1002 may further include a data storage portion 1023 used to store data such as, for example, contacts, digital data, images, audio, and / or any other data used by the computing device. The driver storage portion 1024 of the memory 1002 may include various drivers for implementing communications functions of the computing device and / or other functions of the computing device (e.g., messaging applications, contacts applications, etc.).

[0104] The communication module 1003 is, in other words, a transmitter / receiver 1003 that transmits and receives signals via an antenna 1008. The communication module (transmitter / receiver) 1003 is coupled to the central processor 1001 to provide input signals and receive output signals, and may be similar to that of a conventional mobile communication terminal.

[0105] Based on different communication technologies, multiple communication modules 1003, such as a cellular network module, a Bluetooth module, and / or a wireless LAN module, can be provided in the same computer device. The communication module (transmitter / receiver) 1003 is further coupled to a speaker 1009 and a microphone 1010 via an audio processor 1005 to provide audio output via the speaker 1009 and receive audio input from the microphone 1010 to achieve normal telecommunication functions. The audio processor 1005 can include any suitable buffers, decoders, amplifiers, etc. Furthermore, the audio processor 1005 is further coupled to the central processor 1001 so as to be able to record on the device via the microphone 1010 and play audio stored on the device via the speaker 1009.

[0106] An embodiment of the present invention further provides a computer-readable storage medium having stored thereon a computer program for implementing the above image stitching method when executed by a processor.

[0107] An embodiment of the present invention further provides a computer program product which, when executed by a processor, implements the above image stitching method.

[0108] In an embodiment of the present invention, based on a deep learning neural network model, a stitching feature is extracted from a target image, and the stitching feature of the target image is obtained, and the stitching feature is a feature of the target image for performing an inter-image similarity metric with different feature sizes. A reference image and a registration target image are selected from the target image, and for the stitching side of the reference image, a stitching feature at the minimum feature size of the reference image is set as a first stitching feature, and the first stitching feature and the minimum feature size of the registration target image are set as a second stitching feature. a step of calculating a similarity metric value between the first stitching feature and each second stitching feature based on the second stitching feature in the first stitching feature, determining a second stitching feature having a similarity metric value between the first stitching feature and the second stitching feature that exceeds a predetermined value as a target stitching feature, updating the first stitching feature with a stitching feature on the stitching side at a feature size next to the minimum feature size of the reference image, and updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature. and repeatedly performing the steps of updating the feature, recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature exceeds a predetermined value until a target stitching feature at a maximum feature size of the image to be registered is determined, and performing image stitching at the stitching side of the reference image and the registration target image based on the first stitching feature at the maximum feature size of the reference image and the target stitching feature at the maximum feature size of the image to be registered, compared with the feature point extraction means according to the conventional technology, by extracting the stitching feature using a deep learning neural network model, the accuracy, speed and robustness of the stitching feature extraction are improved, and at the same time, the target stitching feature at the maximum feature size of the image to be registered can be quickly determined based on the similarity metric for the stitching features at different feature sizes to perform image stitching, thereby improving the efficiency and accuracy of image stitching;It can be applied to stitching large size images at close distances or with large parallax, improving the applicability of image stitching.

[0109] Those skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. And, the present invention may take the form of a computer program embodied in one or more computer usable storage media (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) containing computer usable program code.

[0110] The present invention has been described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer programs according to the embodiments of the present invention. It should be understood that each flow and / or block of the flowcharts and / or block diagrams, and combinations of flows and / or blocks of the flowcharts and / or block diagrams, can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate an apparatus for implementing a function specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams by instructions executed by a processor of the computer or other programmable data processing device, thereby generating an apparatus.

[0111] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, thereby producing an article of manufacture including an instruction apparatus that implements the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams with the instructions stored in the computer-readable memory.

[0112] These computer program instructions can be loaded into a computer or other programmable data processing device, thereby causing the computer or other programmable device to perform a series of operational steps to generate a computer-implemented process, where the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0113] The specific embodiments described above further explain the objectives, technical solutions and beneficial effects of the present invention. However, it should be understood that the above are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Any amendments, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included within the scope of the present invention.

Claims

1. Extracting stitching features from the target image based on a deep learning neural network model to obtain stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metrics with different feature sizes; selecting a reference image and a registration target image from the target image; a step of determining a stitching feature at the stitching side of a reference image at a minimum feature size as a first stitching feature, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of an image to be registered, and determining a second stitching feature having a similarity metric value between the first stitching feature and each second stitching feature that exceeds a predetermined value as a target stitching feature, wherein the stitching feature at the minimum feature size is a feature obtained from a feature pyramid layer of a smallest size among a plurality of feature pyramid layers for extracting stitching features at different sizes of images; updating the first stitching feature with a stitching feature on the stitching side at a next feature size to the minimum feature size of the reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the target stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the target stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until a target stitching feature at a maximum feature size of the image to be registered is determined; and performing image stitching on the stitching side between the reference image and the registration target image based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the registration target image. A method for stitching images comprising the steps of:

2. The method further includes a step of performing an image padding process and an image normalization process on the target image to obtain the processed target image; The step of extracting a stitching feature from the target image and acquiring the stitching feature of the target image includes: Extracting stitching features from the processed target image and obtaining stitching features of the processed target image.

2. The method of claim 1, wherein the image stitching is performed in a stepwise manner.

3. The step of performing image padding and image normalization on the target image and acquiring the processed target image includes: The maximum value of the height and width of the image is set as the image size after image padding, and image padding processing is performed on the target image; After the image padding process, an image normalization process is performed to obtain a processed target image.

3. The image stitching method according to claim 2.

4. The step of extracting stitching features from the target image based on the deep learning neural network model and obtaining the stitching features of the target image includes: The method includes inputting a target image into an image stitching feature extraction model to obtain stitching features of the target image, the image stitching feature extraction model corresponding to a type of target image stitching task, the image stitching feature extraction model being obtained by training a deep learning neural network using a history stitching image dataset as training data, the history stitching image dataset including history stitched images corresponding to the stitching task type, and stitching features corresponding to the history stitching images; Includes 2. The method of claim 1, wherein the image stitching is performed in a stepwise manner.

5. The image stitching feature extraction model includes multiple feature pyramid layers for extracting stitching features at different sizes of images.

5. The image stitching method according to claim 4.

6. selecting a first feature pyramid layer based on a target size equal to the product of the image width and height of the target image and a predetermined ratio; updating the object size by a product of an image width and height of the object size and a predetermined ratio, and selecting a feature pyramid layer of a size corresponding to the updated object size; and repeatedly performing the steps of updating the object size and selecting a feature pyramid layer of a size corresponding to the updated object size until the size of the selected feature pyramid layer is smaller than a predetermined value, thereby determining a plurality of feature pyramid layers.

5. The image stitching method according to claim 4.

7. the similarity metric value is calculated based on Euclidean distance and cosine similarity between stitched features; A similarity metric value between the first stitching feature and each second stitching feature is calculated according to the following formula: [0010] 2. The method of claim 1, wherein the image stitching is performed in a stepwise manner.

8. and when the stitching sides of the reference image are on both sides of the reference image in the horizontal direction, each stitching feature in a direction perpendicular to the horizontal direction at a minimum feature size of the image to be registered is set as a second stitching feature, and when the stitching sides of the reference image are on both sides of the reference image in the vertical direction, each stitching feature in a direction perpendicular to the vertical direction at a minimum feature size of the image to be registered is set as a second stitching feature.

2. The method of claim 1, wherein the image stitching is performed in a stepwise manner.

9. The step of performing image stitching on the stitching side between the reference image and the registration target image based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the registration target image includes: When the reference image is joined horizontally, the position of the target joining feature at the maximum feature size of the registration target image is used as a joining line to join the reference image and the registration target image horizontally, and in the process of joining the images horizontally, the image located on the right side of the reference image and the registration target image is reserved in the overlapping area; When the reference image is joined vertically, the position of the target joining feature at the maximum feature size of the registration target image is used as a joining line to join the reference image and the registration target image vertically, and in the process of joining the images vertically, the image located at the bottom of the reference image and the registration target image is reserved in the overlapping area.

2. The method of claim 1, wherein the image stitching is performed in a stepwise manner.

10. A stitching feature extraction module for extracting stitching features from a target image based on a deep learning neural network model to obtain stitching features of the target image, the stitching features being features of the target image for performing inter-image similarity metric with different feature sizes; a reference image and registration to-be-registered image selection module for selecting a reference image and a registration to-be-registered image from the target image; a target stitching feature determination module for determining a stitching feature at a stitching side of a reference image at a minimum feature size as a first stitching feature, calculating a similarity metric value between the first stitching feature and each second stitching feature based on the first stitching feature and a second stitching feature at a minimum feature size of an image to be registered, and determining a second stitching feature having a similarity metric value between the first stitching feature and each second stitching feature that exceeds a predetermined value as a target stitching feature, the minimum feature size stitching feature being a feature obtained from a feature pyramid layer of a smallest size among a plurality of feature pyramid layers for extracting stitching features at different sizes of images; an object stitching feature updating module that repeatedly performs the steps of: updating the first stitching feature with a stitching feature on the stitching side at a next feature size of a minimum feature size of a reference image; updating the second stitching feature with a stitching feature within a predetermined range of a location of a corresponding stitching feature at the next feature size of the object stitching feature; recalculating a similarity metric value between the updated first stitching feature and each updated second stitching feature, and updating the object stitching feature with a second stitching feature whose similarity metric value between the updated first stitching feature and the second stitching feature exceeds a predetermined value, until an object stitching feature at a maximum feature size of an image to be registered is determined; and a stitching side image stitching module for performing image stitching on the stitching side between the reference image and the registration target image based on a first stitching feature at a maximum feature size of the reference image and a target stitching feature at a maximum feature size of the registration target image. An image stitching device comprising:

11. A computing device including a memory, a processor, and a computer program stored in the memory and executable by the processor, The image stitching method according to any one of claims 1 to 9 is realized by executing the computer program by the processor.

1. A computer device comprising:

12. A computer program is stored, which, when executed by a processor, realizes the image stitching method according to any one of claims 1 to 9. A computer-readable storage medium comprising:

13. When executed by a processor, the image stitching method according to any one of claims 1 to 9 is realized. A computer program comprising:

Citation Information

Patent Citations

  • Long-focal-length camera calibration method based on point feature and line feature fusion

    CN113706635A

  • Image splicing method and device, storage medium and electronic equipment

    CN114972030A

  • Panoramic spliced image quality evaluation method

    CN115424051A

  • Image processing apparatus, and program

    JP2009044612A

  • JPP7188613B