diff --git a/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt b/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt index 1942d113cf9..4b6d02ed23a 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/PackageDescription.txt @@ -32,7 +32,7 @@ - `CGAL::jet_smooth_point_set()` - `CGAL::jet_estimate_normals()` - `CGAL::pca_estimate_normals()` -- `CGAL::vcm_compute()` +- `CGAL::compute_vcm()` - `CGAL::vcm_estimate_normals()` - `CGAL::is_on_edge()` - `CGAL::write_off_points()` diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt index d2357ee9491..0d13ea2eb33 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt @@ -223,7 +223,7 @@ Function `is_on_edge()` indicates if a points belong to a feature edges of the point set using its Voronoi Covariance Measure. It is based on the article \cgalCite{cgal:mog-vbcfe-11}. -It first computes the VCM of the points set using `vcm_compute()`. Then, it estimates +It first computes the VCM of the points set using `compute_vcm()`. Then, it estimates which points belong to a sharp edge by testing if a ratio of eigenvalues is greater than a given threshold. diff --git a/Point_set_processing_3/examples/Point_set_processing_3/edges_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/edges_example.cpp index b136af8cc75..4178520c5a9 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/edges_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/edges_example.cpp @@ -39,7 +39,7 @@ int main (int , char**) { std::vector cov; CGAL::First_of_pair_property_map point_pmap; - CGAL::vcm_compute(points.begin(), points.end(), point_pmap, cov, R, r, Kernel()); + CGAL::compute_vcm(points.begin(), points.end(), point_pmap, cov, R, r, Kernel()); // Find the points on the edges. // Note that this step is not expensive and can be done several time to get better results diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h index 885668f0259..6221622de1f 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h @@ -42,9 +42,21 @@ namespace CGAL { -/// Determine if a point is on an edge using the VCM of the point. -/// A point will be considered as an edge point iff it satisfies a criteria -/// relating the eigenvalues of its VCM. +/// determines if a point is on a sharp feature edge from point set +/// for which the Voronoi covariance Measures have been computed. +/// +/// The sharpness of the edge is defined by the parameter `threshold`. +/// is used to filtered points according to the external angle around a sharp feature. +/// +/// A point is considered to be on a sharp feature if the external angle `alpha` at the edge is such that +/// `alpha >> 2 / sqrt(3) * sqrt(threshold)`. +/// In particular this means that is the input contains sharp features +/// with different external angles, the one with the smallest external angle should be considered +/// which however will result in selecting more points in sharper regions. +/// More details are given in \cgalCite{cgal:mog-vbcfe-11}. +/// +/// \sa CGAL::compute_vcm()` +/// template bool is_on_edge (Covariance &cov, @@ -228,11 +240,11 @@ compute_delaunay_graph (Undirected_Graph& g, ///< constructed graph. /// Estimates the feature edges of the `[first, beyond)` range of points /// using the Voronoi Covariance Measure. /// It returns a vector of all the points that have been estimated as edge points. -/// It mainly consists in computing the VCM using `vcm_compute` and then +/// It mainly consists in computing the VCM using `compute_vcm` and then /// determining which point must be considered as an edge one or not (using a criterion /// based on the eigenvalues of the covariance matrices). /// -/// See `vcm_compute()` for more details on the VCM. +/// See `compute_vcm()` for more details on the VCM. /// /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`. @@ -260,7 +272,7 @@ vcm_estimate_edges (ForwardIterator first, ///< iterator over the first input po // Compute the VCM and convolve it std::vector cov; - vcm_compute(first, beyond, + compute_vcm(first, beyond, point_pmap, cov, R, diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index 7d8374269c2..621c1953015 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -230,7 +230,7 @@ template < class ForwardIterator, class Covariance > void -vcm_compute (ForwardIterator first, +compute_vcm (ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, std::vector &ccov, @@ -263,7 +263,7 @@ vcm_compute (ForwardIterator first, /// @cond SKIP_IN_MANUAL /// Estimates normal directions of the `[first, beyond)` range of points -/// using the Voronoi Covariance Measure (see `vcm_compute` for more details on the VCM). +/// using the Voronoi Covariance Measure (see `compute_vcm` for more details on the VCM). /// The output normals are randomly oriented. /// /// @tparam ForwardIterator iterator over input points. @@ -297,7 +297,7 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input // Compute the VCM and convolve it std::vector cov; if (nb_neighbors_convolve == -1) { - vcm_compute(first, beyond, + compute_vcm(first, beyond, point_pmap, cov, R, @@ -340,11 +340,12 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input /// @endcond /// \ingroup PkgPointSetProcessing -/// Estimates normal directions of the `[first, beyond)` range of points +/// Estimates normal directions of the points in the range `[first, beyond)` /// using the Voronoi Covariance Measure with a radius for the convolution. /// The output normals are randomly oriented. /// -/// See `vcm_compute()` for more details on the VCM. +/// See `compute_vcm()` for a detailed description of the parameters `R` and `r` +/// and of the Voronoi Covariance Measure. /// /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`. @@ -361,8 +362,8 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input ForwardIterator beyond, ///< past-the-end iterator over the input points. PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3. NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. - double R, ///< offset radius: radius of the sphere to intersect the Voronoi cell with. - double r ///< convolution radius: all points in a sphere with this radius will be convolved. + double R, ///< offset radius. + double r ///< convolution radius. ) { typedef typename boost::property_traits::value_type Point; @@ -378,11 +379,12 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input } /// \ingroup PkgPointSetProcessing -/// Estimates normal directions of the `[first, beyond)` range of points +/// Estimates normal directions of the points in the range `[first, beyond)` /// using the Voronoi Covariance Measure with a number of neighbors for the convolution. /// The output normals are randomly oriented. /// -/// See `vcm_compute()` for more details on the VCM. +/// See `compute_vcm()` for a detailed description of the parameter `R` +/// and of the Voronoi Covariance Measure. /// /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`. @@ -399,7 +401,7 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input ForwardIterator beyond, ///< past-the-end iterator over the input points. PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3. NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. - double R, ///< offset radius: radius of the sphere to intersect the Voronoi cell with. + double R, ///< offset radius. unsigned int nb_neighbors_convolve ///< number of neighbor points used for the convolution. ) {