![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Controur extractor (with debug GUI) More...
#include <ecvContourExtractor.h>
Public Types | |
| enum | ContourType { LOWER , UPPER , FULL } |
| Contour type. More... | |
Static Public Member Functions | |
| static ccPolyline * | ExtractFlatContour (cloudViewer::GenericIndexedCloudPersist *points, bool allowMultiPass, PointCoordinateType maxEdgeLength=0, const PointCoordinateType *preferredNormDim=0, const PointCoordinateType *preferredUpDir=0, ContourType contourType=FULL, std::vector< unsigned > *originalPointIndexes=0, bool enableVisualDebugMode=false, double maxAngleDeg=0.0) |
| Extracts a unique closed (2D) contour polyline of a point cloud. More... | |
| static bool | ExtractFlatContour (cloudViewer::GenericIndexedCloudPersist *points, bool allowMultiPass, PointCoordinateType maxEdgeLength, std::vector< ccPolyline * > &parts, bool allowSplitting=true, const PointCoordinateType *preferredNormDim=0, bool enableVisualDebugMode=false) |
Static Protected Member Functions | |
| static bool | ExtractConcaveHull2D (std::vector< cloudViewer::PointProjectionTools::IndexedCCVector2 > &points, std::list< cloudViewer::PointProjectionTools::IndexedCCVector2 * > &hullPoints, ContourType contourType, bool allowMultiPass, PointCoordinateType maxSquareLength=0, bool enableVisualDebugMode=false, double maxAngleDeg=90.0) |
| Determines the 'concave' hull of a set of points. More... | |
Controur extractor (with debug GUI)
Definition at line 17 of file ecvContourExtractor.h.
|
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).
| points | input set of points |
| hullPoints | output points (on the convex hull) |
| contourType | type of contour (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) |
at least one of the new segments must be smaller than the initial one!
Definition at line 189 of file ecvContourExtractor.cpp.
References ccHObject::addChild(), cc2DLabel::addPickedPoint(), cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::ReferenceCloud::addPointIndex(), ccContourExtractorDlg::addToDisplay(), ccPointCloud::clear(), cross(), ccContourExtractorDlg::displayMessage(), cloudViewer::PointProjectionTools::extractConvexHull2D(), FindNearestCandidate(), FULL, ccGenericPointCloud::getOwnBB(), cloudViewer::PointProjectionTools::IndexedCCVector2::index, ccContourExtractorDlg::init(), ccContourExtractorDlg::isSkipped(), Edge::itA, LOWER, M_PI, max(), min(), Edge::nearestPointIndex, Edge::nearestPointSquareDist, POINT_FROZEN, POINT_NOT_USED, POINT_USED, points, ecvColor::red(), ccContourExtractorDlg::refresh(), ccContourExtractorDlg::removFromDisplay(), cloudViewer::ReferenceCloud::reserve(), ccPointCloud::reserve(), cloudViewer::Polyline::setClosed(), ccPolyline::setColor(), cc2DLabel::setDisplayedIn2D(), ccObject::setEnabled(), ccGenericPointCloud::setPointSize(), ccDrawableObject::setSelected(), ccDrawableObject::setVisible(), std::swap(), Vector2Tpl< Type >::x, Vector2Tpl< Type >::y, and ccContourExtractorDlg::zoomOn().
Referenced by ExtractFlatContour().
|
static |
Extracts one or several parts of the (2D) contour polyline of a point cloud Projects the cloud on its best fitting LS plane first.
| 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 contour is the convex hull) | |
| [out] | parts | output polyline parts |
| allowSplitting | whether the polyline can be split or not | |
| preferredNormDim | to specifiy a preferred (normal) direction for the polyline extraction | |
| enableVisualDebugMode | whether to display a (debug) window to represent the algorithm process |
Definition at line 798 of file ecvContourExtractor.cpp.
References cloudViewer::Polyline::clear(), ExtractFlatContour(), FULL, points, and ccPolyline::split().
|
static |
Extracts a unique closed (2D) contour polyline of a point cloud.
Projects the cloud on its best fitting LS plane first.
| 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 contour 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) | |
| contourType | to specify a type of contour (you should define a 'up' direction to get proper lower and upper contours) | |
| [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) |
Definition at line 659 of file ecvContourExtractor.cpp.
References ccHObject::addChild(), cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::ReferenceCloud::addPointIndex(), Vector3Tpl< Type >::cross(), CVLog::Error(), ExtractConcaveHull2D(), FULL, cloudViewer::Neighbourhood::None, points, cloudViewer::Neighbourhood::projectPointsOn2DPlane(), cloudViewer::ReferenceCloud::reserve(), ccPointCloud::reserve(), cloudViewer::Polyline::setClosed(), ccObject::setEnabled(), ccObject::setName(), ccDrawableObject::setVisible(), Tuple3Tpl< Type >::u, cloudViewer::Neighbourhood::UseOXYasBase, cloudViewer::Neighbourhood::UseYAsUpDir, Vector3Tpl< PointCoordinateType >::vdot(), Vector3Tpl< PointCoordinateType >::vnormalize(), CVLog::Warning(), X, and Tuple3Tpl< Type >::y.
Referenced by ExtractFlatContour().