Camera dynamic calibration method, device, computing equipment and storage medium

By dynamically calibrating the image parameters of the camera at different rotation angles, the problem of inaccurate calibration caused by changes in camera viewing angle is solved, the scanning accuracy and efficiency are improved, and a more accurate 3D model is generated.

CN115496813BActive Publication Date: 2025-09-16SHENZHEN XINXIN SMART LIFE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211265807.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2025-09-16
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

The binocular camera calibration method used in existing 3D scanners is static calibration, which cannot adapt to changes in camera viewing angle, resulting in inaccurate calibration and requiring dynamic calibration.

Method used

By obtaining the image parameters of the camera at different rotation angles, dynamic calibration is performed using the preset pose table, the deviation value is calculated and the RT matrix is ​​adjusted until the deviation is minimized to obtain an accurate calibration matrix.

Benefits of technology

The scanning accuracy and dynamic calibration efficiency of the camera are improved, ensuring that the pictures taken by the rotated camera can generate more accurate three-dimensional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496813B_ABST
    Figure CN115496813B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of machine vision technology, and in particular to a camera dynamic calibration method, apparatus, computing device, and storage medium. The method obtains image parameters of a first camera and a second camera in an initial state and after a rotation angle, and performs dynamic calibration based on the image parameters of the different states and a preset pose table, thereby determining the calibration RT matrix of the first camera and the second camera. Third candidate image parameters are calculated based on the first calibration RT matrix, the second calibration RT matrix, the first static calibration RT matrix, and the second image parameters. A third deviation value between each third candidate image parameter and a fourth image parameter is calculated, and the smallest third deviation value is selected from all third deviation values. The RT matrix corresponding to the smallest third deviation value is used as the third calibration RT matrix. By determining the first preset pose table and the second preset pose table in advance, the efficiency of camera dynamic calibration is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a camera dynamic calibration method, device, computing equipment and storage medium. Background Art

[0002] With the development of the times, 3D scanning technology is constantly updated, and 3D scanners are gradually entering people's lives. 3D scanners can scan objects to obtain their shape and appearance data to provide 3D models, bringing convenience to people's lives.

[0003] The 3D scanners currently on the market use a static calibration method for binocular cameras. If the viewing angles of the two cameras in a binocular camera are variable, the static calibration method will not work accordingly. The binocular camera needs to be dynamically recalibrated to ensure accurate calibration. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a camera dynamic calibration method, apparatus, computing device, and storage medium to solve the above problems in the prior art.

[0005] According to a first aspect of an embodiment of the present invention, the present invention provides a camera dynamic calibration method, comprising:

[0006] Acquire first image parameters of the target object by the first camera in an initial state;

[0007] Obtaining a first rotation angle of the first camera and a second image parameter of the target object after rotation;

[0008] determining a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, wherein the first preset pose table is pre-statically calibrated according to a first preset rotation range of the first camera;

[0009] Determining a first target RT matrix according to the first target posture interval;

[0010] performing an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain first candidate image parameters;

[0011] A first deviation value between the first candidate image parameter and the second image parameter is calculated, and a first RT matrix corresponding to a minimum of the first deviation value is used as a first calibration RT matrix of the first camera.

[0012] Acquiring a third image parameter of the target object by the second camera in an initial state;

[0013] Acquire a second rotation angle after the second camera is rotated and a fourth image parameter for the target object;

[0014] determining a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera;

[0015] Determine a second target RT matrix according to the second target posture interval;

[0016] performing an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter;

[0017] Calculating a second deviation between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to a minimum of the second deviation as a second calibration RT matrix for the second camera;

[0018] Calculating a third target RT matrix according to the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera, where the first static calibration RT matrix is ​​pre-obtained through static calibration according to the first image parameters and the third image parameters;

[0019] calculating third candidate image parameters according to the third target RT matrix and the second image parameters;

[0020] calculating a third deviation value between the third candidate image parameter and the fourth image parameter;

[0021] The third target RT matrix is ​​offset-adjusted until the third deviation value is minimized, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value.

[0022] In some embodiments, each of the first pose intervals has two different first angle end values, the first angle end values ​​are within the first preset rotation range, the first preset pose table is pre-statically calibrated according to the first preset rotation range of the first camera, each of the second pose intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, and the second preset pose table is pre-statically calibrated according to the second preset rotation range of the second camera. The method includes:

[0023] Acquiring first pre-calibrated image parameters of the first camera for a pre-calibrated object in an initial state;

[0024] Obtaining second pre-calibrated image parameters of the first camera for each first angle end value in each first pose interval and for the pre-calibrated object;

[0025] Performing a static calibration calculation based on the first pre-calibrated image parameters and the second pre-calibrated image parameters to obtain a first pre-calibrated RT matrix corresponding to each first angle end value in each first posture interval;

[0026] The first preset posture table is generated according to a plurality of the first posture intervals, wherein the first preset posture table has a first pre-calibrated RT matrix corresponding to each first angle end value in each of the first posture intervals.

[0027] Each of the second posture intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, and the second preset posture table is pre-statically calibrated according to the second preset rotation range of the second camera. The method includes:

[0028] Acquiring third pre-calibrated image parameters of the second camera for a pre-calibrated object in an initial state;

[0029] Obtaining fourth pre-calibrated image parameters of the second camera for each second angle end value in each second pose interval for the pre-calibrated object;

[0030] Performing a static calibration calculation based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters to obtain a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval;

[0031] The second preset posture table is generated according to a plurality of the second posture intervals, wherein the second preset posture table has a second pre-calibrated RT matrix corresponding to each second angle end value in each of the second posture intervals.

[0032] In some embodiments, the first target pose interval has two different first candidate angle end values, each of the first candidate angle end values ​​is correspondingly associated with a first RT matrix, and determining the first target RT matrix according to the first target pose interval, the second target pose interval has two different second candidate angle end values, each of the second candidate angle end values ​​is correspondingly associated with a second RT matrix, and determining the second target RT matrix according to the second target pose interval includes:

[0033] Compare the angle difference between the first rotation angle and each of the first candidate angle end values, determine the first candidate angle end value with the smallest angle difference as the first target angle, and determine the first RT matrix corresponding to the first target angle end value as the first target RT matrix.

[0034] Compare the angle difference between the second rotation angle and each second candidate angle end value, determine the second candidate angle end value with the smallest angle difference as the second target angle, and determine the second RT matrix corresponding to the second target angle end value as the second target RT matrix.

[0035] In some embodiments, each of the first posture intervals has two different first angle end values, the first angle end values ​​are within the first preset rotation range, the angle difference between the two first angle end values ​​of each first posture interval is less than or equal to 1°, and the first preset rotation range is ±15°;

[0036] Each of the second posture intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, the angle difference between the two second angle end values ​​of each second posture interval is less than or equal to 1°, and the second preset rotation range is ±15°.

[0037] In some embodiments, the angle difference between the two first angle end values ​​of each first posture interval is 0.5°, and the angle difference between the two second angle end values ​​of each second posture interval is 0.5°.

[0038] In some embodiments, performing an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain a first candidate image parameter, calculating a first deviation value between the first candidate image parameter and the second image parameter, using a first RT matrix corresponding to a minimum of the first deviation value as a first calibration RT matrix of the first camera, performing an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter, calculating a second deviation value between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to the minimum of the second deviation value as a second calibration RT matrix of the second camera further includes:

[0039] Determining whether the first rotation angle is greater than a first target angle corresponding to the first target RT matrix;

[0040] If the first rotation angle is greater than the first target angle, performing multiple incremental multiplication calculations of the first offset matrix on the first target RT matrix, each incremental multiplication calculation obtaining a first candidate matrix and a first candidate angle;

[0041] performing rotation and translation calculations on the first image parameters according to each of the first candidate angles and the first candidate matrix to obtain a plurality of corresponding first candidate image parameters;

[0042] If the first rotation angle is smaller than the first target angle, performing multiple subtraction and multiplication calculations of the first offset matrix on the first target RT matrix, each subtraction and multiplication calculation obtaining a second candidate matrix and a second candidate angle;

[0043] performing rotation and translation calculations on the first image parameters according to each of the second candidate angles and the second candidate matrix to obtain a plurality of corresponding first candidate image parameters;

[0044] Determining whether the second rotation angle is greater than a second target angle corresponding to the second target RT matrix;

[0045] If the second rotation angle is greater than the second target angle, performing multiple incremental multiplication calculations of the second offset matrix on the second target RT matrix, each incremental multiplication calculation obtaining a third candidate matrix and a third candidate angle;

[0046] Performing rotation and translation calculations on the second image parameters according to each of the third candidate angles and the third candidate matrix to obtain a plurality of corresponding second candidate image parameters;

[0047] If the second rotation angle is less than the second target angle, performing multiple subtraction and multiplication calculations of the second offset matrix on the second target RT matrix, and obtaining a fourth candidate matrix and a fourth candidate angle by performing the subtraction and multiplication calculations each time;

[0048] A rotation and translation calculation is performed on the second image parameter according to each of the fourth candidate angles and the fourth candidate matrix to obtain a plurality of corresponding second candidate image parameters.

[0049] In some embodiments, calculating a first deviation between the first candidate image parameter and the second image parameter, using a first RT matrix corresponding to a minimum of the first deviation as a first calibration RT matrix for the first camera, calculating a second deviation between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to the minimum of the second deviation as a second calibration RT matrix for the second camera further includes:

[0050] A first deviation value between each of the first candidate image parameters and the second image parameter is calculated. If the nth first deviation value is less than the n+1th first deviation value, the nth first deviation value is used as the minimum first deviation value, and an RT matrix corresponding to the minimum first deviation value is used as a first calibration RT matrix for the first camera, where n is a positive integer greater than 1.

[0051] Calculate a second deviation between each of the second candidate image parameters and the fourth image parameter. If the nth second deviation value is less than the n+1th second deviation value, use the nth second deviation value as the minimum second deviation value, and use the RT matrix corresponding to the minimum second deviation value as the second calibration RT matrix of the second camera, where n is a positive integer greater than 1.

[0052] According to a second aspect of an embodiment of the present invention, the present invention provides a camera dynamic calibration device, the device comprising:

