A camera calibration method and related device

CN122780415APending Publication Date: 2026-09-18元橡科技(北京)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610937274.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

该问题不仅会降低标定过程的数值稳定性,还会在去畸变、重投影及立体校正等处理中引入明显伪影,影响标定参数的工程可用性

Benefits of technology

本发明的方法通过将角点数据划分为中心区域与边缘区域并分阶段处理,在边缘数据不满足预设条件时重新采集,以中心区域数据将Rational畸变模型分母多项式高阶系数置零获得初始参数,再融合中心区域与边缘区域数据并对分母函数施加稳定性约束以抑制畸变环,联合重投影误差优化求解,最终检测有效视场范围内畸变环存在性,解决了有限样本覆盖条件下Rational模型分母失稳引发的边缘畸变环及数值稳定性不足的问题,提升了标定结果可靠性与工程可用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122780415A_ABST
    Figure CN122780415A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer vision and image processing technology, specifically disclosing a camera calibration method and related equipment. The technical solution of this invention divides corner data into central and edge regions and processes them in stages. When edge data does not meet preset conditions, it is re-acquired. Initial parameters are obtained by setting the higher-order coefficients of the denominator polynomial of the Rational distortion model to zero using central region data. Then, the central and edge region data are fused, and stability constraints are applied to the denominator function to suppress distortion loops. Combined with reprojection error optimization, the existence of distortion loops within the effective field of view is finally detected. This solves the problems of edge distortion loops and insufficient numerical stability caused by the instability of the denominator of the Rational model under limited sample coverage conditions, improving the reliability and engineering usability of the calibration results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image processing technology, and in particular to a camera calibration method and related equipment. Background Technology

[0002] Camera geometry calibration is used to determine the camera's intrinsic and extrinsic parameters, as well as lens distortion parameters. It is fundamental to applications such as distortion correction, 3D reconstruction, binocular ranging, and visual measurement. Currently, commonly used distortion models include the Brown model, the fisheye model, and the Rational model. Among them, the Rational model describes distortion using the ratio of the radial numerator polynomial to the denominator polynomial, exhibiting strong nonlinear expressive power and being particularly suitable for imaging calibration scenarios involving large field-of-view lenses or complex optical systems.

[0003] During camera mass production, to meet production line cycle time requirements, it is usually necessary to minimize calibration time and reduce the number of samples involved in optimization. In practice, calibration is often completed by covering only a limited area of ​​the image with a checkerboard pattern. While this method improves calibration efficiency, it can easily lead to insufficient samples in the image edge region, resulting in insufficient constraint of distortion parameters on the edge field of view.

[0004] For the Rational distortion model, imaging distortion is affected not only by the numerator but also significantly by changes in the denominator. When the denominator function approaches zero within the effective field of view, the local magnification increases sharply, resulting in noticeable distortion rings at the edges of the corrected image. This problem not only reduces the numerical stability of the calibration process but also introduces significant artifacts in distortion correction, reprojection, and stereo correction, affecting the engineering usability of the calibration parameters.

[0005] Therefore, how to provide a technical solution that can effectively suppress denominator instability of Rational models, reduce the risk of edge distortion loops, and improve the reliability of calibration results under limited sample coverage, while taking into account both mass production efficiency and calibration accuracy, remains a problem that needs to be solved by existing technologies. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a camera calibration method and related equipment.

[0007] In a first aspect, the present invention provides a camera calibration method, the technical solution of which is as follows: Obtain the chessboard calibration image and perform corner detection to obtain corner data; Based on the position of each corner point in the image plane, the corner point data is divided into central region data and edge region data; Determine whether the distribution of data in the edge region meets the preset conditions; if not, re-acquire the checkerboard calibration image. If the preset conditions are met, only the data from the central region will be used, and the higher-order coefficients in the denominator polynomial of the Rational distortion model will be set to zero to obtain the initial parameters of the camera. Using the initial camera parameters as initial values, the data from the central region and the edge region are fused. Within the effective field of view, a stability constraint is applied to the denominator function of the Rational distortion model to suppress distortion loops. The objective function is constructed in conjunction with the reprojection error for optimization and solution, and the final camera calibration parameters are obtained. The system checks for distortion rings within the effective field of view based on the camera's final calibration parameters. If a distortion ring is found, the checkerboard calibration image is re-acquired; otherwise, the calibration is considered successful.

[0008] The beneficial effects of the camera calibration method of the present invention are as follows: The method of this invention divides corner data into central and edge regions and processes them in stages. When the edge data does not meet the preset conditions, it is re-acquired. The higher-order coefficients of the denominator polynomial of the Rational distortion model are set to zero using the central region data to obtain the initial parameters. Then, the central and edge region data are fused and stability constraints are applied to the denominator function to suppress distortion loops. The reprojection error is optimized and solved together. Finally, the existence of distortion loops within the effective field of view is detected. This method solves the problems of edge distortion loops and insufficient numerical stability caused by the instability of the denominator of the Rational model under limited sample coverage conditions, and improves the reliability and engineering usability of the calibration results.

[0009] Based on the above scheme, the camera calibration method of the present invention can be further improved as follows.

[0010] In one alternative approach, the step of dividing corner data into central region data and edge region data based on the position of each corner point in the image plane includes: Calculate the pseudo radius of each corner point in the image plane; Corner data with pseudo-radius no greater than a preset radius threshold are classified as central region data, while corner data with pseudo-radius greater than a preset radius threshold are classified as edge region data.

[0011] The advantages of adopting the above-mentioned optional method are: further realizing automatic partitioning of corner data through pseudo-radius and preset threshold, dividing the image plane into central region and edge region, so that the region boundary has a quantitative basis, avoiding the uncertainty caused by subjective division, and providing a clear data foundation for subsequent phased calibration processing.

