pcl::UnaryClassifier< PointT > Class Template Reference

`#include <pcl/segmentation/unary_classifier.h>`

## Public Member Functions

| UnaryClassifier ()
| Constructor that sets default values for member variables. More...
| ~UnaryClassifier ()
| This destructor destroys the cloud... More...
void | setInputCloud (typename pcl::PointCloud< PointT >::Ptr input_cloud)
| This method sets the input cloud. More...
void | train (pcl::PointCloud< pcl::FPFHSignature33 >::Ptr &output)
void | trainWithLabel (std::vector< pcl::PointCloud< pcl::FPFHSignature33 >, Eigen::aligned_allocator< pcl::PointCloud< pcl::FPFHSignature33 > > > &output)
void | segment (pcl::PointCloud< pcl::PointXYZRGBL >::Ptr &out)
void | queryFeatureDistances (std::vector< pcl::PointCloud< pcl::FPFHSignature33 >::Ptr > &trained_features, pcl::PointCloud< pcl::FPFHSignature33 >::Ptr query_features, std::vector< int > &indi, std::vector< float > &dist)
void | assignLabels (std::vector< int > &indi, std::vector< float > &dist, int n_feature_means, float feature_threshold, pcl::PointCloud< pcl::PointXYZRGBL >::Ptr out)
void | setClusterSize (unsigned int k)
void | setNormalRadiusSearch (float param)
void | setFPFHRadiusSearch (float param)
void | setLabelField (bool l)
void | setTrainedFeatures (std::vector< pcl::PointCloud< pcl::FPFHSignature33 >::Ptr > &features)
void | setFeatureThreshold (float threshold)

## Protected Member Functions

void | convertCloud (typename pcl::PointCloud< PointT >::Ptr in, pcl::PointCloud< pcl::PointXYZ >::Ptr out)
void | convertCloud (typename pcl::PointCloud< PointT >::Ptr in, pcl::PointCloud< pcl::PointXYZRGBL >::Ptr out)
void | findClusters (typename pcl::PointCloud< PointT >::Ptr in, std::vector< int > &cluster_numbers)
void | getCloudWithLabel (typename pcl::PointCloud< PointT >::Ptr in, pcl::PointCloud< pcl::PointXYZ >::Ptr out, int label_num)
void | computeFPFH (pcl::PointCloud< pcl::PointXYZ >::Ptr in, pcl::PointCloud< pcl::FPFHSignature33 >::Ptr out, float normal_radius_search, float fpfh_radius_search)
void | kmeansClustering (pcl::PointCloud< pcl::FPFHSignature33 >::Ptr in, pcl::PointCloud< pcl::FPFHSignature33 >::Ptr out, int k)

## Protected Attributes

pcl::PointCloud< PointT >::Ptr | input_cloud_
| Contains the input cloud. More...
bool | label_field_
unsigned int | cluster_size_
float | normal_radius_search_
float | fpfh_radius_search_
float | feature_threshold_
std::vector< pcl::PointCloud< pcl::FPFHSignature33 >::Ptr > | trained_features_

## Detailed Description

### template<typename PointT>
class pcl::UnaryClassifier< PointT >

Definition at line 60 of file unary_classifier.h.

## Constructor & Destructor Documentation

## UnaryClassifier()

template<typename PointT >

pcl::UnaryClassifier< PointT >::UnaryClassifier | ( |  | ) |

Constructor that sets default values for member variables.

Definition at line 50 of file unary_classifier.hpp.

## ~UnaryClassifier()

template<typename PointT >

pcl::UnaryClassifier< PointT >::~UnaryClassifier | ( |  | ) |

This destructor destroys the cloud...

Definition at line 61 of file unary_classifier.hpp.

## Member Function Documentation

## assignLabels()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::assignLabels | ( | std::vector< int > & | indi,
|  | std::vector< float > & | dist,
|  | int | n_feature_means,
|  | float | feature_threshold,
|  | pcl::PointCloud< pcl::PointXYZRGBL >::Ptr | out
| ) |  |

Definition at line 330 of file unary_classifier.hpp.

References pcl::PointCloud< PointT >::points.

Referenced by pcl::UnaryClassifier< PointT >::segment().

## computeFPFH()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::computeFPFH | ( | pcl::PointCloud< pcl::PointXYZ >::Ptr | in,
|  | pcl::PointCloud< pcl::FPFHSignature33 >::Ptr | out,
|  | float | normal_radius_search,
|  | float | fpfh_radius_search
| ) |  |

