A camera intrinsic parameter calibration method for portable light pen three-coordinate measurement
Patent Information
- Application Number
- CN202611040765.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-07-14
AI Technical Summary
[0006]针对现有技术存在的不足,本发明的目的在于提供一种用于便携式光笔三坐标测量的相机内参标定方法,目的是解决现有技术中针对PTZ变焦相机在全变焦量程内标定时,高倍变焦条件下内参参数与畸变参数耦合导致标定结果缺乏物理合理性,以及现有标定方法缺乏独立于图像信息的真实物理空间约束导致长焦距条件下参数可观测性下降、标定稳定性和可靠性难以保证的技术问题
[0018]本发明的有益效果:1、通过平移机构提供已知位移量构建深度方向的绝对物理空间约束,并将深度约束与重投影误差构建联合优化目标函数进行联合优化,有效降低了高倍变焦条件下内参参数与畸变参数之间的耦合,提高了标定结果的物理合理性和参数稳定性,使标定参数在不同测量距离下具有良好的泛化能力;同时通过建立变焦控制量与标定内参之间的对应关系,实现了不同变焦状态下标定内参的快速获取,提高了便携式光笔三坐标测量系统在变焦测量场景中的适用性,整体方案无需专用高精度光学测量设备,适配常规PTZ会议相机,大幅降低了便携式光笔三坐标测量系统的搭建成本;
Smart Images

Figure CN122574111B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision measurement, photogrammetry and camera calibration technology, and more specifically to a camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine. Background Technology
[0002] Portable optical pen coordinate measuring systems utilize a vision sensor to acquire images of optical markers mounted on a light pen. Through spatial geometric reconstruction, they achieve precise measurement of the three-dimensional coordinates of the target object. These systems offer advantages such as flexible measurement space, no mechanical range limitations, and good environmental adaptability, making them promising for applications in industrial inspection, equipment assembly, robot calibration, and the measurement of large components. In such systems, the imaging accuracy of the vision sensor directly determines the accuracy of the three-dimensional measurement results; therefore, accurate calibration of the camera's intrinsic parameters is a crucial prerequisite for ensuring the system's measurement accuracy.
[0003] Currently, most portable light pen measurement systems use fixed-focal-length cameras as vision sensors. While fixed-focal-length cameras have stable internal parameters and mature calibration processes, their field of view is locked once installed, making it impossible to flexibly adjust the observation range according to the actual size of the target being measured. This makes it difficult to meet the adaptability requirements of modern industrial measurement systems.
[0004] As application scenarios increasingly demand adaptability to measurement range and flexibility of observation, PTZ (Pan-Tilt-Zoom) cameras, characterized by adjustable focal length and flexible field of view, are gaining attention. However, during zooming, the internal lens group of a PTZ camera moves along the optical axis, causing nonlinear drift in the equivalent imaging center, principal point position, and distortion characteristics with changes in focal length. If the PTZ camera is treated as multiple fixed-focus cameras at different focal lengths and calibrated independently, on the one hand, a large number of calibration images need to be acquired for each focal length, which is inefficient; on the other hand, discrete calibration results cannot cover the continuous zoom range, and interpolation approximation can only be used in actual measurements, inevitably introducing parameter estimation errors.
[0005] Existing zoom camera calibration methods mainly suffer from the following problems: First, the calibration of each focal length state is independent of each other, ignoring the continuity of parameter changes during zooming, resulting in insufficient robustness of the fitted mapping; Second, under high-magnification zoom conditions, there is a serious coupling between the focal length parameter and the distortion parameter in the traditional calibration model, with the distortion parameter abnormally increasing to compensate for the focal length estimation deviation, resulting in a lack of physical rationality in the calibration results and poor generalization ability; Third, existing methods generally rely on changes in the pose of the calibration board to obtain spatial constraints, lacking real physical spatial constraints independent of image information, weakening the perspective effect under long focal length conditions, reducing parameter observability, making the optimization problem tend to be ill-conditioned, and making it difficult to guarantee calibration stability and reliability. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a camera intrinsic parameter calibration method for portable optical pen coordinate measuring machines. This method addresses the technical problems in existing technologies where, when calibrating PTZ zoom cameras across the full zoom range, the coupling between intrinsic parameters and distortion parameters under high-magnification zoom conditions leads to a lack of physical rationality in the calibration results. Furthermore, the lack of real physical spatial constraints independent of image information in existing calibration methods results in decreased parameter observability under long focal length conditions, making it difficult to guarantee calibration stability and reliability.
[0007] Therefore, this invention provides a camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine (CMM) measurement. It constructs an absolute physical spatial constraint in the depth direction by providing a known displacement through a translation mechanism, and jointly optimizes the depth constraint and reprojection error to form a joint optimization objective function. Combined with a rational mapping model to describe the zoom imaging characteristics of a PTZ camera, it effectively suppresses the coupling between intrinsic parameters and distortion parameters under high-magnification zoom conditions, improving the physical rationality and parameter stability of the calibration results. Simultaneously, by establishing a correspondence between zoom control quantities and calibration intrinsic parameters, it enables rapid acquisition of calibration parameters under different zoom conditions.
[0008] To achieve the above objectives, the present invention provides the following technical solution: A method for calibrating camera intrinsic parameters for portable optical pen coordinate measuring machines includes the following steps: The image acquisition step involves acquiring multiple attitude images of the calibration board under different spatial postures using a PTZ camera, as well as multiple displacement images of the calibration board moving a known displacement along the camera's optical axis. The purpose is to provide observation information of the calibration board at different positions and postures in the camera's field of view through attitude images, and to provide depth change information of the calibration board moving a known displacement along the optical axis through displacement images, thus providing a data foundation for subsequent spatial constraint construction. The feature point extraction step involves corner detection on both the pose image and the displacement image, extracting the image coordinates of the calibration board corners, and establishing the spatial coordinates of the corners based on the physical dimensions of the calibration board. This establishes a correspondence between the image coordinates and the spatial coordinates. The purpose is to establish a precise geometric correspondence between the pixel observations in the image and the physical points on the calibration board, providing observational data for subsequent imaging model construction and parameter optimization. The imaging model construction steps involve establishing a zoom imaging model that includes equivalent focal length, principal point coordinates, and distortion parameters. Spatial coordinates are converted into image coordinates through perspective projection and distortion mapping. The purpose is to provide a parameterized mathematical expression for the imaging process of the PTZ zoom camera at different focal lengths, so that subsequent optimization and solution have a model basis. The spatial constraint construction step is to establish absolute physical constraints in the depth direction based on the known displacement. The absolute physical constraints are used to constrain the depth position of the calibration plate plane in the camera coordinate system in each displacement image. The purpose is to introduce real physical spatial constraints independent of image information, provide additional spatial reference information for joint optimization, suppress the coupling between intrinsic parameters and distortion parameters under high magnification zoom conditions, and make the parameter solution tend to be physically reasonable. The joint optimization step constructs a joint optimization objective function based on the reprojection error between the image coordinates and the projection coordinates obtained by the zoom imaging model, and the depth error between the depth position and the known displacement. This function optimizes the intrinsic parameters in the zoom imaging model to obtain the calibration intrinsic parameters under the current focal length. The purpose is to make the intrinsic parameters simultaneously satisfy the two-dimensional image observation constraints and the physical constraints in the depth direction, thereby achieving parameter decoupling and stable solution. The correspondence establishment step establishes the correspondence between different focal length states and corresponding calibration intrinsic parameters, so as to provide a portable optical pen coordinate measuring system for calling. The purpose is to enable the system to quickly obtain the corresponding calibration intrinsic parameters according to the current zoom state during actual measurement, avoiding repeated calibration for each focal length.
[0009] Furthermore, the absolute physical constraint is configured as follows: Depth of calibration plate plane corresponding to the group displacement image It satisfies the following with the known displacement: ,in This represents the depth value corresponding to the initial position. For the first The known displacement corresponding to each displacement image, through the known displacement provided by the translation mechanism, directly establishes the true value of the calibration plate plane depth in each displacement image, providing a benchmark reference for the quantitative calculation of depth error.
[0010] Furthermore, in the joint optimization step, the weight coefficient of the depth error in the joint optimization objective function is determined by weight sensitivity analysis. The weight sensitivity analysis adjusts the weight coefficient within a preset range and observes the rate of change of the standard deviation of the calibration intrinsic parameters. The weight coefficient when the rate of change of the standard deviation tends to flatten is used as the target weight, so that the depth constraint applies an appropriate constraint to the optimization result. This can effectively suppress parameter coupling without causing a decrease in reprojection accuracy due to excessive constraints.
[0011] Furthermore, in the imaging model construction step, the zoom imaging model projects spatial coordinates onto the normalized image plane through perspective projection to obtain normalized coordinates, and then uses rational mapping to perform distortion correction on the normalized coordinates before transforming them to the image coordinate system. The rational mapping model is configured as follows: , , in: , Represents the coordinates of an image point in the image plane; , Represents the normalized image plane coordinates; , Represents the focal length parameters in two directions of the image coordinate system; , Indicates the coordinates of the principal point; Represents a rational function relating radial distance; Represents radial distance, satisfying: By replacing the traditional Brownian polynomial distortion model with rational mapping, the nonlinear distortion characteristics of the PTZ camera under high zoom conditions are described more stably, improving the physical rationality of the distortion parameters and the generalization ability of the calibration results.
[0012] Furthermore, the rational mapping is configured as a fractional function with radial distance as the independent variable, and the fractional function is configured as follows: , in: Indicates radial distance; Represents the rational mapping distortion parameter; Indicates the order of the distortion term; This represents the highest order of the rational mapping model. By using a rational fractional structure to globally model radial distortion, it can approximate the actual distortion curve of the PTZ camera well under low-order conditions, avoiding overfitting and parameter oscillations introduced by higher-order polynomials.
[0013] Furthermore, in the joint optimization step, the pose image and the displacement image under the same focal length state share the same extrinsic rotation matrix. The Z component of the translation vector changes with the known displacement, while the X and Y translation components remain unchanged. The extrinsic rotation matrix and translation vector are used as auxiliary optimization variables in the iterative solution of the joint optimization objective function. The calibration intrinsic parameters do not include the extrinsic rotation matrix and translation vector. The extrinsic parameters are used as auxiliary variables in the optimization to absorb the pose differences between different images, but finally only the intrinsic parameters related to the focal length are output to ensure that the calibration results are not affected by the changes in the extrinsic parameters.
[0014] Furthermore, in the spatial constraint construction step, a depth direction error constraint term is established, and the error constraint term is configured as follows: , in: This indicates the depth direction constraint error; This represents the depth value of the spatial point obtained through optimization; This represents the depth value corresponding to the actual displacement of the guide rail; The image number represents the image sequence number and provides a quantitative method for calculating the depth direction error in the joint optimization objective function, enabling this error to be jointly optimized with the reprojection error within the same framework.
[0015] Furthermore, in the correspondence establishment step, feature point extraction and joint optimization steps are performed separately under multiple discrete focal length states to obtain the calibration intrinsic parameters corresponding to each discrete focal length state. A discrete correspondence between zoom control quantity and calibration intrinsic parameters is established, and the portable optical pen coordinate measuring system can read the corresponding calibration intrinsic parameters according to the current zoom control quantity. The purpose is to establish a fast query index for zoom state and calibration parameters in the form of discrete correspondence, avoid repeated calibration in the measurement process, and improve the efficiency of the system in actual use.
[0016] Furthermore, in the correspondence establishment step, after establishing the discrete correspondence, a continuous mapping model between the zoom control quantity and the calibration intrinsic parameter is constructed using interpolation or curve fitting. The continuous mapping model is used to provide the portable optical pen coordinate measuring system with the ability to calculate the corresponding calibration intrinsic parameter under any zoom state. Its purpose is to establish a fast query index for zoom state and calibration parameter in the form of discrete correspondence, avoid repeated calibration during the measurement process, and improve the efficiency of the system in actual use.
[0017] Furthermore, in the image acquisition step, the attitude images acquired under each discrete focal length state include multiple images of the calibration board at different positions, pitch angles, and rotation angles in the camera's field of view. The displacement images are obtained by acquiring calibration board images at each preset position with known displacement. The attitude images and displacement images under the same discrete focal length state together constitute the calibration dataset under that focal length state. The attitude images provide multi-view constraints within the field of view to ensure reprojection accuracy, while the displacement images provide depth direction constraints to suppress parameter coupling. The two complement each other and together constitute a complete calibration data foundation.
[0018] The beneficial effects of this invention are as follows: 1. By providing a known displacement through a translation mechanism to construct an absolute physical spatial constraint in the depth direction, and by constructing a joint optimization objective function with the depth constraint and reprojection error, the coupling between intrinsic parameters and distortion parameters under high-magnification zoom conditions is effectively reduced, improving the physical rationality and parameter stability of the calibration results, and enabling the calibration parameters to have good generalization ability under different measurement distances; at the same time, by establishing a correspondence between zoom control quantities and calibration intrinsic parameters, the calibration intrinsic parameters under different zoom states are quickly obtained, improving the applicability of the portable optical pen coordinate measuring system in zoom measurement scenarios. The overall solution does not require dedicated high-precision optical measurement equipment, is compatible with conventional PTZ conference cameras, and significantly reduces the construction cost of the portable optical pen coordinate measuring system; 2. By replacing the traditional Brownian polynomial distortion model with a rational mapping model, the actual distortion curve of the PTZ camera across the full zoom range can be approximated well under low-order conditions, avoiding overfitting and parameter oscillations introduced by higher-order polynomials. This results in more physically reasonable and numerically stable distortion parameter estimation. Extrinsic parameters are used as auxiliary variables in the optimization, but the calibration results only output intrinsic parameters, ensuring that the calibration results are unaffected by changes in shooting angle and guaranteeing the independence and comparability of intrinsic parameter calibration under different focal lengths. Weight sensitivity analysis is used to determine the weight coefficient of depth error in the joint optimization objective function, allowing depth constraints to exert a moderate constraint on the optimization results. This effectively suppresses parameter coupling without causing a decrease in reprojection accuracy due to excessive constraints. A two-level parameter output method, establishing discrete correspondences and extending continuous mapping, balances query efficiency in practical use with parameter coverage in continuous zoom scenarios, improving the system's practicality and flexibility. Attached Figure Description
[0019] Figure 1 This is an overall flowchart of the calibration method of the present invention; Figure 2 This is a schematic diagram of the calibration system structure of the present invention; Figure 3 This is a diagram showing the trajectory of the camera's principal point as it shifts with zoom, as used in this invention. Figure 4 This is a schematic diagram of the PTZ camera imaging model construction of the present invention; Figure 5 This is a continuous mapping fitting curve of the rational distortion parameters calibrated by this invention under zoom. Figure 6 This is a stability analysis diagram of the intrinsic parameters before and after the introduction of the guide rail in this invention. Detailed Implementation
[0020] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom surface," "top surface," "inner," and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0021] This invention provides a camera intrinsic parameter calibration method for portable optical pen coordinate measuring machines (CMMs), which can be deployed in a portable optical pen CMM system for calibrating the intrinsic parameters of the PTZ zoom camera within the system. During zooming, the internal lens group of the PTZ camera moves along the optical axis, causing nonlinear drift in the equivalent imaging center, principal point position, and distortion characteristics with changes in focal length. Without calibration, this directly affects the accuracy of 3D spatial reconstruction of the optical pen marker image. This invention introduces a known displacement provided by a translation mechanism to construct an absolute physical spatial constraint in the depth direction, and jointly optimizes this depth constraint with the reprojection error, achieving high-precision calibration of the intrinsic parameters of the PTZ camera at various focal lengths.
[0022] Example 1 This embodiment provides a camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine (CMM) measurements. The overall process of this method is as follows: Figure 1 As shown, it includes image acquisition steps, feature point extraction steps, imaging model construction steps, spatial constraint construction steps, joint optimization steps, and correspondence establishment steps; In the image acquisition step, firstly as follows: Figure 2 As shown, a calibration system is set up. Figure 2 The sub-image 'a' represents the pose group. Figure 2 The b-sub-diagram represents the guide rail assembly. Figure 2 In the diagram, label 1 represents the PTZ camera, label 2 represents the checkerboard calibration plate, label 3 represents the camera optical axis, and label 4 represents the one-dimensional guide rail. The system consists of a PTZ camera, a translation mechanism capable of providing one-dimensional known displacement, and a calibration plate. The PTZ camera is fixedly placed on the experimental platform, and the calibration plate is fixedly installed on the slide of the translation mechanism. In this embodiment, the translation mechanism adopts a one-dimensional linear array guide rail with a repeatability accuracy better than 0.01mm. The calibration plate adopts a planar checkerboard calibration plate with 11×8 corner points and a single square side length of 15mm. The experiment uses a PTZ conference camera as the visual sensor. The camera supports continuous zoom control, with a zoom code value range of 0-16384, corresponding to approximately 1x to 12x optical zoom.
[0023] Before calibration, optical axis alignment is required. A crosshair target is fixed on the guide rail, and a crosshair reference line is set at the center of the camera's field of view. The guide rail position is fine-tuned to ensure that the crosshair target and the crosshair reference line remain aligned during guide rail movement, thus ensuring that the guide rail's movement direction is basically consistent with the camera's optical axis direction. For any small angular deviations remaining after fine-tuning, automatic compensation is achieved through the backpropagation mechanism of the depth constraint term in subsequent joint optimization. That is, when there is a small optical axis deviation, the optimization algorithm will adaptively adjust the extrinsic parameters during iteration to minimize the depth error.
[0024] Before acquiring images, adjust the zoom and focus parameters of the PTZ camera to ensure that the calibration image is in a clear imaging state, and keep the parameters fixed under the counter-strain focusing state. Then, take the attitude group image and guide rail group image under the locked values.
[0025] The attitude group images were acquired by moving the calibration board within the camera's field of view to ensure that a checkerboard image was present across the entire field of view, including depth change information, pitch attitude change information, and rotation attitude change information. For each zoom level, a corresponding set of attitude group calibration image data was acquired. In this embodiment, 30 calibration images were acquired for each zoom level, and a total of 12 independent calibration experiments were completed within the 1x to 12x zoom range.
[0026] The guide rail images are acquired by controlling the guide rail to move along the optical axis according to a preset displacement, acquiring calibration images at multiple known positions, and recording the corresponding actual displacement values of the guide rail. In this embodiment, the guide rail displacement positions are 0mm, 5mm, 10mm, 20mm, 30mm, 40mm, 50mm, 60mm, 70mm, 80mm, 90mm, 100mm, and 120mm, corresponding to the acquisition of 13 guide rail images. Similarly, for each zoom level, a set of corresponding guide rail calibration image data is acquired. The attitude group and the guide rail group together constitute the calibration dataset under the same zoom level. The attitude images acquired under each discrete focal length state include multiple images of the calibration board at different positions, pitch angles, and rotation angles in the camera's field of view. The displacement images are obtained by acquiring calibration board images at each preset position with known displacement. The attitude images and displacement images under the same discrete focal length state together constitute the calibration dataset under that focal length state.
[0027] In the feature point extraction step, feature points are extracted from the acquired posture group images and guide rail group images. The corner point detection algorithm is used to extract the image point coordinates of the corner points in the image coordinate system, and the sub-pixel corner point optimization algorithm is further used to improve the corner point positioning accuracy.
[0028] Let the coordinates of the extracted image feature points be represented as: ,in They represent the first The horizontal and vertical coordinates of each corner point in the image coordinate system are used to establish the spatial coordinates of the calibration plate coordinate system based on the actual size and arrangement of the checkerboard grid. ,in They represent the first The spatial coordinates of each corner point in the calibration plate coordinate system are obtained through the above steps, which provide observation data for subsequent imaging model construction and parameter optimization.
[0029] In the imaging model construction step, because the internal lens group of the PTZ camera moves during zooming, the camera projection center is no longer fixed. Traditional fixed pinhole models cannot accurately describe its imaging process, such as... Figure 3 As shown, the principal point of the PTZ camera used in this embodiment gradually increases with the focal length, exhibiting a U-shaped zigzag trajectory. Therefore, this invention uses a combination of perspective projection model and rational mapping model to establish the PTZ camera imaging model.
[0030] like Figure 4 As shown, the complete mapping process of a spatial point from the calibration plate coordinate system to the image plane is described. Figure 4 In the diagram, label 1 represents the calibration board coordinate system, label 2 represents the camera coordinate system, label 3 represents the normalized image plane, label 4 represents the rational mapping model, and label 5 represents the image plane. First, let the coordinates of the spatial points in the calibration board coordinate system be... Then the corresponding camera coordinate system coordinates satisfy: , ,in, It is a rotation matrix; It is a translation vector; These are the coordinates of a point in the camera coordinate system.
[0031] By using perspective projection, spatial points are mapped onto the normalized image plane to obtain normalized coordinates. ,in, , .
[0032] Considering that the change in the position of the internal lens group during zooming in a PTZ camera can cause nonlinear imaging errors, such as Figure 5 As shown, the traditional Brownian polynomial distortion model is difficult to accurately describe the imaging characteristics under high-magnification zoom conditions. Therefore, this embodiment uses a second-order rational mapping model to describe the mapping relationship between the normalized image plane and the image plane. The radial distance is defined as: Construct rational mapping functions: ,in , The rational mapping distortion parameter is used to correct the normalized coordinates using the rational mapping function: , The final image coordinates are obtained by combining the camera intrinsic parameters: , ,in, , Represents the focal length parameters in two directions of the image coordinate system; , Indicates the coordinates of the principal point.
[0033] Therefore, a rational mapping imaging model suitable for PTZ zoom cameras was established. Experiments show that using third-order or higher rational mappings does not significantly improve accuracy. Therefore, this embodiment uses a second-order model. For different zoom magnifications, the rational mapping distortion parameters under each zoom state participate in the optimization solution. A total of 12 sets of independent parameter calibrations were completed in the zoom range of 1x to 12x.
[0034] In the spatial constraint construction step, when relying solely on traditional reprojection errors for optimization, the focal length parameter and distortion parameter are prone to coupling under high-magnification zoom conditions, leading to unstable parameter solutions. Therefore, this embodiment uses the actual displacement information provided by the guide rail to construct depth constraints.
[0035] Set the first image in the guide group The position is 0, the first Physical depth of the displacement image Satisfies the one-dimensional kinematic equations: ,in, The untranslated depth of the camera's initial reference pose. The known absolute displacement is provided by the translation mechanism.
[0036] The first one provided by the guide rail The actual displacement corresponding to the amplitude guide rail image Spatial depth value calculated by imaging model and pixel coordinates In comparison, establish depth direction error constraints: ,in, This indicates the depth direction constraint error; This represents the depth value of the spatial point obtained through optimization; This represents the depth value corresponding to the actual displacement of the guide rail; Indicates the image sequence number.
[0037] like Figure 6 As shown, to verify the ability of the guide rail constraint to suppress parameter coupling, 75-85% of the attitude images were randomly selected at each zoom level for 20 repeated calibrations, and the standard deviation of the parameters was statistically analyzed. The results show that under high zoom level conditions, the fluctuations of the focal length parameter and principal point parameter are significantly reduced after adding the guide rail constraint. This indicates that by introducing the actual displacement of the guide rail, additional spatial constraint information can be added to the parameter optimization process, thereby improving the stability of parameter solution.
[0038] In the joint optimization step, the reprojection error and the depth constraint error are used together to construct the joint optimization objective function. The reprojection error is expressed as: ,in, These are the actual observed corner points; These are the projection corner points of the model.
[0039] The joint optimization objective function is expressed as: ,in, Describe the joint optimization objective function; Indicates reprojection error; This indicates the depth direction constraint error; This represents the weighting coefficient for the depth direction constraint.
[0040] In the joint optimization process, the optimization variables include the equivalent focal length parameter. , Principal point parameters , rational mapping distortion parameters , And the extrinsic rotation matrix corresponding to each image. Translation vector In this case, all images at the same focal length share the same rotation matrix. Translation vector The Z component varies with the guide rail displacement, i.e. The translation components in the X and Y directions remain unchanged. The extrinsic rotation matrix and translation vector are used as auxiliary optimization variables in the iterative solution of the joint optimization objective function. The calibration intrinsic parameters do not include the extrinsic rotation matrix and translation vector. The objective function value is continuously reduced through iterative optimization until the preset convergence condition is met. After optimization, the optimal intrinsic parameters and distortion parameters at the current zoom level are obtained.
[0041] Regarding weighting coefficients To determine the weights, this embodiment performed a weight sensitivity analysis. Specifically, in The parameters were calibrated within their preset ranges, and the rate of change of the standard deviation of each intrinsic parameter was observed. Subsequently, the rate of change of the standard deviation of the calibration intrinsic parameters tended to level off, indicating that the depth constraint and reprojection error had reached an optimal balance. Therefore, in this embodiment, we take... .
[0042] In the correspondence establishment step, for each preset zoom ratio (in this embodiment, it is an integer multiple from 1x to 12x), the image acquisition step to the joint optimization step is repeated, and a set of optimal intrinsic and distortion parameters are obtained for each focal length: ,in, Indicates the first There are 12 discrete zoom states. After obtaining the parameter sets corresponding to the 12 discrete zoom states, a one-to-one correspondence between the zoom control quantity and the camera parameters is established, that is, a discrete correspondence is established, so that the portable light pen coordinate measuring system can read the corresponding calibration intrinsic parameters according to the current zoom control quantity.
[0043] As a further extension, after obtaining sufficient discrete calibration points, interpolation or curve fitting methods can be used to establish a continuous mapping model between zoom control quantities and camera parameters. This enables continuous parameter estimation under any zoom state, allowing the portable optical pen coordinate measuring system to calculate the corresponding calibration intrinsic parameters under any zoom state. For example, in this embodiment, a smoothing spline can be used to continuously fit the focal length parameter, principal point parameter, and rational mapping distortion parameter to obtain: ,in This represents the zoom control input from the PTZ camera. This continuous mapping model enables continuous estimation of camera parameters under arbitrary zoom conditions, thereby avoiding recalibration of non-integer zoom points and further improving system efficiency.
[0044] Example 2 Based on Example 1, this embodiment further provides a joint optimization step. In the joint optimization step, a joint optimization objective function is constructed using the reprojection error between the image coordinates and the projection coordinates obtained by projection through the zoom imaging model, and the depth error between the depth position and the known displacement. The intrinsic parameters in the zoom imaging model are optimized and solved to obtain the calibration intrinsic parameters under the current focal length state.
[0045] Specifically, reprojection error The calculation process is based on the translation vector of the extrinsic parameters in the current optimization variables. Extract its The component is used as the depth value of the calibration plate plane in the camera coordinate system. Then calculate the depth value corresponding to the actual displacement of the guide rail. The sum of the squares of the differences between them is taken as the depth error.
[0046] Joint optimization objective function In, weighting coefficient Its function is to balance the contributions of reprojection error and depth error to the optimization results. When When the depth is too small, the influence of depth constraints on the optimization results is insufficient, and they cannot effectively suppress parameter coupling; when When the value is too large, the depth constraint excessively dominates the optimization process, which may lead to a decrease in reprojection accuracy. Through weight sensitivity analysis, this embodiment determines that... At this point, the rate of change of the standard deviation of each intrinsic parameter tends to level off, indicating that the depth constraint and reprojection error have reached the optimal balance.
[0047] The optimization solution employs either the Levenberg-Marquardt algorithm or the Gauss-Newton algorithm for iterative processing. In each iteration, the algorithm calculates the objective function. For each optimization variable The Jacobian matrix is calculated, and then the update step size is calculated to update each optimization variable. Iteration stops when the relative change in the objective function is less than a preset threshold or the maximum number of iterations is reached, and the calibration intrinsic parameters under the current focal length are output.
[0048] In joint optimization, all pose and displacement images under the same focal length state share the same extrinsic rotation matrix. Translation vector The Z component changes with the displacement of the guide rail, while the translational components in the X and Y directions remain unchanged. This setting is consistent with the physical meaning of the depth constraint in the spatial constraint construction step, that is, the guide rail only provides one-dimensional displacement along the optical axis and there is no translation in the X and Y directions. Through the above setting, the extrinsic parameters can not only absorb the spatial pose differences under different shooting postures, but also establish a physical correspondence with the actual displacement provided by the guide rail, thereby effectively transferring the depth constraint to the joint optimization objective function.
[0049] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for calibrating camera intrinsic parameters for portable optical pen coordinate measuring machines, characterized in that: Includes the following steps: The image acquisition step involves acquiring multiple attitude images of the calibration board under different spatial attitudes using a PTZ camera, as well as multiple displacement images of the calibration board when it moves a known amount of displacement along the camera's optical axis. The feature point extraction step involves corner detection on both the pose image and the displacement image, extracting the image coordinates of the calibration board corners, and establishing the spatial coordinates of the corners based on the physical dimensions of the calibration board, thus forming a correspondence between the image coordinates and the spatial coordinates. The imaging model construction steps include establishing a zoom imaging model containing equivalent focal length, principal point coordinates, and distortion parameters, and converting spatial coordinates into image coordinates through perspective projection and distortion mapping. In the imaging model construction step, the zoom imaging model projects spatial coordinates onto the normalized image plane through perspective projection to obtain normalized coordinates. Then, it performs distortion correction on the normalized coordinates through rational mapping and transforms them into the image coordinate system. The rational mapping model is configured as follows: , , in: , Represents the coordinates of an image point in the image plane; , Represents the normalized image plane coordinates; , Represents the focal length parameters in two directions of the image coordinate system; , Indicates the coordinates of the principal point; Represents a rational function relating radial distance; Represents radial distance, satisfying: ; The rational mapping is configured as a fractional function with radial distance as the independent variable, and the fractional function is configured as follows: , in: Indicates radial distance; Represents the rational mapping distortion parameter; Indicates the order of the distortion term; This represents the highest order of the rational mapping model; The spatial constraint construction steps involve establishing absolute physical constraints in the depth direction based on the known displacement. These absolute physical constraints are used to constrain the depth position of the calibration plate plane in the camera coordinate system in each displacement image. In the spatial constraint construction step, a depth direction error constraint term is established, and the error constraint term is configured as follows: , in: This indicates the depth direction constraint error; This represents the depth value of the spatial point obtained through optimization; This represents the depth value corresponding to the actual displacement of the guide rail; Indicates the image sequence number; The joint optimization step constructs a joint optimization objective function based on the reprojection error between the image coordinates and the projection coordinates obtained by the zoom imaging model, and the depth error between the depth position and the known displacement. The intrinsic parameters in the zoom imaging model are optimized and solved to obtain the calibration intrinsic parameters under the current focal length. The correspondence establishment steps establish the correspondence between different focal length states and corresponding calibration intrinsic parameters, so as to provide a portable optical pen coordinate measuring system for use.
2. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 1, characterized in that: The absolute physical constraint is configured as follows: Depth of calibration plate plane corresponding to the group displacement image It satisfies the following with the known displacement: ,in This represents the depth value corresponding to the initial position. For the first The known displacement amount corresponding to the amplitude displacement image.
3. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 2, characterized in that: In the joint optimization step, the weight coefficient of the depth error in the joint optimization objective function is determined by weight sensitivity analysis. The weight sensitivity analysis is performed by adjusting the weight coefficient within a preset range and observing the rate of change of the standard deviation of the calibrated internal parameters. The weight coefficient when the rate of change of the standard deviation tends to level off is taken as the target weight.
4. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 1, characterized in that: In the joint optimization step, the attitude image and the displacement image under the same focal length state share the same extrinsic rotation matrix. The Z component of the translation vector changes with the known displacement, while the X and Y translation components remain unchanged. The extrinsic rotation matrix and translation vector are used as auxiliary optimization variables to participate in the iterative solution of the joint optimization objective function. The calibration intrinsic parameters do not include the extrinsic rotation matrix and translation vector.
5. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 1, characterized in that: In the correspondence establishment step, the feature point extraction step and the joint optimization step are performed respectively under multiple discrete focal length states to obtain the calibration intrinsic parameters corresponding to each discrete focal length state, establish the discrete correspondence between zoom control quantity and calibration intrinsic parameters, and provide the portable light pen coordinate measuring system to read the corresponding calibration intrinsic parameters according to the current zoom control quantity.
6. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 5, characterized in that: In the correspondence establishment step, after establishing the discrete correspondence, a continuous mapping model between the zoom control quantity and the calibration intrinsic parameter is constructed by interpolation or curve fitting. The continuous mapping model is used to provide the portable optical pen coordinate measuring system with the corresponding calibration intrinsic parameter to calculate under any zoom state.
7. The camera intrinsic parameter calibration method for portable optical pen coordinate measuring machine according to claim 1, characterized in that: In the image acquisition step, the attitude images acquired under each discrete focal length state include multiple images of the calibration board at different positions, pitch angles and rotation angles in the camera's field of view. The displacement images are obtained by acquiring calibration board images at each preset position with known displacement. The attitude images and displacement images under the same discrete focal length state together constitute the calibration dataset under that focal length state.
Citation Information
Patent Citations
Self-supervised end-to-end visual reconstruction method and system
CN120182503A
Multi-source information collaborative power equipment three-dimensional temperature field construction method
CN120313738A