ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
qCanupoTools Class Reference

CANUPO generic tools. More...

#include <qCanupoTools.h>

Classes

struct  EvalParameters
 Classifer evaluation parameters. More...
 

Static Public Member Functions

template<typename T >
static bool Fpeq (T a, T b, T epsilon=static_cast< T >(1.0e-6))
 Returns whether two numbers are almost equal or not. More...
 
static bool CompareVectors (const std::vector< float > &first, const std::vector< float > &second)
 Compares two vectors. More...
 
static size_t TestVectorsOverlap (const std::vector< float > &first, const std::vector< float > &second)
 Tests whether a vector contains the values of another one (at the end!) More...
 
static bool ComputeCorePointsDescriptors (cloudViewer::GenericIndexedCloud *corePoints, CorePointDescSet &corePointsDescriptors, ccGenericPointCloud *sourceCloud, const std::vector< float > &sortedScales, bool &invalidDescriptors, QString &error, unsigned descriptorID=DESC_DIMENSIONALITY, int maxThreadCount=0, cloudViewer::GenericProgressCallback *progressCb=0, cloudViewer::DgmOctree *inputOctree=0, std::vector< ccScalarField * > *roughnessSFs=0)
 Computes the 'descriptors' for various scales on core points only. More...
 
static QString GetEntityName (ccHObject *obj)
 Returns a long description of a given entity (name + [ID]) More...
 
static ccPointCloud * GetCloudFromCombo (QComboBox *comboBox, ccHObject *dbRoot)
 
static bool TrainClassifier (Classifier &classifier, const CorePointDescSet &descriptors1, const CorePointDescSet &descriptors2, const std::vector< float > &scales, ccPointCloud *mscCloud, const CorePointDescSet *evaluationDescriptors=0, ecvMainAppInterface *app=0)
 Trains a classifier. More...
 
static bool EvaluateClassifier (const Classifier &classifier, const CorePointDescSet &descriptors1, const CorePointDescSet &descriptors2, const std::vector< float > &scales, EvalParameters &params)
 Evaluates a classifier. More...
 

Detailed Description

CANUPO generic tools.

Member Function Documentation

◆ CompareVectors()

bool qCanupoTools::CompareVectors ( const std::vector< float > &  first,
const std::vector< float > &  second 
)
static

Compares two vectors.

Returns
true if both are 'equivalent' (i.e. same number of values, almost same values, same order)

◆ ComputeCorePointsDescriptors()

◆ EvaluateClassifier()

◆ Fpeq()

template<typename T >
static bool qCanupoTools::Fpeq ( T  a,
T  b,
T  epsilon = static_cast<T>(1.0e-6) 
)
inlinestatic

Returns whether two numbers are almost equal or not.

References a.

◆ GetCloudFromCombo()

ccPointCloud * qCanupoTools::GetCloudFromCombo ( QComboBox *  comboBox,
ccHObject *  dbRoot 
)
static

Returns the cloud associated to the currently selected item of a combox box Relies on the item associated data (itemData) that should be equal to the cloud's ID.

References ccHObject::find(), ccObject::isA(), and CV_TYPES::POINT_CLOUD.

Referenced by qCanupoTrainingDialog::getClass1Cloud(), qCanupoTrainingDialog::getClass2Cloud(), qCanupoClassifDialog::getCorePointsCloud(), qCanupoTrainingDialog::getEvaluationCloud(), and qCanupoTrainingDialog::getOriginPointCloud().

◆ GetEntityName()

QString qCanupoTools::GetEntityName ( ccHObject *  obj)
static

Returns a long description of a given entity (name + [ID])

References ccObject::getName(), ccObject::getUniqueID(), and name.

Referenced by qCanupoClassifDialog::qCanupoClassifDialog(), and qCanupoTrainingDialog::qCanupoTrainingDialog().

◆ TestVectorsOverlap()

size_t qCanupoTools::TestVectorsOverlap ( const std::vector< float > &  first,
const std::vector< float > &  second 
)
static

Tests whether a vector contains the values of another one (at the end!)

Returns
number of matching elements

Referenced by qCanupoProcess::Classify().

◆ TrainClassifier()

bool qCanupoTools::TrainClassifier ( Classifier &  classifier,
const CorePointDescSet &  descriptors1,
const CorePointDescSet &  descriptors2,
const std::vector< float > &  scales,
ccPointCloud *  mscCloud,
const CorePointDescSet *  evaluationDescriptors = 0,
ecvMainAppInterface *  app = 0 
)
static

The documentation for this class was generated from the following files: