Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Protected Attributes
pcl::people::PersonClassifier< PointT > Class Template Reference

#include <pcl/people/person_classifier.h>

+ Inheritance diagram for pcl::people::PersonClassifier< PointT >:

Public Types

using PointCloud = pcl::PointCloud< PointT >
 
using PointCloudPtr = typename PointCloud::Ptr
 

Public Member Functions

 PersonClassifier ()
 Constructor. More...
 
virtual ~PersonClassifier ()
 Destructor. More...
 
bool loadSVMFromFile (const std::string &svm_filename)
 Load SVM parameters from a text file. More...
 
void setSVM (int window_height, int window_width, std::vector< float > SVM_weights, float SVM_offset)
 Set trained SVM for person confidence estimation. More...
 
void getSVM (int &window_height, int &window_width, std::vector< float > &SVM_weights, float &SVM_offset)
 Get trained SVM for person confidence estimation. More...
 
void resize (PointCloudPtr &input_image, PointCloudPtr &output_image, int width, int height)
 Resize an image represented by a pointcloud containing RGB information. More...
 
void copyMakeBorder (PointCloudPtr &input_image, PointCloudPtr &output_image, int xmin, int ymin, int width, int height)
 Copies an image and makes a black border around it, where the source image is not present. More...
 
double evaluate (float height, float xc, float yc, PointCloudPtr &image)
 Classify the given portion of image. More...
 
double evaluate (PointCloudPtr &image, Eigen::Vector3f &bottom, Eigen::Vector3f &top, Eigen::Vector3f &centroid, bool vertical)
 Compute person confidence for a given PersonCluster. More...
 

Protected Attributes

int window_height_
 Height of the image patch to classify. More...
 
int window_width_
 Width of the image patch to classify. More...
 
float SVM_offset_
 SVM offset. More...
 
std::vector< float > SVM_weights_
 SVM weights vector. More...
 

Detailed Description

template<typename PointT>
class pcl::people::PersonClassifier< PointT >

Definition at line 53 of file person_classifier.h.

Member Typedef Documentation

◆ PointCloud

template<typename PointT >
using pcl::people::PersonClassifier< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 71 of file person_classifier.h.

◆ PointCloudPtr

template<typename PointT >
using pcl::people::PersonClassifier< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 72 of file person_classifier.h.

Constructor & Destructor Documentation

◆ PersonClassifier()

template<typename PointT >
pcl::people::PersonClassifier< PointT >::PersonClassifier ( )
default

Constructor.

◆ ~PersonClassifier()

template<typename PointT >
pcl::people::PersonClassifier< PointT >::~PersonClassifier ( )
virtualdefault

Destructor.

Member Function Documentation

◆ copyMakeBorder()

template<typename PointT >
void pcl::people::PersonClassifier< PointT >::copyMakeBorder ( PointCloudPtr input_image,
PointCloudPtr output_image,
int  xmin,
int  ymin,
int  width,
int  height 
)

Copies an image and makes a black border around it, where the source image is not present.

Parameters
[in]input_imageA pointer to a pointcloud containing RGB information.
[out]output_imageA pointer to the output pointcloud.
[in]xminx coordinate of the top-left point of the bbox to copy from the input image.
[in]yminy coordinate of the top-left point of the bbox to copy from the input image.
[in]widthOutput width.
[in]heightOutput height.

Definition at line 177 of file person_classifier.hpp.

◆ evaluate() [1/2]

template<typename PointT >
double pcl::people::PersonClassifier< PointT >::evaluate ( float  height,
float  xc,
float  yc,
PointCloudPtr image 
)

Classify the given portion of image.

Parameters
[in]heightThe height of the image patch to classify, in pixels.
[in]xcThe x-coordinate of the center of the image patch to classify, in pixels.
[in]ycThe y-coordinate of the center of the image patch to classify, in pixels.
[in]imageThe whole image (pointer to a point cloud containing RGB information) containing the object to classify.
Returns
The classification score given by the SVM.

Definition at line 212 of file person_classifier.hpp.

References pcl::people::HOG::compute().

◆ evaluate() [2/2]

template<typename PointT >
double pcl::people::PersonClassifier< PointT >::evaluate ( PointCloudPtr image,
Eigen::Vector3f &  bottom,
Eigen::Vector3f &  top,
Eigen::Vector3f &  centroid,
bool  vertical 
)

Compute person confidence for a given PersonCluster.

Parameters
[in]imageThe input image (pointer to a point cloud containing RGB information).
[in]bottomTheoretical bottom point of the cluster projected to the image.
[in]topTheoretical top point of the cluster projected to the image.
[in]centroidTheoretical centroid point of the cluster projected to the image.
[in]verticalIf true, the sensor is considered to be vertically placed (portrait mode).
Returns
The person confidence.

Definition at line 279 of file person_classifier.hpp.

◆ getSVM()

template<typename PointT >
void pcl::people::PersonClassifier< PointT >::getSVM ( int &  window_height,
int &  window_width,
std::vector< float > &  SVM_weights,
float &  SVM_offset 
)

Get trained SVM for person confidence estimation.

Parameters
[out]window_heightDetection window height.
[out]window_widthDetection window width.
[out]SVM_weightsSVM weights vector.
[out]SVM_offsetSVM offset.

Definition at line 100 of file person_classifier.hpp.

◆ loadSVMFromFile()

template<typename PointT >
bool pcl::people::PersonClassifier< PointT >::loadSVMFromFile ( const std::string &  svm_filename)

Load SVM parameters from a text file.

Parameters
[in]svm_filenameFilename containing SVM parameters.
Returns
true if SVM has been correctly set, false otherwise.

Definition at line 53 of file person_classifier.hpp.

◆ resize()

template<typename PointT >
void pcl::people::PersonClassifier< PointT >::resize ( PointCloudPtr input_image,
PointCloudPtr output_image,
int  width,
int  height 
)

Resize an image represented by a pointcloud containing RGB information.

Parameters
[in]input_imageA pointer to a pointcloud containing RGB information.
[out]output_imageA pointer to the output pointcloud.
[in]widthOutput width.
[in]heightOutput height.

Definition at line 109 of file person_classifier.hpp.

◆ setSVM()

template<typename PointT >
void pcl::people::PersonClassifier< PointT >::setSVM ( int  window_height,
int  window_width,
std::vector< float >  SVM_weights,
float  SVM_offset 
)

Set trained SVM for person confidence estimation.

Parameters
[in]window_heightDetection window height.
[in]window_widthDetection window width.
[in]SVM_weightsSVM weights vector.
[in]SVM_offsetSVM offset.

Definition at line 91 of file person_classifier.hpp.

Member Data Documentation

◆ SVM_offset_

template<typename PointT >
float pcl::people::PersonClassifier< PointT >::SVM_offset_
protected

SVM offset.

Definition at line 64 of file person_classifier.h.

◆ SVM_weights_

template<typename PointT >
std::vector<float> pcl::people::PersonClassifier< PointT >::SVM_weights_
protected

SVM weights vector.

Definition at line 67 of file person_classifier.h.

◆ window_height_

template<typename PointT >
int pcl::people::PersonClassifier< PointT >::window_height_
protected

Height of the image patch to classify.

Definition at line 58 of file person_classifier.h.

◆ window_width_

template<typename PointT >
int pcl::people::PersonClassifier< PointT >::window_width_
protected

Width of the image patch to classify.

Definition at line 61 of file person_classifier.h.


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