Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez
This component implements an efficient RANSAC-based primitive shape detection algorithm for point sets with unoriented normals. Five types of primitive shapes are detected: plane, 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
|
template<typename EfficientRANSACTraits > |
void | CGAL::regularize_planes (const Shape_detection_3::Efficient_RANSAC< EfficientRANSACTraits > &shape_detection, bool regularize_parallelism, bool regularize_orthogonality, bool regularize_coplanarity, bool regularize_axis_symmetry, typename EfficientRANSACTraits::FT tolerance_angle=(typename EfficientRANSACTraits::FT) 25.0, typename EfficientRANSACTraits::FT tolerance_coplanarity=(typename EfficientRANSACTraits::FT) 0.01, typename EfficientRANSACTraits::Vector_3 symmetry_direction=typename EfficientRANSACTraits::Vector_3((typename EfficientRANSACTraits::FT) 0.,(typename EfficientRANSACTraits::FT) 0.,(typename EfficientRANSACTraits::FT) 1.)) |
| Given a set of detected planes with their respective inlier sets, this function enables to regularize the planes: More...
|
|
template<typename EfficientRANSACTraits >
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 [2].
- Template Parameters
-
- Parameters
-
shape_detection | Shape detection object used to detect shapes from the input data. While the shape detection algorithm deals with several types of primitive shapes only planes can be regularized. |
- Warning
- The
shape_detection
parameter must have already detected shapes. If no plane exists in it, the regularization function doesn't do anything.
- Parameters
-
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. |
#include <CGAL/regularize_planes.h>
- Examples:
- Point_set_shape_detection_3/plane_regularization.cpp.