Method for determining model parameters of image registration model and related device

By selecting the target feature point pairs that meet specific threshold conditions in the image registration model to calculate the model parameters, the problem of slow convergence speed of image registration model parameters in the prior art is solved, and a more efficient image registration process is achieved.

CN119515940APending Publication Date: 2025-02-25AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411743697.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing scheme for determining model parameters of image registration models based on random sampling consistency algorithms is slower to converge, especially when processing high-resolution images.

Method used

By obtaining and matching feature points in the image, a set of feature point pairs is constructed, and sorted according to Euclidean distance, the model parameters of the target feature point pair that meets a specific threshold condition are calculated until the preset convergence conditions are met.

Benefits of technology

This method can significantly speed up the convergence speed of image registration model parameters, reduce the number of iterations, improve the efficiency of the image registration process, and is suitable for stitching of high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515940A_ABST
    Figure CN119515940A_ABST
Patent Text Reader

Abstract

The invention discloses a method for determining model parameters of an image registration model and a related device, and relates to the field of image processing. In the first iteration, a target feature point pair used for calculating the model parameters of the image registration model meets the following conditions: the difference value of the Euclidean distances of the target feature point pair is small, so that the effective iteration can be performed more quickly; in the subsequent iteration, the target feature points used for calculating the model parameters of the image registration model are selected in the optimal inner point set, so that the purpose of faster convergence is achieved. Based on the technical scheme disclosed by the invention, the convergence speed of determining the model parameters of the image registration model can be accelerated under the condition that hardware resources are not enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular, relates to a method, device, electronic device and readable storage medium for determining model parameters of an image registration model. Background Art

[0002] Image stitching is a technology that stitches multiple images with overlapping areas into a seamless panorama or high-resolution image. Image stitching mainly includes three parts: image preprocessing, image registration and image fusion. Among them, image registration is used to align the same scene or object in two or more images so that the spatial position of the same scene or object in the same coordinate system matches. The process of image registration includes: first obtaining feature points in multiple images, determining the correspondence between feature points, and then using the correspondence between feature points to determine the transformation relationship between multiple images. This transformation relationship is the image registration model.

[0003] Currently, a scheme for determining model parameters of an image registration model based on a random sample consensus algorithm (RANSAC) is disclosed. The random sample consensus algorithm is an iterative algorithm for estimating mathematical model parameters from a data set containing a number of outliers.

[0004] However, the existing scheme for determining the model parameters of the image registration model based on the random sampling consensus algorithm has shortcomings: a large number of iterations are required to obtain model parameters with high accuracy, that is, the convergence speed is slow and the image registration process takes a long time. High-resolution images contain more feature points, so this problem will be more prominent in the process of image registration of high-resolution images. Summary of the invention

[0005] In view of the above problems, the present application provides a method, an apparatus, an electronic device and a readable storage medium for determining model parameters of an image registration model, which can accelerate the convergence speed of determining the model parameters of the image registration model.

[0006] To achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for determining model parameters of an image registration model, comprising:

[0008] Obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by capturing images of a target scene from different angles;

[0009] Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set;

[0010] Determine the Euclidean distance of each feature point pair in the first feature point pair set, sort the feature point pairs in the first feature point pair set according to the Euclidean distance, and obtain a second feature point pair set;

[0011] Determine whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine model parameters of the image registration model;

[0012] When the number of elements in the optimal inlier set does not reach the first number, selecting the second number of target feature point pairs from the second feature point pair set, wherein the difference between the positions of the second number of target feature point pairs in the second feature point pair set is less than a preset threshold; when the number of elements in the optimal inlier set reaches the first number, selecting the second number of target feature point pairs from the optimal inlier set;

[0013] Calculating model parameters of the image registration model based on the target feature point pairs, and determining an inner point set of the first feature point pair set under the current image registration model;

[0014] If the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as a new optimal interior point set, and the current model parameters are used as optimal model parameters;

[0015] Determine whether a preset convergence condition is met; if the convergence condition is not met, re-execute the step of determining whether the number of elements of the current optimal internal point set reaches the first number and subsequent steps; if the convergence condition is met, use the current optimal model parameters as the final model parameters of the image registration model, and apply the image registration model to the image stitching process.

[0016] In a possible implementation, when the second number is 2, selecting the second number of target feature point pairs from the second feature point pair set includes:

[0017] Randomly select two feature point pairs from the second feature point pair set as candidate feature point pairs;

[0018] Determining the difference between the positions of the candidate feature point pairs in the second feature point pair set;

[0019] When the difference is less than the first threshold, the current candidate feature point pair is used as the target feature point pair;

[0020] When the difference is greater than or equal to the first threshold, the step of randomly selecting two feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

[0021] In a possible implementation, when the second number is an integer greater than 2, selecting the second number of target feature point pairs from the second feature point pair set includes:

[0022] Randomly selecting the second number of feature point pairs from the second feature point pair set as candidate feature point pairs;

[0023] Sort the candidate feature point pairs according to a first serial number, where the first serial number is the serial number of the position of the candidate feature point pair in the second feature point pair set;

[0024] For the sorted candidate feature point pairs, determine the difference between the first serial numbers of all two adjacent candidate feature point pairs;

[0025] When the difference between the first serial numbers of all two adjacent candidate feature point pairs is less than the second threshold, the current candidate feature point pair is used as the target feature point pair;

[0026] When there is at least one set of adjacent candidate feature point pairs whose difference in first serial numbers is greater than or equal to the second threshold, the step of randomly selecting the second number of feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pairs are obtained.

[0027] A second aspect of the present application provides a method for determining model parameters of an image registration model, comprising:

[0028] Obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by capturing images of a target scene from different angles;

[0029] Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set;

[0030] Determine whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine model parameters of the image registration model;

[0031] When the number of elements in the optimal inlier set does not reach the first number, selecting the second number of target feature point pairs from the feature point pair set, wherein the difference between the Euclidean distances of the second number of target feature point pairs is less than a preset threshold; when the number of elements in the optimal inlier set reaches the first number, selecting the second number of target feature point pairs from the optimal inlier set;

