Physician-Friendly Tool Center Point Calibration Method for Robot-Assisted Puncture Surgery

After each robot end tool replacement, tool center point (TCP) calibration must be performed to achieve precise control of the end tool. This process is also essential for robot-assisted puncture surgery. The purpose of this article is to solve the problems of poor accuracy stability and strong operational dependence in traditional TCP calibration methods and to propose a TCP calibration method that is more suitable for a physician. This paper designs a special binocular vision system and proposes a vision-based TCP calibration algorithm that simultaneously identifies tool center point position (TCPP) and tool center point frame (TCPF). An accuracy test experiment proves that the designed special binocular system has a positioning accuracy of ±0.05 mm. Experimental research shows that the magnitude of the robot configuration set is a key factor affecting the accuracy of TCPP. Accuracy of TCPF is not sensitive to the robot configuration set. Comparison experiments show that the proposed TCP calibration method reduces the time consumption by 82%, improves the accuracy of TCPP by 65% and improves the accuracy of TCPF by 52% compared to the traditional method. Therefore, the method proposed in this article has higher accuracy, better stability, less time consumption and less dependence on the operations than traditional methods, which has a positive effect on the clinical application of high-precision robot-assisted puncture surgery.


Introduction
Robot-assisted needle insertion technology can improve the accuracy and security of many minimally invasive percutaneous surgeries, such as biopsy and brachytherapy. Usually, a robot-assisted needle insertion system mainly includes a lesion navigation system and a robot [1]. Through a series of coordinate transformations, the robot precisely inserts the needle into the lesion location [2]. Errors from coordinate transformations result in a precise but not accurate needle placement. An important reason is the inaccuracy of the tool center point (TCP) which is often described as the tool center point position (TCPP) and tool center point frame (TCPF) with respect to the end flange frame in robot-assisted puncture surgery. The inaccuracy will result in a fixed offset between the true position of the needle tip and the target position for each penetration. For all robot users, general robot manufacturers provide kinematics calculations only from the base to the end flange instead of the TCP. That means doctors must establish the coordinate transformation from the end flange to the TCP by themselves to adapt to different size of puncture needles and to ensure the safety of the operation. Traditional TCP calibration is to jog a robot manually to approach a sharp tip feature with different robot poses [3]. This procedure is time consuming and highly operator-dependent, since it requires the doctor's eyes to focus on the sharp tip to ensure that the TCP can reach the same position every time. This method is not conducive to clinical applications and the promotion of precision puncture surgery. Thus, it is necessary to propose a quick, simple and error-controllable TCP calibration method. of our method are that it reduces the difficulty of operations while improving the accuracy. The doctor only needs to control the needle fixed in the robot end flange to enter the measurement space to complete the calibration.
The remainder of this paper is organized into the following sections. In Section 2, we introduce our system's constitution, the design of vision system, the algorithm for positioning the tip of needle and direction of needle axis and the analysis of TCP calibration algorithm. Section 3 introduced the experimental design of the evaluation of our vision system's accuracy, the accuracy in different configurations and the comparison of our method and traditional methods. Section 4 analyzes the results of all experiments and suggestions for calibration using the method proposed in this article are given. Section 5 concludes that our proposed method can achieve a higher precision puncture and has higher clinical application value.

System Constitution
The experiment system is composed of a collaborative robot, binocular vision system and PC software. The system configuration is shown in Figure 1. In this system, we adopt a 6 DOF collaborative robot offered by UNIVERSAL ROBOTS Co., Ltd. (Shanghai, China), model UR5. A biopsy needle (provided by Bard Peripheral Vascular, Inc. (Tempe, AZ, USA), MN1413) is mounted on a simple fixture attached to the end of the flange. The binocular vision system is formed by two industrial CCD cameras offered by DAHENG IMAGING Co., Ltd. (Beijing, China). The camera model is MER-1810-21U3C and is equipped with a lens of model M1224-MPW2. The resolution of each camera is 4912 (H) × 3684 (V). The focus of the lens is 12 mm. The system applies diffuse bright-field back light illumination to improve the image contrast, thereby improving the measurement accuracy. In addition, this illumination design can help the camera to obtain a clear image with a small aperture. The advantage of a small aperture is that the camera's depth of field is larger, and a larger measurement space generated can be used to capture the movement of the needle tip, avoiding the out-of-focus caused by the movement of the needle tip in the measurement space.

Binocular System Design and Image Processing
The core task of the binocular system is to accurately position the needle. Binocular stereo vision acquires three-dimensional information on the objects based on the principle of parallax. Therefore, parallax is an important factor that affects the resolution of the binocular system. The resolution of a traditional binocular system is mainly affected by the baseline length and the measurement distance without considering the camera's own parameters. However, longer baselines lead to longer minimum measurement distances, which is not conductive to accurate measurements. According to the TCP calibration requirements of the robot with a needle as the end tool, we designed a convergent binocular system. The increase in the angle between the optical axes of the two cameras improves While the system is working, the operator manually jogs the robotic arm to place the puncture needle into the stereo vision measurement space. The robot controller sends the end flange position to a personal computer (PC) in real time by an Ethernet cable. The images are captured by two cameras through a universal serial bus (USB) cable to the PC. The position of the needle tip in the measurement space coordinate system can be calculated by an image processing algorithm running on the PC. All of the algorithms are written in C++ based on two external libraries, Halcon and Eigen.

Binocular System Design and Image Processing
The core task of the binocular system is to accurately position the needle. Binocular stereo vision acquires three-dimensional information on the objects based on the principle of parallax. Therefore, parallax is an important factor that affects the resolution of the binocular system. The resolution of a traditional binocular system is mainly affected by the baseline length and the measurement distance without considering the camera's own parameters. However, longer baselines lead to longer minimum measurement distances, which is not conductive to accurate measurements. According to the TCP calibration requirements of the robot with a needle as the end tool, we designed a convergent binocular system. The increase in the angle between the optical axes of the two cameras improves the resolution and reduces the size of the uncertain area [24].
The essence of vision-based measurement technology is the correspondence between spatially uncertain regions and the vision system's pixels. Figure 2 shows the correspondence between the binocular system's pixels and the spatially uncertain area using a simplified model of a binocular vision system. This model projects the uncertain region onto the horizontal plane assuming that the two cameras are placed at the same height. According to the principle of imaging, the two boundaries of a single pixel correspond to two rays in space, as shown by the green line in the figure, thereby forming a quadrangular uncertain region (green area). Obviously, ω will significantly affect the size of the uncertainty area. We analyzed the size of the uncertain region at different optical axis angles through numerical calculations. We fixed the length of the baseline and calculated x Δ , z Δ and 2 2 x z Δ +Δ of uncertain regions at the angle ω of 0°, 15°, 30°, 45°, 60°and 75°. The contour in Figure 3 shows this result. Overall, as ω increases, x Δ and 2 2 x z Δ +Δ show a trend of decreasing first and then increasing. z Δ decreases as ω increases. (∆x-the size of the uncertain area in X axis, ∆z-the size of the uncertain area in Z axis, ω-the angle between the optical axis of the camera and the Z axis, F-the focal length of the lens, s-the size of a single pixel in the simplified model, B-the length of the baseline of the binocular system).
We analyzed the size of the uncertain region at different optical axis angles through numerical calculations. We fixed the length of the baseline and calculated ∆x, ∆z and √ ∆x 2 + ∆z 2 of uncertain regions at the angle ω of 0 • , 15 • , 30 • , 45 • , 60 • and 75 • . The contour in Figure 3 shows this result. Overall, as ω increases, ∆x and √ ∆x 2 + ∆z 2 show a trend of decreasing first and then increasing. ∆z decreases as ω increases. √ ∆x 2 + ∆z 2 of uncertain region.
Since the calibration process does not use all of the view field, we chose the nearest circular area with a radius of 20 mm as the analysis object and analyzed the mean and variance of ∆x, ∆z and The results are shown in Figure 4. We can see that the mean of ∆x and √ ∆x 2 + ∆z 2 decreases first and then increases as ω increases, and it reaches a minimum when ω is 45 • . The mean of ∆z decreases with an increase in ω. In general, the fluctuation of ∆x is relatively mild. ∆z and √ ∆x 2 + ∆z 2 are drastically reduced when ω goes from 0 • to 30 • . To facilitate a comparison of the mean and variance, we calculated the negative logarithm of all of the variances. The negative logarithm of the variance of ∆x and √ ∆x 2 + ∆z 2 increases first and then decreases as ω increases, and it reaches a maximum when ω is 45 • . The negative logarithm of variance of ∆z increases with increased ω. It can be seen from the variance that the accuracy of the visual system is more stable when ω is 45 • . In summary, when ω is 45 • , the vision system has better performance for the positioning accuracy of internal points in the circular area, theoretically. rithm of the variance of x Δ and 2 2 x z Δ +Δ increases first and then decreases as ω increases, and it reaches a maximum when ω is 45°. The negative logarithm of variance of z Δ increases with increased ω . It can be seen from the variance that the accuracy of the visual system is more stable when ω is 45°. In summary, when ω is 45°, the vision system has better performance for the positioning accuracy of internal points in the circular area, theoretically. Based on the above numerical simulation results and analysis, we designed an orthogonal binocular system, as shown in Figure 5. Such a configuration is not conducive to the matching of feature points because in the most extreme cases the images of the two cameras are completely different. However, this will not affect the algorithm introduced in Section 2.3. The left camera and right camera are fixed on two cross slides. The relative Based on the above numerical simulation results and analysis, we designed an orthogonal binocular system, as shown in Figure 5. Such a configuration is not conducive to the matching of feature points because in the most extreme cases the images of the two cameras are completely different. However, this will not affect the algorithm introduced in Section 2.3. The left camera and right camera are fixed on two cross slides. The relative positions of the two cameras can be controlled by the two cross slides to ensure that both cameras have a clear field of view. Due to the use of a small aperture to increase the depth of the scene, the system adds four light sources to assist the imaging. Two ring lights are fixed in front of the lens for the calibration of the internal and external parameters of the vision system. Two back lights are fixed on the two cameras to enhance the contrast of the image and to accurately extract the needle tip position. The four lights are controlled by the lighting controller. All of the devices are fixed on an optical shock absorption platform.

Positioning Needle
As is well known, the binocular system must be calibrated for internal and external parameters before use. This process has been systematic, and we used HALCON's toolbox and a circular marking calibration plate to calibrate the internal and external parameters of the system. Since our goal is positioning the needle tip rather than three-dimensional reconstruction of an object, we propose a simple algorithm for accurately acquiring position of needle tip and direction of needle axis in our vision system. The images processing is described as follows to get pixel coordinate of the needle: (a) Take gray pictures when no objects are placed in the binocular system and record separately as I L (x, y) and I R (x, y); (b) Control the robot moving the needle tip to different positions within the measurement range of the binocular system and take pictures I i L (x, y) and I i R (x, y) (i = 1, 2, 3 · · · n); (c) Subtract the image that contains the needle tip from the image that corresponds to the initial state of the camera without the needle tip using formula G i L(R) (x, y) = I i L(R) (x, y) − I L (x, y) + 128. The gray value of pixels less than 0 is truncated to 0 and greater than 255 is truncated to 255; (d) Select the pixels from G i L(R) (x, y) whose gray values fulfill the condition 0 ≤ G i L(R) (x, y) ≤ 100 based on the experience of the experimental; (e) The resulting image will contain the needle and partial noise. We calculate the size of all of the connected domains in the image and keep the largest connected domain. Then correct image distortion. Then, using a circular structure with a radius of 5 pixels, we perform a morphological opening operation on the image to smooth the outline of the needle.  positions of the two cameras can be controlled by the two cross slides to ensure that both cameras have a clear field of view. Due to the use of a small aperture to increase the depth of the scene, the system adds four light sources to assist the imaging. Two ring lights are fixed in front of the lens for the calibration of the internal and external parameters of the vision system. Two back lights are fixed on the two cameras to enhance the contrast of the image and to accurately extract the needle tip position. The four lights are controlled by the lighting controller. All of the devices are fixed on an optical shock absorption platform.

Positioning Needle
As is well known, the binocular system must be calibrated for internal and external parameters before use. This process has been systematic, and we used HALCON's toolbox and a circular marking calibration plate to calibrate the internal and external parameters of the system. Since our goal is positioning the needle tip rather than three-dimensional reconstruction of an object, we propose a simple algorithm for accurately acquiring position of needle tip and direction of needle axis in our vision system. The images processing is described as follows to get pixel coordinate of the needle: (c) Subtract the image that contains the needle tip from the image that corresponds to the initial state of the camera without the needle tip using formula The gray value of pixels less than 0 is truncated to 0 and greater than 255 is truncated to 255; (e) The resulting image will contain the needle and partial noise. We calculate the size of all of the connected domains in the image and keep the largest connected domain. Then correct image distortion. Then, using a circular structure with a radius of 5 pixels, we perform a morphological opening operation on the image to smooth the outline of the needle.   The needle imaging on the two cameras is shown in Figure 7. In this article we take the frame of left camera as the world frame. The 3 × 4 matrix P maps needle tip The needle imaging on the two cameras is shown in Figure 7. In this article we take the frame of left camera as the world frame. The 3 × 4 matrix P maps needle tip as a point from 3D space to the 2D image space, x = x y 1 , via perspective projection up to a scale w.
where the subscripts L and R represent the left camera and the right camera, respectively. α x = m x f and α y = m y f represent the focal length f of the camera in terms of pixel dimensions in the x and y direction, respectively. m x and m y is the number of pixels per unit distance in image coordinate. x 0 and y 0 is the principal point in terms of pixel dimensions. Because the left camera is set as the world frame of the vision system, the external parameter of the left camera is [I |0 ], which means there is no rotation and translation. The external parameter of the right camera is [R |t ], where R and t represent rotation matrix and translation vector relative to the left camera.

