Point Cloud Library (PCL)  1.3.1
Public Types | Public Member Functions
pcl::VFHClassifierNN Class Reference

Utility class for nearest neighbor search based classification of VFH features. More...

#include </builddir/build/BUILD/PCL-1.3.1-Source/apps/include/pcl/apps/vfh_nn_classifier.h>

List of all members.

Public Types

typedef pcl::PointCloud
< pcl::VFHSignature308
FeatureCloud
typedef pcl::PointCloud
< pcl::VFHSignature308 >::Ptr 
FeatureCloudPtr
typedef pcl::PointCloud
< pcl::VFHSignature308 >
::ConstPtr 
FeatureCloudConstPtr
typedef NNClassification
< pcl::VFHSignature308 >
::Result 
Result
typedef NNClassification
< pcl::VFHSignature308 >
::ResultPtr 
ResultPtr

Public Member Functions

 VFHClassifierNN ()
void reset ()
void finalizeTraining ()
 Set up the classifier with the current training features and labels.
void finalizeTree ()
 Set up the classifier with the current training features.
void finalizeLabels ()
 Set up the classifier with the current training example labels.
bool saveTrainingFeatures (std::string file_name, std::string labels_file_name)
 Save the list of training examples and corresponding labels.
bool addTrainingFeatures (const FeatureCloudPtr training_features, const std::vector< std::string > &labels)
 Fill the list of training examples and corresponding labels.
bool loadTrainingFeatures (std::string file_name, std::string labels_file_name)
 Fill the list of training examples and corresponding labels.
bool loadTrainingData (std::string file_name, std::string label)
 Add the feature extracted from the cloud at the specified location as a training example with the given labels.
bool addTrainingData (const sensor_msgs::PointCloud2 &training_data, std::string &label)
 Add the feature extracted from the cloud as a training example with the given labels.
ResultPtr classify (const sensor_msgs::PointCloud2 &testing_data, double radius=300, double min_score=0.002)
 Utility function for the default classification process.
FeatureCloudPtr computeFeature (const sensor_msgs::PointCloud2 &points, double radius=0.03)
 Extract the VFH feature describing the given point cloud.

Detailed Description

Utility class for nearest neighbor search based classification of VFH features.

Author:
Zoltan Csaba Marton

Member Typedef Documentation

Definition at line 97 of file vfh_nn_classifier.h.

Definition at line 99 of file vfh_nn_classifier.h.

Definition at line 98 of file vfh_nn_classifier.h.

Definition at line 100 of file vfh_nn_classifier.h.

Definition at line 101 of file vfh_nn_classifier.h.


Constructor & Destructor Documentation

pcl::VFHClassifierNN::VFHClassifierNN ( ) [inline]

Definition at line 114 of file vfh_nn_classifier.h.


Member Function Documentation

bool pcl::VFHClassifierNN::addTrainingData ( const sensor_msgs::PointCloud2 training_data,
std::string &  label 
) [inline]

Add the feature extracted from the cloud as a training example with the given labels.

Note:
this function has a cumulative effect.
Parameters:
training_datapoint cloud for training feature extraction
labelthe class label for the training example
Returns:
true on success, false on failure (read error or number of entries don't match)

Definition at line 228 of file vfh_nn_classifier.h.

bool pcl::VFHClassifierNN::addTrainingFeatures ( const FeatureCloudPtr  training_features,
const std::vector< std::string > &  labels 
) [inline]

Fill the list of training examples and corresponding labels.

Note:
this function has a cumulative effect.
Parameters:
training_featuresthe training features
labelsthe class label for each training example
Returns:
true on success, false on failure (number of entries don't match)

Definition at line 170 of file vfh_nn_classifier.h.

ResultPtr pcl::VFHClassifierNN::classify ( const sensor_msgs::PointCloud2 testing_data,
double  radius = 300,
double  min_score = 0.002 
) [inline]

Utility function for the default classification process.

Parameters:
testing_datathe point clouds to be classified
radiusthe maximum search radius in feature space -- 300 by default
minimum_scorethe score to be given to matches at maximum distance (>0) -- 0.002 by default
Returns:
pair of label and score for each relevant training class

Definition at line 245 of file vfh_nn_classifier.h.

FeatureCloudPtr pcl::VFHClassifierNN::computeFeature ( const sensor_msgs::PointCloud2 points,
double  radius = 0.03 
) [inline]

Extract the VFH feature describing the given point cloud.

Parameters:
pointspoint cloud for feature extraction
radiussearch radius for normal estimation -- 0.03 m by default
Returns:
point cloud containing the extracted feature

Definition at line 260 of file vfh_nn_classifier.h.

void pcl::VFHClassifierNN::finalizeLabels ( ) [inline]

Set up the classifier with the current training example labels.

Definition at line 140 of file vfh_nn_classifier.h.

void pcl::VFHClassifierNN::finalizeTraining ( ) [inline]

Set up the classifier with the current training features and labels.

Definition at line 127 of file vfh_nn_classifier.h.

void pcl::VFHClassifierNN::finalizeTree ( ) [inline]

Set up the classifier with the current training features.

Definition at line 134 of file vfh_nn_classifier.h.

bool pcl::VFHClassifierNN::loadTrainingData ( std::string  file_name,
std::string  label 
) [inline]

Add the feature extracted from the cloud at the specified location as a training example with the given labels.

Note:
this function has a cumulative effect.
Parameters:
file_namePCD file containing the training data
labelthe class label for the training example
Returns:
true on success, false on failure (read error or number of entries don't match)

Definition at line 214 of file vfh_nn_classifier.h.

bool pcl::VFHClassifierNN::loadTrainingFeatures ( std::string  file_name,
std::string  labels_file_name 
) [inline]

Fill the list of training examples and corresponding labels.

Note:
this function has a cumulative effect.
Parameters:
file_namePCD file containing the training features
labels_file_namethe class label for each training example
Returns:
true on success, false on failure (read error or number of entries don't match)

Definition at line 193 of file vfh_nn_classifier.h.

void pcl::VFHClassifierNN::reset ( ) [inline]

Definition at line 119 of file vfh_nn_classifier.h.

bool pcl::VFHClassifierNN::saveTrainingFeatures ( std::string  file_name,
std::string  labels_file_name 
) [inline]

Save the list of training examples and corresponding labels.

Parameters:
file_namefile name for writing the training features
labels_file_namefile name for writing the class label for each training example
Returns:
true on success, false on failure (write error or number of entries don't match)

Definition at line 150 of file vfh_nn_classifier.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines