Envelope extractor (with debug GUI)
More...
#include <ccEnvelopeExtractor.h>
|
static ccPolyline * | ExtractFlatEnvelope (CCCoreLib::GenericIndexedCloudPersist *points, bool allowMultiPass, PointCoordinateType maxEdgeLength=0, const PointCoordinateType *preferredNormDim=nullptr, const PointCoordinateType *preferredUpDir=nullptr, EnvelopeType envelopeType=FULL, std::vector< unsigned > *originalPointIndexes=nullptr, bool enableVisualDebugMode=false, double maxAngleDeg=0.0) |
| Extracts a unique closed (2D) envelope polyline of a point cloud. More...
|
|
static bool | ExtractFlatEnvelope (CCCoreLib::GenericIndexedCloudPersist *points, bool allowMultiPass, PointCoordinateType maxEdgeLength, std::vector< ccPolyline * > &parts, EnvelopeType envelopeType=FULL, bool allowSplitting=true, const PointCoordinateType *preferredNormDim=nullptr, const PointCoordinateType *preferredUpDir=nullptr, bool enableVisualDebugMode=false) |
| Extracts one or several parts of the (2D) envelope polyline of a point cloud. More...
|
|
|
static bool | ExtractConcaveHull2D (std::vector< CCCoreLib::PointProjectionTools::IndexedCCVector2 > &points, std::list< CCCoreLib::PointProjectionTools::IndexedCCVector2 * > &hullPoints, EnvelopeType envelopeType, bool allowMultiPass, PointCoordinateType maxSquareLength=0, bool enableVisualDebugMode=false, double maxAngleDeg=90.0) |
| Determines the 'concave' hull of a set of points. More...
|
|
Envelope extractor (with debug GUI)
◆ ExtractConcaveHull2D()
bool ccEnvelopeExtractor::ExtractConcaveHull2D |
( |
std::vector< CCCoreLib::PointProjectionTools::IndexedCCVector2 > & |
points, |
|
|
std::list< CCCoreLib::PointProjectionTools::IndexedCCVector2 * > & |
hullPoints, |
|
|
EnvelopeType |
envelopeType, |
|
|
bool |
allowMultiPass, |
|
|
PointCoordinateType |
maxSquareLength = 0 , |
|
|
bool |
enableVisualDebugMode = false , |
|
|
double |
maxAngleDeg = 90.0 |
|
) |
| |
|
staticprotected |
Determines the 'concave' hull of a set of points.
Inspired from JIN-SEO PARK AND SE-JONG OH, "A New Concave Hull Algorithm
and Concaveness Measure for n-dimensional Datasets", 2012 Calls extractConvexHull2D (see associated warnings).
- Note
- Almost the same method as CCCoreLib::PointProjectionTools::ExtractConcaveHull2D but with partial envelope support and visual debug mode.
- Parameters
-
points | input set of points |
hullPoints | output points (on the convex hull) |
envelopeType | type of envelope (above / below / full) |
allowMultiPass | whether to allow multi-pass process (with longer edges potentially generated so as 'disturb' the initial guess) |
maxSquareLength | maximum square length (ignored if <= 0, in which case the method simply returns the convex hull!) |
enableVisualDebugMode | whether to display a (debug) window to represent the algorithm process |
maxAngleDeg | max angle between segments (angle between 0 and 180, in degrees) |
- Returns
- success
◆ ExtractFlatEnvelope() [1/2]
bool ccEnvelopeExtractor::ExtractFlatEnvelope |
( |
CCCoreLib::GenericIndexedCloudPersist * |
points, |
|
|
bool |
allowMultiPass, |
|
|
PointCoordinateType |
maxEdgeLength, |
|
|
std::vector< ccPolyline * > & |
parts, |
|
|
EnvelopeType |
envelopeType = FULL , |
|
|
bool |
allowSplitting = true , |
|
|
const PointCoordinateType * |
preferredNormDim = nullptr , |
|
|
const PointCoordinateType * |
preferredUpDir = nullptr , |
|
|
bool |
enableVisualDebugMode = false |
|
) |
| |
|
static |
Extracts one or several parts of the (2D) envelope polyline of a point cloud.
Projects the cloud on its best fitting LS plane first.
- Warning
- output polylines set (parts) may be empty if all the vertices are too far from each other!
- Parameters
-
| points | point cloud |
| allowMultiPass | whether to allow multi-pass process (with longer edges potentially generated so as 'disturb' the initial guess) |
| maxEdgeLength | max edge length (ignored if 0, in which case the envelope is the convex hull) |
[out] | parts | output polyline parts |
| envelopeType | envelope type (FULL by default) |
| allowSplitting | whether the polyline can be split or not |
| preferredNormDim | to specifiy a preferred (normal) direction for the polyline extraction |
| preferredUpDir | to specifiy a preferred up direction for the polyline extraction (preferredNormDim must be defined as well and must be normal to this 'up' direction) |
| enableVisualDebugMode | whether to display a (debug) window to represent the algorithm process |
- Returns
- success
◆ ExtractFlatEnvelope() [2/2]
ccPolyline * ccEnvelopeExtractor::ExtractFlatEnvelope |
( |
CCCoreLib::GenericIndexedCloudPersist * |
points, |
|
|
bool |
allowMultiPass, |
|
|
PointCoordinateType |
maxEdgeLength = 0 , |
|
|
const PointCoordinateType * |
preferredNormDim = nullptr , |
|
|
const PointCoordinateType * |
preferredUpDir = nullptr , |
|
|
EnvelopeType |
envelopeType = FULL , |
|
|
std::vector< unsigned > * |
originalPointIndexes = nullptr , |
|
|
bool |
enableVisualDebugMode = false , |
|
|
double |
maxAngleDeg = 0.0 |
|
) |
| |
|
static |
Extracts a unique closed (2D) envelope polyline of a point cloud.
Projects the cloud on its best fitting LS plane first.
- Parameters
-
| points | point cloud |
| allowMultiPass | whether to allow multi-pass process (with longer edges potentially generated so as 'disturb' the initial guess) |
| maxEdgeLength | max edge length (ignored if 0, in which case the envelope is the convex hull) |
| preferredNormDim | to specifiy a preferred (normal) direction for the polyline extraction |
| preferredUpDir | to specifiy a preferred up direction for the polyline extraction (preferredNormDim must be defined as well and must be normal to this 'up' direction) |
| envelopeType | to specify a type of envelope (you should define a 'up' direction to get proper lower and upper envelope) |
[out] | originalPointIndexes | to get the indexes (relatively to the input cloud) of the output polyline vertices |
| enableVisualDebugMode | whether to display a (debug) window to represent the algorithm process |
| maxAngleDeg | max angle between segments (angle between 0 and 180, in degrees) |
- Returns
- envelope polyline (or 0 if an error occurred)
The documentation for this class was generated from the following files:
- ccEnvelopeExtractor.h
- ccEnvelopeExtractor.cpp