A method for sorting camera distortion points

During the camera calibration process, the number of neighbors, orientation scores and limit coefficients of distortion points are used to sort, which solves the problem of inaccurate ordering of distortion points in the existing technology, and improves the accuracy and reliability of camera calibration.

CN119963635BActive Publication Date: 2025-05-30SHENZHEN RUIDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510401742.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-05-30
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

In the prior art, in the process of camera calibration, the distortion point sorting is not accurate enough, resulting in insufficient accuracy and reliability of camera calibration.

Method used

By obtaining the coordinates of distorted points in the image, calculating the number of neighbors of each distorted point, filtering out the priority points, calculating the orientation score and limiting coefficient of the priority points, determining the top and bottom row points, and sorting them, and finally determining the sort order of the camera distorted points.

Benefits of technology

Improve the accuracy and reliability of camera calibration, ensure the effect of distortion correction, and enhance the stability of camera calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963635B_ABST
    Figure CN119963635B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for sorting camera distortion points. The method includes: obtaining the coordinates of distortion points in an image and establishing a set of distortion points to be processed; calculating the number of neighbors of the distortion points in the set of distortion points to be processed; determining the distortion points with the number of neighbors less than a preset number threshold as the priority sorting points and establishing a set of priority sorting points; calculating the azimuth scores of the priority sorting points; determining the azimuth limit points according to the azimuth scores and coordinates of the priority sorting points; calculating the center point coordinates based on the set of priority sorting points; calculating the limit coefficient according to the center point coordinates and the coordinates of the azimuth limit points; determining the top row points and the bottom row points based on the limit coefficient and sorting the top row points and the bottom row points; removing the top row points and the bottom row points from the set of distortion points to be processed and performing iterative operations on the updated set of distortion points to be processed to determine the sorting of the camera distortion points. The present invention can efficiently and accurately sort the camera distortion points, improving the accuracy and reliability of camera calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and more specifically, to a method for sorting camera distortion points. Background Art

[0002] Camera calibration is one of the core technologies in the field of machine vision and plays a crucial role in many fields such as intelligent manufacturing and autonomous driving. Its basic principle is to identify the distorted image coordinates on the calibration pattern and correspond these coordinates to the known world coordinates, and then accurately solve the internal and external parameter information of the camera according to the camera model. Before solving the internal and external parameters of the camera, it is necessary to accurately sort the identified camera distortion points to ensure that they can be in one-to-one correspondence with the known world coordinates. However, in practical applications, due to factors such as the manufacturing accuracy of the calibration board, the image acquisition environment, and the performance of the camera itself, there are often certain errors in the calibration results, resulting in unsatisfactory distortion correction effects.

[0003] Therefore, there are defects in the existing technology and urgent improvements are needed. Summary of the Invention

[0004] In view of the above problems, the purpose of the present invention is to provide a method for sorting camera distortion points, which can efficiently and accurately sort camera distortion points, thereby providing a solid foundation for subsequent camera calibration work and further improving the accuracy and reliability of camera calibration.

[0005] The first aspect of the present invention provides a method for sorting camera distortion points, including:

[0006] Obtain the coordinates of the distortion points in the image and establish a set P of distortion points to be processed;

[0007] Calculate the number of neighbors of the distortion point P j in the set P of distortion points to be processed;

[0008] Determine the distortion points with the number of neighbors less than the preset number threshold as the priority sorting points M i and establish a set M of priority sorting points;

[0009] Calculate the azimuth score s of the priority sorting point M i ;

[0010] Determine the azimuth limit points according to the azimuth score s and coordinates of the priority sorting point M i ; The azimuth limit points include a first azimuth limit point, a second azimuth limit point, a third azimuth limit point, and a fourth azimuth limit point;

[0011] Calculate the center point coordinates based on the set M of priority sorting points;

[0012] Calculate the restriction coefficients based on the coordinates of the central point and the coordinates of the orientation restriction points; the restriction coefficients include a first restriction coefficient, a second restriction coefficient, a third restriction coefficient, and a fourth restriction coefficient;

[0013] Determine the top row point D from the set M of prioritized points based on the restriction coefficients i and the bottom row point H i , and sort the top row point D i and the bottom row point H i ;