[0032] Calculating model parameters of the image registration model based on the target feature point pairs, and determining an inner point set of the feature point pair set under the current image registration model;

[0033] If the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as a new optimal interior point set, and the current model parameters are used as optimal model parameters;

[0034] Determine whether a preset convergence condition is met; if the convergence condition is not met, re-execute the step of determining whether the number of elements of the current optimal internal point set reaches the first number and subsequent steps; if the convergence condition is met, use the current optimal model parameters as the final model parameters of the image registration model, and apply the image registration model to the image stitching process.

[0035] In a possible implementation, when the second number is 2, selecting the second number of target feature point pairs from the feature point pair set includes:

[0036] Randomly select two feature point pairs from the feature point pair set as candidate feature point pairs;

[0037] Determine the difference between the Euclidean distances of the candidate feature point pairs;

[0038] When the difference is less than a third threshold, taking the current candidate feature point pair as the target feature point pair;

[0039] When the difference is greater than or equal to the third threshold, the step of randomly selecting two feature point pairs from the feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

[0040] In a possible implementation, when the second number is an integer greater than 2, selecting the second number of target feature point pairs from the feature point pair set includes:

[0041] Randomly selecting a second number of feature point pairs from the feature point pair set as candidate feature point pairs;

[0042] Sort each candidate feature point pair according to the Euclidean distance;

[0043] For the sorted candidate feature point pairs, determine the difference between the Euclidean distances of all two adjacent candidate feature point pairs;

[0044] When the difference between the Euclidean distances of all two adjacent candidate feature point pairs is less than the fourth threshold, the current candidate feature point pair is used as the target feature point pair;

[0045] When there is at least one set of adjacent candidate feature point pairs whose Euclidean distance difference is greater than or equal to the fourth threshold, the step of randomly selecting a second number of feature points from the feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pairs are obtained.

[0046] A third aspect of the present application provides a device for determining model parameters of an image registration model, comprising:

[0047] A first sample image acquisition module, used to obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by collecting images of a target scene from different angles;

[0048] A first feature point processing module, used to determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set;

[0049] A feature point pair sorting module, used to determine the Euclidean distance of each feature point pair in the first feature point pair set, and sort the feature point pairs in the first feature point pair set according to the Euclidean distance to obtain a second feature point pair set;

[0050] A first judgment module is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model;

[0051] a first target feature point pair acquisition module, configured to select a second number of target feature point pairs from the second feature point pair set when the number of elements in the optimal inner point set does not reach the first number, wherein the difference between the positions of the second number of target feature point pairs in the second feature point pair set is less than a preset threshold;

[0052] A second target feature point pair acquisition module, configured to select the second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number;

[0053] A first data calculation module, used for calculating the model parameters of the image registration model based on the target feature point pair, and determining the inner point set of the first feature point pair set under the current image registration model;

[0054] A first data updating module, configured to use the interior point set as a new optimal interior point set and the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set;

[0055] The first processing module is used to determine whether a preset convergence condition is met; if the convergence condition is not met, the first judgment module is triggered to execute an operation of determining whether the number of elements of the current optimal internal point set reaches a first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0056] A fourth aspect of the present application provides a device for determining model parameters of an image registration model, comprising:

[0057] A second sample image acquisition module, used to obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by collecting images of a target scene from different angles;

[0058] A second feature point processing module, used to determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set;

[0059] A second judgment module is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice the second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model;

[0060] a third target feature point pair acquisition module, configured to select a second number of target feature point pairs from the feature point pair set when the number of elements in the optimal inner point set does not reach the first number, wherein the difference between the Euclidean distances of the second number of target feature point pairs is less than a preset threshold;

[0061] a fourth target feature point pair acquisition module, configured to select the second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number;

[0062] A second data calculation module, used for calculating the model parameters of the image registration model based on the target feature point pair, and determining the inner point set of the feature point pair set under the current image registration model;

[0063] A second data updating module is used for taking the interior point set as a new optimal interior point set and taking the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set;

[0064] The second processing module is used to determine whether a preset convergence condition is met; if the convergence condition is not met, the second judgment module is triggered to execute an operation of determining whether the number of elements of the current optimal internal point set reaches a first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0065] A fifth aspect of the present application provides an electronic device, including a processor and a memory connected to the processor, wherein:

[0066] The memory is used to store computer programs;

[0067] The processor is used to execute the computer program so that the electronic device implements the various steps of any method for determining the model parameters of the image registration model disclosed in the first aspect above, or enables the electronic device to implement the various steps of any method for determining the model parameters of the image registration model disclosed in the second aspect above.

[0068] In a sixth aspect, the present application provides a readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements the various steps of any method for determining model parameters of an image registration model disclosed in the first aspect, or implements the various steps of any method for determining model parameters of an image registration model disclosed in the second aspect.

[0069] The seventh aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the various steps of any method for determining model parameters of an image registration model disclosed in the first aspect, or the electronic device implements the various steps of any method for determining model parameters of an image registration model disclosed in the second aspect.

[0070] It can be seen that the beneficial effects of this application are:

[0071] The method for determining the model parameters of the image registration model disclosed in the present application is that in the first iteration, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, and the target feature point pairs need to meet the following conditions: the difference between the positions of the target feature point pairs in the sorted feature point pair set (sorted according to the Euclidean distance of each feature point pair) is less than a preset threshold, or the difference between the Euclidean distances of the target feature point pairs is less than a preset threshold, that is, the difference in the Euclidean distances of the target feature point pairs is small, and the effective iteration can be entered faster; in addition, in subsequent iterations, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, but the target feature point pairs are selected from the optimal internal point set, so as to achieve the purpose of faster convergence. Based on the technical solution disclosed in the present application, the convergence speed of determining the model parameters of the image registration model can be accelerated without increasing hardware resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 A flowchart of a method for determining model parameters of an image registration model disclosed in the present application;

[0074] Figure 2 A flowchart of another method for determining model parameters of an image registration model disclosed in the present application;

[0075] Figure 3 A schematic diagram of the structure of a device for determining model parameters of an image registration model disclosed in the present application;

[0076] Figure 4 A schematic diagram of the structure of another device for determining model parameters of an image registration model disclosed in the present application;

[0077] Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0078] The existing scheme for determining the model parameters of the image registration model based on the random sampling consistency algorithm mainly includes: determining the feature point pairs in multiple images to be registered; in each round of iteration, randomly selecting a specified number of feature point pairs from the feature point pairs, calculating the model parameters of the image registration model based on the selected feature point pairs, and counting the number of inliers under the current model parameters; after multiple rounds of iteration, comparing the number of inliers counted in each iteration round, and taking the model parameters determined in the iteration round with the largest number of inliers as the final model parameters of the image registration model.

[0079] The applicant found through research that:

[0080] The image contains a large number of feature points, and accordingly, the multiple images to be registered contain a large number of feature point pairs. In the existing scheme, feature point pairs are randomly selected to calculate the model parameters of the image registration model, which leads to a significant increase in the number of invalid iterations, and in turn requires a large number of iterations to obtain model parameters with higher accuracy, that is, the convergence speed is slow. High-resolution images contain more feature points, so this problem will be more prominent in the process of image registration of high-resolution images. If the number of iterations is reduced, the following situation is very likely to occur: when the iteration ends, the result has not converged, and the accuracy of the model parameters cannot be guaranteed. The slow convergence speed of the existing scheme causes image registration to take a long time and cannot meet the needs of business scenarios with higher real-time requirements.

[0081] An effective iteration means that the result is improved after the iteration. An invalid iteration means that the result is not improved after the iteration. In the scheme of determining the model parameters of the image registration model, the improved result means that the number of internal points increases, that is, the model parameters are more accurate.

[0082] The present application discloses a method, an apparatus, an electronic device and a readable storage medium for determining model parameters of an image registration model, which can accelerate the convergence speed of determining the model parameters of the image registration model.

[0083] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0084] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, which is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "include one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0085] See also Figure 1 , Figure 1 This is a flow chart of a method for determining model parameters of an image registration model disclosed in the present application. The method is executed by an electronic device and includes:

[0086] S101: Obtain a first sample image and a second sample image.

[0087] The first sample image and the second sample image are obtained by capturing images of the target scene from different angles. The first sample image and the second sample image have an overlapping area. For example, the first sample image is an image obtained by capturing images of the target scene from a first angle, and the second sample image is an image obtained by capturing images of the target scene from a second angle.

[0088] S102: Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set.

[0089] A feature point is a unique or significant local location in an image. A feature point usually represents a certain structure, texture or shape in an image.

[0090] Optionally, feature points in the first sample image and the second sample image are determined based on the SIFT algorithm or the SURF algorithm. SIFT is known as Scale-invariant Feature Transform in English and is a feature point extraction algorithm based on scale space that can extract stable feature points under different scales, rotations and illumination changes. SURF is known as Speeded-Up Robust Feature in English and is an accelerated version of the SIFT algorithm that can improve the computing speed while maintaining a high accuracy. Of course, feature points in the first sample image and the second sample image can also be determined based on other existing algorithms.

[0091] After determining the feature points in the first sample image and the second sample image, the feature points in the first sample image and the second sample image are matched based on the feature point matching algorithm to determine the correspondence between the feature points in the first sample image and the second sample image. The feature points with a corresponding relationship are feature point pairs, and these feature point pairs constitute a feature point pair set. For ease of description, the feature point pair set here is referred to as a first feature point pair set.

[0092] Optionally, feature points in the first sample image and the second sample image are matched based on the FLANN algorithm or the Lowe's algorithm to determine feature point pairs of the first sample image and the second sample image. FLANN is the full name of Fast Library for Approximate Nearest Neighbors in English, and its Chinese name is fast nearest neighbor matching. It is an efficient nearest neighbor search algorithm that accelerates the search process by constructing a KD-Tree and significantly improves the matching efficiency. The Lowe's algorithm screens matching points by comparing the ratio of the nearest neighbor distance to the next nearest neighbor distance, effectively removing false matches. Of course, feature points in the first sample image and the second sample image can also be matched based on other existing algorithms.

[0093] S103: Determine the Euclidean distance of each feature point pair in the first feature point pair set, and sort the feature point pairs in the first feature point pair set according to the Euclidean distance to obtain a second feature point pair set.

[0094] It should be noted that the Euclidean distance of a feature point pair refers to the Euclidean distance between the two feature points contained in the feature point pair. The Euclidean distance is also called the Euclidean distance. A feature point pair contains two feature points, and the Euclidean distance of the two feature points can be calculated based on the coordinates of the two feature points, that is, the Euclidean distance of the feature point pair.

[0095] In implementation, the Euclidean distance of each feature point pair in the first feature point pair set is determined respectively, and each feature point pair is sorted according to the Euclidean distance of each feature point pair. For the convenience of description, the sorted feature point pair set is called the second feature point pair set.

[0096] Optionally, the serial numbers of the positions of the feature point pairs in the second feature point pair set start from 1 and increase by 1 one by one.

[0097] S104: Determine whether the number of elements in the current optimal interior point set reaches a first number.

[0098] If the judgment result is yes, execute S106, if the judgment result is no, execute S105.

[0099] The first number is twice the second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model.

[0100] S105: Selecting a second number of target feature point pairs from the second feature point pair set.

[0101] S106: Selecting a second number of target feature point pairs from the optimal inlier point set.

[0102] When the number of elements in the optimal inlier set does not reach the first number, a second number of feature point pairs are selected from the second feature point pair set, and when the number of elements in the optimal inlier set reaches the first number, a second number of feature point pairs are selected from the optimal inlier set. For ease of description, the feature point pairs selected from the second feature point pair set and the feature point pairs selected from the optimal inlier set are referred to as target feature point pairs.

