CN111127544B - Parameterized geometric ellipse fitting method based on short axis regression - Google Patents
Parameterized geometric ellipse fitting method based on short axis regression Download PDFInfo
- Publication number
- CN111127544B CN111127544B CN201911408099.8A CN201911408099A CN111127544B CN 111127544 B CN111127544 B CN 111127544B CN 201911408099 A CN201911408099 A CN 201911408099A CN 111127544 B CN111127544 B CN 111127544B
- Authority
- CN
- China
- Prior art keywords
- ellipse
- fitting
- initial
- circle
- point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a parameterized geometric ellipse fitting method based on short axis regression, which comprises four main steps of establishing short axis regression parameters of a target, establishing an initial value mathematical model, solving geometric distance errors and self-adaptive iterative optimization of a short axis; in theory, any radial section of the cylindrical target is an ellipse, and the ellipse outline is shielded by the ellipse outline, so that only a small amount of ellipse arc segment information can be obtained. Therefore, it is difficult to accurately fit the actual elliptical model with only the information of the small arc segment, and the existing fitting efficiency is low. The invention takes circle fitting as an initial value of geometric iteration of the ellipse, and adopts the known target radius of the cylinder as a short axis regression parameter, thereby greatly improving the efficiency of geometric iteration and realizing high-precision fitting even under the actual noise-containing condition.
Description
Technical Field
The invention discloses a short axis regression-based parameterized geometric ellipse fitting method, and belongs to the technical field of precision testing and contour analysis.
Background
An ellipse is the most basic geometry. Theoretically, a circle only belongs to a special form of an ellipse, and all circular or cylindrical physical materials in real life can be represented by an ellipse model. In short, the high-precision ellipse fitting can be applied to product quality monitoring, instrument calibration, accurate positioning analysis and the like. Taking the stamping connection technology in the field of material connection as an example, the two plates can form a cylindrical groove under the action of a punch and a die, and the materials at the connected part are deformed to form an inner lock and an inlay, so that a connection point capable of providing certain strength is formed. In this process, any cross section of the cylindrical groove can be represented as an ellipse due to residual stress and inclined placement of the sheet material. Therefore, to accurately describe the center of the imprint, an ellipse fitting is required to the extracted cross-sectional profile.
The current analysis methods for ellipse fitting mainly include: a least square method, which minimizes the sum of squares of errors of the prediction model and the measurement points; the Hough transform method is used for searching a local peak value in an accumulator space through feature voting to determine parameters of an ellipse; and the matrix method is used for decomposing the generalized characteristic system of a discrete matrix and obtaining the ellipse parameters. The least squares method is generally classified into an algebraic method and a geometric method according to the definition of the error distance and the constraint condition. The geometric method is the method with the highest fitting accuracy in the methods, but the research on geometric fitting of the ellipse is slow in the last two decades.
The ellipse geometric fitting method mainly has the following aspects to be promoted: 1) and (4) fitting efficiency. With the development of batch, scale and intellectualization in recent years, in actual detection, application and even basic research, the requirement on the positioning accuracy of the ellipse is high, the fitting efficiency is emphasized more and more, and the fitting times or the fitting time is generally used as a quantization index; 2) and noise resistance. The discrete ellipse data in the actual measurement contains noise, and only a small part of ellipse arc data is obtained. Noise and small arc section factors can greatly influence the fitting precision of the ellipse and even cause the inaccuracy or complete failure of ellipse fitting; 3) and (4) self-adapting. In the existing gauss-newton fitting method, due to poor adaptability, the singular value processing is very rough, and the situations of non-convergence and meaningless fitting exist, so that the application and popularization of ellipse fitting in various fields are not facilitated.
Disclosure of Invention
Aiming at the difficulties in the existing ellipse fitting method, the invention provides a parameterized geometric ellipse fitting method based on short axis regression. The method takes the known target radius of a cylinder as a regression parameter, takes geometric circle fitting as an initial value of an ellipse, and adopts self-adaptive fitting calculation. The new basic research method can be applied to the fields of precision testing technology and contour analysis technology, and can also be applied to a plurality of fields of image processing technology and the like.
The technical scheme adopted by the invention is a parameterized geometric ellipse fitting method based on short axis regression, which comprises the following steps:
t1: short axis regression parameters
In the basic study of ellipses, using parameter vectorsThe actual elliptical model is accurately described. The physical meanings corresponding to the 5 parameters in the parameter vector are as follows: xCAnd YCRespectively representing coordinate values of the center of the ellipse on the X axis and the Y axis in the XY coordinate system, a and b respectively representing the sizes of the major axis and the minor axis of the ellipse,the size of the included angle between the major axis of the ellipse model and the X axis in the OXY coordinate system is also called the rotation angle of the ellipse, and represents the direction of the ellipse.
In the fitting solution, the 5-term parameters of the elliptical model form numerical adjustment in the corresponding dimension. So in practice the ellipse fitting is to solve for the optimal values in 5 dimensions from the known discrete points Xj. Then, according to the principle of ellipse formation, the minor axis b of the 5 dimensions is the radius of the forming cylinder, and the nominal value of the radius of the forming cylinder is known, as: the stamped punch radius or the calibrated cylinder radius and other objects have accurate radius indexes. Regression parameter equation:
f(k)=b-constant=0 (1)
therefore, the short axis b can be accurately obtained through actual measurement and set as a regression parameter, and the calculation amount in the dimension can be reduced to improve the fitting efficiency.
T2: initial elliptic mathematical model
In the ellipse geometric fitting, an initial ellipse mathematical model needs to be established first, and fitting optimization is carried out on the basis. Since the circle fitting has only three dimensionsThe calculated amount of the method has stronger robustness. Therefore, the discrete point X is equivalently calculated by adopting Gaussian circle fittingjThe initial elliptic mathematical model of (2) is performed according to the following procedure.
1) Calculating an initial circle
Center of gravity of discrete points arbitrarily in the OXY coordinate systemAnd roundInitial radius r0Expressed as:
wherein the center of gravity is adjustedSet as the center of the initial circle. m represents the number of discrete points, X1Representing the first discrete point, XmFor the last discrete point, XjRefers to the jth discrete point.
2) Orthogonal distance vector epsilon of circlec
At any discrete point XjTo the initial circular center of gravity XAThe intersection point of the connecting lines on the circle is called the orthogonal point Di. The physical meaning of the orthogonal points is understood to mean the circle and the discrete points XjThe nearest corresponding point.
Thus, an arbitrary discrete point XjTo an orthogonal point DiIs measured in discrete points XjTo the initial circular center of gravity XAFor vector direction, define the orthogonal distance vector ε of the circlec。
3) Gaussian circle fitting
Orthogonal pointDiFor the points on the initial circle, a linear equation system related to the orthogonal distance vector can be established according to the Jacobian matrix of the orthogonal points.
The left matrix being each quadrature pointDiFor three dimensional parameters of initial circleThe partial derivatives of (1). The gaussian fit direction of the linear equation is:
the step length of fitting is 1 in the formula, and the orthogonal distance vector mode | | | epsilon is continuously reduced every fitting adjustmentcL. Because only three dimensions are provided, the Gaussian circle fitting can be optimized for a plurality of times, and finally the circle center of the optimal circle model is obtainedThe radius r.
According to the optimized circle model centerCenter of gravity with discrete pointsA connecting line, the included angle between the connecting line and the X axis in the XY coordinate system is defined as the initial rotation angleThe solution is performed by the arctan function:
wherein the content of the first and second substances,andrepresenting the center of gravity XAThe values on the X-axis and Y-axis in the OXY coordinate system,andrespectively represent optimized circles XBValues on the X-axis and Y-axis in the OXY coordinate system.
5) Initial elliptic mathematical model
The optimal circle center solved in the previous three stepsSet as the initial ellipse centerThe radius r is set to the major and minor axes (a) of the ellipse0=b0R), plus the initial circular rotation angleThat is, five initial parameters based on discrete points are obtainedEstablishing a parameterized initial elliptical mathematical model:
wherein beta isjRepresenting the jth discrete point in the initial ellipse X(k0)And determining the corresponding centrifugal angle on the model, wherein the angle needs the elliptic point with the minimum orthogonal distance.
T3: geometric distance error vector solving
For the same reason of fitting orthogonal distance to circleAn off-vector quantity. On the ellipse model, any discrete point XjAll have a unique orthogonal point X corresponding theretoP. For distinguishing the two, the discrete point X is used for easy understandingjTo the orthogonal point X of the elliptic mathematical modelPIs defined as the geometric distance epsilonp. By elliptical centrifugal angle betajFrom a geometric distance epsilonpThe mapping relation between discrete points is represented as follows:
εp=Xj-XP|β (10)
whether the elliptical model is optimized in fitting can be determined by the geometric property delta0(β) quantitative characterization:
δ0(β)=||Xj-XP|β||=||(fx,fy)|| (11)
wherein the geometric distance error (f)x,fy) Representing from discrete points XjTo an orthogonal point XPThe vector of (2). Due to the discrete point XjFive parameters of the initial ellipse are known and have been estimated. Then, the only unknown angle of eccentricity βjAn objective function F can be established:
wherein the angle of rotationThe centrifugal angle beta corresponding to the minimum time of the target function F can be quickly solved by the widely used least square methodj. Then substituting into the formulas (9), (10) and (11), the orthogonal point X on the ellipse model can be calculatedPOrthogonal distance epsilonpGeometric performance function delta corresponding to elliptical model0The value of (. beta.).
T4: regression constrained LM geometry fitting
1) Elliptic Jacobian matrix and its equation system
In the ellipse fitting, arbitrarily modifying a basis vector must be pairedThe vector of which is adjusted exactly, which would otherwise lead to divergence of the parameter space. The regression parameter equation f (k) is weighted to 5 parameters of the ellipse And the partial derivatives and the elliptic Jacobian matrix jointly form a left matrix. For each discrete point XjThe following system of linear equations is established:
wherein w is 1.0 × 1012And mu represents a damping coefficient used for adaptively adjusting the change of the elliptical model in five dimensions. I is a 5 × 5 identity matrix.For a parameterized elliptic Jacobian matrix JijInverse matrix of, JijCan be obtained by partial derivation of equation (9):
2) initial value and direction of LM fitting
In equation (13), the left matrix added to the identity matrix is positive, so it has a unique solution, thus ensuring that it is invertible. The initial damping coefficient range is mu epsilon [1, N*]And carrying out global search of five parameters of the ellipse by taking the value mu as 50. According to the elliptical geometric property function delta0(beta), LM self-adaptive regulation strategy is carried out on the damping coefficient mu,
wherein, k is ∈ [0.25,0.75 ]],μnextRepresenting the next fitDamping coefficient, | εp+1And | | l represents the magnitude of the geometric property corresponding to the next elliptical model in the fitting. The direction of LM fitting is:
kv+1=kv+Δk (16)
in the formula, the parameter vector kvThe middle subscript v is belonged to [0, N ∈]Is a natural number, representing a vector of five parameters, k, of the elliptical modelv+1The physical meaning of the representation is the next elliptical model parameter vector to be solved by fitting. And deltak is a vector which needs to be accurately adjusted in five dimensions of the elliptical model.
3) Termination condition of LM fitting
The termination criterion reflects the corresponding geometric performance function delta of the elliptical model0(β) is a global minimum. Therefore, taking the LM fitting step size, the steepest descent rate (modulo of the gradient) and the fitting ceiling as termination criteria,
v≥vmax (19)
wherein e is1Subdividing the upper limit, e, for the step size2Is the sum of the upper limit of the gradient mode and vmaxThe upper limit of the number of fits. That is, it is determined that the optimization of the elliptical model is achieved as long as any one of the above three upper limit conditions is achieved in the adaptive fitting process.
The parameterized geometric ellipse accurate fitting method has the following advantages:
1. solving of the initial ellipse value is carried out on the basis of Gaussian circle fitting, the calculation amount of preprocessing is reduced, the calculation efficiency is high, and the robustness is strong;
2. the short axis is used as a regression parameter, and weighting is carried out, so that the problem of dimension space divergence caused by modifying ellipse fitting parameters can be effectively avoided, and the calculated amount can be saved;
3. the regression-constrained LM geometric fitting has strong self-adaptive capacity, and the condition of non-convergence in fitting can be effectively avoided;
4. the method has strong noise immunity, can be suitable for extracting the elliptic features with noise in practical application, and has potential application prospects in the fields of intelligent manufacturing, quality monitoring, three-dimensional reconstruction, robot and instrument calibration and the like.
Drawings
FIG. 1 orthogonal distance vectors fitted to a Gaussian circle;
FIG. 3 ellipse angle definition and calculation of orthogonal distances;
FIG. 4 LM geometry fitting parameters for short axis regression;
FIG. 5 LM geometry fit three-dimensional plot of short axis regression;
FIG. 6 LM geometric ellipse fitting of short axis regression;
figure 7 is a flow of parameterized geometric ellipse fitting for short axis regression.
Detailed Description
As an example, a short axis regression parameterized geometric ellipse fitting method is further illustrated with the use of discrete point data with a short axis of 3.03184 (table 1) in conjunction with the figures.
Table 18 discrete points data for the examples
In the basic study of ellipses, using parameter vectorsThe actual elliptical model is accurately described. The physical meanings corresponding to the 5 parameters in the parameter vector are as follows: xCAnd YCCoordinate values of the center of the ellipse on the X-axis and the Y-axis in the XY coordinate system, respectively, and a and b represent the major axis and the minor axis of the ellipse, respectivelyThe size of the capsule is determined by the size of the capsule,the size of the included angle between the major axis of the ellipse model and the X axis in the OXY coordinate system is also called the rotation angle of the ellipse, and represents the direction of the ellipse.
In the fitting solution, the 5-term parameters of the elliptical model form numerical adjustment in the corresponding dimension. So in practice the ellipse fit is based on the known discrete points XjThe optimal values in 5 dimensions are solved. Then, according to the principle of ellipse formation, the minor axis b of the 5 dimensions is the radius of the forming cylinder, and the nominal value of the radius of the forming cylinder is known, as: the stamped punch radius or the calibrated cylinder radius and other objects have accurate radius indexes. Regression parameter equation:
f(k)=b-3.03184=0 (20)
therefore, by setting the short axis 3.03184, which is known in actual measurement, as a regression parameter, the calculation amount in the dimension can be reduced to increase the fitting efficiency.
Initial elliptic mathematical model
In the ellipse geometric fitting, an initial ellipse mathematical model needs to be established first, and fitting optimization is carried out on the basis. Since the circle fitting has only three dimensionsThe calculated amount of the method has stronger robustness. Therefore, the discrete point X is equivalently calculated by adopting Gaussian circle fittingjThe initial elliptic mathematical model of (2) is performed according to the following procedure.
Calculating an initial circle
Center of gravity of discrete points arbitrarily in the OXY coordinate systemAnd the initial radius r of the circle0Expressed as:
wherein, the center of gravity XA(5.1250, 5.7500) is set as the center of the initial circle. 8 denotes the number of discrete points, X1Representing the first discrete point, X8As the last discrete point, XjRefers to the jth discrete point.
Orthogonal distance vector epsilon of circlec
As shown in fig. 1, at arbitrary discrete points XjTo the initial circular center of gravity XAThe intersection point of the connecting lines on the circle is called the orthogonal point Di. The physical meaning of the orthogonal points is understood to mean the circle and the discrete points XjThe nearest corresponding point.
Thus, an arbitrary discrete point XjTo an orthogonal point DiIs measured in discrete points XjTo the initial circular center of gravity XAFor vector direction, define the orthogonal distance vector ε of the circlec. The calculated orthogonal distance vectors of the initial circle are shown in table 2.
TABLE 2 orthogonal distance vector ε of initial circlec
Gaussian circle fitting
Orthogonal point DiFor the points on the initial circle, a linear equation system related to the orthogonal distance vector can be established according to the Jacobian matrix of the orthogonal points.
The left matrix is three dimensional parameters of each orthogonal point Di to the initial circleThe partial derivatives of (1). The gaussian fit direction of the linear equation is:
the step length of fitting is 1 in the formula, and the orthogonal distance vector mode | | | epsilon is continuously reduced every fitting adjustmentcL. The circle center X of the optimal circle model is obtained through 12 sub-optimization of Gaussian circle fittingB(3.3911,4.8399) and the radius r is 4.7967.
As shown in fig. 2, according to the optimized circle model centerCenter of gravity with discrete pointsA connecting line, the included angle between the connecting line and the X axis in the XY coordinate system is defined as the initial rotation angleThe solution is performed by the arctan function:
wherein the content of the first and second substances,andrepresenting the center of gravity XAThe values on the X-axis and Y-axis in the OXY coordinate system,andrespectively represent optimized circles XBValues on the X-axis and Y-axis in the OXY coordinate system.
Initial elliptic mathematical model
The optimal circle center solved in the previous three stepsSet as the initial ellipse centerThe radius r is set to the major and minor axes (a) of the ellipse0=b04.7967) plus the initial circular rotation angleThat is, five initial parameters based on discrete points are obtainedEstablishing a parameterized initial elliptic mathematical model:
wherein, betajRepresenting the jth discrete point in the initial ellipse X(k0)And determining the corresponding centrifugal angle on the model, wherein the angle needs the elliptic point with the minimum orthogonal distance.
Geometric distance error vector solving
As shown in fig. 3, the same is true for circle fitting orthogonal distance vectors. On the ellipse model, any discrete point XjAll have a unique orthogonal point X corresponding theretoP. It is convenient here to distinguish between the twoUnderstanding that the discrete point X will bejTo the orthogonal point X of the elliptic mathematical modelPIs defined as the geometric distance epsilonp. By elliptical centrifugal angle betajFrom a geometrical distance epsilonpThe mapping relation between discrete points is represented as follows:
εp=Xj-XP|β (29)
whether the elliptical model is optimized in fitting can be determined by the geometric property delta0(β) quantitative characterization:
δ0(β)=||Xj-XP|β||=||(fx,fy)|| (30)
wherein the geometric distance error (f)x,fy) Representing from discrete points XjTo an orthogonal point XPThe vector of (2). Due to the discrete point XjFive parameters of the initial ellipse are known and have been estimated. Then, the only unknown angle of eccentricity βjAn objective function F can be established:
wherein the angle of rotationThe centrifugal angle beta corresponding to the minimum time of the target function F can be quickly solved by the widely used least square methodj. Then substituting into the formulas (28), (29) and (30), the orthogonal point X on the ellipse model can be calculatedPOrthogonal distance epsilonpGeometric performance function delta corresponding to elliptical model0The value of (. beta.).
Regression constrained LM geometry fitting
Elliptic Jacobian matrix and its equation system
In ellipse fitting, any modification of a basis vector must make an exact adjustment to its vector, otherwise it will result in divergence of the parameter space. The regression parameter equation f (k) is weighted to 5 parameters of the ellipse And the partial derivatives and the elliptic Jacobian matrix jointly form a left matrix. For each discrete point XjThe following system of linear equations was established:
wherein w is 1.0 × 1012And mu represents a damping coefficient used for adaptively adjusting the change of the elliptical model in five dimensions. I is a 5 × 5 identity matrix.For a parameterized elliptic Jacobian matrix JijInverse matrix of, JijCan be obtained by partial derivation of equation (28):
initial value and direction of LM fitting
In equation (32), the left matrix added to the identity matrix is positive, so it has a unique solution, thus ensuring that it is invertible. The initial damping coefficient range is mu epsilon [1, N*]And carrying out global search of five parameters of the ellipse by taking the value mu as 50. According to the elliptical geometric property function delta0(beta), LM self-adaptive regulation strategy is carried out on the damping coefficient mu,
wherein, k is ∈ [0.25,0.75 ]],μnextDamping coefficient, i | epsilon, representing the next fitp+1And | | l represents the magnitude of the geometric property corresponding to the next elliptical model in the fitting. The direction of LM fitting is:
kv+1=kv+Δk (35)
in the formula, the parameter vector kvThe middle subscript v is belonged to [0, N ∈]Is a natural number, representing a vector of five parameters, k, of the elliptical modelv+1The physical meaning of the representation is the next elliptical model parameter vector to be solved by fitting. And deltak is a vector which needs to be accurately adjusted in five dimensions of the elliptical model, and the adjustment process is shown in figure 4.
Termination condition of LM fitting
The termination criterion reflects the corresponding geometric performance function delta of the elliptical model0(β) is a global minimum. Therefore, taking the LM fitting step size, the steepest descent rate (modulo the gradient) and the fitting ceiling as termination criteria,
v≥vmax (38)
wherein e is1Subdividing the upper limit, e, for the step size2Is the sum of the upper limit of the gradient mode and vmaxThe upper limit of the number of fits. That is, it is determined that the optimization of the elliptical model is reached as long as any one of the above three upper limit conditions is reached in the adaptive fitting process, as shown in fig. 5.
As shown in fig. 6, after fitting for the 21 st time, the best fit solution can be obtained, and the fitting efficiency is improved by 53.8% compared with that of non-short axis regression. The final corrected vector norm Δ k | | | 8.5665 × 10-7Obtaining a stable orthogonal point set { (X)P,YP) }, geometric Performance function δ01.17188, locating the center of the ellipse (2.69995, 3.81612), and calculating the rotation angleThe results of each exact fit are shown in table 3.
TABLE 3 results of LM Adaptation calculations
And printing a fitting result report according to the self-adaptive fitting result.
The detailed measurement flow is shown in fig. 7.
Claims (1)
1. A parameterized geometric ellipse fitting method based on short axis regression is characterized in that: the method comprises the following steps of,
t1: short axis regression parameters
In the basic study of ellipses, using parameter vectorsAccurately describing an actual elliptical model; the physical meanings corresponding to the 5 parameters in the parameter vector are as follows: xCAnd YCRespectively representing coordinate values of the center of the ellipse on the X axis and the Y axis in the XY coordinate system, a and b respectively representing the sizes of the major axis and the minor axis of the ellipse,the size of an included angle between the long axis of the ellipse model and the X axis in the XY coordinate system is also called as the rotation angle of the ellipse, and the direction of the ellipse is represented;
in the fitting solution, 5 parameters of the ellipse model form numerical adjustment on corresponding dimensionality; so in practice the ellipse fit is based on the known discrete points XjSolving the optimal values in 5 dimensions; then, according to the principle of ellipse formation, the minor axis b of the 5 dimensions is the radius of the forming cylinder, the nominal value of which is known, the radius of the forming cylinder being the radius of the stamped punch, which has an accurate radius index; regression parameter equation:
f(k)=k-constant=0 (1)
therefore, the short axis b can be accurately obtained through actual measurement and set as a regression parameter, so that the calculation amount in the dimension can be reduced, and the fitting efficiency can be improved;
t2: initial elliptic mathematical model
In the ellipse geometric fitting, an initial ellipse mathematical model is required to be established first, and fitting optimization is carried out on the basis; since the circle fitting has only three dimensionsThe calculated amount of the method has stronger robustness; therefore, the discrete point X is equivalently calculated by adopting Gaussian circle fittingjThe initial ellipse mathematical model is carried out according to the following process;
1) calculating an initial circle
Center of gravity of discrete points arbitrarily in the OXY coordinate systemAnd the initial radius r of the circle0Expressed as:
wherein the center of gravity is adjustedSetting as the center of an initial circle; m represents the number of discrete points, X1Representing the first discrete point, XmFor the last discrete point, XjRefers to the jth discrete point;
2) orthogonal distance vector epsilon of circlec
At any discrete point XjTo the initial circular center of gravity XAThe intersection point of the connecting lines on the circle is called the orthogonal point Di(ii) a The physical meaning of the orthogonal points is understood to mean the circle and the discrete points XjThe nearest corresponding point;
thus, an arbitrary discrete point XjTo an orthogonal point DiIs measured in discrete points XjTo the initial circular center of gravity XAFor vector direction, define the orthogonal distance vector ε of the circlec;
3) Gaussian circle fitting
Orthogonal point DiEstablishing a linear equation set related to the orthogonal distance vector for the point on the initial circle according to the Jacobian matrix of the orthogonal point;
the left matrix being each quadrature point DiFor three dimensional parameters of initial circlePartial derivatives of (a); the gaussian fit direction of the linear equation is:
the step length of fitting is 1 in the formula, and the orthogonal distance vector mode | | | epsilon is continuously reduced every fitting adjustmentcL; because only three dimensions are provided, the Gaussian circle fitting can be optimized for a plurality of times, and finally the circle center of the optimal circle model is obtainedA radius r;
According to the optimized circle model centerCenter of gravity with discrete pointsA connecting line, the included angle between the connecting line and the X axis in the XY coordinate system is defined as the initial rotation angleThe solution is performed by the arctan function:
wherein the content of the first and second substances,andrepresenting the center of gravity XAThe values on the X-axis and Y-axis in the OXY coordinate system,andrespectively represent optimized circles XBValues on the X-axis and Y-axis in the OXY coordinate system;
5) initial elliptic mathematical model
The optimal circle center solved in the previous three stepsSet as the initial ellipse centerThe radius r is set to the major and minor axes (a) of the ellipse0=b0R), plus the initial circular rotation angleThat is, five initial parameters based on discrete points are obtainedEstablishing a parameterized initial elliptical mathematical model:
wherein, betajRepresenting the jth discrete point in the initial ellipse X(k0)The corresponding centrifugal angle on the model is determined by the elliptic point with the minimum orthogonal distance;
t3: geometric distance error vector solving
Fitting the orthogonal distance vector to a circle in the same way; on the ellipse model, any discrete point XjAll have a unique orthogonal point X corresponding theretoP(ii) a For distinguishing the two, the discrete point X is used for easy understandingjTo the orthogonal point X of the elliptic mathematical modelPIs defined as the geometric distance epsilonp(ii) a By elliptical centrifugal angle betajFrom a geometric distance epsilonpThe mapping relation between discrete points is represented as follows:
εp=Xj-XP|β (10)
whether the elliptical model is optimized in fitting can be determined by the geometric property delta0(β) quantitative characterization:
δ0(β)=||Xj-XP|β||=||(fx,fy)|| (11)
whereinGeometric distance error (f)x,fy) Representing from discrete points XjTo an orthogonal point XPThe vector of (a); due to the discrete point XjFive parameters of the initial ellipse are known and have been estimated; then, the only unknown angle of eccentricity βjAn objective function F can be established:
wherein the angle of rotationThe centrifugal angle beta corresponding to the minimum time of the target function F can be quickly solved by the widely used least square methodj(ii) a Then substituting into the formulas (9), (10) and (11), the orthogonal point X on the ellipse model can be calculatedPOrthogonal distance epsilonpGeometric performance function delta corresponding to elliptical model0A value of (β);
t4: regression constrained LM geometry fitting
1) Elliptic Jacobian matrix and its equation system
In the ellipse fitting, any modification of a basic vector must perform precise adjustment on the vector, otherwise, the divergence of a parameter space is caused; the regression parameter equation f (k) is weighted to 5 parameters of the ellipse Partial derivatives, which form a left matrix together with the elliptic Jacobian matrix; for each discrete point XjThe following system of linear equations is established:
wherein w is 1.0 × 1012Mu represents a damping coefficient and is used for adaptively adjusting the change of the elliptical model in five dimensions; i is a 5 × 5 identity matrix;for a parameterized elliptic Jacobian matrix JijInverse matrix of, JijCan be obtained by partial derivation of equation (9):
2) initial value and direction of LM fitting
In equation (13), the left matrix added to the identity matrix is positive, and thus it has a unique solution, thus ensuring its reversibility; the initial damping coefficient range is mu epsilon [1, N*]Carrying out global search of five elliptic parameters by taking the value of mu as 50; according to the elliptical geometric property function delta0(beta), LM self-adaptive regulation strategy is carried out on the damping coefficient mu,
wherein, k is ∈ [0.25,0.75 ]],μnextDamping coefficient, i | epsilon, representing the next fitp+1The | | represents the magnitude of the geometric performance corresponding to the ellipse model of the next time in the fitting; the direction of LM fitting is:
kv+1=kv+Δk (16)
in the formula, the parameter vector kvThe middle subscript v is belonged to [0, N ∈]Is a natural number, representing a vector of five parameters, k, of the elliptical modelv+1The physical meaning of the expression is the parameter vector of the next ellipse model for fitting solution; delta k is a vector which needs to be accurately adjusted in five dimensions of the elliptical model;
3) termination condition of LM fitting
The termination criterion reflects the corresponding geometric performance function delta of the elliptical model0(beta) is a global maximumA small value; therefore, taking the LM fitting step size, the steepest descent rate, i.e., the modulus of the gradient, and the fitting ceiling as termination criteria,
v≥vmax (19)
wherein e is1Subdividing the upper limit, e, for the step size2Is the sum of the upper limit of the gradient mode and vmaxIs the upper limit of the fitting times; that is, it is determined that the optimization of the elliptical model is achieved as long as any one of the above three upper limit conditions is achieved in the adaptive fitting process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911408099.8A CN111127544B (en) | 2019-12-31 | 2019-12-31 | Parameterized geometric ellipse fitting method based on short axis regression |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911408099.8A CN111127544B (en) | 2019-12-31 | 2019-12-31 | Parameterized geometric ellipse fitting method based on short axis regression |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111127544A CN111127544A (en) | 2020-05-08 |
CN111127544B true CN111127544B (en) | 2022-05-17 |
Family
ID=70506191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911408099.8A Active CN111127544B (en) | 2019-12-31 | 2019-12-31 | Parameterized geometric ellipse fitting method based on short axis regression |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111127544B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112880592B (en) * | 2021-01-20 | 2022-03-04 | 湘潭大学 | Inclination calibration method of numerical control turntable center based on mandrel |
CN117291972B (en) * | 2023-11-23 | 2024-02-13 | 湖南科天健光电技术有限公司 | Sub-pixel positioning method and device for circular mark, electronic equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2590427A1 (en) * | 2007-05-30 | 2008-11-30 | John Dickinson | System and method for reconstructing a 3d solid model from 2d line drawing |
CN103632366A (en) * | 2013-11-26 | 2014-03-12 | 清华大学 | Parameter identification method for elliptical target |
CN109102567A (en) * | 2018-10-11 | 2018-12-28 | 北京理工大学 | A kind of pose parameter high-precision method for solving minimized based on reconstruction error |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110378906B (en) * | 2019-07-24 | 2023-07-25 | 华南理工大学 | Ellipse detection method based on chord tangent distance |
-
2019
- 2019-12-31 CN CN201911408099.8A patent/CN111127544B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2590427A1 (en) * | 2007-05-30 | 2008-11-30 | John Dickinson | System and method for reconstructing a 3d solid model from 2d line drawing |
CN103632366A (en) * | 2013-11-26 | 2014-03-12 | 清华大学 | Parameter identification method for elliptical target |
CN109102567A (en) * | 2018-10-11 | 2018-12-28 | 北京理工大学 | A kind of pose parameter high-precision method for solving minimized based on reconstruction error |
Non-Patent Citations (4)
Title |
---|
ElliFit: an unconstrained, non-iterative,;D.K. Prasad,et.al;《Pattern Recognit.》;20131231;全文 * |
High accuracy ellipse-specific fitting;T. Masuzaki,et.al;《PSIVT 2013, Lect. Notes Comput. Sci》;20131231;全文 * |
一种改进的圆柱形体定位算法研究与应用;邹进贵,等;《测绘地理信息》;20141208;全文 * |
基于DBSCAN的椭圆拟合算法的磁罗盘校正;李海涛,等;《电子测量技术》;20190923;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111127544A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111127544B (en) | Parameterized geometric ellipse fitting method based on short axis regression | |
CN109887015B (en) | Point cloud automatic registration method based on local curved surface feature histogram | |
McLean et al. | Vanishing point detection by line clustering | |
CN108376408B (en) | Three-dimensional point cloud data rapid weighting registration method based on curvature features | |
CN111145243A (en) | Parameterized geometric ellipse accurate fitting method | |
CN110069041B (en) | Workpiece machining method and system based on-machine measurement | |
CN109318050B (en) | The hole location bearing calibration of automatic punching system | |
CN108830888B (en) | Coarse matching method based on improved multi-scale covariance matrix characteristic descriptor | |
WO2007072391A2 (en) | Automatic 3-d object detection | |
CN108563895B (en) | Interval model correction method for gear assembly body considering correlation | |
CN111664813A (en) | Free surface arbitrary hole normal vector measuring device and method and compensation method | |
CN109614686B (en) | Assembly parameter optimization method in dynamic assembly process of shaft hole | |
CN113419280B (en) | Pre-stack crack density estimation method based on improved ellipse fitting | |
CN110310322A (en) | Method for detecting assembly surface of 10-micron-level high-precision device | |
Wen et al. | Recognition and inspection of manufactured parts using line moments of their boundaries | |
CN116721144A (en) | Cone hole size measurement method based on point cloud slicing | |
CN113390340B (en) | Method for detecting spatial position of spherical center of corner spherical surface in discontinuous region | |
Cheng et al. | A novel kinematic parameters identification method for articulated arm coordinate measuring machines using repeatability and scaling factor | |
CN115147471A (en) | Laser point cloud automatic registration method based on curvature density characteristics | |
CN113836662A (en) | Dynamic identification and de-characterization repairing method for cam curve groove mechanism design defect | |
CN113626953A (en) | High-energy-efficiency milling error dynamic distribution characteristic identification method | |
CN105671596A (en) | Method for determining single anode mathematical model of aluminum electrolysis cell | |
CN113192115B (en) | Three-dimensional complex workpiece measuring method and system based on time function | |
CN111444578A (en) | Automatic calibration method of variable modulus model parameters based on bending process | |
CN114299079B (en) | Dense point cloud data-oriented engine blade section line data acquisition method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |