Distortion center driving and UFED-COA-based three-dimensional scanner camera calibration method and system

By optimizing camera parameters through distortion center driving and the UFED-COA algorithm, the problems of noise and distortion in corner detection are solved, achieving high-precision camera calibration suitable for visual measurement and 3D reconstruction.

CN121661155APending Publication Date: 2026-03-13GUILIN UNIVERSITY OF TECHNOLOGY +1
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing camera calibration algorithms are easily affected by noise and distortion when detecting corners, resulting in low calibration accuracy and slow convergence speed. In particular, it is difficult to obtain stable camera intrinsic and extrinsic parameters in complex environments.

Method used

By calculating the sub-pixel coordinates of the distortion center and corner points, using a sliding window to filter the anchor point set, and combining the UFED-COA algorithm to optimize camera parameters, the population position is updated using uniform initialization and fitness distance balancing mechanisms to suppress noise and improve calibration accuracy.

Benefits of technology

It significantly reduces reprojection error, improves the accuracy and stability of camera calibration, and can provide high-quality visual measurement and 3D reconstruction input in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661155A_ABST
    Figure CN121661155A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional scanner camera calibration method and system based on distortion center driving and UFED-COA. The method comprises the following steps: S1, calculating coordinates of a distortion center based on a checkerboard image; s2, extracting sub-pixel coordinates of checkerboard angular points from the checkerboard image by using an angular point detection algorithm, and calculating a radial distance and a radial distortion difference value of each angular point relative to a distortion center; s3, preliminarily screening candidate points through a sliding window, and determining an anchor point set; s4, determining weight coefficients of non-anchor points based on the anchor point set; s5, performing weighted polynomial fitting by using the weight coefficients of the non-anchor points, and updating the coordinates of the angular points; s6, optimizing camera parameters based on a UFED-COA algorithm, performing initial calibration by using the updated angular point coordinates, updating a population position by combining uniform initialization and a fitness distance balance mechanism, and minimizing a re-projection error; according to the method, the camera parameters are optimized through distortion center driving and anchor point weighted smoothing corner noise suppression in combination with the UFED-COA algorithm, and high-precision camera calibration is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and more specifically to a method and system for calibrating 3D scanner cameras based on distortion center driving and UFED-COA. Background Technology

[0002] Camera calibration is a technique for determining the intrinsic and extrinsic parameters of a camera by calibrating an object. It is a crucial technology in computer vision and is widely used in 3D reconstruction, autonomous driving, industrial manufacturing, and distortion correction. A camera model is typically viewed as a pinhole model with distortion. In this model, the projection transformation can be represented using intrinsic and extrinsic parameter matrices and distortion parameters. Calibration involves calculating these parameters, where the intrinsic parameter matrix and distortion coefficients are constant within the same camera.

[0003] Currently, commonly used calibration algorithms include traditional 3D calibration methods, self-calibration algorithms, and Zhang Zhengyou calibration methods. Traditional 3D calibration algorithms require high-precision 3D calibration objects, which are costly to manufacture, involve complex processes, and have high requirements for the shooting environment. Self-calibration algorithms offer the best flexibility, eliminating the need for calibration boards and allowing calibration based on scene objects, but their calibration accuracy is lower. Zhang Zhengyou calibration, a classic method based on a 2D planar target, boasts high accuracy, robustness, and other advantages, making it the most widely used calibration algorithm. A black and white checkerboard is a commonly used 2D calibration object. Camera parameters are solved based on the relationship between the known checkerboard corner coordinates and world coordinates. The world coordinates are determined by the checkerboard size, while the accuracy of corner detection directly affects the subsequent calculation of calibration parameters. Corner detection algorithms can be divided into edge-based and grayscale-based methods. The former calculates corners using edge variations in the image, while the latter calculates directly on the grayscale image without edge detection. Both methods typically rely on the gradient change of grayscale values ​​when performing corner subpixelation, but inaccurate gradient direction calculation usually causes large errors, especially when there is noise in the image.

[0004] Currently, much research has been conducted on the application of particle swarm optimization (PSO), genetic algorithms, and other intelligent optimization algorithms and their variants to nonlinear optimization problems in camera calibration. L. Deng proposed the DEPSO hybrid optimization algorithm, which combines differential evolution and PSO to improve global search capabilities and obtain more robust calibration results. Liu et al. used absolute quadratic curves to parameterize the initial camera parameters and then refined the calibration results by iteratively solving for the optimal solutions of intrinsic and extrinsic parameters through nonlinear optimization. Another study employed the Levenberg-Marquardt iterative algorithm to construct an objective function that includes distortion parameters, further enhancing the accuracy and robustness of the calibration. Duan et al. proposed a novel nonlinear optimization criterion for camera distortion correction, simplifying the traditional calibration process by avoiding global nonlinear optimization of intrinsic and extrinsic parameters. Lü et al. introduced an adaptive weighting mechanism and an improved PSO algorithm to reduce reprojection errors by optimizing camera parameters. However, improvements are still needed in calibration accuracy and convergence speed.

[0005] Existing corner detection algorithms rely solely on image features to calculate corner coordinates, which has limitations for the checkerboard pattern used in camera calibration. To address this, we quantitatively analyze the factors causing corner errors and effectively eliminate noise beyond distortion by calculating the difference between the actual and ideal corners, improving corner accuracy without affecting the initial distortion estimation. For the nonlinear parameter optimization problem, we propose the UFED-COA algorithm to further optimize the results and improve camera calibration accuracy even more effectively. The traditional COA algorithm is an excellent swarm intelligence optimization algorithm, but its random initialization and reliance solely on fitness scores limit its search capability. Therefore, we introduce uniform initialization of the spatial population and fitness distance balancing into this algorithm to enhance its global exploration ability. Summary of the Invention

[0006] The purpose of this invention is to provide a 3D scanner camera calibration method and system based on distortion center driving and UFED-COA. By using distortion center driving and anchor point weighted smoothing to suppress corner noise, combined with the UFED-COA algorithm to optimize camera parameters, high-precision camera calibration can be achieved.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A 3D scanner camera calibration method based on distortion center driving and UFED-COA includes the following steps: S1. Use an optical scanner platform to acquire a checkerboard image and calculate the coordinates of the distortion center in the checkerboard image; S2. Use a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the chessboard from the chessboard image, and calculate the radial distance of each corner point relative to the distortion center and the radial distortion difference. S3. Based on radial distortion, candidate points are initially screened through a sliding window, the coefficient of variation is calculated, and the anchor point set is determined. S4. Based on the anchor point set, calculate the spatial similarity and numerical similarity between non-anchor points and anchor points to determine the weight coefficient of non-anchor points. S5. Use the weighting coefficients of non-anchor points to perform weighted polynomial fitting, and update the corner coordinates to suppress noise. S6. Optimize camera parameters based on the UFED-COA algorithm, use the updated corner coordinates for initial calibration, and update the population position by combining uniform initialization and fitness distance balancing mechanism to minimize reprojection error.

[0008] Furthermore, the calculation of the S1, the coordinates of the distortion center, is specifically as follows: make , ; in, It is a matrix obtained by using the coordinates of points in the image and their corresponding world coordinates. It is grouped by column vector. They represent No. Column and number Column elements, The letters in the middle are intermediate variables, representing a matrix. H A vector composed of the elements in the middle; According to formula (3), we can obtain ; (3) make The distortion center can be initially obtained according to formula (4). ;

[0009] in, These are the normalized focal lengths along the camera's x and y axes, respectively. This represents the tilt factor, which describes the installation error of the camera sensor chip.

[0010] Furthermore, the process of calculating the coefficient of variation and determining the anchor point set in S3 is as follows: set up These are pixel coordinates under ideal conditions. Pixel coordinates affected only by lens distortion, and In a typical optical camera model, the relationship between the two is shown in equation (5): (5) in, Radial distortion coefficient; This refers to the corner coordinates affected by both environmental noise and lens distortion; while This refers to the corner coordinates when they are unaffected by environmental noise and lens distortion. , , The radial distance is , , , respectively represent the corner points with no distortion and noise, the corner points with no noise only affected by distortion, and the distance of the actual detected corner point coordinates from the distortion center; but , , The relationship between them is expressed by formula (6); determine the distortion center. e Then, the radial distance between the ideal corner point and the actual corner point can be determined. ; (6) Due to the influence of noise, and The following relationship exists between them: ; Define a sliding window ,like Then the window radius is continuously expanded in the sliding window. Zhongruo If the point is an anchor point, then that point is considered an anchor point; calculations are performed within the window. mean and standard deviation Then, the coefficient of variation is calculated according to formula (7). ; (7) This refers to the distance error caused by environmental noise; if The points within that window are the points we are looking for. To further improve the accuracy of the anchor points, we perform polynomial fitting on the initially selected anchor points and update each point accordingly. To improve its accuracy, all reference points are ultimately used to form the anchor point set B.

[0011] Furthermore, S4, based on the anchor point set, calculates the spatial similarity between non-anchor points and anchor points, and determines the weight coefficients of non-anchor points in the following specific steps: Set data points and anchor points Their spatial similarity The calculation method is shown in formula (8). (8) in It is the radius of influence, used to control the range of influence of the benchmark point. The larger the value, the wider the range of influence, and points that are farther away from it will obtain a larger similarity value. Numerical similarity The calculation method is shown in formula (9), where It is all Standard deviation of the value Used to control the rate at which numerical similarity decreases as numerical differences increase; (9) The similarity between a single point and each reference point is the product of the two, and the final weight of each point is... The average similarity with all reference points is calculated as shown in formula (10), and then normalized to... To enhance its stability within the range; (10).

[0012] Furthermore, in step S5, the process of using the weight coefficients of non-anchor points to perform weighted polynomial fitting and updating the corner coordinates to suppress noise is as follows: According to each , and their corresponding weights The polynomial is fitted using the minimum weighted sum of squared residuals, and its calculation formula is as follows: (11) Determine the corrected model based on the fitted polynomial model. This allows us to determine the radial distance of the corner point when it is affected only by distortion and not by noise. Finally, the coordinates of the actually detected corner points are updated to eliminate the influence of noise and obtain the final result. The calculation formula is as follows: (12).

[0013] Furthermore, in step S6, the population position is updated by combining uniform initialization and a fitness distance balancing mechanism; specifically: S61. Find all values ​​less than M prime numbers ;in M It refers to the size of the population; S62, Utilize all less than M Construct a uniform array of prime numbers. j The column, expressed as: (15) S63, Set From all less thanM prime numbers The number of randomly selected variables in the matrix is ​​used to construct a uniform matrix. ; S64. After using the uniform matrix, generate the population individuals uniformly distributed in the solution space according to formula (2): (16) in, and It is the individual variable number Maximum and minimum values ​​of each dimension; S65. After initializing the population, use the objective function to calculate the fitness of all candidate individuals. And the best fitness The individual's location is used as the target location. ; A hierarchical search strategy is employed, and the population is divided into two equal subpopulations, with individuals represented as follows: , Each subpopulation moves towards the target location and searches its surrounding space. The first subpopulation employs a guided search strategy based on the current best individual, which allows it to quickly approach the optimal solution region in the early stages. Its movement strategy is as follows: yes A random number within the interval, yes A random integer; (17) The second subpopulation employs an adaptive search strategy based on a global objective to enhance its local exploration capabilities; this first requires introducing new target locations. The calculation method is shown in formula (18), and then the individual movement strategy of formula (19) is used for updating. (18) (19) After all individuals in the population have moved once, their fitness is used to determine whether to replace their previous positions. If the new fitness is less than the previous fitness, the position is updated; otherwise, no position update is performed. Then, all individuals in the population are perturbed, and their fitness is recalculated. If any individual in the population has a fitness that satisfies the previous fitness, the position is updated. Then update it to make This completes one iteration; the perturbation formula is as shown in formula (20). (20) Individuals in the candidate solution are represented by variables as ,in The dimension of the individual vector is represented as the candidate solution population. The objective function for calculating fitness is defined as follows: The fitness of all individuals in the population corresponding to the variable is Then, the fitness is normalized using formula (21): (twenty one) in, norm This refers to the normalization operation; Calculate the distance between candidate solutions and the optimal solution using Euclidean distance. As shown in formula (22): (twenty two) In calculating the similarity score, a weighted normalized distance and fitness score are used to calculate the similarity score for each candidate solution. The calculation method is shown in formula (23); (twenty three) The spatial location of the candidate with the highest score is ultimately used as the reference location for individual movement.