[0012] In one alternative approach, the step of calculating the pseudo-radius of any corner point in the image plane includes: The ratio of the Euclidean distance from any corner point to the center point of the image plane to half the length of the diagonal of the image plane is used as the pseudo radius corresponding to that corner point.

[0013] The advantages of adopting the above optional method are as follows: further defining the pseudo radius by the ratio of the Euclidean distance from the corner point to the center point of the image to half the length of the image diagonal, converting the absolute distance into a normalized relative quantity, eliminating the scale difference between images of different resolutions, making the radius threshold universal across devices, and improving the adaptability of the region segmentation strategy.

[0014] In one alternative approach, the step of determining whether the distribution of edge region data meets preset conditions includes: Determine whether the proportion of corner points in the edge region data to the total number of corner points in the corner data is greater than a preset proportion threshold, and determine whether the corner points in the edge region data are evenly distributed symmetrically about the image center point in the image plane.

[0015] The advantages of adopting the above optional methods are: further examining the distribution quality of edge region data from two dimensions, namely the proportion of corner points and spatial symmetry distribution; triggering re-collection when the number of samples is insufficient or the distribution is unbalanced; avoiding optimization deviations caused by weak edge constraints; and ensuring that the edge region has sufficient constraint capability on distortion parameters.

[0016] In one alternative approach, the denominator polynomial is Higher-order coefficients include , , The initial camera parameters include the camera's focal length. , Principal point coordinates , First-order coefficients of radial distortion Second-order coefficients Third-order coefficients and tangential distortion coefficient , ;in, , , For the numerator polynomial The coefficients in.

[0017] The advantages of adopting the above optional method are as follows: it further clarifies that the second, fourth and sixth order radial coefficients in the denominator polynomial are treated as higher-order coefficients and set to zero, while retaining the focal length, principal point coordinates and low-order radial and tangential distortion coefficients for solving. This reduces the risk of denominator instability while maintaining the basic expressive ability of the model and obtaining numerically stable initial parameters.

[0018] In one alternative approach, stability constraints include both soft and hard constraints; the step of imposing stability constraints on the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops includes: A soft constraint is applied to the denominator function at the mid-radius position of the effective field of view, and a hard constraint is applied to the denominator function at the maximum radius position of the effective field of view.

[0019] The beneficial effects of adopting the above-mentioned optional approach are as follows: by further adopting a hierarchical strategy that combines soft constraints and hard constraints, the denominator function is guided away from zero by soft constraints at the middle radius position, and the denominator function is forced to maintain a safe lower limit by hard constraints at the maximum radius position, forming a gradient protection from wide to strict, and reducing the probability of distortion loops appearing in the edge region.

[0020] In one alternative approach, the step of applying a soft constraint to the denominator function at the mid-radius position of the effective field of view includes: Calculate the first difference between the reciprocal of the denominator function at the mid-radius position and the reciprocal of the activation threshold; Take the upper limit of zero for the first difference, and multiply the result after taking the upper limit of zero by the soft constraint weight to obtain the first residual term; The square of the first residual term is used to construct a soft constraint term in the objective function to suppress the denominator function from approaching zero at the middle radius position.

[0021] The advantages of adopting the above optional method are as follows: a soft-constraint residual term is further constructed at the middle radius position by operating on the reciprocal difference and the zero upper limit, and then incorporated into the objective function in the form of a weighted square. During the optimization process, the denominator function is continuously guided to deviate from the zero value region, the instability trend of the denominator is suppressed in advance, and the distortion loop is prevented from expanding to the edge.

[0022] In one alternative approach, the step of applying a hard constraint to the denominator function at the maximum radius of the effective field of view includes: Calculate the second difference between the preset lower threshold and the value of the denominator function at the maximum radius position; Take the upper limit of zero for the second difference, and multiply the result after taking the upper limit of zero by the hard constraint weight to obtain the second residual term; The square of the second residual term is used to construct a hard constraint term in the objective function to suppress the denominator function from falling below a preset lower threshold at the maximum radius position.

[0023] The beneficial effects of adopting the above optional method are as follows: a hard constraint residual term is constructed at the maximum radius position by calculating the difference between the lower threshold and the denominator function value, and then incorporated into the objective function in the form of a weighted square. This forces the denominator function to maintain a positive safe boundary at the edge limit position, blocks the path of the denominator to zero, and prevents distortion loops from appearing in the edge field of view.

[0024] Secondly, the present invention provides a camera calibration system, the technical solution of which is as follows: The detection module is used to acquire a chessboard calibration image and perform corner detection to obtain corner data, and then send the corner data to the division module; The segmentation module is used to receive the corner data sent by the detection module, divide the corner data into central region data and edge region data according to the position of each corner point in the image plane, and send the central region data and the edge region data to the judgment module. The judgment module is used to receive the central region data and the edge region data sent by the division module, and to determine whether the distribution of the edge region data meets the preset conditions. If it does not meet the conditions, the checkerboard calibration image is re-acquired. If it meets the conditions, the central region data is sent to the processing module. The processing module is used to receive the central region data sent by the judgment module, use only the central region data to set the higher-order coefficients in the denominator polynomial of the Rational distortion model to zero, solve for the camera initial parameters, and send the camera initial parameters to the calibration module. The calibration module is used to receive the camera initial parameters sent by the processing module, use the camera initial parameters as initial values, fuse the central region data and the edge region data, apply stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, and construct an objective function in conjunction with the reprojection error for optimization and solution to obtain the final camera calibration parameters, and send the final camera calibration parameters to the verification module. The verification module is used to receive the final calibration parameters of the camera sent by the calibration module, and detect whether there is a distortion ring within the effective field of view according to the final calibration parameters of the camera. If it exists, the checkerboard calibration image is re-acquired; if it does not exist, the calibration is determined to be successful.