[0103] It should be noted that, in the initial state, the optimal inlier set is empty. That is, in the first iteration, it is necessary to select the second number of target feature point pairs from the second feature point pair set. In subsequent iterations, the number of feature point pairs in the optimal inlier set is usually greater than the second number. In the case where the number of feature point pairs in the optimal inlier set is greater than the second number, the second number of feature point pairs can be randomly selected from the optimal inlier set.

[0104] The second number of target feature point pairs selected from the second feature point pair set must satisfy: the difference between the positions in the second feature point pair set is less than a preset threshold.

[0105] The applicant has found that the feature point pairs of the two images to be registered include invalid feature point pairs (i.e., noise points) and valid feature point pairs. The difference between the Euclidean distances of the valid feature point pairs is small, while the difference between the Euclidean distances of the invalid feature point pairs and the Euclidean distances of other feature point pairs is large. Therefore, selecting the feature point pairs with the smaller difference in Euclidean distance as the target feature point pairs can reduce the possibility that the target feature point pairs are noise points, thereby entering the effective iteration faster.

[0106] It can be understood that each feature point pair in the second feature point pair set is sorted according to its Euclidean distance, so the feature point pairs with closer positions in the second feature point pair set have smaller differences in their Euclidean distances. In this solution, the second number of target feature point pairs selected from the second feature point pair set have positions whose differences are less than a preset threshold, which ensures that the differences in the Euclidean distances of the second number of target feature point pairs selected are smaller.

[0107] In implementation, when the second number is 2, the following scheme may be used to select a target feature point pair from the second feature point pair set:

[0108] A1. Randomly select two feature point pairs from the second feature point pair set as candidate feature point pairs;

[0109] A2. Determine the difference between the positions of the candidate feature point pairs in the second feature point pair set;

[0110] A3. When the difference is less than the first threshold, the current candidate feature point pair is used as the target feature point pair;

[0111] A4. When the difference is greater than or equal to the first threshold, execute step A1 and subsequent steps again until the target feature point pair is obtained.

[0112] Optionally, the value of the first threshold is determined based on the number of feature point pairs included in the second feature point pair set (or the number of feature point pairs included in the first feature point pair set, which are the same). Optionally, the first threshold is the rounded result of the product of the number of feature point pairs included in the second feature point pair set and the first ratio. The first ratio can be set to 10%. Of course, this is only an example of the first ratio.

[0113] In implementation, when the second number is an integer greater than 2, the following scheme may be used to select a target feature point pair from the second feature point pair set:

[0114] B1. Randomly select a second number of feature point pairs from the second feature point pair set as candidate feature point pairs;

[0115] B2. Sort the candidate feature point pairs according to the first sequence number, where the first sequence number is the sequence number of the position of the candidate feature point pair in the second feature point pair set;

[0116] B3. For the sorted candidate feature point pairs, determine the difference between the first serial numbers of all two adjacent candidate feature point pairs;

[0117] B4. When the difference between the first serial numbers of all two candidate feature point pairs adjacent to each other in all positions is less than the second threshold, the current candidate feature point pair is used as the target feature point pair;

[0118] B5. When there is at least one set of two adjacent candidate feature point pairs whose difference in first serial numbers is greater than or equal to the second threshold, execute step B1 and subsequent steps again until the target feature point pair is obtained.

[0119] Here, the above scheme is described with the second number being 4.

[0120] First, four feature point pairs are randomly selected from the second feature point pair set as candidate feature point pairs.

[0121] Second, the four candidate feature point pairs are sorted according to the first serial number of each candidate feature point pair (that is, the serial number of the position of the candidate feature point pair in the second feature point pair set).

[0122] Third, for the sorted candidate feature point pairs, determine the difference in first serial numbers between the candidate feature point pair located in the first position and the candidate feature point pair located in the second position, determine the difference in first serial numbers between the candidate feature point pair located in the second position and the candidate feature point pair located in the third position, and determine the difference in first serial numbers between the candidate feature point pair located in the third position and the candidate feature point pair located in the fourth position.

[0123] Fourth, if the above three differences are all less than the second threshold, the current candidate feature point pair is used as the target feature point pair. If at least one of the above three differences is greater than or equal to the second threshold, the first step and subsequent steps are executed again until the target feature point pair is obtained.

[0124] Optionally, the value of the second threshold is determined based on the number of feature point pairs included in the second feature point pair set (or the number of feature point pairs included in the first feature point pair set, which are the same). Optionally, the first threshold is the rounded result of the product of the number of feature point pairs included in the second feature point pair set and the second ratio, and the second ratio can be set to 10%. Of course, this is only an example of the second ratio.

[0125] S107: Calculating model parameters of the image registration model based on the selected target feature point pairs, and determining an inner point set of the first feature point pair set under the current image registration model.

[0126] In this solution, for each feature point pair in the first feature point pair set, it is determined whether the feature point included in the feature point pair is an inlier or an outlier under the current image registration model, thereby obtaining an inlier set under the current image registration model.

[0127] Here we take a feature point pair as an example for explanation.

[0128] Assuming that the feature point pair includes feature point Q1 and feature point Q2, based on the image registration model, the first feature point (one of feature point Q1 and feature point Q2) is projected to the image where the second feature point (the other of feature point Q1 and feature point Q2) is located, and the distance between the projection point of the first feature point and the second feature point is calculated. If the distance is less than a preset distance threshold, the two feature points included in the feature point pair are determined to be inner points. If the distance is greater than or equal to the preset distance threshold, the two feature points included in the feature point pair are determined to be outer points.

[0129] S108: Determine whether the number of elements in the interior point set is greater than the number of elements in the optimal interior point set.

[0130] If the judgment result is yes, then S109 is executed; if the judgment result is no, then S104 is executed again.

[0131] S109: Taking the interior point set as a new optimal interior point set, and taking the current model parameters as optimal model parameters.