[0014] The present invention also provides a system for performing a 3D scanner camera calibration method based on distortion center driving and UFED-COA, comprising: Distortion center calculation module, coordinate; The corner noise suppression module uses a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the checkerboard image, and calculates the radial distance and radial distortion of each corner point relative to the distortion center. Candidate points are initially screened using a sliding window, the coefficient of variation is calculated, the anchor point set is determined, and the anchor point positions are updated using polynomial fitting. Based on the anchor point set, the spatial similarity between non-anchor points and anchor points is calculated to determine the weight coefficient of non-anchor points; We use the weighting coefficients of non-anchor points to perform weighted polynomial fitting and update the corner coordinates to suppress noise. The parameter optimization module optimizes camera parameters based on the UFED-COA algorithm, uses the updated corner coordinates for initial calibration, and updates the population position by combining uniform initialization and fitness distance balancing mechanisms to minimize reprojection error.

[0015] The present invention also provides a computer-readable storage medium storing a computer program, characterized in that, when the program is executed by a processor, it implements the steps of a 3D scanner camera calibration method based on distortion center driving and UFED-COA.

[0016] According to specific embodiments provided by the present invention, the present invention has the following technical effects compared to the prior art: This invention lays a precise geometric foundation for subsequent analysis by calculating the distortion center and sub-pixel coordinates of corner points. It effectively eliminates noise and outliers by using a sliding window and coefficient of variation to select a high-quality anchor point set. Furthermore, it intelligently optimizes corner point coordinates through spatial similarity weighting of non-anchor points and polynomial fitting, further suppressing measurement noise. Finally, it iterates camera parameters using the UFED-COA optimization algorithm and the updated corner point coordinates. This invention not only significantly reduces reprojection errors but also avoids local optima through uniform initialization and fitness distance balancing mechanisms, thus obtaining stable and reliable intra-camera distortion parameters even in complex environments. This provides high-quality input for advanced applications such as visual measurement and 3D reconstruction. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] The following description, in conjunction with the accompanying drawings, further illustrates the 3D scanner camera calibration method and system based on distortion center driving and UFED-COA of the present invention; Figure 1 This is a schematic diagram of the overall process of the 3D scanner camera calibration method based on distortion center driving and UFED-COA in Embodiment 1 of the present invention; Figure 2 This is a diagram of the camera imaging model in Embodiment 1 of the present invention; Figure 3 This is a diagram illustrating the effect of lens distortion on the corner positions of the chessboard grid in Embodiment 1 of the present invention; wherein... A schematic diagram showing that the principal point of an object coincides with the center of a chessboard grid; A diagram showing the center of a chessboard square deviating from the main point; Figure 3 In the diagram, circles represent the principal points of objects, squares represent ideal (noise-free, distortion-free) checkerboard corner positions, and crosses represent checkerboard corner positions where only distortion exists. Figure 4 This is a flowchart of the UFED-COA algorithm in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the optical scanner used in the calibration experiment in Embodiment 2 of the present invention; Figure 6 This is a diagram showing the radial distortion value and radial position distribution of the original corner point in Embodiment 2 of the present invention; Figure 7This is a schematic diagram of anchor point detection in Embodiment 2 of the present invention; wherein the discrete points are the detected anchor points, and the points on the curve are the fitted points; Figure 8 This is a schematic diagram of radial distortion distance noise reduction in Example 2; Figure 9 shows the distribution of the difference between the angular coordinates and the ideal coordinates under different noise conditions in Example 2; where (a) represents the difference between the angular coordinates affected by noise and distortion and the ideal coordinates unaffected by distortion and noise; and (b) represents the difference between the angular coordinates affected only by distortion (after denoising) and the ideal coordinates. Figure 10 This is a schematic diagram of camera parameter optimization in Example 2. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0020] To better understand the purpose, structure, and function of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0021] Example 1 Camera calibration is the process by which a camera calculates its parameters by photographing a calibration plate of a defined shape. It uses a mathematical model to model the camera and solves for the camera parameters based on the correspondence between points in the image coordinate system and the three-dimensional spatial coordinate system. When using a camera to photograph objects in the world coordinate system, such as... Figure 2 As shown, a point in the world coordinate system First, it is transformed into a point in the camera coordinate system through a rigid body transformation. Then according to the following Figure 2 The pinhole imaging principle shown will point Convert to the corresponding pixel coordinates in the image coordinate system The transformation process between the three-dimensional world coordinate system and the image pixel coordinate system is shown in formula (1). (1) in, express The rotation matrix, express The translation vector, The physical focal length of a camera lens is typically measured in millimeters (mm). and It is the image sensor in direction and The physical size of each pixel in the direction, in mm / px. It is the optical center of the camera.

[0022] When calibrating a camera using a two-dimensional plane calibration object such as a black and white checkerboard, the Z-axis coordinate of the checkerboard corner point in the world coordinate system is 0. At this time, the corner point... Convert from world coordinates to pixel coordinates The conversion process is shown in formula (2).

[0023]

