You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fitting algorithms are a widely discussed topic in geometry processing. Circle fitting algorithms like Taubin, Chernov, and others, as well as plane fitting algorithms using least-squares, are commonly used in 2D and 3D computer vision applications to measure geometric entities or perform registration. For a comprehensive bibliographic review on this topic, see [1] (HREF A REF. [1]).
13
+
Fitting algorithms are a widely discussed topic in geometry processing. Circle fitting algorithms like Taubin, Chernov, and others, as well as plane fitting algorithms using least-squares, are commonly used in 2D and 3D computer vision applications to measure geometric entities or perform registration. For a comprehensive bibliographic review on this topic, see [1].
14
14
15
15
Let’s imagine a classic problem: we have a set of 2D points and we want to fit a straight line to them. Furthermore, the line that **best** fits them, in a certain sense of the word. The closed-form least-squares approach is one way of conceptualizing this **optimal fit**. The equation of a line is:
16
+
<divalign="center">
16
17
$$
17
-
ax + by + c = 0
18
+
ax + by + c = 0,
18
19
$$
19
-
20
+
</div>
20
21
and it is an affine mapping with respect to the $$ x $$ and $$ y $$ variables, meaning that it is not a linear function. However, the mapping is linear with respect to the $$ a $$, $$ b $$, and $$ c $$ variables, which will be useful to us...
21
22
22
23
Thus, the least-squares fitting problem for a line is:
24
+
<divalign="center">
23
25
$$
24
26
E(a, b, c) = \sum_{i=1}^{m} (ax_i + by_i + c)^2
25
27
$$
28
+
</div>
26
29
27
30
This can be solved in one step because it represents a parabola, which is strictly convex, as the error function is quadratic in the unknowns.
28
31
29
-
By differentiating $$E(\cdot)$$ with respect to the unknowns and setting it equal to 0, we get (thanks to the equation) three linear equations in the unknowns.
32
+
By differentiating $$E(\cdot)$$ with respect to the unknowns and setting it equal to 0, we get (thanks to the nature of this particular equation) three linear equations in the unknowns.
30
33
31
34
However, curves are usually higher-order functions than straight lines, so the error function, in the form of the sum of perpendicular distances to a curve, is not usually quadratic. Therefore, these geometric errors cannot be minimized "in a single step," but rather by using iterative nonlinear methods. However, through different approaches, it is possible to "quite well" approximate the minimization of **geometric error** with that of an **algebraic error**, typically quadratic. This categorizes fitting methods into two main families: algebraic and geometric. In general, algebraic error is a good approximation of geometric error, even as the initial seed for iterative geometric methods. See [2] for a continued discussion of these concepts.
32
35
@@ -42,11 +45,11 @@ To the benefict of better visualization, you can access the post main content in
42
45
<divid="viewerContainer align-items-center">
43
46
<div id="pdf-viewer" class="mt-6"></div>
44
47
</div>
45
-
<h4class="font-weight-bold"><atarget="_blank"href="{{ '/assets/blog_pdfs/2025-01-22-geometric-fitting_intuition/geometric_fitting_intuition.pdf' }}">Open as PDF</a></h4>
48
+
<h4class="font-weight-bold"style="text-align: right; margin-top: 5px"><atarget="_blank"href="{{ '/assets/blog_pdfs/2025-01-22-geometric-fitting-intuition/geometric-fitting-intuition.pdf' }}">Open as PDF</a></h4>
46
49
</div>
47
50
48
51
<script>
49
-
var url ='../assets/blog_pdfs/2025-01-22-geometric-fitting_intuition/geometric_fitting_intuition.pdf';
52
+
var url ='../assets/blog_pdfs/2025-01-22-geometric-fitting-intuition/geometric-fitting-intuition.pdf';
In our previous [post](URL AL POST DE GEOMETRIC FITTING INTUITION) we grasped the topic of geometric fitting of various entity to a set of observed data points.
13
+
In our previous [post](./geometric-fitting-intuition), we explored the topic of geometric fitting of various entities to a set of observed data points.
15
14
16
-
When we want to deal with the fitting of an uncentered (or even unaligned with the horizontal XY plane) torus, which si useful in come metrology applications of cilindyral pàrts, one encounter with a non-linear eqution that must be optimized through methods like Newton-raphson, gradient descrnt, gauss-newton or Levenbeg-marquardt (see [6]).
15
+
When dealing with the fitting of an uncentered (or even unaligned with the horizontal XY plane) torus, which is useful in some metrology applications of cylindrical parts, one encounters a non-linear equation that must be optimized using methods like Newton-Raphson, gradient descent, Gauss-Newton, or Levenberg-Marquardt (see [6]).
17
16
18
-
NEvertheles, it may be benefitial to develop an alternative approach using the tools formulated some centuries ago by Brook Taylor, in order to encontrar enfoques lineales muy eficientes que muchas siempre nos hacen la vida más fácil.
17
+
Nevertheless, it may be beneficial to develop an alternative approach using the tools formulated centuries ago by Brook Taylor, in order to find very efficient linear approaches that often make our lives easier.
19
18
20
19
## Paper
21
20
22
-
TO the benefict of better visualization, you can access the post main content in the LaTex PDF attached below:
21
+
To the benefict of better visualization, you can access the post main content in the LaTex PDF attached below:
23
22
24
-
**AQUÍ INSERTAR EL PDF DEL LATEX MEDIANTE SCRIPT.JS COMO EL CV DE ALESORDO**
var viewer =document.getElementById('pdf-viewer');
37
+
38
+
for (var pageNumber =1; pageNumber <=pdf.numPages; pageNumber++) {
39
+
var pageContainer =document.createElement('div');
40
+
pageContainer.className='pdf-page';
41
+
42
+
var canvas =document.createElement('canvas');
43
+
canvas.className='pdf-page-canvas';
44
+
pageContainer.appendChild(canvas);
45
+
46
+
viewer.appendChild(pageContainer);
47
+
48
+
renderPage(pageNumber, canvas, pdf);
49
+
}
50
+
});
51
+
52
+
functionrenderPage(pageNumber, canvas, pdf) {
53
+
pdf.getPage(pageNumber).then(function (page) {
54
+
var viewport =page.getViewport({ scale:0.2 });
55
+
var scale =canvas.clientWidth/viewport.width;
56
+
57
+
var scaledViewport =page.getViewport({ scale: scale });
58
+
59
+
var context =canvas.getContext('2d');
60
+
canvas.height=scaledViewport.height;
61
+
canvas.width=scaledViewport.width;
62
+
63
+
var renderContext = {
64
+
canvasContext: context,
65
+
viewport: scaledViewport,
66
+
};
67
+
68
+
page.render(renderContext);
69
+
});
70
+
}
71
+
</script>
25
72
26
73
## Experiments:
27
74
28
-
The code was implemented in C++ using STD and Eigen. In this section we present some self-expplained results and perform a subjective quality assessment of the proposed method.
75
+
The code was implemented in C++ using STL and Eigen. In this section, we present some self-explanatory results and perform a subjective quality assessment of the proposed method.
29
76
30
-
## COnclusiones and future work.
31
-
The workaraound _does the trick_; NOS PERMITE ajustar a una nube de puntos en el espacio 3D de manera eficiente y robusta un toroide descentrado. EL ajuste de un toroide cuyo plano frontal de simetría tenga una orientación arbitraria complica enormemente el problema; la ecuación es aún más complicada de expresar, incluso aproximadamente, de manera cerrada. Si bien es cierto que la orientación puede integrarse como un paso desligado mediante un previo ajuste de plano como el plano frontal de simetría del toroide, así como su centraje mediante la aproximación con el cálculo del centroide de los puntos, encapsular enteramente la optimización en una formulación rigurosa esta abierta a una discusión como esta. Para una cercamiento a este tema ver (CITAR A TRABAJO PAPER DE ESE AJUSTE TOROIDE MÉTODO NOVEDOSO).
77
+
## Conclusions and Future Work:
78
+
79
+
The workaround _does the trick_; it allows us to fit a set of points in 3D space to an off-centered torus efficiently and robustly. Fitting a torus whose front symmetry plane has an arbitrary orientation complicates the problem significantly; the equation becomes even more complicated to express, even approximately, in a closed form. While the orientation can be integrated as a separate step by first fitting a plane as the torus's front symmetry plane, along with centering it using centroid approximation of the points, encapsulating the optimization entirely in a rigorous formulation is open for further discussion, such as the one presented here. For further exploration of this topic, refer to [7].
80
+
81
+
__A work in progress...__
32
82
33
83
## References
34
84
@@ -43,5 +93,5 @@ The workaraound _does the trick_; NOS PERMITE ajustar a una nube de puntos en el
0 commit comments