protected

Definition at line 205 of file unary_classifier.hpp.

References pcl::Feature< PointInT, PointOutT >::compute(), pcl::PCLBase< PointInT >::setInputCloud(), pcl::NormalEstimation< PointInT, PointOutT >::setInputCloud(), pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >::setInputNormals(), pcl::Feature< PointInT, PointOutT >::setRadiusSearch(), and pcl::Feature< PointInT, PointOutT >::setSearchMethod().

Referenced by pcl::UnaryClassifier< PointT >::segment(), pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## convertCloud() [1/2]

template<typename PointT >

void pcl::UnaryClassifier< PointT >::convertCloud | ( | typename pcl::PointCloud< PointT >::Ptr | in,
|  | pcl::PointCloud< pcl::PointXYZ >::Ptr | out
| ) |  |

protected

Definition at line 86 of file unary_classifier.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.

Referenced by pcl::UnaryClassifier< PointT >::segment(), and pcl::UnaryClassifier< PointT >::train().

## convertCloud() [2/2]

template<typename PointT >

void pcl::UnaryClassifier< PointT >::convertCloud | ( | typename pcl::PointCloud< PointT >::Ptr | in,
|  | pcl::PointCloud< pcl::PointXYZRGBL >::Ptr | out
| ) |  |

protected

Definition at line 107 of file unary_classifier.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::_PointXYZRGBL::label, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.

## findClusters()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::findClusters | ( | typename pcl::PointCloud< PointT >::Ptr | in,
|  | std::vector< int > & | cluster_numbers
| ) |  |

protected

Definition at line 134 of file unary_classifier.hpp.

References pcl::getFieldIndex(), and pcl::PointCloud< PointT >::points.

Referenced by pcl::UnaryClassifier< PointT >::trainWithLabel().

## getCloudWithLabel()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::getCloudWithLabel | ( | typename pcl::PointCloud< PointT >::Ptr | in,
|  | pcl::PointCloud< pcl::PointXYZ >::Ptr | out,
|  | int | label_num
| ) |  |

protected

Definition at line 169 of file unary_classifier.hpp.

References pcl::getFieldIndex(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.

Referenced by pcl::UnaryClassifier< PointT >::trainWithLabel().

## kmeansClustering()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::kmeansClustering | ( | pcl::PointCloud< pcl::FPFHSignature33 >::Ptr | in,
|  | pcl::PointCloud< pcl::FPFHSignature33 >::Ptr | out,
|  | int | k
| ) |  |

protected

Definition at line 234 of file unary_classifier.hpp.

References pcl::Kmeans::addDataPoint(), pcl::Kmeans::get_centroids(), pcl::PointCloud< PointT >::height, pcl::FPFHSignature33::histogram, pcl::PointCloud< PointT >::is_dense, pcl::Kmeans::kMeans(), pcl::PointCloud< PointT >::points, pcl::Kmeans::setClusterSize(), and pcl::PointCloud< PointT >::width.

Referenced by pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## queryFeatureDistances()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::queryFeatureDistances | ( | std::vector< pcl::PointCloud< pcl::FPFHSignature33 >::Ptr > & | trained_features,
|  | pcl::PointCloud< pcl::FPFHSignature33 >::Ptr | query_features,
|  | std::vector< int > & | indi,
|  | std::vector< float > & | dist
| ) |  |

Definition at line 273 of file unary_classifier.hpp.

References pcl::PointCloud< PointT >::points.

Referenced by pcl::UnaryClassifier< PointT >::segment().

## segment()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::segment | ( | pcl::PointCloud< pcl::PointXYZRGBL >::Ptr & | out | ) |

Definition at line 405 of file unary_classifier.hpp.

References pcl::UnaryClassifier< PointT >::assignLabels(), pcl::UnaryClassifier< PointT >::computeFPFH(), pcl::UnaryClassifier< PointT >::convertCloud(), pcl::geometry::distance(), pcl::UnaryClassifier< PointT >::feature_threshold_, pcl::UnaryClassifier< PointT >::fpfh_radius_search_, pcl::UnaryClassifier< PointT >::input_cloud_, pcl::UnaryClassifier< PointT >::normal_radius_search_, pcl::UnaryClassifier< PointT >::queryFeatureDistances(), and pcl::UnaryClassifier< PointT >::trained_features_.

## setClusterSize()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setClusterSize | ( | unsigned int | k | ) |

inline

Definition at line 101 of file unary_classifier.h.