[0024] It is a homography matrix that describes the midpoint of the world coordinate system. The corresponding point in the image after perspective transformation The transformation relationship between them is such that the only difference before and after the transformation lies in the scaling factor. Representing coordinate vectors in two-dimensional space Setting the third value of the axis to 1 makes it easy to ignore the scale during the transformation process. The influence of Zhang's calibration method on homography. This is a prerequisite for subsequent camera calibration. The rigid body transformation from world coordinates to camera coordinates and the coordinate transformation matrix from camera coordinates to digital images based on the pinhole imaging principle are equivalent to the homography transformation matrix, which can be solved using direct linear transformation (DLT). This method requires at least four point pairs. Homography transformation can represent a combination of rotation, translation, scaling, shearing, and perspective effects. Therefore, to avoid the influence of noise and distortion, a normalization method is used to solve it. To obtain more robust results.

[0025] Therefore, as Figure 1 As shown, this invention provides a 3D scanner camera calibration method based on distortion center driving and UFED-COA, including the following steps: S1. Calculate the coordinates of the distortion center based on the checkerboard image; The calculation of the distortion center coordinates, S1, is as follows: make , ; in, It is a matrix obtained by using the coordinates of points in the image and their corresponding world coordinates. It is grouped by column vector; complete. , They represent No. Column and number Column elements, They represent No. Column and number Column elements, The letters in the middle are intermediate variables, representing a matrix. H A vector composed of the elements in the middle; The first subscript in the text refers to the matrix. The index indicates the column number of an element, and the second subscript indicates the element's position within that column. If it appears alone, for example... The first column element represents a column vector, while... It is the first element in the first column. The letters in the middle are intermediate variables, representing a matrix. H The vector formed by the elements in the middle has no practical meaning; the subscript indicates the vector it constitutes. V The elements in the matrix H The position in the middle.

[0026] According to formula (3), we can obtain ; (3) in, B Represents a vector. b Indicates the elements, B It has no specific meaning; it's just for establishing equations, equivalent to an unknown in an equation. x In formula (3), according to H It can be confirmed V The value at this time B It is an unknown variable to be solved, which can be obtained from the equation. B The result is a vector ,b This represents the elements in the vector.

[0027] make The distortion center can be initially determined according to formula (4). ;

[0028] in, These are the normalized focal lengths along the camera's x and y axes, respectively. This represents the tilt factor, which describes the mounting error of the camera sensor chip; it is typically 0.

[0029] S2. Use a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the chessboard image, and calculate the radial distance and radial distortion of each corner point relative to the distortion center. In this embodiment, a corner detection algorithm is used to extract sub-pixel corner coordinates from the corner points of the chessboard. And use according to formula (2) and Construct a system of equations and solve it. Then according to and Recalculate the coordinates of the checkerboard grid in pixel coordinates , It is considered an ideal coordinate system, unaffected by distortion and noise. Under ideal conditions with no noise and distortion... However, in reality, it is affected by camera lens distortion, corner detection errors, and other noise within the imaging system. and They are not equal, but lens distortion can be modeled using a digital model.

[0030] A camera distortion model is a mathematical model describing the geometric deformation of an image caused by optical and physical factors during the imaging process of a real camera lens. Due to lens design, manufacturing errors, or installation deviations, the actual captured image will deviate from the ideal pinhole imaging model; this deviation is called distortion. Camera distortion includes radial distortion and tangential distortion. Tangential distortion is caused by the non-parallelism between the lens and the sensor. However, with advancements in manufacturing technology, the tilt angle between them can be ignored, especially in industrial cameras used for 3D scanners where they are almost perfectly parallel. Therefore, radial distortion dominates the distortion category and is determined by the physical properties of the lens. Radial distortion in ordinary cameras is usually described as a low-order polynomial model using two coefficients.

[0031] S3. Initially screen candidate points using a sliding window, calculate the coefficient of variation, and determine the anchor point set; Step S3, calculating the coefficient of variation and determining the anchor point set, specifically involves: set up These are pixel coordinates under ideal conditions. Pixel coordinates affected only by lens distortion, and In a typical optical camera model, the relationship between the two is shown in equation (5). (5) in, Radial distortion coefficient; This refers to the corner coordinates affected by both environmental noise and lens distortion; while This refers to the corner coordinates when they are unaffected by environmental noise and lens distortion. , , The radial distance is , , , respectively represent the corner points with no distortion and noise, the corner points with no noise only affected by distortion, and the distance of the actual detected corner point coordinates from the distortion center; The corner pixel coordinates are extracted from the image captured by the camera. In reality, the position of the point coordinates is affected by two factors: environmental noise and lens distortion. This refers to the coordinates of a corner point when it is affected by two factors; while This refers to the coordinates of the corner point when it is not affected by the two factors mentioned above.

[0032] but , , The relationship between them is expressed by formula (6); determine the distortion center. e Then, the radial distance between the ideal corner point and the actual corner point can be determined. ; (6) Due to the influence of noise, and The following relationship exists between them: The presence of noise not only affects the initial calibration accuracy of the camera, but also makes the final optimization difficult. Lens distortion can be represented using a polynomial model, but the corner detection error caused by noise cannot be quantitatively analyzed. To minimize the impact of corner detection error during the calibration phase, we propose a noise reduction method based on camera imaging principles. Corner distortion follows two rules: first, its degree of distortion is related to its distance from the principal point, and their monotonicity is the same; second, if the distance between the corner point and the principal point is the same, the degree of distortion is also the same. The relationship between the degree of corner distortion and the distance from the principal point is as follows: Figure 3 As shown.

[0033] Based on the above rules, let ,but and The relationship between them can be represented by a monotonic polynomial function, and the calculation Simultaneously sort in ascending order and index the corresponding... The value is stored in the matrix. In the middle. Due to noise interference, It does not satisfy monotonicity. To address this, an anchor-driven weighted polynomial fitting method is proposed, which consists of three steps: anchor detection, weight calculation, and weighted polynomial fitting.