[0132] When the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as the new optimal interior point set, and the current model parameters are used as the optimal model parameters, that is, the optimal interior point set is updated to the interior point set obtained in this round of iteration, and the optimal model parameters are updated to the model parameters obtained in this round of iteration. When the number of elements in the interior point set is less than or equal to the number of elements in the optimal interior point set, the step of determining whether the number of elements in the current optimal interior point set reaches the first number and subsequent steps are performed again.

[0133] S110: Determine whether a preset convergence condition is met.

[0134] If the convergence condition is met, S111 is executed; if the convergence condition is not met, S104 and subsequent steps are executed again.

[0135] S111: When the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model.

[0136] If the preset convergence condition is not met, the step of determining whether the number of elements of the current optimal interior point set reaches the first number and subsequent steps are performed again. If the preset convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0137] Optionally, the convergence condition is: the number of iterations reaches a preset number.

[0138] Optionally, the convergence condition is: the number of elements of the optimal interior point set reaches a preset number.

[0139] It should be noted that in the second and subsequent iterations, the target feature point pairs used to calculate the model parameters of the image registration model are usually selected from the optimal internal point set. Compared with the prior art of randomly selecting the feature point pairs used to calculate the model parameters of the image registration model from all feature point pairs, this can effectively reduce invalid iterations caused by randomness (i.e., greater uncertainty), thereby achieving the purpose of faster convergence.

[0140] The method for determining the model parameters of the image registration model disclosed in the present application is that in the first iteration, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, and the target feature point pairs need to meet the following requirements: the difference between the positions of the target feature point pairs in the sorted feature point pair set (sorted according to the Euclidean distance of each feature point pair) is less than a preset threshold, that is, the difference in the Euclidean distance of the target feature point pairs is small, and it can enter the effective iteration faster; in addition, in subsequent iterations, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, but target feature point pairs are selected from the optimal internal point set, so as to achieve the purpose of faster convergence. Based on the technical solution disclosed in the present application, the convergence speed of determining the model parameters of the image registration model can be accelerated without increasing hardware resources.

[0141] See also Figure 2 , Figure 2 This is a flow chart of another method for determining model parameters of an image registration model disclosed in this application. The method is executed by an electronic device and includes:

[0142] S201: Obtain a first sample image and a second sample image.

[0143] The first sample image and the second sample image are obtained by collecting images of the target scene from different angles. The first sample image and the second sample image have an overlapping area.

[0144] S202: Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set.

[0145] S203: Determine whether the number of elements in the current optimal interior point set reaches a first number.

[0146] If the judgment result is yes, execute S205, if the judgment result is no, execute S204.

[0147] The first number is twice the second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model.

[0148] S204: Selecting a second number of target feature point pairs from the feature point pair set.

[0149] S205: Selecting a second number of target feature point pairs from the optimal inner point set.

[0150] When the number of elements in the optimal inlier set does not reach the first number, a second number of feature point pairs are selected from the feature point pair set, and when the number of elements in the optimal inlier set reaches the first number, a second number of feature point pairs are selected from the optimal inlier set. For ease of description, the feature point pairs selected from the feature point pair set and the feature point pairs selected from the optimal inlier set are referred to as target feature point pairs.

[0151] It should be noted that, in the initial state, the optimal inlier set is empty. That is, in the first iteration, it is necessary to select the second number of target feature point pairs from the feature point pair set. In subsequent iterations, the number of feature point pairs in the optimal inlier set is usually greater than the second number. In the case where the number of feature point pairs in the optimal inlier set is greater than the second number, the second number of feature point pairs can be randomly selected from the optimal inlier set.

[0152] The second number of target feature point pairs selected from the feature point pair set must satisfy: the difference between the Euclidean distances of the target feature point pairs is less than a preset threshold.

[0153] In implementation, when the second number is 2, the following scheme can be used to select a target feature point pair from the feature point pair set:

[0154] C1: Randomly select 2 feature point pairs from the feature point pair set as candidate feature point pairs;

[0155] C2: Determine the difference between the Euclidean distances of the candidate feature point pairs;

[0156] C3: When the difference is less than the third threshold, the current candidate feature point pair is used as the target feature point pair;

[0157] C4: When the difference is greater than or equal to the third threshold, execute step C1 and subsequent steps again until the target feature point pair is obtained.

[0158] In implementation, when the second number is an integer greater than 2, the following scheme may be used to select a target feature point pair from the feature point pair set:

[0159] D1: randomly select a second number of feature point pairs from the feature point pair set as candidate feature point pairs;

[0160] D2: Sort each candidate feature point pair according to the Euclidean distance;

[0161] D3: for the sorted candidate feature point pairs, determine the difference between the Euclidean distances of all two adjacent candidate feature point pairs;

[0162] D4: When the difference between the Euclidean distances of all two adjacent candidate feature point pairs is less than the fourth threshold, the current candidate feature point pair is used as the target feature point pair;

[0163] D5: When there is at least one set of two adjacent candidate feature point pairs whose Euclidean distance difference is greater than or equal to the fourth threshold, perform step D1 and subsequent steps again until the target feature point pair is obtained.

[0164] Here, the above scheme is described with the second number being 4.

[0165] First, four feature point pairs are randomly selected from the feature point pair set as candidate feature point pairs.

[0166] Second, the four candidate feature point pairs are sorted according to the Euclidean distance of each candidate feature point pair.

[0167] Third, for the sorted candidate feature point pairs, determine the difference in Euclidean distances between the first candidate feature point pair and the second candidate feature point pair, determine the difference in Euclidean distances between the second candidate feature point pair and the third candidate feature point pair, and determine the difference in Euclidean distances between the third candidate feature point pair and the fourth candidate feature point pair.

[0168] Fourth, if the above three differences are all less than the fourth threshold, the current candidate feature point pair is used as the target feature point pair. If at least one of the above three differences is greater than or equal to the fourth threshold, the first step and subsequent steps are executed again until the target feature point pair is obtained.

[0169] S206: Calculate the model parameters of the image registration model based on the selected feature point pairs, and determine the inner point set of the feature point pair set under the current image registration model.