TCP Calibration Algorithm
TCP calibration is to obtain the actual position and frame of the tool center point using external measurements and fitting algorithms. The essence of this problem is to solve the problem of AX = B, and many researchers have already given solutions [31][32][33]. With regard to a surgical assistant robot, on the one hand, it requires high accuracy of the TCP, and on the other hand, it must reduce the difficulty of the doctors' operations using the robot. As shown in Figure 8, frame {B} is the robot's base frame. Frame {E} is the end Needle tip position in 3D space X = X Y Z 1 calculate by Formula (3) using least square method assuming that the needle tip is not at infinity [25].
where p i is rows of p.
We considered TCPF calibration as the direction calibration problem of straight homogeneous generalized cylinders (SHGC) [26][27][28][29][30]. We used an analytical geometric method that combines the law of SHGC projection imaging to estimate it. The projection of the cylinder on the each image plane will always include two straight lines such as l + L and l − L as shown in Figure 7. They are formed by the intersection of the image plane and the tangent plane of the cylinder which pass through the camera's optical center. We represented these tangent planes by the normal vectors n + L n − L n + R and n − R . The direction of the normal vectors is given by where l can be l + L l − L l + R and l − R given in Hesse normal form on the image plane and n calculated corresponds to n + L n − L n + R and n − R using P L and P R . The axis of the needle must be on the symmetry plane n L and n R with is a corrector factor to ensure that n L(R) is perpendicular instead of parallel to the symmetrical plane. Then the direction of needle axis can be calculated by Formula (6).

TCP Calibration Algorithm
TCP calibration is to obtain the actual position and frame of the tool center point using external measurements and fitting algorithms. The essence of this problem is to solve the problem of AX = B, and many researchers have already given solutions [31][32][33]. With regard to a surgical assistant robot, on the one hand, it requires high accuracy of the TCP, and on the other hand, it must reduce the difficulty of the doctors' operations using the robot. As shown in Figure 8, frame {B} is the robot's base frame. Frame {E} is the end flange frame. Frame {V} is the binocular vision system frame. ( ) In this function, = 0 1 is the homogeneous transformation from {B} to {V}, and it is an unknown constant during the calibration.
is the homogeneous transformation from {B} to {Ei}, and we can obtain it from the robot controller.
is the position vector of the needle tip in frame {E}. We expand Formula (7) to obtain Formula (8).
Obviously, there are two unknown vectors and one unknown matrix in the equation. It is impossible to directly obtain E Needle P .
Moving n + 1 positions while keeping a fixed rotation of the robot's end effector, a series of Equation (8) can be obtained. By calculating the difference between every equations and the first equation, we obtain n equations as in Equation (9) ( ) Next, we use singular value decomposition (SVD) to obtain B V R .
Then we manually control the end flange to move to m + 1 (four or more) points with translation and rotation. We should attempt to make a difference in the posture between each point large enough. The same as above, by calculating the difference between every In this function, Moving n + 1 positions while keeping a fixed rotation of the robot's end effector, a series of Equation (8) can be obtained. By calculating the difference between every equations and the first equation, we obtain n equations as in Equation (9), which contains only one unknown matrix R B V . Because the end flange makes only translational motions and frame {V} remains relatively fixed with frame {B}, R B V and R B Ei · P E are constant.
Next, we use singular value decomposition (SVD) to obtain R B V . Then we manually control the end flange to move to m + 1 (four or more) points with translation and rotation. We should attempt to make a difference in the posture between each point large enough. The same as above, by calculating the difference between every equations and the first equation, we obtain m equations, which contains one unknown vector P E Needle . We also use SVD to find P E Needle .
The direction of needle axis l E Axis in end flange frame always follow Formula (11). We also use SVD decomposition to get l E Axis .
where l E Axis represents the direction of needle axis in end flange frame, l V i represents the direction of needle axis in vision frame (as l Axis in Section 2.3).
In order to facilitate the robot controller to directly control the needle, the homogeneous transformation matrix between the end flange and the needle tip must be calculated. Although some researches have pointed out that the asymmetry of the side-bevel needle will cause the puncture trajectory to be deflected, but this is only limited to the muscle-rich positions such as head and neck surgery [34]. More applications, including the chest, abdomen and prostate, where there are more cavities, the deflection is not obvious, and the use of diamond-tip needles also reduces the deflection. So, without considering the rotation of the needle tip frame with respect to the needle axis, rotation matrix is simplified to the following.
Finally, the homogeneous conversion matrix R E Needle P E Needle 0 1 from the end flange to the tip of the needle is obtained.
In the second step of TCP calibration, the difference between all pose needs to be as large as possible. The reason is that the least squares estimate of Formulas (10) and (11) is related to this difference. In order to facilitate the following analysis, we simplify (10) and (11) to A · X = B. The bound of the estimation of X is as follows [35]: where ε ≡ max means the condition number of A, r = AX−B. Obviously the larger κ 2 (A) and ε, the larger the error X−X 2 . The difference between all poses determine κ 2 (A) and ε. Obviously, the binocular visual system we designed limits this difference and may reduce the calibration accuracy. Therefore, the Section 3.2 designed an experiment to analyze the impact of the reduction on calibration accuracy.