[0053] A first acquisition module is used to acquire first image parameters of the target object by the first camera in an initial state;

[0054] A second acquisition module is used to acquire a first rotation angle after the first camera is rotated and a second image parameter of the target object;

[0055] a first determining module, configured to determine a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, wherein the first preset pose table is pre-statically calibrated according to a first preset rotation range of the first camera;

[0056] A second determination module is configured to determine a first target RT matrix according to the first target posture interval;

[0057] a first calculation module, configured to perform an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain a first candidate image parameter;

[0058] a second calculation module, configured to calculate a first deviation between the first candidate image parameter and the second image parameter, and use a first RT matrix corresponding to a minimum of the first deviation as a first calibration RT matrix of the first camera;

[0059] A third acquisition module, configured to acquire a third image parameter of the target object from the second camera in an initial state;

[0060] a fourth acquisition module, configured to acquire a second rotation angle of the second camera after rotation and a fourth image parameter for the target object;

[0061] a third determining module, configured to determine, according to the second rotation angle, a second target pose interval from a plurality of second pose intervals in the second preset pose table, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera;

[0062] a fourth determining module, configured to determine a second target RT matrix according to the second target posture interval;

[0063] a third calculation module, configured to perform an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter;

[0064] a fourth calculation module, configured to calculate a second deviation between the second candidate image parameter and the fourth image parameter, and use a second RT matrix corresponding to a minimum of the second deviation as a second calibration RT matrix for the second camera;

[0065] a fifth calculation module, configured to calculate a third target RT matrix based on the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera;

[0066] a sixth calculation module, configured to calculate third candidate image parameters according to the third target RT matrix and the second image parameters;

[0067] a seventh calculation module, configured to calculate a third deviation value between the third candidate image parameter and the fourth image parameter;

[0068] The fifth determination module is configured to perform an offset adjustment on the third target RT matrix until the third deviation value is minimized, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value.

[0069] According to a third aspect of an embodiment of the present invention, the present invention provides a computing device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0070] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of any one of the camera dynamic calibration methods described above.

[0071] According to a fourth aspect of an embodiment of the present invention, the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one executable instruction, and the executable instruction, when run, performs the operation of the camera dynamic calibration method as described in any one of the above items.

[0072] In an embodiment of the present invention, the processor obtains image parameters of the first camera in an initial state and after a rotation angle, and performs dynamic calibration according to the image parameters of the different states and a preset pose table. The processor also obtains image parameters of the second camera in an initial state and after a rotation angle, and performs dynamic calibration according to the image parameters of the different states and a preset pose table, thereby obtaining an accurate first calibration RT matrix of the first camera corresponding to the rotation angle and an accurate second calibration RT matrix of the second camera corresponding to the rotation angle, thereby improving the scanning accuracy of the first camera and the second camera.

[0073] Among them, the first camera and driving mechanism used in formulating the first preset posture table are the same as the camera and its corresponding driving mechanism used in actual operation, and the second camera and driving mechanism used in formulating the second preset posture table are the same as the camera and its corresponding driving mechanism used in actual operation, so that the error in the camera dynamic calibration method can be reduced.

[0074] By determining the first and second target RT matrices, computation is reduced when subsequently calculating the calibration RT matrices for the first and second cameras, thereby improving the efficiency of dynamic calibration of the first and second cameras. Furthermore, by predetermining the first and second preset pose tables, the first and second cameras can directly use the data parameters in the first and second preset pose tables during dynamic calibration, thereby improving the efficiency of dynamic calibration of the first and second cameras.

[0075] In addition, the processor can calculate the third candidate image parameters based on the third target RT matrix and the second image parameters, calculate and record the third deviation value between the third candidate image parameters and the fourth image parameters, and the processor offsets the third target RT matrix to obtain new third candidate image parameters. The processor calculates and records the third deviation value between each third candidate image parameter and the fourth image parameter, selects the smallest third deviation value from all third deviation values, and uses the third target RT matrix corresponding to the smallest third deviation value as the third calibration RT matrix, thereby completing the dynamic calibration between the first camera and the second camera. By selecting the minimum third deviation value, the accuracy of the camera dynamic calibration method can be further improved. By confirming the third calibration RT matrix, the pictures taken by the two cameras after the adjustable binocular camera is rotated can obtain a more accurate three-dimensional model.

[0076] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same elements throughout the drawings. In the drawings:

[0078] Figure 1 A schematic diagram showing the flow of a camera dynamic calibration method provided by an embodiment of the present invention is shown;

[0079] Figure 2A schematic structural diagram of a camera dynamic calibration device provided by an embodiment of the present invention is shown;

[0080] Figure 3 A schematic diagram showing the structure of a computing device provided by an embodiment of the present invention is shown;

[0081] Figure 4 A schematic diagram showing the first camera and the second camera provided by an embodiment of the present invention in an initial state is shown;

[0082] Figure 5 A schematic diagram showing the first camera and the second camera after rotation provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

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

[0084] With the development of 3D scanning technology, fixed binocular stereo vision measurement methods are widely used in the field of 3D scanning technology. However, due to the limitation of its limited field of view, if the field of view of the two cameras of the binocular camera in the 3D scanner is to be variable, the fixed binocular stereo vision measurement method used by the 3D scanners on the market cannot meet the corresponding calibration requirements, thereby affecting the scanning operation of the 3D scanner. At this time, the binocular camera needs to be dynamically recalibrated.

[0085] Based on this, an embodiment of the present invention provides a camera dynamic calibration method, wherein the processor obtains image parameters of the first camera in an initial state and after a rotation angle, and performs dynamic calibration according to the image parameters of the different states and a preset posture table, and the processor obtains image parameters of the second camera in an initial state and after a rotation angle, and performs dynamic calibration according to the image parameters of the different states and a preset posture table, thereby obtaining an accurate first calibration RT matrix corresponding to the rotation angle of the first camera and an accurate second calibration RT matrix corresponding to the rotation angle of the second camera, thereby improving the scanning accuracy of the first camera and the second camera.

[0086] Among them, the first camera and driving mechanism used in formulating the first preset posture table are the same as the camera and its corresponding driving mechanism used in actual operation, and the second camera and driving mechanism used in formulating the second preset posture table are the same as the camera and its corresponding driving mechanism used in actual operation, so that the error in the camera dynamic calibration method can be reduced.

[0087] By determining the first and second target RT matrices, computation is reduced when subsequently calculating the calibration RT matrices for the first and second cameras, thereby improving the efficiency of dynamic calibration of the first and second cameras. Furthermore, by predetermining the first and second preset pose tables, the first and second cameras can directly use the data parameters in the first and second preset pose tables during dynamic calibration, thereby improving the efficiency of dynamic calibration of the first and second cameras.

[0088] In addition, the processor can calculate the third candidate image parameters based on the third target RT matrix and the second image parameters, calculate and record the third deviation value between the third candidate image parameters and the fourth image parameters, and the processor offset adjusts the third target RT matrix to obtain new third candidate image parameters. The processor calculates and records the third deviation value between each third candidate image parameter and the fourth image parameter, selects the smallest third deviation value from all third deviation values, and uses the third target RT matrix corresponding to the smallest third deviation value as the third calibration RT matrix, thereby completing the dynamic calibration between the first camera and the second camera. By selecting the smallest third deviation value, the accuracy of the camera dynamic calibration method is further improved. By confirming the third calibration RT matrix, the pictures taken by the two cameras after the adjustable binocular camera is rotated can obtain a more accurate three-dimensional model.

[0089] Figure 1 This is a flowchart of a camera dynamic calibration method provided by an embodiment of the present invention. The method is executed by a computing device, which may include one or more processors. The processors may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, without limitation herein. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs, without limitation herein.

[0090] like Figure 1 As shown, the method includes the following steps:

[0091] Step 110: Obtain first image parameters of the first camera for the target object in an initial state.

[0092] Step 120: Obtain a first rotation angle of the first camera and a second image parameter of the target object after rotation.

[0093] Step 130: Determine a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, where the first preset pose table is pre-statically calibrated according to a first preset rotation range of the first camera.

[0094] Step 140: Determine a first target RT matrix according to the first target posture interval.

[0095] Step 150: Perform offset calculation on the first image parameters according to the first target RT matrix and the first rotation angle to obtain first candidate image parameters.

[0096] Step 160: Calculate a first deviation between the first candidate image parameter and the second image parameter, and use a first RT matrix corresponding to the minimum first deviation as a first calibration RT matrix for the first camera.

[0097] Step 210: Obtain third image parameters of the second camera for the target object in the initial state.

[0098] Step 220: Obtain a second rotation angle of the second camera after rotation and a fourth image parameter for the target object.

[0099] Step 230: Determine a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera.

[0100] Step 240: Determine a second target RT matrix according to the second target posture interval.

[0101] Step 250: Perform offset calculation on the third image parameters according to the second target RT matrix and the second rotation angle to obtain second candidate image parameters.

[0102] Step 260: Calculate a second deviation between the second candidate image parameter and the fourth image parameter, and use a second RT matrix corresponding to the minimum second deviation as a second calibration RT matrix for the second camera.

[0103] Step 310: Calculate a third target RT matrix based on the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera, where the first static calibration RT matrix is ​​pre-statically calibrated based on the first image parameters and the third image parameters.

[0104] Step 320: Calculate third candidate image parameters according to the third target RT matrix and the second image parameters.

[0105] Step 330: Calculate a third deviation value between the third candidate image parameter and the fourth image parameter.

[0106] Step 340: Perform offset adjustment on the third target RT matrix until the third deviation value is minimized, and obtain a third calibrated RT matrix corresponding to the minimum third deviation value.

[0107] In step 110, refer to Figure 4 The initial state is the state when the first camera 810 is not rotating, and the definition at this time is as follows Figure 4 The angle of the first camera 810 in the initial state is 0°. The processor obtains a first image of the target object 900 taken by the first camera 810 and generates first image parameters. The first image parameters are used for subsequent calculation of the RT matrix.

