 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
17 class GenericIndexedMesh;
27 static constexpr
int IGNORE_MAX_EDGE_LENGTH = 0;
29 static constexpr
bool DUPLICATE_VERTICES =
true;
30 static constexpr
bool DO_NOT_DUPLICATE_VERTICES =
false;
36 FLAG_GRAVITY_CENTER = 1,
42 enum CurvatureType { GAUSSIAN_CURV = 1, MEAN_CURV, NORMAL_CHANGE_RATE };
57 return m_associatedCloud;
69 std::string& outputErrorStr);
88 template <
class Vec2D>
90 std::vector<Vec2D>& points2D,
97 unsigned count = (m_associatedCloud ? m_associatedCloud->size() : 0);
98 if (!
count)
return false;
101 if (!planeEquation) {
102 planeEquation = getLSPlane();
103 if (!planeEquation)
return false;
108 points2D.resize(
count);
109 }
catch (
const std::bad_alloc&) {
115 CCVector3 G(0, 0, 0), u(1, 0, 0), v(0, 1, 0);
116 if ((vectorsUsage == UseOXYasBase) && O &&
X && Y) {
122 if ((vectorsUsage == UseYAsUpDir) && Y) {
123 v = (*Y - Y->dot(N) * N);
130 const CCVector3* _G = getGravityCenter();
136 for (
unsigned i = 0; i <
count; ++i) {
138 const CCVector3 P = *m_associatedCloud->getPoint(i) - G;
141 points2D[i] = Vec2D(P.
dot(u), P.
dot(v));
145 if (vectorsUsage != UseOXYasBase) {
181 double computeFeature(GeomFeature feature);
187 ScalarType computeMomentOrder1(
const CCVector3& P);
196 ScalarType computeRoughness(
const CCVector3& P,
197 const CCVector3* roughnessUpDir =
nullptr);
203 ScalarType computeCurvature(
const CCVector3& P, CurvatureType cType);
216 void setGravityCenter(
const CCVector3& G);
268 bool compute3DQuadric(
double quadricEquation[10]);
312 void computeGravityCenter();
314 bool computeLeastSquareBestFittingPlane();
316 bool computeQuadric();
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
@ Linearity
Definition: Neighbourhood.h:167
void normalize()
Sets vector norm to unity.
Definition: CVGeom.h:428
@ EigenEntropy
Definition: Neighbourhood.h:164
@ SurfaceVariation
Definition: Neighbourhood.h:170
@ Anisotropy
Definition: Neighbourhood.h:165
GenericIndexedCloudPersist * associatedCloud() const
Returns associated cloud.
Definition: Neighbourhood.h:56
@ PCA1
Definition: Neighbourhood.h:168
@ Verticality
Definition: Neighbourhood.h:172
Vector3Tpl cross(const Vector3Tpl &v) const
Cross product.
Definition: CVGeom.h:412
@ UseYAsUpDir
Definition: Neighbourhood.h:76
Definition: Neighbourhood.h:25
GenericIndexedCloudPersist * m_associatedCloud
Associated cloud.
Definition: Neighbourhood.h:319
@ EigenValue2
Definition: Neighbourhood.h:174
A generic mesh with index-based vertex access.
Definition: GenericIndexedMesh.h:37
A generic 3D point cloud with index-based and presistent access to points.
Definition: GenericIndexedCloudPersist.h:18
bool projectPointsOn2DPlane(std::vector< Vec2D > &points2D, const PointCoordinateType *planeEquation=nullptr, CCVector3 *O=nullptr, CCVector3 *X=nullptr, CCVector3 *Y=nullptr, InputVectorsUsage vectorsUsage=None)
Projects points on the best fitting LS plane.
Definition: Neighbourhood.h:89
Type dot(const Vector3Tpl &v) const
Dot product.
Definition: CVGeom.h:408
CCVector3 m_gravityCenter
Gravity center.
Definition: Neighbourhood.h:306
GeomFeature
Geometric feature computed from eigen values/vectors.
Definition: Neighbourhood.h:161
Tuple3ub m_quadricEquationDirections
2.5D Quadric equation dimensions
Definition: Neighbourhood.h:290
int count
Definition: FileIOFactory.cpp:132
InputVectorsUsage
Definition: Neighbourhood.h:76
GeomElement
Definition: Neighbourhood.h:34
void * X
Definition: SmallVector.cpp:45
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
@ EigenValue1
Definition: Neighbourhood.h:173
@ Sphericity
Definition: Neighbourhood.h:171
@ PCA2
Definition: Neighbourhood.h:169
@ Omnivariance
Definition: Neighbourhood.h:163
@ Planarity
Definition: Neighbourhood.h:166
unsigned char m_structuresValidity
Geometrical elements validity (flags)
Definition: Neighbourhood.h:309
CurvatureType
Curvature type.
Definition: Neighbourhood.h:42
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15