Pose Determination of the Disc Cutter Holder of Shield Machine Based on Monocular Vision

The visual measurement system plays a vital role in the disc cutter changing robot of the shield machine, and its accuracy directly determines the success rate of the disc cutter grasping. However, the actual industrial environment with strong noise brings a great challenge to the pose measurement methods. The existing methods are difficult to meet the required accuracy of pose measurement based on machine vision under the disc cutter changing conditions. To solve this problem, we propose a monocular visual pose measurement method consisting of the high precision optimal solution to the PnP problem (OPnP) method and the highly robust distance matching (DM) method. First, the OPnP method is used to calculate the rough pose of the shield machine’s cutter holder, and then the DM method is used to measure its pose accurately. Simulation results show that the proposed monocular measurement method has better accuracy and robustness than the several mainstream PnP methods. The experimental results also show that the maximum error of the proposed method is 0.28° in the direction of rotation and 0.32 mm in the direction of translation, which can meet the measurement accuracy requirement of the vision system of the disc cutter changing robot in practical engineering application.


Introduction
A shield tunneling machine [1] is a special construction machine for tunneling, which has been widely used in subway, railway, highway, and other tunnel projects. With the significant improvement of human construction level and the vigorous development of the tunnel industry, intelligent tunneling equipment has become a development trend. The existing shield tunneling machine, which has been widely used in tunnel construction, is semi-automatic and needs both manual operation and automation execution, such as the changing of the worn disc cutter on the cutter head still needs human to do. Furthermore, the disc cutter consumption is so huge during the construction process that the disc cutter needs to be changed frequently. However, the environment for disc cutter changing is generally quite harsh, especially in mud balance shield machines of high humidity and high pressure, making the manual operation mode a significant potential safety hazard. For example, there have been many disc cutter changing accidents at home and abroad. The disc cutter detection and changing cost more than 10% of the construction period of the tunnel, so it is necessary to develop a disc cutter changing robot to realize the automatic operation. The robot's vision system, which is used to obtain the disc cutter pose, should have high measuring accuracy and robustness to help the robot accurately grasp the disc cutter.
The visual measurement method includes measurement based on cooperative target [2,3] and that based on non-cooperative target [4], the former is to locate the object by artificial markers fixed on it, and the latter is generally to locate the object by its features. The cutter holder is established offline. Second, the image coordinates of the feature points on the cutter holder surface can be obtained by the image processing method. We can use these feature points to solve the rough pose of the cutter holder by the OPnP method. Third, we take this initial pose as input and use the distance matching method to solve the pose accurately. Meanwhile, the distance between the collected image of the cutter holder and the template in the established pose template library is calculated. The template corresponding to the minimum distance is selected, and its corresponding pose is used as the final estimated pose of the cutter holder.
The innovations of this paper include: (1) The OPnP+DM method, which consists of the optimal accuracy OPnP method and the highly robust distance matching method, takes advantage of the two methods. (2) The OPnP+DM method extracts the characteristics of the cutter holder without processing the artificial marks, which reduces the labor and improves the stability of visual measurement. (3) The step acceleration method is proposed to speed up the search of the optimal pose in the distance matching method. (4) The proposed OPnP+DM method can achieve a positioning accuracy of 1 mm required by the vision measurement system of the disc cutter changing robot under the condition of strong noise, which cannot be achieved by the PnP methods.
The rest of this paper is organized as follows. Section 2 states the pose estimation method of the cutter holder. In Section 3, the simulation results are used to prove the accuracy and robustness of our method. In Section 4, experiments are implemented to test the feasibility of the practical engineering application of our method. In Section 5, the conclusions are given.

Proposed Method
The flow diagram of the pose estimation method based on monocular vision proposed in this paper is shown in Figure 1. We first calibrate the monocular system to obtain the internal parameter matrix of the camera, which is used to establish the pose template library offline. Then, we use the calibrated camera to collect the cutter holder images. The images are preprocessed, and the image processing method is further designed to extract the required image features. According to the extracted features, the initial pose estimation method is used to obtain the initial pose of the cutter holder. We take the initial pose as input and find it in the existing pose template library. With the initial pose as the center, some templates are selected from the pose template library by setting a step size and a large enough search range. By substituting the image coordinates of the template into the DT image, the distances between templates and the actual cutter holder are obtained one by one, and the template corresponding to the minimum distance is screened out. Further, we can change the step length until the estimated pose of the cutter holder meets the actual measurement accuracy requirements. Image processing, initial pose estimation, and accurate pose solution in the proposed method are detailed as follows.