Accuracy Evaluation of Vision System
To test the actual accuracy of the vision system, we build a test system, as shown in Figure 9. A laser tracker (Leica AT901 Laser Tracker) is used to measure the accuracy of the vision system, which accuracy is ±15 µm + 6 µm/m for position. The spherically reflector of the laser tracker is fixed at the end of the robot. The distance between the reflector and the laser tracker is about 2 m. Thus, through the movement of the reflector, we can obtain a precise change in the needle tip position while keeping the posture of the robot end flange fixed. To evaluate the positioning accuracy of the vision system in all directions, we manually controlled the robot to move 15 intervals at 2 mm on the xyz-axis of the robot base frame separately. We did not use the conversion matrix of the vision system frame and the robot base frame to convert the robot's movement on the xyz axis to the xyz axis of the vision system, because the inaccuracy of the conversion matrix will introduce additional errors. This will not affect the final result because the error of the vision system will not change due to the change of the reference frame. The coordinates of the needle tip in the vision system are calculated by the proposed method. However, the coordinates of the needle tip cannot be calculated in the laser tracker frame and robot base frame. The puncture needle, robot end flange and spherically mounted reflector are relatively fixed, and therefore, their movement has a theoretical relationship, as shown in Equation (14).
tions, we manually controlled the robot to move 15 intervals at 2 mm on the xyz-axis of the robot base frame separately. We did not use the conversion matrix of the vision system frame and the robot base frame to convert the robot's movement on the xyz axis to the xyz axis of the vision system, because the inaccuracy of the conversion matrix will introduce additional errors. This will not affect the final result because the error of the vision system will not change due to the change of the reference frame. The coordinates of the needle tip in the vision system are calculated by the proposed method. However, the coordinates of the needle tip cannot be calculated in the laser tracker frame and robot base frame. The puncture needle, robot end flange and spherically mounted reflector are relatively fixed, and therefore, their movement has a theoretical relationship, as shown in Equation (14).
In the above equation,

TCP Calibration Accuracy under Different Configurations
The analysis in Section 2.4 shows that different configurations will change the upper boundary of calibration accuracy. In order to separate the influence of ( ) 2 κ A and ε on the accuracy of calibration, the following experiment is designed.
We considered that ( ) 2 κ A represents the uniformity of the configuration set in spatial and ε represents the amplitude of the configuration set. Based on experience, we designed 5 configurations for TCP calibration as Figure 10 shows to separate the influence of ( ) 2 κ A and ε . The angle between axis of 1, 3, and plane І are both θ . The angle between axis of 2, 4, and plane П are both θ . Plane І and plane П is perpendicular to horizontal plane (plane Ш ). Although all the axis of needle in Figure 10 intersect at one point In the above equation, EndFlange are the Euclidean distance of the needle tip in the vision frame, the Euclidean distance of the reflector in the laser tracker frame and the Euclidean distance of the end flange in the robot base frame, respectively. The laser tracker is used as a standard to evaluate the accuracy of the vision system. The error is defined in Formula (15).

TCP Calibration Accuracy under Different Configurations
The analysis in Section 2.4 shows that different configurations will change the upper boundary of calibration accuracy. In order to separate the influence of κ 2 (A) and ε on the accuracy of calibration, the following experiment is designed.
We considered that κ 2 (A) represents the uniformity of the configuration set in spatial and ε represents the amplitude of the configuration set. Based on experience, we designed 5 configurations for TCP calibration as Figure 10 shows to separate the influence of κ 2 (A) and ε. The angle between axis of 1, 3, and plane I are both θ. The angle between axis of 2, 4, and plane Π are both θ. Plane I and plane Π is perpendicular to horizontal plane (plane III). Although all the axis of needle in Figure 10 intersect at one point only to illustrate the experiment, it is not actually necessary for all the axis to intersect at one point. The experiment was divided into two groups and Table 1 described the details: a.
θ was fixed, and φ was changed. This configuration would change κ 2 (A). b.
φ was fixed, and θ was changed. This configuration would change ε.
A relatively accurate TCP including E real P and E real l were obtained through repeated calibrations assuming that the error between the calibrated TCP and the real TCP obeys zero mean normal distribution. The errors of TCPP ( E Needle P ) and TCPF ( E Axis l ) are evaluated by Formulas (16) and (17), where TCPP and TCPF are the average of 20 serious calibrations using traditional methods.

Comparison of the TCP Calibration with Traditional Methods
The time consumption and accuracy of the calibration are the key criteria for evaluating the practicability. To evaluate the practicability of the new TCP calibration method, a comparative experiment between the traditional method and the proposed method was taken. Using our proposed method, in each experiment, first the operator controls the tool of robot to enter the vision system's view filed and to move two points randomly along each direction of xyz under a fixed pose to calculate B V R . Then, the operator arbitrarily gives the robot five different postures and controls the needle tip to enter the vision system's view field to calculate E Axis l and E Needle P by the method described in Section 2. The five postures should follow the suggestions given in the conclusion. The error is calculated by Formulas (16) and (17). We repeated the above experiment and also used the traditional method to experiment 15 times. We recorded the time used each time separately.
A relatively accurate TCP including P E real and l E real were obtained through repeated calibrations assuming that the error between the calibrated TCP and the real TCP obeys zero mean normal distribution. The errors of TCPP (P E Needle ) and TCPF (l E Axis ) are evaluated by Formulas (16) and (17), where TCPP and TCPF are the average of 20 serious calibrations using traditional methods.