[0170] For each feature point pair in the feature point pair set, it is determined whether the feature point contained in the feature point pair is an inlier or an outlier, thereby obtaining an inlier set under the current image registration model.

[0171] S207: Determine whether the number of elements in the interior point set is greater than the number of elements in the optimal interior point set.

[0172] If the judgment result is yes, execute S208, if the judgment result is no, execute S203 again.

[0173] S208: Taking the interior point set as a new optimal interior point set, and taking the current model parameters as optimal model parameters.

[0174] When the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as the new optimal interior point set, and the current model parameters are used as the optimal model parameters, that is, the optimal interior point set is updated to the interior point set obtained in this round of iteration, and the optimal model parameters are updated to the model parameters obtained in this round of iteration. When the number of elements in the interior point set is less than or equal to the number of elements in the optimal interior point set, the step of determining whether the number of elements in the current optimal interior point set reaches the first number and subsequent steps are performed again.

[0175] S209: Determine whether a preset convergence condition is met.

[0176] If the convergence condition is met, S210 is executed; if the convergence condition is not met, S203 and subsequent steps are executed again.

[0177] S210: When the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model.

[0178] When the preset convergence condition is not met, the step of determining whether the number of elements of the current optimal interior point set reaches the first number and subsequent steps are performed again. When the preset convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0179] Optionally, the convergence condition is: the number of iterations reaches a preset number.

[0180] Optionally, the convergence condition is: the number of elements of the optimal interior point set reaches a preset number.

[0181] The method for determining the model parameters of the image registration model disclosed in the present application is that in the first iteration, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, and the target feature point pairs need to satisfy: the difference between the Euclidean distances of the target feature point pairs is less than a preset threshold, and can enter the effective iteration faster; in addition, in subsequent iterations, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, but target feature point pairs are selected from the optimal internal point set, so as to achieve the purpose of faster convergence. Based on the technical solution disclosed in the present application, the convergence speed of determining the model parameters of the image registration model can be accelerated without increasing hardware resources.

[0182] The technical solutions disclosed above in the present application adopt the same technical concept: in the first iteration, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, and it is necessary to ensure that the difference in the Euclidean distance of the target feature point pairs is small, so as to enter the effective iteration faster; in subsequent iterations, the target feature point pairs used to calculate the model parameters of the image registration model are not randomly selected from all the feature point pairs, but the target feature point pairs are selected from the optimal internal point set, so as to achieve the purpose of faster convergence.

[0183] The present application discloses a method for determining model parameters of an image registration model. Accordingly, the present application discloses a device for determining model parameters of an image registration model.

[0184] See also Figure 3 , Figure 3 This is a schematic diagram of a structure of a device for determining model parameters of an image registration model disclosed in the present application, the device comprising:

[0185] A first sample image acquisition module 301 is used to obtain a first sample image and a second sample image, where the first sample image and the second sample image are obtained by collecting images of a target scene from different angles;

[0186] A first feature point processing module 302 is used to determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set;

[0187] The feature point pair sorting module 303 is used to determine the Euclidean distance of each feature point pair in the first feature point pair set, and sort the feature point pairs in the first feature point pair set according to the Euclidean distance to obtain a second feature point pair set;

[0188] A first judgment module 304 is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine model parameters of the image registration model;

[0189] A first data acquisition module 305 is configured to select a second number of target feature point pairs from the second feature point pair set when the number of elements in the optimal inner point set does not reach the first number, wherein the difference between the positions of the second number of target feature point pairs in the second feature point pair set is less than a preset threshold;

[0190] A second data acquisition module 306 is configured to select a second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number;

[0191] A first data calculation module 307, used to calculate the model parameters of the image registration model based on the target feature point pair, and determine the inner point set of the first feature point pair set under the current image registration model;

[0192] A first data updating module 308 is used to use the interior point set as a new optimal interior point set and the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set;

[0193] The first processing module 309 is used to determine whether a preset convergence condition is met; if the convergence condition is not met, the first judgment module 304 is triggered to execute an operation of determining whether the number of elements of the current optimal internal point set reaches a first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0194] Optionally, when the second number is 2, the first data acquisition module 305 is specifically configured to:

[0195] Randomly select 2 feature point pairs from the second feature point pair set as candidate feature point pairs; determine the difference in the positions of the candidate feature point pairs in the second feature point pair set; when the difference is less than a first threshold, use the current candidate feature point pair as a target feature point pair; when the difference is greater than or equal to the first threshold, again execute the step of randomly selecting 2 feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps until the target feature point pair is obtained.

[0196] Optionally, when the second number is an integer greater than 2, the first data acquisition module 305 is specifically configured to:

[0197] A second number of feature point pairs are randomly selected from the second feature point pair set as candidate feature point pairs; the candidate feature point pairs are sorted according to the first serial number, where the first serial number is the serial number of the position of the candidate feature point pair in the second feature point pair set; for the sorted candidate feature point pairs, the difference in the first serial number of all two adjacent candidate feature point pairs is determined; when the difference in the first serial number of all two adjacent candidate feature point pairs is less than a second threshold, the current candidate feature point pair is used as the target feature point pair; when there is at least one group of two adjacent candidate feature point pairs whose difference in the first serial number is greater than or equal to the second threshold, the step of randomly selecting a second number of feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

[0198] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of another device for determining model parameters of an image registration model disclosed in this application, the device comprising:

[0199] The second sample image acquisition module 401 is used to obtain a first sample image and a second sample image, where the first sample image and the second sample image are obtained by collecting images of the target scene from different angles;

[0200] The second feature point processing module 402 is used to determine the feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set;

[0201] A second judgment module 403 is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice the second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model;

[0202] The third data acquisition module 404 is used to select a second number of target feature point pairs from the feature point pair set when the number of elements of the optimal inner point set does not reach the first number, wherein the difference between the Euclidean distances of the second number of target feature point pairs is less than a preset threshold;

[0203] A fourth data acquisition module 405 is configured to select a second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number;

