\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12.1 - Classification
CGAL::Classification::Point_set_feature_generator< GeomTraits, PointRange, PointMap, ConcurrencyTag, DiagonalizeTraits > Class Template Reference

#include <CGAL/Classification/Point_set_feature_generator.h>

Definition

Generates a set of generic features for point set classification.

This class takes care of computing all necessary data structures and of generating a set of generic features at multiple scales to increase the reliability of the classification.

Template Parameters
GeomTraitsmodel of CGAL Kernel.
PointRangemodel of ConstRange. Its iterator type is RandomAccessIterator and its value type is the key type of PointMap.
PointMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is GeomTraits::Point_3.
ConcurrencyTagenables sequential versus parallel algorithm. Possible values are Parallel_tag (default value is CGAL is linked with TBB) or Sequential_tag (default value otherwise).
DiagonalizeTraitsmodel of DiagonalizeTraits used for matrix diagonalization. It can be omitted: if Eigen 3 (or greater) is available and CGAL_EIGEN3_ENABLED is defined then an overload using Eigen_diagonalize_traits is provided. Otherwise, the internal implementation Diagonalize_traits is used.

Public Types

typedef GeomTraits::Iso_cuboid_3 Iso_cuboid_3
 
typedef Classification::Planimetric_grid< GeomTraits, PointRange, PointMap > Planimetric_grid
 
typedef Classification::Point_set_neighborhood< GeomTraits, PointRange, PointMap > Neighborhood
 
typedef Classification::Local_eigen_analysis Local_eigen_analysis
 

Public Member Functions

template<typename VectorMap = Default, typename ColorMap = Default, typename EchoMap = Default>
 Point_set_feature_generator (Feature_set &features, const PointRange &input, PointMap point_map, std::size_t nb_scales, VectorMap normal_map=VectorMap(), ColorMap color_map=ColorMap(), EchoMap echo_map=EchoMap())
 Generates all possible features from an input range. More...
 
const Iso_cuboid_3bbox () const
 Returns the bounding box of the input point set.
 
const Neighborhoodneighborhood (std::size_t scale=0) const
 Returns the neighborhood structure at scale scale.
 
const Planimetric_gridgrid (std::size_t scale=0) const
 Returns the planimetric grid structure at scale scale.
 
const Local_eigen_analysiseigen (std::size_t scale=0) const
 Returns the local eigen analysis structure at scale scale.
 
std::size_t number_of_scales () const
 Returns the number of scales that were computed.
 
float grid_resolution (std::size_t scale=0) const
 Returns the grid resolution at scale scale. More...
 
float radius_neighbors (std::size_t scale=0) const
 Returns the radius used for neighborhood queries at scale scale. More...
 
float radius_dtm (std::size_t scale=0) const
 Returns the radius used for digital terrain modeling at scale scale. More...
 

Constructor & Destructor Documentation

◆ Point_set_feature_generator()

template<typename GeomTraits , typename PointRange , typename PointMap , typename ConcurrencyTag , typename DiagonalizeTraits >
template<typename VectorMap = Default, typename ColorMap = Default, typename EchoMap = Default>
CGAL::Classification::Point_set_feature_generator< GeomTraits, PointRange, PointMap, ConcurrencyTag, DiagonalizeTraits >::Point_set_feature_generator ( Feature_set features,
const PointRange &  input,
PointMap  point_map,
std::size_t  nb_scales,
VectorMap  normal_map = VectorMap(),
ColorMap  color_map = ColorMap(),
EchoMap  echo_map = EchoMap() 
)

Generates all possible features from an input range.

The size of the smallest scale is automatically estimated using a method equivalent to CGAL::compute_average_spacing() using 6 neighbors. The data structures needed (Neighborhood, Planimetric_grid and Local_eigen_analysis) are computed at nb_scales recursively larger scales. At each scale, the following features are generated:

If normal vectors are provided (if VectorMap is different from CGAL::Default), the following feature is generated at each scale:

If colors are provided (if ColorMap is different from CGAL::Default), the following features are generated at each scale:

If echo numbers are provided (if EchoMap is different from CGAL::Default), the following feature is computed at each scale:

Template Parameters
VectorMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is GeomTraits::Vector_3.
ColorMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is CGAL::Classification::RGB_Color.
EchoMapmodel of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is std::size_t.
Parameters
featuresthe feature set where the features are instantiated.
inputpoint range.
point_mapproperty map to access the input points.
nb_scalesnumber of scales to compute.
normal_mapproperty map to access the normal vectors of the input points (if any).
color_mapproperty map to access the colors of the input points (if any).
echo_mapproperty map to access the echo values of the input points (if any).

Member Function Documentation

◆ grid_resolution()

template<typename GeomTraits , typename PointRange , typename PointMap , typename ConcurrencyTag , typename DiagonalizeTraits >
float CGAL::Classification::Point_set_feature_generator< GeomTraits, PointRange, PointMap, ConcurrencyTag, DiagonalizeTraits >::grid_resolution ( std::size_t  scale = 0) const

Returns the grid resolution at scale scale.

This resolution is the length and width of a cell of the Planimetric_grid defined at this scale.

◆ radius_dtm()

template<typename GeomTraits , typename PointRange , typename PointMap , typename ConcurrencyTag , typename DiagonalizeTraits >
float CGAL::Classification::Point_set_feature_generator< GeomTraits, PointRange, PointMap, ConcurrencyTag, DiagonalizeTraits >::radius_dtm ( std::size_t  scale = 0) const

Returns the radius used for digital terrain modeling at scale scale.

This radius represents the minimum size of a building at this scale.

◆ radius_neighbors()

template<typename GeomTraits , typename PointRange , typename PointMap , typename ConcurrencyTag , typename DiagonalizeTraits >
float CGAL::Classification::Point_set_feature_generator< GeomTraits, PointRange, PointMap, ConcurrencyTag, DiagonalizeTraits >::radius_neighbors ( std::size_t  scale = 0) const

Returns the radius used for neighborhood queries at scale scale.

This radius is the smallest radius that is relevant from a geometric point of view at this scale (that is to say that encloses a few cells of Planimetric_grid).