fix demo fitting in 2D (was pointing to demo instead of example)

This commit is contained in:
Pierre Alliez 2007-09-25 09:49:15 +00:00
parent bbae3117b7
commit fafd4f48f6
2 changed files with 24 additions and 12 deletions

View File

@ -1,21 +1,33 @@
This \cgal\ package provides functions to compute global information This \cgal\ package provides functions to compute global information
on the shape of a set of 2D or 3D objects such as points. It provides the computation of axis-aligned bounding boxes for point sets, barycenters of weighted point sets and centroids as well as linear least squares fitting for sets of points, circles, rectangles, segments and triangles in 2D and in addition to these, cuboids, spheres and tetrahedrons in 3D. It also provides the computation of centroids and linear least squares fitting for all $n-1$ manifolds of these $n$ dimensional geometries ($n = 2$ or $3$). It assumes the set of kernel primitive elements to be stored into an iterator range of a container.\\ on the shape of a set of 2D or 3D objects such as points. It provides
the computation of axis-aligned bounding boxes for point sets,
barycenters of weighted point sets and centroids as well as linear
least squares fitting for sets of points, circles, rectangles,
segments and triangles in 2D and in addition to these, cuboids,
spheres and tetrahedrons in 3D. It also provides the computation of
centroids and linear least squares fitting for all $n-1$ manifolds of
these $n$ dimensional geometries ($n = 2$ or $3$). It assumes the set
of kernel primitive elements to be stored into an iterator range of a
container.\\
\section{Definitions} \section{Definitions}
A \emph{bounding box} for a set of objects is a cuboid that completely A \emph{bounding box} for a set of objects is a cuboid that completely
contains the set. An \emph{axis-aligned bounding box} is a bounding box contains the set. An \emph{axis-aligned bounding box} is a bounding
aligned with the axes of the coordinate system.\\ box aligned with the axes of the coordinate system.\\
A \emph{centroid} is defined as average of position. A \emph{barycenter} of weighted point sets is defined as weighted average of position. When all weights are equal the barycenter coincides with the centroid.\\ A \emph{centroid} is defined as average of position. A
\emph{barycenter} of weighted point sets is defined as weighted
average of position. When all weights are equal the barycenter
coincides with the centroid.\\
Given a point set, \emph{linear least squares fitting} amounts to Given a point set, \emph{linear least squares fitting} amounts to find
find the linear sub-space which minimizes the sum of squared the linear sub-space which minimizes the sum of squared distances from
distances from the points to their projection onto this linear the points to their projection onto this linear sub-space. This
sub-space. This problem is equivalent to search for the linear problem is equivalent to search for the linear sub-space which
sub-space which maximizes the variance of projected points, the latter maximizes the variance of projected points, the latter being obtained
being obtained by eigen decomposition of the covariance by eigen decomposition of the covariance matrix of the point
matrix of the point set. Eigenvectors corresponding to large eigenvalues are the set. Eigenvectors corresponding to large eigenvalues are the
directions in which the data has strong component, or equivalently directions in which the data has strong component, or equivalently
large variance. If eigenvalues are the same there is no preferable large variance. If eigenvalues are the same there is no preferable
sub-space.\\ sub-space.\\

View File

@ -39,5 +39,5 @@ In the following example we use an \stl\ container of 2D points, and
compute the best fitting line. The kernel from which the input points compute the best fitting line. The kernel from which the input points
come is automatically deduced by the function. come is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting.cpp} \ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting_points_2.cpp}