Comparison of the TCP Calibration with Traditional Methods
The time consumption and accuracy of the calibration are the key criteria for evaluating the practicability. To evaluate the practicability of the new TCP calibration method, a comparative experiment between the traditional method and the proposed method was taken. Using our proposed method, in each experiment, first the operator controls the tool of robot to enter the vision system's view filed and to move two points randomly along each direction of xyz under a fixed pose to calculate R B V . Then, the operator arbitrarily gives the robot five different postures and controls the needle tip to enter the vision system's view field to calculate l E Axis and P E Needle by the method described in Section 2. The five postures should follow the suggestions given in the conclusion. The error is calculated by Formulas (16) and (17). We repeated the above experiment and also used the traditional method to experiment 15 times. We recorded the time used each time separately.

Accuracy Evaluation of Vision System
The calibrated internal and external parameters are listed in Table 2. The reprojection error is 0.28 pixels. The calibration results meet the experimental requirements. The accuracy of the vision system is shown in Figure 11. In Figure 11, xyz represents the direction of the robot's base coordinate and the errors are calculated by Formula (15). It can be seen from the results that all of the errors fluctuate in the range ±0.05 mm and the maximum error reach to 0.041 mm, which is lower than the absolute positioning error of a general cooperative robot. The actual accuracy of the vision system is worse than the simulation results, as mentioned in Section 2.2. On the one hand, this finding is due to the inaccuracy of the internal and external parameters, and on the other hand, the reason is that the needle tip obtained by the image processing algorithm in the two cameras is not the identical physical point. However, the error of ±0.05 mm is still lower than the spatial resolution error of the human eye, in the least distance for distinct vision. This finding means that our vision system using the method proposed can accurately measure the spatial movement of the robot TCP, specifically with the puncture needle as the end tool.

Accuracy Evaluation of Vision System
The calibrated internal and external parameters are listed in Table 2. The reprojection error is 0.28 pixels. The calibration results meet the experimental requirements. The accuracy of the vision system is shown in Figure 11. In Figure 11, xyz represents the direction of the robot's base coordinate and the errors are calculated by Formula (15). It can be seen from the results that all of the errors fluctuate in the range ± 0.05 mm and the maximum error reach to 0.041 mm, which is lower than the absolute positioning error of a general cooperative robot. The actual accuracy of the vision system is worse than the simulation results, as mentioned in Section 2.2. On the one hand, this finding is due to the inaccuracy of the internal and external parameters, and on the other hand, the reason is that the needle tip obtained by the image processing algorithm in the two cameras is not the identical physical point. However, the error of ±0.05 mm is still lower than the spatial resolution error of the human eye, in the least distance for distinct vision. This finding means that our vision system using the method proposed can accurately measure the spatial movement of the robot TCP, specifically with the puncture needle as the end tool.

TCP Calibration Accuracy under Different Configurations
The error of needle tip position and needle axis direction is as shown in Figures 12 and 13, which are calculated by Formulas (16) and (17), respectively, when θ was fixed, and φ was changed. The increase in φ causes the condition number to decrease sharply, especially when φ is relatively small. The error of needle tip position has the same trend as condition number, which is consistent with the theoretical analysis of the Section 2. When φ is greater than 30 • , the error is stable at 0.1 mm. This is because the difference operation in the coefficient matrix in Formula (10) causes φ to affect the condition number of the coefficient matrix, which makes it more sensitive to noise and eventually leads to a very large TCPP error when φ is small.