[0034] Two corner points that are equidistant radially do not belong to the same location in space; define a sliding window. ,like Then the window radius is continuously expanded in the sliding window. Zhongruo If the point is an anchor point, then it can be considered an anchor point; calculate within the window. mean and standard deviation Then, the coefficient of variation is calculated according to formula (7). ; (7) This refers to the distance error caused by environmental noise; if The points within that window are the points we are looking for. To further improve the accuracy of the anchor points, we perform polynomial fitting on the initially selected anchor points and update each point accordingly. To improve its accuracy, all reference points are ultimately used to form the anchor point set B.

[0035] S4. Based on the anchor point set, calculate the spatial similarity between non-anchor points and anchor points to determine the weight coefficient of non-anchor points; S4, based on the anchor point set, calculates the spatial similarity between non-anchor points and anchor points, and determines the weight coefficients of non-anchor points in the following specific steps: Guided by the baseline point set B, a spatial-numerical bimodal similarity metric function is constructed, and the weight coefficients of other points are calculated. Let the data points... and anchor points Their spatial similarity The calculation method is shown in formula (8). (8) in It is the radius of influence, used to control the range of influence of the benchmark point. The larger the value, the wider the range of influence, and points that are farther away can also obtain a larger similarity value. Numerical similarity The calculation method is shown in formula (9), where It is all Standard deviation of the value Used to control the rate at which numerical similarity decreases as numerical differences increase; (9) The similarity between a single point and each reference point is the product of the two, and the final weight of each point is... The average similarity with all reference points is calculated as shown in formula (10), and then normalized to... To enhance its stability within the range; (10) S5. Use the weighting coefficients of non-anchor points to perform weighted polynomial fitting, and update the corner coordinates to suppress noise. In step S5, the process of using the weighted polynomial fitting of non-anchor point weight coefficients to update corner point coordinates to suppress noise is as follows: According to each , and their corresponding weights The polynomial is fitted using the minimum weighted sum of squared residuals, and its calculation formula is as follows: (11) Then, based on the fitted polynomial model, the corrected model can be determined. This allows us to determine the radial distance of the corner point when it is affected only by distortion and not by noise. Finally, the coordinates of the actually detected corner points are updated to eliminate the influence of noise and obtain the final result. The calculation formula is as follows: (12).

[0036] S6, such as Figure 4 As shown, the camera parameters are optimized based on the UFED-COA algorithm, the updated corner coordinates are used for initial calibration, and the population position is updated by combining uniform initialization and fitness distance balancing mechanism to minimize reprojection error.

[0037] This embodiment is specifically as follows: After obtaining the optimized checkerboard corner coordinates, the Zhang Zhengyou camera calibration method was used to calculate the initial camera parameters, including intrinsic and extrinsic parameters. This calibration method solves for the camera parameters using a linear model, but the actual camera model is nonlinear. To further optimize the camera calibration parameters, maximum likelihood estimation (MLE) was used to optimize the intrinsic and lens distortion parameters, which determine the camera model. Assume the number of captured checkerboard images is... The number of corner points in each image is Therefore, the camera parameters can be solved by maximizing the likelihood function and minimizing the objective function in formula (13), where Represents the actual corner coordinates. Indicates the reprojection coordinates. Principal point coordinates The focal lengths in the horizontal and vertical directions of the image. The radial distortion coefficient is... This is the extrinsic parameter matrix.

[0038]

[0039] The Coati Optimization Algorithm (COA), similar to the Particle Swarm Optimization (PSO) algorithm, belongs to the category of metaheuristic swarm intelligence nonlinear optimization algorithms. This algorithm is inspired by the behavior of raccoons hunting prey and avoiding predators. Based on the COA algorithm, the UFED-COA algorithm is proposed. In the initial stage and the population search stage, uniform initialization of the species space and adaptive distance balancing are used to improve the algorithm's ability to search for the global optimal solution.

[0040] Population initialization: The initial camera calibration intrinsic parameters serve as the center values ​​for individual population initialization, defining the range of population initialization. Simultaneously, small upper and lower deviation ranges are set for each component of the individual, and the upper and lower limits of the population are determined accordingly. Individual The size is ,in Indicates population size, The individual dimension is represented as shown in formula (14). Each individual is a candidate solution to the optimization problem, with its initial value being a suboptimal solution. It consists of a random number within the upper and lower limits. Appropriate upper and lower limits and population size can speed up the convergence speed and obtain more accurate parameters. yes A vector, where each value of the vector is... Within a certain range, it is used to represent the upper and lower deviations of each parameter.

[0041] (14) Random initialization is a commonly used population initialization method, which has relatively low computational cost and high flexibility. However, randomly initialized points may be unevenly distributed, especially in high-dimensional spaces, where randomly generated points may cluster in some regions while being sparse in others. This uneven distribution can affect the global search capability of the optimization algorithm, leading to local optimum traps. Furthermore, the initial points may not be in optimal regions, requiring a longer convergence time to the global optimum, a problem that becomes more pronounced when the objective function is complex. Uniform Initialization (UED) is a spatial filling method that generates uniformly distributed points within a given spatial range. These points ensure high uniformity throughout the search space, helping the optimization algorithm explore a wider area and thus improving the global search performance. Simultaneously, multidimensional projection considers different dimensions in space, ensuring a more uniform distribution of points across different dimensions, resulting in better coverage and exploration capabilities in high-dimensional spaces.

[0042] The spatial population uniform initialization algorithm defines a uniform array as... ,in n Indicates the number of factors. q Indicates the number of levels. When given...n and q At that time, it can be done by... q n Select from the combinations M The population is constructed using a combination of species, and the algorithm flow is as follows: S61. Find all values ​​less than M prime numbers ;in M It refers to the size of the population; S62, Utilize all less than M Construct a uniform array of prime numbers. j The column, expressed as: (15) S63, Set From vector The number of randomly selected variables, constructing a uniform matrix ; S64. After using the uniform matrix, generate population individuals uniformly distributed in the solution space according to formula (2). (16) in, and It is the individual variable number j Maximum and minimum values ​​of each dimension; In the target search phase, besides the search strategy, the population space search reference position determined by the candidate member positions is also an important factor affecting algorithm performance. In the native raccoon optimization algorithm, after initializing the population individuals, the fitness of all candidate individuals is calculated using the objective function. And the best fitness The individual's location is used as the target location. Next, a hierarchical search strategy was adopted, and the population was divided into two equal subpopulations, with their individuals represented as follows: , Each subpopulation moves towards the target location and searches its surrounding space. The first subpopulation employs a guided search strategy based on the current best individual, which allows it to quickly approach the optimal solution region in the early stages. Its movement strategy is as follows: yes A random number within the interval, yes A random integer.