[0108] In step 120, the first camera is connected to a driving mechanism, which controls the rotation of the first camera, and the first camera captures an image of the target object at a first rotation angle. The first rotation angle can be any angle, but cannot exceed the rotation angle range of the first camera. It is not limited here and is set according to actual needs. The first camera can be connected to a gyroscope or other sensors that can measure angles. It only needs to satisfy that the processor can obtain the first rotation angle. It is not limited here and is set according to actual needs. The target object can be an object with a black and white chessboard pattern or an object to be scanned and modeled. It is not limited here and is set according to actual needs. The processor then obtains a second image of the same target object taken by the first camera after the first rotation angle is rotated, and generates second image parameters. The second image parameters are used for subsequent comparison with the first image parameters to calculate the rotation RT matrix of the first camera. The first preset rotation range is the maximum rotation angle of the first camera, with reference to Figure 5 , defining the first camera 810 as rotating left relative to 0° as negative, and rotating right relative to 0° as positive. For example, the maximum rotation angle of the first camera 810 is ±15°. A 15° rotation of the first camera 810 to the right is defined as +15°, and the first preset rotation range is also ±15°.

[0109] In step 130, the processor determines the first target pose interval in the multiple first pose intervals of the first preset pose table according to the first rotation angle, and the first preset pose table is pre-statically calibrated according to the first preset rotation range of the first camera, wherein the interval range interval values ​​of the multiple first pose intervals can be consistent, for example, the interval value can be 0.5°, or 1°, or other values, which are not limited here and are set according to actual needs. The interval range interval values ​​of the multiple first pose intervals can also be different, for example, the pose intervals are 0° to 1°, 1° to 3°, 3° to 8°, which are not limited here and are set according to actual needs. The first preset rotation range refers to the rotation range of the first camera pre-calibrated under the same conditions, and the same conditions include the same driving mechanism in the same three-dimensional scanner driving the same first camera to rotate and other conditions, so as to reduce the error during the camera dynamic calibration method.

[0110] In some embodiments, the first preset rotation range is ±15°, and the interval value of each first target posture interval is 0.5°. The first camera rotates 0.5° to the right from the initial state, so 0° to +0.5° is a first posture interval. At this time, a static calibration is performed on the first camera and the obtained second image parameters are rotated and translated with the first image parameters to obtain a corresponding pre-calibrated RT matrix; then the first camera continues to rotate 0.5° to the right, so +0.5° to 1° is a first posture interval. At this time, a static calibration is performed on the first camera again and the obtained second image parameters are rotated and translated with the first image parameters to obtain a corresponding pre-calibrated RT matrix. The above operation is repeated until the first camera rotates to +15°, which is the boundary of the first preset rotation range. , then restore the first camera to its initial state and start rotating it 0.5° to the left. 0° to -0.5° is a first pose interval. At this time, perform a static calibration on the first camera and compare the obtained image parameters with the first image parameters to obtain a corresponding pre-calibrated RT matrix. The first camera continues to rotate 0.5° to the left. -0.5° to -1° is a first pose interval. At this time, perform another static calibration on the first camera and compare the obtained second image parameters with the first image parameters to obtain another pre-calibrated RT matrix. Repeat the above operation until the first camera rotates to -15°, which is the other boundary of the first preset rotation range. Finally, all pre-calibrated RT matrices and their corresponding pre-calibrated RT matrix intervals are summarized in the first preset pose table.

[0111] Among them, since the first camera is driven by a driving mechanism to achieve rotation, some errors may exist during the rotation of the first camera. For example, if the driving mechanism is a motor, the motor actually controls the first camera to rotate by 0.501°, while the first rotation angle fed back to the processor by the motor is 0.5°, resulting in an error, which affects the calibration accuracy of the first camera. Therefore, it is necessary to further determine the accurate rotation angle of the first camera. By determining the first preset pose table in advance, the first camera can be directly positioned to the data parameters in the first preset pose table during dynamic calibration, obtaining the pre-calibrated RT matrix for initial positioning, reducing the calibration calculation amount, and facilitating subsequent rapid and accurate calibration of the first camera, thereby improving the efficiency of the first camera during dynamic calibration. Among them, the first camera and driving mechanism used when formulating the first preset pose table are the same as the camera and its corresponding driving mechanism used in actual operation, which can reduce the error during the camera dynamic calibration method. In the first preset posture table, each first posture interval corresponds to a calibrated pre-calibrated RT matrix. The pre-calibrated RT matrix can be calibrated and set at each end value, or it can be calibrated and set corresponding to the midpoint value of the interval, or it can be set in other ways. There is no limitation here and it can be set according to actual needs.

[0112] For example, in some embodiments, the processor determines a first target posture interval from a plurality of first posture intervals in a first preset posture table based on the first rotation angle. If the first rotation angle is +12.3°, then the first posture interval of +12° to +12.5° is selected as the first target posture interval, that is, the selected first posture interval includes the value of the first rotation angle. If the first rotation angle is other values, it is only necessary to select the first posture interval corresponding thereto. This is not limited here and is set according to actual needs. In some cases, the first posture interval is provided with a pre-calibrated RT matrix corresponding to two angle end values ​​as needed; in some cases, the first posture interval can also be provided with a pre-calibrated RT matrix as needed, for example, the pre-calibrated RT matrix corresponding to the midpoint value is used as the pre-calibrated RT matrix of the first posture interval, such as the pre-calibrated RT matrix corresponding to +12.25°, or the pre-calibrated RT matrix corresponding to +12.2° or +12.3°, or other pre-calibrated RT matrices set as needed. This is not limited here and is set according to needs. By determining the first target pose interval, the initial positioning can be quickly performed, so that the first target RT matrix can be confirmed more quickly later, thereby improving the efficiency of the first camera dynamic calibration.

[0113] In step 140, the processor determines a first target RT matrix based on the first target pose interval. For example, if the selected first target pose interval ranges from +12° to +12.5° and the first rotation angle is +12.3°, +12.5° is closer to +12.3° than +12°. If the first pose interval has two pre-calibrated RT matrices corresponding to the end values ​​of the angle as needed, then the pre-calibrated RT matrix corresponding to the end value of +12.5° is selected from the first preset pose table as the first target RT matrix. By determining the first target RT matrix, the subsequent calculation of the calibration RT matrix of the first camera can reduce calculations, thereby improving the dynamic calibration efficiency of the first camera.

[0114] In step 150, the processor performs an offset calculation on the first image parameters based on the first target RT matrix and the first rotation angle to obtain the first candidate image parameters. For example, if the first rotation angle is 12.3°, the selected first target RT matrix is ​​the pre-calibrated RT matrix corresponding to the 12.5° end value. The first target RT matrix starts from 12.5° and starts to perform full image calculation with 0.001° as the offset. According to the least squares method, the offset is performed multiple times until the minimum first deviation value is selected, wherein each offset obtains a first candidate image parameter. The offset can be selected as 0.001°, 0.002°, or other degrees, which are not limited here and can be set according to actual needs. Through the offset calculation, the rotation angle of the first camera can be further precisely positioned to a more accurate value, reducing the error during the dynamic calibration of the first camera, improving the calibration accuracy of the first camera, and facilitating the accuracy of three-dimensional reconstruction.

[0115] In step 160, the processor calculates the first deviation between the first candidate image parameters and the second image parameters and uses the first RT matrix corresponding to the minimum first deviation as the first calibration RT matrix for the first camera. The processor calculates and records the first deviation between each first candidate image parameter and the second image parameter. The minimum first deviation is selected from all first deviations, and the pose of the first candidate image parameter corresponding to the minimum first deviation is used as the first calibration RT matrix for the first camera, thereby completing the dynamic calibration of the first camera. By selecting the minimum first deviation, the selected first calibration RT matrix is ​​more accurate, reducing errors during the dynamic calibration of the first camera.

[0116] In steps 110 to 160, the processor obtains the image parameters of the first camera in the initial state and after the rotation angle, and performs dynamic calibration according to the image parameters of the different states and the preset posture table, thereby obtaining an accurate first calibration RT matrix of the first camera corresponding to the rotation angle, thereby improving the scanning accuracy of the first camera.

[0117] By determining the first preset pose table in advance, the first camera can directly use the data parameters in the first preset pose table during dynamic calibration, thereby improving the efficiency of the first camera during dynamic calibration. By determining the first target pose range to quickly perform initial positioning, the first target RT matrix can be confirmed more quickly later, thereby improving the efficiency of the first camera's dynamic calibration. By determining the first target RT matrix, the calculation can be reduced when calculating the calibration RT matrix of the first camera later, thereby improving the efficiency of the first camera's dynamic calibration. By offset calculation and selecting the first RT matrix corresponding to the minimum first deviation value as the first calibration RT matrix of the first camera, the rotation angle of the first camera can be further precisely positioned to a more accurate value, reducing the error during the first camera's dynamic calibration, improving the calibration accuracy of the first camera, and facilitating the accuracy of three-dimensional reconstruction.

[0118] In step 210, refer to Figure 4 The initial state is the state when the second camera 820 is not rotated, and the definition at this time is as follows Figure 4 The angle of the second camera 820 in the initial state is 0°. The processor obtains a third image of the target object taken by the second camera and generates third image parameters. The third image parameters are used for subsequent calculation of the RT matrix.

[0119] In step 220, the second camera is connected to a driving mechanism, which controls the rotation of the second camera, and the second camera takes an image of the target object at a second rotation angle. The second rotation angle can be any angle, but it cannot exceed the rotation angle range of the second camera. It is not limited here and is set according to actual needs. The second camera can be connected to a gyroscope or other sensors that can measure angles. It only needs to satisfy that the processor can obtain the second rotation angle. It is not limited here and is set according to actual needs. The processor then obtains the fourth image of the same target object taken by the second camera after rotating the second rotation angle, and generates fourth image parameters. The fourth image parameters are used for subsequent comparison with the third image parameters to calculate the rotation RT matrix of the second camera. The second preset rotation range is the maximum rotation angle of the second camera. For example, the maximum rotation angle of the second camera 820 is ±15°. It is defined that the second camera 820 rotates to the left relative to 0° as negative and rotates to the right as positive. Figure 5 , the second camera 820 rotates 15° to the left, which is defined as -15°. The first preset rotation range is also ±15°. The first image parameter, the second image parameter, the third image parameter, and the fourth image parameter include pixel parameters and other parameters used for calibration calculation.

