Cutting Plane Based Cylinder Fitting Method With Incomplete Point Cloud Data for Digital Fringe Projection

Benefiting from the characteristics of full field scanning, high resolution and high precision, digital fringe projection measurement technology has been widely used in three-dimensional measurement. For the cylinder pose detection, due to the influence of occlusion and noise, the obtained three-dimensional point cloud information is usually incomplete, resulting in the unreliable object parameters after point cloud fitting. In view of the above problems, a cylinder fitting method with incomplete point cloud data based on the cutting plane is proposed. Firstly, the point cloud is processed by bilateral filtering method to reduce the influence of outliers and noise points. Then, according to the principle of forming ellipse on cylinder cutting plane, some equidistant cutting planes are selected. At the same time, in order to reduce the influence of outliers on fitting, the random sampling consistency algorithm is used for ellipse fitting with the points on each cutting plane, that is, the ellipse parameters corresponding to each cutting plane can be obtained. Finally, random sampling consistency algorithm is applied for cylinder axis fitting with the ellipse centers of all the cutting planes, calculating the axis vector of the cylinder. Thus, the parameters of the cylinder detected are obtained. The experimental results of stepped cylinder with diffuse reflection and metal cylinder show the effectiveness and high precision of the proposed method.


I. INTRODUCTION
The three-dimensional measurement technology based on digital fringe projection (DFP) [1]- [4] has the characteristics of non-contact, flexible generation of fringe, high measurement accuracy, high cloud density, high measurement efficiency, etc., which has been widely applied in the field of object shape measurement [5], [6], reverse engineering [7], [8], face recognition [9], food detection [10], entertainment [11], etc. The fringe projection measurement system is mainly composed of computer, camera and projection system. The basic principle is [1]- [4]: the fringe patterns with controllable intensity and shape are projected onto the object surface by the digital fringe projector. The fringe patterns are distorted by the modulation of the object surface, which reflects the three-dimensional information of The associate editor coordinating the review of this manuscript and approving it for publication was Zhen Ren . the object surface. The distorted fringe images are captured by the camera. Then, based on the principle of triangulation, the phase-height mapping relationship between the fringes on the object surface and the fringes on the reference plane is established by projecting geometric relationship. According to the phase-height mapping, the height information between the measured object surface and the reference plane is calculated, so as to obtain the three-dimensional point cloud data information of the object. Cylinder objects play an important role in the representation of mechanical structure, especially in the mechanical manufacturing and assembly industry, there are a large of cylinder objects. In recent years, many experts and scholars have studied the use of digital fringe projection technology for three-dimensional measurement of cylinder objects, and applied the three-dimensional point cloud data fitting method for object detection and parameters estimation [12]- [14]. For the discrete point cloud, cylinder point cloud fitting is to use the feature fitting method to VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ create a global description for the given object [15], which is suitable for object recognition and modeling [16], surface reconstruction [17], manufacturing and quality control [18], etc. Point cloud data (PCD) usually has the characteristics of local, unordered and irregular point density. Hough transform (HT) method and random sample consistency (RANSAC) algorithm are the main methods for cylinder point cloud fitting. Vosselman et al. [19] proposed a cylinder detection algorithm based on Hough transform, which uses the normal vector of data points to obtain the direction of cylinder. Bolles and Fischler [20] put forward the pioneering work of using RANSAC for cylinder fitting. Considering the high precision fitting results, robustness and generality of RANSAC, many experts and scholars put forward many improved RANSAC cylinder fitting methods according to the different applications. Chaperon and Goulette [21] applied a two-step cylinder fitting method based on RANSAC, using the least subset of random sampling. The method determined the direction of the cylinder in Gaussian image, then, determined the position and size of the cylinder. Beder and Forstner [22] directly used RANSAC algorithm to solve the original point cloud and estimate the cylinder parameters. Schnabel et al. [17] developed an efficient RANSAC shape detection algorithm including cylinder shape, which has strong robustness. However, no shape for each part of the surface could been found. Forsman et al. [23] developed a compensation function to reduce the deviation when estimating the diameter of cylinder using circle fitting method. Franaszek [24] studied the variability of cylinder parameters in nonlinear fitting. Rahayem et al. [25] used a laser profile scanner mounted on an industrial robot to capture the 3D point cloud data, and described a method for the construction of cylinder surfaces from estimated elliptical sections. Ladrón de Guevara et al. [15] developed a cylinder fitting algorithm based on principal component analysis, which did not need the normal vector of data, but ignored the data with coarse or pseudo outliers. Principal component analysis is highly sensitive to outliers and may produce misleading output without point cloud processing. Although RANSAC method has been proved to be suitable for the extraction of geometric primitives in noisy 3D data, as an uncertain iterative algorithm, it largely depends on the allowed iteration to produce reasonable results. Figureiredo et al. [26] proposed a new voting scheme, which contains curvature information in the direction voting stage. For each potential cylinder point, the principal curvature direction was combined with the normal vector to eliminate the ambiguity of the candidate direction. The results showed that the main curvature direction can improve the estimation of the cylinder parameters greatly. In order to improve the robustness of cylinder fitting, Nurunabi [27], [28] et al. proposed a robust principal component analysis method and a robust regression method for cylinder fitting. The two methods had statistical consistency, and could generate robust estimation parameters under different numbers of point clouds, different cylinder sizes and different point cloud data densities. However, this method belongs to iterative method and needs more computation [29], additional preprocessing is also needed for the original point cloud data to identify the data corresponding to the cylinder object.
From the above, most of the existing cylinder fitting methods perform well on the fitting of complete point cloud data, that is, assuming that the cylinder object is fully scanned. However, affected by noise, image saturation, sampling density, occlusion, semantic relationship among samples [29], the point cloud data obtained from three-dimensional measurement is usually incomplete, disordered, biased, not obey to any statistical distribution, uneven point density, local sparsity, etc. Most of the methods above are not reliable in the presence of abnormal points or incomplete point cloud data. Especially, in the industrial environment, due to the complexity of the scene, it is usually impossible to scan objects from different locations, and the actual point cloud data is usually incomplete, disordered, biased, not subject to any statistical distribution, uneven point density, and local sparsity. In addition, due to the system deviation and sensor error, multi-path reflection, occlusion, environment disorder, random noise and other reasons, there are generally abnormal values that do not follow the distribution of most point patterns, or even local point cloud loss. Outliers [30]- [32] can aggravate the complexity of point cloud fitting, resulting in low measurement consistency. Therefore, it is still a challenging task to detect cylinders from incomplete point clouds with abnormal points.
Considering the problem of low fitting accuracy for incomplete point cloud with abnormal points, cutting plane based cylinder fitting (CPCF) method with incomplete point cloud is proposed. Firstly, the abnormal points and noise points in the point cloud are removed or reduced by bilateral filtering. Secondly, the cutting planes of the cylinder point cloud are selected, and the edge points on each cutting plane are used for ellipse fitting to calculate the center and short half axis. The mean value of the ellipse center points of all the cutting planes is taken as the point on the cylinder axis, and the mean value of the short half axis is taken as the radius of cylinder. Thirdly, the ellipse center points of all cutting planes are fitted to calculate the axis vector using RANSAC algorithm. The cylinder parameters can be obtained.
The rest of this paper is organized as follows. In section II, the principle of cutting plane based cylinder fitting method is described. Section III is the experiment and discussion. Section IV summarizes the paper.