Image Processing
It is necessary to extract the salient features of the cutter holder to estimate its pose accurately. Linear features and point features are the most commonly used geometric information in robot visual positioning. The real object of the new-type cutter holder, which needs to be measured in this paper, is shown in Figure 2, and its machining accuracy is 0.2 mm. The marked blue contour on its surface marked in Figure 2 is its inside contour feature, and there are 20 feature corner points on the inside contour of the cutter holder surface. It is difficult to extract these feature points directly because of the wear and corrosion on the surface of the cutter holder caused by the extended time working of shield tunneling. In addition, other structures on the cutter holder surface, such as fastening bolts and mounting holes, will also interfere with the extraction of feature points. Therefore, we

Image Processing
It is necessary to extract the salient features of the cutter holder to estimate its pose accurately. Linear features and point features are the most commonly used geometric information in robot visual positioning. The real object of the new-type cutter holder, which needs to be measured in this paper, is shown in Figure 2, and its machining accuracy is 0.2 mm. The marked blue contour on its surface marked in Figure 2 is its inside contour feature, and there are 20 feature corner points on the inside contour of the cutter holder surface. It is difficult to extract these feature points directly because of the wear and corrosion on the surface of the cutter holder caused by the extended time working of shield tunneling. In addition, other structures on the cutter holder surface, such as fastening bolts and mounting holes, will also interfere with the extraction of feature points. Therefore, we can first extract the complete inside contour of the cutter holder and then further obtain the feature points on it.

Image Processing
It is necessary to extract the salient features of the cutter holder to estimate its pose accurately. Linear features and point features are the most commonly used geometric information in robot visual positioning. The real object of the new-type cutter holder, which needs to be measured in this paper, is shown in Figure 2, and its machining accuracy is 0.2 mm. The marked blue contour on its surface marked in Figure 2 is its inside contour feature, and there are 20 feature corner points on the inside contour of the cutter holder surface. It is difficult to extract these feature points directly because of the wear and corrosion on the surface of the cutter holder caused by the extended time working of shield tunneling. In addition, other structures on the cutter holder surface, such as fastening bolts and mounting holes, will also interfere with the extraction of feature points. Therefore, we can first extract the complete inside contour of the cutter holder and then further obtain the feature points on it. The whole image processing process of the feature points detection can be divided into preprocessing block and feature points extraction block. The input of the preprocessing block is the collected cutter holder image by the vision system, and the output is the binary image containing the region of interest of the cutter holder. In the preprocessing The whole image processing process of the feature points detection can be divided into preprocessing block and feature points extraction block. The input of the preprocessing block is the collected cutter holder image by the vision system, and the output is the binary image containing the region of interest of the cutter holder. In the preprocessing block, the median filtering method is used to filter the collected cutter holder image. Then, the correlation template matching method [33] is used to obtain the region of interest (ROI) containing the inside contour of the cutter holder by using the template image stored in advance. Correlation template matching is also a method based on gray features, which uses a normalized cross-correlation matching method based on row vectors. It is much faster and adapts to linear lighting changes better than the gray template matching method. In the method, only the ROI of the images are processed, which significantly improves the image processing efficiency. There is a gray difference between the cutter and its holder, so we can use the global threshold segmentation method to obtain the binarized image of the ROI. The input of the feature points extraction block is the binary image obtained by the preprocessing block, and its output is the image coordinates of the 20 feature points on the inside contour. In the feature points extraction block, the subpixel closed contour curves of the binary image are extracted, their length is sorted, and the longest inside contour of the cutter holder is extracted. We divided the inside contour into predefined shapes, such as line segments, arcs, ellipses, and other parts. Collinear processing and line fitting are carried out on them successively, and finally, 20 feature lines are obtained on the surface of the cutter holder. The intersection points of adjacent feature lines are solved to obtain the image coordinates of the 20 feature corner points, which are used to solve the cutter holder pose.

Initial Pose Estimation
We adopt the OPnP method with better accuracy and robustness among the presented PnP methods as the initial pose estimation method. The OPnP method is an efficient pose solution method considering Gaussian noise. It parameterizes the rotation matrix using non-unit quaternion, which contributes to getting a system of polynomial equations constituted of the globally optimized objective function. Finally, the Gröner basis [34] is used to solve the polynomial equations and obtain the final pose.
Given n 3D reference points q i = [x i y i z i ] T , i = 1, 2, . . . , n, and their corresponding image point p i = [u i v i 1] T . The PnP problem aims to obtain the object pose, which contains the rotation matrix R and the translation vector t. The perspective imaging equation reads where λ i denotes the depth factor of the i-th point. Vectors, scalars, and matrices are denoted by using bold lowercase letters, plain lowercase letters, and capital letters, respectively. Set s = a 2 + b 2 + c 2 + d 2 , and R in OPnP method is represented by quaternion as follows where a, b, c, d are unknown parameters. For any nonzero value k, R (a, b, c, d) = R (ka, kb, kc, kd). We can use the reciprocal of the average depth s = to fix the value of k.
Multiply both sides of Equation (1) by 1 λ to get the following equation: From Equation (3) we know that It is known that By summing both sides of Equation (5) and then plugging the result into Equation (6), we havet where q represents the centroid of the 3D points. Then, we (3) and obtain the following equation The above results are calculated in the ideal state, but we should consider the effect of actual noise. We can take the following minimum sum of the squared error as our cost function The accuracy of this minimum is very close to the minimal reprojection error. Before solving Equation (9), we can easily get that in which [u, v] T is the centroid of the image points in the normalized image coordinate system. Set α = [1, a 2 , ab, ac, ad, b 2 , bc, bd, c 2 , cd, d 2 ] T , according to Equations (9) and (10), we can rewrite the cost function into the following form where M is a 2n × 11 matrix, and it does not contain any trigonometric function nor constraint. For Equation (11), take partial derivatives of a, b, c, and d respectively, we have which compose four three-degree polynomials with respect to a, b, c, d.
The Gröbner basis method is used to solve the Equation (12), and the polynomial system has at most 81 solutions. We can get at most 40 effective solutions excluding zero and symmetric solutions. The OPnP method is quite accurate even with a few point correspondences and its computational time keeps almost unchanged as the point number increases [21].

The Distance Matching Method
After estimating the initial pose of the cutter holder, we use the distance matching (DM) method to obtain its accurate pose further. The essence of the DM method is a template matching method based on distance. Many scholars have studied object recognition [26] and pose estimation [31] based on the DM method. However, they all extracted contour features of the object when using this method. In order to simplify the calculation, we only extract a limited number of feature points when using the DM method to estimate the cutter holder pose. Moreover, the DM method relies on the initial pose obtained by the above OPnP method. The DM method is illustrated in Figure 3. First, the pose template library of the cutter holder is established, and then distances between the collected cutter holder image and the templates in the library are solved. Finally, the template corresponding to the minimum distance is screened out, and its pose is taken as the final estimated pose of the actual cutter holder.
After estimating the initial pose of the cutter holder, we use the distance matching (DM) method to obtain its accurate pose further. The essence of the DM method is a template matching method based on distance. Many scholars have studied object recognition [26] and pose estimation [31] based on the DM method. However, they all extracted contour features of the object when using this method. In order to simplify the calculation, we only extract a limited number of feature points when using the DM method to estimate the cutter holder pose. Moreover, the DM method relies on the initial pose obtained by the above OPnP method. The DM method is illustrated in Figure 3. First, the pose template library of the cutter holder is established, and then distances between the collected cutter holder image and the templates in the library are solved. Finally, the template corresponding to the minimum distance is screened out, and its pose is taken as the final estimated pose of the actual cutter holder. The first step of the DM method is to build the pose template library offline. We place the origin of the workpiece coordinate system in the center of the cutter holder surface. The Z-axis of the coordinate system is perpendicular to the cutter holder surface, and the X-axes and Y-axes are respectively parallel to the long and short edges of the outer rectangular contour of the cutter holder. Assuming that the workpiece coordinate system coincides with the world coordinate system, the world coordinate system changes with the workpiece. Therefore, the relative pose of the world coordinate system and the camera coordinate system is the required cutter holder pose. The monocular measurement system is fixed on the end-effector of the disc cutter changing robot and moves with the robot in a limited space. We change the pose of the cutter holder in the space with the step size of 0.1° in the rotation direction and 0.1 mm in the translation direction. In each pose state, The first step of the DM method is to build the pose template library offline. We place the origin of the workpiece coordinate system in the center of the cutter holder surface. The Z-axis of the coordinate system is perpendicular to the cutter holder surface, and the X-axes and Y-axes are respectively parallel to the long and short edges of the outer rectangular contour of the cutter holder. Assuming that the workpiece coordinate system coincides with the world coordinate system, the world coordinate system changes with the workpiece. Therefore, the relative pose of the world coordinate system and the camera coordinate system is the required cutter holder pose. The monocular measurement system is fixed on the end-effector of the disc cutter changing robot and moves with the robot in a limited space. We change the pose of the cutter holder in the space with the step size of 0.1 • in the rotation direction and 0.1 mm in the translation direction. In each pose state, according to the 3D model of the cutter holder and the camera projection model, the corresponding image coordinates of the selected 20 feature points on the surface of the cutter holder can be obtained. Each template in the library is represented by the image coordinates of the 20 feature points, corresponding to a pose of the cutter holder in the camera coordinate system. These templates constitute the pose template library of the cutter holder, which significantly reduces the storage space compared with the direct storage of the whole image, even though its number is enormous. Although establishing a pose template library takes a long time, it is offline and does not occupy real-time pose estimation.
The operation converting a binary image to an approximate distance image is called a distance transformation (DT), which can produce a grayscale image. The grayscale value of each pixel is the distance between the pixel and the nearest background pixel. The Euclidean DT image is obtained by distance transformation of the binary image containing only 20 feature points of the cutter holder, as shown in 20 distance values d i can be obtained, and solve their root mean square value as the distance between the cutter holder and the template, which can be expressed by Equation (13), where N is the number of feature points and the value is 20. The template corresponding to the minimum distance in the pose template library is obtained, and its corresponding pose is taken as the estimated pose of the actual cutter holder.
plate library takes a long time, it is offline and does not occupy real-time pose estimation. The operation converting a binary image to an approximate distance image is called a distance transformation (DT), which can produce a grayscale image. The grayscale value of each pixel is the distance between the pixel and the nearest background pixel. The Euclidean DT image is obtained by distance transformation of the binary image containing only 20 feature points of the cutter holder, as shown in Figure 4. At this point, background pixels are the 20 feature points on the binary image. By substituting the image coordinates of 20 feature points of any template in the pose template library into the distance image, 20 distance values di can be obtained, and solve their root mean square value as the distance between the cutter holder and the template, which can be expressed by Equation (13), where N is the number of feature points and the value is 20. The template corresponding to the minimum distance in the pose template library is obtained, and its corresponding pose is taken as the estimated pose of the actual cutter holder.

