PCA: more on reference manual

This commit is contained in:
Pierre Alliez 2008-11-30 18:34:26 +00:00
parent 1e149165f3
commit 8867461839
9 changed files with 34 additions and 37 deletions

1
.gitattributes vendored
View File

@ -3046,6 +3046,7 @@ Principal_component_analysis/demo/Principal_component_analysis/windows/3d/res/id
Principal_component_analysis/demo/Principal_component_analysis/windows/3d/res/idb6.bmp -text svneol=unset#image/bmp
Principal_component_analysis/demo/Principal_component_analysis/windows/3d/res/idb7.bmp -text svneol=unset#image/bmp
Principal_component_analysis/demo/Principal_component_analysis/windows/3d/res/idb8.bmp -text svneol=unset#image/bmp
Principal_component_analysis/doc_tex/Principal_component_analysis/examples.tex -text
Principal_component_analysis/doc_tex/Principal_component_analysis/fit.eps -text svneol=unset#application/postscript
Principal_component_analysis/doc_tex/Principal_component_analysis/fit.png -text svneol=unset#image/png
Principal_component_analysis/doc_tex/Principal_component_analysis/teaserLeastSquaresFitting-large.png -text

View File

@ -0,0 +1,22 @@
\section{Examples\label{subsec:pca_examples}}
\subsection{Bounding Box}
In the following example we use \stl\ containers of 2D points, 3D points and 3D segments, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/bounding_box.cpp}
\subsection{Centroid}
In the following example we use \stl\ containers of 2D points, 3D points and 3D triangles, and compute their centroid. The kernel from which the input points originate is automatically deduced by the function. The dimension tag indicates the dimension of the objects being fitted (0 for points, and 2 for triangles). Note that it is also possible to compute the centroid of the triangle edges (3D segments) by specifying 1 as dimension tag, and of the triangle vertices (3D points) by specifying 0 as dimension tag.
\ccIncludeExampleCode{Principal_component_analysis/centroid.cpp}
\subsection{Barycenter of a Set of Weighted Points}
In the following example we use \stl\ containers of 2D and 3D weighted points, and compute their barycenter. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/barycenter.cpp}
\subsection{Least Squares Fitting of a Line to a 2D Point Set}
In the following example we use an \stl\ container of 2D points, and compute the best fitting line in the least squares sense. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting_points_2.cpp}
\subsection{Least Squares Fitting of a Line and a Plane to a 3D Triangle Set}
In the following example we use an \stl\ container of 3D triangles, and compute the best fitting line and plane in the least squares sense. The kernel from which the input points originate is automatically deduced by the function. We fit either the whole triangles, the triangle edges or the triangle vertices.
\ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp}

View File

@ -1,5 +1,4 @@
This package provides functions to analyze sets of objects in 2D and 3D. It provides the computation of axis-aligned bounding boxes, centers of mass and principal component analysis for all bounded objects, as well as barycenters for sets of weighted points.\\
This package provides functions to analyze sets of objects in 2D and 3D. It provides the computation of axis-aligned bounding boxes, centers of mass and principal component analysis for all bounded objects, as well as barycenters for sets of weighted points. Note that unlike most of the CGAL packages, this package uses approximation methods (in particular for linear least squares fitting) and is not intended to provide an exact canonical result in any sense.
\section{Definitions}

View File

@ -6,26 +6,5 @@
\input{Principal_component_analysis/intro}
\input{Principal_component_analysis/PkgDescription}
\section{Examples\label{subsec:pca_examples}}
\subsection{Bounding Box}
In the following example we use \stl\ containers of 2D points, 3D points and 3D segments, and compute their axis-aligned bounding box. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/bounding_box.cpp}
\subsection{Centroid}
In the following example we use \stl\ containers of 2D points, 3D points and 3D triangles, and compute their centroid. The kernel from which the input points originate is automatically deduced by the function. The dimension tag indicates the dimension of the objects being fitted (0 for points, and 2 for triangles). Note that it is also possible to compute the centroid of the triangle edges (3D segments) by specifying 1 as dimension tag, and of the triangle vertices (3D points) by specifying 0 as dimension tag.
\ccIncludeExampleCode{Principal_component_analysis/centroid.cpp}
\subsection{Barycenter of a Set of Weighted Points}
In the following example we use \stl\ containers of 2D and 3D weighted points, and compute their barycenter. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/barycenter.cpp}
\subsection{Least Squares Fitting of a Line to a 2D Point Set}
In the following example we use an \stl\ container of 2D points, and compute the best fitting line in the least squares sense. The kernel from which the input points originate is automatically deduced by the function.
\ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting_points_2.cpp}
\subsection{Least Squares Fitting of a Line and a Plane to a 3D Triangle Set}
In the following example we use an \stl\ container of 3D triangles, and compute the best fitting line and plane in the least squares sense. The kernel from which the input points originate is automatically deduced by the function. We fit either the whole triangles, the triangle edges or the triangle vertices.
\ccIncludeExampleCode{Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp}
\input{Principal_component_analysis/examples}