[0025] The beneficial effects of the camera calibration system of the present invention are as follows: The system of this invention divides corner data into central and edge regions and processes them in stages. When the edge data does not meet the preset conditions, it is re-acquired. The higher-order coefficients of the denominator polynomial of the Rational distortion model are set to zero using the central region data to obtain the initial parameters. Then, the central and edge region data are fused and stability constraints are applied to the denominator function to suppress distortion loops. The system is then optimized by combining reprojection error and finally detects the existence of distortion loops within the effective field of view. This solves the problems of edge distortion loops and insufficient numerical stability caused by the instability of the denominator of the Rational model under limited sample coverage conditions, and improves the reliability and engineering usability of the calibration results.

[0026] Thirdly, the technical solution of an electronic device according to the present invention is as follows: It includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the camera calibration method of the present invention.

[0027] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0028] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of an embodiment of a camera calibration method according to the present invention; Figure 2 This is a schematic diagram of the overall process architecture of an embodiment of a camera calibration method according to the present invention; Figure 3 This is a schematic diagram of an embodiment of a camera calibration system according to the present invention; Figure 4 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation

[0029] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0030] Figure 1 This diagram illustrates a flowchart of an embodiment of a camera calibration method provided by the present invention. This camera calibration method can be executed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal, such as a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, or wearable device. The server can be a single server or a server cluster consisting of multiple servers. Any electronic device can implement the camera calibration method by having its processor call computer-readable instructions stored in its memory. Figure 1 As shown, it includes the following steps: S1. Obtain the chessboard calibration image and perform corner detection to obtain corner data.

[0031] The checkerboard calibration image refers to an image containing a checkerboard pattern used for camera calibration. The checkerboard pattern consists of alternating black and white rectangular squares. For example, a checkerboard calibration image with a resolution of 1920×1080 pixels has 12 interior corner points horizontally and 9 interior corner points vertically, covering the entire field of view of the camera. Corner point data refers to the set of positional information for all interior corner points detected in the checkerboard calibration image, with each corner point position represented by pixel coordinates. For example, the pixel coordinates of 108 corner points detected in a 1920×1080 pixel checkerboard calibration image are represented by pixel coordinates. and ordinate The set of these coordinates constitutes the corner data.

[0032] S2. Based on the position of each corner point in the image plane, divide the corner point data into central region data and edge region data.

[0033] In this context, a corner point refers to the common point where four adjacent black and white squares intersect in a checkerboard calibration image; for example, in a 1920×1080 pixel checkerboard calibration image, there are 12 intersection points between adjacent black and white squares in the horizontal direction and 9 intersection points in the vertical direction, totaling 108 intersection points, which are the corner points. The image plane refers to the two-dimensional plane corresponding to the photosensitive element during camera imaging, where pixel coordinates are defined; for example, in the two-dimensional plane of a 1920×1080 pixel checkerboard calibration image, the origin is located at the upper left corner of the image, the horizontal coordinate ranges from 0 to 1919, and the vertical coordinate ranges from 0 to 1079.

[0034] Here, the central region data refers to the corner point data located near the center of the image in the image plane; for example, in a 1920×1080 pixel image plane, the corner point is the data located near the center of the image. The central region data consists of 32 corner points with a normalized pseudo-radius of no more than 0.5, centered on the image. The edge region data refers to the corner point data located near the image edge in the image plane; for example, in a 1920×1080 pixel image plane, the edge region data consists of 76 corner points with a normalized pseudo-radius greater than 0.5.

[0035] S3. Determine whether the distribution of data in the edge region meets the preset conditions. If not, re-acquire the checkerboard calibration image.

[0036] Among them, the preset conditions refer to the judgment rules set in advance to determine whether the edge region data meets the calibration requirements, including quantity conditions and distribution conditions; for example, the preset conditions are that the number of corner points in the edge region data accounts for more than 30% of the total number of corner points, and the corner points in the edge region data are centrally symmetrically distributed about the center point of the image in the image plane.

[0037] S4. If the preset conditions are met, only the data in the central region will be used. The higher-order coefficients in the denominator polynomial of the Rational distortion model will be set to zero, and the initial parameters of the camera will be obtained by solving.

[0038] The Rational distortion model is described as follows: Let a point in the camera coordinate system be... Then the final distorted coordinates Calculate according to the following system of equations: In the formula, For coordinates on the normalized plane, , The tangential distortion coefficient. The numerator polynomial. and denominator polynomial They are respectively: in, Here, the radial distortion coefficient is used. Then, the distortion coordinates are projected onto pixel coordinates using the camera's intrinsic parameters to obtain the image coordinates: In the formula, Focal length The coordinates of the principal point. For example, for the normalized radius. ,Pick , , , , , The numerator is approximately 1.18, the denominator is approximately 1.01, and the distorted coordinates are the original coordinates multiplied by approximately 1.17.

[0039] Here, the denominator polynomial refers to the radial polynomial located in the denominator of the Rational distortion model, which has the form: This is used to scale and adjust the degree of distortion; for example, in the Rational distortion model, the denominator polynomial ,when hour, Higher-order coefficients refer to the coefficients in the denominator polynomial whose radial order is greater than zero, including... , , For example, in the denominator polynomial middle, , , All of them are higher-order coefficients, while the constant term 1 is not a higher-order coefficient.

[0040] Here, the initial camera parameters refer to the preliminary values ​​of the camera intrinsic parameters and distortion coefficients obtained after solving the first stage of calibration using data from the central region and setting the higher-order coefficients in the denominator to zero; for example, the initial camera parameters include focal length. Pixels Pixels, principal point coordinates Pixels Pixel, first-order radial distortion coefficient Second-order coefficients Third-order coefficients Tangential distortion coefficient , .