[0043] (17) The second subpopulation employs an adaptive search strategy based on a global objective to enhance its local exploration capabilities. This first requires introducing new target locations. The calculation method is shown in formula (18), and then the individual movement strategy of formula (19) is used for updating.

[0044] (18) (19) After all individuals in the population have moved once, whether to replace their previous positions with the new ones is usually determined by their fitness. If the new fitness is less than the previous fitness, then the position is updated; otherwise, no position update is performed. Afterward, all individuals in the population are perturbed using the following formula. After the perturbation, their fitness is recalculated. If any individual in the population has a fitness that satisfies the condition... Then update it to make This completes one iteration.

[0045] (20) Fitness scores are calculated using an objective function, but they typically don't consider distance factors. Two candidate solutions, located at different positions from the current best solution, may have the same fitness score, both better than the current best individual. However, positions farther from candidate solutions usually drive population updates more effectively. The Fitness Distance Balancing (FDB) algorithm is a novel member selection method. It uses fitness calculations to optimize the selection process of metaheuristic search algorithms. Focusing only on candidate solutions near the best solution can easily lead to local optima. FDB balances fitness and distance, combining an individual's fitness with the distance to the current best solution to determine a reference position. This avoids the local optima convergence that can result from relying solely on fitness and the slow convergence speed caused by randomly generating positions in the search space, while also ensuring sufficient exploration of the search space.

[0046] Individuals in the candidate solution are represented by variables as ,in The dimension of the individual vector is represented as the candidate solution population. The objective function for calculating fitness is defined as follows: The fitness of all individuals in the population corresponding to the variable is Then, the fitness is normalized using the following formula: (twenty one) Here, norm refers to the normalization operation; when the optimization algorithm solves for the objective value, there are two cases depending on the objective function: one is to find the maximum value; and the other is to find the minimum value.

[0047] Common methods for calculating distances include Euclidean distance, Manhattan distance, and Chebyshev distance. This paper uses Euclidean distance for calculation, which determines the distance between candidate solutions and the optimal solution. The calculation is shown in the formula.

[0048] (twenty two) In order to prevent distance and fitness scores from dominating each other during the calculation of similarity scores, weighted normalized distance and fitness scores are used to calculate the similarity score of each candidate solution. The calculation method is shown in formula (23).

[0049] (twenty three) The spatial location of the candidate with the highest score is ultimately used as the reference location for individual movement. The complete UFED-COA algorithm flow is as follows: Figure 4 As shown.

[0050] Example 3 This invention further provides an experimental environment for conducting experiments using the 3D scanner camera calibration method based on distortion center driving and UFED-COA described in Example 1: In the experiment, a planar checkerboard grid was used for calibration to verify the effectiveness of the method. The equipment used in this experiment included an optical scanner equipped with an industrial camera. Figure 5 As shown in (a), the calibration target used was a GP200 alumina glass checkerboard pattern, consisting of 12 rows and 9 columns, with a grid size of 15 mm. The computer used in the experiment operated on Windows 10, had a 2.9 GHz CPU, 16 GB of memory, and used MATLAB R2023b as the software platform. Theoretically, using Zhang's calibration method to solve for the camera's initial parameters requires three images of the chessboard taken from different angles. However, in practice, about ten images are needed to obtain a more robust initial solution. We place the chessboard on the scanner's stage and take 10 images of the chessboard from different angles by rotating the stage. The resolution of each image is [resolution missing]. Images taken such as Figure 5 As shown in (b), the Harris-Stephens corner detection method is then used to extract the sub-pixel corner coordinates of each chessboard image. This yields 880 coordinate points. Using... The initial distortion center was calculated to be (1249.7, 882.2). Then, the coordinates of each corner point were calculated. Its coordinate graph is as follows Figure 6 As shown.

[0051] Next, anchor points need to be found from these points within the same window. The difference between Set to 3 pixels, threshold for After initially identifying the anchor points, a polynomial was used to fit them for further correction, resulting in the final anchor point set. ,like Figure 7 As shown; then, the weights of other points are calculated based on the anchor point and fitted, finally obtaining the radial distance. Radial distortion distance after noise reduction and The difference between ,like Figure 8 As shown.

[0052] According to formula (12) in Example 1, it is possible to... Update to obtain The corner coordinates before and after the update are shown in Table 1. The formula was used to calculate the coordinates of each image. and with ideal coordinates The error between the two sides is shown in Figure 9. The camera was calibrated using Zhang's calibration method. and The corresponding calibration parameters and reprojection errors are shown in Table 2.

[0053] Table 1. Coordinates of chessboard corner points before and after optimization

[0054] Table 2. Initial calibration results using different coordinate systems

[0055] Using UFED-COA for parameter optimization, the reprojection error function is shown in Equation (13). The initial camera parameters include the camera's intrinsic parameter matrix. and radial distortion parameters Based on the input corner point The corresponding calibration parameters (as shown in Table 2) determine the dimensionality of the population and the range of the search space for each optimization algorithm, as well as the corner points. The initial calibration parameters are the center values ​​of the population initialization, and the upper and lower limits of the intrinsic and extrinsic parameters fluctuate within 3% of the center values. To visually demonstrate the performance of each optimization algorithm, we compare it with five other excellent algorithms in the camera calibration parameter optimization task: WOA, GGO, PSO, MPA, and COA. The number of iterations is set to 300, the population size is 90, and the algorithm runs until convergence. For the particle swarm optimization algorithm, the maximum particle velocity is 2, the minimum particle velocity is 1; the maximum and minimum inertia weights are 1.0 and 0.5, respectively; the cognitive learning factor is 1.5, and the social learning factor is 2.0. Figure 10The curves showing the variation of the overall average reprojection error of ten chessboard images under different iteration numbers are presented, where the horizontal axis represents the iteration number and the vertical axis represents the reprojection error; the final calibration results of each method are shown in Table 3.