A. FRAMEWORK OF THE PROPOSED CPCF METHOD
The framework of proposed cylinder fitting method with incomplete point cloud based on cutting plane is as follow in Figure 1, (1) Preprocessing of cylinder point cloud. The initial point cloud obtained by digital fringe projection often contains amount of redundant information, such as the intersection surface of cylinders, background, and so on. If the initial point cloud is directly used for point cloud fitting, it will lead to large fitting error. The effective point cloud information corresponding to different cylinder features can be obtained by sliced and segmented operations [33], which provides data support for point cloud filtering and point cloud fitting.
(2) Bilateral filtering for cylinder point cloud. The preprocessed cylinder point cloud is filtered by bilateral filtering to reduce the influence of outliers and noise points on the subsequent fitting.
(3) Selection of cutting planes from point cloud data. For the incomplete cylindrical point cloud, a number of equidistant cutting planes are selected to ensure that the points on each cutting plane are within the effective point cloud range.
(4) RANSAC ellipse fitting. RANSAC algorithm is used to analyze the discrete edge points on the cutting plane, so as to get the ''inner points''. The least square ellipse fitting method is used to obtain the ellipse center points cluster for the ''inner points''. The mean value of ellipse center points is taken as the point on the axis, and the mean value of the short half axis of ellipses is taken as the radius of the cylinder.
(5) RANSAC cylinder axis fitting. RANSAC algorithm is used to analyze the cluster of ellipse center points to get the ''inner points'', and the least square cylinder axis fitting method is applied for axis direction vector of the ''inner points''.
For fringe projection 3D measurement, in order to solve the problem of low fitting accuracy of incomplete point cloud data with outliers, cutting plane based cylinder fitting method with incomplete point cloud data is proposed. According to the principle that the plane of oblique plane and cylinder is an ellipse, the equidistant cutting planes are used to intercept the cylinder point cloud, and then the RANSAC is used to fit the ellipses with the edge points on cutting planes, and fit the cylinder axis with the ellipse center points. Different from the traditional point cloud fitting method, CPCF method transforms the point cloud cylinder fitting problem into ellipse edge fitting and cylinder axis fitting by selecting the cutting planes. The proposed CPCF method can obtain cylindrical parameters with high precision and high robustness, which can be used not only for cylinder fitting, but also for other rotational body fitting with incomplete point cloud data.