[0041] S5. Using the initial camera parameters as initial values, fuse the data from the central region and the edge region, apply stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, and construct an objective function in conjunction with the reprojection error for optimization to obtain the final camera calibration parameters.

[0042] The effective field of view refers to the normalized radius interval corresponding to the actual image region involved in calibration and correction during camera imaging, typically the maximum radius from the image center to the image edge. For example, for a 1920×1080 pixel image, the maximum normalized radius is approximately 1.0, and the effective field of view is the entire image region with a normalized radius from 0 to 1.0. The denominator function refers to the functional relationship determined by the denominator polynomial in the Rational distortion model, i.e. Its value varies with the normalized radius. Change; for example, when , , When, the denominator function is The value at that location is ,exist The value at that location is .

[0043] Among them, stability constraints refer to mathematical restrictions imposed on the denominator function during the optimization process to prevent the denominator function from approaching zero and generating distortion cycles. These constraints include both soft and hard constraints. For example, stability constraints require that the denominator function be within the middle radius... The reciprocal of the generating function does not exceed a certain activation threshold, within the maximum radius. The value of the generating function is not less than 0.2.

[0044] The reprojection error refers to the Euclidean distance between the predicted pixel coordinates obtained by projecting a corner point in 3D space onto the image plane using calibration parameters and the actual detected pixel coordinates of the corner point. For example, the actual detected coordinates of a certain corner point are... The predicted coordinates obtained by reprojection using the current calibration parameters are: The reprojection error is then... Pixels. The objective function refers to the mathematical expression that needs to be minimized during the calibration optimization process; it is typically composed of a weighted sum of the reprojection error term and various constraint terms. For example, the objective function... ,in Represents a robust kernel function. This represents the square of the reprojection error. and These represent the squared terms of the soft constraints and hard constraints, respectively.

[0045] The final camera calibration parameters refer to the final values ​​of the camera's intrinsic parameters, distortion coefficients, and extrinsic parameters obtained after a two-stage joint optimization solution. For example, the final camera calibration parameters include the focal length. Pixels Pixels, principal point coordinates Pixels Pixel, radial distortion coefficient , , Denominator coefficient , , Tangential distortion coefficient , .

[0046] S6. Detect whether there is a distortion ring within the effective field of view based on the final calibration parameters of the camera. If it exists, re-acquire the checkerboard calibration image. If it does not exist, the calibration is confirmed to be successful.

[0047] Among them, distortion rings refer to ring-shaped or arc-shaped artifacts appearing at the edges of the corrected image, caused by a sharp increase in local magnification when the denominator function of the Rational distortion model approaches zero within the effective field of view; for example, when the denominator function is near zero... When the magnification is close to 0.02, the local magnification is about 50 times, which causes a bright arc-shaped distortion ring to appear at the edge of the corrected image.

[0048] The technical solution of this embodiment divides corner data into central and edge regions and processes them in stages. When the edge data does not meet the preset conditions, it is re-acquired. The higher-order coefficients of the denominator polynomial of the Rational distortion model are set to zero using the central region data to obtain the initial parameters. Then, the central and edge region data are fused and stability constraints are applied to the denominator function to suppress distortion loops. The reprojection error is optimized and solved together. Finally, the existence of distortion loops within the effective field of view is detected. This solves the problem of edge distortion loops and insufficient numerical stability caused by the instability of the denominator of the Rational model under limited sample coverage conditions, and improves the reliability and engineering usability of the calibration results.

[0049] In one alternative approach, the step of dividing corner data into central region data and edge region data based on the position of each corner point in the image plane includes: Calculate the pseudo radius of each corner point in the image plane.

[0050] Among them, pseudo radius Calculate according to the following formula: In the formula, Represents the width of the image plane. Represents the height of the image plane. This represents the pixel coordinates of a corner point in the image plane. and These are half the width and half the height of the image plane, respectively; for example, the corner coordinates are... Image width pixels, height pixels, then .

[0051] Corner data with pseudo-radius no greater than a preset radius threshold are classified as central region data, while corner data with pseudo-radius greater than a preset radius threshold are classified as edge region data.

[0052] The preset radius threshold refers to the critical value of the pseudo radius used to divide the central region and the edge region. Corner points with a pseudo radius less than or equal to the threshold are classified as central region data, and those with a pseudo radius less than or equal to the threshold are classified as edge region data. For example, if the preset radius threshold is set to 0.5, then corner points with a pseudo radius of 0.544 are greater than 0.5 and belong to edge region data; corner points with a pseudo radius of 0.3 belong to central region data.

[0053] In the above-mentioned optional methods, the corner data is further automatically partitioned by using pseudo-radius and preset threshold, dividing the image plane into central and edge regions, so that the region boundaries have a quantitative basis, avoiding the uncertainty caused by subjective division, and providing a clear data foundation for subsequent phased calibration processing.

[0054] In one alternative approach, the step of calculating the pseudo-radius of any corner point in the image plane includes: The ratio of the Euclidean distance from any corner point to the center point of the image plane to half the length of the diagonal of the image plane is used as the pseudo radius corresponding to that corner point.

[0055] The half-length of the diagonal refers to the distance from the center point of the image plane to a corner point, which is the square root of the sum of the squares of half the image width and half the image height. For example, for a 1920×1080 pixel image, half the width is 960 pixels, half the height is 540 pixels, and the half-length of the diagonal is... Pixel.

[0056] In the above-mentioned optional methods, the pseudo-radius is further defined by the ratio of the Euclidean distance from the corner point to the center point of the image to half the length of the image diagonal. This transforms the absolute distance into a normalized relative quantity, eliminates the scale difference between images of different resolutions, makes the radius threshold universal across devices, and improves the adaptability of the region segmentation strategy.