[0056] Table 3. Comparison of results from different optimization methods

[0057] In summary, the experiments on chessboard corner noise suppression demonstrate that, compared to unoptimized corners, the proposed method significantly reduces camera calibration reprojection errors by 15.88%, thus verifying the effectiveness of the noise suppression strategy. In calibration parameter optimization experiments, the proposed UFED-COA intelligent optimization algorithm reduces reprojection errors by 9.06% compared to the COA algorithm, and by 8.25%, 4.56%, 12.75%, and 39.87% compared to the GGO, MPA, PSO, and WOA optimization algorithms, respectively.

[0058] This method is designed for optical 3D scanners, utilizing the spatial uniformity of the corner distances in a checkerboard pattern and employing a polynomial lens distortion model commonly used in standard industrial cameras. The tangential distortion of the industrial camera used in this paper is negligible, and the radial distortion is also relatively minor. However, for systems with lower assembly precision or cameras with severe lens distortion (such as fisheye lenses), it is necessary to model the tangential distortion and use a more complex distortion model. Furthermore, the experiments were conducted under relatively ideal environmental conditions, but severe corner detection errors or corner loss may occur in high-noise environments. In addressing such problems, priority should be given to recovering missing corners. Although intelligent optimization algorithms can improve camera calibration accuracy, they require a good initial solution and are usually accompanied by high computational costs.

[0059] The method in this invention first calculates the distortion center of the image and then calculates the relative error values ​​of other corner points relative to this center to assess the degree of noise outside the distortion. Subsequently, a gradient descent-based correction method is used to update the corner point coordinates, effectively suppressing noise associated with the outside distortion. Its initial calibration reprojection error is 0.2358 pixels, a 15.88% reduction compared to the noisy case. After completing the initial calibration, the UFED-COA algorithm is further used to optimize the camera parameters. Compared to many other optimization algorithms, the method proposed in this paper has higher calibration accuracy, with a final reprojection error of 0.0712, a 4.56% reduction compared to the best-performing optimization algorithm in this paper. Example 3 The present invention also provides a system for performing the 3D scanner camera calibration method based on distortion center driving and UFED-COA in Embodiment 1, comprising: Distortion center calculation module, coordinate; The corner noise suppression module uses a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the checkerboard image, and calculates the radial distance and radial distortion of each corner point relative to the distortion center. Candidate points are initially screened using a sliding window, the coefficient of variation is calculated, the anchor point set is determined, and the anchor point positions are updated using polynomial fitting. Based on the anchor point set, the spatial similarity between non-anchor points and anchor points is calculated to determine the weight coefficient of non-anchor points; We use the weighting coefficients of non-anchor points to perform weighted polynomial fitting and update the corner coordinates to suppress noise. The parameter optimization module optimizes camera parameters based on the UFED-COA algorithm. It uses the updated corner coordinates for initial calibration, and combines uniform initialization and fitness distance balancing mechanisms to update the population position, minimizing reprojection error. The present invention further provides a computer-readable storage medium storing a computer program, characterized in that, when the program is executed by a processor, it implements the steps of the three-dimensional scanner camera calibration method based on distortion center driving and UFED-COA in Embodiment 1.