[0120] In step 230, the processor determines a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, and the second preset pose table is pre-statically calibrated according to the second preset rotation range of the second camera, wherein the interval range interval values ​​of the plurality of second pose intervals can be consistent, for example, the interval value can be 0.5°, or 1°, or other values, which are not limited here and are set according to actual needs. The interval range interval values ​​of the plurality of second pose intervals can also be different, for example, the pose intervals are 0° to 1°, 1° to 3°, or 3° to 8°, which are not limited here and are set according to actual needs. Among them, the second preset rotation range refers to the rotation range of the second camera pre-calibrated under the same conditions, and the same conditions include the same driving mechanism in the same three-dimensional scanner driving the same second camera to rotate, etc., so as to reduce the error during the camera dynamic calibration method.

[0121] In some embodiments, the second preset rotation range is ±15°, and the interval value of each second target posture interval is 0.5°. The second camera rotates 0.5° to the right from the initial state, then 0° to +0.5° is a second posture interval. At this time, a static calibration is performed on the second camera and the obtained fourth image parameters are compared and calculated with the third image parameters to obtain a corresponding pre-calibrated RT matrix. Then the second camera continues to rotate 0.5° to the right, then +0.5° to 1° is a second posture interval. At this time, a static calibration is performed on the second camera again and the obtained fourth image parameters are rotated and translated with the third image parameters to obtain a corresponding pre-calibrated RT matrix. The above operation is repeated until the second camera rotates to +15°, which is the edge of the first preset rotation range. The second camera is then restored to its initial state and rotated 0.5° to the left. 0° to -0.5° is a pose interval. At this time, a static calibration is performed on the second camera and the obtained image parameters are compared with the third image parameters to obtain a pre-calibrated RT matrix. The second camera continues to rotate 0.5° to the left, and -0.5° to -1° is a second pose interval. At this time, a static calibration is performed on the second camera again and the obtained fourth image parameters are compared with the third image parameters to obtain another pre-calibrated RT matrix. The above operation is repeated until the second camera rotates to -15°, which is another boundary of the second preset rotation range. Finally, all pre-calibrated RT matrices and the corresponding pre-calibrated RT matrix intervals are summarized in the second preset pose table.

[0122] Among them, since the second camera is driven by a driving mechanism to achieve rotation, some errors may exist during the rotation of the second camera. For example, if the driving mechanism is a motor, the motor actually controls the second camera to rotate by 0.501°, while the second rotation angle fed back to the processor by the motor is 0.5°, resulting in an error, which affects the calibration accuracy of the second camera. Therefore, it is necessary to further determine the accurate rotation angle of the second camera. By determining the second preset posture table in advance, the second camera can be directly positioned to the data parameters in the second preset posture table during dynamic calibration, and the pre-calibrated RT matrix for initial positioning is obtained, reducing the amount of calibration calculations and facilitating subsequent rapid and accurate calibration of the second camera, thereby improving the efficiency of the second camera during dynamic calibration. Among them, the second camera and driving mechanism used when formulating the second preset posture table are the same as the camera and driving mechanism used in actual operation, which can reduce the error during the camera dynamic calibration method. In the first preset pose table, each second pose interval corresponds to a calibrated pre-calibrated RT matrix. This pre-calibrated RT matrix can be calibrated at each end value, at the midpoint of the interval, or in some other manner, which is not limited here and can be set according to actual needs. By pre-determining the second preset pose table, the second camera can directly locate the data parameters in the second preset pose table during dynamic calibration, obtaining the initial pre-calibrated RT matrix, reducing the calibration computational complexity and thus improving the efficiency of the second camera during dynamic calibration.

[0123] For example, in some embodiments, the processor determines the second target posture interval from a plurality of second posture intervals in the second preset posture table based on the second rotation angle. If the second rotation angle is +12.3°, then the second posture interval of +12° to +12.5° is selected as the second target posture interval, that is, the selected second posture interval includes the value of the second rotation angle. If the second rotation angle is other values, it is only necessary to select the second posture interval corresponding thereto. This is not limited here and is set according to actual needs. In some cases, the second posture interval is provided with a pre-calibrated RT matrix corresponding to two angle end values ​​as needed; in some cases, the second posture interval can also be provided with a pre-calibrated RT matrix as needed, for example, the pre-calibrated RT matrix corresponding to the midpoint value is used as the pre-calibrated RT matrix of the first posture interval, such as the pre-calibrated RT matrix corresponding to +12.25°, or the pre-calibrated RT matrix corresponding to +12.2° or +12.3°, or other pre-calibrated RT matrices set as needed. This is not limited here and is set according to needs. By determining the second target pose interval, the initial positioning can be quickly performed, so that the second target RT matrix can be confirmed more quickly later, thereby improving the efficiency of the second camera dynamic calibration.

[0124] In step 240, the processor determines a second target RT matrix based on the second target pose interval. For example, if the selected second target pose interval ranges from +12° to +12.5° and the second rotation angle is +12.3°, +12.5° is closer to +12.3° than +12°. If the second pose interval is provided with pre-calibrated RT matrices corresponding to two angle end values ​​as needed, the pre-calibrated RT matrix corresponding to the +12.5° end value is selected from the second preset pose table as the second target RT matrix. By determining the second target RT matrix, the subsequent calculation of the calibration RT matrix for the second camera can be reduced, thereby improving the dynamic calibration efficiency of the second camera.

[0125] In step 250, the processor performs an offset calculation on the third image parameters based on the second target RT matrix and the second rotation angle to obtain second candidate image parameters. For example, if the second rotation angle is 12.3°, the selected second target RT matrix is ​​the pre-calibrated RT matrix corresponding to the 12.5° end value. The second target RT matrix starts at 12.5° and performs a full image calculation with 0.001° as the offset. According to the least squares method, the offset is performed multiple times until the minimum second deviation value is selected, and each offset obtains a second candidate image parameter. The offset can be selected as 0.001°, 0.002°, or other degrees, which are not limited here and can be set according to actual needs. Through multiple offset calculations, multiple second candidate image parameters can be obtained, thereby reducing the error during the dynamic calibration of the second camera.

[0126] In step 260, the processor calculates the second deviation between the second candidate image parameter and the fourth image parameter, and uses the second RT matrix corresponding to the minimum second deviation as the second calibration RT matrix for the second camera. The processor calculates and records the second deviation between each second candidate image parameter and the fourth image parameter, selects the minimum second deviation from all second deviations, and uses the pose of the second candidate image parameter corresponding to the minimum second deviation as the second calibration RT matrix for the second camera, thereby completing the dynamic calibration of the second camera. By selecting the minimum second deviation, the selected second calibration RT matrix is ​​more accurate, reducing errors during the dynamic calibration of the second camera.

[0127] In step 310, the processor calculates a third target RT matrix based on the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera. The first static calibration RT matrix is ​​pre-obtained through static calibration based on the first and third image parameters. The first static calibration RT matrix is ​​a rotation matrix between the first image parameters in the initial state of the first camera and the second image parameters in the initial state of the second camera, and is calculated when generating the first and second preset tables. Determining the third target RT matrix allows for faster subsequent calculation of the third candidate image parameters.

[0128] In step 320 and step 330, the processor calculates a third candidate image parameter according to the third target RT matrix and the second image parameter, and the processor calculates a third deviation value between the third candidate image parameter and the fourth image parameter.

[0129] In step 340 , the processor performs an offset adjustment on the third target RT matrix until the third deviation value is minimized, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value.

[0130] In step 310 to step 340, the first calibration RT matrix is ​​defined as RT AX , the second calibration RT matrix is ​​RT BY , the first image parameter is P a0 , the third image parameter is P b0 , then the second image parameter P A , the fourth image parameter P B By P a0 =P b0 ×RT 00 , RT 00 is the first static calibration RT matrix, that is, the rotation matrix between the first image parameter of the first camera initial state and the second image parameter of the second camera initial state, which is calculated when generating the first preset table and the second preset table so that the third candidate image parameter According to P B and P BY right The least squares method is used to calculate the error, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value, so that the obtained third calibration RT matrix has higher precision, thereby improving the accuracy of the dynamic calibration method.

[0131] The processor can calculate third candidate image parameters based on the third target RT matrix and the second image parameters, calculate and record third deviations between the third candidate image parameters and the fourth image parameters, perform an offset adjustment on the third target RT matrix to obtain new third candidate image parameters, calculate and record third deviations between each third candidate image parameter and the fourth image parameter, select the smallest third deviation from all third deviations, and use the third target RT matrix corresponding to the smallest third deviation as the third calibration RT matrix, thereby completing dynamic calibration between the first camera and the second camera. By selecting the smallest third deviation, the accuracy of the camera dynamic calibration method is further improved.

[0132] In some embodiments, the processor may also calculate third candidate image parameters based on the third target RT matrix and the fourth image parameters, calculate and record third deviations between the third candidate image parameters and the second image parameters, perform an offset adjustment on the third target RT matrix to obtain new third candidate image parameters, calculate and record third deviations between each third candidate image parameter and the second image parameter, select the smallest third deviation from all third deviations, and use the third target RT matrix corresponding to the smallest third deviation as the third calibration RT matrix, thereby completing dynamic calibration between the first camera and the second camera. By selecting the smallest third deviation, the accuracy of the camera dynamic calibration method can be further improved.

[0133] By confirming the third calibration RT matrix, the images taken by the two cameras after the adjustable binocular camera is rotated can obtain a more accurate three-dimensional model.

[0134] In some embodiments, each first pose interval has two different first angle end values, the first angle end value is within a first preset rotation range, the first preset pose table is pre-statically calibrated according to the first preset rotation range of the first camera, each second pose interval has two different second angle end values, the second angle end value is within a second preset rotation range, and the second preset pose table is pre-statically calibrated according to the second preset rotation range of the second camera. The method includes:

[0135] Step a01: Acquire first pre-calibrated image parameters of a first camera for a pre-calibrated object in an initial state.

[0136] Step a02: obtaining second pre-calibrated image parameters of the first camera for each first angle end value in each first pose interval for the pre-calibrated object.

[0137] Step a03: Perform static calibration calculation based on the first pre-calibrated image parameters and the second pre-calibrated image parameters to obtain a first pre-calibrated RT matrix corresponding to each first angle end value in each first pose interval.