[0014] Eliminate the top row point D i and the bottom row point H i from the set P of distortion points to be processed, perform iterative operations on the updated set P of distortion points to be processed, and determine the sorting of camera distortion points.

[0015] In this solution, calculating the number of neighbors of the distortion point P j in the set P of distortion points to be processed includes:

[0016] Determine the upper left, upper right, lower left, and lower right of the distortion point P j as the traversal directions, and traverse other distortion points in the set P of distortion points to be processed;

[0017] When there are other distortion points in the traversal direction, increment the number of neighbors in the traversal direction by one, and end the traversal of the traversal direction;

[0018] After the traversal ends, count the number of neighbors in each traversal direction to determine the number of neighbors of the distortion point P j ;

[0019] In this solution, calculating the orientation score s of the prioritized point M i includes:

[0020] Calculate the Euclidean distance between the prioritized point M i and other prioritized points in the set M of prioritized points, determine the other prioritized point with the smallest Euclidean distance as the first nearest neighbor point A of the prioritized point M i , and determine the other prioritized point with the second smallest Euclidean distance as the second nearest neighbor point B of the prioritized point M i ;

[0021] Calculate the orientation score s of the prioritized point M i according to the coordinates of the first nearest neighbor point A and the second nearest neighbor point B;

[0022] ;

[0023] where x i and y iThey are the priority sorting point M i 's x coordinate and y coordinate, x A and y A are respectively the x coordinate and y coordinate of the first nearest neighbor point A of M i , y B and y B are respectively the x coordinate and y coordinate of the second nearest neighbor point B of M i .

[0024] In this solution, determining the orientation limit points according to the orientation score s and coordinates of the priority sorting point M i includes:

[0025] Select the first four points with the smallest orientation scores from the set M of priority sorting points as candidate points;

[0026] Determine the first orientation limit point with the smallest x and y coordinates and the candidate point, and determine the fourth orientation limit point with the largest x and y coordinates and the candidate point;

[0027] Determine the candidate point with a larger x coordinate among the remaining candidate points as the second orientation limit point, and determine the candidate point with a smaller x coordinate among the remaining candidate points as the third orientation limit point.

[0028] In this solution, calculating the center point coordinates based on the set M of priority sorting points includes:

[0029] Calculate the center point coordinates (x c , y c ) according to the set M of priority sorting points;

[0030] ;

[0031] ;

[0032] Among them, x max and x min are respectively the maximum and minimum values of the x coordinates in the set M of priority sorting points, y max and y min are respectively the maximum and minimum values of the y coordinates in the set M of priority sorting points.

[0033] In this solution, calculating the restriction coefficient according to the coordinates of the center point and the orientation limit points includes:

[0034] According to the center point coordinates (x c , y c ), the coordinates of the first orientation limit point (x 0 , y 0 ), and the coordinates of the second orientation limit point (x 1 , y 1), the coordinates of the third azimuth limit point (x 2 , y 2 ), and the coordinates of the fourth azimuth limit point (x 3 , y 3 ) to calculate the first limit coefficient e 0 , the second limit coefficient e 1 , the third limit coefficient e 2 , and the fourth limit coefficient e 3 ; ;

[0035] ;

[0036] ;

[0037] .

[0038] In this solution, determining the top row point D i and the bottom row point H i from the set of prioritized points M based on the limit coefficients includes:

[0039] Calculating the limit factor h c , y c ) of the coordinates (x i , y i , y i ) of the prioritized point M i ;

[0040] ;

[0041] Comparing the magnitude relationship between y i and y c ;

[0042] When y i < y c , if both x 1 < x i < x 2 and e 0 < h i < e 1 are satisfied, then the prioritized point M i is determined as the top row point D i , and the top row point D i is added to the set of top row points D;

[0043] When y i > y c , if both x 3 < x i < x 4 and e 2 < h i < e3 , then the priority point M i Determine the bottom row point H i , the bottom row point H i Add it to the bottom row point set H.

[0044] In this solution, the top row point D i and bottom row point H i Sorting, including:

[0045] According to the x coordinate from small to large, the top row point D in the top row point set D i Sort by

