pcl::people::PersonClassifier< PointT > Class Template Reference

#include <pcl/people/person_classifier.h>

Inheritance diagram for pcl::people::PersonClassifier< PointT >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef pcl::PointCloud< PointTPointCloud
typedef boost::shared_ptr
< PointCloud
PointCloudPtr

Public Member Functions

 PersonClassifier ()
 Constructor.
virtual ~PersonClassifier ()
 Destructor.
bool loadSVMFromFile (std::string svm_filename)
 Load SVM parameters from a text file.
void setSVM (int window_height, int window_width, std::vector< float > SVM_weights, float SVM_offset)
 Set trained SVM for person confidence estimation.
void getSVM (int &window_height, int &window_width, std::vector< float > &SVM_weights, float &SVM_offset)
 Get trained SVM for person confidence estimation.
void resize (PointCloudPtr &input_image, PointCloudPtr &output_image, int width, int height)
 Resize an image represented by a pointcloud containing RGB information.
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.
double evaluate (float height, float xc, float yc, PointCloudPtr &image)
 Classify the given portion of image.
double evaluate (PointCloudPtr &image, Eigen::Vector3f &bottom, Eigen::Vector3f &top, Eigen::Vector3f &centroid, bool vertical)
 Compute person confidence for a given PersonCluster.

Protected Attributes

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

Detailed Description

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

Definition at line 54 of file person_classifier.h.


Member Typedef Documentation

template<typename PointT>
typedef pcl::PointCloud<PointT> pcl::people::PersonClassifier< PointT >::PointCloud

Definition at line 72 of file person_classifier.h.

template<typename PointT>
typedef boost::shared_ptr<PointCloud> pcl::people::PersonClassifier< PointT >::PointCloudPtr

Definition at line 73 of file person_classifier.h.


Constructor & Destructor Documentation

template<typename PointT >
pcl::people::PersonClassifier< PointT >::PersonClassifier (  )  [inline]

Constructor.

Definition at line 47 of file person_classifier.hpp.

template<typename PointT >
pcl::people::PersonClassifier< PointT >::~PersonClassifier (  )  [inline, virtual]

Destructor.

Definition at line 50 of file person_classifier.hpp.


Member Function Documentation

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

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

Parameters:
[in] input_image A pointer to a pointcloud containing RGB information.
[out] output_image A pointer to the output pointcloud.
[in] xmin x coordinate of the top-left point of the bbox to copy from the input image.
[in] ymin y coordinate of the top-left point of the bbox to copy from the input image.
[in] width Output width.
[in] height Output height.

Definition at line 181 of file person_classifier.hpp.

Referenced by pcl::people::PersonClassifier< PointT >::evaluate().

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

Compute person confidence for a given PersonCluster.

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

Definition at line 282 of file person_classifier.hpp.

References pcl::people::PersonClassifier< PointT >::evaluate().

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

Classify the given portion of image.

Parameters:
[in] height The height of the image patch to classify, in pixels.
[in] xc The x-coordinate of the center of the image patch to classify, in pixels.
[in] yc The y-coordinate of the center of the image patch to classify, in pixels.
[in] image The 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 216 of file person_classifier.hpp.

References pcl::people::HOG::compute(), pcl::people::PersonClassifier< PointT >::copyMakeBorder(), pcl::people::PersonClassifier< PointT >::resize(), pcl::people::PersonClassifier< PointT >::SVM_offset_, pcl::people::PersonClassifier< PointT >::SVM_weights_, pcl::people::PersonClassifier< PointT >::window_height_, and pcl::people::PersonClassifier< PointT >::window_width_.

Referenced by pcl::people::GroundBasedPeopleDetectionApp< PointT >::compute(), and pcl::people::PersonClassifier< PointT >::evaluate().

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

Get trained SVM for person confidence estimation.

Parameters:
[out] window_height Detection window height.
[out] window_width Detection window width.
[out] SVM_weights SVM weights vector.
[out] SVM_offset SVM offset.

Definition at line 104 of file person_classifier.hpp.

References pcl::people::PersonClassifier< PointT >::SVM_offset_, pcl::people::PersonClassifier< PointT >::SVM_weights_, pcl::people::PersonClassifier< PointT >::window_height_, and pcl::people::PersonClassifier< PointT >::window_width_.

template<typename PointT >
bool pcl::people::PersonClassifier< PointT >::loadSVMFromFile ( std::string  svm_filename  )  [inline]

Load SVM parameters from a text file.

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

Definition at line 53 of file person_classifier.hpp.

References pcl::people::PersonClassifier< PointT >::SVM_offset_, pcl::people::PersonClassifier< PointT >::SVM_weights_, pcl::people::PersonClassifier< PointT >::window_height_, and pcl::people::PersonClassifier< PointT >::window_width_.

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

Resize an image represented by a pointcloud containing RGB information.

Parameters:
[in] input_image A pointer to a pointcloud containing RGB information.
[out] output_image A pointer to the output pointcloud.
[in] width Output width.
[in] height Output height.

Definition at line 113 of file person_classifier.hpp.

Referenced by pcl::people::PersonClassifier< PointT >::evaluate().

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

Set trained SVM for person confidence estimation.

Parameters:
[in] window_height Detection window height.
[in] window_width Detection window width.
[in] SVM_weights SVM weights vector.
[in] SVM_offset SVM offset.

Definition at line 95 of file person_classifier.hpp.

References pcl::people::PersonClassifier< PointT >::SVM_offset_, pcl::people::PersonClassifier< PointT >::SVM_weights_, pcl::people::PersonClassifier< PointT >::window_height_, and pcl::people::PersonClassifier< PointT >::window_width_.


Member Data Documentation

template<typename PointT>
float pcl::people::PersonClassifier< PointT >::SVM_offset_ [protected]
template<typename PointT>
std::vector<float> pcl::people::PersonClassifier< PointT >::SVM_weights_ [protected]
template<typename PointT>
int pcl::people::PersonClassifier< PointT >::window_height_ [protected]
template<typename PointT>
int pcl::people::PersonClassifier< PointT >::window_width_ [protected]

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