[0138] Step a04: Generate a first preset posture table according to the plurality of first posture intervals, wherein the first preset posture table has a first pre-calibrated RT matrix corresponding to each first angle end value in each first posture interval.

[0139] Step b01: Acquire third pre-calibrated image parameters of the second camera for the pre-calibrated object in an initial state.

[0140] Step b02: Obtain fourth pre-calibrated image parameters of the second camera for each second angle end value in each second pose interval for the pre-calibrated object.

[0141] Step b03: Perform static calibration calculation based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters to obtain a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval.

[0142] Step b04: Generate a second preset posture table according to the plurality of second posture intervals, wherein the second preset posture table has a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval.

[0143] In step a01, the processor obtains first pre-calibration image parameters of the first camera in the initial state for a pre-calibration object. The pre-calibration object can be a calibration plate, an object with a black and white checkerboard pattern, or other objects to be measured that can assist in calibration. This is not limited here and is set according to actual needs. Preferably, the pre-calibration object is an object with a black and white checkerboard pattern to reduce the computational complexity of the calibration and improve the efficiency of the camera dynamic table method. The processor obtains the first pre-calibration image parameters of the first camera in the initial state for the pre-calibration object, so that the processor can subsequently calculate the first pre-calibration RT matrix based on the first pre-calibration image parameters.

[0144] In step a02, the processor obtains second pre-calibrated image parameters for the first camera for each first angle end value in each first pose interval for the pre-calibrated object. Each first pose interval has two first angle end values, the difference between the two first angle end values ​​is fixed, and each first angle end value reflects the angle corresponding to the first angle end value when the first camera is rotated from 0° to the angle corresponding to the first angle end value. At this time, when the first camera takes a picture at this angle, the processor obtains the corresponding second pre-calibrated image parameters, which the processor then uses to perform static calibration calculations based on the first pre-calibrated image parameters and the second pre-calibrated image parameters. For example, in some cases, the first pose interval is set to -15° to -14°. Correspondingly, when the first camera is rotated 15° to the left from its initial state of 0° to -15°, the first camera captures an image, and the processor obtains the second pre-calibrated image parameters corresponding to -15°. Also, when the first camera is rotated 14° to the left from its initial state of 0° to -14°, the first camera captures an image, and the processor obtains the second pre-calibrated image parameters corresponding to -14°.

[0145] In step a03, the processor performs a static calibration calculation based on the first pre-calibrated image parameters and the second pre-calibrated image parameters to obtain a first pre-calibrated RT matrix corresponding to each first angle end value in each first pose interval. For example, the static calibration operation defines the first pre-calibrated image parameter obtained as P1 and the second pre-calibrated image parameter obtained as P2, and P2 = P1 × RT ax , RT can be calculated ax , RT ax is the rotation matrix between the first angle image and the initial image, that is, the first pre-calibrated RT matrix.

[0146] In step a04, the processor generates a first preset pose table based on multiple first pose intervals. The first preset pose table has an RT matrix corresponding to each first angle end value in each first pose interval, so that when the subsequent processor dynamically calibrates the first camera, it can directly extract the RT matrix corresponding to each first angle end value in the first preset pose table, thereby speeding up the dynamic calibration of the first camera and improving the efficiency of the dynamic calibration of the first camera.

[0147] In steps a01 to a04, by obtaining the first pre-calibrated image parameters and the second pre-calibrated image parameters, a subsequent processor can generate a first preset pose table based on the first pre-calibrated image parameters and the second pre-calibrated image parameters, thereby improving the efficiency of the camera dynamic calibration method. By having two different first angle end values ​​in each first pose interval, where the first angle end values ​​are within a first preset rotation range, the first preset pose table has an RT matrix corresponding to each first angle end value in each first pose interval. When the subsequent processor dynamically calibrates the first camera, it can directly extract the RT matrix corresponding to each first angle end value in the first preset pose table, thereby accelerating the dynamic calibration of the first camera and improving the efficiency of the dynamic calibration of the first camera.

[0148] In step b01, the processor obtains third pre-calibration image parameters of the second camera in the initial state for a pre-calibration object. The pre-calibration object can be a calibration plate, an object with a black and white checkerboard pattern, or other object to be measured that can assist in calibration. This is not limited here and is set according to actual needs. Preferably, the pre-calibration object is an object with a black and white checkerboard pattern to reduce the computational complexity of the calibration and improve the efficiency of the camera dynamic table method. The processor obtains the third pre-calibration image parameters of the second camera in the initial state for the pre-calibration object, so that the processor can subsequently calculate the fourth pre-calibration RT matrix based on the third pre-calibration image parameters.

[0149] In step b02, the processor obtains fourth pre-calibrated image parameters for the second camera for each second angle end value in each second pose interval for the pre-calibrated object. Each second pose interval has two second angle end values, and the difference between the two second angle end values ​​is fixed. Each second angle end value reflects the angle corresponding to the second angle end value when the second camera is rotated from 0° to the angle corresponding to the second angle end value. At this time, the second camera takes a picture at this angle, and the processor obtains the corresponding fourth pre-calibrated image parameters for the processor to subsequently perform static calibration calculations based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters. For example, in some cases, the second pose interval is set to -15° to -14°. Correspondingly, when the second camera is rotated 15° to the left from the initial state of 0° to -15°, the second camera takes a picture at this time, and the processor obtains the fourth pre-calibrated image parameters corresponding to -15°. Also, when the second camera is rotated 14° to the left from the initial state of 0° to -14°, the second camera takes a picture at this time, and the processor obtains the fourth pre-calibrated image parameters corresponding to -14°.

[0150] In step b03, the processor performs static calibration calculation based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters to obtain the second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval. For example, the static calibration operation defines the acquired third pre-calibrated image parameter as P3 and the acquired fourth pre-calibrated image parameter as P4, and P4 = P3 × RT by , RT can be calculated by , RT by is the rotation matrix between the second angle image and the initial image, that is, the second pre-calibrated RT matrix.

[0151] In step b04, the processor generates a second preset pose table based on multiple second pose intervals. The second preset pose table has an RT matrix corresponding to each second angle end value in each second pose interval. When the subsequent processor dynamically calibrates the second camera, it can directly extract the RT matrix corresponding to each second angle end value in the second preset pose table, thereby speeding up the dynamic calibration of the second camera and improving the efficiency of the dynamic calibration of the second camera.

[0152] In steps b01 to b04, by obtaining the third and fourth pre-calibrated image parameters, a subsequent processor can generate a second preset pose table based on the third and fourth pre-calibrated image parameters, thereby improving the efficiency of the camera dynamic calibration method. By having two different second angle end values ​​in each second pose interval, each second angle end value being within a second preset rotation range, the second preset pose table includes an RT matrix corresponding to each second angle end value in each second pose interval. When dynamically calibrating the second camera, the subsequent processor can directly extract the RT matrix corresponding to each second angle end value in the second preset pose table, thereby accelerating the dynamic calibration of the second camera and improving the efficiency of the second camera dynamic calibration.

[0153] In some embodiments, the first target pose interval has two different first candidate angle end values, each first candidate angle end value is correspondingly associated with a first RT matrix, and the first target RT matrix is ​​determined according to the first target pose interval. The second target pose interval has two different second candidate angle end values, each second candidate angle end value is correspondingly associated with a second RT matrix, and the second target RT matrix is ​​determined according to the second target pose interval, including:

[0154] Comparing the first rotation angle with each first candidate angle end value by angle difference, determining the first candidate angle end value with the smallest angle difference as the first target angle, and determining the first RT matrix associated with the first target angle end value as the first target RT matrix;

[0155] The second rotation angle is compared with each second candidate angle end value by angle difference, the second candidate angle end value with the smallest angle difference is determined as the second target angle, and the second RT matrix corresponding to the second target angle end value is determined as the second target RT matrix.

[0156] The first RT matrix associated with each first candidate angle end value is obtained by searching the first preset posture table by the processor. By comparing the angle difference between the first rotation angle and each first candidate angle end value, the first candidate angle end value with the smallest angle difference is determined as the first target angle, and the first RT matrix associated with the first target angle end value is determined as the first target RT matrix. For example, if the first rotation angle is +12.3°, the selected first target posture interval range is +12° to +12.5°. Compared with +12°, the angle difference between +12.5° and +12.3° is smaller. Then, the first pre-calibrated RT matrix corresponding to the +12.5° end value is selected from the first preset posture table as the first target RT matrix, so that the processor can obtain the first target RT matrix more quickly, the acquisition process is more efficient, and the calibration speed of the camera dynamic calibration method is accelerated.

[0157] The second RT matrix associated with each second candidate angle end value is obtained by searching the second preset posture table by the processor. By comparing the angle difference between the second rotation angle and each second candidate angle end value, the second candidate angle end value with the smallest angle difference is determined as the second target angle, and the second RT matrix associated with the second target angle end value is determined as the second target RT matrix. For example, if the second rotation angle is +12.3°, the selected second target posture interval range is +12° to +12.5°. Compared with +12°, the angle difference between +12.5° and +12.3° is smaller. Then, the second pre-calibrated RT matrix corresponding to the +12.5° end value is selected from the second preset posture table as the second target RT matrix, so that the processor can obtain the second target RT matrix more quickly, the acquisition process is more efficient, and the calibration speed of the camera dynamic calibration method is accelerated.

[0158] In some embodiments, each of the first posture intervals has two different first angle end values, the first angle end values ​​are within the first preset rotation range, the angle difference between the two first angle end values ​​of each first posture interval is less than or equal to 1°, and the first preset rotation range is ±15°;

[0159] Each of the second posture intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, the angle difference between the two second angle end values ​​of each second posture interval is less than or equal to 1°, and the second preset rotation range is ±15°.

[0160] By ensuring that the difference between the two first angle endpoints in each first pose interval is less than or equal to 1°, more first pose intervals are included within the same first preset rotation range, thereby increasing the accuracy of the camera dynamic calibration method. By setting a smaller difference between the two angle endpoints in each first pose interval, the processor can reduce the amount of computation required during subsequent deviation calculations, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0161] By ensuring that the difference between the two second angle endpoints in each second pose interval is less than or equal to 1°, more second pose intervals are included within the same second preset rotation range, thereby increasing the accuracy of the camera dynamic calibration method. By setting a smaller difference between the two angle endpoints in each second pose interval, the processor can reduce the amount of computation required during subsequent deviation calculations, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0162] In some embodiments, the angle difference between the two first angle end values ​​of each first posture interval is 0.5°, and the angle difference between the two second angle end values ​​of each second posture interval is 0.5°.