View File

@ -13,15 +13,12 @@
\ccDefinition
The function \ccRefName\ computes the barycenter (weighted center of mass) of a
set of weighted 2D or 3D objects. The weight associated to each object is
specified using a \ccc{std::pair} storing the object and its weight.
set of 2D or 3D weighted points. The weight associated to each point is
specified using a \ccc{std::pair} storing the point and its weight.
\ccInclude{CGAL/barycenter.h}
There is a set of overloaded \ccc{barycenter} functions for 2D and 3D
weighted objects.
The user can also optionally pass an explicit kernel, in case the default,
based on \ccc{Kernel_traits} is not sufficient.
There is a set of overloaded \ccc{barycenter} functions for 2D and 3D weighted points. The user can also optionally pass an explicit kernel, in case the default, based on \ccc{Kernel_traits} is not sufficient.
The dimension is also deduced automatically.
\ccFunction{template < typename InputIterator >

View File

@ -12,7 +12,8 @@
\ccDefinition
The function \ccRefName\ computes the bounding box of a set of 2D or 3D objects.
The function \ccRefName\ computes the axis-aligned bounding box of a set of 2D or 3D objects. The function is implemented for all bounded objects from the 2D and 3D kernels such as points, segments, triangles, etc.
The bounding box is returned as an iso rectangle in 2D and as an iso cuboid in 3D.
\ccInclude{CGAL/bounding_box.h}

View File

@ -1,7 +1,7 @@
% +------------------------------------------------------------------------+
% | Reference manual page
% +------------------------------------------------------------------------+
% | March 2005 Pierre Alliez and Sylvain Pion and Ankit Gupta
% | November 2008 Pierre Alliez and Sylvain Pion and Ankit Gupta
% | Package: Principal Component Analysis
% |
% |
@ -11,9 +11,7 @@
\ccChapterAuthor{Pierre Alliez, Sylvain Pion and Ankit Gupta}
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, and barycenters of weighted point sets. The set of kernel primitive elements are accessed through an iterator range.\\
In addition, it computes centroids as well as linear least squares fitting for sets of points, circles, rectangles, segments and triangles in 2D and of points, segments, triangles, cuboids, spheres and tetrahedra in 3D. For each object type in 2D and 3D, it allows the user to specify the dimension of the object fitted. For example, it is possible to fit a set of balls by providing an iterator range of spheres and specifying dimension 3. It is also possible to fit only the edges of a set of tetrahedra by specifying dimension 1, etc.
This \cgal\ package provides functions to compute global information about the shape of a set of 2D or 3D objects. It provides the computation of axis-aligned bounding boxes for sets of bounded objects, and barycenters of weighted point sets. In addition, it provides computation of centroids (center of mass) and linear least squares fitting for point sets as well as for sets of other bounded objects. More specifically, it is possible to fit 2D lines to 2D segments, circles, disks, iso rectangles and triangles, as well as to fit 3D lines or 3D planes to 3D segments, triangles, iso cuboids, tetrahedra, spheres and balls. The common interface to these functions takes an iterator range of objects.}
\section{Classified Reference Pages}

View File

@ -13,7 +13,7 @@
\ccDefinition
The function \ccRefName\ computes the best fitting 2D line of a 2D object set of points, segments, triangles, rectangles and circles. The best fit line minimizes the sum of squared distances from the points comprising these objects to their projections onto the line.
The function \ccRefName\ computes the 2D best fitting line (in the least squares sense) of a set of 2D objects such as points, segments, triangles, iso rectangles and circles. The best fitting line minimizes the sum of squared distances from all points comprising these objects to their orthogonal projections onto the line.
\ccInclude{CGAL/linear_least_squares_fitting_2.h}

View File

@ -1,6 +1,6 @@
\input{Principal_component_analysis_ref/intro}
\input{Principal_component_analysis_ref/barycenter}
\input{Principal_component_analysis_ref/bounding_box}
\input{Principal_component_analysis_ref/centroid}
\input{Principal_component_analysis_ref/barycenter}
\input{Principal_component_analysis_ref/linear_least_squares_fitting_2}
\input{Principal_component_analysis_ref/linear_least_squares_fitting_3}