ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvContourExtractor.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // CV_DB_LIB
11 #include <ecvPolyline.h>
12 
13 // cloudViewer
14 #include <PointProjectionTools.h>
15 
18 public:
21 
23 
42  bool allowMultiPass,
43  PointCoordinateType maxEdgeLength = 0,
44  const PointCoordinateType* preferredNormDim = 0,
45  const PointCoordinateType* preferredUpDir = 0,
46  ContourType contourType = FULL,
47  std::vector<unsigned>* originalPointIndexes = 0,
48  bool enableVisualDebugMode = false,
49  double maxAngleDeg = 0.0);
50 
53 
65  static bool ExtractFlatContour(
67  bool allowMultiPass,
68  PointCoordinateType maxEdgeLength,
69  std::vector<ccPolyline*>& parts,
70  bool allowSplitting = true,
71  const PointCoordinateType* preferredNormDim = 0,
72  bool enableVisualDebugMode = false);
73 
74 protected:
76 
92  static bool ExtractConcaveHull2D(
93  std::vector<cloudViewer::PointProjectionTools::IndexedCCVector2>&
94  points,
95  std::list<cloudViewer::PointProjectionTools::IndexedCCVector2*>&
96  hullPoints,
97  ContourType contourType,
98  bool allowMultiPass,
99  PointCoordinateType maxSquareLength = 0,
100  bool enableVisualDebugMode = false,
101  double maxAngleDeg = 90.0);
102 };
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
int points
Controur extractor (with debug GUI)
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.
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.
Colored polyline.
Definition: ecvPolyline.h:24
A generic 3D point cloud with index-based and presistent access to points.