Camera calibration method, device, equipment and storage medium
Through the combination of B-spline curved surface and perspective projection model, the problem that camera calibration methods in the prior art are difficult to model complex distortions, and high-precision camera calibration is realized, which is suitable for cameras with various complex distortions.
Patent Information
- Application Number
- CN202410977746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-07-22
AI Technical Summary
Existing camera calibration methods are difficult to accurately model complex distortions in actual industrial applications, resulting in insufficient calibration accuracy within the global scope.
The nonlinear model of the camera imaging plane to the calibration plate plane is constructed using B-spline surface, and combined with the perspective projection model, linear and nonlinear modeling and calibration are performed separately to avoid introducing physical characteristic parameters of lens distortion.
It realizes high-precision camera calibration in the global range, which can suppress the influence of complex distortions. It is suitable for cameras with different distortions, with convenient operation and high calibration accuracy.
Smart Images

Figure CN118982585B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to a camera calibration method, apparatus, device, and storage medium. Background Art
[0002] Camera calibration is a key step in machine vision technology. Its purpose is to determine the transformation relationship between the imaging sensor's pixels and the actual three-dimensional space. Accurate camera calibration is crucial for achieving high-precision positioning, measurement, and other machine vision applications. In actual industrial applications, the camera's imaging optical path may contain complex lens distortion, such as in glass shields used to protect the lens during welding or in automobile windshields. Therefore, high-precision camera calibration methods that can suppress complex distortion can expand the application of machine vision technology in complex industrial environments and improve the precision and quality of manufacturing.
[0003] Currently, commonly used calibration methods require parameterized modeling based on the physical properties of the lens, using a small number of parameters representing radial and tangential distortion to model the distortion of the camera's global field of view. However, these commonly used camera calibration methods struggle to accurately model the complex distortions produced by the camera imaging process in real industrial applications through physical properties, making it difficult to achieve high global calibration accuracy. Summary of the Invention
[0004] In order to help solve the problem that traditional camera calibration methods find it difficult to accurately model the complex distortions generated by the camera imaging process in actual industrial applications through physical properties, resulting in difficulty in obtaining high precision on a global scale, the present application provides a camera calibration method, apparatus, device and storage medium.
[0005] In a first aspect, the present application provides a camera calibration method, which employs the following technical solution: the method is applied to a camera calibration system, the camera calibration system including a calibration plate including a plurality of marker points, and the method comprises:
[0006] Controlling the camera to obtain calibration plate images of the calibration plate at different preset positions and generate a calibration plate image set, wherein the calibration plate images are images formed on the camera imaging plane;
[0007] A camera nonlinear model for mapping the camera imaging plane to the calibration plate plane is constructed using B-spline surfaces, and the camera nonlinear model is solved to obtain a fitted B-spline surface group;
[0008] An ideal perspective projection model of the camera is constructed to generate a camera linear model, and the camera linear model is solved to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model.
[0009] In a specific embodiment, the coordinate system of the calibration plate plane is the calibration plate plane coordinate system, and the calibration plate plane coordinate system includes two directions of the X axis and the Y axis. The coordinate system of the camera imaging plane is the imaging plane coordinate system, and the imaging plane coordinate system includes two directions of the U axis and the V axis.
[0010] The camera nonlinear model includes:
[0011]
[0012] Among them, P k,q Represents the coordinates of the control points on the B-spline surface, n G and m G Respectively represent the number of control points in the U-axis direction and the V-axis direction of the imaging plane coordinate system, (u, v) represents the pixel coordinates in the imaging plane coordinate system, u m represents the maximum value of the pixel coordinate (u, v) in the U-axis direction of the imaging plane coordinate system, v m represents the maximum value of the pixel coordinate (u, v) in the V-axis direction of the imaging plane coordinate system, and Respectively represent the pixel coordinates (u, v) according to u m and v m The coordinate components on the U and V axes after normalization, represents the coordinates of the calibration plate plane coordinate system corresponding to the pixel coordinates (u, v); p represents the order of the B-spline, and They represent the U-axis p-order basis function and V-axis p-order basis function of the B-spline surface respectively;
[0013] The U-axis direction of the imaging plane coordinate system has a node vector U, and the V-axis direction of the calibration plate image coordinate system has a node vector V.
[0014] In a specific implementation scheme, solving the camera nonlinear model to obtain a fitted B-spline surface group includes:
[0015] Identify the plurality of marker points in the calibration plate image, detect and calculate the marker point normalized pixel coordinates of the plurality of marker points in the imaging plane coordinate system, and the marker point calibration coordinates of the plurality of marker points in the calibration plate plane coordinate system;
[0016] Solving the camera nonlinear model according to the normalized pixel coordinates of the marker points and the calibrated coordinates of the marker points, and generating a fitted B-spline surface;
[0017] The camera nonlinear model is constructed and solved for each image in the calibration plate image set to generate a fitted B-spline surface group.
[0018] In a specific implementation scheme, solving the camera nonlinear model according to the normalized pixel coordinates of the marker points and the calibrated coordinates of the marker points and generating a fitted B-spline surface includes:
[0019] According to the preset n G and m G The value of n is constructed on the calibration plate image. G +1 row and m G +1 column grid, calculating the normalized coordinates of the intersection points of the grids in the imaging plane coordinate system, and generating normalized pixel coordinates of the grid points;
[0020] Calculating the node vector U and the node vector V according to the normalized pixel coordinates of the grid points;
[0021] Calculating the U-axis p-order basis function according to the node vector U, calculating the V-axis p-order basis function according to the node vector V, and constructing a basis function matrix according to the calculated U-axis p-order basis function and V-axis p-order basis function;
[0022] Constructing a marker point matrix according to the calibrated coordinates of the marker points, and constructing a control point matrix to be solved according to the coordinates of the control points to be solved;
[0023] The control point matrix to be solved is expressed by multiplying the inverse matrix of the basis function matrix by the marker point matrix to obtain a surface solution matrix equation;
[0024] The least square method is used to solve the surface solution matrix equation to obtain a control point matrix and generate a fitted B-spline surface.
[0025] In a specific embodiment, the coordinate system of the calibration plate plane is a calibration plate coordinate plane system, the calibration plate plane coordinate system includes two directions of the X axis and the Y axis, the coordinate system of the camera imaging plane is an imaging plane coordinate system, and the imaging plane coordinate system includes two directions of the U axis and the V axis;
[0026] The perspective projection model of the camera under the ideal condition includes:
[0027] sQ′0=A(R i Q′ i +T i )
[0028] Where s represents the scale factor, A represents the intrinsic parameter matrix of the camera linear model, Represents the external parameter rotation matrix of the calibration plate at the i-th position, represents the external parameter translation matrix of the calibration plate at the i-th position; Q′ irepresents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the calibration plate plane, and Q′0 represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the virtual imaging plane.
[0029] In a specific implementation scheme, solving the camera linear model to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model includes:
[0030] Setting any calibration plate plane among the calibration plate planes as a virtual imaging plane, and the center corresponding to the virtual imaging plane as a virtual center;
[0031] Randomly sampling a preset number of pixel points in the calibration plate image, and obtaining pixel ray intersections between the preset number of pixel points and all the calibration plate planes, wherein the pixel ray intersections include pixel ray virtual intersections and pixel ray non-virtual intersections;
[0032] Calculating homogeneous coordinates of the virtual intersection point of the pixel ray and the non-virtual intersection point of the pixel ray according to the solved camera nonlinear model;
[0033] A conversion relationship between the homogeneous coordinates of the virtual intersection point of the pixel light and the non-virtual intersection point of the pixel light is constructed using a homography transformation, and a result of the homography transformation matrix is estimated;
[0034] Constructing an internal parameter solution matrix equation using the homography conversion matrix and the internal parameter matrix to be solved, solving the internal parameter solution matrix equation using the result of the homography conversion matrix, and generating an internal parameter matrix of the camera linear model;
[0035] An extrinsic parameter solution matrix equation is constructed using the homography transformation matrix and the extrinsic parameter matrix to be solved, the extrinsic parameter solution matrix equation is solved using the result of the homography transformation matrix, and the extrinsic parameter matrix of the camera linear model is generated, the extrinsic parameter matrix including the extrinsic parameter rotation matrix and the extrinsic parameter translation matrix.
[0036] In a specific embodiment, the internal parameter solution matrix equation includes:
[0037]
[0038] The external parameter solution matrix equation includes:
[0039]
[0040] Among them, h i1 、h i2 and h i3 Represent the three column vectors of the homography transformation matrix, r i1 , r i2 , ri3 Represents the three column vectors of the extrinsic rotation matrix, T i represents the extrinsic translation matrix, and C represents the coordinates of the virtual center.
[0041] In a second aspect, the present application provides a camera calibration device, which adopts the following technical solution: the device is applied to a camera calibration system, the camera calibration system includes a calibration plate, the calibration plate includes a plurality of marking points, and the device includes:
[0042] An image acquisition module is used to control the camera to acquire calibration plate images of the calibration plate at different preset positions and generate a calibration plate image set, wherein the calibration plate images are images formed on the camera imaging plane;
[0043] A nonlinear calibration module is used to construct a camera nonlinear model that maps the camera imaging plane to the calibration plate plane using B-spline surfaces, and solve the camera nonlinear model to obtain a fitted B-spline surface group;
[0044] The linear calibration module is used to construct an ideal perspective projection model of the camera, generate a camera linear model, and solve the camera linear model to obtain the intrinsic parameter matrix and extrinsic parameter matrix of the camera linear model.
[0045] In a third aspect, the present application provides a computer device that adopts the following technical solution: it includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute any of the above-mentioned camera calibration methods.
[0046] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: storing a computer program that can be loaded by a processor and execute any of the above-mentioned camera calibration methods.
[0047] In summary, this application has the following beneficial technical effects:
[0048] The calibration method of this scheme divides the camera imaging model into two parts, linear and nonlinear, and performs modeling and calibration separately. In the nonlinear part, the mapping relationship between the imaging plane affected by distortion and the calibration plate plane can be accurately calibrated by fitting a B-spline surface. In the linear part, the intrinsic and extrinsic parameters of the model are accurately estimated by establishing an ideal perspective projection model. In the modeling and calibration involving both nonlinear and linear parts, the present invention does not introduce any parameters representing the physical properties of lens distortion. Therefore, there is no need to specifically model the physical properties of distortion. It can be applied to cameras with various complex distortions and can effectively suppress the influence of complex distortion on the calibration results. It is easy to operate and has high calibration accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1is a flowchart of a camera calibration method according to an embodiment of the present application;
[0050] Figure 2 Schematic diagram of a B-spline surface regular grid of a camera nonlinear model in an embodiment of the present application;
[0051] Figure 3 Schematic diagram of the B-spline surface mapping model of the camera nonlinear model in an embodiment of the present application;
[0052] Figure 4 Schematic diagram of the perspective projection imaging model of the linear part of the camera in the embodiment of the present application;
[0053] Figure 5 Schematic diagram of the result of reconstructing the calibration plate point cloud based on the calibration results in an embodiment of the present application;
[0054] Figure 6 is a schematic diagram of a camera calibration device in an embodiment of the present application;
[0055] Figure 7 It is a schematic diagram used to embody a computer device in an embodiment of the present application.
[0056] Reference numerals: 601, image acquisition module; 602, nonlinear calibration module; 603, linear calibration module. DETAILED DESCRIPTION
[0057] The following combination Figure 1-Figure 7 This application is described in further detail.
[0058] The present application discloses a camera calibration method that can suppress complex lens distortions generated along the camera imaging optical path. This method divides the camera imaging model into two parts: linear and nonlinear. The linear and nonlinear parts are modeled and calibrated separately to achieve camera calibration. During the modeling and calibration of the linear and nonlinear parts, no parameters related to the physical properties of lens distortion are introduced. Therefore, this method does not require specific modeling of the physical properties of lens distortion, thereby avoiding the need to construct a lens distortion model based on the physical properties of distortion. This method achieves high global accuracy and is applicable to cameras with various complex distortions.
[0059] Camera calibration is a key step in machine vision technology. Its purpose is to obtain the transformation relationship between the imaging sensor's pixels and the actual three-dimensional space. Accurate camera calibration is crucial for achieving high-precision positioning, measurement, and other machine vision applications. In actual industrial applications, the camera's imaging optical path may contain some complex lens distortion, such as the glass cover used to protect the lens during welding or the front windshield of a car. Therefore, high-precision camera calibration methods that can suppress complex distortion can expand the application of machine vision technology in complex industrial environments and improve the precision and quality of manufacturing. Currently, commonly used calibration methods require parameterized modeling based on the physical properties of the lens, using a small number of parameters representing radial and tangential distortion to model the distortion model of the camera's global field of view. However, currently commonly used camera calibration methods have difficulty accurately modeling the complex distortion generated by the camera imaging process in actual industrial applications through physical properties, making it difficult to achieve high calibration accuracy across the entire field of view. To help improve camera calibration accuracy and enhance the versatility of camera calibration methods, the present application provides a camera calibration method.
[0060] Reference Figure 1 , the method comprises the following steps:
[0061] S10, controlling the camera to obtain calibration plate images at different preset positions of the calibration plate, and generating a calibration plate image set, where the calibration plate image is an image formed on the camera imaging plane.
[0062] Specifically, before using this camera calibration method, the user can place the calibration plate in any position and posture within the effective field of view of the camera, and control the camera to collect images of the calibration plate at different positions. The calibration plate contains several marker points, which are referenced by the Figure 2 The calibration plate contains multiple black solid circles arranged in rows and columns, with the landmarks being the centers of these solid circles. A calibration plate image is acquired at one position on the calibration plate, and multiple calibration plate images acquired at different positions are set as a calibration plate image set. It should be noted that the acquired calibration plate image is the image formed on the camera imaging plane, and the coordinate system of the calibration plate image is also the coordinate system of the camera imaging plane.
[0063] S20, constructing a camera nonlinear model that maps the camera imaging plane to the calibration plate plane using B-spline surfaces, and solving the camera nonlinear model to obtain a fitted B-spline surface group.
[0064] Specifically, a nonlinear camera model is constructed using B-spline surfaces, mapping the camera imaging plane to the calibration plate plane. This constructed nonlinear camera model is then solved to obtain a fitted set of B-spline surfaces, enabling nonlinear camera calibration. In this embodiment, the distortion is modeled using a plane-to-plane mapping relationship, thus avoiding the need for specialized modeling of lens distortion and minimizing reliance on the physical properties of lens distortion, achieving high-precision calibration across the entire system.
[0065] The camera calibration process involves two coordinate systems, the calibration plate plane coordinate system and the camera imaging plane coordinate system. The coordinate system where the calibration plate plane is located is the calibration plate plane coordinate system, which includes two mutually perpendicular X-axis and Y-axis directions. The coordinate system where the camera imaging plane is located is the imaging plane coordinate system, which includes two mutually perpendicular U-axis and V-axis directions. The camera nonlinear model constructed using B-spline surface can be expressed as:
[0066]
[0067] Among them, P k,q Represents the coordinates of the control points on the B-spline surface, P = [X P , Y P ] T , X P and Y P They represent the coordinate components of the control point in the X-axis and Y-axis directions of the calibration plate plane coordinate system; n G and m G Respectively represent the number of control points in the U-axis direction and the V-axis direction of the imaging plane coordinate system, (u, v) represents the pixel coordinates in the imaging plane coordinate system, u m Indicates the maximum value of the pixel coordinate (u, v) in the U-axis direction of the imaging plane coordinate system, v m Indicates the maximum value of the pixel coordinate (u, v) in the V-axis direction of the imaging plane coordinate system, and Respectively represent the pixel coordinates (u, v) according to u m and v m The coordinate components on the U and V axes after normalization, Indicates the coordinates of the calibration plate plane coordinate system corresponding to the pixel coordinates (u, v); p represents the order of the B-spline, and They represent the U-axis p-order basis function and V-axis p-order basis function of the B-spline surface respectively; the U-axis direction of the imaging plane coordinate system has a node vector U, and the V-axis direction of the calibration plate image coordinate system has a node vector V.
[0068] The U-axis p-order basis function can be expressed as:
[0069]
[0070] The V-axis p-order basis function can be expressed as:
[0071]
[0072] in, n G +p+1-dimensional elements of the node vector U, is m G +p+1-dimensional elements of the node vector V,
[0073] S30, constructing an ideal perspective projection model of the camera, generating a camera linear model, and solving the camera linear model to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model.
[0074] Specifically, a perspective projection model of the camera under ideal conditions is constructed to generate a camera linear model; the part of the light that does not enter the lens during the imaging process is regarded as an ideal perspective projection imaging, which is defined as the linear part of the camera model. It can also be understood that when the imaging light is not refracted through the lens, the camera imaging can be regarded as an ideal perspective projection imaging. The imaging area that does not enter the lens can be modeled as the linear part of the imaging model, thereby generating a camera linear model. After solving the camera linear model, the intrinsic parameter matrix and extrinsic parameter matrix of the camera linear model are obtained to realize the calibration of the linear part of the camera.
[0075] Ideally, the camera's perspective projection model can be expressed as:
[0076] sQ′0=A(R i Q′ i +T i )
[0077] Where s represents the scale factor, A represents the intrinsic parameter matrix of the camera linear model, Represents the external parameter rotation matrix of the calibration plate at the i-th position, represents the external parameter translation matrix of the calibration plate at the i-th position; Q′ i represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the calibration plate plane, Q′i=[X i , Y i , 1] T (i=0, 1, ..., n), X i and Y iThey respectively represent the coordinate components of the X-axis and Y-axis of the intersection point of the pixel imaging light in the coordinate system of the i-th group of calibration plate planes, and Q′0 represents the homogeneous coordinates of the intersection point of the imaging light of a single pixel in the calibration plate image and the virtual imaging plane, that is, the homogeneous coordinates of the intersection point of the imaging light of a single pixel with the calibration plate plane when i=0.
[0078] Finally, the camera calibration is completed by combining the linear calibration results and nonlinear calibration results.
[0079] In the present application, the camera imaging model is divided into two parts, linear and nonlinear, which are modeled and calibrated separately. In the nonlinear part, the mapping relationship between the imaging plane affected by the distortion and the calibration plate plane can be accurately calibrated by fitting the B-spline surface. In the linear part, an ideal perspective projection model is established and the precise parameters of the model can be obtained by solving the model. In the modeling and calibration of both the nonlinear and linear parts, no parameters representing the physical properties of the lens distortion are introduced. Therefore, there is no need to specifically model the physical properties of the distortion, thereby avoiding the use of the physical parameters of the distortion to construct the camera imaging model, effectively suppressing the influence of complex distortion on the calibration results, and being applicable to cameras with various complex distortions. In addition, the camera calibration method of the present solution is easy to operate and has high calibration accuracy.
[0080] In one embodiment, the step of solving the camera nonlinear model to obtain the fitted B-spline surface group can be specifically performed as follows:
[0081] First, identify several landmark points in the calibration plate image, detect and calculate the normalized pixel coordinates of several landmark points in the imaging plane coordinate system where n C Indicates the number of detectable markers, sorts the detected markers, and determines the marker calibration coordinates Q of several markers in the calibration plate plane coordinate system according to the sorting results Cl =[X Cl , Y Cl ] T , X Cl and Y Cl Respectively represent the coordinate components of the lth marker point in the X-axis and Y-axis directions of the calibration plate plane coordinate system. It should be noted that the technology for acquiring the calibration plate image, detecting and calculating the normalized pixel coordinates of the marker points, and the method for obtaining the calibration coordinates of the marker points can be directly implemented using existing calculation and detection methods, and the existing technologies used will not be repeated in the embodiments of this application.
[0082] Afterwards, the camera nonlinear model is solved based on the normalized pixel coordinates of the landmark points and the calibration coordinates of the landmark points. The landmark points on the detected calibration plate are converted into control points on the B-spline surface, and the B-spline surface model is fitted to generate a fitted B-spline surface. Afterwards, the camera nonlinear model is constructed and solved for each image in the calibration plate image set to generate a fitted B-spline surface group.
[0083] The steps of solving the camera nonlinear model according to the normalized pixel coordinates of the marker points and the calibrated coordinates of the marker points and generating the fitted B-spline surface can be specifically performed as follows:
[0084] First, the user sets n in advance G and m G The system sets the value of n according to the pre-set value. G and m G The value of n is constructed on the calibration plate image G +1 row and m G +1 column grid, see Figure 2 As shown, the U axis and V axis are the coordinate axes of the imaging plane coordinate system, the X axis and Y axis are the coordinate axes of the calibration plate plane coordinate system, and the normalized coordinates of the intersection of the grid in the imaging plane coordinate system are calculated, and the normalized pixel coordinates of the grid points are generated. The coordinate components of the normalized pixel coordinates of the grid points in the U axis and V axis can be expressed as:
[0085]
[0086] It should be noted that the setting of n G and m G The value of (n G +1)×(m G +1)<n C .
[0087] Afterwards, the node vector U and node vector V are calculated based on the normalized pixel coordinates of the grid points. Taking the node vector U in the U-axis direction as an example, the calculation method of the node elements in the node vector can be expressed as:
[0088]
[0089] Similarly, the node vector V in the V-axis direction can be calculated using the above node element calculation formula.
[0090] Afterwards, the node elements in the calculated node vector U and node vector V are substituted into the U-axis p-order basis function and the V-axis p-order basis function respectively to calculate the normalized pixel coordinates The corresponding basis functions and The value of and The value of constructs the basis function matrix, and the constructed basis function matrix It can be expressed as:
[0091]
[0092] Construct a marker point matrix based on the calibration coordinates of the marker points Construct the control point matrix to be solved according to the coordinates of the control points to be solved The marker point matrix can also be understood as a data point matrix, which is composed of the marker point coordinates Q cl =[X Cl , Y Cl ] T The matrix is assigned a value, and the control point matrix is the matrix to be solved for the position. The constructed marker point matrix can be expressed as:
[0093]
[0094] The constructed control point matrix can be expressed as:
[0095]
[0096] After the matrix is constructed, the inverse matrix of the basis function matrix is multiplied by the marker matrix to represent the control point matrix to be solved to obtain the surface solution matrix equation. The constructed surface solution matrix equation can be expressed as: D = N -1 Q. Finally, the least squares method is used to solve the surface matrix equation to obtain the control point matrix and generate the fitted B-spline surface.
[0097] Reference Figure 3 , is a schematic diagram of the B-spline surface mapping model. The black solid circles in the figure represent control points, which are used to construct the parameter points of the B-spline surface. The asterisks represent data points, which can also be understood as calibration points. It should be noted that the number of control points is determined by constructing grid intersections on the calibration plate image. The grid intersections are the parameter points for fitting the B-spline surface. The number of control points in the B-spline surface is consistent with the number of grid intersections. In the matrix equation D = N -1 In Q, the control point matrix is an unknown matrix, and the dimension of the control point matrix is the number of grid points (n G +1)×(m G +1), and the number of detectable landmarks determines the dimension of the landmark matrix. Therefore, in order to solve the matrix equation of the constructed surface, n is set to G and m G The value of needs to satisfy (n G +1)×(m G +1)<<n C .
[0098] In the present application, the mapping relationship between the imaging plane of the camera affected by the distortion and the calibration plate plane can be accurately calibrated by fitting the B-spline surface. In the basis function, according to the recursive characteristic calculation, there are only p+1 basis functions whose values are not 0, so the coordinate Q Cl The calculation is obtained by interpolating (p+1)*(p+1) control points according to their corresponding basis function values, which is expressed as a local nonlinear interpolation. Therefore, by moving the position of the control points, the B-spline surface can be made to locally approximate the real mapping relationship. This feature enables the nonlinear part of the camera model to simulate various complex and irregular special distortions. The position of the control points can be quickly and accurately adjusted through data fitting. The model construction and data fitting methods can accurately obtain the required mapping relationship while parametrically modeling the distortion. This method is applicable to any single distortion or combined distortion of multiple lenses in the camera imaging process, and can effectively suppress the influence of complex distortion on the calibration results.
[0099] In one embodiment, the step of solving the camera linear model to obtain the intrinsic parameter matrix and the extrinsic parameter matrix of the camera linear model can be specifically performed as follows:
[0100] First, refer to Figure 4 , set any calibration plane in the calibration plane as the virtual imaging plane, i=0 for the virtual imaging plane, and the center corresponding to the virtual imaging plane is the virtual center. The virtual center can also be understood as the imaging light of all pixels converging at a set virtual center under the perspective projection assumption. The virtual center can be expressed as: C=[C x , C y , C z ] T , where C x 、C y and C z They represent the coordinate components of the virtual center in the X-axis, Y-axis, and Z-axis directions in the camera coordinate system of the linear part. It should be noted that A represents the intrinsic parameter matrix of the imaging model of the linear part of the camera. The relationship between the intrinsic parameter matrix A and the virtual center can be expressed as:
[0101]
[0102] After that, a preset number of pixels are randomly sampled in the calibration plate image, and the number of pixels n obtained is P (n P>4), obtain pixel ray intersections of a preset number of pixel points and all calibration plate planes, including pixel ray virtual intersections and pixel ray non-virtual intersections; wherein, pixel ray non-virtual intersections can be understood as the intersections of pixel imaging rays and calibration plate planes other than the virtual imaging plane, and pixel ray virtual intersections can be understood as the intersections of pixel imaging rays and the virtual imaging plane where i = 0. Based on the camera nonlinear model of the solved B-spline surface, calculate the homogeneous coordinates of the pixel ray virtual intersections and the pixel ray non-virtual intersections, that is, the homogeneous coordinates Q′ of the pixel ray intersections ij =[X ii , Y ij , 1] T (i=0,1,…,n)(j=1,2,…,n P ).
[0103] The homography transformation is used to construct the transformation relationship between the homogeneous coordinates of the virtual intersection point of the pixel ray and the non-virtual intersection point of the pixel ray, and the result of the homography transformation matrix is estimated; specifically, the intersection point Q′ on the calibration plate plane with i≠0 is constructed using the homography transformation ij =[X ij , Y ij , 1] T (i=1,2,...,n)(j=1,2,...,n p ) to the intersection point Q′ on the virtual imaging plane of i=0 0j =[X 0j , Y 0j , 1] T (j=1,2,…,n p ), the conversion relationship can be expressed as:
[0104] s[X 0j Y 0j 1] T =H i [X ij Y ij 1] T
[0105] in, represents the homography matrix from the calibration plate plane to the virtual imaging plane (i is 0), excluding the virtual imaging plane (i is not 0), h i1 、h i2 and h i3 They represent the three column vectors of the homography transformation matrix respectively; thereafter, the homography transformation matrix can be estimated by the existing estimation method to obtain the result of the homography transformation matrix.
[0106] Finally, the intrinsic parameter solution matrix equation and the extrinsic parameter solution matrix equation are constructed and the intrinsic parameter matrix and extrinsic parameter matrix of the camera linear model are calculated. Specifically, the intrinsic parameter solution matrix equation is constructed by the homography transformation matrix and the intrinsic parameter matrix to be solved. The intrinsic parameter solution matrix equation can be expressed as:
[0107]
[0108] The result of the homography transformation matrix is used to solve the intrinsic parameter solution matrix equation, and the intrinsic parameter matrix of the camera linear model is generated. The coordinate C of the virtual center is obtained by solving the relationship between the intrinsic parameter matrix and the virtual center. The extrinsic parameter solution matrix equation is constructed by the homography transformation matrix and the extrinsic parameter matrix to be solved. The constructed extrinsic parameter solution matrix equation can be expressed as:
[0109]
[0110] Among them, h i1 、h i2 and h i3 Represent the three column vectors of the homography transformation matrix, r i1 , r i2 , r i3 Represents the three column vectors of the extrinsic rotation matrix, T i represents the extrinsic translation matrix, and C represents the coordinates of the virtual center.
[0111] The result of the homography transformation matrix is used to solve the extrinsic matrix equation and generate the extrinsic matrix of the camera linear model. The extrinsic matrix includes the extrinsic rotation matrix R i (i=1, 2, ..., n) and the external parameter translation matrix T i (i=1, 2, ..., n)
[0112] In the present application, the linear part is calibrated and an ideal perspective projection model is established to accurately estimate the intrinsic and extrinsic parameters of the model. In addition, the modeling of the linear part does not use distortion-related parameters, so there is no need to specifically model the distortion. It can be applied to cameras with various complex distortions and can effectively suppress the influence of complex distortion on the calibration results.
[0113] It should be noted that in the embodiment of the present application, error detection is performed on the camera calibration method through experiments. Specifically, the camera calibration method is used to calibrate a camera equipped with a complementary metal oxide semiconductor photosensitive chip. The camera has a resolution of 720×540 and is equipped with a perspective projection lens with a focal length of 10mm. In addition, an irregular curved lens is attached in front of the lens to simulate the complex distortion caused by a glass protective cover in actual applications. In order to verify the calibration results, a total of 30 groups of calibration plate images are first reconstructed into a three-dimensional point cloud in the camera coordinate system based on the parameters obtained by calibration. The reconstruction method can be specifically as follows: First, the three-dimensional coordinates [X, Y, 0]T of each calibration plate plane coordinate system corresponding to each pixel are calculated using the B-spline surface parameters and the camera nonlinear model, and then converted to the camera coordinate system through the extrinsic rotation matrix and the extrinsic translation matrix, which are calculated as: [X0 Y0 Z0] T =R[XY 0] T +T;
[0114] Among them, X0, Y0 and Z0 represent the coordinate components of the point on the calibration plate plane in the X-axis, Y-axis and Z-axis directions of the camera coordinate system; the reconstruction results refer to Figure 5 , accurately restored the position and posture of the calibration plate, which shows that this calibration method can be used to calibrate cameras with complex distortion.
[0115] In addition, 5 landmark points were selected from each of the 30 calibration plates, and the average reprojection error was calculated based on the camera parameters calibrated by the camera calibration method. The calculation method is:
[0116]
[0117] Among them, Q′ i,j =[X i,j , Y i,j , 1] T represents the homogeneous coordinates of the marker point projected on the virtual imaging plane, Q′ Ci,j =[X Ci,j , Y Ci,j , 1] T It represents the true value of the homogeneous coordinates of the landmark points in the calibration plate coordinate system obtained by sorting the landmark points, H l Indicates that the first two column vectors r of the calibrated internal parameter matrix A and external parameter rotation matrix i1 and r i2 And the external parameter translation matrix T i The obtained homography matrix can be calculated as follows:
[0118] H i =A[r i1 r i2 T i ]
[0119] The average reprojection error calculated above is 0.00492mm. For comparison, the camera was calibrated using the traditional OpenCV camera calibration method, and the reprojection error calculated using the same method was 0.06104mm. The reprojection error obtained using this method for cameras with complex distortion is significantly lower than that obtained using the OpenCV method, demonstrating that this method can better suppress the impact of complex distortion on camera calibration accuracy.
[0120] Figure 1 FIG. 1 is a flow chart of a camera calibration method in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows; unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be executed in other orders; and Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0121] Based on the above method, an embodiment of the present application also discloses a camera calibration device.
[0122] Reference Figure 6 , the device includes the following modules:
[0123] An image acquisition module 601 is used to control the camera to acquire calibration plate images at different preset positions of the calibration plate and generate a calibration plate image set, where the calibration plate image is an image formed on the camera imaging plane;
[0124] The nonlinear calibration module 602 is used to construct a camera nonlinear model that maps the camera imaging plane to the calibration plate plane using B-spline surfaces, and solve the camera nonlinear model to obtain a fitted B-spline surface group;
[0125] The linear calibration module 603 is used to construct a perspective projection model of the camera under ideal conditions, generate a camera linear model, and solve the camera linear model to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model.
[0126] In one embodiment, the coordinate system of the calibration plate plane is the calibration plate plane coordinate system, which includes two directions: the X-axis and the Y-axis. The coordinate system of the camera imaging plane is the imaging plane coordinate system, which includes two directions: the U-axis and the V-axis. In the nonlinear calibration module 602, the camera nonlinear model includes:
[0127]
[0128] Among them, P k,q Represents the coordinates of the control points on the B-spline surface, n G and m G Respectively represent the number of control points in the U-axis direction and the V-axis direction of the imaging plane coordinate system, (u, v) represents the pixel coordinates in the imaging plane coordinate system, u m Indicates the maximum value of the pixel coordinate (uv) in the U-axis direction of the imaging plane coordinate system, v m Indicates the maximum value of the pixel coordinate (u, v) in the V-axis direction of the imaging plane coordinate system, and Respectively represent the pixel coordinates (u, v) according to u m and v m The coordinate components on the U and V axes after normalization, Indicates the coordinates of the calibration plate plane coordinate system corresponding to the pixel coordinates (u, v); p represents the order of the B-spline, and They represent the U-axis p-order basis function and V-axis p-order basis function of the B-spline surface respectively; the U-axis direction of the imaging plane coordinate system has a node vector U, and the V-axis direction of the calibration plate image coordinate system has a node vector V.
[0129] In one embodiment, the nonlinear calibration module 602 is specifically used to identify a number of marker points in the calibration plate image, detect and calculate the normalized pixel coordinates of the marker points in the imaging plane coordinate system, and the calibration coordinates of the marker points in the calibration plate plane coordinate system; solve the camera nonlinear model based on the normalized pixel coordinates of the marker points and the calibration coordinates of the marker points, and generate a fitted B-spline surface; construct and solve the camera nonlinear model for each image in the calibration plate image set, and generate a fitted B-spline surface group.
[0130] In one embodiment, the nonlinear calibration module 602 is specifically configured to: G and m G The value of n is constructed on the calibration plate image G +1 行 and m G+1 column grid, calculate the normalized coordinates of the grid intersection in the imaging plane coordinate system, and generate the normalized pixel coordinates of the grid points; calculate the node vector U and the node vector V according to the normalized pixel coordinates of the grid points; calculate the U-axis p-order basis function according to the node vector U, calculate the V-axis p-order basis function according to the node vector V, and construct a basis function matrix based on the calculated U-axis p-order basis function and V-axis p-order basis function; construct a landmark point matrix based on the calibration coordinates of the landmark points, and construct a control point matrix to be solved based on the coordinates of the control points to be solved; use the inverse matrix of the basis function matrix to multiply the landmark matrix with the control point matrix to express the control point matrix to obtain the surface solution matrix equation; use the least squares method to solve the surface solution matrix equation, obtain the control point matrix, and generate a fitted B-spline surface.
[0131] In one embodiment, the coordinate system of the calibration plate plane is the calibration plate coordinate plane system, which includes the X-axis and Y-axis directions. The coordinate system of the camera imaging plane is the imaging plane coordinate system, which includes the U-axis and V-axis directions. In the linear calibration module 603, the perspective projection model of the camera ideally includes:
[0132] sQ′0=A(R i Q′ i +T i )
[0133] Among them, s represents the scale factor, A represents the intrinsic parameter matrix of the camera linear model, Represents the external parameter rotation matrix of the calibration plate at the i-th position, represents the external parameter translation matrix of the calibration plate at the i-th position; Q′ i represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the calibration plate plane, and Q′0 represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the virtual imaging plane.
[0134] In one embodiment, the linear calibration module 603 is specifically used to set any calibration plate plane in the calibration plate plane as a virtual imaging plane, and the center corresponding to the virtual imaging plane is the virtual center; randomly sample a preset number of pixel points in the calibration plate image, and obtain the pixel ray intersections of the preset number of pixel points and all the calibration plate planes, where the pixel ray intersections include the pixel ray virtual intersections and the pixel ray non-virtual intersections; calculate the homogeneous coordinates of the pixel ray virtual intersections and the pixel ray non-virtual intersections according to the solved camera nonlinear model; and use homography transformation to construct the pixel ray virtual intersections. The transformation relationship between the homogeneous coordinates of the point and the non-virtual intersection of the pixel light is calculated, and the result of the homography transformation matrix is estimated; the intrinsic parameter solution matrix equation is constructed through the homography transformation matrix and the intrinsic parameter matrix to be solved, and the intrinsic parameter solution matrix equation is solved using the result of the homography transformation matrix, and the intrinsic parameter matrix of the camera linear model is generated; the extrinsic parameter solution matrix equation is constructed through the homography transformation matrix and the extrinsic parameter matrix to be solved, and the extrinsic parameter solution matrix equation is solved using the result of the homography transformation matrix, and the extrinsic parameter matrix of the camera linear model is generated, and the extrinsic parameter matrix includes the extrinsic rotation matrix and the extrinsic translation matrix.
[0135] In one embodiment, solving the matrix equation for the internal parameters in the linear calibration module 603 includes:
[0136]
[0137] Solving matrix equations with external parameters includes:
[0138]
[0139] Among them, h i1 、h i2 and h i3 Represents the three column vectors of the homography transformation matrix, r i1 , r i2 , r i3 Represents the three column vectors of the extrinsic rotation matrix, T i represents the extrinsic translation matrix, and C represents the coordinates of the virtual center.
[0140] The camera calibration device provided in the embodiment of the present application can be applied to the camera calibration method provided in the above embodiment. For relevant details, refer to the above method embodiment. Its implementation principles and technical effects are similar and will not be repeated here.
[0141] It should be noted that the camera calibration device provided in the embodiments of the present application only uses the division of the above-mentioned functional modules / functional units as an example to illustrate when performing camera calibration. In actual applications, the above-mentioned functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the camera calibration device can be divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the camera calibration method provided in the above-mentioned method embodiment and the implementation method of the camera calibration device provided in this embodiment belong to the same concept. The specific implementation process of the camera calibration device provided in this embodiment is detailed in the above-mentioned method embodiment and will not be repeated here.
[0142] The embodiment of the present application also discloses a computer device.
[0143] Specifically, if Figure 7 As shown, the computer device can be a computer device such as a desktop computer, a laptop computer, a handheld computer, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. The processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, graphics processing units (GPU), embedded neural network processors (NPU) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned chips.
[0144] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above-mentioned embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the method in the above-mentioned method embodiment is implemented. The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0145] The embodiment of the present application also discloses a computer-readable storage medium.
[0146] Specifically, a computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in the above-mentioned method implementation is implemented. Those skilled in the art will understand that all or part of the processes in the above-mentioned implementation method of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the implementation methods of the above-mentioned methods. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memories.
[0147] This specific embodiment is merely an explanation of the present invention and is not intended to limit the present invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as such modifications are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A camera calibration method, characterized by: The method is applied to a camera calibration system, wherein the camera calibration system includes a calibration plate, and the calibration plate includes a plurality of marking points. The method includes: Controlling the camera to obtain calibration plate images of the calibration plate at different preset positions and generate a calibration plate image set, wherein the calibration plate images are images formed on the camera imaging plane; A camera nonlinear model for mapping the camera imaging plane to the calibration plate plane is constructed using B-spline surfaces, and the camera nonlinear model is solved to obtain a fitted B-spline surface group; Constructing an ideal perspective projection model of the camera, generating a camera linear model, and solving the camera linear model to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model; The coordinate system where the calibration plate plane is located is the calibration plate coordinate plane system, and the calibration plate plane coordinate system includes two directions of the X axis and the Y axis. The coordinate system where the camera imaging plane is located is the imaging plane coordinate system, and the imaging plane coordinate system includes two directions of the U axis and the V axis. The perspective projection model of the camera under the ideal condition includes: sQ′0=A(R i Q′ i +T i ) Where s represents the scale factor, A represents the intrinsic parameter matrix of the camera linear model, Represents the external parameter rotation matrix of the calibration plate at the i-th position, represents the external parameter translation matrix of the calibration plate at the i-th position; Q′ i represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the calibration plate plane, and Q′0 represents the homogeneous coordinates of the intersection of the imaging light of a single pixel in the calibration plate image and the virtual imaging plane; Solving the camera linear model to obtain the intrinsic parameter matrix and the extrinsic parameter matrix of the camera linear model includes: Setting any calibration plate plane among the calibration plate planes as a virtual imaging plane, and the center corresponding to the virtual imaging plane as a virtual center; Randomly sampling a preset number of pixel points in the calibration plate image, and obtaining pixel ray intersections between the preset number of pixel points and all the calibration plate planes, wherein the pixel ray intersections include pixel ray virtual intersections and pixel ray non-virtual intersections; Calculating homogeneous coordinates of the virtual intersection point of the pixel ray and the non-virtual intersection point of the pixel ray according to the solved camera nonlinear model; A conversion relationship between the homogeneous coordinates of the virtual intersection point of the pixel light and the non-virtual intersection point of the pixel light is constructed using a homography transformation, and a result of the homography transformation matrix is estimated; Constructing an internal parameter solution matrix equation using the homography conversion matrix and the internal parameter matrix to be solved, solving the internal parameter solution matrix equation using the result of the homography conversion matrix, and generating an internal parameter matrix of the camera linear model; Constructing an extrinsic parameter solution matrix equation through the homography transformation matrix and the extrinsic parameter matrix to be solved, solving the extrinsic parameter solution matrix equation using the result of the homography transformation matrix, and generating an extrinsic parameter matrix of the camera linear model, wherein the extrinsic parameter matrix includes an extrinsic parameter rotation matrix and an extrinsic parameter translation matrix; The non-virtual intersection point of the pixel ray is the intersection point of the pixel imaging ray and the calibration plate plane excluding the virtual imaging plane, and the virtual intersection point of the pixel ray is the intersection point of the pixel imaging ray and the virtual imaging plane.
2. The method according to claim 1, wherein: The coordinate system where the calibration plate plane is located is the calibration plate plane coordinate system, and the calibration plate plane coordinate system includes two directions of the X axis and the Y axis. The coordinate system where the camera imaging plane is located is the imaging plane coordinate system, and the imaging plane coordinate system includes two directions of the U axis and the V axis. The camera nonlinear model includes: Among them, P k,q Represents the coordinates of the control points on the B-spline surface, n G and m G Respectively represent the number of control points in the U-axis direction and the V-axis direction of the imaging plane coordinate system, (u, v) represents the pixel coordinates in the imaging plane coordinate system, u m represents the maximum value of the pixel coordinate (u, v) in the U-axis direction of the imaging plane coordinate system, v m represents the maximum value of the pixel coordinate (u, v) in the V-axis direction of the imaging plane coordinate system, and Respectively represent the pixel coordinates (u, v) according to u m and v m The coordinate components on the U and V axes after normalization, represents the coordinates of the calibration plate plane coordinate system corresponding to the pixel coordinates (u, v); p represents the order of the B-spline, and They represent the U-axis p-order basis function and V-axis p-order basis function of the B-spline surface respectively; The U-axis direction of the imaging plane coordinate system has a node vector U, and the V-axis direction of the calibration plate image coordinate system has a node vector V.
3. The method according to claim 2, wherein: The B-spline surface group obtained by solving the camera nonlinear model includes: Identify the plurality of marker points in the calibration plate image, detect and calculate the marker point normalized pixel coordinates of the plurality of marker points in the imaging plane coordinate system, and the marker point calibration coordinates of the plurality of marker points in the calibration plate plane coordinate system; Solving the camera nonlinear model according to the normalized pixel coordinates of the marker points and the calibrated coordinates of the marker points, and generating a fitted B-spline surface; The camera nonlinear model is constructed and solved for each image in the calibration plate image set to generate a fitted B-spline surface group.
4. The method according to claim 3, wherein: Solving the camera nonlinear model according to the normalized pixel coordinates of the marker points and the calibrated coordinates of the marker points and generating a fitted B-spline surface includes: According to the preset n G and m G The value of n is constructed on the calibration plate image. G +1 row and m G +1 column grid, calculating the normalized coordinates of the intersection points of the grids in the imaging plane coordinate system, and generating normalized pixel coordinates of the grid points; Calculating the node vector U and the node vector V according to the normalized pixel coordinates of the grid points; Calculating the U-axis p-order basis function according to the node vector U, calculating the V-axis p-order basis function according to the node vector V, and constructing a basis function matrix according to the calculated U-axis p-order basis function and V-axis p-order basis function; Constructing a marker point matrix according to the calibrated coordinates of the marker points, and constructing a control point matrix to be solved according to the coordinates of the control points to be solved; The control point matrix to be solved is expressed by multiplying the inverse matrix of the basis function matrix by the marker point matrix to obtain a surface solution matrix equation; The least square method is used to solve the surface solution matrix equation to obtain a control point matrix and generate a fitted B-spline surface.
5. The method according to claim 1, wherein: The internal parameter solution matrix equation includes: The external parameter solution matrix equation includes: Among them, h i1 、h i2 and h i3 Represent the three column vectors of the homography transformation matrix, r i1 , r i2 , r i3 Represents the three column vectors of the extrinsic rotation matrix, T i represents the extrinsic translation matrix, and C represents the coordinates of the virtual center.
6. A camera calibration device, characterized in that: The device is applied to a camera calibration system, wherein the camera calibration system includes a calibration plate, and the calibration plate includes a plurality of marking points. The device includes: An image acquisition module (601) is used to control a camera to acquire calibration plate images at different preset positions of the calibration plate and generate a calibration plate image set, wherein the calibration plate images are images formed on a camera imaging plane; A nonlinear calibration module (602) is used to construct a camera nonlinear model for mapping the camera imaging plane to the calibration plate plane using B-spline surfaces, and solve the camera nonlinear model to obtain a fitted B-spline surface group; A linear calibration module (603) is used to construct a perspective projection model of the camera under ideal conditions, generate a camera linear model, and solve the camera linear model to obtain an intrinsic parameter matrix and an extrinsic parameter matrix of the camera linear model; The coordinate system of the calibration plate plane is the calibration plate coordinate plane system, which includes the X-axis and Y-axis directions. The coordinate system of the camera imaging plane is the imaging plane coordinate system, which includes the U-axis and V-axis directions. In the linear calibration module (603), the perspective projection model of the camera under ideal conditions includes: sQ′0=A(R i Q′ i +T i ) Among them, s represents the scale factor, A represents the intrinsic parameter matrix of the camera linear model, Represents the external parameter rotation matrix of the calibration plate at the i-th position, represents the external parameter translation matrix of the calibration plate at the i-th position; Q′ i represents the homogeneous coordinates of the intersection of the imaging ray of a single pixel in the calibration plate image and the calibration plate plane, Q′0 represents the homogeneous coordinates of the intersection of the imaging ray of a single pixel in the calibration plate image and the virtual imaging plane; The linear calibration module (603) is specifically used to set any calibration plate plane in the calibration plate plane as a virtual imaging plane, and the center corresponding to the virtual imaging plane is the virtual center; randomly sample a preset number of pixel points in the calibration plate image, obtain the pixel light intersections of the preset number of pixel points and all the calibration plate planes, and the pixel light intersections include pixel light virtual intersections and pixel light non-virtual intersections; calculate the homogeneous coordinates of the pixel light virtual intersections and the pixel light non-virtual intersections according to the solved camera nonlinear model; use homography transformation to construct the pixel light virtual intersections and image The transformation relationship between the homogeneous coordinates of the non-virtual intersection points of the element rays is obtained, and the result of the homography transformation matrix is estimated; the intrinsic parameter solution matrix equation is constructed through the homography transformation matrix and the intrinsic parameter matrix to be solved, and the intrinsic parameter solution matrix equation is solved using the result of the homography transformation matrix, and the intrinsic parameter matrix of the camera linear model is generated; the extrinsic parameter solution matrix equation is constructed through the homography transformation matrix and the extrinsic parameter matrix to be solved, and the extrinsic parameter solution matrix equation is solved using the result of the homography transformation matrix, and the extrinsic parameter matrix of the camera linear model is generated, and the extrinsic parameter matrix includes the extrinsic rotation matrix and the extrinsic translation matrix.
7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that A computer program is stored which can be loaded by a processor and executes the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Camera calibration method based on uniaxial high-precision displacement platform
CN110298888A
Large-field-of-view camera calibration method based on planar target combination
CN111179357A