[0057] In one alternative approach, the step of determining whether the distribution of edge region data meets preset conditions includes: Determine whether the proportion of corner points in the edge region data to the total number of corner points in the corner data is greater than a preset proportion threshold, and determine whether the corner points in the edge region data are evenly distributed symmetrically about the image center point in the image plane.

[0058] Among them, the proportion of marginal samples Calculate according to the following formula: In the formula, This indicates the number of corner points in the edge region data. This represents the total number of corner points in the corner point data. This indicates a preset ratio threshold; for example, , , ,but The quantity condition is met.

[0059] The corner count refers to the total number of corners detected in the checkerboard calibration image or the number of corners within a specific region. For example, if 108 corners are detected in a 1920×1080 pixel checkerboard calibration image, the central region data contains 32 corners, and the edge region data contains 76 corners. The preset ratio threshold is a critical value used to determine whether the edge region data is sufficient. The proportion of corners in the edge region to the total number of corners must be greater than this threshold. For example, if the preset ratio threshold is set to 30%, and there are 76 corners in the edge region and 108 corners in total, the ratio is 76 / 108≈70.4%, which is greater than 30%, thus meeting the quantity requirement.

[0060] Symmetrical distribution refers to the distribution of corner points in the edge region data that are approximately centrally symmetrical about the center point of the image plane. For example, if the number of corner points in the upper left, upper right, lower left, and lower right quadrants of the edge region data are 19, 19, 19, and 19 respectively, and the radial distribution of corner points in each quadrant is similar, then the symmetrical distribution is considered uniform.

[0061] Among the above optional methods, the distribution quality of edge region data is further examined from two dimensions: the proportion of corner points and spatial symmetry distribution. When the number of samples is insufficient or the distribution is unbalanced, re-collection is triggered to avoid optimization deviation caused by weak edge constraints and ensure that the edge region has sufficient constraint on distortion parameters.

[0062] In one alternative approach, the denominator polynomial is Higher-order coefficients include , , The initial camera parameters include the camera's focal length. , Principal point coordinates , First-order coefficients of radial distortion Second-order coefficients Third-order coefficients and tangential distortion coefficient , ;in, , , For the numerator polynomial The coefficients in.

[0063] The second-order radial coefficients refer to those in the radial distortion polynomial. The coefficient corresponding to the term, i.e. For example, in the numerator polynomial middle, These are the second-order radial coefficients. The fourth-order radial coefficients refer to those in the radial distortion polynomial. The coefficient corresponding to the term, i.e. For example, in the numerator polynomial middle, These are the fourth-order radial coefficients. The sixth-order radial coefficients refer to those in the denominator polynomial... The coefficient corresponding to the term, i.e. For example, in the denominator polynomial middle, That is, the sixth-order radial coefficient.

[0064] The focal length of a camera refers to the parameter in the camera's intrinsic parameters that represents the distance from the image plane to the camera's optical center, and is divided into horizontal focal length. and vertical focal length The unit is pixels; for example, in the camera's initial parameters Pixels Pixels indicate a focal length of 1200 pixels in both the horizontal and vertical directions. Principal coordinates refer to the pixel coordinates of the intersection point of the optical axis and the image plane in the camera's intrinsic parameters, denoted as... For example, the principal point coordinates in the camera's initial parameters. Pixels A pixel is the center point of an image plane. Radial distortion refers to the image deformation that occurs in the radial direction when the lens forms an image, usually manifested as barrel distortion or pincushion distortion; for example, radial distortion makes the edges of a checkerboard pattern, which are originally straight, appear curved in the image, with the corners near the image edges contracting inward (barrel distortion) or expanding outward (pincushion distortion).

[0065] The first-order coefficients refer to those in the radial distortion polynomial. The coefficient corresponding to the term, i.e. For example, in radial distortion polynomials middle, These are first-order coefficients, primarily controlling the distortion intensity near the center region. Second-order coefficients refer to those in the radial distortion polynomial. The coefficient corresponding to the term, i.e. For example, in radial distortion polynomials middle, These are second-order coefficients, primarily controlling distortion variations in the intermediate region. Third-order coefficients refer to those in the radial distortion polynomial. The coefficient corresponding to the term, i.e. For example, in radial distortion polynomials middle, These are third-order coefficients, primarily controlling distortion variations in edge regions. Tangential distortion coefficients refer to parameters describing the tangential deformation caused by the lens not being parallel to the image plane during image formation, including... and For example, tangential distortion coefficient , It is used to correct image tilt and distortion caused by lens assembly errors.

[0066] In the above-mentioned optional approach, the second, fourth, and sixth order radial coefficients in the denominator polynomial are further explicitly treated as higher-order coefficients and set to zero. At the same time, the focal length, principal point coordinates, and low-order radial and tangential distortion coefficients are retained for solving. This reduces the risk of denominator instability while maintaining the basic expressive power of the model and obtaining numerically stable initial parameters.

[0067] In one alternative approach, stability constraints include both soft and hard constraints.

[0068] Before the step of imposing stability constraints on the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, the steps also include calculating the maximum radius and the intermediate radius: Calculate the maximum radius and the middle radius : In the formula, Represents the width of the image plane. Represents the height of the image plane. and These represent the horizontal focal length and the vertical focal length, respectively; for example... Pixels Pixels Pixels pixels, then , .

[0069] The steps for imposing stability constraints on the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops include: A soft constraint is applied to the denominator function at the mid-radius position of the effective field of view, and a hard constraint is applied to the denominator function at the maximum radius position of the effective field of view.

