Brought to you by:
Paper

A new fitting method for measurement of the curvature radius of a short arc with high precision

, , , and

Published 8 June 2018 © 2018 IOP Publishing Ltd
, , Citation Wei Tao et al 2018 Meas. Sci. Technol. 29 075014 DOI 10.1088/1361-6501/aac22e

0957-0233/29/7/075014

Abstract

The measurement of an object with a short arc is widely encountered in scientific research and industrial production. As the most classic method of arc fitting, the least squares fitting method suffers from low precision when it is used for measurement of arcs with smaller central angles and fewer sampling points. The shorter the arc, the lower is the measurement accuracy. In order to improve the measurement precision of short arcs, a parameter constrained fitting method based on a four-parameter circle equation is proposed in this paper. The generalized Lagrange function was introduced together with the optimization by gradient descent method to reduce the influence from noise. The simulation and experimental results showed that the proposed method has high precision even when the central angle drops below 4° and it has good robustness when the noise standard deviation rises to 0.4 mm. This new fitting method is suitable for the high precision measurement of short arcs with smaller central angles without any prior information.

Export citation and abstract BibTeX RIS

1. Introduction

The short arc refers to circular arc whose central angle is below 30°. The precise radius measurement of a short arc is widely used in physics and engineering research, and in industry, such as with particle trajectory calculations, coordinate meteorology, manufacturing process control of precision parts and so on [14]. Because the short arc is an open contour with a small central angle, short arc length and fewer sampling points, it is difficult to measure precisely. The traditional least square fitting (LSF) method is commonly used to measure the arc radius and can obtain high accuracy when it is used to fit a circular arc with a large central angle. However, the fitting accuracy of the LSF method declines dramatically with the decrease of the central angle, and the error is much larger than the position error of single contour point [57]. Therefore, the measurement of the curvature radius of a short arc with high precision becomes a real challenge in the community.

In order to resolve the accuracy problem of the traditional LSF method, researchers proposed a number of improved algorithms. Gander et al proposed a parameter squares sum constraint (PSSC) algorithm which can obtain better accuracy than the LSF method [8]. However, the fitting accuracy of the PSSC method is still not high enough when the arc has a smaller central angle. Ke et al proposed a short arc measurement method based on radius constraint (RC) [9], Jia et al proposed a short arc measurement method based on the center constraint (CC) [10]. Both methods need to obtain prior information about the radius or the center of the arc before calculating the result. Usually, prior information is hard to get or it is not accurate in many cases, so the above two methods are not suitable for the case of a very short arc.

To realize the measurement of a short arc with high precision, a parameter constrained fitting (PCF) algorithm based on a four-parameters circle equation is proposed here. The inequality constrained optimization problem was solved by introducing a generalized Lagrange function (GLF) so that higher precise arc parameters can be obtained finally. In noise polluted cases, a gradient descent (GD) optimization algorithm was proposed to further improve the arc fitting accuracy.

2. Principle of measurement

2.1. The four-parameter equation of a circle

The traditional LSF method is based on minimizing the mean square distance from data points to the fitting arc, the objective function is defined as

Equation (1)

where ${{d}_{i}}$ is the geometric distance from the point with the coordinate of $({{x}_{i}},{{y}_{i}})$ to the fitting arc [1114].

This algorithm is based on a three-parameter circle equation. However, it has been proved that the closed-form solution based on a three-parameter circle equation cannot be obtained in a general case. So, we define the four-parameter equation of circle as follows:

Equation (2)

The above four-parameter equation has the following advantages:

  • (1)  
    Matrix operation of the equation is much easier and we can obtain the closed-form solution.
  • (2)  
    It unifies the equation of the circle and straight line. It gives a line when A  =  0 and a circle when $A\ne 0$ .
  • (3)  
    The parameters, A, B, C and D, are no longer arbitrarily large and they are reduced to a specific range.
  • (4)  
    The objective function is smooth in new four-parameter space and the iterative algorithm ensures convergence of the equation.

The four-parameter equation (2) can also be transformed to

Equation (3)

Then the center coordinate (a, b) and the radius R of circle can be determined by

Equation (4)

2.2. Parameter constraint arc fitting algorithm

Giving n sampling points on the contour of the arc (xi, yi) (i  =  1,2,...,n), the minimizing objective function based on the four-parameter equation of a circle can be defined as

Equation (5)

where parameters A, B, C and D must satisfy the inequality as follows:

Equation (6)

So the arc fitting problem can be regarded as the following optimization problem

