Next Article in Journal
A Low-Cost Automatic Vehicle Identification Sensor for Traffic Networks Analysis
Previous Article in Journal
Functionalized Fluorescent Silica Nanoparticles for Bioimaging of Cancer Cells
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A CMM-Based Method of Control Point Position Calibration for Light Pen Coordinate Measuring System

State Key Laboratory of Precision Measuring Technology and Instruments, Tianjin University, Tianjin 300072, China
*
Author to whom correspondence should be addressed.
Sensors 2020, 20(19), 5592; https://doi.org/10.3390/s20195592
Submission received: 3 September 2020 / Revised: 23 September 2020 / Accepted: 28 September 2020 / Published: 29 September 2020
(This article belongs to the Section Optical Sensors)

Abstract

:
A light pen coordinate measuring system (LPCMS) is a kind of vision-based portable coordinate measuring technique. It implements coordinate measurement by analyzing the image of a light pen, which has several control points and a probe. The relative positions of control points need to be determined before measurement and serve as the measuring basis in LPCMS. How to accurately calibrate the relative positions of control points is the most important issue in system calibration. In this paper, a new method of control point position calibration based on a traditional coordinate measuring machine (CMM) is proposed. A light pen is fastened to the measuring arm of a CMM and performs accurate translational movement driven by the CMM. A camera is used to capture the images of control points at different positions, and the corresponding readings of the CMM are recorded at the same time. By establishing a separate coordinate system for each control point, the relative positions of the control points can be transformed to the differences of a series of translation vectors. Experiments show that the calibration repeatability of control point positions can reach 10 μm and the standard deviation of measurement of the whole LPCMS can reach 30 μm. A CMM is used to generate accurate translation, which provides a high accuracy basis of calibration. Through certain mathematical treatment, tremendous data acquired by moving the light pen to tens of thousands of different positions can be processed in a simple way, which can reduce the influence of random error. Therefore, the proposed method provides a high-accuracy solution of control point position calibration for LPCMS.

1. Introduction

Coordinate measuring is a key technique in manufacturing and reverse engineering [1]. With the development of the automobile industry, shipbuilding industry, and aerospace industry, coordinate measuring techniques are increasingly applied to the in situ measurement of large workpieces. Although a traditional coordinate measuring machine (CMM) has very high accuracy, it has poor flexibility and requires strict environmental conditions, which makes it not competent for in situ measurement [2,3]. Therefore, several kinds of portable coordinate measuring techniques have arisen in the last two decades, including laser scanners [4], laser trackers [5], photogrammetry-based devices [6], and so on. They have excellent flexibility, large measurement range, and relatively high accuracy. Among them, the light pen coordinate measuring system (LPCMS) is indispensible for its ability to measure the hidden features of a workpiece, including, but not limited, to deep holes [7,8,9].
LPCMS is typically composed of a camera, a light pen, a laptop, and some data transmission wires. The key component is the light pen, which has several control points and a probe on it. The control points are generally active luminous infrared light emitting diodes (LEDs). Once they are installed on the light pen, their relative positions are fixed. The fundamental principle of LPCMS is to determine the relative position and orientation between the light pen and the camera, according to the control point positions and the image of the control points. Therefore, it can be said that the relative positions of control points serve as the measuring basis in LPCMS, and the accuracy of the whole system is highly dependent on the calibration accuracy of the control point positions. The main issue of this paper is how to fulfill high accuracy calibration of the control point positions.
There have been some methods to calibrate control point positions, which can be classified into two categories: One kind is to measure the relative positions of the control points directly using an image measuring apparatus together with a traditional CMM [10]. However, the control point is not an ideal point but a luminous point of a certain size. Actually, what the calibration really needs to determine is the position of the luminous center of the LED, which cannot be accurately and directly located. Therefore, direct measurement methods can only obtain a rough result. The other kind is the vision-based structure-from-motion (SFM) method, which uses a moving camera to obtain a group of images of control points from different viewpoints [11]. Control point positions can be recovered up to a scale from this group of images using bundle adjustment. Then the absolute dimension is determined by a calibration bar that has accurate length. This is a nonlinear optimization process and does not need to explicitly point out the luminous center of the control points. The problem with this kind of method is that the calibration accuracy is strongly affected by the accuracy of the camera calibration. In order to obtain higher calibration accuracy, the camera needs to move to more viewpoints to give more information about control point positions. Each time a new camera viewpoint is added, the number of variables to be optimized increases by six. These variables represent just the position and orientation of the camera at different viewpoints, and have nothing to do with the relative positions of the control points. Therefore, this will make the nonlinear least squares problem rather complicated and the solving process unstable. In addition to this, the absolute dimension of control point positions are determined by only a few lengths on the calibration bar, which makes the result unreliable if the reference lengths are not accurate enough.
In this paper, a new high-accuracy method of control point position calibration is proposed. It utilizes a traditional CMM to generate accurate translations in three orthogonal directions and makes the light pen move with the measuring arm of the CMM. A stationary camera is placed in front of the CMM to capture the images of control points at different positions. For each control point, a separate coordinate system is established, which satisfies that, at each different position, the coordinate of each control point in its respective coordinate system is equal to the reading of the CMM. With the images of control points at different positions and the readings of the CMM, a nonlinear least squares problem is established to optimize the translation vectors between all the control point coordinate systems and camera coordinate system. After a simple conversion, the relative positions of control points can be determined by the differences of these translation vectors. In its essence, the proposed method is an improved version of the SFM method. The moving part changes from the camera to the light pen, and the movement is pure translation that is accurately generated by CMM. Compared with previous SFM method, the proposed method has more known information and far fewer variables to optimize. Each position added to the calibration will give more information about the control point positions and will not introduce any additional optimization variables. Although the proposed method is a vision-based method, the calibration accuracy is more dependent on the accuracy of the CMM. Tens of thousands of translations of the CMM serve as the calibration basis, which allows the proposed method to reach high accuracy. The establishment of control point coordinate systems and the acceleration method of the algorithm guarantee the speed and stability of the solving process.
To be more intuitional, a simple summary of the advantages and disadvantages of the direct measurement method in [10], the structure from motion method in [11], and the proposed calibration method in this paper is presented in Table 1.
Section 2 gives a brief introduction of LPCMS. Section 3 gives a detailed description of the proposed method of control point position calibration. Some experimental results are presented in Section 4 to demonstrate the performance of the proposed method. Section 5 concludes this paper.