B. BILATERAL FILTERING FOR CYLINDER POINT CLOUD
The point cloud data obtained by digital fringe projection measurement is inevitably affected by noise, which can be divided into the following categories [34]- [36]: (1) Errors caused by the surface factors of the measured object, such as surface roughness, surface material, surface ripple, machining accuracy, etc. From the principle of DFP, it can be seen that for the metal surface, when the roughness of the measured surface is required to be higher, the strong specular reflection will be produced, which will cause larger measurement error. (2) Errors caused by the measurement system itself, such as equipment measurement accuracy, camera resolution and so on. (3) Random errors, which occurs randomly in the measurement process, such as equipment noise, environmental disturbance, system vibration, etc. The spatial coordinate set of 3D point cloud can be expressed as is usually composed of the real value of the measured object g p (x i , y i , z i ) and the measurement error e p x i , y i, z i . g p (x i , y i , z i ) can be divided into deterministic component g Q x i , y i,z i and stochastic component g S x i , y i, z i . Measurement error e p x i , y i, z i can be divided into system error e α x i , y i, z i and random error e β x i , y i, z i . Therefore, the measurement value of the measured point can be expressed as follows [34], where g Q represents the ideal value of the object to be measured. g S is the random deviation between the measured object surface and the ideal object surface caused by the surface roughness, machining accuracy, surface ripple, surface material and other factors. e α represents the deterministic error due to the measurement system, which is randomly embedded in the ideal value, showing no obvious performance. e β is the random error caused by random factors, such as noise, environmental disturbance, etc., which is unpredictable.
In order to achieve more accurate point cloud fitting and get more accurate global description parameters of objects, it is necessary to eliminate the influence of errors, so that the measured value f p needs to be as close to the ideal value g Q as possible [34]. In Equation 1, g S and e β can be generally regarded as random error functions [34], which are reflected as the outliers and noise points in raw point cloud data. Outliers usually appear in clusters, and the distance from the nearest point to the target surface is much larger than the average distance between the point clouds on the target surface. Noise points, i.e. burr points, attach to the surface of target point cloud and produce jumping, which affects the local surface smoothness. The random error functions can be partially eliminated by smoothing filtering, but the random components of random error functions which are close to the frequency of object surface, are difficult to eliminate. Therefore, the purpose of point cloud filtering is to filter outliers and noise points as much as possible [34]- [36], reducing the influence of g S and e β on point cloud fitting, so as to improve the integrity of the geometric characteristics of the object itself. Aiming at the problems of outliers and noise in raw point cloud obtained by LiDAR [37]- [40], outlier detection methods [41]- [43] were proposed, which has good effect on isolated discrete points and sparse cluster points, but can not be applied for noise points attached to the surface of target point cloud. The point cloud obtained by LiDAR has the characteristics of large scale and low precision, while the point cloud obtained by DFP has the characteristics of small scale, high precision and high density. DFP has the requirement of high-speed measurement [1]- [4]. The outliers detection usually needs amount of computing time, which seriously reduces the computational efficiency of digital fringe projection measurement system. Thus, the bilateral filtering method is selected for fast and efficient processing of point cloud data obtained by DFP.