Equation (7)

Assuming ${{z}_{i}}=x_{i}^{2}+y_{i}^{2}$ , the objective function L can be expressed in matrix form as follows:

Equation (8)

where ${\bf P}={{[A,B,C,D]}^{\operatorname{T}}}$ and $ \newcommand{\e}{{\rm e}} {\bf M}=\left[\begin{array}{@{}cccccccccccccccccccc@{}} Mzz & Myz & Mxz & Mz \\ Mxz & Mxy & Mxx & Mx \\ Myz & Mxy & Myy & My \\ Mz & Mx & My & n \end{array} \right]$

The elements in the matrix M are vector moments, for example

The inequality [6] can be written as

Equation (9)

where

Now the minimizing objective function can be defined as

Equation (10)

This is an optimization problem with inequality constraint. To solve the above problem, a GLF is defined as

Equation (11)

where η (η  ⩾  0) is the Lagrange multiplier.

Now the objective function can be expressed as

Equation (12)

where $ \newcommand{\e}{{\rm e}} \underset{P}{\mathop{\min}}\,\underset{\eta}{\mathop{\max}}\,{{L}^{*}}$ is defined as the minimax problem of the GLF and it is also called the primal problem. According to the duality of the Lagrange function, the dual problem of the primal problem is a minimax problem, i.e.

The solution of the primal problem can be obtained by analyzing the dual problem.

Differentiating the equation with respect to P gives

Equation (13)

where P is the generalized eigenvector and η is the corresponding generalized eigenvalue.

By introducing equation (13) to the objective function (10), we have

Equation (14)

Since ${{{\bf P}}^{\operatorname{T}}}{\bf QP}>0$ , the minimum of the objective function L corresponds to the smallest nonnegative generalized eigenvalue. Choosing the eigenvector corresponding to the minimum nonnegative generalized eigenvalue ${{[A,B,C,D]}^{T}}$ as the calculation result, the radius and center coordinates of the arc can be calculated by equation (4).

2.3. GD algorithm

Based on the parameter constraint arc fitting algorithm described above, the radius and center coordinates of the circular arc can be obtained [15]. To further improve its fitting precision, the GD algorithm was adopted. In this method, the original value of the center coordinate is (a0, b0), which is used to find the optimal arc parameter R because R can be calculated by the center coordinate.

According to the least square circle fitting, the objective function can be defined as

Equation (15)

This is a nonlinear problem and it has no closed-form solution. So a GD optimization method can be adopted to solve this objective function.

The gradient is

Equation (16)

where

The iterative formula is

Equation (17)

where, λ is the step length. Choosing proper step and threshold, the iteration starts and runs until the gradient is less than the threshold.

When the center of the circle (a,b) is determined, the optimal radius R can be solved based on least squares principle.

The flowchart of GD arc fitting is given in figure 1

Figure 1.

Figure 1. Flowchart of the PCF algorithm.

Standard image High-resolution image

3. Algorithm simulation analysis

To prove the advantages of the PCF method proposed in this paper, we compare it with three other arc fitting algorithms, the LSF, RC, and PSSC methods by simulation.

3.1. Precision analysis by different number of points

To verify the influence of the numbers of sampling points on the measurement precision of R, we made a further study. Setting the central angle as 10°, the Gauss noise of edge point as 0.4 mm, and the number of point n to be in the range of [100, 1600]. We generate n sampling points and calculate the measurement errors. The results are presented in figure 2. From the figures, we can see that the measurement error of the radius decreases with the increase of n. Our PCF method has the highest accuracy compared with other arc measurement methods under the same conditions.

Figure 2.

Figure 2. Relation between the error of arc radius and point numbers. (a) The results comparison of four algorithms and (b) the results comparison of two algorithms.

Standard image High-resolution image

3.2. Precision analysis by different noise level

An ideal short arc sampling point set (n  =  1000) with a 14° central angle was generated and the theoretical radius of the arc was 120 mm. A Gauss noise by different standard deviation from 0.0 mm to 0.4 mm was added to the data randomly. The above four algorithms were adopted to calculate the fitting radius, respectively, under different noise standard deviations. The relative deviation of the fitting radius from the theoretical radius was obtained as the final fitting radius. Every algorithm was repeated 100 times under the same noise standard deviation. The average of relative deviations of fitting radius is presented in figure 3. With the increase of the Gauss noise, the related deviations of the LSF method increase rapidly, and the PSSC method shows a similar trend but its fitting precision is much better than that of the LSF method. Both the RC method (the constraint range is in 120 mm  ±  1 mm) and PCF method can keep almost the same fitting precision even the noise increases gradually, and their precisions are much better than that of the PSSC method. By contrast, the fluctuation of the RC method is larger than that of the PCF method. So, the PCF method has better robustness than others.

