CN111127544A - 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
- CN111127544A CN111127544A CN201911408099.8A CN201911408099A CN111127544A CN 111127544 A CN111127544 A CN 111127544A CN 201911408099 A CN201911408099 A CN 201911408099A CN 111127544 A CN111127544 A CN 111127544A
- Authority
- CN
- China
- Prior art keywords
- fitting
- ellipse
- 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.)
- Granted
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 parameterized geometric ellipse fitting method based on short axis regression, 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 highest fitting accuracy among these methods is the geometric method, but the study on elliptical geometric fitting has been 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 segment 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 is firstly established, and the fitting optimization is carried out on the basisAnd (4) transforming. 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 the initial radius r of the circle0Expressed 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 elliptic mathematical model:
wherein, βjRepresenting 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
The same is true for the circle fitting orthogonal distance vectors. 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 epsilonpBy elliptical off-center angle βjFrom 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 XjAre known and five parameters of the initial ellipse have been estimated, then the only unknown eccentricity angle βjAn objective function F can be established:
wherein the angle of rotationThe most corresponding centrifugal angle β when the target function F is minimum can be quickly solved by the widely used least square methodj. Then substituting into the formulas (9), (10) and (11), the ellipse model can be calculatedOrthogonal point X ofPOrthogonal distance epsilonpGeometric performance function delta corresponding to elliptical model0(β) value.
T4: regression constrained LM geometry fitting
1) 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 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(β), the damping coefficient μ is LM-selfThe adjustment strategy is adapted to the adjustment strategy,
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 (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 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 an embodiment
In the basic study of ellipses, using parameter vectorsAccurately describing actual ellipseA circular 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 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, X8For the last discrete point, XjRefers to the jth discrete point.
Orthogonal distance vector epsilon of circlec
As shown in fig. 1, at an arbitrary 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. 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. Obtaining the circle center X of the optimal circle model through 12 sub-optimization of Gaussian circle fittingB(3.3911,4.8399), radius r 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, βjRepresenting 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. In order to distinguish the two herein for ease of understanding,discrete point XjTo the orthogonal point X of the elliptic mathematical modelPIs defined as the geometric distance epsilonpBy elliptical off-center angle βjFrom a geometric 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 XjAre known and five parameters of the initial ellipse have been estimated, then the only unknown eccentricity angle βjAn objective function F can be established:
wherein the angle of rotationThe most corresponding centrifugal angle β when the target function F is minimum 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 model0(β) value.
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 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 (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(β), performing LM self-adaptive adjustment strategy 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 formulaVector of parameters 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 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 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-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 ovalIn the circular geometry 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 the initial radius r of the circle0Expressed 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 rightIntersection 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 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 being each quadrature point DiFor 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 centerAnd dispersionCenter of gravity of pointA 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 elliptic mathematical model:
wherein, βjRepresenting 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
The same is true for the circle fitting orthogonal distance vectors. 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 epsilonpBy elliptical off-center angle βjFrom 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 XjAre known and five parameters of the initial ellipse have been estimated, then the only unknown eccentricity angle βjAn objective function F can be established:
wherein the angle of rotationThe most corresponding centrifugal angle β when the target function F is minimum 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 model0(β) value.
T4: regression constrained LM geometry fitting
1) 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 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(β), performing LM self-adaptive adjustment strategy 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 (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 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.
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 true CN111127544A (en) | 2020-05-08 |
CN111127544B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112880592A (en) * | 2021-01-20 | 2021-06-01 | 湘潭大学 | Inclination calibration method of numerical control turntable center based on mandrel |
CN117291972A (en) * | 2023-11-23 | 2023-12-26 | 湖南科天健光电技术有限公司 | Sub-pixel positioning method and device for circular mark, electronic equipment and medium |
Citations (4)
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 |
CN110378906A (en) * | 2019-07-24 | 2019-10-25 | 华南理工大学 | A kind of ellipse detection method based on flat-cut linear distance |
-
2019
- 2019-12-31 CN CN201911408099.8A patent/CN111127544B/en active Active
Patent Citations (4)
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 |
CN110378906A (en) * | 2019-07-24 | 2019-10-25 | 华南理工大学 | A kind of ellipse detection method based on flat-cut linear distance |
Non-Patent Citations (4)
Title |
---|
D.K. PRASAD,ET.AL: "ElliFit: an unconstrained, non-iterative,", 《PATTERN RECOGNIT.》 * |
T. MASUZAKI,ET.AL: "High accuracy ellipse-specific fitting", 《PSIVT 2013, LECT. NOTES COMPUT. SCI》 * |
李海涛,等: "基于DBSCAN的椭圆拟合算法的磁罗盘校正", 《电子测量技术》 * |
邹进贵,等: "一种改进的圆柱形体定位算法研究与应用", 《测绘地理信息》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112880592A (en) * | 2021-01-20 | 2021-06-01 | 湘潭大学 | Inclination calibration method of numerical control turntable center based on mandrel |
CN112880592B (en) * | 2021-01-20 | 2022-03-04 | 湘潭大学 | Inclination calibration method of numerical control turntable center based on mandrel |
CN117291972A (en) * | 2023-11-23 | 2023-12-26 | 湖南科天健光电技术有限公司 | Sub-pixel positioning method and device for circular mark, electronic equipment and medium |
CN117291972B (en) * | 2023-11-23 | 2024-02-13 | 湖南科天健光电技术有限公司 | Sub-pixel positioning method and device for circular mark, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN111127544B (en) | 2022-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
McLean et al. | Vanishing point detection by line clustering | |
CN111127544B (en) | Parameterized geometric ellipse fitting method based on short axis regression | |
CN111145243A (en) | Parameterized geometric ellipse accurate fitting method | |
CN110069041B (en) | Workpiece machining method and system based on-machine measurement | |
CN110807781B (en) | Point cloud simplifying method for retaining details and boundary characteristics | |
CN110866934B (en) | Normative coding-based complex point cloud segmentation method and system | |
CN104853435A (en) | Probability based indoor location method and device | |
CN108985373B (en) | Multi-sensor data weighting fusion method | |
CN110536257B (en) | Indoor positioning method based on depth adaptive network | |
WO2007072391A2 (en) | Automatic 3-d object detection | |
CN109318050A (en) | The hole location bearing calibration of automatic punching system | |
CN108563895B (en) | Interval model correction method for gear assembly body considering correlation | |
CN112381862B (en) | Full-automatic registration method and device for CAD (computer-aided design) model and triangular mesh | |
Cheung et al. | Measurement and characterization of ultra-precision freeform surfaces using an intrinsic surface feature-based method | |
CN113419280B (en) | Pre-stack crack density estimation method based on improved ellipse fitting | |
CN109712174B (en) | Point cloud misregistration filtering method and system for three-dimensional measurement of complex special-shaped curved surface robot | |
CN110310322A (en) | Method for detecting assembly surface of 10-micron-level high-precision device | |
CN108537791B (en) | Punching part punching on-line detection method based on machine vision | |
CN109561384B (en) | Wireless sensor network node positioning method under composite noise condition | |
CN115147471A (en) | Laser point cloud automatic registration method based on curvature density characteristics | |
CN113390340A (en) | Method for detecting spatial position of spherical center of corner spherical surface in discontinuous region | |
CN105671596A (en) | Method for determining single anode mathematical model of aluminum electrolysis cell | |
CN111815171A (en) | Equipment state evaluation method based on two-factor weighting correction | |
CN111629321A (en) | Median Kalman filtering positioning method based on outlier stripping | |
CN111444578A (en) | Automatic calibration method of variable modulus model parameters based on bending process |
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 |