[0070] Soft constraints refer to a penalty term added to the objective function in the form of the squared residual during optimization. This incurs a gradually increasing cost as the denominator function approaches the danger zone, guiding the optimization away from the danger zone without forcibly requiring absolute satisfaction of the boundary. For example, at the middle radius, a cost is applied when the reciprocal of the denominator function exceeds the activation threshold; the closer the denominator function is to zero, the greater the cost. Hard constraints, on the other hand, are a mandatory penalty term added to the objective function in the form of the squared residual during optimization. This incurs a significant cost when the denominator function value falls below a preset lower threshold, requiring the optimization result to meet this lower limit condition. For example, at the maximum radius, if the denominator function value is less than the preset lower threshold of 0.2, the hard constraint term will contribute a large cost, forcing the denominator function value to rise above 0.2.

[0071] The intermediate radius position refers to a normalized radius value located between the image center and the image edge, typically taken as the maximum radius divided by [value missing]. The value; for example, if the maximum radius is 1.0, then the position of the middle radius is... Applying soft constraints at this location can effectively prevent the denominator from becoming unstable and spreading to the edges. The maximum radius location refers to the normalized radius value closest to the image edge within the effective field of view, typically set to 1.0. For example, for a 1920×1080 pixel image, the normalized radius corresponding to the maximum radius location is 1.0. Applying hard constraints at this location can force the denominator function to maintain a safe value at the image edges.

[0072] Among the above-mentioned optional approaches, a hierarchical strategy combining soft and hard constraints is further adopted. At the middle radius position, soft constraints guide the denominator function away from zero, while at the maximum radius position, hard constraints force the denominator function to maintain a safe lower limit, forming a gradient protection from wide to strict, reducing the probability of distortion loops appearing in the edge region.

[0073] In one alternative approach, the step of applying a soft constraint to the denominator function at the mid-radius position of the effective field of view includes: Calculate the first difference between the reciprocal of the denominator function at the middle radius and the reciprocal of the activation threshold.

[0074] The first difference refers to the difference between the reciprocal of the denominator function at the midpoint of the radius and the reciprocal of the activation threshold; for example, the activation threshold... The reciprocal of the activation threshold is 2.0, the denominator function has a value of 0.6 at the middle radius, and its reciprocal is 1.6667. This is the first difference. .

[0075] Take the upper limit of zero for the first difference, and multiply the result after taking the upper limit of zero by the soft constraint weight to obtain the first residual term.

[0076] The square of the first residual term is used to construct a soft constraint term in the objective function to suppress the denominator function from approaching zero at the middle radius position.

[0077] The first residual term refers to the value obtained by taking the first difference, taking the upper limit of zero, and multiplying it by the soft constraint weight. Its square is used to construct the soft constraint term in the objective function.

[0078] The first residual term (soft-constraint residual term) is calculated according to the following formula. : In the formula, This represents the value of the denominator function at the midpoint of the radius. A positive minimum constant is used to prevent division by zero. This represents the soft constraint activation threshold. Represents the soft constraint weights; for example, taking , , ,but , The difference is negative, and after taking the upper limit of zero, it becomes 0. ;like ,but The difference is 0.5, which is 0.5 after rounding to the upper limit of zero. Multiply by (Assuming the value is 1) we get .

[0079] In the above-mentioned optional methods, a soft-constraint residual term is further constructed at the middle radius position by operating on the reciprocal difference and the zero upper limit. This residual term is then incorporated into the objective function in the form of a weighted square. During the optimization process, this continuously guides the denominator function to deviate from the zero region, suppressing the denominator instability trend in advance and preventing the distortion loop from expanding towards the edge.

[0080] In one alternative approach, the step of applying a hard constraint to the denominator function at the maximum radius of the effective field of view includes: Calculate the second difference between the preset lower threshold and the value of the denominator function at the maximum radius position.

[0081] Here, the preset lower threshold refers to the numerical limit used in hard constraints to force the denominator function to be greater than or equal to the maximum radius; for example, the preset lower threshold. If we set it to 0.2, then the value of the denominator function at the position of maximum radius must be... Otherwise, hard constraints incur costs. The second difference refers to the difference between the preset lower threshold and the value of the denominator function at the maximum radius; for example, if the preset lower threshold is 0.2 and the value of the denominator function at the maximum radius is 0.15, then the second difference... .

[0082] Take the upper limit of zero for the second difference, and multiply the result after taking the upper limit of zero by the hard constraint weight to obtain the second residual term.

[0083] The square of the second residual term is used to construct a hard constraint term in the objective function to suppress the denominator function from falling below a preset lower threshold at the maximum radius position.

[0084] The second residual term refers to the value obtained by taking the upper limit of zero from the second difference and multiplying it by the hard constraint weight. Its square is used to construct the hard constraint term in the objective function.

[0085] The second residual term (hard constraint residual term) is calculated according to the following formula. : In the formula, This indicates the preset threshold. This represents the value of the denominator function at the location of the maximum radius. Indicates hard constraint weights; for example, taking , ,but After taking the upper limit of zero, it becomes 0.05, multiplied by (Assuming the value is 2) we get ;like If the difference is negative, then taking the upper limit of zero will result in 0. .

[0086] In the above-mentioned optional methods, a hard constraint residual term is further constructed at the maximum radius position by calculating the difference between the lower threshold and the denominator function value. This residual term is then incorporated into the objective function in a weighted square form, forcing the denominator function to maintain a positive safe boundary at the edge limit position, blocking the path of the denominator to zero, and preventing distortion loops from appearing in the edge field of view.