[0046] According to the x coordinate from small to large, the bottom row point H in the bottom row point set H i Sorting. The present invention discloses a method for sorting camera distortion points, the method comprising: obtaining the coordinates of distortion points in an image, establishing a set of distortion points to be processed; calculating the number of neighbors of the distortion points in the set of distortion points to be processed; determining distortion points whose number of neighbors is less than a preset number threshold as priority points, and establishing a set of priority points; calculating the orientation score of the priority points; determining the orientation restriction points according to the orientation scores and coordinates of the priority points; calculating the coordinates of the center point based on the set of priority points; calculating the restriction coefficient according to the coordinates of the center point and the coordinates of the orientation restriction points; determining the top row points and the bottom row points based on the restriction coefficient, and sorting the top row points and the bottom row points; removing the top row points and the bottom row points from the set of distortion points to be processed, iterating the updated set of distortion points to be processed, and determining the camera distortion point sorting. The present invention can efficiently and accurately sort camera distortion points, and improve the accuracy and reliability of camera calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flowchart of a camera distortion point sorting method provided by the present invention is shown;

[0048] Figure 2 The distortion point P provided by the present invention is shown j A flowchart of a method for determining the number of neighbors;

[0049] Figure 3 A flow chart showing a method for determining an orientation restriction point provided by the present invention is shown;

[0050] Figure 4 A schematic diagram of the distribution of distortion points provided by the present invention is shown;

[0051] Figure 5 A schematic diagram of the distortion point sorting result provided by the present invention is shown. DETAILED DESCRIPTION

[0052] To more clearly understand the above objects, features, and advantages of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

[0053] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0054] Figure 1 The flowchart of a method for sorting camera distortion points provided by the present invention is shown.

[0055] As Figure 1 shown, the present invention discloses a method for sorting camera distortion points, including:

[0056] S102, obtaining the coordinates of distortion points in the image and establishing a set P of distortion points to be processed;

[0057] S104, calculating the number of neighbors of the distortion point P j in the set P of distortion points to be processed;

[0058] S106, determining the distortion points with the number of neighbors less than the preset number threshold as the priority sorting points M i , and establishing a set M of priority sorting points;

[0059] S108, calculating the azimuth score s of the priority sorting point M i ;

[0060] S110, determining the azimuth limit points according to the azimuth score s and coordinates of the priority sorting point M i ; The azimuth limit points include the first azimuth limit point, the second azimuth limit point, the third azimuth limit point, and the fourth azimuth limit point;

[0061] S112, calculating the center point coordinates based on the set M of priority sorting points;

[0062] S114, calculating the limit coefficients according to the center point coordinates and the coordinates of the azimuth limit points; The limit coefficients include the first limit coefficient, the second limit coefficient, the third limit coefficient, and the fourth limit coefficient;

[0063] S116, determining the top row points D i and the bottom row points H i from the set M of priority sorting points based on the limit coefficients, and sorting the top row points D i and the bottom row points H i ;

[0064] S118, eliminate the top row points D i and the bottom row points H i from the set P of distortion points to be processed, perform iterative operations on the updated set P of distortion points to be processed, and determine the sorting of camera distortion points.

[0065] According to an embodiment of the present invention, obtain the coordinates of distortion points in the input image. The corresponding distortion points in the image are distributed in n rows and m columns in the world coordinate system. The distortion points can be checkerboard corner points or other calibration feature points. Among them, the upper left corner coordinates of the input image can be determined as the coordinate origin, the positive direction of the X-axis is to the right, and the positive direction of the Y-axis is downward to establish a coordinate system, and the distortion point coordinates of each distortion point are determined through the established coordinate system. Organize the distortion point coordinates of the distortion points in the image to establish a set P of distortion points to be processed. As Figure 4 shown, it is a schematic diagram of the distribution of distortion points with 9 rows and 15 columns, and the cyan points are distortion points.