[0204] A second data calculation module 406 is used to calculate the model parameters of the image registration model based on the target feature point pair, and determine the internal point set of the feature point pair set under the current image registration model;

[0205] A second data updating module 407 is used to use the interior point set as a new optimal interior point set and the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set;

[0206] The second processing module 408 is used to determine whether the preset convergence condition is met; if the convergence condition is not met, the second judgment module 403 is triggered to execute the operation of determining whether the number of elements of the current optimal internal point set reaches the first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

[0207] Optionally, when the second number is 2, the third data acquisition module 404 is specifically configured to:

[0208] Randomly select 2 feature point pairs from the feature point pair set as candidate feature point pairs; determine the difference between the Euclidean distances of the candidate feature point pairs; when the difference is less than a third threshold, use the current candidate feature point pair as a target feature point pair; when the difference is greater than or equal to the third threshold, perform the step of randomly selecting 2 feature point pairs from the feature point pair set as candidate feature point pairs and subsequent steps again until the target feature point pair is obtained.

[0209] Optionally, when the second number is an integer greater than 2, the third data acquisition module 404 is specifically configured to:

[0210] A second number of feature point pairs are randomly selected from the feature point pair set as candidate feature point pairs; each candidate feature point pair is sorted according to the Euclidean distance; for the sorted candidate feature point pairs, the difference between the Euclidean distances of all two adjacent candidate feature point pairs is determined; when the difference between the Euclidean distances of all two adjacent candidate feature point pairs is less than a fourth threshold, the current candidate feature point pair is used as the target feature point pair; when there is at least one group of two adjacent candidate feature point pairs whose difference between the Euclidean distances is greater than or equal to the fourth threshold, the step of randomly selecting a second number of feature points from the feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

[0211] The application also discloses an electronic device.

[0212] See also Figure 5 , Figure 5 The hardware structure of the electronic device is shown. The electronic device includes: a processor 501 , a memory 502 , a communication interface 503 , and a communication bus 504 .

[0213] In the embodiment of the present application, the number of the processor 501, the memory 502, the communication interface 503, and the communication bus 504 is at least one, and the processor 501, the memory 502, and the communication interface 503 communicate with each other through the communication bus 504. The communication bus 504 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0214] It should be noted that those skilled in the art can understand that Figure 5 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include Figure 5 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0215] Combine the following Figure 5 Provide a detailed introduction to the various components of electronic equipment.

[0216] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, thereby monitoring the electronic device as a whole.

[0217] The processor 501 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0218] The memory 502 may include a memory, such as a high-speed random-access memory (RAM) and a read-only memory (ROM), and may also include a large-capacity storage device, such as at least one disk storage.

[0219] The memory 502 stores a computer program, and the processor 501 can call the computer program stored in the memory to enable the electronic device to implement each step of any one of the methods disclosed above for determining model parameters of an image registration model.

[0220] The present application also discloses a readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements the various steps of any one of the methods for determining model parameters of an image registration model disclosed above.

[0221] The present application also discloses a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the various steps of any one of the methods for determining model parameters of an image registration model disclosed above.

[0222] It should be noted that the technical features recorded in the various embodiments in the specification can be replaced or combined with each other, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. The steps in the methods of the various embodiments of the present application can be adjusted in sequence, merged and deleted according to actual needs. The modules in the devices and equipment of the various embodiments of the present application can be merged, divided and deleted according to actual needs.

[0223] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple modules can be combined or integrated into another module, or some features can be ignored or not executed.

[0224] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. The various technical features in the various embodiments can be arranged and combined to form new embodiments. For the device, electronic device, readable storage medium and computer program product for determining the model parameters of the image registration model disclosed in the embodiments, since they correspond to the method for determining the model parameters of the image registration model disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method section.

[0225] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0226] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0227] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A method for determining model parameters of an image registration model, characterized in that: include: Obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by capturing images of a target scene from different angles; Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set; Determine the Euclidean distance of each feature point pair in the first feature point pair set, sort the feature point pairs in the first feature point pair set according to the Euclidean distance, and obtain a second feature point pair set; Determine whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine model parameters of the image registration model; When the number of elements in the optimal inlier set does not reach the first number, selecting the second number of target feature point pairs from the second feature point pair set, wherein the difference between the positions of the second number of target feature point pairs in the second feature point pair set is less than a preset threshold; when the number of elements in the optimal inlier set reaches the first number, selecting the second number of target feature point pairs from the optimal inlier set; Calculating model parameters of the image registration model based on the target feature point pairs, and determining an inner point set of the first feature point pair set under the current image registration model; If the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as a new optimal interior point set, and the current model parameters are used as optimal model parameters; Determine whether a preset convergence condition is met; if the convergence condition is not met, re-execute the step of determining whether the number of elements of the current optimal internal point set reaches the first number and subsequent steps; if the convergence condition is met, use the current optimal model parameters as the final model parameters of the image registration model, and apply the image registration model to the image stitching process.

2. The method for determining model parameters of an image registration model according to claim 1, characterized in that: When the second number is 2, selecting the second number of target feature point pairs from the second feature point pair set includes: Randomly select two feature point pairs from the second feature point pair set as candidate feature point pairs; Determining the difference between the positions of the candidate feature point pairs in the second feature point pair set; When the difference is less than the first threshold, the current candidate feature point pair is used as the target feature point pair; When the difference is greater than or equal to the first threshold, the step of randomly selecting two feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

3. The method for determining model parameters of an image registration model according to claim 1, characterized in that: When the second number is an integer greater than 2, selecting the second number of target feature point pairs from the second feature point pair set includes: Randomly selecting the second number of feature point pairs from the second feature point pair set as candidate feature point pairs; Sort the candidate feature point pairs according to a first serial number, where the first serial number is the serial number of the position of the candidate feature point pair in the second feature point pair set; For the sorted candidate feature point pairs, determine the difference between the first serial numbers of all two adjacent candidate feature point pairs; When the difference between the first serial numbers of all two adjacent candidate feature point pairs is less than the second threshold, the current candidate feature point pair is used as the target feature point pair; When there is at least one set of adjacent candidate feature point pairs whose difference in first serial numbers is greater than or equal to the second threshold, the step of randomly selecting the second number of feature point pairs from the second feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pairs are obtained.