[0163] The first preset rotation range is ±15°, and the angle difference between the two first angle end values ​​of each first posture interval is 0.5°, so that there are 30 first posture intervals within the first preset rotation range, and the accuracy and precision of the selected first target posture interval are higher, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0164] The second preset rotation range is ±15°, and the angle difference between the two second angle end values ​​in each second posture interval is 0.5°, so that there are 30 second posture intervals within the second preset rotation range, and the accuracy and precision of the selected second target posture interval are higher, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0165] In some embodiments, performing an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain a first candidate image parameter, calculating a first deviation value between the first candidate image parameter and the second image parameter, using the first RT matrix corresponding to the minimum first deviation value as the first calibration RT matrix of the first camera, performing an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter, calculating a second deviation value between the second candidate image parameter and the fourth image parameter, and using the second RT matrix corresponding to the minimum second deviation value as the second calibration RT matrix of the second camera, further comprising:

[0166] Step c01: Determine whether the first rotation angle is greater than the first target angle corresponding to the first target RT matrix.

[0167] Step c02: If the first rotation angle is greater than the first target angle, perform multiple incremental multiplication calculations of the first offset matrix on the first target RT matrix, and obtain a first candidate matrix and a first candidate angle through each incremental multiplication calculation.

[0168] Step c03: performing rotation and translation calculations on the first image parameters according to each first candidate angle and the first candidate matrix to obtain a plurality of corresponding first candidate image parameters.

[0169] Step c04: If the first rotation angle is smaller than the first target angle, multiple subtraction and multiplication calculations of the first offset matrix are performed on the first target RT matrix, and each subtraction and multiplication calculation obtains a second candidate matrix and a second candidate angle.

[0170] Step c05: performing rotation and translation calculations on the first image parameters according to each second candidate angle and the second candidate matrix to obtain a plurality of corresponding first candidate image parameters.

[0171] Step d01: Determine whether the second rotation angle is greater than the second target angle corresponding to the second target RT matrix.

[0172] Step d02: If the second rotation angle is greater than the second target angle, perform multiple incremental multiplication calculations of the second offset matrix on the second target RT matrix, and obtain a third candidate matrix and a third candidate angle through each incremental multiplication calculation.

[0173] Step d03: performing rotation and translation calculations on the second image parameters according to each third candidate angle and the third candidate matrix to obtain a plurality of corresponding second candidate image parameters.

[0174] Step d04: If the second rotation angle is smaller than the second target angle, multiple subtraction and multiplication calculations of the second offset matrix are performed on the second target RT matrix, and each subtraction and multiplication calculation obtains a fourth candidate matrix and a fourth candidate angle.

[0175] Step d05: performing rotation and translation calculations on the second image parameters according to each fourth candidate angle and the fourth candidate matrix to obtain a plurality of corresponding second candidate image parameters.

[0176] In step c01, the processor determines whether the first rotation angle is greater than the first target angle corresponding to the first target RT matrix.

[0177] In step c02, the processor determines that the first rotation angle is greater than the first target angle. For example, if the first rotation angle is 12.2° and the target angle is 12°, the processor performs multiple incremental multiplications of the first offset matrix on the first target RT matrix, i.e., performing incremental multiplications starting from 12.0° toward 12.2°. The offset increment can be 0.001°, 0.002°, or other values, and is not limited here and can be set according to actual needs.

[0178] For example, if the offset increment is set to 0.001°, the offset increment is converted into the offset matrix RT Δx , the first target RT matrix and the offset matrix RT Δx The first candidate matrix is ​​obtained by multiplication, and multiple first candidate matrices are obtained multiple times, where the first offset is 0.001° to obtain a first candidate matrix, the second offset is 0.002° to obtain a first candidate matrix, the third offset is 0.003° to obtain a first candidate matrix, and so on.

[0179] In step c03, the processor performs rotation and translation calculations on the first image parameters based on each first candidate angle and the first candidate matrix to obtain multiple corresponding first candidate image parameters. By obtaining multiple corresponding first candidate image parameters, the processor makes the subsequent calculation of the first calibration RT matrix of the first camera more accurate, thereby reducing the error of the camera dynamic calibration method.

[0180] In step c04, the processor determines that the first rotation angle is less than the first target angle. For example, if the first rotation angle is 12.3° and the target angle is 12.5°, the processor performs a multiple decrement multiplication calculation of the first offset matrix on the first target RT matrix, i.e., decrementing the first offset matrix from 12.5° toward 12.3°. The offset decrement can be 0.001°, 0.002°, or other values, which are not limited here and can be set according to actual needs.

[0181] For example, if the offset decrement is set to 0.001°, the offset decrement is converted into the offset matrix RT Δx , the first target RT matrix and the offset matrix RT Δx The first candidate matrix is ​​obtained by multiplication, and multiple first candidate matrices are obtained multiple times, where the first offset is 0.001° to obtain a first candidate matrix, the second offset is 0.002° to obtain a first candidate matrix, the third offset is 0.003° to obtain a first candidate matrix, and so on.

[0182] In step c05, the processor performs rotation and translation calculations on the first image parameters based on each second candidate angle and the second candidate matrix to obtain multiple corresponding first candidate image parameters. By obtaining multiple corresponding first candidate image parameters, the processor makes the subsequent calculation of the first calibration RT matrix of the first camera more accurate, thereby reducing the error of the camera dynamic calibration method.

[0183] Through step c01, step c02 and step c04, when the camera dynamic calibration method calculates the first candidate image, the processor can find a suitable calculation method more quickly, thereby accelerating the calculation rate of the camera dynamic calibration method.

[0184] In step d01, the processor determines whether the second rotation angle is greater than the second target angle corresponding to the second target RT matrix.

[0185] In step d02, the processor determines that the second rotation angle is greater than the second target angle. For example, if the second rotation angle is 12.2° and the target angle is 12°, the processor performs multiple incremental multiplications of the second offset matrix on the second target RT matrix, i.e., performing incremental multiplications from 12.0° to 12.2°. The offset increment can be 0.001°, 0.002°, or other values, and is not limited here and can be set according to actual needs.

[0186] For example, if the offset increment is set to 0.001°, the offset increment is converted into the offset matrix RT Δy , the second target RT matrix and the offset matrix RT Δy The second candidate matrix is ​​obtained by multiplication, and multiple second candidate matrices are obtained multiple times, where the first offset is 0.001° to obtain a second candidate matrix, the second offset is 0.002° to obtain a second candidate matrix, the third offset is 0.003° to obtain a second candidate matrix, and so on.

[0187] In step d03, the processor performs rotation and translation calculations on the second image parameters based on each third candidate angle and the third candidate matrix to obtain multiple corresponding second candidate image parameters. By obtaining multiple corresponding second candidate image parameters, the processor makes the subsequent calculation of the second calibration RT matrix of the second camera more accurate, thereby reducing the error of the camera dynamic calibration method.

[0188] In step d04, the processor determines that the second rotation angle is less than the second target angle. For example, if the second rotation angle is 12.3° and the target angle is 12.5°, the processor performs a multiple decrement multiplication calculation of the second offset matrix on the second target RT matrix, i.e., decrementing the second offset matrix from 12.5° toward 12.3°. The offset decrement can be 0.001°, 0.002°, or other values, which are not limited here and are set according to actual needs.

[0189] For example, if the offset decrement is set to 0.001°, the offset decrement is converted into the offset matrix RT Δy , the second target RT matrix and the offset matrix RT Δy The second candidate matrix is ​​obtained by multiplication, and multiple second candidate matrices are obtained multiple times, where the first offset is 0.001° to obtain a second candidate matrix, the second offset is 0.002° to obtain a second candidate matrix, the third offset is 0.003° to obtain a second candidate matrix, and so on.

[0190] In step d05, the processor performs rotation and translation calculations on the second image parameters based on each fourth candidate angle and the fourth candidate matrix to obtain multiple corresponding second candidate image parameters. By obtaining multiple corresponding second candidate image parameters, the processor makes the subsequent calculation of the second calibration RT matrix of the second camera more accurate, thereby reducing the error of the camera dynamic calibration method.

[0191] Through step d01, step d02 and step d04, when the camera dynamic calibration method calculates the second candidate image, the processor can find a suitable calculation method more quickly, thereby accelerating the calculation rate of the camera dynamic calibration method.

[0192] In some embodiments, calculating a first deviation between the first candidate image parameter and the second image parameter, using a first RT matrix corresponding to the minimum first deviation as a first calibration RT matrix for the first camera, calculating a second deviation between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to the minimum second deviation as a second calibration RT matrix for the second camera further includes:

[0193] Calculate the first deviation between each first candidate image parameter and the second image parameter. If the nth first deviation is less than the n+1th first deviation, use the nth first deviation as the minimum first deviation. Use the RT matrix corresponding to the minimum first deviation as the first calibration RT matrix for the first camera, where n is a positive integer greater than 1.

[0194] Calculate the second deviation between each second candidate image parameter and the fourth image parameter. If the nth second deviation is less than the (n+1)th second deviation, use the nth second deviation as the minimum second deviation. Use the RT matrix corresponding to the minimum second deviation as the second calibration RT matrix for the second camera, where n is a positive integer greater than 1.

[0195] The processor calculates the first deviation value between each first candidate image parameter and the second image parameter, and compares the first deviation values ​​calculated twice adjacently. If the nth first deviation value is greater than the n+1th first deviation value, the processor continues to calculate the first deviation value until the n+1th first deviation value is greater than the nth first deviation value. The processor uses the RT matrix corresponding to the selected minimum deviation value as the calibration RT matrix of the first camera to complete the dynamic calibration of the first camera. By using the nth first deviation value as the minimum first deviation value if the nth first deviation value is less than the n+1th first deviation value, the camera dynamic calibration method can find the minimum first deviation value more quickly, thereby determining the calibration RT matrix of the first camera, and reducing the amount of calculation. It is not necessary to calculate the entire first pose interval again, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0196] For example, the first candidate matrix During the first incremental calculation, RT AX1 =RT ax ×RT Δx , during the second incremental calculation And so on. When calculating the first deviation value, RT AX1 With the first image parameter P A0 Multiplying the first candidate image parameters to obtain the first candidate image parameters, performing least squares error calculation on the first candidate image parameters and the second image parameters to obtain a first deviation value, and comparing the sizes of multiple first deviation values, using the first candidate matrix corresponding to the smallest first deviation value as the first calibration RT matrix. Specifically, if the nth first deviation value is greater than the n+1th first deviation value, the processor continues to calculate the first deviation values ​​until the n+1th first deviation value is greater than the nth first deviation value, and uses the nth first deviation value that is less than the n+1th first deviation value as the minimum first deviation value.

[0197] The processor calculates the second deviation value between each second candidate image parameter and the fourth image parameter, and compares the second deviation values ​​calculated twice adjacently. If the nth second deviation value is greater than the n+1th second deviation value, the processor continues to calculate the second deviation value until the n+1th second deviation value is greater than the nth second deviation value. The processor uses the RT matrix corresponding to the selected minimum deviation value as the calibration RT matrix of the second camera to complete the dynamic calibration of the second camera. By using the nth second deviation value as the minimum second deviation value if the nth second deviation value is less than the n+1th second deviation value, the camera dynamic calibration method can find the minimum second deviation value more quickly, thereby determining the calibration RT matrix of the second camera, and reducing the amount of calculation. It is not necessary to calculate the entire second posture interval again, thereby improving the calibration efficiency of the camera dynamic calibration method.

[0198] For example, the second candidate matrix During the first incremental calculation, RT BY1 =RT by ×RT Δy , during the second incremental calculation And so on. When calculating the second deviation value, RT BY1 With the third image parameter P B0 Multiplying the second candidate image parameters to obtain the second candidate image parameters, performing least squares error calculation on the second candidate image parameters and the fourth image parameters to obtain a second deviation value, and comparing the sizes of multiple second deviation values, using the second candidate matrix corresponding to the smallest second deviation value as the second calibration RT matrix. Specifically, if the mth second deviation value is greater than the m+1th second deviation value, the processor continues to calculate the second deviation values ​​until the m+1th second deviation value is greater than the mth second deviation value, and uses the mth second deviation value that is less than the m+1th second deviation value as the minimum second deviation value.

[0199] Figure 2 FIG. 4 is a schematic diagram showing the structure of a camera dynamic calibration device provided by an embodiment of the present invention. The device 400 includes:

[0200] A first acquisition module 410 is configured to acquire first image parameters of a target object from a first camera in an initial state;

[0201] A second acquisition module 420 is configured to acquire a first rotation angle of the first camera and a second image parameter of the target object after the first camera is rotated;

[0202] A first determination module 430 is configured to determine a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, the first preset pose table being pre-statically calibrated according to a first preset rotation range of the first camera;

[0203] A second determination module 440 is configured to determine a first target RT matrix according to the first target posture interval;

[0204] A first calculation module 450 is configured to perform an offset calculation on the first image parameters according to the first target RT matrix and the first rotation angle to obtain first candidate image parameters;

[0205] A second calculation module 460 is configured to calculate a first deviation between the first candidate image parameter and the second image parameter, and use a first RT matrix corresponding to the minimum first deviation as a first calibration RT matrix for the first camera;

[0206] A third acquisition module 510 is configured to acquire a third image parameter of the target object from the second camera in an initial state;

[0207] A fourth acquisition module 520 is configured to acquire a second rotation angle of the second camera and a fourth image parameter of the target object after the second camera is rotated;

[0208] A third determining module 530 determines a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera;

[0209] A fourth determining module 540 is configured to determine a second target RT matrix according to the second target posture interval;

[0210] A third calculation module 550 is configured to perform an offset calculation on the third image parameters according to the second target RT matrix and the second rotation angle to obtain second candidate image parameters;

[0211] a fourth calculation module 560 , configured to calculate a second deviation between the second candidate image parameter and the fourth image parameter, and use a second RT matrix corresponding to the minimum second deviation as a second calibration RT matrix for the second camera;

[0212] a fifth calculation module 610, configured to calculate a third target RT matrix based on the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera, where the first static calibration RT matrix is ​​pre-obtained through static calibration based on the first image parameters and the third image parameters;

[0213] a sixth calculation module 620, configured to calculate third candidate image parameters according to the third target RT matrix and the second image parameters;

[0214] a seventh calculation module 630, configured to calculate a third deviation value between the third candidate image parameter and the fourth image parameter;

[0215] The fifth determination module 640 is configured to perform an offset adjustment on the third target RT matrix until the third deviation value is minimized, and obtain a third calibrated RT matrix corresponding to the minimum third deviation value.

[0216] In some embodiments, the first determining module 430 further includes:

[0217] A first acquisition unit, configured to acquire first pre-calibrated image parameters of the first camera for a pre-calibrated object in an initial state;

[0218] A second acquisition unit is used to acquire second pre-calibrated image parameters of the first camera for each angle end value in each first pose interval for the pre-calibrated object;

[0219] A first calculation unit is used to perform static calibration calculation according to the first pre-calibrated image parameters and the second pre-calibrated image parameters to obtain a pre-calibrated RT matrix corresponding to each angle end value in each first pose interval;

[0220] The first processing unit is used to generate a first preset posture table according to multiple first posture intervals, where the first preset posture table has a pre-calibrated RT matrix corresponding to each angle end value in each first posture interval.

[0221] In some embodiments, the second determining module 440 further includes:

[0222] The second calculation unit is used to compare the angle difference between the first rotation angle and each candidate angle end value, determine the candidate angle end value with the smallest angle difference as the target angle, and determine the RT matrix corresponding to the target angle end value as the first target RT matrix.

[0223] In some embodiments, the first calculation module 450 and the second calculation module 460 further include:

[0224] a third calculation unit, configured to determine whether the first rotation angle is greater than a target angle corresponding to the first target RT matrix;

[0225] a fourth calculation unit, configured to perform multiple incremental multiplication calculations of the first offset matrix on the first target RT matrix if the first rotation angle is greater than the target angle, wherein each incremental multiplication calculation obtains a first candidate matrix and a first candidate angle;

[0226] a fifth calculation unit, configured to perform rotation and translation calculations on the first image parameters according to each first candidate angle and the first candidate matrix to obtain a plurality of corresponding first candidate image parameters;

[0227] a sixth calculation unit, configured to perform multiple subtraction and multiplication calculations of the first offset matrix on the first target RT matrix if the first rotation angle is smaller than the target angle, wherein each subtraction and multiplication calculation obtains a second candidate matrix and a second candidate angle;

[0228] The seventh calculation unit is configured to perform rotation and translation calculations on the first image parameters according to each second candidate angle and the second candidate matrix to obtain a plurality of corresponding first candidate image parameters.

[0229] In some embodiments, the first determining module 530 further includes:

[0230] a third acquiring unit, configured to acquire third pre-calibrated image parameters of the second camera for the pre-calibrated object in an initial state;

[0231] a fourth acquiring unit, which acquires fourth pre-calibrated image parameters of the second camera for each second angle end value in each second pose interval and for the pre-calibrated object;

[0232] an eighth calculation unit, performing a static calibration calculation based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters to obtain a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval;

[0233] A second preset posture table is generated according to the plurality of second posture intervals, wherein the second preset posture table has a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval.

[0234] In some embodiments, the second determining module 540 further includes:

[0235] The ninth calculation unit compares the angle difference between the second rotation angle and each second candidate angle end value, determines the second candidate angle end value with the smallest angle difference as the second target angle, and determines the second RT matrix corresponding to the second target angle end value as the second target RT matrix.

[0236] In some embodiments, the first calculation module 550 and the second calculation module 560 further include:

[0237] a tenth calculation unit, configured to determine whether the second rotation angle is greater than a second target angle corresponding to the second target RT matrix;

[0238] an eleventh calculation unit, performing multiple incremental multiplication calculations of the second offset matrix on the second target RT matrix if the second rotation angle is greater than the second target angle, wherein each incremental multiplication calculation obtains a third candidate matrix and a third candidate angle;

[0239] a twelfth calculation unit, performing rotation and translation calculations on the second image parameters according to each third candidate angle and the third candidate matrix to obtain a plurality of corresponding second candidate image parameters;

[0240] a thirteenth calculation unit, configured to perform multiple subtraction and multiplication calculations of the second offset matrix on the second target RT matrix if the second rotation angle is less than the second target angle, and obtain a fourth candidate matrix and a fourth candidate angle by performing each subtraction and multiplication calculation;

[0241] The fourteenth calculation unit is configured to perform rotation and translation calculations on the second image parameters according to each fourth candidate angle and the fourth candidate matrix to obtain a plurality of corresponding second candidate image parameters.

[0242] In some embodiments, the second calculation module 560 further includes:

[0243] A fifteenth calculation unit is configured to calculate a second deviation between each second candidate image parameter and the fourth image parameter. If the nth second deviation value is less than the (n+1)th second deviation value, the nth second deviation value is used as the minimum second deviation value, and the RT matrix corresponding to the minimum second deviation value is used as the second calibration RT matrix of the second camera, where n is a positive integer greater than 1.

[0244] Figure 3 The schematic diagram of the structure of the computing device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0245] like Figure 3 As shown, the computing device may include: a processor (processor) 702 , a communications interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0246] Processor 702, communication interface 704, and memory 706 communicate with each other via communication bus 408. Communication interface 704 is used to communicate with other devices, such as clients or other server network elements. Processor 702 is used to execute program 710, which may specifically perform the steps described in the above-mentioned embodiment of the method for dynamic camera calibration.

[0247] Specifically, the program 710 may include program code including computer-executable instructions.

[0248] Processor 702 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a computing device may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.

[0249] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0250] An embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one executable instruction, and the executable instruction executes any one of the operations of the above-mentioned camera dynamic calibration method when run.