[0066] Traverse the other distortion points in the set P of distortion points to be processed according to the pre-determined traversal direction, determine the number of neighbors of each distortion point in the set P of distortion points to be processed, and screen out the priority sorting points according to the number of neighbors of each distortion point. For each distortion point, if the number of neighbors of this point is less than the preset number threshold, then this point is classified as a priority sorting point and added to the set M of priority sorting points. Among them, the preset number threshold is set by the system, and its initial value is 4. For the priority sorting point M i (i < k 1 , k 1 is the size of the set M), calculate the Euclidean distance between the priority sorting point M i and other priority sorting points, and respectively determine the first nearest neighbor point A and the second nearest neighbor point B of the priority sorting point M i as the priority sorting point M i through the first nearest neighbor point A and the second nearest neighbor point B Calculate the azimuth score of the priority sorting point M i Select the top four points with the smallest azimuth scores from the set M of priority sorting points as candidate points, determine the azimuth limit points in combination with the coordinates of the candidate points, calculate the center point coordinates, and determine the corresponding limit coefficients of each azimuth limit point. According to the limit coefficients of the coordinates of the priority sorting point M i , determine the top row points and the bottom row points from the set of priority sorting points, establish a set D of top row points and a set H of bottom row points, and sort the points within the set D of top row points and the set H of bottom row points respectively in ascending order of the x coordinate. That is, the sorting of the distortion points in the current top row and bottom row is completed. At the same time, eliminate the distortion points belonging to the top row and bottom row from the set P of distortion points to be processed, determine the updated set P of distortion points to be processed and continue the above operations until the sorting of all distortion points is determined. As Figure 5As shown, it is the visualization effect after sorting all the distortion points, where the numbers are the sorting serial numbers of the distortion points.

[0067] Figure 2 It shows the distortion point P provided by the present invention. j The flowchart of the method for determining the number of neighbors.

[0068] As Figure 2 shown, according to the embodiment of the present invention, calculating the number of neighbors of the distortion point P in the set P of distortion points to be processed includes: j

[0069] S202, determining the upper left, upper right, lower left, and lower right of the distortion point P j as the traversal directions, and traversing other distortion points in the set P of distortion points to be processed;

[0070] S204, when there are other distortion points in the traversal direction, adding one to the number of neighbors in the traversal direction and ending the traversal of the traversal direction;

[0071] S206, after the traversal ends, counting the number of neighbors in each traversal direction to determine the number of neighbors of the distortion point P j

[0072] It should be noted that for the j-th point P j (j < k 0 , k 0 is the size of the set P of distortion points to be processed) in the set P of distortion points to be processed, it is determined whether there are other distortion points in each traversal direction in turn according to the traversal directions of upper left, upper right, lower left, and lower right. For example, if there are other distortion points above the upper left of the distortion point P j , then the number of neighbors of the distortion point P j is incremented by one, and the search for neighbors in the upper left direction is stopped (that is, the maximum contribution of the number of neighbors in a single direction is 1). Similarly, the upper right, lower left, and lower right of the distortion point P j are processed to judge the number of neighbors in the corresponding directions. Finally, the number of neighbors in each traversal direction is counted to determine the number of neighbors of the distortion point P j

[0073] Among them, the upper left, upper right, lower left, and lower right are the traversal directions preset by the system, and those skilled in the art can set and adjust the traversal directions according to actual needs.

[0074] According to the embodiment of the present invention, calculating the orientation score s of the priority sorting point M i includes:

[0075] Calculating the priority sorting point M i ​​​The Euclidean distance from other prioritized sorting points in the set M of prioritized sorting points, and determine the other prioritized sorting point with the smallest Euclidean distance as the prioritized sorting point M i The first nearest neighbor point A of i , and determine the other prioritized sorting point with the second smallest Euclidean distance as the prioritized sorting point M i The second nearest neighbor point B of i ;

[0076] Calculate the orientation score s of the prioritized sorting point M according to the coordinates of the first nearest neighbor point A and the second nearest neighbor point B i of i ;

[0077] ;

[0078] where, x i and y i are the x - coordinate and y - coordinate of the prioritized sorting point M i respectively, x A and y A are the x - coordinate and y - coordinate of the first nearest neighbor point A of M i respectively, y B and y B are the x - coordinate and y - coordinate of the second nearest neighbor point B of M i respectively.