4. A method for determining model parameters of an image registration model, characterized in that: include: Obtaining a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by capturing images of a target scene from different angles; Determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set; Determine whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine model parameters of the image registration model; When the number of elements in the optimal inlier set does not reach the first number, selecting the second number of target feature point pairs from the feature point pair set, wherein the difference between the Euclidean distances of the second number of target feature point pairs is less than a preset threshold; when the number of elements in the optimal inlier set reaches the first number, selecting the second number of target feature point pairs from the optimal inlier set; Calculating model parameters of the image registration model based on the target feature point pairs, and determining an inner point set of the feature point pair set under the current image registration model; If the number of elements in the interior point set is greater than the number of elements in the optimal interior point set, the interior point set is used as a new optimal interior point set, and the current model parameters are used as optimal model parameters; Determine whether a preset convergence condition is met; if the convergence condition is not met, re-execute the step of determining whether the number of elements of the current optimal internal point set reaches the first number and subsequent steps; if the convergence condition is met, use the current optimal model parameters as the final model parameters of the image registration model, and apply the image registration model to the image stitching process.

5. The method for determining model parameters of an image registration model according to claim 4, characterized in that: When the second number is 2, selecting the second number of target feature point pairs from the feature point pair set includes: Randomly select two feature point pairs from the feature point pair set as candidate feature point pairs; Determine the difference between the Euclidean distances of the candidate feature point pairs; When the difference is less than a third threshold, taking the current candidate feature point pair as the target feature point pair; When the difference is greater than or equal to the third threshold, the step of randomly selecting two feature point pairs from the feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pair is obtained.

6. The method for determining model parameters of an image registration model according to claim 4, characterized in that: When the second number is an integer greater than 2, selecting the second number of target feature point pairs from the feature point pair set includes: Randomly selecting a second number of feature point pairs from the feature point pair set as candidate feature point pairs; Sort each candidate feature point pair according to the Euclidean distance; For the sorted candidate feature point pairs, determine the difference between the Euclidean distances of all two adjacent candidate feature point pairs; When the difference between the Euclidean distances of all two adjacent candidate feature point pairs is less than the fourth threshold, the current candidate feature point pair is used as the target feature point pair; When there is at least one set of adjacent candidate feature point pairs whose Euclidean distance difference is greater than or equal to the fourth threshold, the step of randomly selecting a second number of feature points from the feature point pair set as candidate feature point pairs and subsequent steps are performed again until the target feature point pairs are obtained.

7. A device for determining model parameters of an image registration model, characterized in that: include: A first sample image acquisition module, used to obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by collecting images of a target scene from different angles; A first feature point processing module, used to determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a first feature point pair set; A feature point pair sorting module, used to determine the Euclidean distance of each feature point pair in the first feature point pair set, and sort the feature point pairs in the first feature point pair set according to the Euclidean distance to obtain a second feature point pair set; A first judgment module is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice a second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model; a first data acquisition module, configured to select, when the number of elements in the optimal inner point set does not reach the first number, a second number of target feature point pairs from the second feature point pair set, wherein a difference between positions of the second number of target feature point pairs in the second feature point pair set is less than a preset threshold; A second data acquisition module is used to select the second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number; A first data calculation module, used for calculating the model parameters of the image registration model based on the target feature point pair, and determining the inner point set of the first feature point pair set under the current image registration model; A first data updating module, configured to use the interior point set as a new optimal interior point set and the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set; The first processing module is used to determine whether a preset convergence condition is met; if the convergence condition is not met, the first judgment module is triggered to execute an operation of determining whether the number of elements of the current optimal internal point set reaches a first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

8. A device for determining model parameters of an image registration model, characterized in that: include: A second sample image acquisition module, used to obtain a first sample image and a second sample image, wherein the first sample image and the second sample image are obtained by collecting images of a target scene from different angles; A second feature point processing module, used to determine feature points in the first sample image and the second sample image, and match the feature points in the first sample image and the second sample image to construct a feature point pair set; A second judgment module is used to judge whether the number of elements of the current optimal internal point set reaches a first number, wherein the first number is twice the second number, and the second number is the number of feature point pairs required to determine the model parameters of the image registration model; A third data acquisition module is used to select a second number of target feature point pairs from the feature point pair set when the number of elements in the optimal inner point set does not reach the first number, wherein the difference between the Euclidean distances of the second number of target feature point pairs is less than a preset threshold; A fourth data acquisition module, configured to select the second number of target feature point pairs from the optimal interior point set when the number of elements in the optimal interior point set reaches the first number; A second data calculation module, used for calculating the model parameters of the image registration model based on the target feature point pair, and determining the inner point set of the feature point pair set under the current image registration model; A second data updating module is used for taking the interior point set as a new optimal interior point set and taking the current model parameters as optimal model parameters when the number of elements in the interior point set is greater than the number of elements in the optimal interior point set; The second processing module is used to determine whether a preset convergence condition is met; if the convergence condition is not met, the second judgment module is triggered to execute an operation of determining whether the number of elements of the current optimal internal point set reaches a first number; if the convergence condition is met, the current optimal model parameters are used as the final model parameters of the image registration model, and the image registration model is applied to the image stitching process.

9. An electronic device, characterized in that: comprising a processor and a memory connected to the processor; The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device implements the various steps of the method for determining the model parameters of the image registration model as described in any one of claims 1 to 3, or enables the electronic device to implement the various steps of the method for determining the model parameters of the image registration model as described in any one of claims 4 to 6.

10. A readable storage medium, characterized in that: The readable storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device implements the various steps of the method for determining the model parameters of the image registration model as described in any one of claims 1 to 3, or the electronic device implements the various steps of the method for determining the model parameters of the image registration model as described in any one of claims 4 to 6.