TCP Calibration Accuracy under Different Configurations
The error of needle tip position and needle axis direction is as shown in Figures 12  and 13, which are calculated by Formulas (16) and (17), respectively, when θ was fixed, and φ was changed. The increase in φ causes the condition number to decrease sharply, especially when φ is relatively small. The error of needle tip position has the same trend as condition number, which is consistent with the theoretical analysis of the Section 2.
When φ is greater than 30°, the error is stable at 0.1mm. This is because the difference operation in the coefficient matrix in Formula (10) causes φ to affect the condition number of the coefficient matrix, which makes it more sensitive to noise and eventually leads to a very large TCPP error when φ is small. Figure 12. Error of TCPP with φ . Figure 13 shows that the change of φ is not sensitive to the condition number of the coefficient matrix of the Formula (11). The increase in φ causes the condition number to decrease slowly, because the coefficient matrix of Formula (11) does not involve the difference of the rotation matrix. The needle axis direction error is stable at about 1°, and the maximum can reach 2°. The difference from Formula (10) is that the coefficient matrix of Formula (11) does not involve the difference operation between different poses and its coefficient matrix is all composed of orthonormal matrices, so its condition number does not change significantly, which ultimately leads to the calibration of TCFF not affected by φ influences. ber of the coefficient matrix, which makes it more sensitive to noise and eventually leads to a very large TCPP error when φ is small.  Figure 13 shows that the change of φ is not sensitive to the condition number of the coefficient matrix of the Formula (11). The increase in φ causes the condition number to decrease slowly, because the coefficient matrix of Formula (11) does not involve the difference of the rotation matrix. The needle axis direction error is stable at about 1°, and the maximum can reach 2°. The difference from Formula (10) is that the coefficient matrix of Formula (11) does not involve the difference operation between different poses and its coefficient matrix is all composed of orthonormal matrices, so its condition number does not change significantly, which ultimately leads to the calibration of TCFF not affected by φ influences.  Figure 13 shows that the change of φ is not sensitive to the condition number of the coefficient matrix of the Formula (11). The increase in φ causes the condition number to decrease slowly, because the coefficient matrix of Formula (11) does not involve the difference of the rotation matrix. The needle axis direction error is stable at about 1 • , and the maximum can reach 2 • . The difference from Formula (10) is that the coefficient matrix of Formula (11) does not involve the difference operation between different poses and its coefficient matrix is all composed of orthonormal matrices, so its condition number does not change significantly, which ultimately leads to the calibration of TCFF not affected by φ influences.
The error of TCPP and TCPF are as shown in Figures 14 and 15, which are calculated by Formulas (16) and (17), respectively, when φ was fixed, and θ was changed. Under the control of the experiment, the condition number remains unchanged. But the increase of θ also causes the error of TCPP decreases. It is worth noting that although the increase in θ also leads to a decrease in the error, it does not have a large impact on the error than φ. This is consistent with theoretical expectations as Section 2.4. The increase in θ leads to the increase in A 2 and B 2 in Formula (10), which leads to the decrease in ε, which improves the calibration accuracy. Figure 15 shows that the change of φ is also not sensitive to the condition number of the coefficient matrix of the Formula (11) and the needle axis direction error. Because B is always the unit vector in Formula (11) and its size is fixed, A is always composed of orthonormal matrices and its modulus is also unchanged.
The error of TCPP and TCPF are as shown in Figures 14 and 15, which are calculated by Formulas (16) and (17), respectively, when φ was fixed, and θ was changed. Under the control of the experiment, the condition number remains unchanged. But the increase of θ also causes the error of TCPP decreases. It is worth noting that although the increase in θ also leads to a decrease in the error, it does not have a large impact on the error than φ . This is consistent with theoretical expectations as Section 2.4. The increase in θ leads to the increase in 2 A and 2 B in Formula (10), which leads to the decrease in ε , which improves the calibration accuracy. Figure 15 shows that the change of φ is also not sensitive to the condition number of the coefficient matrix of the Formula (11) and the needle axis direction error. Because B is always the unit vector in Formula (11) and its size is fixed, A is always composed of orthonormal matrices and its modulus is also unchanged.

Comparison of TCP Calibration with Traditional Methods
The time consumption of each experiment is shown in Figure 16. The average calibration time is 482 s and 88 s. The proposed TCP calibration method reduces the time consumption by 82%. The time consumption of the traditional methods varies greatly: the by Formulas (16) and (17), respectively, when φ was fixed, and θ was changed. Under the control of the experiment, the condition number remains unchanged. But the increase of θ also causes the error of TCPP decreases. It is worth noting that although the increase in θ also leads to a decrease in the error, it does not have a large impact on the error than φ . This is consistent with theoretical expectations as Section 2.4. The increase in θ leads to the increase in 2 A and 2 B in Formula (10), which leads to the decrease in ε , which improves the calibration accuracy. Figure 15 shows that the change of φ is also not sensitive to the condition number of the coefficient matrix of the Formula (11) and the needle axis direction error. Because B is always the unit vector in Formula (11) and its size is fixed, A is always composed of orthonormal matrices and its modulus is also unchanged.

Comparison of TCP Calibration with Traditional Methods
The time consumption of each experiment is shown in Figure 16. The average calibration time is 482 s and 88 s. The proposed TCP calibration method reduces the time consumption by 82%. The time consumption of the traditional methods varies greatly: the

