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

Classifier. More...

#include <classifier.h>

Collaboration diagram for Classifier:

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< Point2Dpath
 
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...
 

Detailed Description

Classifier.

Definition at line 23 of file classifier.h.

Member Typedef Documentation

◆ Point2D

2D point

Definition at line 26 of file classifier.h.

Constructor & Destructor Documentation

◆ Classifier()

Classifier::Classifier ( )

Default constructor.

Definition at line 17 of file classifier.cpp.

Member Function Documentation

◆ checkRefPoints()

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().

◆ classify()

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().

◆ classify2D()

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().

◆ classify2D_checkcondnum()

float Classifier::classify2D_checkcondnum ( const Point2D P,
const Point2D R,
float &  condnumber 
) const

◆ Load()

bool Classifier::Load ( QString  filename,
std::vector< Classifier > &  classifiers,
std::vector< float > &  scales,
QString &  error,
FileHeader header = 0,
bool  headerOnly = false 
)
static

◆ project()

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().

◆ save()

bool Classifier::save ( QString  filename,
QString &  error 
)

Member Data Documentation

◆ absMaxXY

float Classifier::absMaxXY

Definition at line 73 of file classifier.h.

Referenced by Load(), and save().

◆ axisScaleRatio

float Classifier::axisScaleRatio

Definition at line 73 of file classifier.h.

Referenced by DilateClassifier(), Load(), and save().

◆ class1

int Classifier::class1

◆ class2

int Classifier::class2

◆ descriptorID

unsigned Classifier::descriptorID

Associated descriptor ID (see ccPointDescriptor.h)

Definition at line 77 of file classifier.h.

Referenced by Load(), save(), and qCanupoTools::TrainClassifier().

◆ dimPerScale

unsigned Classifier::dimPerScale

Dimension (per-scale)

Definition at line 80 of file classifier.h.

Referenced by Load(), save(), and qCanupoTools::TrainClassifier().

◆ path

◆ refPointNeg

◆ refPointPos

◆ scales

std::vector<float> Classifier::scales

Associated scales.

Definition at line 83 of file classifier.h.

Referenced by Load(), save(), and qCanupoTools::TrainClassifier().

◆ weightsAxis1

std::vector<float> Classifier::weightsAxis1

Definition at line 71 of file classifier.h.

Referenced by DilateClassifier(), Load(), project(), save(), and qCanupoTools::TrainClassifier().

◆ weightsAxis2

std::vector<float> Classifier::weightsAxis2

Definition at line 71 of file classifier.h.

Referenced by DilateClassifier(), Load(), project(), save(), and qCanupoTools::TrainClassifier().


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