[0087] In one alternative approach, when constructing the objective function using the combined reprojection errors for optimization, the reprojection errors are calculated according to the following formula: In the formula, Indicates the image number. This indicates the corner number in the image. This represents the predicted pixel coordinates of the corner points obtained by reprojection using intrinsic parameters, distortion coefficients, and extrinsic parameters. This represents the actual detected corner pixel coordinates. Principal point coordinates Focal length Radial distortion coefficient (where (the first-order coefficient of the denominator) For the first The camera extrinsic quaternions corresponding to each image, It is a translation vector.

[0088] Apply a Cauchy robust kernel function to the reprojection error: In the formula, This represents the square of the reprojection error. The scaling parameter for the robust kernel function, defaulting to... For example, take , ,but .

[0089] The final objective function is: In the formula, This is the reprojection error term after processing with the Cauchy robust kernel. For the squared term of the soft-constraint residuals, This represents the squared term of the hard-constrained residuals.

[0090] Among the above-mentioned optional methods, further optimization by jointly optimizing the reprojection error and the denominator stability constraint can effectively suppress distortion loops while ensuring calibration accuracy and improve the robustness of calibration results.

[0091] Figure 2 This is a schematic diagram of the overall process architecture of a camera calibration method according to the present invention. Figure 2 This summarizes the complete process from inputting the checkerboard calibration image to successful calibration or re-acquisition. Specifically, it includes: Input a checkerboard calibration image and complete corner detection and extraction; calculate the image pseudo-radius, dividing the corners into central region data and edge region data; perform sample partitioning checks to determine if the edge sample ratio meets the standard and if the central symmetry distribution is uniform; if the check fails, re-acquire the image; if the check passes, proceed to a two-stage joint calibration: the first stage uses only the central region data, and extracts the higher-order coefficients (i.e., ...) from the denominator polynomial of the Rational distortion model. The first stage sets the parameters to zero to complete the coarse calibration of the camera's intrinsic and extrinsic parameters, obtaining the initial parameters of the camera. The second stage fuses the data from the central region and the edge region, applies stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, and constructs an objective function in conjunction with the reprojection error for optimization, obtaining the final calibration parameters of the camera. After optimization, the presence of distortion loops within the effective field of view is detected based on the final calibration parameters of the camera. If no distortion loops are found, the calibration is considered successful; if distortion loops are found, the checkerboard calibration image is reacquired.

[0092] Figure 3 A schematic diagram of an embodiment of a camera calibration system 200 provided by the present invention is shown. Figure 3As shown, the camera calibration system 200 includes: The detection module 201 is used to acquire a chessboard calibration image and perform corner detection to obtain corner data, and send the corner data to the division module; The segmentation module 202 is used to receive the corner data sent by the detection module, divide the corner data into central region data and edge region data according to the position of each corner point in the image plane, and send the central region data and the edge region data to the judgment module. The judgment module 203 is used to receive the central region data and the edge region data sent by the division module, and to determine whether the distribution of the edge region data meets the preset conditions. If it does not meet the conditions, the checkerboard calibration image is re-acquired. If it meets the conditions, the central region data is sent to the processing module. Processing module 204 is used to receive the central region data sent by the judgment module, use only the central region data to set the higher-order coefficients in the denominator polynomial of the Rational distortion model to zero, solve for the camera initial parameters, and send the camera initial parameters to the calibration module. The calibration module 205 is used to receive the camera initial parameters sent by the processing module, use the camera initial parameters as initial values, fuse the central region data and the edge region data, apply stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, and construct an objective function in conjunction with the reprojection error for optimization and solution to obtain the final camera calibration parameters, and send the final camera calibration parameters to the verification module; The verification module 20 is used to receive the final calibration parameters of the camera sent by the calibration module, and detect whether there is a distortion ring within the effective field of view according to the final calibration parameters of the camera. If it exists, the checkerboard calibration image is re-acquired; if it does not exist, the calibration is determined to be successful.

[0093] In one alternative approach, partitioning module 202 is specifically used for: Calculate the pseudo radius of each corner point in the image plane; Corner data with pseudo-radius no greater than a preset radius threshold are classified as central region data, while corner data with pseudo-radius greater than a preset radius threshold are classified as edge region data.

[0094] In one alternative approach, partitioning module 202 is specifically used for: The ratio of the Euclidean distance from any corner point to the center point of the image plane to half the length of the diagonal of the image plane is used as the pseudo radius corresponding to that corner point.

[0095] In one alternative approach, the determination module 203 is specifically used for: Determine whether the proportion of corner points in the edge region data to the total number of corner points in the corner data is greater than a preset proportion threshold, and determine whether the corner points in the edge region data are evenly distributed symmetrically about the image center point in the image plane.

[0096] In one alternative approach, the denominator polynomial is Higher-order coefficients include , , The initial camera parameters include the camera's focal length. , Principal point coordinates , First-order coefficients of radial distortion Second-order coefficients Third-order coefficients and tangential distortion coefficient , ;in, , , For the numerator polynomial The coefficients in.

[0097] In one alternative approach, stability constraints include soft constraints and hard constraints; calibration module 205 is specifically used for: A soft constraint is applied to the denominator function at the mid-radius position of the effective field of view, and a hard constraint is applied to the denominator function at the maximum radius position of the effective field of view.

[0098] In an alternative embodiment, calibration module 205 is specifically used for: Calculate the first difference between the reciprocal of the denominator function at the mid-radius position and the reciprocal of the activation threshold; Take the upper limit of zero for the first difference, and multiply the result after taking the upper limit of zero by the soft constraint weight to obtain the first residual term; The square of the first residual term is used to construct a soft constraint term in the objective function to suppress the denominator function from approaching zero at the middle radius position.

[0099] In an alternative embodiment, calibration module 205 is specifically used for: Calculate the second difference between the preset lower threshold and the value of the denominator function at the maximum radius position; Take the upper limit of zero for the second difference, and multiply the result after taking the upper limit of zero by the hard constraint weight to obtain the second residual term; The square of the second residual term is used to construct a hard constraint term in the objective function to suppress the denominator function from falling below a preset lower threshold at the maximum radius position.

[0100] It should be noted that the beneficial effects of the camera calibration system 200 provided in the above embodiments are the same as those of the camera calibration method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0101] The camera calibration system 200 of the present invention may be a computer program (including program code) running on a computer device. For example, the camera calibration system 200 of the present invention is an application software that can be used to execute the corresponding steps in the camera calibration method of the present invention.