Comparison of TCP Calibration with Traditional Methods
The time consumption of each experiment is shown in Figure 16. The average calibration time is 482 s and 88 s. The proposed TCP calibration method reduces the time consumption by 82%. The time consumption of the traditional methods varies greatly: the longest time is over 600 s, and the shortest time is close to 400 s. However, the time consumption of proposed method in this paper fluctuates around the average. On the one hand we found that the most time-consuming process is to control the tip of the needle as it reaches the same position every time using traditional methods. Due to the different operability of the robot in different postures, the time consumption varies greatly in each experiment. However, our proposed method only ensures that the needle tip be within the measurement space of the vision system, which is very friendly for physicians and is timesaving. On the other hand, the second step of the proposed method get the TCP position and TCP frame simultaneously. The proposed method gives an operation-independent workflow that is the key to reducing the time consumption. operability of the robot in different postures, the time consumption varies greatly in each experiment. However, our proposed method only ensures that the needle tip be within the measurement space of the vision system, which is very friendly for physicians and is time-saving. On the other hand, the second step of the proposed method get the TCP position and TCP frame simultaneously. The proposed method gives an operation-independent workflow that is the key to reducing the time consumption. The error of TCPP and TCPF of each experiment are shown in Figures 17 and 18, which are calculated by Formulas (16) and (17), respectively. The average error of TCPP in 15 experiments using the proposed method is 0.11 mm, which is lower than the result of the traditional method of 0.32 mm. The proposed TCP calibration method reduces the error by 65%. It can be clearly seen that the proposed method has less data fluctuation. This finding shows that the proposed method has not only high accuracy but also high stability. Although occasionally the TCFF error is larger than the traditional method, the average accuracy is still improved by 52%. This is because the diameter of the needle is small and the operator's habit leads to the same distance between the needle surface and the reference point every time. Therefore, the traditional method in the needle axis direction calibration is also more likely to achieve higher accuracy. The error of TCPP and TCPF of each experiment are shown in Figures 17 and 18, which are calculated by Formulas (16) and (17), respectively. The average error of TCPP in 15 experiments using the proposed method is 0.11 mm, which is lower than the result of the traditional method of 0.32 mm. The proposed TCP calibration method reduces the error by 65%. It can be clearly seen that the proposed method has less data fluctuation. This finding shows that the proposed method has not only high accuracy but also high stability. Although occasionally the TCFF error is larger than the traditional method, the average accuracy is still improved by 52%. This is because the diameter of the needle is small and the operator's habit leads to the same distance between the needle surface and the reference point every time. Therefore, the traditional method in the needle axis direction calibration is also more likely to achieve higher accuracy.

Conclusions
This paper has presented a novel approach for robot TCP calibration based cial binocular vision system specifically with the puncture needle as the end t pared with existing solutions, it is easier and faster to operate for physicians stable, and its accurate results can ensure the safety of surgery.
In this paper, we designed a binocular vision system as an extended mea device to tackle the issue of TCP calibration due to the low rigidity and small s the puncture needle is used as the end tool of the robot. Through the simulation plified model, the vision system that we designed was proven to have a high resolution than the traditional binocular system and is more suitable for TCP ca In addition, we also proposed a TCP calibration algorithm combined with the visual system and analyzed the key factors affecting accuracy. Experiments h conducted with a system that consists of a robot arm, laser tracker and two cam experiment on the visual system's accuracy evaluation confirmed that the visu and the corresponding method we proposed can detect the spatial position chan TCP (needle tip) with high accuracy. The experiment in different configuration the uniformity of configuration is the main influence factors. Using the binocu system only reduces the magnitude of the configuration and the results indica duction barely influence the accuracy of TCP. In terms of TCPF, configuration influence its accuracy. The comparison experiment confirmed that the propose

Conclusions
This paper has presented a novel approach for robot TCP calibration based on a special binocular vision system specifically with the puncture needle as the end tool. Compared with existing solutions, it is easier and faster to operate for physicians and more stable, and its accurate results can ensure the safety of surgery.
In this paper, we designed a binocular vision system as an extended measurement device to tackle the issue of TCP calibration due to the low rigidity and small size when the puncture needle is used as the end tool of the robot. Through the simulation of a simplified model, the vision system that we designed was proven to have a higher spatial resolution than the traditional binocular system and is more suitable for TCP calibration. In addition, we also proposed a TCP calibration algorithm combined with the designed visual system and analyzed the key factors affecting accuracy. Experiments have been conducted with a system that consists of a robot arm, laser tracker and two cameras. The experiment on the visual system's accuracy evaluation confirmed that the visual system and the corresponding method we proposed can detect the spatial position changes in the TCP (needle tip) with high accuracy. The experiment in different configuration indicates the uniformity of configuration is the main influence factors. Using the binocular vision system only reduces the magnitude of the configuration and the results indicate the reduction barely influence the accuracy of TCP. In terms of TCPF, configuration does not influence its accuracy. The comparison experiment confirmed that the proposed method takes less time and has higher accuracy than the traditional method. A recommended calibration suggestion is to give priority to guarantee φ when the space is limited, try to make it close to 90 • . In theory, θ should be as close to 90 • as possible without collision, but θ should be guaranteed to exceed 30 degrees under limited space.
To sum up, this paper proposed a new TCP calibration method, which is operationindependent and physician-friendly under the premise of ensuring accuracy. It provides a necessary solution for robotic assisted puncture operation to enter the clinic. However, the method not only is suitable for using in the operating room environment but can also can be extended to the production of some electronic products that require precise operations. This method will accelerate the arrangement of production lines and improve product quality, which will promote the automation of robot processing and manufacturing. Future work will focus on TCP calibration for more general end tools.