Figure 3.

Figure 3. Noise effect simulation. (a) Contrast of four methods and (b) Contrast of two methods.

Standard image High-resolution image

3.3. Precision analysis by different central angles

Generating a short arc edge point set (n  =  1000) whose central angle, theoretical radius and range of Gauss noise are 20°, 120 mm and 0–0.08 mm, respectively, and the four algorithms above were adopted to calculate the fitting radius. Under different central angles from 2° to 20°, the relative deviations of fitting radius from the theoretical radius were obtained. Every algorithm repeats 100 times under the same central angle. The average relative deviations are presented in figure 4. With the decreasing of the central angle, the relative deviation of fitting radius with the LSF method increases rapidly when the center angle is less than 20°. The PSSC method shows the similar trend when the central angle is less than 12°. The relative deviation of the PCF method begins to increase only when the center angle is less than 4° and this relative deviation is much less than the other two methods under the same central angle. Only the relative deviation of the RC method always keeps at the same minimum level even if the central angle decreases gradually to 2°. So, the proposed PCF method has better precision without any prior information.

Figure 4.

Figure 4. The simulation of the effect of central angle.

Standard image High-resolution image

3.4. Analysis of noise level and central angles

Now, we comprehensively study the influence of noise and central angles. Setting the interval of central angle as [6°, 30°], standard deviation interval of Gauss noise of edge point as [0.0 mm, 0.4 mm], we generated 1000 arc edge points for every central angle and Gauss noise. Using the above algorithms, we got the radius. The absolute value of arc radius errors was then computed. The results are presented with a 3D plot and pseudocolor plot in figure 5. All algorithms suffer increasing measurement error with the decreasing of the central angle and the increasing noise. Our PCF method gives more precise measurement than the least squares method and GGS method, and its fitting precision is also better than the Nievergelt method under the same conditions.

Figure 5.

Figure 5. Influence of noise and central angles. (a) 3D plot and (b) pseudocolor plot.

Standard image High-resolution image

4. Experimental verification

To verify the proposed PCF method, an experimental setup was built as shown in figure 6. It is composed of a telecentric lightsource, a telecentric lens, an industrial camera, a personal computer and a mechanic platform. The telecentric lightsource can reduce the penumbra region in the edge transition zone and improve edge location accuracy, so it is suitable for high precision optical measurement. The telecentric lens can effectively reduce the measurement error caused by position shift of the object.

Figure 6.

Figure 6. Measurement system. (a) Experiment system diagram and (b) photo of experimental system.

Standard image High-resolution image

In this experiment, the nominal radius of the object (a standard stainless-steel ball) is 20 mm and the actual radius (measured by a micrometer, Mitutoyo 293-340) is 20.18 mm. The object image was taken by the camera, and then ROI extraction, target area segmentation and sub-pixel edge extraction were done in sequential order. Finally, the LSF, RC (the constraint range is 20 mm  ±  0.1 mm), PSSC and PCF methods were applied to fit this arc, respectively.

The experimental results are presented in figure 7. The relative deviation of the LSF and PSSC methods increase rapidly when the center angle is less than 10°, while the deviation of RC and PCF methods almost keep the same low level even when the central angle decreases gradually. By contrast, the fluctuation of the RC method is obviously larger than that of the PCF method. So, the PCF method has the best fitting precision.

Figure 7.

Figure 7. Experiment results of a ball. (a) Contrast of four methods and (b) contrast of two methods.

Standard image High-resolution image

5. Conclusion

A new parameter constraint fitting (PCF) algorithm based on a four-parameters circle equation was proposed in this paper. The initial values of a, b and R that are determined by using solution of the GLF are already very close to their precision values. Therefore, the good solution can be obtained from the minimization problem. The simulation and experiment results showed that the PCF method is more accurate than the traditional LSF method and the PSSC method. It is also better than the RC method without any prior information. So this method is suitable for high precision measurement of a short arc with a smaller center angle and/or larger edge noise, especially without any prior information.

Acknowledgments

The authors would like to express their sincere gratitude to the supporters who funded this project, the National Natural Science Foundation of China (Grant No. U1637108).

Please wait… references are loading.
10.1088/1361-6501/aac22e