[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A 3D scanner camera calibration method based on distortion center driving and UFED-COA, characterized in that, Includes the following steps: S1. Use an optical scanner platform to acquire a checkerboard image and calculate the coordinates of the distortion center in the checkerboard image; S2. Use a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the chessboard from the chessboard image, and calculate the radial distance of each corner point relative to the distortion center and the radial distortion difference. S3. Based on radial distortion, candidate points are initially screened through a sliding window, the coefficient of variation is calculated, and the anchor point set is determined. S4. Based on the anchor point set, calculate the spatial similarity and numerical similarity between non-anchor points and anchor points to determine the weight coefficient of non-anchor points. S5. Use the weighting coefficients of non-anchor points to perform weighted polynomial fitting, and update the corner coordinates to suppress noise. S6. Optimize camera parameters based on the UFED-COA algorithm, use the updated corner coordinates for initial calibration, and update the population position by combining uniform initialization and fitness distance balancing mechanism to minimize reprojection error.

2. The 3D scanner camera calibration method based on distortion center driving and UFED-COA according to claim 1, characterized in that, The calculation of the distortion center coordinates, S1, is as follows: make , ; in, It is a matrix obtained by using the coordinates of points in the image and their corresponding world coordinates. It is grouped by column vector. They represent No. Column and number Column elements, The letter in the middle is an intermediate variable, representing a vector composed of elements from matrix H; According to formula (3), we can obtain ; (3) make The distortion center can be initially obtained according to formula (4). ; in, These are the normalized focal lengths along the camera's x and y axes, respectively. This represents the tilt factor, which describes the installation error of the camera sensor chip.

3. The 3D scanner camera calibration method based on distortion center driving and UFED-COA according to claim 1, characterized in that, S3, the process of calculating the coefficient of variation and determining the anchor point set, specifically involves: set up These are pixel coordinates under ideal conditions. Pixel coordinates affected only by lens distortion, and In a typical optical camera model, the relationship between the two is shown in equation (5): (5) in, Radial distortion coefficient; This refers to the corner coordinates affected by both environmental noise and lens distortion; while This refers to the corner coordinates when they are unaffected by environmental noise and lens distortion. , , The radial distance is , , , respectively represent the corner points with no distortion and noise, the corner points with no noise only affected by distortion, and the distance of the actual detected corner point coordinates from the distortion center; but , , The relationship between them is expressed by formula (6); determine the distortion center. Then, the radial distance between the ideal corner point and the actual corner point can be determined. ; (6) Due to the influence of noise, and The following relationship exists between them: ; Define a sliding window ,like Then the window radius is continuously expanded in the sliding window. Zhongruo If the point is an anchor point, then that point is considered an anchor point; calculations are performed within the window. mean and standard deviation Then, the coefficient of variation is calculated according to formula (7). ; (7) This refers to the distance error caused by environmental noise; if The points within that window are the points we are looking for. To further improve the accuracy of the anchor points, we perform polynomial fitting on the initially selected anchor points and update each point accordingly. To improve its accuracy, all reference points are ultimately used to form the anchor point set B.

4. The 3D scanner camera calibration method based on distortion center driving and UFED-COA according to claim 1, characterized in that, S4, based on the anchor point set, calculates the spatial similarity between non-anchor points and anchor points, and determines the weight coefficients of non-anchor points in the following specific steps: Set data points and anchor points Their spatial similarity The calculation method is shown in formula (8). (8) in It is the radius of influence, used to control the range of influence of the benchmark point. The larger the value, the wider the range of influence, and points that are farther away from it will obtain a larger similarity value. Numerical similarity The calculation method is shown in formula (9), where It is all Standard deviation of the value Used to control the rate at which numerical similarity decreases as numerical differences increase; (9) The similarity between a single point and each reference point is the product of the two, and the final weight of each point is... The average similarity with all reference points is calculated as shown in formula (10), and then normalized to... To enhance its stability within the range; (10)。 5. The 3D scanner camera calibration method based on distortion center driving and UFED-COA according to claim 4, characterized in that, In step S5, the process of using the weighted polynomial fitting of non-anchor point weight coefficients to update corner point coordinates to suppress noise is as follows: According to each , and their corresponding weights The polynomial is fitted using the minimum weighted sum of squared residuals, and its calculation formula is as follows: (11) Determine the corrected model based on the fitted polynomial model. This allows us to determine the radial distance of the corner point when it is affected only by distortion and not by noise. Finally, the coordinates of the actually detected corner points are updated to eliminate the influence of noise and obtain the final result. The calculation formula is as follows: (12)。 6. The 3D scanner camera calibration method based on distortion center driving and UFED-COA according to claim 1, characterized in that, S6 updates the population position by combining uniform initialization and fitness distance balancing mechanisms; specifically: S61. Find all values ​​less than M prime numbers ;in M It refers to the size of the population; S62, Utilize all less than M The expression for constructing the j-th column of a uniform array using prime numbers is: (15) S63, Set From all less than M prime numbers The number of randomly selected variables in the matrix is ​​used to construct a uniform matrix. ; S64. After using the uniform matrix, generate the population individuals uniformly distributed in the solution space according to formula (2): (16) in, and It is the individual variable number Maximum and minimum values ​​in each dimension; S65. After initializing the population, use the objective function to calculate the fitness of all candidate individuals. And the best fitness The individual's location is used as the target location. ; A hierarchical search strategy is employed, and the population is divided into two equal subpopulations, with individuals represented as follows: , Each subpopulation moves towards the target location and searches its surrounding space. The first subpopulation employs a guided search strategy based on the current best individual, which allows it to quickly approach the optimal solution region in the early stages. Its movement strategy is as follows: yes A random number within the interval. yes A random integer; (17) The second subpopulation employs an adaptive search strategy based on a global objective to enhance its local exploration capabilities; this first requires introducing new target locations. The calculation method is shown in formula (18), and then the individual movement strategy of formula (19) is used for updating. (18) (19) After all individuals in the population have moved once, their fitness is used to determine whether to replace their previous positions. If the new fitness is less than the previous fitness, the position is updated; otherwise, no position update is performed. Then, all individuals in the population are perturbed, and their fitness is recalculated. If any individual in the population has a fitness that satisfies the previous fitness, the position is updated. Then update it to make This completes one iteration; the perturbation formula is as shown in formula (20). (20) Individuals in the candidate solution are represented by variables as ,in The dimension of the individual vector is represented as the candidate solution population. The objective function for calculating fitness is defined as follows: The fitness of all individuals in the population corresponding to the variable is Then, the fitness is normalized using formula (21): (21) in, norm This refers to the normalization operation; Calculate the distance between candidate solutions and the optimal solution using Euclidean distance. As shown in formula (22): (twenty two) In calculating the similarity score, a weighted normalized distance and fitness score are used to calculate the similarity score for each candidate solution. The calculation method is shown in formula (23); (23) The spatial location of the candidate with the highest score is ultimately used as the reference location for individual movement.

7. A 3D scanner camera calibration system based on distortion center driving and UFED-COA, used to execute the 3D scanner camera calibration method based on distortion center driving and UFED-COA as described in claims 1-6, characterized in that, include: The distortion center calculation module calculates the coordinates of the distortion center based on a checkerboard image. The corner noise suppression module uses a corner detection algorithm to extract the sub-pixel coordinates of the corner points of the checkerboard image, and calculates the radial distance and radial distortion of each corner point relative to the distortion center. Candidate points are initially screened using a sliding window, the coefficient of variation is calculated, the anchor point set is determined, and the anchor point positions are updated using polynomial fitting. Based on the anchor point set, the spatial similarity between non-anchor points and anchor points is calculated to determine the weight coefficient of non-anchor points; We use the weighting coefficients of non-anchor points to perform weighted polynomial fitting and update the corner coordinates to suppress noise. The parameter optimization module optimizes camera parameters based on the UFED-COA algorithm, uses the updated corner coordinates for initial calibration, and updates the population position by combining uniform initialization and fitness distance balancing mechanisms to minimize reprojection error.

8. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the steps of the three-dimensional scanner camera calibration method based on distortion center driving and UFED-COA as described in any one of claims 1-6.

Citation Information

Cited By

  • Camera aiming point fusion calculation method and device, equipment and storage medium

    CN122335994A

  • Camera aiming point fusion calculation method and device, equipment and storage medium

    CN122335994B