[0079] It should be noted that for the prioritized sorting point M in the set M of prioritized sorting points i (i < k 1 , k 1 is the size of the set M), input the coordinates of the prioritized sorting point M i and the coordinates of other prioritized sorting points into the Euclidean distance calculation formula, determine the Euclidean distance between the prioritized sorting point M i and each other prioritized sorting point, and respectively determine the other prioritized sorting points with the smallest and the second smallest Euclidean distances as the first nearest neighbor point A and the second nearest neighbor point B. Then input the coordinates of the prioritized sorting point M i , the coordinates of the corresponding first nearest neighbor point A and the coordinates of the corresponding second nearest neighbor point B into the orientation score calculation formula preset in the system, and determine the orientation score s of the prioritized sorting point M i of i .

[0080] Traverse the entire set M of prioritized sorting points to complete the calculation of the first nearest neighbor point, the second nearest neighbor point and the orientation score of all prioritized sorting points.

[0081] Figure 3 shows the flowchart of the orientation limit point determination method provided by the present invention.

[0082] As Figure 3 shown, according to the embodiments of the present invention, according to the prioritized sorting point M iThe azimuth score s and coordinates determine the azimuth limit points, including:

[0083] S302, select the first four points with the smallest azimuth scores from the set M of prioritized points as candidate points;

[0084] S304, determine the first azimuth limit point as the candidate point with the smallest sum of x and y coordinates, and determine the fourth azimuth limit point as the candidate point with the largest sum of x and y coordinates;

[0085] S306, determine the second azimuth limit point as the candidate point with a larger x coordinate among the remaining candidate points, and determine the third azimuth limit point as the candidate point with a smaller x coordinate among the remaining candidate points.

[0086] It should be noted that the sum of the x and y coordinates of the candidate points is obtained by adding the x coordinate value and the y coordinate value of the candidate points.

[0087] According to an embodiment of the present invention, calculating the center point coordinates based on the set M of prioritized points includes:

[0088] Calculating the center point coordinates (x c , y c );

[0089] ;

[0090] ;

[0091] where x max and x min are respectively the maximum and minimum values of the x coordinates in the set M of prioritized points, and y max and y min are respectively the maximum and minimum values of the y coordinates in the set M of prioritized points.

[0092] It should be noted that each prioritized point M i in the set M of prioritized points is traversed in sequence, and the maximum and minimum values of the x coordinates in the set M of prioritized points, as well as the maximum and minimum values of the y coordinates, are respectively determined according to the coordinates (x i , y i , y i ) of the prioritized point M.

[0093] According to an embodiment of the present invention, calculating the restriction coefficient based on the center point coordinates and the coordinates of the azimuth limit points includes:

[0094] According to the center point coordinates (x c , y c ), the coordinates of the first azimuth limit point (x 0 , y 0), the coordinates of the second azimuth limit point (x 1 , y 1 ), the coordinates of the third azimuth limit point (x 2 , y 2 ), and the coordinates of the fourth azimuth limit point (x 3 , y 3 ) to calculate the first limit coefficient e 0 , the second limit coefficient e 1 , the third limit coefficient e 2 , and the fourth limit coefficient e 3 ; ;

[0095] ;

[0096] ;

[0097] .

[0098] It should be noted that each azimuth limit point corresponds to a unique limit coefficient, and the limit coefficient is obtained by calculating the ratio of the difference in the y-coordinate and the difference in the x-coordinate between the center coordinate point and the corresponding azimuth limit point.

[0099] According to the embodiment of the present invention, based on the limit coefficient, the top row point D i and the bottom row point H i are determined from the set M of priority sorting points, including:

[0100] Calculate the limit factor h c , y c ) of the coordinates (x i , y i , y i ) of the priority sorting point M i ;

[0101] ;

[0102] Compare the magnitude relationship between y i and y c ;

[0103] When y i < y c , if both x 1 < x i < x 2 and e 0 < h i < e 1 are satisfied, then the priority sorting point M i is determined as the top row point D i , and the top row point D i is added to the set D of top row points;

[0104] When y i > y c If at the same time x 3 < x i < x 4 and e 2 < h i < e 3 Then the priority sorting point M i is determined as the bottom row point H i The bottom row point H i is added to the bottom row point set H.

