Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::recognition::ModelLibrary Class Reference

#include <model_library.h>

List of all members.

Classes

class  Model
 Stores some information about the model. More...

Public Types

typedef VoxelStructure
< HashTableCell, float > 
HashTable
typedef std::map< const Model
*, node_data_pair_list
HashTableCell
typedef std::list< std::pair
< const ORROctree::Node::Data
*, const ORROctree::Node::Data * > > 
node_data_pair_list
typedef pcl::PointCloud
< pcl::PointXYZ
PointCloudIn
typedef pcl::PointCloud
< pcl::Normal
PointCloudN

Public Member Functions

bool addModel (const PointCloudIn &points, const PointCloudN &normals, const std::string &object_name, float frac_of_points_for_registration, void *user_data=NULL)
 Adds a model to the hash table.
const HashTablegetHashTable () const
 Returns the hash table built by this instance.
const ModelgetModel (const std::string &name) const
const std::map< std::string,
Model * > & 
getModels () const
void ignoreCoplanarPointPairsOff ()
void ignoreCoplanarPointPairsOn ()
 ModelLibrary (float pair_width, float voxel_size, float max_coplanarity_angle=3.0f *AUX_DEG_TO_RADIANS)
 This class is used by 'ObjRecRANSAC' to maintain the object models to be recognized. Normally, you do not need to use this class directly.
void removeAllModels ()
 Removes all models from the library and clears the hash table.
void setMaxCoplanarityAngleDegrees (float max_coplanarity_angle_degrees)
 This is a threshold. The larger the value the more point pairs will be considered as co-planar and will be ignored in the off-line model pre-processing and in the online recognition phases. This makes sense only if "ignore co-planar points" is on. Call this method before calling addModel.
virtual ~ModelLibrary ()

Protected Member Functions

bool addToHashTable (Model *model, const ORROctree::Node::Data *data1, const ORROctree::Node::Data *data2)
 Returns true if the oriented point pair was added to the hash table and false otherwise.
void clear ()
 Removes all models from the library and destroys the hash table. This method should be called upon destroying this object.

Protected Attributes

HashTable hash_table_
bool ignore_coplanar_opps_
float max_coplanarity_angle_
std::map< std::string, Model * > models_
int num_of_cells_ [3]
float pair_width_
float voxel_size_

Detailed Description

Definition at line 59 of file model_library.h.


Member Typedef Documentation

Definition at line 176 of file model_library.h.

Definition at line 175 of file model_library.h.

Definition at line 174 of file model_library.h.

Definition at line 62 of file model_library.h.

Definition at line 63 of file model_library.h.


Constructor & Destructor Documentation

ModelLibrary::ModelLibrary ( float  pair_width,
float  voxel_size,
float  max_coplanarity_angle = 3.0f*AUX_DEG_TO_RADIANS 
)

This class is used by 'ObjRecRANSAC' to maintain the object models to be recognized. Normally, you do not need to use this class directly.

Definition at line 54 of file model_library.cpp.

virtual pcl::recognition::ModelLibrary::~ModelLibrary ( ) [inline, virtual]

Definition at line 182 of file model_library.h.


Member Function Documentation

bool ModelLibrary::addModel ( const PointCloudIn points,
const PointCloudN normals,
const std::string object_name,
float  frac_of_points_for_registration,
void *  user_data = NULL 
)

Adds a model to the hash table.

Parameters:
[in]pointsrepresents the model to be added.
[in]normalsare the normals at the model points.
[in]object_nameis the unique name of the object to be added.
[in]num_points_for_registrationis the number of points used for fast ICP registration prior to hypothesis testing
[in]user_datais a pointer to some data (can be NULL)

Returns true if model successfully added and false otherwise (e.g., if object_name is not unique).

Definition at line 106 of file model_library.cpp.

bool ModelLibrary::addToHashTable ( Model model,
const ORROctree::Node::Data data1,
const ORROctree::Node::Data data2 
) [protected]

Returns true if the oriented point pair was added to the hash table and false otherwise.

Definition at line 159 of file model_library.cpp.

void ModelLibrary::clear ( ) [protected]

Removes all models from the library and destroys the hash table. This method should be called upon destroying this object.

Definition at line 76 of file model_library.cpp.

Returns the hash table built by this instance.

Definition at line 231 of file model_library.h.

const Model* pcl::recognition::ModelLibrary::getModel ( const std::string name) const [inline]

Definition at line 237 of file model_library.h.

const std::map<std::string,Model*>& pcl::recognition::ModelLibrary::getModels ( ) const [inline]

Definition at line 247 of file model_library.h.

Call this method in order to add all point pairs (co-planar as well) to the hash table. The default behavior is ignoring co-planar points on.

Definition at line 211 of file model_library.h.

Call this method in order NOT to add co-planar point pairs to the hash table. The default behavior is ignoring co-planar points on.

Definition at line 203 of file model_library.h.

Removes all models from the library and clears the hash table.

Definition at line 87 of file model_library.cpp.

void pcl::recognition::ModelLibrary::setMaxCoplanarityAngleDegrees ( float  max_coplanarity_angle_degrees) [inline]

This is a threshold. The larger the value the more point pairs will be considered as co-planar and will be ignored in the off-line model pre-processing and in the online recognition phases. This makes sense only if "ignore co-planar points" is on. Call this method before calling addModel.

Definition at line 195 of file model_library.h.


Member Data Documentation

Definition at line 268 of file model_library.h.

Definition at line 265 of file model_library.h.

Definition at line 264 of file model_library.h.

Definition at line 267 of file model_library.h.

Definition at line 269 of file model_library.h.

Definition at line 262 of file model_library.h.

Definition at line 263 of file model_library.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:44:33