2. Brief Description of LPCMS

As shown in Figure 1a, a typical LPCMS is composed of a camera, a light pen, a laptop, and some data transmission wires. Figure 1b shows the light pen structure adopted in this paper. It has 13 control points. nine of them are coplanar and form an isosceles triangle. The other four are located in a line that is parallel to the front plane.
In order to describe more clearly, two coordinate systems are established, which are fixed to the camera and the light pen, respectively. The camera coordinate system is denoted as O c x c y c z c , and the light pen coordinate system is denoted as O l x l y l z l . Since the position of the camera is fixed during the measurement, O c x c y c z c can be regarded as the reference coordinate system. The final measuring result is the coordinate in O c x c y c z c of the measured point. For any point P , its coordinate in O c x c y c z c can be denoted as P c = ( x c , y c , z c ) T , and its homogeneous coordinate in O l x l y l z l can be denoted as P ˜ l = ( x l , y l , z l , 1 ) T . The coordinates in these two coordinate systems satisfy three dimensional rigid body transformation, which can be denoted as:
P c = [ R | T ] P ˜ l
where R and T are the rotation matrix and translation vector between these two coordinate systems, respectively.
The homogeneous pixel coordinate of its image point can be denoted as p ˜ = ( u , v , 1 ) T . According to the pinhole model of camera. The following relationship can be obtained:
λ p ˜ = K P c = K [ R | T ] P ˜ l
where K is the intrinsic parameter matrix of the camera, and λ is a nonzero scale factor. What needs to be emphasized here is that lens distortion is not considered here, because it is not the main issue of this paper. In practice, distortion compensation is needed to obtain the undistorted pixel coordinate of the image point.
During the measurement, a stationary camera is placed in front of the object to be measured. The operator holds the light pen and guarantees all the control points can be seen by the camera. At the same time, the probe on the light pen is made to touch the surface of the object. The coordinate of the point that the probe touches in O c x c y c z c can be obtained. LPCMS implements coordinate measurement by analyzing the image of control points on the light pen. With the relative positions of control points and the pixel coordinates of their image points, the rotation matrix R and translation vector T between the camera coordinate system and the light pen coordinate system can be determined. According to Equation (1), the coordinate of the probe tip center in light pen coordinate system O l x l y l z l can be converted to the coordinate in camera coordinate system O c x c y c z c . As O c x c y c z c is regarded as the reference coordinate system in LPCMS, the coordinate of the measuring point can be obtained from the coordinate of the probe tip center after a simple radius compensation.
Before actual measurement, LPCMS needs to be carefully calibrated to guarantee accuracy. The system calibration includes camera calibration, control point position calibration, and probe tip center calibration. Camera calibration determines the imaging model of the camera, which includes intrinsic parameters and the distortion coefficients [12,13,14]. In general, the intrinsic parameter matrix is an upper triangular matrix having the following form [15]:
K = [ f x s c x 0 f y c y 0 0 1 ]
It uses f x and f y to describe effective focal length in two orthogonal directions of the imaging sensor. s describes the slope of the two axes of the imaging sensor, which results from that the imaging sensor is not strictly vertical to the optical axis. c x and c y are the position of the optical center of the pixel coordinate. Camera calibration is a well-solved problem in computer vision. There is a standard procedure for camera calibration.
Control point position calibration determines the coordinates of control points in the light pen coordinate system O l x l y l z l . Suppose there are n control points for the light pen. Their homogenous coordinates in O l x l y l z l can be denoted as P ˜ i = ( x i , y i , z i , 1 ) T , ( i = 1 , 2 , , n ) . After image processing, the homogenous pixel coordinates of their image points can be denoted as p ˜ i = ( u i , v i , 1 ) T , ( i = 1 , 2 , , n ) . For each control point, two equations can be obtained according to Equation (2) after a simple transformation. A system of 2 n equations can be established to calculate the unknown R and T , which represent the rotation matrix and translation vector between camera coordinate system and light pen coordinate system. This is a well-known problem in computer vision, which is called perspective-n-point (PnP) problem. There have been a large number of studies on this issue [16,17,18].
Probe tip center calibration gives the coordinate of the probe tip center in the light pen coordinate system O l x l y l z l , which can be denoted as P ˜ p . With the R and T solved from the PnP problem, the coordinate of the probe tip center in camera coordinate system O c x c y c z c can be obtained from P ˜ p after a three-dimensional rigid body transformation according to Equation (1). After compensating for the radius of the probe tip, the coordinate of the measuring point is acquired. Usually, probe tip center can be calibrated using a cone hole [19].
From the description above, control point position calibration is very important to LPCMS. The accuracy of these positions directly impact the solving accuracy of light pen posture R and T , and then impact the accuracy of the final measuring result. However, there are few high-accuracy methods of control point position calibration, which limits the accuracy improvement of LPCMS.

3. Control Point Position Calibration

3.1. Calibration Procedure

In this paper, a new high accuracy method of control point position calibration, which utilizes a traditional CMM, is proposed. The light pen is fastened to the measuring arm of a CMM with a specially customized fixture, so that there is no relative displacement between the light pen and the measuring arm during the movement of the measuring arm of the CMM. A stationary camera is located in front of the CMM at a proper distance, so that the whole movement range of the CMM is in the view field of the camera. The measuring arm drives the light pen to move along with the pre-programming three-dimensional grid route. At each node of the grid, the image of the light pen is captured by the camera and the reading of the CMM is recorded. For each control point on the light pen, a separate coordinate system is established. The pixel coordinates of the image of the control points can be obtained after image processing. With these image coordinates and the corresponding CMM readings, the translation vectors between all the control point coordinate systems and the camera coordinate system can be calculated. The relative positions of the control points can be defined by the differences of these translation vectors. According to these translation vectors, the light pen coordinate system is established and the coordinates of the control points in the light pen coordinate system can be obtained after a three-dimensional rigid body transformation.