Definetion 1. For any point p i ∈ P in point cloud, N (p i ) is the index set of k points nearest to the point p i with Euclidean distance, that is, k-Neighborhood.
k value can be adjusted according to the actual situation. The outliers of point cloud are usually filtered according to the statistical characteristics of the distance with k-Neighborhood points. Let d i be the Euclidean distance of the point and a neighborhood point, neighborhood mean distance If satisfies µ − 3σ ≤ d i ≤ µ + 3σ , the neighborhood point is an effective point, otherwise an outlier. Once a point is detected as an outlier by neighborhood distance, the point will be removed from the point cloud data. In order to reduce the noise points, median filter method, mean filter method, Gaussian filter method, and bilateral filter method [44]- [45] are often used. Bilateral filtering method is to move the noise on the surface along the normal direction of data points in turn, and gradually adjust the coordinates of the noise points. Bilateral filtering method has better edge preserving performance, high calculation efficiency, which can be represented as,p where n j is the normal vector of the point p j in neighborhood, ∂ is the bilateral filter weight factor, where w c is the smoothing filter weight factor from point p i to neighborhood, w s is the feature retention weight factor from point p i to neighborhood on the normal direction. σ c and σ s are the Gaussian filter parameters, which control the smoothness and feature retention respectively. w c plays the role of filtering smoothly, while w s captures the change of the normal direction between the neighboring points, maintaining the detailed feature information.
The principal component analysis method is used to estimate the normal vector n j of the neighboring point. The information of the data can be reflected by the variables of the principal component elements [27]- [29], and the normal vectors of each data point in the point cloud are estimated rapidly. In k-Neighborhood, the covariance matrix of point p i is: where,p = 1 k k i=1 p i represents the gravity center of the set composed of point p i and its neighborhood points. According to Equation 4, Cov is a third-order semi-symmetric matrix, which represents the sum of the square distance between the neighborhood point set and the gravity center. By singular value decomposition of covariance matrix, the principal component elements sorted by eigenvalue are obtained, γ i (i = 0, 1, 2), γ 2 2 ≥ γ 2 1 ≥ γ 2 0 . The eigenvectors γ 2 , γ 1 , γ 0 corresponding to the eigenvalues e 2 , e 1 , e 0 respectively. Then, the minimum eigenvalue γ 0 corresponding to the eigenvector e 0 can be approximated as the normal vector of the point p i in the neighborhood small plane [27], [28].
At present, the researches on the evaluation of point cloud filtering effect are still insufficient, mainly qualitative evaluation, lacking of universal quantitative evaluation means [36]. Generally, the qualitative evaluation of point cloud filtering effect is subjective. In this paper, information entropy theory [35] is used to describe the characteristic information of the point cloud and evaluate the filtering effect, that is, the higher the entropy value of a point is, the higher the disorder degree of the region is, the greater the information content of the point is, and more accurate the detail performance is. The total entropy value of point cloud data can be written as, where H i is the entropy value of point i in k-Neighborhood, C i is the curvature of point i and C i j is the curvature of point j adjacent to point i. p i and p i j represent the probability distribution of point i and point j, respectively. From Equation 5, the larger the total entropy value of point cloud data is, the greater the amount of feature information contains. Therefore, more details can be retained while outliers and noises are removed. Figure 2 shows the schematic diagram of the cylinder. The cylinder parameters [27]- [29] include the cylinder radius r e , the cylinder axis L e and a point P 0 on the axis.