[0105] It should be noted that first, according to the coordinate information (including the center point coordinates and the priority sorting point coordinates) and the constraint coefficients (including the first constraint coefficient, the second constraint coefficient, the third constraint coefficient, and the fourth constraint coefficient), the top row sorting point and the bottom row sorting point are determined from the priority sorting point set. Traverse the priority sorting point set M. For the priority sorting point M i in M, by calculating the ratio of the difference in the y - coordinate and the difference in the x - coordinate between the center coordinate point and the priority sorting point M i , the constraint factor h of the priority sorting point M i is determined. Compare the y - coordinate y i of the priority sorting point M i with the y - coordinate y c of the center point. When y i < y c , the top row sorting point judgment is carried out. If the x - coordinate x i of the priority sorting point M i is between the first azimuth constraint point and the second azimuth constraint point (i.e., x 1 < x i < x 2 ), and at the same time e 0 < h < e 1 , then the priority sorting point M i is determined as the top row point D i , and it is added to the top row point set D; otherwise, the priority sorting point M i is not the top row point. When y i > y c , the bottom row sorting point judgment is carried out. If the x - coordinate x i of the priority sorting point M i is between the third azimuth constraint point and the fourth azimuth constraint point (i.e., x 3 < x i < x 4 ), and at the same time e 2 < h < e 3 , then the priority sorting point M iDetermine it as the bottom row point H i and add it to the bottom row point set H.

[0106] According to an embodiment of the present invention, sort the top row point D i and the bottom row point H i , including:

[0107] Sort the top row points D in the top row point set D in ascending order of the x coordinate i ;

[0108] Sort the bottom row points H in the bottom row point set H in ascending order of the x coordinate i ;

[0109] It should be noted that, in ascending order of the x coordinate, further sort the top row point set D and the bottom row point set H respectively to determine the sorting order of the distortion points of the top row and the bottom row.

[0110] The information involved in this application (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) are all authorized by users or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the "coordinates of distortion points in an image" involved in this disclosure are all obtained under full authorization.

[0111] The present invention discloses a method for sorting camera distortion points. The method includes: obtaining the coordinates of distortion points in an image and establishing a set of distortion points to be processed; calculating the number of neighbors of the distortion points in the set of distortion points to be processed; determining the distortion points with the number of neighbors less than a preset number threshold as the priority sorting points and establishing a set of priority sorting points; calculating the azimuth scores of the priority sorting points; determining the azimuth limit points according to the azimuth scores and coordinates of the priority sorting points; calculating the center point coordinates based on the set of priority sorting points; calculating the limit coefficient according to the center point coordinates and the coordinates of the azimuth limit points; determining the top row points and the bottom row points based on the limit coefficient, sorting the top row points and the bottom row points; removing the top row points and the bottom row points from the set of distortion points to be processed, and performing an iterative operation on the updated set of distortion points to be processed to determine the sorting of camera distortion points. The present invention can efficiently and accurately sort camera distortion points, improving the accuracy and reliability of camera calibration.

[0112] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the displayed or discussed components can be through some interfaces. The indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.

[0113] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, each functional unit in the embodiments of the present invention can be fully integrated into a processing unit, or each unit can be separately used as a unit, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional units.

[0115] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments. The foregoing storage media include various media that can store program codes, such as removable storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0116] Alternatively, if the above-mentioned integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The foregoing storage media include various media that can store program codes, such as removable storage devices, ROM, RAM, magnetic disks, or optical discs.

Claims