The
Step-Accelerating Method To speed up the efficiency of the DM method, we design a step-accelerating method. The structural block diagram of the step acceleration process is shown in Figure 5.
First, we set the pose variable as p = (α, γ, β, x, y, z), step size variable of each degree of freedom as Δk. The initial value of variable p is P0 = (α0, γ0, β0, x0, y0, z0), and the initial value of Δk is k0. In the following experiments, we set the value of k0 in the DM method as 3.2 according to the initial pose accuracy.

The Step-Accelerating Method
To speed up the efficiency of the DM method, we design a step-accelerating method. The structural block diagram of the step acceleration process is shown in Figure 5.
First, we set the pose variable as p = (α, γ, β, x, y, z), step size variable of each degree of freedom as ∆k. The initial value of variable p is P 0 = (α 0 , γ 0 , β 0 , x 0 , y 0 , z 0 ), and the initial value of ∆k is k 0 . In the following experiments, we set the value of k 0 in the DM method as 3.2 according to the initial pose accuracy. Moreover, the six degrees of freedom range are [α − 2∆k, α + 2∆k], [γ − 2∆k, γ + 2∆k], [β − 2∆k, β + 2∆k], [x − 2∆k, x + 2∆k], [y − 2∆k, y + 2∆k], [z − 2∆k, z + 2∆k] respectively. Second, by substituting initial values P 0 and k 0 , the pose P 1 = (α 1 , γ 1 , β 1 , x 1 , y 1 , z 1 ) corresponding to the minimum distance is obtained by the DM method. The range is further changed to [α 1 − 2k 0 , α 1 . Third, we can repeat the second step process until the minimum distance is reduced to a constant value D min , and the pose P i = (α i , γ i , β i , x i , y i , z i ) is obtained. However, if the obtained minimum distance D min < 2 pixels, we can use P i as the estimated value Pout of the cutter holder. If D min > 2 pixels, we can change ∆k to ∆k/2, then take it and P i as the initial values. Finally, all the above processes are repeated until ∆k is equal to 0.1 mm. Finally, we can obtain the pose result P out .
The step-accelerating method can replace the "violent search" mode in a specific range and greatly improve the pose solving rate.
To verify the accuracy and robustness of the proposed OPnP + DM method in a strong noise environment, we compare it with the most advanced PnP methods through analysis of simulation results. Moreover, we also carried out experimental tests on the motion platform built in the laboratory to verify the proposed method's feasibility. step process until the minimum distance is reduced to a constant value Dmin, and the pose Pi = (αi, γi, βi, xi, yi, zi) is obtained. However, if the obtained minimum distance Dmin < 2 pixels, we can use Pi as the estimated value Pout of the cutter holder. If Dmin > 2 pixels, we can change Δk to Δk/2, then take it and Pi as the initial values. Finally, all the above processes are repeated until Δk is equal to 0.1 mm. Finally, we can obtain the pose result Pout.
The step-accelerating method can replace the "violent search" mode in a specific range and greatly improve the pose solving rate. To verify the accuracy and robustness of the proposed OPnP + DM method in a strong noise environment, we compare it with the most advanced PnP methods through analysis of simulation results. Moreover, we also carried out experimental tests on the motion platform built in the laboratory to verify the proposed method's feasibility.

Simulation Results
Due to the harsh industrial environment of high humidity and high pressure, the cutter holder image collected contains intense noise. To meet the requirement of positioning accuracy of 1 mm for the cutter holder pose measurement, this paper focuses on the influence of noise intensity on the method under the fixed number of feature points.
In the simulation experiment, a virtual perspective camera with a resolution of 4112 × 3008 pixels is synthesized, and its focal length and pixel size are 8.5 mm and 3.45 μm, respectively. The movement range of the cutter holder in the X and Y directions is [−90, 90] mm, the movement range in the depth direction is [740, 760] mm, and the rotation range in the three degrees of freedom directions is [−60, 60] degrees. A cutter holder pose

Simulation Results
Due to the harsh industrial environment of high humidity and high pressure, the cutter holder image collected contains intense noise. To meet the requirement of positioning accuracy of 1 mm for the cutter holder pose measurement, this paper focuses on the influence of noise intensity on the method under the fixed number of feature points.
In the simulation experiment, a virtual perspective camera with a resolution of 4112 × 3008 pixels is synthesized, and its focal length and pixel size are 8.5 mm and 3.45 µm, respectively. The movement range of the cutter holder in the X and Y directions is [−90, 90] mm, the movement range in the depth direction is [740, 760] mm, and the rotation range in the three degrees of freedom directions is [−60, 60] degrees. A cutter holder pose p is randomly generated in this space range, and we can obtain the image coordinates corresponding to 20 feature points on the cutter holder surface under this pose state by the camera projection model. After that, different levels of Gaussian noise are added to the image feature points, and 500 test data sets are generated for each noise level. Then the cutter holder pose p estimation of each test is calculated using PnP methods or the OPnP + DM method. The error between p estimation and the truth value p is calculated finally. We can solve the standard deviation of the 500 error values obtained, which is used to represent the solution accuracy of the methods. The variance of interference noise is successively increased from 0.5 to 10 pixels (the step is 0.5 pixels), and the solving accuracy of each degree of freedom direction of the monocular measurement methods is shown in Figure 6. the cutter holder pose pestimation of each test is calculated using PnP methods or the OPnP + DM method. The error between pestimation and the truth value p is calculated finally. We can solve the standard deviation of the 500 error values obtained, which is used to represent the solution accuracy of the methods. The variance of interference noise is successively increased from 0.5 to 10 pixels (the step is 0.5 pixels), and the solving accuracy of each degree of freedom direction of the monocular measurement methods is shown in Figure  6. The RPnP method has the worst performance among these PnP methods. In most degrees of freedom directions, its accuracy decreases fastest with increased noise intensity. Compared to the other PnP methods, one significant advantage of the RPnP method is that it has higher solution accuracy in the Z-axis rotation direction. Among the remain-  The RPnP method has the worst performance among these PnP methods. In most degrees of freedom directions, its accuracy decreases fastest with increased noise intensity. Compared to the other PnP methods, one significant advantage of the RPnP method is that it has higher solution accuracy in the Z-axis rotation direction. Among the remaining PnP methods, the OPnP method has the best performance in all the directions. Its accuracy is always the highest one among all PnP methods except in the Z-axis rotation direction. However, it can be seen from Figure 6 that the accuracy of the OPnP + DM method is higher than that of PnP methods, especially in the depth direction. In addition, with the increase of noise intensity, the solution accuracy of all PnP methods decreases, and the relationship between them is approximately linear. As shown in Figure 6f, in the Z-axis direction, the RPnP method can guarantee 1 mm measurement accuracy only when the variance of interference noise is less than 4 pixels. Among the PnP methods, the OPnP and ASPnP methods can also reach the same accuracy on the premise that the variance of interference noise is less than 7 pixels. However, the OPnP + DM method can guarantee an accuracy of 0.5 mm even if the noise variance is 10 pixels. In a word, its measurement accuracy in the depth direction under strong noise is far better than that of the PnP method. According to the results in Figure 6, the OPnP + DM method has better robustness because its accuracy changes less than the PnP methods when the noise increases. It also has high solving accuracy under strong noise, which makes it more suitable for the disc cutter changing operation site with strong interference. The DM method relies on the initial pose provided by the OPnP method, it is only suitable for a small search range if the initial pose is given randomly. We set the search range of the cutter holder pose in the rotation direction and the movement direction to be [−0.5, 0.5] degrees, [−5, 5] mm, respectively. The average times required by the DM method and OPnP + DM method to search the cutter holder pose is 3.24 s and 19.32 s, respectively. Thus, it can be concluded that the solving speed of the OpnP + DM method is 5.96 times that of the DM method.

Experiments and Results
We set up a motion platform in the laboratory to verify that the OpnP+DM method has higher measurement accuracy than the PnP methods under complex conditions and can meet the positioning accuracy of 1 mm required by the visual system on the disc cutter changing robot in the moving directions. The input of the experiment is the cutter holder images collected by the vision system, and the output is the actual pose of the cutter holder measured by the pose estimation methods. We calculate the pose of the cutter holder through the pose estimation methods of the visual system and compare it with the pose recorded by the motion platform.
The four-axis motion platform used in the experiments is shown in Figure 7. The platform is equipped with high-precision grating rulers in the X-axis, Y-axis, and Z-axis directions, which enables the platform to achieve a movement accuracy of 0.01 mm in these three directions. Moreover, a DD motor with rotation accuracy of 0.02 • is installed in the rotation direction of Z-axis of the platform. The monocular vision system of the platform uses the Allied Vision's Manta G-1236 camera, which has the same resolution, pixel size, and focal length as the virtual camera in the above simulation experiment. Before the measurement, we first use Zhang Zhengyou's [35] calibration method to calibrate the monocular camera, in which a 7 × 7 circular calibration board with a machining accuracy of 0.01 mm is used. After calibration, we can get the internal parameters of the camera: the focal length obtained is 8.56 mm, pixel size obtained is (3.45, 3.45) µm, and the principal point coordinate obtained is (2190.03, 1427.46) pixels.
We should first establish the pose template library of the cutter holder according to the internal parameters of the camera. Within the motion range of the cutter holder described in the simulation experiment, the step length of displacement direction is set as 0.1 mm, and the step length of rotation direction is set as 0.1 • to change the pose of the cutter holder. By substituting the internal parameters of the calibrated camera into the projection model, the 20 image coordinates corresponding to the 20 feature points of the cutter holder in each pose state in the moving space can be obtained. The image coordinates of all feature points under each pose are stored, so the pose template library of the cutter holder is constructed, which means each template in the template library contains only the image coordinates of 20 feature points.
The four-axis motion platform used in the experiments is shown in Figure 7. The platform is equipped with high-precision grating rulers in the X-axis, Y-axis, and Z-axis directions, which enables the platform to achieve a movement accuracy of 0.01 mm in these three directions. Moreover, a DD motor with rotation accuracy of 0.02° is installed in the rotation direction of Z-axis of the platform. The monocular vision system of the platform uses the Allied Vision's Manta G-1236 camera, which has the same resolution, pixel size, and focal length as the virtual camera in the above simulation experiment. Before the measurement, we first use Zhang Zhengyou's [35] calibration method to calibrate the monocular camera, in which a 7 × 7 circular calibration board with a machining accuracy of 0.01 mm is used. After calibration, we can get the internal parameters of the camera: the focal length obtained is 8.56 mm, pixel size obtained is (3.45, 3.45) μm, and the principal point coordinate obtained is (2190.03, 1427.46) pixels. We should first establish the pose template library of the cutter holder according to the internal parameters of the camera. Within the motion range of the cutter holder described in the simulation experiment, the step length of displacement direction is set as 0.1 mm, and the step length of rotation direction is set as 0.1° to change the pose of the cutter holder. By substituting the internal parameters of the calibrated camera into the projection model, the 20 image coordinates corresponding to the 20 feature points of the cutter holder in each pose state in the moving space can be obtained. The image coordinates of all feature points under each pose are stored, so the pose template library of the cutter holder is constructed, which means each template in the template library contains only the image coordinates of 20 feature points. After setting up the pose template library, the vision system collects the actual image of the cutter holder and processes it with the image processing method mentioned above, and the results of image processing are shown in Figure 8. The preprocessing block includes denoising, template matching, and binarization. For median filtering, the field shape is square and the convolution kernel size is 3. The feature points extraction block contains edge extraction, inside contour selection, contour segmentation, feature line segments screening, collinear processing, and intersection calculation. In the feature line segments screening, we set a length threshold of 130 pixels according to the image size of the bolt and other interference structures, and only the part with a length greater than it will be screened out. Finally, the obtained 20 feature points are shown in a small graph at the lower left of Figure 8, represented by red crosses.
There will be a piece of washing equipment at the construction site to wash the disc cutter that needs to be replaced and its holder. However, the cutter holder cannot be completely cleaned, and there will always be residual silt to block the feature that needs to be detected. In order to simulate the state that the silt covers the cutter holder, we use soil to block the inside contour of the cutter holder randomly in the measurement experiments. We randomly select one or more straight-line segments on the inside contour of the cutter holder for occlusion in the experiments. Figure 9 shows some screenshots of the occlusion of the straight-line segments, showing the state of occlusion of the inside contour in the experiments. We block the whole straight-line segment when adding soil to ensure that the OPnP+DM method still has good measurement accuracy under such extreme conditions. contains edge extraction, inside contour selection, contour segmentation, feature line segments screening, collinear processing, and intersection calculation. In the feature line segments screening, we set a length threshold of 130 pixels according to the image size of the bolt and other interference structures, and only the part with a length greater than it will be screened out. Finally, the obtained 20 feature points are shown in a small graph at the lower left of Figure 8, represented by red crosses.  block the inside contour of the cutter holder randomly in the measurement experiments. We randomly select one or more straight-line segments on the inside contour of the cutter holder for occlusion in the experiments. Figure 9 shows some screenshots of the occlusion of the straight-line segments, showing the state of occlusion of the inside contour in the experiments. We block the whole straight-line segment when adding soil to ensure that the OPnP+DM method still has good measurement accuracy under such extreme conditions. The contaminated cutter holder images are processed by the above image processing method. We can obtain the DT image of the binary image containing only 20 feature points, similar to Figure 4. The OPnP method is used to calculate the initial pose of the cutter holder, which along with the initial rotation step value of 3.2° and the initial translation step value of 3.2 mm are the inputs of the DM method. We can obtain the template with the smallest distance from the actual cutter holder in the pose template library by the DM method. The step acceleration method is used in the search process at the same time. The obtained template pose is taken as the final pose of the actual cutter holder. In the experiment, 100 cutter holder images were collected. The error in the directions of various degrees of freedom can be obtained by comparing the calculated cutter holder pose with the actual pose recorded by the platform.
The PnP methods are also used to solve the pose of the cutter holder in the experiments. We calculated the standard deviation of errors in the direction of 6 degrees of freedom for 100 groups of poses respectively, and the results are shown in Figure 10. The rotation and translation errors of the cutter holder pose obtained by the OPnP + DM method in X, Y, and Z axes are 0.13°, 0.28°, 0.09°, 0.28 mm, 0.30 mm, and 0.32 mm, respectively. Similar to the simulation results, the RPnP method has the worst accuracy among several PnP methods, especially in the depth direction, with an error of 2.57 mm. The errors of other PnP methods in the depth direction are also more than 1 mm, which cannot meet the requirements of practical visual measurement accuracy. In the X-axis rotation, X-axis translation, and Z-axis rotation directions, the OPnP + DM method has the highest solving accuracy compared with the PnP methods. Besides this, its accuracy in the Y-axis rotation direction and Y-axis translation direction are not much different from that of other PnP methods except the RPnP method with poor accuracy. The experimental results show that all the pose estimation methods' rotation accuracy and translation accuracy are similar in both X-axis and Y-axis directions, and the rotation accuracy of the Z-axis direction is the highest one, which can reach 0.12°. Among the translational degrees of freedom, The contaminated cutter holder images are processed by the above image processing method. We can obtain the DT image of the binary image containing only 20 feature points, similar to Figure 4. The OPnP method is used to calculate the initial pose of the cutter holder, which along with the initial rotation step value of 3.2 • and the initial translation step value of 3.2 mm are the inputs of the DM method. We can obtain the template with the smallest distance from the actual cutter holder in the pose template library by the DM method. The step acceleration method is used in the search process at the same time. The obtained template pose is taken as the final pose of the actual cutter holder. In the experiment, 100 cutter holder images were collected. The error in the directions of various degrees of freedom can be obtained by comparing the calculated cutter holder pose with the actual pose recorded by the platform.
The PnP methods are also used to solve the pose of the cutter holder in the experiments. We calculated the standard deviation of errors in the direction of 6 degrees of freedom for 100 groups of poses respectively, and the results are shown in Figure 10. The rotation and translation errors of the cutter holder pose obtained by the OPnP + DM method in X, Y, and Z axes are 0.13 • , 0.28 • , 0.09 • , 0.28 mm, 0.30 mm, and 0.32 mm, respectively. Similar to the simulation results, the RPnP method has the worst accuracy among several PnP methods, especially in the depth direction, with an error of 2.57 mm. The errors of other PnP methods in the depth direction are also more than 1 mm, which cannot meet the requirements of practical visual measurement accuracy. In the X-axis rotation, X-axis translation, and Z-axis rotation directions, the OPnP + DM method has the highest solving accuracy compared with the PnP methods. Besides this, its accuracy in the Y-axis rotation direction and Y-axis translation direction are not much different from that of other PnP methods except the RPnP method with poor accuracy. The experimental results show that all the pose estimation methods' rotation accuracy and translation accuracy are similar in both X-axis and Y-axis directions, and the rotation accuracy of the Z-axis direction is the highest one, which can reach 0.12 • . Among the translational degrees of freedom, the translation accuracy in the Z-axis direction is the lowest one, reaching 2.57 mm, far exceeding the accuracy of 1 mm required for engineering applications. The experimental results are the same as the simulation results when the variance of Gaussian noise is greater than 8 pixels. In a word, the OPnP + DM method presented in this paper has the highest accuracy, especially in the depth direction. It also has good robustness under strong interference because it can still achieve high precision and meet the actual accuracy requirement of 1 mm when the noise suddenly increases. the translation accuracy in the Z-axis direction is the lowest one, reaching 2.57 mm, far exceeding the accuracy of 1 mm required for engineering applications. The experimental results are the same as the simulation results when the variance of Gaussian noise is greater than 8 pixels. In a word, the OPnP + DM method presented in this paper has the highest accuracy, especially in the depth direction. It also has good robustness under strong interference because it can still achieve high precision and meet the actual accuracy requirement of 1 mm when the noise suddenly increases.

Conclusions
This paper presents a method to solve the pose of the cutter holder on the shield machine based on its surface feature points. The pose template library of the cutter holder is established offline in the method, which improves the detection efficiency. The OPnP method with high accuracy among PnP methods is selected to estimate the initial pose of the cutter holder. Then, the highly robust DM method is used for an accurate pose solution. At the same time, we propose a step-size acceleration strategy to speed up the screening of the minimum distance. Finally, the template pose corresponding to the minimum distance is taken as the final estimated pose of the cutter holder. The simulation results show that the OPnP + DM method proposed in this paper has higher solution accuracy and robustness than several mainstream PnP methods. Especially in the depth direction, the accuracy of the proposed method is much higher than other methods. When the interference noise is strong, only the OPnP + DM method can meet the positioning requirement of measurement accuracy in the depth direction of the visual system. Furthermore, many experiments are also carried out on a built four-axis motion platform; the maximum error of the OPnP + DM method is 0.28° in the direction of rotation and 0.32 mm in the direction of translation, which proves that the OPnP + DM method can obtain the precise pose of the cutter holder under strong interference. The measurement accuracy of the OPnP + DM

Conclusions
This paper presents a method to solve the pose of the cutter holder on the shield machine based on its surface feature points. The pose template library of the cutter holder is established offline in the method, which improves the detection efficiency. The OPnP method with high accuracy among PnP methods is selected to estimate the initial pose of the cutter holder. Then, the highly robust DM method is used for an accurate pose solution. At the same time, we propose a step-size acceleration strategy to speed up the screening of the minimum distance. Finally, the template pose corresponding to the minimum distance is taken as the final estimated pose of the cutter holder. The simulation results show that the OPnP + DM method proposed in this paper has higher solution accuracy and robustness than several mainstream PnP methods. Especially in the depth direction, the accuracy of the proposed method is much higher than other methods. When the interference noise is strong, only the OPnP + DM method can meet the positioning requirement of measurement accuracy in the depth direction of the visual system. Furthermore, many experiments are also carried out on a built four-axis motion platform; the maximum error of the OPnP + DM method is 0.28 • in the direction of rotation and 0.32 mm in the direction of translation, which proves that the OPnP + DM method can obtain the precise pose of the cutter holder under strong interference. The measurement accuracy of the OPnP + DM method is lower than that of PnP methods in some degrees of freedom directions when the interference noise is weak. Moreover, the solving speed of the OPnP + DM is slower than the PnP methods, so we will optimize the method to improve its performance in future work.
Funding: This work was funded by the National Key Research and Development Plan of China, grant number 2018YFB1306700.

Conflicts of Interest:
The authors declare no conflict of interest.