C. CYLINDER FITTING METHOD BASED ON CUTTING PLANE
According to the geometric characteristics of the cylinder surface [25], the distance from the point on the cylinder surface to its axis is always equal to the radius r e , where P P is any point on the cylinder surface, P 0 (x 0 , y 0 , z 0 ) is a point on the cylinder axis, and (l, q, e) is the direction vector of the cylinder axis. The equation for the axis L e is, x The distance d c from any point of the cylinder surface to the axis is, and the spatial equation of cylinder surface can be described as, Therefore, if given seven parameters: the point (x 0 , y 0 , z 0 ) on the axis, direction vector (l, q, e) of the cylinder axis, and the cylinder radius r e , a cylinder can be uniquely determined. The least square cylinder fitting method is the most commonly used method at present. The principle of least square cylinder fitting method [47]- [49] is as follows. Let, The error equation can be written as, where x i 0 , y i 0 , z i 0 , l i 0 , q i 0 , e i 0 , r i e are the initial values of cylinder parameter, and According to the principle of least square, V T e V e = min, the parameters of the cylinder can be solved. From the principle of least square cylinder fitting, this method belongs to unbiased consistent estimation, that is, all point clouds participate in the fitting, without detecting and excluding the impact of abnormal data; but under the condition of not satisfying the smooth hypothesis, such as the data includes gross error or too much error data, there will be a large fitting error. The least square cylinder fitting method performs well on the complete cylinder point cloud. While for the incomplete point cloud, due to the short arc cylinder fitting, this method will cause big errors and low robustness.
Theorem 2. The cutting plane generated by the oblique section plane and the cylinder is an ellipse, and the short half axis of the ellipse is equal to the radius of the cylinder bottom plane.
Proof: As shown in Figure 3, on the cutting plane and the cylinder bottom plane, taken the line where QW is located as the x-axis and the midpoint O as the origin point, and taken the line where Q W is located as the x -axis and the midpoint O as the origin point to establish the corresponding rectangular coordinates system, respectively. r e is the radius of the cylinder bottom plane. Assuming any point P m (x, y) on the cutting plane, the circular equation of the cylinder bottom plane is x 2 + y 2 = r 2 e , and the angle between the cutting plane and the bottom plane is θ. Make the vertical line of the cylinder bottom plane through point P m , and intersect the cylinder bottom plane with point P m (x cos θ, y). Thus, (x cos θ) 2 + y 2 = r 2 e , that is, x 2 (r e sec θ) 2 + y 2 r 2 e = 1, where r e is also the short half axis of the ellipse, r e secθ is the long half axis of the ellipse. Therefore, the cutting plane generated by the oblique section plane and the cylinder is an ellipse, and the short half axis of the ellipse is equal to the radius of the cylinder bottom plane. End.
In order to solve the problem of large cylinder fitting error for incomplete point cloud, we propose the cylinder fitting method based on the cutting plane. The idea is to select some cutting planes with discrete points from the incomplete point cloud, that is, a elliptical arc edge on the cutting plane. Through the ellipse fitting of elliptical arc edge and the axis fitting of ellipse center points, a cylinder can be  determined. As shown in Figure 4, i is the cutting plane of the incomplete point cloud, and d e is the distance between cutting planes along with the Y -axis. For the discrete points on each cutting plane, RANSAC algorithm is used for ellipse fitting to calculate the corresponding ellipse center points P ei . Then, RANSAC algorithm is used to fit the cylinder axis vector (l, q, e).
Let the mean value of ellipse center points be the point on the axis, that is, Let the mean value of the short half axis of ellipses on cutting planes be the radius of the cylinder, that is, RANSAC algorithm [20] is a robust method. For the known mathematical model, the parameters of the mathematical model can be estimated iteratively from a set of observation data including ''outliers''. Its basic assumption [20]: for a set of ''inner points'', there is a process that can estimate the model parameters and can explain the ''inner points''; the ''outliers'' caused by noise extremum and incorrect measurement methods are not suitable for the known mathematical model. RANSAC algorithm can estimate the parameters of known mathematical model with high accuracy from the data set with a large number of outliers robustly, but this algorithm is an uncertain algorithm, that is, it can get a reasonable result under a certain probability, and this probability is proportional to the number of iterations. Therefore, in order to get high-precision model parameters, it often needs a lot of iterations, which will increase the amount of calculation. The following describes the ellipse fitting method and the axis fitting method based on RANSAC algorithm.
Let the general equation of ellipse on XOZ plane be Ellipse parameters include ellipse center (x c , y c ), long semi axis a e , short semi axis b e , long axis angle θ e , which can be expressed as, Let ε e be the allowable error range, N e be the maximum number of iterations, p e be the number of samples. The steps of ellipse fitting method based on RANSAC are as follows: (1) For the incomplete cylinder point cloud, the number and distance of the cutting planes are set to obtain the ellipse edge points corresponding to each cutting plane; (2) For each cutting plane, randomly select observation sample points (≥ 6); (3) The ellipse parameters are calculated by the least square ellipse fitting method for the selected sample points; (4) Calculating the fitting residuals between all samples and ellipse parameters obtained in step (3), and record the samples data and the number of samples whose absolute residuals are less than the allowable error; (5) If the number of samples in step (4) is greater than the threshold of the number of inner points, stop searching for the inner points and save the samples data; (6) Repeating the above steps (3)(4)(5)) N e times. If the number of inner points is less than the threshold of the number of inner points, stop searching for the inner points, and save the maximum number of inner points set and the samples data; (7) Using least square ellipse fitting for the samples data from step (5) or step (6), thus, the center point of each cutting plane can be obtained.
The principle of least square ellipse fitting method [47]- [49] is as follows. Let the objective function be, The coefficients of the elliptic equation can be determined by the minimum of the objective function. According to the principle of extreme value, we have, ∂f e ∂F e = 0. (17) The coordinate of the ellipse center point can be obtained by Equation (15).
(8) Repeating the above steps (2) -(7) for each cutting plane to get the cluster of ellipse center points. According to Equations (12)-(13), a point P 0 (x 0 , y 0 , z 0 ) on the axis and the radius of the cylinder r e is also obtained.
Cutting plane based RANSAC ellipse fitting method can be represented with pseudocode as Algorithm 1.
From the above, RANSAC ellipse fitting method eliminates the outliers with large errors, and uses more accurate ''inner points'' to estimate the ellipse parameters [27], [28]. Compared with the least square ellipse fitting method, RANSAC method can achieve higher fitting accuracy.
For the ellipse center points cluster obtained above, the RANSAC algorithm is used to fit the cylinder axis. Let ε l be the allowable error range, N l be the maximum number of iterations, p l be the number of samples. The steps of cylinder axis fitting method based on RANSAC are as follows: (1) s l (≥ 3) center points are randomly selected from the cluster of ellipse center points, and a straight line is obtained by least square fitting method; (2) Calculating the fitting residuals between all the samples and fitted straight line obtained in step (1), and record the samples data and the number of samples whose absolute value of residuals are less than the allowable error; (3) If the number of samples is greater than the threshold of the number of inner points, stop searching for the inner points and save the samples data; (4) Repeating the above steps (1) -(3) N l times. If the number of inner points is less than the threshold of the number of inner points, stop searching for the inner points and save the maximum number of inner points;

Algorithm 1 Cutting Plane Based RANSAC Ellipse Fitting Method
Input: point cloud data -a set of observed data points ellipse-a model that can be fitted to data points N m -the minimum number of data values required to fit the model N e -the maximum number of iterations ε e -threshold value for determining when a data point fits the model  (6) can be rewritten as, Equation (18) is written by matrix form, Equation (19) can be written as error equation,  According to the least square fitting method [26]- [28], the parameters of the axis equation, namely the axis vector, can be obtained. RANSAC cylinder axis fitting method can be represented with pseudocode as Algorithm 2.

III. EXPERIMENTS AND DISCUSSIONS
A photograph of the digital fringe projection system is shown in Figure 5, which consists of a digital light processing projector and two industrial CMOS cameras. The point cloud fitting is processed by Matlab R2018b on a laptop equipped with 2.50 GHz CPU and 4G RAM memory.
In order to illustrate the three-dimensional reconstruction accuracy of the experimental setup, the comparison scheme of three-dimensional measurement accuracy is selected, which specified in VDI/VDE2634 technical standard developed by the German electrical engineering Commission. Figure 6 shows a standard part of dumbbell gauge. The accuracy of the ball center distance and two ball diameters of the dumbbell gauge need to be measured. The dumbbell gauge is ceramic matte material (diffuse reflection). The diameter of the left ball A is 50.799mm, the diameter of the right ball B is 50.797mm, the distance between the two ball centers is 100.253mm, and the measurement uncertainty is 0.002mm.  The three-dimensional point cloud of dumbbell gauge is obtained by the fringe projection measurement system. The point cloud data is used to fit the two balls, and the center coordinates of the two balls are obtained to calculate the center distance of the two balls.
In the measurement range, the dumbbell gauge part was placed at 10 different positions for measurement, and the diameters and center distances of ball A and ball B are fitted and analyzed by the three-dimensional point cloud. The measurement results are shown in Table 1. The measurement error is calculated by comparing the true value with the fitting data. From Table 1, the mean diameter of ball A is 50.796mm, with an mean diameter error of 0.003mm; the mean diameter of ball B is 50.795mm, with an mean diameter error of 0.001mm; the mean center distance is 100.241mm, with an mean error of 0.012mm. Although the maximum individual error of diameters and center distances is 0.049mm, the mean diameter is very close to the true value. It can be seen that the fringe projection system setup has high measurement accuracy through the inspection of dumbbell gauge standard part.
In order to better verify the proposed CPCF method, the stepped cylinder with diffuse reflection is analyzed, as shown in Figure 7(a). The diameters of cylinder A, cylinder B and cylinder C measured by profilometer are 79.590mm, 139.492mm and 199.391mm respectively, which are regarded as the true values. Figure 7(b) shows the obtained point cloud data and its coordinate system. After sliced and segmented operations, we can have the point cloud corresponding to each cylinder. Compared with the results with least square cylinder fitting (LSCF) method without bilateral filtering, RANSAC cylinder fitting (RANSAC) method without bilateral filtering, the cylinder fitting results with different methods are shown in Table 2.      Figure 10 are the three-dimensional point clouds of cylinder A, cylinder B and cylinder C respectively, and the fitting cylinders with the proposed CPCF method. Point density is described by average point distance.
The angle θ v between the measured axis vector , v z 1 with various methods and the reference axis , v z 0 is used as the evaluation index of the axis vector deviation, as shown, The stepped cylinder with diffuse reflection has three coaxial cylinders with different diameters. Figure 8(a), Figure 9(a) and Figure 10(a) show the cylindrical point clouds with different diameters corresponding to the stepped cylinder after segmenting operation, respectively. Geomagic studio [50] is the most widely used commercial software in point cloud fitting, and the fitting results with Geomagic studio can be used as reference values to evaluate the fitting results of various methods. From Table 2, Geomagic studio has obtained the optimal diameter fitting results for both cylinders A and B. However, the internal algorithm of the commercial software is closed and the license of software needs to be paid for. The diameter fitting errors of the least square cylinder fitting method are 0.049mm, 0.05mm and 0.048mm respectively. The error with LSCF method is large about 0.05mm. On the one hand, there is a large fitting error when using the short arc edge points for fitting; on the other hand, the least square belongs to unbiased consistent estimation, and the noise point has an effect on the fitting, resulting in inaccurate fitting results. Compared with the least square fitting method, the RANSAC method has better results. The diameter fitting errors are 0.038mm, 0.035mm and 0.031mm respectively. Compared with the LSCF method and RANSAC method, the diameter fitting error of the proposed CPCF method is 0.022mm, 0.03mm, 0.027mm respectively, and the maximum error is 0.03mm. Compared with the axis vectors fitted by Geomagic Studio, the deviation angles of the axis vector with the least square cylinder fitting method are 0.026rad, 0.042rad and 0.059rad respectively. Compared with the least square cylinder fitting, the deviation angles of the axis vector fitted by RANSAC are 0.015rad, 0.038rad and 0.036rad respectively, reducing 40.36%, 9.97% and 40.13% respectively. The deviation angles of the axis vector with the proposed CPCF method are 0.013rad, 0.013rad and 0.016rad, respectively. Compared with the RANSAC method, CPCF method reduces 11.54%, 64.61% and 56.48% respectively. The cylinder is estimated iteratively by using cutting plane, and more accurate information of the point cloud is used to obtain the cylinder parameters.
In order to verify the validity of the proposed CPCF method on the metal object, the following two aluminum workpieces, stepped cylinder object and shell object, were designed in Figure 11. The stepped cylinder object has two cylinder sections with the diameters of 199.750mm and 239.741mm respectively, and the shell object has a cylinder section with the diameter of 276.299mm.  Figure 12 shows the three-dimensional point cloud data of two objects obtained by the fringe projection system. Figure 13-15 are three-dimensional point clouds and  fitting cylinders for three cylinders respectively. Figure 13(a) Figure 14(a) and Figure 15(a) show the cylindrical point clouds with different diameters corresponding to metal cylinder objects after segmenting operation, respectively. Table 3 shows the cylinder fitting results of cylinder axis with the proposed CPCF method. Considering the denoising effect  of bilateral filtering, bilateral filtering is carried out before least square cylinder fitting and RANSAC cylinder fitting to reduce the influence of outliers points and noise points, called LSCF_BF method and RANSAC_BF method. Table 4 shows the cylinder fitting results with different methods.
From Tables 3-4, the X -axis direction and Y -axis direction of the axis vector with all the fitting methods change less, and the Z -axis direction has greater change. The reason is that the cutting planes are selected along the Y -axis direction, and the edge points on the XOZ plane are used for ellipse fitting, thus, the ellipse centers are greatly affected by the Z -axis direction. In Table 4, the diameter errors with Geomagic studio are 0.028mm, 0.01mm and −0.026mm respectively, which are more close to the true values. The diameter errors of LSCF method are 0.068mm, 0.070mm and 0.054mm respectively, while the diameter errors with LSCF_BF method are 0.044mm, 0.052mm, 0.043mm, reducing 35.29%, 25.71%, 20.37% than LSCF method respectively. The diameter errors of RANSAC method are −0.039mm, 0.046mm and 0.043mm respectively, while the diameter errors with RANSAC_BF method are 0.031mm, 0.034mm, 0.037mm, reducing 26.08%, 13.95%, 22.58% than RANSAC method respectively. Compared with the LSCF method, the diameter fitting errors with RANSAC method reduce 42.6%, 34.2% and 20.3% respectively. The LSCF method has the largest error, and the maximum diameter fitting error for three cylinders is up to 0.07mm. The reason is that all point clouds participate in the fitting, which belongs to unbiased consistent estimation, and the error point cloud has a greater impact on the fitting result. RANSAC method manipulates the influence of noise on fitting results through noise identification, which has high robustness and fitting accuracy, and the maximum fitting error is not more than 0.05mm for the three cylinders. After the bilateral filtering, LSCF_BF method and RANSAC_BF method all have achieved better fitting effects. The results show that outliers and noise points have significant influence on LSCF method and RANSAC method, meanwhile, RANSAC_BF method has higher robustness and better fitting effect than LSCF_BF method. Compared with the RANSAC method, the diameter fitting errors with the proposed CPCF method are 0.024mm, 0.025mm and -0.029mm respectively, reducing 38.4%, 45.6% and 32.5% than RANSAC method, and reducing 22.58%, 26.47%, 21.62% than RANSAC_BF method. Among all the fitting methods, the proposed CPCF method has obtained the best fitting result for the cylinder Ca, and the maximum diameter fitting errors of cylinders Cb and Cc are not more than 0.03mm.
Compared with the Geomagic Studio, the axis vector deviation angles with LSCF method are 0.048rad, 0.042rad, 0.054rad, respectively, while the axis vector deviation angles with RANSAC method are 0.024rad, 0.038rad, 0.039rad respectively, reducing 48.62%, 8.59%, 27.17% than LSCF method. The axis vector deviation angles with LSCF_BF method are 0.037rad, 0.040rad, 0.041rad, reducing 23.82%, 5.59%, 24.08% than LSCF method. While the axis vector deviation angles with RANSAC_BF method are 0.020rad, 0.027rad, 0.027rad, reducing 17.68%, 29.33%, 31.11% than RANSAC method. The axis vector deviation angles with the CPCF method are 0.014 rad, 0.015 rad and 0.018 rad, respectively, which reduces 30.57%, 45.67% and 34.11% than RANSAC_BF method. For the fitting results of cylinder axis vector, the proposed CPCF method is more close to the fitting results of Geomagic studio. By comparing the axis vectors of cylinder Ca and Cb, we can see that the two axis vectors with the proposed CPCF method are basically the same. Compared with Geomagic Studio fitting results, the axis deviation angles with the proposed CPCF method do not exceed 0.02rad; the LSCF method has the largest axis deviation angles, followed by LSCF_BF method, RANSAC method and RANSAC_BF method, which shows that the proposed CPCF method has higher accuracy. For the incomplete point cloud data measured by digital fringe projection, through the above experiments, the validity and high precision of the proposed CPCF method are verified. From the description of the CPCF method, the CPCF method is to select the cutting planes, use the edge points of the cutting plane to fit ellipse and axis to get the cylinder parameters. In other words, local points are used to replace all point clouds to get the global parameter description. Therefore, the proposed CPCF method requires that the initial point cloud data has high point density and accuracy.

IV. CONCLUSION
When the fringe projection system is used to measure the three-dimensional cylinder, some problems such as noise, uneven sampling density and occlusion will lead to incomplete point cloud data information, and the point cloud data is also polluted by outliers. Most of the existing cylinder fitting methods perform well on the point cloud fitting with complete point cloud, but not robust for the incomplete point cloud. In order to solve the problem of large fitting error, a cylinder fitting method based on cutting plane was proposed. Firstly, the mathematical model of the point cloud and its errors were analyzed, and the bilateral filtering was applied to reduce the influence of noise points. Then, by selecting the equidistant cutting planes of the point cloud, the edge points on cutting planes were used for ellipse fitting based on RANSAC algorithm. Finally, the ellipse center point cluster was used to fit the cylinder axis with RANSAC algorithm. Therefore, the cylinder parameters were obtained. Experiments demonstrate that the proposed CPCF method can achieve better measurement results.
It is inevitable that there has fitting error in the fitting of incomplete point cloud. In future, we will apply the proposed method for complete point cloud to verify the universality.