![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <classifier.h>

Classes | |
| struct | FileHeader |
| Classifier's file header info. More... | |
Public Types | |
| typedef Vector2Tpl< float > | Point2D |
| 2D point More... | |
Public Member Functions | |
| Classifier () | |
| Default constructor. More... | |
| bool | checkRefPoints () |
| Checks the ref. points. More... | |
| float | classify2D_checkcondnum (const Point2D &P, const Point2D &R, float &condnumber) const |
| Checks numerical condition. More... | |
| float | classify2D (const Point2D &P) const |
| Classification in the 2D space. More... | |
| Point2D | project (const CorePointDesc &mscdata) const |
| Projects a parameter vector in (2D) MSC space. More... | |
| float | classify (const CorePointDesc &mscdata) const |
| Classification in MSC space. More... | |
| bool | save (QString filename, QString &error) |
| Saves classifier as a CANUPO's classifier file (.prm) More... | |
Static Public Member Functions | |
| static bool | Load (QString filename, std::vector< Classifier > &classifiers, std::vector< float > &scales, QString &error, FileHeader *header=0, bool headerOnly=false) |
| Loads a CANUPO's classifier file (.prm) More... | |
Public Attributes | |
| int | class1 |
| int | class2 |
| std::vector< float > | weightsAxis1 |
| std::vector< float > | weightsAxis2 |
| std::vector< Point2D > | path |
| float | absMaxXY |
| float | axisScaleRatio |
| Point2D | refPointPos |
| Point2D | refPointNeg |
| unsigned | descriptorID |
| Associated descriptor ID (see ccPointDescriptor.h) More... | |
| unsigned | dimPerScale |
| Dimension (per-scale) More... | |
| std::vector< float > | scales |
| Associated scales. More... | |
Definition at line 23 of file classifier.h.
| typedef Vector2Tpl<float> Classifier::Point2D |
2D point
Definition at line 26 of file classifier.h.
| Classifier::Classifier | ( | ) |
Default constructor.
Definition at line 17 of file classifier.cpp.
| bool Classifier::checkRefPoints | ( | ) |
Checks the ref. points.
Exchanges refPointPos and refPointNeg if necessary as the user may have moved them.
Definition at line 25 of file classifier.cpp.
References refPointNeg, refPointPos, std::swap(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by Load().
| float Classifier::classify | ( | const CorePointDesc & | mscdata | ) | const |
Classification in MSC space.
Definition at line 152 of file classifier.cpp.
References classify2D(), and project().
Referenced by qCanupoProcess::Classify(), and qCanupoTools::EvaluateClassifier().
| float Classifier::classify2D | ( | const Point2D & | P | ) | const |
Classification in the 2D space.
Definition at line 119 of file classifier.cpp.
References classify2D_checkcondnum(), refPointNeg, and refPointPos.
Referenced by classify().
| float Classifier::classify2D_checkcondnum | ( | const Point2D & | P, |
| const Point2D & | R, | ||
| float & | condnumber | ||
| ) | const |
Checks numerical condition.
Definition at line 34 of file classifier.cpp.
References Vector2Tpl< Type >::dot(), fabs(), min(), Vector2Tpl< Type >::norm(), Vector2Tpl< Type >::norm2(), Vector2Tpl< Type >::normalize(), path, Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by classify2D().
|
static |
Loads a CANUPO's classifier file (.prm)
Definition at line 157 of file classifier.cpp.
References absMaxXY, axisScaleRatio, checkRefPoints(), class1, class2, Classifier::FileHeader::classifierCount, Classifier::FileHeader::descID, descriptorID, Classifier::FileHeader::dimPerScale, dimPerScale, error(), filename, path, refPointNeg, refPointPos, scales, weightsAxis1, weightsAxis2, Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by qCanupoClassifDialog::browseClassifierFile(), and qCanupoProcess::Classify().
| Classifier::Point2D Classifier::project | ( | const CorePointDesc & | mscdata | ) | const |
Projects a parameter vector in (2D) MSC space.
Definition at line 129 of file classifier.cpp.
References CorePointDesc::params, weightsAxis1, weightsAxis2, Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by classify().
| bool Classifier::save | ( | QString | filename, |
| QString & | error | ||
| ) |
Saves classifier as a CANUPO's classifier file (.prm)
Definition at line 299 of file classifier.cpp.
References absMaxXY, axisScaleRatio, class1, class2, DESC_DIMENSIONALITY, descriptorID, dimPerScale, error(), filename, path, refPointNeg, refPointPos, scales, weightsAxis1, weightsAxis2, Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by qCanupo2DViewDialog::saveClassifier().
| float Classifier::absMaxXY |
Definition at line 73 of file classifier.h.
| float Classifier::axisScaleRatio |
Definition at line 73 of file classifier.h.
Referenced by DilateClassifier(), Load(), and save().
| int Classifier::class1 |
Definition at line 70 of file classifier.h.
Referenced by qCanupoProcess::Classify(), Load(), RefinePointClassif(), save(), and qCanupo2DViewDialog::trainClassifier().
| int Classifier::class2 |
Definition at line 70 of file classifier.h.
Referenced by qCanupoProcess::Classify(), Load(), RefinePointClassif(), save(), and qCanupo2DViewDialog::trainClassifier().
| unsigned Classifier::descriptorID |
Associated descriptor ID (see ccPointDescriptor.h)
Definition at line 77 of file classifier.h.
Referenced by Load(), save(), and qCanupoTools::TrainClassifier().
| unsigned Classifier::dimPerScale |
Dimension (per-scale)
Definition at line 80 of file classifier.h.
Referenced by Load(), save(), and qCanupoTools::TrainClassifier().
| std::vector<Point2D> Classifier::path |
Definition at line 72 of file classifier.h.
Referenced by classify2D_checkcondnum(), Load(), qCanupo2DViewDialog::resetBoundary(), save(), qCanupoTools::TrainClassifier(), and qCanupo2DViewDialog::updateClassifierPath().
| Point2D Classifier::refPointNeg |
Definition at line 74 of file classifier.h.
Referenced by checkRefPoints(), classify2D(), DilateClassifier(), Load(), save(), qCanupo2DViewDialog::trainClassifier(), and qCanupoTools::TrainClassifier().
| Point2D Classifier::refPointPos |
Definition at line 74 of file classifier.h.
Referenced by checkRefPoints(), classify2D(), DilateClassifier(), Load(), save(), qCanupo2DViewDialog::trainClassifier(), and qCanupoTools::TrainClassifier().
| std::vector<float> Classifier::scales |
Associated scales.
Definition at line 83 of file classifier.h.
Referenced by Load(), save(), and qCanupoTools::TrainClassifier().
| std::vector<float> Classifier::weightsAxis1 |
Definition at line 71 of file classifier.h.
Referenced by DilateClassifier(), Load(), project(), save(), and qCanupoTools::TrainClassifier().
| std::vector<float> Classifier::weightsAxis2 |
Definition at line 71 of file classifier.h.
Referenced by DilateClassifier(), Load(), project(), save(), and qCanupoTools::TrainClassifier().