1. A camera distortion point sorting method, characterized in that: include: Obtain the coordinates of the distorted points in the image and establish a set of distorted points to be processed P; Calculate the distortion point P in the distortion point set P to be processed j The number of neighbors; The distorted points whose number of neighbors is less than the preset threshold are determined as the priority points M. i , establish a priority point set M; Calculate the priority point M i The orientation score s; According to the priority point M i The orientation score s and coordinates determine the orientation restriction point; The orientation restriction points include a first orientation restriction point, a second orientation restriction point, a third orientation restriction point and a fourth orientation restriction point; Calculate the coordinates of the center point based on the priority point set M; Calculate the restriction coefficients according to the coordinates of the center point and the coordinates of the azimuth restriction point; the restriction coefficients include a first restriction coefficient, a second restriction coefficient, a third restriction coefficient and a fourth restriction coefficient; Determine the top row point D from the prioritized point set M based on the restriction coefficient i and bottom row point H i , for the top row point D i and bottom row point H i Sorting; From the set of distorted points to be processed P, the top row points D i and bottom row point H i Eliminate and iteratively sort the updated set of distortion points to be processed P to determine the order of camera distortion points; The calculation priority point M i The orientation score s includes: Calculate the priority point M i The Euclidean distance of other priority points in the priority point set M is used to determine the other priority points with the smallest Euclidean distance as the priority point M. i The first nearest neighbor point A is determined as the priority point M. i The second nearest neighbor point B; Calculate the priority point M based on the coordinates of the first nearest neighbor point A and the second nearest neighbor point B i The orientation score s; Among them, x i and i They are the priority points M i The x- and y-coordinates of A and A M i The x-coordinate and y-coordinate of the first nearest neighbor point A, x B and B M i The x-coordinate and y-coordinate of the second nearest neighbor point B; The priority order point M i The orientation score s and coordinates of the orientation restriction points are determined, including: Select the first four points with the smallest orientation scores from the priority point set M as candidate points; The x, y coordinates and the smallest candidate point are determined as the first orientation restriction point, and the x, y coordinates and the largest candidate point are determined as the fourth orientation restriction point; Determine the candidate point with a larger x coordinate among the remaining candidate points as the second orientation restriction point, and determine the candidate point with a smaller x coordinate among the remaining candidate points as the third orientation restriction point; The calculating of the restriction coefficient according to the coordinates of the center point and the coordinates of the orientation restriction point includes: According to the center point coordinates (x c ,y c ), the first orientation limit point coordinates (x0, y0), the second orientation limit point coordinates (x1, y1), the third orientation limit point coordinates (x2, y2) and the fourth orientation limit point coordinates (x3, y3) calculate the first limit coefficient e0, the second limit coefficient e1, the third limit coefficient e2 and the fourth limit coefficient e3; The top row point D is determined from the priority point set M based on the restriction coefficient. i and bottom row point H i ,include: According to the center point coordinates (x c ,y c ) Calculate the priority point M i The coordinates (x i ,y i )'s limiting factor h i ; Compare i and c The size relationship of When y i <y c When, if x1 < x i <x2 and e0 < h i <e1 are satisfied simultaneously, then the priority sorting point M i is determined as the top row point D i and the top row point D i is added to the top row point set D; When y i > y c If at the same time x3 < x i < x4 and e2 < h i < e3, then the priority sorting point M i Is determined as the bottom row point H i The bottom row point H i Is added to the bottom row point set H 2. The camera distortion point sorting method according to claim 1, characterized in that: The calculation of the distortion point P in the distortion point set P to be processed j The number of neighbors, including: The distortion point P j The upper left, upper right, lower left and lower right of are determined as traversal directions, and other distorted points in the set of distorted points to be processed P are traversed; When there are other distortion points in the traversal direction, the number of neighbors in the traversal direction is increased by one, and the traversal in the traversal direction is terminated; When the traversal is completed, count the number of neighbors in each traversal direction to determine the distortion point P j The number of neighbors.

3. The camera distortion point sorting method according to claim 1, characterized in that: The calculating of the center point coordinates based on the priority sorted point set M includes: Calculate the center point coordinates (x c ,y c ); Among them, x max and x min are the maximum and minimum values ​​of the x coordinates in the priority sorting point set M, and y max and min are the maximum and minimum values ​​of the y coordinates in the priority sorting point set M, respectively.

4. The camera distortion point sorting method according to claim 1, characterized in that: The top row of points D i and bottom row point H i Sorting, including: According to the x coordinate from small to large, the top row point D in the top row point set D i Sort by According to the x coordinate from small to large, the bottom row point H in the bottom row point set H i Sort.

Citation Information

Patent Citations

  • Intelligent aerial photographing system

    CN105872413A

  • A method for automatic analysis of geometric distortion of point maps for objective evaluation of image quality

    CN109461123A