[0251] The algorithm or demonstration provided herein are not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems may also be used together with the teachings based on this. According to the above description, it is apparent that the structure required for constructing this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0252] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0253] Similarly, it should be understood that in order to streamline the present invention and facilitate understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0254] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed so far can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0255] It should be noted that the above embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by a person skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A camera dynamic calibration method, characterized in that: The method comprises: Acquire first image parameters of the target object by the first camera in an initial state; Obtaining a first rotation angle of the first camera and a second image parameter of the target object after rotation; Determining a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, wherein the first preset pose table is pre-statically calibrated according to a first preset rotation range of the first camera; Determining a first target RT matrix according to the first target posture interval; performing an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain first candidate image parameters; Calculating a first deviation value between the first candidate image parameter and the second image parameter, and using a first RT matrix corresponding to a minimum of the first deviation value as a first calibration RT matrix of the first camera; Acquiring a third image parameter of the target object by the second camera in an initial state; Acquire a second rotation angle after the second camera is rotated and a fourth image parameter for the target object; Determining a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera; Determine a second target RT matrix according to the second target posture interval; performing an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter; Calculating a second deviation between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to a minimum of the second deviation as a second calibration RT matrix for the second camera; Calculating a third target RT matrix according to the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera, where the first static calibration RT matrix is ​​pre-obtained through static calibration according to the first image parameters and the third image parameters; calculating third candidate image parameters according to the third target RT matrix and the second image parameters; calculating a third deviation value between the third candidate image parameter and the fourth image parameter; The third target RT matrix is ​​offset-adjusted until the third deviation value is minimized, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value.

2. The camera dynamic calibration method according to claim 1, wherein: Each of the first pose intervals has two different first angle end values, the first angle end values ​​are within the first preset rotation range, the first preset pose table is pre-statically calibrated according to the first preset rotation range of the first camera, each of the second pose intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, and the second preset pose table is pre-statically calibrated according to the second preset rotation range of the second camera. The method includes: Acquiring first pre-calibrated image parameters of the first camera for a pre-calibrated object in an initial state; Obtaining second pre-calibrated image parameters of the first camera for each first angle end value in each first pose interval and for the pre-calibrated object; Performing a static calibration calculation based on the first pre-calibrated image parameters and the second pre-calibrated image parameters to obtain a first pre-calibrated RT matrix corresponding to each first angle end value in each first posture interval; Generate the first preset posture table according to the plurality of the first posture intervals, wherein the first preset posture table has a first pre-calibrated RT matrix corresponding to each first angle end value in each of the first posture intervals; Acquiring third pre-calibrated image parameters of the second camera for a pre-calibrated object in an initial state; Obtaining fourth pre-calibrated image parameters of the second camera for each second angle end value in each second pose interval for the pre-calibrated object; Performing a static calibration calculation based on the third pre-calibrated image parameters and the fourth pre-calibrated image parameters to obtain a second pre-calibrated RT matrix corresponding to each second angle end value in each second posture interval; The second preset posture table is generated according to a plurality of the second posture intervals, wherein the second preset posture table has a second pre-calibrated RT matrix corresponding to each second angle end value in each of the second posture intervals.

3. The camera dynamic calibration method according to claim 1, wherein: The first target pose interval has two different first candidate angle end values, each of the first candidate angle end values ​​is correspondingly associated with a first RT matrix, and determining the first target RT matrix according to the first target pose interval, the second target pose interval has two different second candidate angle end values, each of the second candidate angle end values ​​is correspondingly associated with a second RT matrix, and determining the second target RT matrix according to the second target pose interval includes: Comparing the first rotation angle with each of the first candidate angle end values ​​by performing an angle difference comparison, determining the first candidate angle end value with the smallest angle difference as the first target angle, and determining the first RT matrix associated with the first target angle end value as the first target RT matrix; Compare the angle difference between the second rotation angle and each second candidate angle end value, determine the second candidate angle end value with the smallest angle difference as the second target angle, and determine the second RT matrix corresponding to the second target angle end value as the second target RT matrix.

4. The camera dynamic calibration method according to claim 1, wherein: Each of the first posture intervals has two different first angle end values, the first angle end values ​​are within the first preset rotation range, the angle difference between the two first angle end values ​​of each of the first posture intervals is less than or equal to 1°, and the first preset rotation range is ±15°; Each of the second posture intervals has two different second angle end values, the second angle end values ​​are within the second preset rotation range, the angle difference between the two second angle end values ​​of each second posture interval is less than or equal to 1°, and the second preset rotation range is ±15°.

5. The camera dynamic calibration method according to claim 4, wherein: The angle difference between the two first angle end values ​​in each first posture interval is 0.5°, and the angle difference between the two second angle end values ​​in each second posture interval is 0.5°.

6. The camera dynamic calibration method according to claim 1, wherein: The method further includes: performing an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain a first candidate image parameter; calculating a first deviation value between the first candidate image parameter and the second image parameter; using a first RT matrix corresponding to the minimum first deviation value as a first calibration RT matrix of the first camera; performing an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter; calculating a second deviation value between the second candidate image parameter and the fourth image parameter; and using a second RT matrix corresponding to the minimum second deviation value as a second calibration RT matrix of the second camera. Determining whether the first rotation angle is greater than a first target angle corresponding to the first target RT matrix; If the first rotation angle is greater than the first target angle, performing multiple incremental multiplication calculations of the first offset matrix on the first target RT matrix, each incremental multiplication calculation obtaining a first candidate matrix and a first candidate angle; performing rotation and translation calculations on the first image parameters according to each of the first candidate angles and the first candidate matrix to obtain a plurality of corresponding first candidate image parameters; If the first rotation angle is smaller than the first target angle, performing multiple subtraction and multiplication calculations of the first offset matrix on the first target RT matrix, each subtraction and multiplication calculation obtaining a second candidate matrix and a second candidate angle; performing rotation and translation calculations on the first image parameters according to each of the second candidate angles and the second candidate matrix to obtain a plurality of corresponding first candidate image parameters; Determining whether the second rotation angle is greater than a second target angle corresponding to the second target RT matrix; If the second rotation angle is greater than the second target angle, performing multiple incremental multiplication calculations of the second offset matrix on the second target RT matrix, each incremental multiplication calculation obtaining a third candidate matrix and a third candidate angle; Performing rotation and translation calculations on the second image parameters according to each of the third candidate angles and the third candidate matrix to obtain a plurality of corresponding second candidate image parameters; If the second rotation angle is less than the second target angle, performing multiple subtraction and multiplication calculations of the second offset matrix on the second target RT matrix, and obtaining a fourth candidate matrix and a fourth candidate angle by performing the subtraction and multiplication calculations each time; A rotation and translation calculation is performed on the second image parameter according to each of the fourth candidate angles and the fourth candidate matrix to obtain a plurality of corresponding second candidate image parameters.

7. The camera dynamic calibration method according to claim 6, wherein: The calculating a first deviation value between the first candidate image parameter and the second image parameter, using a first RT matrix corresponding to a minimum of the first deviation value as a first calibration RT matrix of the first camera, calculating a second deviation value between the second candidate image parameter and the fourth image parameter, and using a second RT matrix corresponding to the minimum of the second deviation value as a second calibration RT matrix of the second camera further includes: Calculating a first deviation between each of the first candidate image parameters and the second image parameter; if the nth first deviation value is less than the (n+1)th first deviation value, taking the nth first deviation value as the minimum first deviation value, and taking the RT matrix corresponding to the minimum first deviation value as the first calibration RT matrix of the first camera, where n is a positive integer greater than 1; Calculate a second deviation between each of the second candidate image parameters and the fourth image parameter. If the nth second deviation value is less than the n+1th second deviation value, use the nth second deviation value as the minimum second deviation value, and use the RT matrix corresponding to the minimum second deviation value as the second calibration RT matrix of the second camera, where n is a positive integer greater than 1.

8. A camera dynamic calibration device, characterized in that: The device comprises: A first acquisition module, configured to acquire first image parameters of a target object from a first camera in an initial state; A second acquisition module is used to acquire a first rotation angle after the first camera is rotated and a second image parameter of the target object; a first determining module, configured to determine a first target pose interval from a plurality of first pose intervals in a first preset pose table according to the first rotation angle, wherein the first preset pose table is pre-statically calibrated according to a first preset rotation range of the first camera; A second determination module is configured to determine a first target RT matrix according to the first target posture interval; a first calculation module, configured to perform an offset calculation on the first image parameter according to the first target RT matrix and the first rotation angle to obtain a first candidate image parameter; a second calculation module, configured to calculate a first deviation between the first candidate image parameter and the second image parameter, and use a first RT matrix corresponding to a minimum of the first deviation as a first calibration RT matrix of the first camera; A third acquisition module, configured to acquire a third image parameter of the target object from the second camera in an initial state; a fourth acquisition module, configured to acquire a second rotation angle of the second camera after rotation and a fourth image parameter for the target object; a third determining module, determining a second target pose interval from a plurality of second pose intervals in a second preset pose table according to the second rotation angle, where the second preset pose table is pre-statically calibrated according to a second preset rotation range of the second camera; a fourth determining module, configured to determine a second target RT matrix according to the second target posture interval; a third calculation module, configured to perform an offset calculation on the third image parameter according to the second target RT matrix and the second rotation angle to obtain a second candidate image parameter; a fourth calculation module, configured to calculate a second deviation between the second candidate image parameter and the fourth image parameter, and use a second RT matrix corresponding to a minimum of the second deviation as a second calibration RT matrix for the second camera; a fifth calculation module, configured to calculate a third target RT matrix based on the first calibration RT matrix, the second calibration RT matrix, and a first static calibration RT matrix between the first camera and the second camera; a sixth calculation module, configured to calculate third candidate image parameters according to the third target RT matrix and the second image parameters; a seventh calculation module, configured to calculate a third deviation value between the third candidate image parameter and the fourth image parameter; The fifth determination module is configured to perform an offset adjustment on the third target RT matrix until the third deviation value is minimized, thereby obtaining a third calibration RT matrix corresponding to the minimum third deviation value.

9. A computing device, characterized in that include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the camera dynamic calibration method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The storage medium stores at least one executable instruction, and the executable instruction, when run, executes the operation of the camera dynamic calibration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Quick calibration method and device for hot-line work robot based on multiple sensors

    CN112223302A

  • Camera and vehicle calibration method and device, electronic equipment and storage medium

    CN115018935A