A four-orientation 3D camera calibration method and system
Patent Information
- Application Number
- CN202610635268.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-09
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]本发明的目的在于提供一种四方位3D相机校准方法及系统,解决了传统方法全局校准能力不足的问题
提升全局测量精度与一致性:通过系统性采集3D相机在四个特定方位的标定数据,并构建统一的空间坐标系和误差补偿模型,显著提高了3D相机在其整个工作空间内的三维测量精度和不同方位测量结果的一致性。
Smart Images

Figure CN122798902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical precision measurement technology, and in particular to a four-directional 3D camera calibration method and system. Background Technology
[0002] In fields such as industrial inspection, 3D reconstruction, and robot vision, the application of 3D cameras (such as structured light cameras, laser profilometers, and binocular stereo vision systems) is becoming increasingly widespread. The core task of a 3D camera is to accurately calculate the 3D point cloud coordinates of the surface of the object being measured using the acquired image information. However, before leaving the factory or being used, 3D cameras have inherent physical deviations (i.e., intrinsic parameter errors) in their internal optical components, sensors, and computational models, and the position and attitude relationship between the camera and the world coordinate system (i.e., extrinsic parameters) is unknown. These factors directly lead to severe accuracy distortion in the generated 3D point cloud data. Therefore, high-precision calibration of the 3D camera is the primary prerequisite for ensuring the reliability of its measurement results.
[0003] Most existing 3D camera calibration methods rely on a known, precisely sized 2D or 3D calibration target (such as a checkerboard, dot array, or stereo calibration block) to fix the camera in place. The camera is then moved to multiple different positions and orientations for shooting, or the target is fixed while the camera moves around it for shooting. These methods have the following limitations: First, single-aspect (usually direct) calibration, while acquiring camera parameters at that viewpoint, struggles to guarantee consistent accuracy across the entire effective working space (especially at the edge of the field of view and in the depth direction) when the camera needs to scan objects over a large area and from multiple angles. Second, although multi-aspect movement can acquire more data, traditional methods typically treat the acquisition of data from each aspect as an independent, sequential calibration process, then perform data averaging or simple fusion. This fails to systematically construct a unified, high-precision spatial coordinate system and error compensation model covering multiple potential working orientations of the camera, resulting in low calibration efficiency and underutilization of the spatial constraints between data from multiple orientations, hindering further improvements in overall calibration accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a four-directional 3D camera calibration method and system, which solves the problem of insufficient global calibration capability of traditional methods.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a four-directional 3D camera calibration method, comprising the following steps: The 3D camera is controlled to move sequentially and lock onto four preset calibration positions around the stereo calibration device for data acquisition. The four preset calibration positions include a first forward position, a second backward position, a third left position, and a fourth right position. A frame of integrated point cloud data is generated at each position. The comprehensive point cloud data from the four directions are processed separately, the coordinates of the measurement points corresponding to the calibrated feature points in each direction are extracted, and the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value is established through the feature point identifier, resulting in four initial correspondence sets; Calculate the initial extrinsic parameters using the initial correspondence set of the first forward orientation, and estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation; based on the four initial correspondence sets, the initial extrinsic parameters, and the pose transformation matrices, construct and solve a global optimization model to simultaneously optimize and obtain the intrinsic parameters and optimal extrinsic parameters of the 3D camera. The residual reprojection error of each feature point is calculated based on the intrinsic parameters and the optimal extrinsic parameters. A spatial error compensation model is trained based on the residual reprojection error and the corresponding three-dimensional spatial coordinates. The output includes a complete set of calibration parameters, including the intrinsic parameters, the optimal extrinsic parameters, and the spatial error compensation model.
[0006] The method further includes: Multiple calibration feature points with known three-dimensional coordinates are set up on the constructed three-dimensional calibration device; The origin of the world coordinate system is defined on the main reference feature point of the three-dimensional calibration device. The calibration feature point includes a central main axis feature cluster located on the main feature plane in the central region, and feature extension arms extending from the central region to the four spatial quadrants. For the third left-side orientation and the fourth right-side orientation, a left feature facade and a right feature facade are respectively provided.
[0007] The process of controlling the 3D camera to move sequentially and lock onto four preset calibration positions surrounding the stereo calibration device includes: Control the 3D camera to a preset orientation for coarse positioning, then acquire an auxiliary alignment point cloud, identify at least three non-collinear reference feature points, and calculate the deviation between their measured coordinates and the true world coordinates. The pose is finely adjusted through closed-loop feedback control until the pose error is lower than the preset threshold, thereby locking the 3D camera in the current calibration position.
[0008] After locking the 3D camera to the current calibration orientation, the method further includes: At each locked calibration azimuth, the 3D camera is controlled to continuously acquire multiple frames of raw point cloud data, and the multiple frames of raw point cloud data are spatiotemporally aligned and fused. A single frame of comprehensive point cloud data representing the measurement results at that azimuth is generated by statistical averaging or filtering.
[0009] Specifically, the comprehensive point cloud data from four directions are processed separately, and the coordinates of the measurement points corresponding to the calibrated feature points in each direction are extracted. A matching relationship between the coordinates of each measurement point and the corresponding ground truth world coordinates is established through feature point identifiers, resulting in four initial correspondence sets, including: Using the spatial layout prior of the stereo calibration device, the point cloud region where the feature point is located is predicted based on the current position of the comprehensive point cloud data from the four directions. Within the prediction area, the coordinates of the measurement points corresponding to the calibrated feature points are extracted and their unique feature point identifiers are determined by geometric feature fitting or pattern recognition algorithms. Based on the feature point identifier, the true world coordinates are indexed from the stored device data to directly form matching pairs; and bidirectional spatial consistency verification is performed on all preliminary matching pairs to eliminate abnormal matches with excessive errors, resulting in four initial correspondence sets.
[0010] The estimation of the camera pose transformation matrices for the other three orientations relative to the first forward orientation includes: The coarse mechanical transformation matrix fed back by the multi-axis positioning system is obtained as a priori. Using the coarse mechanical transformation matrix as the initial value, the measurement point cloud of the current orientation and the measurement point cloud of the first forward orientation are iteratively registered to the nearest point to obtain the visual refinement transformation matrix. The coarse mechanical transformation matrix and the visual refinement transformation matrix are combined to form the final camera pose transformation matrix.
[0011] The objective function of the global optimization model is to minimize the sum of squared reprojection errors of all feature points in all four directions.
[0012] The optimization variables of the global optimization model include: camera intrinsic vector, extrinsic matrix of the first forward azimuth, and relative pose transformation matrices of the second backward azimuth, third left azimuth, and fourth right azimuth relative to the first forward azimuth. The model is solved by iterative optimization using the Levenberg-Marquardt algorithm until the total reprojection error converges.
[0013] The method further includes: For any 3D point currently acquired by the 3D camera, the initial image coordinates are first obtained by standard projection using the intrinsic parameters and optimal extrinsic parameters. At the same time, the coordinates of the 3D point are input into the spatial error compensation model to obtain the predicted error compensation value. Finally, the error compensation value is added to the initial image coordinates to obtain the final image coordinates after spatial error compensation.
[0014] Secondly, the present invention provides a four-directional 3D camera calibration system, applied to a four-directional 3D camera calibration method as provided in the first aspect. The four-directional 3D camera calibration system includes a stereo calibration device and a calibration subsystem. The calibration subsystem includes a point cloud acquisition module, a coordinate matching module, a pose transformation module, and a calibration module. The stereo calibration device is used to set up multiple calibration feature points with known three-dimensional coordinates and to determine the origin of the world coordinate system. The point cloud acquisition module is used to control the 3D camera to move sequentially and lock to four preset calibration positions around the stereo calibration device for data acquisition. The coordinate matching module is used to process the comprehensive point cloud data of the four directions respectively, extract the coordinates of the measurement points corresponding to the calibration feature points in each direction, and establish the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value through the feature point identifier, so as to obtain four initial correspondence relationship sets. The pose transformation module is used to calculate the initial extrinsic parameters based on the initial correspondence set of the first forward orientation, and to estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation; based on the four initial correspondence sets, the initial extrinsic parameters, and the pose transformation matrices, a global optimization model is constructed and solved to simultaneously optimize and obtain the intrinsic parameters and optimal extrinsic parameters of the 3D camera. The calibration module is used to calculate the residual reprojection error of feature points in each direction based on the intrinsic parameters and the optimal extrinsic parameters, and to train a spatial error compensation model based on the residual reprojection error and the corresponding three-dimensional spatial coordinates, and output a complete calibration parameter set including the intrinsic parameters, the optimal extrinsic parameters and the spatial error compensation model.
[0015] This invention discloses a four-directional 3D camera calibration method and system, utilizing a stereo calibration device with multi-plane stereo distributed feature points. The system controls the 3D camera to perform precise positioning and point cloud acquisition sequentially in four orthogonal directions surrounding the device: a first forward direction, a second backward direction, a third left direction, and a fourth right direction. The system extracts the measured coordinates of feature points in each point cloud and matches them with the true world coordinates. Using the first forward direction as a reference, the system estimates the transformation between directions through hybrid guided registration, thereby constructing a global optimization model that integrates the constraints of all feature points in the four directions. This model iteratively solves for the camera's precise intrinsic parameters and a globally consistent optimal extrinsic parameter set. Finally, a spatial error compensation model is established based on the optimized residual error. This invention, through four-directional collaborative calibration and joint optimization, significantly improves the measurement accuracy and consistency of the 3D camera throughout the entire workspace, effectively solving the problem of insufficient global calibration capability in traditional methods. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0017] Figure 1 This is a schematic diagram of the steps of a four-way 3D camera calibration method according to the first embodiment of the present invention.
[0018] Figure 2 This is a flowchart illustrating a four-directional 3D camera calibration method provided by the present invention.
[0019] Figure 3 This is a schematic diagram of a four-directional 3D camera calibration system provided in the second embodiment of the present invention.
[0020] Figure 4 This is a schematic diagram of the electronic device of the present invention.
[0021] In the diagram: 101-3D calibration device, 102-point cloud acquisition module, 103-coordinate matching module, 104-pose transformation module, 105-calibration module. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0023] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0024] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0025] The first embodiment of this application is as follows: Please see Figures 1-2This invention provides a four-way 3D camera calibration method, comprising the following steps: S101. Control the 3D camera to move sequentially and lock to four preset calibration positions around the stereo calibration device for data acquisition. The four preset calibration positions include the first forward position, the second backward position, the third left position, and the fourth right position. At each position, a frame of comprehensive point cloud data is acquired and generated.
[0026] Specifically, first, a high-precision stereo calibration device is prepared. This device is fixedly placed on a stable platform. The device contains multiple high-contrast calibration feature points with known coordinates in three-dimensional space (such as specifically coded target points, precision-machined sphere centers, cone vertices, etc.). The geometric relationships (distances, angles) of these feature points in space are precisely calibrated, and their three-dimensional coordinates are known as true values in the "world coordinate system." The design of the stereo calibration device should ensure that it can capture a sufficient number of well-distributed calibration feature points when viewed from multiple different orientations within the 3D camera's field of view.
[0027] The three-dimensional calibration device consists of a rigid body, typically precision-machined from a material with a low coefficient of thermal expansion to ensure geometric stability. The establishment of the world coordinate system is directly embedded in the design of the device. Origin of the coordinate system: Defined on a specific, easily identifiable primary reference feature point on a rigid body. For example, this point could be a special precision reflective target with a unique coded identifier, or the center of a reference sphere located at the geometric center of the device.
[0028] Coordinate axis orientation: Taking the main reference feature point as the origin, two mutually orthogonal and precision-machined reference planes or reference edges on the rigid body are selected and defined as the direction references for the X-axis and Y-axis of the world coordinate system, respectively. Typically, the normal direction of the plane containing the main feature surface of the device facing the operator is defined as the Z-axis.
[0029] Physical solidification: Through precision measurement techniques, the three-dimensional coordinates of all other calibration feature points on the device are accurately measured relative to the origin and axes of this defined coordinate system and solidified as "true values". Therefore, the world coordinate system is physically and immovably fixed to the three-dimensional calibration device itself.
[0030] To ensure that a sufficient number of spatially distributed feature points are captured from the first forward azimuth, the second backward azimuth, the third left azimuth, and the fourth right azimuth, a combination of a radial layout along the main axis and a multi-planar three-dimensional distribution is adopted: Central Main Axis Feature Cluster: In the central region of the device, around the main reference feature point, a high-density set of calibration feature points (such as checkerboard corner points or the centers of a dot array) is arranged on a main feature plane or main feature surface that is not perfectly flat and may have slight depth undulations. These feature points constitute the core data source for calibration. The main feature plane is not designed to be vertical, but may be slightly tilted backward to ensure good perspective projection even from a higher first forward orientation or a lower viewing angle, reducing feature point clustering projection.
[0031] Multi-directional extension feature arms: Multiple feature extension arms extend from the central region of the device into the four spatial quadrants (corresponding to the four calibration orientations). These feature extension arms are part of the rigid body, on which secondary calibration feature points are arranged at different heights and off-axis distances.
[0032] The feature extension arm facing the first forward orientation may be relatively short, and the feature point distribution is used to calibrate the central region of the field of view.
[0033] Facing the second rearward orientation, the back of the device is also designed with a feature structure, possibly a recessed cavity with feature points, to ensure that when viewed from the rear, the feature points appear both in the center and at the edge of the field of view.
[0034] For the design of the third left-side and fourth right-side orientations: Left-side and right-side feature facades were constructed on the left and right sides of the device, respectively. The feature points arranged on these two facades have significantly different X (or Y) values in their three-dimensional coordinates, thus providing strong depth (Z-direction) constraint information when observing from the left and right sides. Simultaneously, the feature points on these facades are staggered from the central principal axis feature cluster in the Y-axis (or X-axis) direction, ensuring that the point cloud exhibits a clear spatial distribution in the image when shooting from the left and right sides, rather than projected overlap.
[0035] The layout of all calibration feature points in 3D space was pre-simulated to ensure that when virtual shooting is performed from four preset calibration orientations, the extracted feature points can cover all areas of the camera's field of view (center, edges, and four corners), and have sufficient span in the X, Y, and Z coordinate axes. This means that the feature point set of data collected from any orientation simultaneously includes near and far points, left and right points, and high and low points, thus providing sufficient constraints for the calibration algorithm.
[0036] During actual calibration, this stereo calibration device should be securely mounted on a vibration-isolated platform. The device should be positioned so that the axes of its defined world coordinate system are approximately aligned with the global reference direction in the laboratory or workshop for ease of understanding and operation. Uniform, soft lighting should be provided around the device to ensure that the 3D camera (whether structured light-based or binocular vision-based) can stably and with high contrast capture all calibration feature points.
[0037] To achieve precise orientation control, an integrated multi-axis positioning system (such as a high-precision six-axis robot or a customized four-axis positioning gimbal) is used to mount the 3D camera to be calibrated. The determination of the four calibration orientations (first forward orientation, second backward orientation, third left orientation, and fourth right orientation) does not rely on the operator's visual estimation, but is digitized and solidified through a preset orientation definition and learning process. In the system software, the target point positions where the camera's optical center should be located and the target direction that the camera's optical axis should point to are calculated in advance based on the geometric dimensions of the stereo calibration device and the expected working distance. The multi-axis positioning system is then controlled to move the camera sequentially to the vicinity of these four theoretical positions to complete the coarse positioning.
[0038] Near each theoretical orientation, a fine alignment process is initiated. The 3D camera acquires an auxiliary alignment point cloud in this coarse pose. The algorithm quickly identifies three pre-selected non-collinear reference feature points (usually the main reference feature point and two feature points located on the left and right feature faces, respectively) from this point cloud. By calculating the deviation of the measured coordinates of these three reference feature points from their known world coordinates, the system calculates in real time the minute position and attitude deviations (i.e., a six-degree-of-freedom pose transformation matrix) between the current camera pose and the ideal target pose.
[0039] This deviation is fed back to the multi-axis positioning system, driving it to make fine movements to eliminate the deviation. This process can be iterated 1-2 times until the pose error is less than a preset threshold (e.g., position error < 0.05 mm, angle error < 0.05°). At this point, the camera is precisely locked in the current preset calibration orientation. This process is performed one by one in the four orientations, thereby ensuring that the camera can reach the exact same four spatial poses with extremely high repeatability during each calibration or recalibration.
[0040] Once the camera is precisely locked in a certain position, a multi-frame fusion and stabilization acquisition process is executed, instead of a single-trigger acquisition: With the camera remaining completely still, the 3D camera continuously acquires N frames (e.g., N=10) of raw 3D point cloud data. This design aims to effectively suppress interference such as random noise and transient fluctuations in ambient light through subsequent averaging and fusion. Each frame of point cloud is then analyzed in real time to check if the number of calibration feature points extracted from the stereo calibration device meets the preset requirements and if the signal-to-noise ratio of the point cloud is acceptable. If any frame fails to meet the requirements, additional data is immediately acquired in that location to ensure the reliability of the raw data. The successfully acquired N frames of raw point cloud data undergo spatiotemporal alignment and fusion processing. First, alignment is performed using the camera's internal timestamps. Then, for each physical point in space (identified by its 3D coordinates), its coordinate values across the N frames are statistically averaged (or a more robust filtering algorithm, such as averaging after removing outliers), generating a single frame representing the most stable and accurate measurement result for that location. This frame will serve as the sole representative data for that location in subsequent processing.
[0041] To clearly manage data from four directions, a caching architecture is constructed, comprising four independent data cache queues named "Forward Azimuth Queue," "Backward Azimuth Queue," "Left Azimuth Queue," and "Right Azimuth Queue." Each generated composite point cloud data frame, along with its metadata, is encapsulated into a calibration data packet. The metadata must include: 1) an azimuth identifier (clearly indicating which calibration azimuth it belongs to); 2) a precise pose timestamp (recording the precise moment data acquisition was completed); and 3) a snapshot of the environmental conditions at the time of acquisition (such as ambient temperature and average illumination intensity). Subsequently, based on its azimuth identifier, the calibration data packet is stored in the corresponding data cache queue.
[0042] Each time a calibration data packet is added to the queue, the system updates the global data acquisition status table. This status table visually displays whether data from all four azimuths has been acquired. Only when all four queues contain at least one valid calibration data packet does the system determine that the "four-azimuth data acquisition" phase is complete and allow progress to the next step. To prevent data loss and facilitate subsequent offline analysis, the system simultaneously writes each calibration data packet in a self-describing format (such as including point cloud data, metadata, and a data header) to a separate memory image file named by azimuth and time during the acquisition process. These files mirror the queues in memory, providing assurance for data persistence and traceability.
[0043] S102. Process the comprehensive point cloud data of the four directions respectively, extract the coordinates of the measurement points corresponding to the calibration feature points in each direction, and establish the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value through the feature point identifier to obtain four initial correspondence sets.
[0044] Specifically, firstly, the corresponding composite point cloud data frames are read from the forward azimuth queue, backward azimuth queue, left azimuth queue, and right azimuth queue, respectively. For each data frame, the following standardized preprocessing is performed: Background filtering: Using a spatial filter, irrelevant background point clouds far from the stereo calibration device are filtered out based on the known approximate distance between the point cloud and the camera, and the target area is initially focused.
[0045] Statistical filtering: Statistical outlier removal is performed on the remaining point cloud to eliminate sparse noise caused by dust, splashes, or sensor noise, resulting in a cleaner device point cloud.
[0046] After preprocessing, the system does not blindly search for feature points throughout the point cloud. Instead, it utilizes the spatial layout prior of the stereo calibration device for guidance. The system incorporates a simplified 3D model of the device, which includes the approximate spatial extent of major components such as the central axis feature cluster, the left feature facade, and the right feature facade in the device's world coordinate system. Combined with the orientation identifier of the current data frame, the system can predict which components of the device (i.e., which calibration feature point groups) should be located in which approximate areas of the field of view from that perspective. For example, for data from the left orientation queue, the system will focus on searching for feature points on the left feature facade in the right region of the point cloud (corresponding to the left side of the device). This orientation-based region prediction significantly narrows the search range and improves processing efficiency and anti-interference capabilities.
[0047] Within the predicted feature region, perform precise feature point extraction: For calibration feature points designed as spheres or cone vertices, robust algorithms such as Random Sample Consensus (RANSAC) are used to fit the sphere or cone model, and the fitted 3D coordinates of the sphere's center or vertex are used as the measurement point coordinates of the feature point. For circular marker points on a plane, a local surface can be fitted and the curvature extrema can be found to locate the center of the circle.
[0048] The calibration feature points on a stereo calibration device are not arranged randomly, but rather follow specific, known coding patterns or geometric topological relationships. These relationships include: Hierarchical topology: Feature points are organized into multiple groups (e.g., central principal axis feature cluster, left-side feature facade subset, right-side feature facade subset). Each group has a unique global geometry (e.g., plane, cylinder, surface with a specific curvature).
[0049] Unique patterns within a group: Within each group, the relative distances between points, the connection angles, and the resulting polygonal shapes (such as triangles and quadrilaterals) are unique or vary according to specific rules. For example, through careful design, it can be ensured that a simple pattern formed by any three to four adjacent points is a unique "local fingerprint" throughout the entire device.
[0050] Orientation reference points: Set a few reference feature points with special physical properties (such as significantly larger size or different shape) as "anchor points" to determine the orientation of the local coordinate system.
[0051] To improve the reliability of initial segmentation and verification, some or all feature points have a uniform and easily segmentable physical shape (such as highly reflective precision hemispheres or circular markers), but they do not carry a unique ID code.
[0052] From the preprocessed point cloud, firstly, a region growing algorithm based on curvature, normal, or density is used to cluster points belonging to the same physical continuous surface (such as a feature extension arm of a plane) together to form candidate feature point clusters. Simultaneously, using the known physical dimensions of the feature points (such as the diameter of a hemisphere), the measured coordinates (such as the center of the sphere) of each feature point are directly extracted from the original point cloud through model fitting (such as RANSAC sphere fitting), and the candidate feature point cluster ID to which each point belongs is recorded.
[0053] For each candidate feature point cluster, the algorithm computes the Delaunay triangulation or k-nearest neighbor connectivity graph formed by the coordinates of all measured points within it. From this connectivity graph, a local topological descriptor is extracted for each feature point and its immediate neighbors (typically 1-2 hop neighbors). This descriptor is a vector that includes, but is not limited to: The normalized distance from the point to each of its neighbors (divided by the average distance within the cluster).
[0054] The interior angles of the triangles formed by the point and its neighbors.
[0055] The connectivity of this point (i.e., how many neighbors it has).
[0056] This local topological descriptor is like the "geometric fingerprint" of that point.
[0057] The system memory contains a complete topology map of the stereo calibration device. This map records the true world coordinates of each calibration feature point in the design, as well as the theoretical local topology descriptor of each point pre-calculated based on these true values.
[0058] From the current point cloud, a feature point with high connectivity or close to the fitted device center is selected as a "seed point." Its local topological descriptor is matched with the theoretical descriptors of all points in the complete topological map using similarity calculations (e.g., Euclidean distance). Due to the unique design of the topology, the best match is usually very significant, thus assigning this "seed point" a unique feature point identifier (i.e., it is the Nth point in the design). Once the "seed point" is identified, its identity is determined. Next, the set of real neighbors of the "seed point" in the current point cloud is checked against its set of theoretical neighbors in the complete topological map. By comparing the relative geometric relationships (distance ratio, angle) between neighbors, the identities of these neighbor points can be determined one by one. This process propagates outwards like a wave until all points in the current candidate feature point cluster are identified, or no reliable match can be found. Validation is performed using a few orientation reference points (if within the current field of view). The orientation of the local coordinate system formed by the identified points is checked to ensure it matches the expected orientation determined by the orientation reference points. If there is an overall rotation (due to ambiguity in point cloud segmentation or fitting), it is corrected. After completing the labeling within each candidate feature point cluster, the system checks whether the labeled points between different clusters conform to the overall spatial layout of the device. For example, the spatial position (vector) of a point on the left feature facade relative to a point in the central main axis feature cluster should match the design value. This step can detect and correct potential labeling errors within individual clusters, ensuring the consistency of global labeling.
[0059] Through the above pattern decoding and marking process, the algorithm not only obtains the three-dimensional coordinates of the point, but also uniquely determines its identity, that is, which specific, numbered, calibration feature point on the device it is.
[0060] Since each extracted point has been uniquely identified through pattern recognition, the system can directly use this identifier to find and read the precise 3D true coordinates of that point from the calibration data file of the stereo calibration device (which stores the identifiers of all calibration feature points and their corresponding world coordinate true values). Thus, a matching pair is naturally formed: {measurement point coordinates, feature point identifier, world coordinate true value}.
[0061] To ensure absolute reliability of the matching and avoid erroneous matching due to pattern misidentification in extreme cases, a rigorous verification step is introduced. For all preliminary matching pairs established in the current orientation, the optimal rigid body transformation (using least squares fitting) between the point cloud composed of the coordinates of these measurement points and the point cloud composed of the corresponding ground truth world coordinates is calculated. Then, this transformation is used to transform the coordinates of all measurement points to the world coordinate system, and the Euclidean distance between each transformed measurement point and its matching ground truth world coordinates is calculated one by one. If the distance of a point exceeds a preset strict threshold (e.g., less than 3 times the expected calibration accuracy in that orientation), the matching of that point is deemed suspicious. The system will re-perform a more rigorous local pattern analysis and decoding for this suspicious point, marking it as "to be reviewed" or "invalid" if necessary, and temporarily excluding it in subsequent optimizations, thereby ensuring that the matching data input in step four has a very high confidence level.
[0062] Through the above process, after processing the data in the four data cache queues, four independent initial mapping sets will be obtained. Each initial mapping set is a structured list, in which each record explicitly contains: Azimuth indicator: Indicates the calibration azimuth to which the data belongs.
[0063] Feature point identifier: A unique number identified from the stereo calibration device.
[0064] Measurement point coordinates: The three-dimensional coordinates (unit: millimeters, located in the camera coordinate system) of this feature point, measured by the 3D camera at this orientation.
[0065] World coordinate true value: The known and precise three-dimensional coordinates (unit: millimeters) of the feature point in the world coordinate system of the stereo calibration device.
[0066] These four initial sets of correspondences serve as a bridge connecting the raw measurement data from the 3D camera with the true geometric values of the objective world. They not only contain coordinate data but also ensure the correctness of data associations through rigorous identification and verification. This provides a clean, reliable, and information-rich input for the global joint optimization performed in step four, forming the decisive data foundation for ultimately achieving high-precision calibration.
[0067] S103. Calculate the initial extrinsic parameters using the initial correspondence set of the first forward orientation, and estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation; based on the four initial correspondence sets, the initial extrinsic parameters, and the pose transformation matrices, construct and solve a global optimization model to simultaneously optimize and obtain the intrinsic parameters and optimal extrinsic parameters of the 3D camera.
[0068] Specifically, the reasons for choosing the data from the first forward azimuth as the initial extrinsic parameters and the global optimization baseline are as follows: Optimal field of view: This orientation usually aligns the central axis feature cluster of the stereo calibration device with the camera, resulting in abundant feature points at the center of the field of view, moderate perspective distortion, and the highest point cloud quality, while being relatively less affected by lens edge distortion.
[0069] The geometric relationship is the most direct: the camera optical axis is approximately perpendicular to the main plane of the device, the mathematical model for pose calculation is more stable, and the numerical conditions are better.
[0070] Establish reliable initial values: The initial external parameters calculated in this way can provide a stable and reliable coordinate system starting point for the entire system.
[0071] The initial extrinsic parameter calculation employs the mature Perspective-n-Point (PnP) algorithm: utilizing the generated initial correspondence set for the first forward orientation, which contains multiple pairs of {measurement point coordinates (in the camera coordinate system), world coordinate true values (in the device coordinate system)}. The PnP algorithm directly calculates the rigid body transformation matrix that optimally transforms the world coordinate true value set to the measurement point coordinate set by solving a least-squares problem. This matrix is the first forward orientation extrinsic parameter matrix [R1|T1], where R1 is the rotation matrix and T1 is the translation vector. This matrix defines the transformation relationship from the stereo calibration device's world coordinate system to the first forward orientation camera coordinate system. The camera coordinate system in this orientation is temporarily defined as the global reference coordinate system.
[0072] To unify the data from the other three azimuths into the global reference coordinate system, their transformations relative to the first forward azimuth need to be estimated. This is achieved through a "hybrid guided initial registration" process: When the multi-axis positioning system moves in high-precision mode, its controller can provide feedback the coarse mechanical transformation matrices [M] of the second rearward orientation, the third leftward orientation, and the fourth rightward orientation relative to the first forward orientation, calculated from the robot's forward kinematics. 21 M 31 M 41 These matrices provide an initial estimate of the relative pose with millimeter-level accuracy, sufficient to coarsely align point clouds from different orientations. Using the aforementioned mechanical transformations as initial values, iterative nearest-point fine registration is performed. Taking the second backward orientation as an example: using [M... 21 The coordinates of the measurement points in the initial correspondence set are transformed to the global reference coordinate system, and then ICP registration is performed with the coordinates of the measurement points in the first forward orientation (already in the global reference coordinate system). Since the two point clouds contain a large number of corresponding points from common feature points on the stereo calibration device (although observed from different perspectives), the ICP algorithm can quickly and accurately correct small errors in the initial mechanical transformation and calculate the optimized visual refinement transformation matrix [V]. 21 Similarly, we obtain [V]. 31] and [V 41 The final relative transformation matrix is a synthesis of mechanical priors and visual refinement. For example, the camera pose transformation matrix for the second rearward orientation relative to the first forward orientation is estimated as: ΔT 21 = V 21 * M 21 Matrix ΔT 31 and ΔT 41 They were obtained in the same manner. These matrices are used to initially unify the azimuth data into a framework based on the first forward azimuth camera coordinate system.
[0073] The global optimization model is a standard bundle adjustment framework, but it incorporates constraints from all four directions simultaneously and equally into a single objective function. Model variables include: The camera intrinsic parameter vector K includes focal length (fx, fy), principal point (cx, cy), distortion coefficients (k1, k2, p1, p2, [k3...]), etc.
[0074] First forward azimuth extrinsic parameter [R1|T1]: used as the reference pose.
[0075] Relative pose transformation matrix [ΔR] 21 |ΔT 21 ], [ΔR 31 |ΔT 31 ], [ΔR 41 |ΔT 41 []: Used to express the pose relationship between other azimuth cameras and the reference azimuth camera. Note that the optimization here is a relative transformation, not an absolute extrinsic parameter, which enhances the numerical stability and physical clarity of the model.
[0076] The optimization objective is to minimize the sum of squared reprojection errors of all feature points across all four orientations. For a feature point in any orientation (taking the i-th orientation as an example): Its world coordinates true value P_w is known.
[0077] Based on the currently estimated parameters, the coordinates of this point in the i-th azimuth camera coordinate system can be calculated: P_c_i = [ΔR_i1|ΔT_i1] * [R1|T1] * P_w. For i=1 (reference azimuth), [ΔR 11 |ΔT 11 ] is the identity matrix.
[0078] Using the currently estimated camera intrinsic parameters K, the 3D point P_c_i is projected onto the 2D image plane to obtain the projected coordinates (u_proj, v_proj).
[0079] When the image is acquired, the actual image coordinates (u_obs, v_obs) of this feature point can be extracted through two-dimensional image processing.
[0080] Calculate the reprojection error at this point: e_i = sqrt( (u_proj - u_obs) 2 + (v_proj - v_obs) 2 ).
[0081] The global loss function L is: L(K, R1, T1, {ΔR_i1, ΔT_i1}) = Σ (for all four directions i) Σ (for all visible feature points j in each direction) (e_ij) 2 This optimization problem is a large-scale nonlinear least squares problem. Its Jacobian matrix has a sparse block structure because the error term for each feature point is related to only a few parameters (intrinsic parameter K, pose of the two orientations of the point), which allows for the use of an efficient sparse solver.
[0082] The initial values of K, [R1|T1], {ΔT_i1}, and the camera's factory-specified intrinsic parameters or the intrinsic parameters from the last calibration, are input into the optimization model. For the current parameter values, the total reprojection error L of all feature points is calculated using the objective function formula described above. Simultaneously, the Jacobian matrix J of the loss function L relative to all optimization variables (K, R1, T1, {ΔR_i1, ΔT_i1}) is calculated using automatic differentiation or analytical derivation. The normal equation (J^T * J + λI) * δ = -J^T * e is solved using a nonlinear optimization algorithm such as the Levenberg-Marquardt algorithm, where δ is the increment vector of all parameters to be determined, and λ is the damping factor. After solving for δ, the algorithm adds it to the current parameter estimate, completing one iteration update. The algorithm checks whether the decrease in the total error L is less than a set threshold, or whether the norm of the parameter increment δ is sufficiently small. If convergence fails, the algorithm returns to re-acquire data and restarts the calculation with the updated parameters; if convergence has occurred, the iteration stops. After iterative convergence, the optimal parameter set obtained from the optimization is output: the precise camera intrinsic parameter K_opt, and the first forward azimuth extrinsic parameter [R1_opt|T1_opt] and the relative transformation matrix {ΔT_i1_opt}. Using these relative transformations, the absolute extrinsic parameters of the other three azimuths in the world coordinate system of the stereo calibration device can be easily calculated.
[0083] S104. Calculate the residual reprojection error of feature points in each direction based on the intrinsic parameters and the optimal extrinsic parameters, and train a spatial error compensation model according to the residual reprojection error and the corresponding three-dimensional spatial coordinates, and output a complete calibration parameter set including the intrinsic parameters, the optimal extrinsic parameters and the spatial error compensation model.
[0084] Specifically, the optimal parameters obtained through optimization—namely, the precise intrinsic parameter K_opt—and the optimal extrinsic parameters for the four orientations relative to the world coordinate system (calculated from [R1_opt|T1_opt] and {ΔT_i1_opt})—are used to perform "reverse verification" on the four generated initial correspondence sets. For each matching pair (e.g., feature point j in orientation i), the following is executed again: Transform its true world coordinates P_w into the camera coordinate system using the corresponding optimal extrinsic parameters to obtain P_c_opt.
[0085] P_c_opt is projected onto the image plane using the precise intrinsic parameter K_opt to obtain the theoretical projection coordinates (u_proj_opt, v_proj_opt).
[0086] Compare the actual observed image coordinates (u_obs, v_obs) of the feature point to calculate the final residual reprojection error vector: e_residual_ij = (u_obs - u_proj_opt, v_obs - v_proj_opt).
[0087] These errors on the two-dimensional image plane are mapped and correlated to the three-dimensional object space. For each feature point, there are its measured point coordinates (denoted as P_c_meas in the camera coordinate system) and the ideal projection point coordinates calculated from the optimal parameters (i.e., the normalized coordinates or depth values of P_c_opt). The three-dimensional coordinates (x, y, z) of P_c_meas are used as independent variables, and the magnitude and / or direction of the corresponding residual reprojection error vector are used as dependent variables. In this way, all feature point data in all four directions together form a sparse, discrete three-dimensional spatial error sampling point set in the three-dimensional workspace in front of the camera. This point set describes the distribution of errors in three-dimensional space and is called the spatial error distribution field.
[0088] A location-based 3D error prediction model is employed. The model's input is the coordinates (x, y, z) of an arbitrary 3D point in the camera coordinate system. The model's output is the expected residual error compensation value (Δu, Δv) for the image plane at that point. This means that for any future measurement point, the amount of image coordinate correction required can be predicted based on its 3D position. This can be implemented in two ways: Higher-order polynomial regression model: (Δu, Δv) is modeled as a higher-order polynomial function (e.g., third or fourth order) of (x, y, z). The established spatial error distribution field data is used as training samples, and the coefficients of the polynomial are fitted using multiple linear regression. This method has clear physical meaning and is computationally efficient.
[0089] Neural Network Mapping Model: A lightweight, fully connected neural network is constructed. The input layer consists of three-dimensional coordinates (x, y, z), and the output layer consists of two-dimensional compensation values (Δu, Δv), with several hidden layers in between. The network is trained under supervised supervision using spatial error distribution field data to minimize the gap between the predicted compensation values and the actual residual errors. Neural networks are theoretically capable of fitting more complex nonlinear spatial error relationships.
[0090] The model is trained using data from all four directions to ensure it learns the global error characteristics of the entire workspace. To prevent overfitting, the data can be divided into training and validation sets, or cross-validation can be used.
[0091] After the above process, two sets of outputs are obtained, which together constitute the final calibration parameter set: The core geometric parameters are the precise intrinsic parameter K_opt and four optimal extrinsic parameters obtained from step S103. These parameters constitute the "backbone" geometric model of camera imaging, describing the ideal perspective projection and the main lens distortions.
[0092] Spatial error compensation model: This refers to a pre-trained set of polynomial coefficients or a neural network weight file. It is a "fine-tuned" model.
[0093] The final, complete calibration process follows these steps when the camera is put into actual measurements: Standard projection: For any newly measured 3D point P_c_new by the camera, it is first projected onto the image plane using the core geometric parameters (K_opt and extrinsic parameters) to obtain the initial coordinates (u_init, v_init).
[0094] Error compensation: Input the three-dimensional coordinates (x, y, z) of P_c_new into the spatial error compensation model to obtain the predicted compensation amount (Δu, Δv).
[0095] Output final coordinates: Apply the compensation amount to the initial coordinates to obtain the final image coordinates with the highest accuracy after global and local spatial error correction: (u_final, v_final) = (u_init + Δu, v_init + Δv).
[0096] It has the following beneficial technical effects: Improve global measurement accuracy and consistency: By systematically collecting calibration data of 3D cameras in four specific orientations and constructing a unified spatial coordinate system and error compensation model, the three-dimensional measurement accuracy of 3D cameras in their entire workspace and the consistency of measurement results in different orientations are significantly improved.
[0097] Enhance the systematicness and reliability of calibration: By treating "four orientations" as a holistic framework for collaborative calibration rather than an independent step, the geometric constraints between multiple orientation data are fully utilized, making the calibration parameters more robust and reducing the risk of overall calibration failure due to anomalies in individual orientation data.
[0098] Optimizing calibration procedures and data utilization: Four key calibration directions and their operational procedures were identified, making the calibration process more standardized and efficient. Through data fusion and joint optimization, the potential information in the calibration data was deeply mined, improving the efficiency of data utilization and the accuracy of the final model.
[0099] The second embodiment of this application is as follows: Please see Figure 3 This invention provides a four-way 3D camera calibration system, applied to a four-way 3D camera calibration method as provided in the first embodiment. The four-way 3D camera calibration system includes a stereo calibration device 101 and a calibration subsystem. The calibration subsystem includes a point cloud acquisition module 102, a coordinate matching module 103, a pose transformation module 104, and a calibration module 105. The stereo calibration device 101 is used to set up multiple calibration feature points with known three-dimensional coordinates and to determine the origin of the world coordinate system. The point cloud acquisition module 102 is used to control the 3D camera to move sequentially and lock to four preset calibration positions around the stereo calibration device for data acquisition. The coordinate matching module 103 is used to process the comprehensive point cloud data of the four directions respectively, extract the coordinates of the measurement points corresponding to the calibration feature points in each direction, and establish the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value through the feature point identifier, so as to obtain four initial correspondence relationship sets. The pose transformation module 104 is used to calculate the initial extrinsic parameters based on the initial correspondence set of the first forward orientation, and estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation; based on the four initial correspondence sets, the initial extrinsic parameters and the pose transformation matrices, a global optimization model is constructed and solved to simultaneously optimize and obtain the intrinsic parameters and optimal extrinsic parameters of the 3D camera. The calibration module 105 is used to calculate the residual reprojection error of feature points in each direction based on the intrinsic parameters and the optimal extrinsic parameters, and to train a spatial error compensation model based on the residual reprojection error and the corresponding three-dimensional spatial coordinates, outputting a complete calibration parameter set including the intrinsic parameters, the optimal extrinsic parameters, and the spatial error compensation model.
[0100] Regarding the system in the above embodiments, the specific ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0101] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0102] Accordingly, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the four-directional 3D camera calibration method as described above. Figure 4 The diagram shown is a hardware structure diagram of any device with data processing capabilities, which is part of a four-directional 3D camera calibration system provided in an embodiment of the present invention. (Except for...) Figure 4 In addition to the processor, memory, and network interface shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0103] Accordingly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the four-way 3D camera calibration method described above. The computer-readable storage medium can be an internal storage unit of any data-processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data-processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data-processing device, and can also be used to temporarily store data that has been output or will be output.
[0104] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0105] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A four-directional 3D camera calibration method, characterized in that, Includes the following steps: The 3D camera is controlled to move sequentially and lock onto four preset calibration positions around the stereo calibration device for data acquisition. The four preset calibration positions include a first forward position, a second backward position, a third left position, and a fourth right position. A frame of integrated point cloud data is generated at each position. The comprehensive point cloud data from the four directions are processed separately, the coordinates of the measurement points corresponding to the calibrated feature points in each direction are extracted, and the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value is established through the feature point identifier, resulting in four initial correspondence sets; Calculate the initial extrinsic parameters using the initial correspondence set of the first forward orientation, and estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation. Based on the four initial correspondence sets, the initial extrinsic parameters, and the pose transformation matrix, a global optimization model is constructed and solved to simultaneously optimize the intrinsic and optimal extrinsic parameters of the 3D camera. The residual reprojection error of each feature point is calculated based on the intrinsic parameters and the optimal extrinsic parameters. A spatial error compensation model is trained based on the residual reprojection error and the corresponding three-dimensional spatial coordinates. The output includes a complete set of calibration parameters, including the intrinsic parameters, the optimal extrinsic parameters, and the spatial error compensation model.
2. The four-directional 3D camera calibration method as described in claim 1, characterized in that, The method further includes: Multiple calibration feature points with known three-dimensional coordinates are set up on the constructed three-dimensional calibration device; The origin of the world coordinate system is defined on the main reference feature point of the three-dimensional calibration device. The calibration feature point includes a central main axis feature cluster located on the main feature plane in the central region, and feature extension arms extending from the central region to the four spatial quadrants. For the third left-side orientation and the fourth right-side orientation, a left feature facade and a right feature facade are respectively provided.
3. The four-directional 3D camera calibration method as described in claim 1, characterized in that, Control the 3D camera to move sequentially and lock onto four preset calibration positions surrounding the stereo calibration device, including: Control the 3D camera to a preset orientation for coarse positioning, then acquire an auxiliary alignment point cloud, identify at least three non-collinear reference feature points, and calculate the deviation between their measured coordinates and the true world coordinates. The pose is finely adjusted through closed-loop feedback control until the pose error is lower than the preset threshold, thereby locking the 3D camera in the current calibration position.
4. The four-directional 3D camera calibration method as described in claim 3, characterized in that, After locking the 3D camera to the current calibration orientation, the method further includes: At each locked calibration azimuth, the 3D camera is controlled to continuously acquire multiple frames of raw point cloud data, and the multiple frames of raw point cloud data are spatiotemporally aligned and fused. A single frame of comprehensive point cloud data representing the measurement results at that azimuth is generated by statistical averaging or filtering.
5. The four-directional 3D camera calibration method as described in claim 1, characterized in that, The comprehensive point cloud data from the four directions are processed separately. The coordinates of the measurement points corresponding to the calibrated feature points in each direction are extracted. The matching relationship between the coordinates of each measurement point and the corresponding ground truth world coordinates is established through feature point identifiers, resulting in four initial correspondence sets, including: Using the spatial layout prior of the stereo calibration device, the point cloud region where the feature point is located is predicted based on the current position of the comprehensive point cloud data from the four directions. Within the prediction area, the coordinates of the measurement points corresponding to the calibrated feature points are extracted and their unique feature point identifiers are determined by geometric feature fitting or pattern recognition algorithms. Based on the feature point identifier, the true world coordinates are indexed from the stored device data to directly form matching pairs; and bidirectional spatial consistency verification is performed on all preliminary matching pairs to eliminate abnormal matches with excessive errors, resulting in four initial correspondence sets.
6. The four-directional 3D camera calibration method as described in claim 1, characterized in that, Estimate the camera pose transformation matrices for the other three orientations relative to the first forward orientation, including: The coarse mechanical transformation matrix fed back by the multi-axis positioning system is obtained as a priori. Using the coarse mechanical transformation matrix as the initial value, the measurement point cloud of the current orientation and the measurement point cloud of the first forward orientation are iteratively registered to the nearest point to obtain the visual refinement transformation matrix. The coarse mechanical transformation matrix and the visual refinement transformation matrix are combined to form the final camera pose transformation matrix.
7. The four-directional 3D camera calibration method as described in claim 1, characterized in that, The objective function of the global optimization model is to minimize the sum of squared reprojection errors of all feature points in all four directions.
8. The four-directional 3D camera calibration method as described in claim 7, characterized in that, The optimization variables of the global optimization model include: camera intrinsic vector, extrinsic matrix of the first forward azimuth, and relative pose transformation matrices of the second backward azimuth, third left azimuth, and fourth right azimuth relative to the first forward azimuth. The model is solved by iterative optimization using the Levenberg-Marquardt algorithm until the total reprojection error converges.
9. The four-directional 3D camera calibration method as described in claim 1, characterized in that, The method further includes: For any 3D point currently acquired by the 3D camera, the initial image coordinates are first obtained by standard projection using the intrinsic parameters and optimal extrinsic parameters. At the same time, the coordinates of the 3D point are input into the spatial error compensation model to obtain the predicted error compensation value. Finally, the error compensation value is added to the initial image coordinates to obtain the final image coordinates after spatial error compensation.
10. A four-way 3D camera calibration system, applied to the four-way 3D camera calibration method as described in claim 1, characterized in that, The four-directional 3D camera calibration system includes a stereo calibration device and a calibration subsystem. The calibration subsystem includes a point cloud acquisition module, a coordinate matching module, a pose transformation module, and a calibration module. The stereo calibration device is used to set up multiple calibration feature points with known three-dimensional coordinates and to determine the origin of the world coordinate system. The point cloud acquisition module is used to control the 3D camera to move sequentially and lock to four preset calibration positions around the stereo calibration device for data acquisition. The coordinate matching module is used to process the comprehensive point cloud data of the four directions respectively, extract the coordinates of the measurement points corresponding to the calibration feature points in each direction, and establish the matching relationship between the coordinates of each measurement point and the corresponding world coordinate true value through the feature point identifier, so as to obtain four initial correspondence relationship sets. The pose transformation module is used to calculate the initial extrinsic parameters based on the initial correspondence set of the first forward orientation, and to estimate the camera pose transformation matrices of the other three orientations relative to the first forward orientation. Based on the four initial correspondence sets, the initial extrinsic parameters, and the pose transformation matrix, a global optimization model is constructed and solved to simultaneously optimize the intrinsic and optimal extrinsic parameters of the 3D camera. The calibration module is used to calculate the residual reprojection error of feature points in each direction based on the intrinsic parameters and the optimal extrinsic parameters, and to train a spatial error compensation model based on the residual reprojection error and the corresponding three-dimensional spatial coordinates, and output a complete calibration parameter set including the intrinsic parameters, the optimal extrinsic parameters and the spatial error compensation model.