## setFeatureThreshold()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setFeatureThreshold | ( | float | threshold | ) |

inline

Definition at line 116 of file unary_classifier.h.

## setFPFHRadiusSearch()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setFPFHRadiusSearch | ( | float | param | ) |

inline

Definition at line 107 of file unary_classifier.h.

## setInputCloud()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setInputCloud | ( | typename pcl::PointCloud< PointT >::Ptr | input_cloud | ) |

This method sets the input cloud.

Parameters

  [in] | input_cloud | input point cloud

Definition at line 67 of file unary_classifier.hpp.

References pcl::getFieldIndex(), pcl::UnaryClassifier< PointT >::input_cloud_, and pcl::UnaryClassifier< PointT >::label_field_.

## setLabelField()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setLabelField | ( | bool | l | ) |

inline

Definition at line 110 of file unary_classifier.h.

## setNormalRadiusSearch()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setNormalRadiusSearch | ( | float | param | ) |

inline

Definition at line 104 of file unary_classifier.h.

## setTrainedFeatures()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::setTrainedFeatures | ( | std::vector< pcl::PointCloud< pcl::FPFHSignature33 >::Ptr > & | features | ) |

inline

Definition at line 113 of file unary_classifier.h.

## train()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::train | ( | pcl::PointCloud< pcl::FPFHSignature33 >::Ptr & | output | ) |

Definition at line 356 of file unary_classifier.hpp.

References pcl::UnaryClassifier< PointT >::cluster_size_, pcl::UnaryClassifier< PointT >::computeFPFH(), pcl::UnaryClassifier< PointT >::convertCloud(), pcl::UnaryClassifier< PointT >::fpfh_radius_search_, pcl::UnaryClassifier< PointT >::input_cloud_, pcl::UnaryClassifier< PointT >::kmeansClustering(), and pcl::UnaryClassifier< PointT >::normal_radius_search_.

## trainWithLabel()

template<typename PointT >

void pcl::UnaryClassifier< PointT >::trainWithLabel | ( | std::vector< pcl::PointCloud< pcl::FPFHSignature33 >, Eigen::aligned_allocator< pcl::PointCloud< pcl::FPFHSignature33 > > > & | output | ) |

Definition at line 374 of file unary_classifier.hpp.

References pcl::UnaryClassifier< PointT >::cluster_size_, pcl::UnaryClassifier< PointT >::computeFPFH(), pcl::UnaryClassifier< PointT >::findClusters(), pcl::UnaryClassifier< PointT >::fpfh_radius_search_, pcl::UnaryClassifier< PointT >::getCloudWithLabel(), pcl::UnaryClassifier< PointT >::input_cloud_, pcl::UnaryClassifier< PointT >::kmeansClustering(), and pcl::UnaryClassifier< PointT >::normal_radius_search_.

## Member Data Documentation

## cluster_size_

template<typename PointT >

unsigned int pcl::UnaryClassifier< PointT >::cluster_size_

protected

Definition at line 155 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## feature_threshold_

template<typename PointT >

float pcl::UnaryClassifier< PointT >::feature_threshold_

protected

Definition at line 159 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::segment().

## fpfh_radius_search_

template<typename PointT >

float pcl::UnaryClassifier< PointT >::fpfh_radius_search_

protected

Definition at line 158 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::segment(), pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## input_cloud_

template<typename PointT >

pcl::PointCloud<PointT>::Ptr pcl::UnaryClassifier< PointT >::input_cloud_

protected

Contains the input cloud.

Definition at line 151 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::segment(), pcl::UnaryClassifier< PointT >::setInputCloud(), pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## label_field_

template<typename PointT >

bool pcl::UnaryClassifier< PointT >::label_field_

protected

Definition at line 153 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::setInputCloud().

## normal_radius_search_

template<typename PointT >

float pcl::UnaryClassifier< PointT >::normal_radius_search_

protected

Definition at line 157 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::segment(), pcl::UnaryClassifier< PointT >::train(), and pcl::UnaryClassifier< PointT >::trainWithLabel().

## trained_features_

template<typename PointT >

std::vector<pcl::PointCloud<pcl::FPFHSignature33>::Ptr> pcl::UnaryClassifier< PointT >::trained_features_

protected

Definition at line 162 of file unary_classifier.h.

Referenced by pcl::UnaryClassifier< PointT >::segment().

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/segmentation/include/pcl/segmentation/unary_classifier.h
- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/segmentation/include/pcl/segmentation/impl/unary_classifier.hpp