3.2. Calibration Method Derivation

As shown in Figure 2, the measuring arm of the CMM drives the light pen to move along with the pre-programming three-dimensional grid route. The machine system of the CMM is denoted as O m x m y m z m and the probe tip center of the CMM is denoted as point M . The coordinate of point M in the machine system O m x m y m z m is exactly the reading of the CMM. The control points are denoted as L i , ( i = 1 , 2 , , n ) . For each control point, an individual coordinate system is established, which can be denoted as O i x i y i z i , ( i = 1 , 2 , , n ) . Their origins are denoted as point O i , ( i = 1 , 2 , , n ) . The control point coordinate system satisfies the condition that, the coordinate of each control point in its own control point coordinate system is equal to the reading of the CMM, at each position of the moving route. If the control point coordinate systems are established like this, then the three axes of the control point coordinate systems have the same direction as the homonymous axes of the machine coordinate system. In other words, the difference between any two coordinate systems is only a pure translation.
The detail derivation process can be formulized as follows. The condition that control point coordinate system satisfies can be expressed in vector form:
O m M = O i L i
Then the four points O m , M , O i , L i form a parallelogram. Thus, the following relation is also satisfied:
O m O i = Μ L i , ( i = 1 , 2 , , n )
Take the first and second control point for example, the following relation can be derived:
O m O 1 = M L 1 , O m O 2 = M L 2 O m O 2 O m O 1 = M L 2 M L 1 O 1 O 2 = L 1 L 2
From Equation (6), it can be concluded that the relative positions of the origins of the control point coordinate systems O i , ( i = 1 , 2 , , n ) is the same as the relative positions of the control points L i , ( i = 1 , 2 , , n ) . Then the control point position calibration problem is converted to determining the relative positions of the origins of control point coordinate systems.
As shown in Figure 3, for each control point coordinate system O i x i y i z i , ( i = 1 , 2 , , n ) , its relationship relative to the camera coordinate system can be represented by a three-dimensional rigid body transformation. The translation vectors are denoted as T i , ( i = 1 , 2 , , n ) . The physical meaning of T i is the vector form the origin of camera coordinate system to the origin of the control point coordinate system, which can be formulated as:
O c O i = T i , ( i = 1 , 2 , , n )
Take the first and second control points for example, the following relationship can be derived:
O c O 1 = T 1 , O c O 2 = T 2 O 1 O 2 = O c O 2 O c O 1 = T 2 T 1
From Equation (8), it can be concluded that the relative positions of the origins of control point coordinate systems can be determined by calculating the differences of a series of translation vectors, which represent the translation between the control point coordinate systems and the camera coordinate system.
From the derivation above, the calibration of the control point positions is transformed to calculating the translation vector between the control point coordinate systems and the camera coordinate system. If each control point is processed separately, this calculation can be regarded as an instance of the PnP problem, and the rotation matrix between control point coordinate system and camera coordinate system is calculated at the same time. Suppose there are m positions on the three dimensional grid route of the CMM. The homogeneous form of the readings of the CMM can be denoted as Q ˜ j = ( x j , y j , z j , 1 ) T , ( j = 1 , 2 , , m ) . According to the establishment condition of the control point coordinate systems mentioned above, Q ˜ j = ( x j , y j , z j , 1 ) T , ( j = 1 , 2 , , m ) are also the coordinates of a control point in its own control point coordinate system. After image processing, the homogeneous pixel coordinates of the image of control points can be denoted as q ˜ i , j = ( u i , j , v i , j , 1 ) T , ( i = 1 , 2 , , n ; j = 1 , 2 , , m ) . The rotation matrixes and translation vectors between control point coordinate systems and camera coordinate systems can be denoted as R i , ( i = 1 , 2 , , n ) and T i = ( t x , i , t y , i , t z , i ) T , ( i = 1 , 2 , , n ) , respectively.
Take the i-th control point for example: The following equations can be derived from Equation (2) at each position of the route:
λ [ u i , j v i , j 1 ] = [ f x s c x 0 f y c y 0 0 1 ] [ R i | T i ] [ x j y j z j 1 ] , ( j = 1 , 2 , , m )
where R i is a 3 × 3 orthogonal matrix. An orthogonal matrix has only three degrees of freedom, and there are several methods to parameterize it. In this paper, rotation angles around coordinate axes, which can be denoted as ( α i , β i , γ i ) , ( i = 1 , 2 , , n ) , are used to parameterize the rotation matrix as follows:
R i = [ cos β i cos γ i cos β i sin γ i cos γ i sin α i sin β i cos γ i cos α i sin γ i sin α i sin β i sin γ i + cos α i cos γ i sin α i cos β i cos α i sin β i cos γ i + sin α i sin γ i cos α i sin β i sin γ i sin α i cos γ i cos α i cos β i ]
What needs to be emphasized here is that the rotation matrix has several different denotations parameterized by rotation angles around the coordinate axes, depending on the order of three rotations. The denotation in Equation (10) is only one of them. Expanding Equation (9), the scale factor λ can be eliminated. An equation system composed of 2 m nonlinear equations with six unknown variables ( α 1 , β i , γ i , t x , i , t y , i , t z , i ) is established. Because the detailed form of the equations is too complicated, the following abbreviated form is used in this paper:
{ g i , j ( α i , β i , γ i , t x , i , t y , i , t z , i ) u i , j = 0 h i , j ( α i , β i , γ i , t x , i , t y , i , t z , i ) v i , j = 0 ( j = 1 , 2 , , m )
This is a general nonlinear least squares problem, and there are many mature solutions to this problem. Then the translation vector between the i-th control point coordinate system and camera coordinate system T i = ( t x , i , t y , i , t z , i ) T is determined.
For each control point, the same process is repeated, and the only change is to use different image coordinates. Then all the translation vectors T i = ( t x , i , t y , i , t z , i ) T , ( i = 1 , 2 , , n ) are determined. According to the derivation in Equations (6) and (8), the relative positions of the control points can be calculated from the differences of these translation vectors.

3.3. Algorithm Acceleration

At the beginning of Section 3.2, it was mentioned that the way that control point coordinate systems are established guarantees that the difference between any two control point coordinate systems is a pure translation. Thus, their rotation matrices relative to the camera coordinate system are the same, which can be represented by the following formula:
{ α i 1 = α i 2 = α β i 1 = β i 2 = β γ i 1 = γ i 2 = γ ( i 1 , i 2 = 1 , 2 , , n ; i 1 i 2 )
With these conditions satisfied, a better way to calculate the translation vectors is to take all control points into consideration at the same time rather than calculate them separately. If all control points are handled at the same time, two equations can be derived from Equation (2) for each control point, at each position of the CMM route. The equation system in Equation (11) for all the control point can be merged together. As a result, an equation system which is composed of 2 m n equations with 3 n + 3 variables ( α i , β i , γ i , t x , i , t y , i , t z , i ) , ( i = 1 , 2 , , n ) is established, which has a similar form to Equation (11):
{ g i , j ( α , β , γ , t x , i , t y , i , t z , i ) u i , j = 0 h i , j ( α , β , γ , t x , i , t y , i , t z , i ) v i , j = 0 ( i = 1 , 2 , , n ; j = 1 , 2 , , m )
This equation system can be solved as a general nonlinear least squares problem. In computer vision, the solving process is also known as the bundle adjustment method [20,21].
In practical calibration process, there are tens of thousands different positions on the CMM route to guarantee the calibration accuracy, so m is a quite large number. Take the light pen in Figure 1b for example, n = 13 and there are totally 42 variables in the equation system. This means the equation system in Equation (13) will be very large. Solving it directly will be time and space consuming.
Take the classical Gauss–Newton method with line search for example [22]. It starts from an initial solution vector, and uses a gradient-based iteration framework to approximate the locally optimal solution. Suppose X represents the solution vector of the system. The initial solution vector can be denoted as X ( 0 ) = ( α ( 0 ) , β ( 0 ) , γ ( 0 ) , t x , i ( 0 ) , t y , i ( 0 ) , t z , i ( 0 ) ) , ( i = 1 , 2 , , n ) and the solution vector in the k-th iteration can be denoted as X ( k ) = ( α ( k ) , β ( k ) , γ ( k ) , t x , i ( k ) , t y , i ( k ) , t z , i ( k ) ) , ( i = 1 , 2 , , n ) . The iteration criterion is as follows:
X ( k + 1 ) = X ( k ) d ( k ) Z ( k )
where Z ( k ) is the iteration direction at X ( k ) and d ( k ) is the step length along Z ( k ) . Z ( k ) is the solution of a linear equation system. It can be calculated through the following formula:
Z ( k ) = ( J ( k ) T J ( k ) ) 1 J ( k ) T R ( k )
where J ( k ) and R ( k ) are the Jacobian matrix and residual vector of the equations system at X ( k ) , respectively. The entry of J ( k ) is the first-order partial derivative of the equations with respect to all variables. The value of d ( k ) can be calculated through one-dimensional line search along Z ( k ) . For the equation system in Equation (13), J ( k ) is a 2 m n × ( 3 n + 3 ) matrix, which is very large, and J ( k ) T J ( k ) is a ( 3 n + 3 ) × ( 3 n + 3 ) matrix. The storage of J ( k ) will occupy quite a large amount of memory and the computation of J ( k ) T J ( k ) will consume a great deal of time. This computation will be conducted once during each iteration, so special treatment is needed to accelerate the algorithm.
Although there are 3 n + 3 variables in the whole equation system, any single equation has only six variables, including three rotation angles and three translation components. The 2 m equations of one control point have nothing to do with the translation vectors of the other control points. Therefore, the following partial derivatives are zero:
h i 1 , j t x , i 2 = h i 1 , j t y , i 2 = h i 1 , j t z , i 2 = 0 g i 1 , j t x , i 2 = g i 1 , j t y , i 2 = g i 1 , j t z , i 2 = 0 ( i 1 , i 2 = 1 , 2 , , n ; i 1 i 2 ) ( j = 1 , 2 , , m )
In other words, the Jacobian matrix J is a sparse matrix, whose most entries are zero. The algorithm can be accelerated by taking advantage of the sparsity of J [23,24]. The Jacobian matrix J can be organized in partitioned form as:
J = [ A 1 A 2 A n B 1 0 0 0 B 2 0 0 0 B n ]
where A i , ( i = 1 , 2 , , n ) is a 2 m × 3 matrix composed of partial derivatives with respect to rotation angles ( α , β , γ ) , and B i , ( i = 1 , 2 , , n ) is a 2 m × 3 matrix composed of partial derivatives with respect to translation components ( t x i , t y i , t z i ) , ( i = 1 , 2 , , n ) . They have the following form:
A i = [ h i , 1 α h i , 1 β h i , 1 γ g i , 1 α g i , 2 β g i , 3 γ h i , m α h i , m β h i , m γ g i , m α g i , m β g i , m γ ] , B i = [ h i , 1 t x , i h i , 1 t y , i h i , 1 t z , i g i , 1 t x , i g i , 1 t y , i g i , 1 t z , i h i , m t x i h i , m t y i h i , m t z i g i , m t x , i g i , m t y , i g i , m t z , i ]
Then J T J can be computed in partitioned form:
J T J = [ i = 1 n A i T A i A 1 T B 1 A n T B n B 1 T A 1 B 1 T B 1 0 B n T A n 0 B n T B n ]
From Equation (19), it can be seen that, with the acceleration method, only one A i and one B i are stored at any moment of the algorithm. Once the 3 × 3 subblocks A i T A i , A i T B i , B i T B i are calculated, the values of A i and B i can be updated. Therefore, the memory occupied by Jacobian matrix J reduces from 2 m n × ( 3 n + 3 ) to 2 m × 6 . There are 3 n subblocks to calculate in total, and the time complexity of one calculation is 2 m × 3 2 . Therefore, the time complexity to calculate J T J reduces from 2 m n × ( 3 n + 3 ) 2 to 3 n × 2 m × 3 2 . It can be seen that the proposed method above, which utilizes the sparsity of Jacobian matrix, can accelerate the solving algorithm of Equation (13) significantly.

3.4. Light Pen Coordinate System Establishement

After solving the equation system in Equation (13), the translation vectors T i = ( t x , i , t y , i , t z , i ) T , ( i = 1 , 2 , , n ) between the control point coordinate systems and camera coordinate system are obtained. According to the derivation in Equations (8) and (10), the relative positions of the control points can be determined by the differences of these translation vectors. However, these relative positions are represented with the coordinates in the camera coordinate system, which vary with the position of the camera during the calibration process. For convenience, there is a need to establish the light pen coordinate system O l x l y l z l according to the structure of the light pen. The light pen coordinate system can be established in many ways. For the light pen in Figure 1b, the light pen coordinate system can be established as follows:
  • Determine the origin of O l x l y l z l . The first control point is used as the origin. Then a new set of translation vectors T i = ( t x , i , t y , i , t z , i ) T , ( i = 1 , 2 , , 13 ) is calculated:
    { t x , i = t x , i t x , 1 t y , i = t y , i t y , 1 t z , i = t z , i t z , 1 ( i = 1 , 2 , , 13 )
  • Determine the z-axis of O l x l y l z l . The fifth to 13th control points are designed to be coplanar. Actually, they are not strictly coplanar because of the machining and installation error. Therefore, a plane is fitted using their new translation vectors T i = ( t x , i , t y , i , t z , i ) T , ( i = 5 , 6 , , 13 ) . The direction of its unit normal vector, which can be denoted as q , is used as the z-axis of O l x l y l z l .
  • Determine the y-axis of O l x l y l z l . For the same reason, the first to fourth control points are not strictly collinear. They are projected to the plane fitted before. A line is fitted using the coordinates of their projections. The unit direction vector of this line is denoted as p . Since the fitted line is in the plane, p q is satisfied. The direction of p can be used as the y-axis of O l x l y l z l .
  • Determining the x-axis of O l x l y l z l . Given the direction of y-axis p and z-axis q , the direction of x-axis, which is denoted as o , can be determined by the cross product:
    o = p × q
  • Determining the relative positions of control points with coordinates in O l x l y l z l . With the origin and axes determined, the coordinates of control points in O l x l y l z l , which can be denoted as P i , ( i = 1 , 2 , , 13 ) can be calculates as follows:
    P i = [ o T p T q T ] T i , ( i = 1 , 2 , , 13 )

4. Experiment

4.1. Actual Control Point Position Calibration Experiment

Figure 4a shows the scene of one actual experiment, and Figure 4b shows how the light pen is fastened to the measuring arm with the special customized fixture.
The light pen is made of carbon fiber reinforced materials and manufactured by the use of a customized mold, which is designed according to the light pen structure shown in Figure 1b. The control points are infrared LEDs, which are assembled to the light pen by a screw joint. There is also a small control board on the light pen, which can receive the instruction from the laptop. The luminance of the LEDs can be adjusted as required. The CMM is Global Silver Classic SR supplied by Hexagon, Qingdao, Shandong Province, China. Its positioning accuracy is 2.3 μm. The camera is an industrial camera with 5 million pixels, which is supplied by Ximea, Münster, North Rhine-Westphalia, Germany. The lens is an industrial lens with 16 mm focal length, which is supplied by Satoo, Saitama, Japan. The camera is located in front of the CMM at a proper distance, so that the light pen is always in the view field of the camera during the calibration process. Take the calibration experiment in Figure 4a for example: the camera is located about 1.5 m in front of the CMM. The movement ranges in three directions are all 400 mm, which is limited within the movement range of the CMM. The three-dimensional grid route has m = 20   ×   20   ×   20 = 8000 nodes and, therefore, the distance between two adjacent nodes is 20 mm. It takes about 2.5 h to finish the calibration.
In order to eliminate the influence of room ambient light, two approaches are adopted in the calibration procedure as well as the actual measurement process. First, the control points are infrared LEDs, and an infrared light filter is installed in front of the camera lens. Then the visible light component of the room ambient light is filtered out. Second, the frame that is used for image processing is not a frame directly captured by the camera. It is obtained by calculating the difference between two adjacent frames, one is the frame that the LEDs are lighted and the other is a frame that only contains the background. These two approaches will reduce the influence of room ambient light to a large extent, if the environmental light condition does not change rapidly.
The accuracy of the translational movement of the light pen is guaranteed by the CMM. Another factor that affects the accuracy of the calibration is the accuracy of the pixel coordinates of the control points’ images. To achieve high accuracy, an image processing method with sub-pixel accuracy is required. For the reason that the energy distribution of the infrared LEDs on the imaging sensor is approximate to a two-dimensional Gaussian distribution, the center of the image point can be obtained by Gaussian surface fitting from the gray values of the feature area. In practice, the repeatability of the pixel coordinate is 0.05 pixels.
With the proposed method, the rotation angles between control point coordinate systems and camera coordinate system are α = 91.717 ° , β = 0.782 ° , γ = 1.255 ° . The translation vectors T i = ( t x , i , t y , i , t z , i ) T , ( i = 1 , 2 , , 13 ) are listed in Table 2.
Using the method in Section 3.4 to establish the light pen coordinate system, the direction of the three axes are:
o = ( 0.01445 , 0.9998 , 0.01335 ) T
p = ( 0.9997 , 0.01421 , 0.01883 ) T
q = ( 0.01864 , 0.01362 , 0.9997 ) T
Then the control point positions in the light pen coordinate system P i = ( x i , y i , z i ) T , ( i = 1 , 2 , , 13 ) , which are the final result of this calibration, can be calculated from Equations (20) and (22). The results are listed in Table 3.
To illustrate the repeatability of the proposed calibration method, 10 calibrations are conducted by locating the camera at different positions. Due to the existence of error, the results of 10 calibrations are slightly different. Therefore, the light pen coordinate systems established in these calibrations are also slightly different. It is more reasonable to use the distances of any two control points, rather than the coordinates in the light pen coordinate system, to measure the repeatability of the proposed method. For 13 control points, there are 78 distances to calculate in total. Owing to space constraints, only seven representative distances are listed in Table 4 to illustrate the repeatability. From Table 4, it can be concluded the repeatability of calibration with the proposed method is about 10 μm.

4.2. Simulation Experiment

Since the true values of control point positions are unknown, actual calibration experiments can only reflect the repeatability of the proposed method. As to accuracy, we can only resort to simulation experiments. The procedure of the simulation experiment is performed as follows: Given a set of control point positions as the true value, the rigid body transformation between the CMM and the camera and the readings at each node of the CMM route are also given. Equations (9), (20) and (22) are used to trace back to obtain the ideal pixel coordinates of the image points. To verify the accuracy of the proposed method, random errors of different ranges that obey the normal distribution are added to the readings of the CMM and the ideal image coordinates to simulate the actual situation. With the disturbed data, calibration calculation is performed to obtain the simulation result. The performance of the proposed method can be evaluated by comparing the calibration result and the given true value. In addition to random errors, the influence of the number of nodes on calibration accuracy is also studied. Figure 5a shows the calibration errors when different ranges of random errors, which obey the normal distribution, are added to the CMM readings and image coordinates. The deviation sequences of two random errors adopted in the simulation experiment are [ 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ] μm and [ 0.01 , 0.02 , 0.05 , 0.1 , 0.2 ] pixels, respectively. At the same time, the number of nodes on the CMM route is fixed at m = 30   ×   30   ×   30 = 27,000 . Figure 5b shows the calibration errors with different numbers of nodes on the CMM route, when the deviation standards of two random errors are fixed at 0.1 pixel and 4 μm, respectively. The sequence of node numbers is [ 1000 , 8000 , 27000 , 64000 , 125000 ] . The movement ranges in three directions are all fixed at 400 mm and, therefore, the distance sequence of two adjacent nodes is [ 40 , 20 , 13.333 , 10 , 8 ] mm.
From Figure 6a, it can be seen that the simulated calibration error is approximately proportional to the deviation of the random error added to the CMM readings and image coordinates. From Figure 6b, it can be seen that when the number of nodes is small, the calibration error decreases significantly with the increase of the node number. However, when the node number exceeds a certain number, the calibration error is almost unchanged. Under this circumstance, the increase in the number of nodes takes a great deal of time, but provides little benefit to the calibration.

4.3. Measurement Experiment of LPCMS

With the calibration results in Table 3, LPCMS is used to measure three standard gauges and a standard cylindrical bore on a standard module, which are shown in Figure 6, 10 times at distances from 2 to 10 m. The nominal lengths of the gauges are 100 mm, 250 mm, and 1000 mm, respectively, and the nominal diameter of the cylindrical bore is 2.5 inches, i.e., 63.5 mm. What needs to be explained here is that, once the relative positions of the control points are determined, the light pen can translate and rotate arbitrarily as long as it can be seen in the view of field of the camera. The light pen is held by hand during the measuring process and, therefore, not only translation but also rotation inevitably occurs in the measurement. For each measured point, the current posture of the light pen is calculated by solving the PnP problem. Owing to space constraints, only the statistical results are shown in Table 5. From the results in Table 5, it can be concluded that the standard deviation of the measurement of the whole LPCMS can achieve 30 μm within 10 m.
To compare the performance of the existing and proposed calibration methods quantitatively, three different groups of control point positions, which are calibrated with the methods in [10,11] and the proposed method in this paper, respectively, are used in the LPCMS to measure the 250 mm gauge at different distances from 2 to 10 m. The statistical results are shown in Table 6. From Table 6, it can be seen that the proposed method is superior to existing methods in terms of accuracy.

5. Conclusions

In this paper, a high-accuracy CMM-based method of control point position calibration for LPCMS is proposed. A traditional CMM is used to drive the light pen to move along a three dimensional grid route. Through establishing a coordinate system for each control point in a certain way, the relative positions of control points can be transformed to the differences of the translation vectors between control point coordinate systems and camera coordinate system. A nonlinear least squares problem is established to solve these translation vectors. Since the number of variables is only relative to the number of control points, there can be tens of thousands of nodes on the CMM route so that the influence of random error is significantly reduced. The positional accuracy of each node is guaranteed by the CMM, so the CMM can be seen as the calibration basis of the proposed method. Since the nonlinear least squares problem above is quite sparse, a method to accelerate the algorithm is also proposed, which makes it possible to handle the vast number of nodes.
Although the proposed method is a vision-based method, the calibration accuracy is more dependent on the accuracy of the CMM. Therefore, compared with existing vision-based methods, the proposed method is more accurate. The establishment of control point coordinate systems and the acceleration method of the algorithm guarantees the speed and stability of the solving process. Experiments show that, with the proposed calibration method, the whole LPCMS can reach a rather high accuracy.

Author Contributions

Conceptualization: S.W. and S.L.; methodology: S.W.; software: S.W. and S.L.; validation: S.W. and S.L.; formal analysis: S.W.; investigation: S.W.; resources: S.W.; data curation: S.W.; writing—original draft preparation: S.W.; writing—review and editing: Q.M.; visualization: S.W. and Q.M.; supervision: S.L.; project administration: S.L.; funding acquisition: S.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded bythe State Administration of Science, Technology and Industry for the National Defense of China, grant number JSJL2014206B001.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Várady, T.; Martin, R.R.; Cox, J. Reverse engineering of geometric models—An introduction. Comput. Aided Des. 1997, 29, 255–268. [Google Scholar] [CrossRef]
  2. Brezina, I. Coordinate Measuring Machines and Systems. Measurement 1997, 20, 287. [Google Scholar] [CrossRef]
  3. Zhang, G.X. Coordinate Measuring Machines, 1st ed.; Tianjin University Press: Tainjin, China, 1999; pp. 18–27. [Google Scholar]
  4. Milroy, M.J.; Weir, D.J.; Bradley, D.C.; Vickers, G.W. Reverse engineering employing a 3D laser scanner: A case study. Int. J. Adv. Manuf. Technol. 1996, 12, 111–121. [Google Scholar] [CrossRef]
  5. Aguado, S.; Samper, D.; Santolaria, J.; Aguilar, J.J. Identification strategy of error parameter in volumetric error compensation of machine tool based on laser tracker measurements. Int. J. Mach. Tool. Manu. 2012, 53, 160–169. [Google Scholar] [CrossRef]
  6. Reich, C.; Ritter, R.; Thesing, J. 3-D shape measurement of complex objects by combining photogrammetry and fringe projection. Opt. Eng. 2000, 39, 224–231. [Google Scholar] [CrossRef] [Green Version]
  7. Liu, S.G.; Peng, K.; Huang, F.S.; Zhang, G.X.; Li, P. A porTable 3D vision coordinate measurement system using a light pen. Key Eng. Mater. 2005, 295, 331–336. [Google Scholar]
  8. Qin, D.H. Research on the Technology and System of Portable Light Pen Coordinate Measurement System. Ph.D. Thesis, Huazhong University of Science and Technology, Wuhan, China, 2009. [Google Scholar]
  9. Xie, Z.X.; Han, Z.H.; Gao, X. Key technologies of monocular vision measurement system with light pen. Chin. Opt. 2013, 6, 780–787. [Google Scholar]
  10. Liu, S.G.; Zhang, H.L.; Dong, Y.H.; Tang, S.L.; Jiang, Z.Z. Portable light pen 3D vision coordinate measuring system—Probe tip center calibration. Meas. Sci. Rev. 2013, 13, 194–199. [Google Scholar] [CrossRef]
  11. Fu, S.; Zhang, L.Y.; Ye, N.; Zhang, W.Z.; Liu, S.L. A flexible approach to light pen calibration for a monocular-vision-based coordinate measuring system. Meas. Sci. Technol. 2014, 25, 1–8. [Google Scholar] [CrossRef]
  12. Tsai, R. A versatile camera calibration technique for high-accuracy 3D machine vision metrology using off-the-shelf TV cameras and lenses. IEEE J. Robot. Autom. 1987, 3, 323–344. [Google Scholar] [CrossRef] [Green Version]
  13. Zhang, Z.Y. A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 2000, 22, 1330–1334. [Google Scholar] [CrossRef] [Green Version]
  14. Quan, L.; Lan, Z.D. Linear N-point camera pose determination. IEEE Trans. Pattern Anal. Mach. Intell. 1999, 21, 774–780. [Google Scholar] [CrossRef] [Green Version]
  15. Sezliski, R. Computer Vision: Algorithms and Applications, 1st ed.; Springer: New York, NY, USA, 2011; pp. 45–47. [Google Scholar]
  16. Lepetit, V.; Moreno-Noguer, F.; Fua, P. EPnP. An accurate O(n) solution to the PnP problem. Int. J. Comput. Vision. 2009, 81, 155–166. [Google Scholar] [CrossRef] [Green Version]
  17. Li, S.Q.; Xu, C.; Xie, M. A robust O(n) solution to the perspective-n-point problem. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 1444–1450. [Google Scholar] [CrossRef] [PubMed]
  18. Xu, D.; Li, Y.F.; Tan, M. A general recursive linear method and unique solution pattern design for the perspective-n-point problem. Image Vis. Comput. 2008, 26, 740–750. [Google Scholar] [CrossRef]
  19. Zhang, R.; Liu, S.G.; Wang, S.; Song, X.X. Stylus tip center position self-calibration based on invariable distances in light-pen systems. Sensors 2017, 17, 131. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  20. Furukawa, Y.; Ponce, J. Accurate camera calibration from multi-view stereo and bundle adjustment. Int. J. Comput. Vis. 2008, 84, 257–268. [Google Scholar]
  21. Hartley, R.I.; Zisserman, A. Multiple View Geometry in Computer Vision, 2nd ed.; Cambridge University Press: New York, NY, USA, 2003; pp. 434–456. [Google Scholar]
  22. Nocedal, J.; Wright, S.J. Numerical Optimization, 2nd ed.; Springer: New York, NY, USA, 2006; pp. 270–302. [Google Scholar]
  23. Agarwal, S.; Snavely, N.; Seitz, S.M.; Szeliski, R. Bundle Adjustment in the Large. In Proceedings of the European Conference on Computer Vision, Part II, Heraklion, Crete, Greece, 5–11 September 2010; pp. 29–42. [Google Scholar]
  24. Jeong, Y. Pushing the envelope of modern methods for bundle adjustment. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 1605–1617. [Google Scholar] [PubMed]
Figure 1. Introduction of light pen coordinate measuring system. (a) The typical composition of the light pen coordinate measuring system; (b) the light pen structure adopted in this paper.
Figure 1. Introduction of light pen coordinate measuring system. (a) The typical composition of the light pen coordinate measuring system; (b) the light pen structure adopted in this paper.
Sensors 20 05592 g001
Figure 2. The establishment of the CMM machine coordinate system and all the control point coordinate systems. The control point position calibration problem is converted to determining the relative positions of the origins of control point coordinate systems.
Figure 2. The establishment of the CMM machine coordinate system and all the control point coordinate systems. The control point position calibration problem is converted to determining the relative positions of the origins of control point coordinate systems.
Sensors 20 05592 g002
Figure 3. The relationship between the control point coordinate systems and the camera coordinate system. Determining the relative positions of the origins of control point coordinate systems can be converted to calculating the translation vectors between the control point coordinate systems and the camera coordinate systems.
Figure 3. The relationship between the control point coordinate systems and the camera coordinate system. Determining the relative positions of the origins of control point coordinate systems can be converted to calculating the translation vectors between the control point coordinate systems and the camera coordinate systems.
Sensors 20 05592 g003
Figure 4. Actual experiment of control point position calibration: (a) The scene of one actual experiment; (b) the customized fixture to fasten light pen.
Figure 4. Actual experiment of control point position calibration: (a) The scene of one actual experiment; (b) the customized fixture to fasten light pen.
Sensors 20 05592 g004
Figure 5. Calibration results of simulation experiments: (a) Calibration errors with different ranges of random errors. The random errors obey normal distribution, and the scale values are different standard deviations. (b) Calibration errors with different numbers of nodes on the CMM route.
Figure 5. Calibration results of simulation experiments: (a) Calibration errors with different ranges of random errors. The random errors obey normal distribution, and the scale values are different standard deviations. (b) Calibration errors with different numbers of nodes on the CMM route.
Sensors 20 05592 g005
Figure 6. Measurement experiments of LPCMS: (a) Three gauges of different lengths; (b) a standard cylindrical bore.
Figure 6. Measurement experiments of LPCMS: (a) Three gauges of different lengths; (b) a standard cylindrical bore.
Sensors 20 05592 g006
Table 1. Comparison table of the pros and cons of calibration methods.
Table 1. Comparison table of the pros and cons of calibration methods.
Calibration MethodAdvantagesDisadvantages
Direct Measurement Method in [10]Fast calibration speed;
Easy operation;
No need of calculation
Unable to locate luminous center;
Low accuracy
Structure from Motion Method in [11]No need of extra equipment;
High flexibility;
Able to calibrate in real-time
Complicated calculation;
Low reliability
The Proposed MethodHigh accuracy;
Simple calculation process;
Able to process tremendous data
High time consumption;
Complex calibration procedure
Table 2. Translation vectors between control point coordinate systems and the camera coordinate system at the position in Figure 4a (mm).
Table 2. Translation vectors between control point coordinate systems and the camera coordinate system at the position in Figure 4a (mm).
Control Point Index t x , i t y , i t z , i
1−31.343−319.5781542.853
2−130.327−317.9441544.784
3−230.340−316.7261546.672
4−410.261−314.9241550.004
5−571.145−309.6941452.690
6−486.863−266.0871451.879
7−402.882−222.7401451.028
8−318.265−179.5081450.131
9−319.429−234.6571449.130
10−322.394−394.0581447.287
11−323.049−449.0601446.452
12−405.913−402.3711448.562
13−488.814−355.5991450.688
Table 3. Control point positions in the light pen coordinate system (mm).
Table 3. Control point positions in the light pen coordinate system (mm).
Control Point Index x i y i z i
10.0000.0000.000
2−0.22899.159−0.064
3−0.025199.053−0.071
40.730379.013−0.024
5−0.874538.094100.333
6−45.681454.440100.167
7−90.222371.082100.043
8−134.657287.08699.951
9−79.488287.447100.223
1079.949288.11399.950
11134.962287.970100.048
1289.451371.514100.119
1343.858455.096100.176
Table 4. Repeatability of nine representative distances between two control points. Ave is the abbreviation of average value. Std is the abbreviation of standard deviation. (mm).
Table 4. Repeatability of nine representative distances between two control points. Ave is the abbreviation of average value. Std is the abbreviation of standard deviation. (mm).
Calibration Index1–4 11–55–85–118–111–81–11
1379.014547.369284.435284.629269.620332.471333.393
2379.022547.385284.446284.611269.599332.476333.425
3379.012547.355284.461284.603269.625332.483333.420
4379.030547.344284.447284.622269.615332.450333.409
5379.005547.363284.452284.631269.603332.456333.396
6379.024547.359284.458284.615269.621332.464333.433
7379.019547.388284.432284.623269.608332.469333.401
8379.008547.354284.441284.618269.619332.472333.422
9379.027547.376284.459284.607269.618332.456333.411
10379.016547.371284.429284.614269.603332.448333.430
Ave379.018547.366284.446284.617269.613332.465333.414
Std0.008180.014080.011580.009110.009090.011650.01417
Range0.0250.0440.0320.0280.0260.0350.040
1 The denotation i-j means the distance between the i-th and j-th control points.
Table 5. The results of measurement experiment of LPCMS. The meanings of the abbreviations Ave and Std are the same as in Table 4 (mm).
Table 5. The results of measurement experiment of LPCMS. The meanings of the abbreviations Ave and Std are the same as in Table 4 (mm).
Distance100 Gauge250 Gauge1000 GaugeCylinder
AveStdAveStdAveStdAveStd
2 m99.9940.0025250.0090.0028999.9820.006263.5020.0022
4 m100.0020.0037250.0140.0049999.9940.013363.5070.0027
6 m100.0060.0048249.9830.00721000.0150.018763.5130.0042
8 m99.9880.0056250.0030.0123999.9890.022763.5050.0053
10 m99.9920.0071250.0070.0158999.9790.031563.5190.0085
Table 6. Measurement results of 250 mm gauge with different calibration results. The meanings of the abbreviations Ave and Std are the same as in Table 4 (mm).
Table 6. Measurement results of 250 mm gauge with different calibration results. The meanings of the abbreviations Ave and Std are the same as in Table 4 (mm).
DistanceMethod in [10]Method in [11]Proposed Method
AveStdAveStdAveStd
2 m250.0330.0258250.0190.0121250.0090.0028
4 m249.9760.0376250.0330.0213250.0140.0049
6 m249.9820.0627249.9750.0381249.9830.0072
8 m250.0410.1032250.0290.0419250.0030.0123
10 m249.9630.1523250.0380.0688250.0070.0158

Share and Cite

MDPI and ACS Style

Wang, S.; Liu, S.; Mao, Q. A CMM-Based Method of Control Point Position Calibration for Light Pen Coordinate Measuring System. Sensors 2020, 20, 5592. https://doi.org/10.3390/s20195592

AMA Style

Wang S, Liu S, Mao Q. A CMM-Based Method of Control Point Position Calibration for Light Pen Coordinate Measuring System. Sensors. 2020; 20(19):5592. https://doi.org/10.3390/s20195592

Chicago/Turabian Style

Wang, Sen, Shugui Liu, and Qing Mao. 2020. "A CMM-Based Method of Control Point Position Calibration for Light Pen Coordinate Measuring System" Sensors 20, no. 19: 5592. https://doi.org/10.3390/s20195592

APA Style

Wang, S., Liu, S., & Mao, Q. (2020). A CMM-Based Method of Control Point Position Calibration for Light Pen Coordinate Measuring System. Sensors, 20(19), 5592. https://doi.org/10.3390/s20195592

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop