Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez, Florent Lafarge, Simon Giraudot
This component implements two primitive shape detection algorithms: efficient RANSAC and region growing. Planes are detected from point sets with unoriented normals. RANSAC also handles the following shapes: sphere, cylinder, cone and torus. Other types of shapes can be detected through implementing a class deriving from the base shape class.
Concept
Main Classes
Shape Interface
Shape Classes
Functions
Property Maps
|
template<typename PointRange , typename PointMap , typename PlaneRange , typename PlaneMap , typename IndexMap , typename Kernel > |
void | CGAL::regularize_planes (const PointRange &points, PointMap point_map, PlaneRange &planes, PlaneMap plane_map, IndexMap index_map, const Kernel &, bool regularize_parallelism, bool regularize_orthogonality, bool regularize_coplanarity, bool regularize_axis_symmetry, double tolerance_angle=25.0, double tolerance_coplanarity=0.01, typename Kernel::Vector_3 symmetry_direction=typename Kernel::Vector_3(0., 0., 1.)) |
| Given a set of detected planes with their respective inlier sets, this function enables to regularize the planes: More...
|
|
◆ regularize_planes()
template<typename PointRange , typename PointMap , typename PlaneRange , typename PlaneMap , typename IndexMap , typename Kernel >
void CGAL::regularize_planes |
( |
const PointRange & |
points, |
|
|
PointMap |
point_map, |
|
|
PlaneRange & |
planes, |
|
|
PlaneMap |
plane_map, |
|
|
IndexMap |
index_map, |
|
|
const Kernel & |
, |
|
|
bool |
regularize_parallelism, |
|
|
bool |
regularize_orthogonality, |
|
|
bool |
regularize_coplanarity, |
|
|
bool |
regularize_axis_symmetry, |
|
|
double |
tolerance_angle = 25.0 , |
|
|
double |
tolerance_coplanarity = 0.01 , |
|
|
typename Kernel::Vector_3 |
symmetry_direction = typename Kernel::Vector_3 (0., 0., 1.) |
|
) |
| |
#include <CGAL/regularize_planes.h>
Given a set of detected planes with their respective inlier sets, this function enables to regularize the planes:
- Planes near parallel can be made exactly parallel.
- Planes near orthogonal can be made exactly orthogonal.
- Planes parallel and near coplanar can be made exactly coplanar.
- Planes near symmetrical with a user-defined axis can be made exactly symmetrical.
Planes are directly modified. Points are left unaltered, as well as their relationships to planes (no transfer of point from a primitive plane to another).
The implementation follows [3].
- Template Parameters
-
- Parameters
-
points | range of points. |
point_map | property map: value_type of typename PointRange::const_iterator -> Point_3 |
planes | range of planes. |
plane_map | property map: value_type of typename PlaneRange::iterator -> Plane_3 |
index_map | property map: index of point std::size_t -> index of plane int (-1 if the point is not assigned to a plane) |
regularize_parallelism | Select whether parallelism is regularized or not. |
regularize_orthogonality | Select whether orthogonality is regularized or not. |
regularize_coplanarity | Select whether coplanarity is regularized or not. |
regularize_axis_symmetry | Select whether axis symmetry is regularized or not. |
tolerance_angle | Tolerance of deviation between normal vectors of planes (in degrees) used for parallelism, orthogonality and axis symmetry. Default value is 25 degrees. |
tolerance_coplanarity | Maximal distance between two parallel planes such that they are considered coplanar. Default value is 0.01. |
symmetry_direction | Chosen axis for symmetry regularization. Default value is the Z axis. |
- Examples:
- Point_set_shape_detection_3/plane_regularization.cpp.