\( \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.11.1 - Point Set Shape Detection
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Point Set Shape Detection Reference

shapes_detail.png
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.


Introduced in: CGAL 4.7
BibTeX: cgal:ovja-pssd-18a
License: GPL
Windows Demo: Polyhedron demo
Common Demo Dlls: dlls

Classified Reference Pages

Concept

Main Classes

Shape Interface

Shape Classes

Functions

Modules

 Concepts
 
 Shapes
 

Files

file  Shape_detection_3.h
 Convenience header file including the headers of this package.
 
file  regularize_planes.h
 

Classes

class  CGAL::Shape_detection_3::Efficient_RANSAC< Traits >
 A shape detection algorithm using a RANSAC method. More...
 
struct  CGAL::Shape_detection_3::Efficient_RANSAC_traits< Gt, InputRange, InputPointMap, InputNormalMap >
 Default traits class to use the shape detection class Efficient_RANSAC. More...
 

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...
 

Function Documentation

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:

  • 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
Traitsa model of EfficientRANSACTraits
Parameters
shape_detectionShape 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_parallelismSelect whether parallelism is regularized or not.
regularize_orthogonalitySelect whether orthogonality is regularized or not.
regularize_coplanaritySelect whether coplanarity is regularized or not.
regularize_axis_symmetrySelect whether axis symmetry is regularized or not.
tolerance_angleTolerance of deviation between normal vectors of planes (in degrees) used for parallelism, orthogonality and axis symmetry. Default value is 25 degrees.
tolerance_coplanarityMaximal distance between two parallel planes such that they are considered coplanar. Default value is 0.01.
symmetry_directionChosen axis for symmetry regularization. Default value is the Z axis.

#include <CGAL/regularize_planes.h>

Examples:
Point_set_shape_detection_3/plane_regularization.cpp.