Image control point precise positioning method
By accelerating the robust feature algorithm and dark point detection algorithm to screen feature points, combining linear fitting and error removal, the problem of image control point positioning efficiency and accuracy in traditional methods is solved, and more efficient precise positioning of feature points is achieved.
Patent Information
- Application Number
- CN202010759856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-07-31
AI Technical Summary
The traditional image control point positioning method has high labor cost, making it difficult to take into account the matching accuracy and algorithm efficiency at the same time, and fails to effectively realize the precise positioning of feature points of multiple images.
Feature point pairs are obtained by accelerating the matching of robust feature algorithms. Dark point detection algorithm is used to filter and remove feature point pairs that do not meet the conditions, perform linear fitting, calculate errors and remove feature point pairs with large errors, and refit to improve accuracy.
The accuracy and efficiency of image control point positioning is improved, and the error is reduced through accurate feature point screening and fitting formulas is reduced and the quality of subsequent processing is improved.
Smart Images

Figure CN111860546B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for accurately positioning image control points. Background Art
[0002] The positioning of image control points is a core issue in the field of digital measurement. The focus is on identifying feature points in two images. The process is actually to find the mapping between the two photos, that is, to connect the points corresponding to the same position in space in two images of the same scene or object from different viewpoints.
[0003] The quality of image control point positioning and matching directly affects the quality of subsequent processing. The traditional image control point positioning has high labor costs and it is difficult to take into account both matching accuracy and algorithm efficiency at the same time. Therefore, a method for accurately positioning feature points of multiple images is urgently needed. Summary of the invention
[0004] The present invention provides a method for accurately positioning image control points, which adopts the following technical solutions:
[0005] A method for accurately positioning image control points includes the following steps:
[0006] Determining a first image control point of the first image;
[0007] Matching feature points of the first image and the second image by a matching algorithm to obtain a plurality of feature point pairs, each feature point pair comprising a first feature point located in the first image and a second feature point located in the second image corresponding to the first feature point;
[0008] Screening several feature point pairs;
[0009] Perform linear fitting on the selected feature point pairs to obtain the fitting formula;
[0010] Substituting the coordinates of the first image control point into the fitting formula, the coordinates of the second image control point located in the second image are obtained.
[0011] Furthermore, a specific method of performing feature point matching on the first image and the second image by a matching algorithm to obtain a plurality of feature point pairs is as follows:
[0012] The feature points of the first image and the second image are matched by an accelerated robust feature algorithm to obtain a plurality of feature point pairs.
[0013] Furthermore, the specific method for screening several feature point pairs is:
[0014] A dark point detection algorithm is used to calculate a number of feature point pairs to filter out dark point pairs from the feature point pairs.
[0015] Furthermore, the specific method of calculating a plurality of feature point pairs by a dark point detection algorithm to filter out dark point pairs from the feature point pairs is as follows:
[0016] For each group of the plurality of feature point pairs, a first pixel region and a second pixel region of the same size are respectively expanded outwards with the first feature point and the second feature point in the feature point pair as the center;
[0017] Pixels whose R, G, and B values in the first pixel area and the second pixel area are all greater than 120 are regarded as dark pixels;
[0018] A pair of feature points in which the number of dark pixels in one of the first pixel region and the second pixel region accounts for more than 60% is marked as a dark point pair, and the dark point pair is removed.
[0019] Furthermore, the first pixel region and the second pixel region are 5*5 pixel regions.
[0020] Furthermore, the specific method of performing linear fitting on the filtered feature point pairs to obtain the fitting formula is:
[0021] Perform the first linear fitting on the selected feature point pairs to obtain the first fitting formula;
[0022] Remove the feature point pairs whose errors relative to the first fitting formula exceed the threshold value among the filtered feature points;
[0023] Perform a second linear fit on the feature point pairs after the error is removed to obtain a second fitting formula;
[0024] The specific method of substituting the coordinates of the first image control point into the fitting formula to obtain the coordinates of the second image control point located in the second image is:
[0025] Substituting the coordinates of the first image control point into the second fitting formula obtains the coordinates of the second image control point located in the second image.
[0026] Furthermore, the specific method for removing the feature point pairs whose errors exceed the threshold value among the filtered feature points is as follows:
[0027] Calculate the root mean square error of each feature point pair relative to the first fitting formula;
[0028] The feature point pairs whose RMS errors are greater than the preset value are removed.
[0029] Furthermore, the feature points are linearly fitted by the least square method.
[0030] Furthermore, a specific method for determining the first image control point of the first image is:
[0031] The first image control point of the first image is determined by manual selection.
[0032] Further, the first image control point is located at the center of the first image.
[0033] The benefit of the present invention lies in the image control point precise positioning method provided. After obtaining a number of feature point pairs through a matching algorithm, these feature point pairs are screened and feature point pairs that do not meet the conditions are removed to improve the accuracy of linear fitting.
[0034] The present invention is also beneficial in that it provides a method for accurately locating image control points. After linear fitting is performed on the screened feature point pairs, the error between the feature point pairs and the fitting formula is calculated, the feature point pairs with large errors are removed, and then linear fitting is performed again on the remaining feature point pairs to obtain a more accurate fitting formula. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the image control point precise positioning method of the present invention. DETAILED DESCRIPTION
[0036] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] like Figure 1 The present invention provides a method for accurately locating image control points of an image, which mainly includes the following steps: S1: Determine the first image control point of the first image. S2: Match the feature points of the first image and the second image through a matching algorithm to obtain a number of feature point pairs, each feature point pair including a first feature point located in the first image and a second feature point located in the second image and corresponding to the first feature point. S3: Screen the several feature point pairs. S4: Perform linear fitting on the screened feature point pairs to obtain a fitting formula. S5: Substitute the coordinates of the first image control point into the fitting formula to obtain the coordinates of the second image control point located in the second image. Through the above steps, after obtaining a number of feature point pairs through a matching algorithm, these feature point pairs are not directly linearly fitted to obtain a fitting formula, but are screened again to remove feature point pairs that do not meet the conditions to improve the accuracy of linear fitting. The above steps are described in detail below.
[0038] For step S1: determine the first image control point of the first image.
[0039] In the present invention, the first image and the second image are images taken at different angles of the same scene or object. The coordinate systems of the first image and the second image are different. The first image and the second image are processed, the mapping relationship between the two images is calculated, and then the coordinates of the corresponding second image control points in the second image are calculated according to the coordinates of the first image control points.
[0040] In the present invention, the first image control point of the first image is determined by manual selection. It can be understood that the closer the distance to the divergence center point is, the smaller the distortion caused is. Therefore, the closer the selected first image control point is to the center of the first image, the smaller the error of the feature point found thereby is. In this embodiment, preferably, the center position of the first image is selected as the first image control point.
[0041] For step S2: feature point matching is performed on the first image and the second image through a matching algorithm to obtain a plurality of feature point pairs, each feature point pair comprising a first feature point located in the first image and a second feature point located in the second image and corresponding to the first feature point.
[0042] In the present invention, a specific method for obtaining a plurality of feature point pairs by performing feature point matching on the first image and the second image through a matching algorithm is as follows: obtaining a plurality of feature point pairs by performing feature point matching on the first image and the second image through an accelerated robust feature algorithm.
[0043] Specifically, according to the accelerated robust feature algorithm, a number of first feature points evenly distributed around the first image control point in the first image and second feature points in the second image corresponding to these first feature points are analyzed, and these first feature points and second feature points form feature point pairs in pairs.
[0044] For step S3: a number of feature point pairs are screened.
[0045] In the present invention, in order to improve the accuracy of linear fitting, the feature point pairs obtained by the accelerated robust feature algorithm analysis and matching are further analyzed and calculated using a dark point detection algorithm to remove the dark point pairs from the feature point pairs.
[0046] Specifically, the specific method of calculating several feature point pairs through the dark point detection algorithm to screen out the dark point pairs in the feature point pairs is as follows: for each group of several feature point pairs, a square first pixel area is formed by expanding outward with the first feature point in the feature point pair as the center, and a square second pixel area of the same size as the first pixel area is formed by expanding outward with the second feature point as the center. The RGB value of each point in the first pixel area and the second pixel area is analyzed, and the pixels whose R, G, and B values in the first pixel area and the second pixel area are all greater than 120 are regarded as dark pixels. If the number of dark pixels in a pixel area accounts for more than 60%, then the pixel area is a dark pixel area. The number of dark pixels accounts for more than 60% means that the ratio of the number of dark pixels in a pixel area to the total number of pixels in the pixel area is greater than 60%. The feature point pairs in which the number of dark pixels in one of the first pixel area and the second pixel area accounts for more than 60% are marked as dark point pairs, and the dark point pairs are removed. That is, if one of the first pixel region and the second pixel region corresponding to a feature point pair is a dark pixel region, then the feature point pair is a dark point pair.
[0047] It is understandable that the first pixel area and the second pixel area can be set as needed. In the present invention, the first pixel area and the second pixel area are i*i pixel areas, and i is an odd number greater than 1. Specifically, in the present invention, the first pixel area and the second pixel area are 5*5 pixel areas, and the first feature point and the second feature point are located at the center of the first pixel area and the second pixel area, respectively.
[0048] For step S4: perform linear fitting on the filtered feature point pairs to obtain a fitting formula.
[0049] Specifically, in the present invention, a fitting formula is obtained by performing linear fitting on the filtered feature point pairs using the least square method.
[0050] As a preferred implementation, the specific method of performing linear fitting on the filtered feature point pairs to obtain the fitting formula is:
[0051] Perform a first linear fit on the selected feature point pairs to obtain a first fitting formula. Remove the feature point pairs whose errors relative to the first fitting formula exceed a threshold value from the selected feature points. Perform a second linear fit on the feature point pairs after the errors are removed to obtain a second fitting formula. Feature points after the errors are removed refer to the remaining feature points after removing the feature points with errors.
[0052] In the present invention, the specific method of removing the feature point pairs whose errors exceed the threshold value among the filtered feature points is: calculating the root mean square error of each feature point pair relative to the first fitting formula, and removing the feature point pairs whose root mean square errors are greater than a preset value.
[0053] For step S5: substitute the coordinates of the first image control point into the fitting formula to obtain the coordinates of the second image control point located in the second image.
[0054] The coordinates of the first image control point are substituted into the second fitting formula obtained by fitting in step S4 to calculate the coordinates of the second image control point, thereby finding the position of the first image control point in the first image corresponding to the position in the second image.
[0055] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A method for accurately locating image control points, characterized in that: The following steps are involved: Determining a first image control point of the first image; Performing feature point matching on the first image and the second image by a matching algorithm to obtain a plurality of feature point pairs, each of the feature point pairs comprising a first feature point located in the first image and a second feature point located in the second image and corresponding to the first feature point; Screening a number of the feature point pairs; Performing linear fitting on the selected feature point pairs to obtain a fitting formula; Substituting the coordinates of the first image control point into the fitting formula to obtain the coordinates of the second image control point located in the second image; The specific method of performing feature point matching on the first image and the second image by using a matching algorithm to obtain a plurality of feature point pairs is: Performing feature point matching on the first image and the second image by using an accelerated robust feature algorithm to obtain a plurality of feature point pairs; The specific method for screening the plurality of feature point pairs is: Calculating a number of the feature point pairs by a dark point detection algorithm to filter out the dark point pairs in the feature point pairs; The specific method of calculating the plurality of feature point pairs by using the dark point detection algorithm to filter out the dark point pairs in the feature point pairs is: For each group of the plurality of feature point pairs, respectively expanding outwards with the first feature point and the second feature point in the feature point pair as the center to form a first pixel area and a second pixel area of the same size; Pixels whose R, G, and B values in the first pixel area and the second pixel area are all greater than 120 are regarded as dark pixels; Marking a pair of feature points in which the number of dark pixels in one of the first pixel area and the second pixel area accounts for more than 60% as the dark point pair, and removing the dark point pair; The specific method of performing linear fitting on the selected feature point pairs to obtain the fitting formula is: Performing a first linear fit on the selected feature point pairs to obtain a first fitting formula; removing the feature point pairs whose errors relative to the first fitting formula exceed a threshold value from the filtered feature points; Performing a second linear fit on the feature point pair after the error is removed to obtain a second fitting formula; The specific method of substituting the coordinates of the first image control point into the fitting formula to obtain the coordinates of the second image control point located in the second image is: Substituting the coordinates of the first image control point into the second fitting formula to obtain the coordinates of the second image control point located in the second image; The specific method of removing the feature point pairs whose errors exceed the threshold value among the filtered feature points is: Calculating a root mean square error of each pair of feature points relative to the first fitting formula; The feature point pairs whose root mean square error is greater than a preset value are removed.
2. The image control point precise positioning method according to claim 1, characterized in that: The first pixel region and the second pixel region are 5*5 pixel regions.
3. The image control point precise positioning method according to claim 1, characterized in that: The characteristic points are linearly fitted by the least square method.
4. The image control point precise positioning method according to claim 1, characterized in that: The specific method for determining the first image control point of the first image is: The first image control point of the first image is determined by manual selection.
5. The image control point precise positioning method according to claim 4, characterized in that: The first image control point is located at the center of the first image.
Citation Information
Patent Citations
Method for screening matching pairs of feature points to splice images
CN102819835A
Locating method based on improved FAST-SURF algorithm
CN108388854A