[0102] In some embodiments, the camera calibration system 200 of the present invention can be implemented in a combination of hardware and software. As an example, the camera calibration system 200 of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the camera calibration method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0103] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0104] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-described camera calibration methods. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the camera calibration method shown in any embodiment of the present invention by calling the computer program.

[0105] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0106] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0107] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0108] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0109] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0110] Among them, electronic devices can also be terminal devices. A terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0111] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0112] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0113] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0114] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0115] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A camera calibration method, characterized in that, include: Obtain the chessboard calibration image and perform corner detection to obtain corner data; Based on the position of each corner point in the image plane, the corner point data is divided into central region data and edge region data; Determine whether the distribution of the edge region data meets the preset conditions; if not, re-acquire the checkerboard calibration image. If the preset conditions are met, then only the data from the central region is used, and the higher-order coefficients in the denominator polynomial of the Rational distortion model are set to zero to solve for the camera initial parameters. Using the initial parameters of the camera as initial values, the data of the central region and the data of the edge region are fused, and a stability constraint is applied to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops. The objective function is constructed in conjunction with the reprojection error for optimization and solution, and the final calibration parameters of the camera are obtained. The camera's final calibration parameters are used to detect whether a distortion ring exists within the effective field of view. If it exists, the checkerboard calibration image is re-acquired; otherwise, the calibration is considered successful.

2. The camera calibration method according to claim 1, characterized in that, The step of dividing the corner data into central region data and edge region data based on the position of each corner point in the image plane includes: Calculate the pseudo radius of each corner point in the image plane; Corner data with pseudo-radius not greater than a preset radius threshold are classified as central region data, and corner data with pseudo-radius greater than the preset radius threshold are classified as edge region data.

3. The camera calibration method according to claim 2, characterized in that, The steps for calculating the pseudo-radius of any corner point in the image plane include: The ratio of the Euclidean distance from any corner point to the center point of the image plane to half the length of the diagonal of the image plane is taken as the pseudo radius corresponding to that corner point.

4. The camera calibration method according to claim 1, characterized in that, The step of determining whether the distribution of the edge region data meets preset conditions includes: Determine whether the proportion of the number of corner points in the edge region data to the total number of corner points in the corner point data is greater than a preset proportion threshold, and determine whether the symmetrical distribution of the corner points in the edge region data about the image center point in the image plane is uniform.

5. The camera calibration method according to claim 1, characterized in that, The denominator polynomial is The higher-order coefficients include , , The initial parameters of the camera include the camera's focal length. , Principal point coordinates , First-order coefficients of radial distortion Second-order coefficients Third-order coefficients and tangential distortion coefficient , ;in, , , For the numerator polynomial The coefficients in.

6. The camera calibration method according to claim 1, characterized in that, The stability constraints include soft constraints and hard constraints; the step of applying stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops includes: The soft constraint is applied to the denominator function at the mid-radius position of the effective field of view, and the hard constraint is applied to the denominator function at the maximum radius position of the effective field of view.

7. The camera calibration method according to claim 6, characterized in that, The step of applying the soft constraint to the denominator function at the mid-radius position of the effective field of view includes: Calculate the first difference between the reciprocal of the denominator function at the intermediate radius position and the reciprocal of the activation threshold; Take the upper limit of zero for the first difference, and multiply the result after taking the upper limit of zero by the soft constraint weight to obtain the first residual term; The square of the first residual term is used to construct a soft constraint term in the objective function to suppress the denominator function from approaching zero at the middle radius position.

8. The camera calibration method according to claim 6, characterized in that, The step of applying the hard constraint to the denominator function at the maximum radius position of the effective field of view includes: Calculate the second difference between the preset lower threshold and the value of the denominator function at the maximum radius position; Take the upper limit of zero for the second difference, and multiply the result after taking the upper limit of zero by the hard constraint weight to obtain the second residual term; The square of the second residual term is used to construct a hard constraint term in the objective function to suppress the denominator function from falling below the preset lower threshold at the maximum radius position.

9. A camera calibration system, characterized in that, include: The detection module is used to acquire a chessboard calibration image and perform corner detection to obtain corner data, and then send the corner data to the division module; The segmentation module is used to receive the corner data sent by the detection module, divide the corner data into central region data and edge region data according to the position of each corner point in the image plane, and send the central region data and the edge region data to the judgment module. The judgment module is used to receive the central region data and the edge region data sent by the division module, and to determine whether the distribution of the edge region data meets the preset conditions. If it does not meet the conditions, the checkerboard calibration image is re-acquired. If it meets the conditions, the central region data is sent to the processing module. The processing module is used to receive the central region data sent by the judgment module, use only the central region data to set the higher-order coefficients in the denominator polynomial of the Rational distortion model to zero, solve for the camera initial parameters, and send the camera initial parameters to the calibration module. The calibration module is used to receive the camera initial parameters sent by the processing module, use the camera initial parameters as initial values, fuse the central region data and the edge region data, apply stability constraints to the denominator function of the Rational distortion model within the effective field of view to suppress distortion loops, and construct an objective function in conjunction with the reprojection error for optimization and solution to obtain the final camera calibration parameters, and send the final camera calibration parameters to the verification module. The verification module is used to receive the final calibration parameters of the camera sent by the calibration module, and detect whether there is a distortion ring within the effective field of view according to the final calibration parameters of the camera. If it exists, the checkerboard calibration image is re-acquired; if it does not exist, the calibration is determined to be successful.

10. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the camera calibration method as described in any one of claims 1 to 8.