pcl::LINEMOD Class Reference

Template matching using the LINEMOD approach. More...

`#include <pcl/recognition/linemod.h>`

## Public Member Functions

| LINEMOD ()
| Constructor. More...
virtual | ~LINEMOD ()
| Destructor. More...
int | createAndAddTemplate (const std::vector< QuantizableModality * > &modalities, const std::vector< MaskMap * > &masks, const RegionXY &region)
| Creates a template from the specified data and adds it to the matching queue. More...
int | addTemplate (const SparseQuantizedMultiModTemplate &linemod_template)
| Adds the specified template to the matching queue. More...
void | detectTemplates (const std::vector< QuantizableModality * > &modalities, std::vector< LINEMODDetection > &detections) const
| Detects the stored templates in the supplied modality data. More...
void | detectTemplatesSemiScaleInvariant (const std::vector< QuantizableModality * > &modalities, std::vector< LINEMODDetection > &detections, float min_scale=0.6944444f, float max_scale=1.44f, float scale_multiplier=1.2f) const
| Detects the stored templates in a semi scale invariant manner by applying the detection to multiple scaled versions of the input data. More...
void | matchTemplates (const std::vector< QuantizableModality * > &modalities, std::vector< LINEMODDetection > &matches) const
| Matches the stored templates to the supplied modality data. More...
void | setDetectionThreshold (float threshold)
| Sets the detection threshold. More...
void | setNonMaxSuppression (bool use_non_max_suppression)
| Enables/disables non-maximum suppression. More...
void | setDetectionAveraging (bool average_detections)
| Enables/disables averaging of close detections. More...
const SparseQuantizedMultiModTemplate & | getTemplate (int template_id) const
| Returns the template with the specified ID. More...
size_t | getNumOfTemplates () const
| Returns the number of stored/trained templates. More...
void | saveTemplates (const char *file_name) const
| Saves the stored templates to the specified file. More...
void | loadTemplates (const char *file_name)
| Loads templates from the specified file. More...
void | loadTemplates (std::vector< std::string > &file_names)
| Loads templates from the specified files. More...
void | serialize (std::ostream &stream) const
| Serializes the stored templates to the specified stream. More...
void | deserialize (std::istream &stream)
| Deserializes templates from the specified stream. More...

## Detailed Description

Template matching using the LINEMOD approach.

Author
  Stefan Holzer, Stefan Hinterstoisser

Definition at line 335 of file linemod.h.

## Constructor & Destructor Documentation

pcl::LINEMOD::LINEMOD | ( |  | ) |

Constructor.

virtual pcl::LINEMOD::~LINEMOD | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

int pcl::LINEMOD::addTemplate | ( | const SparseQuantizedMultiModTemplate & | linemod_template | ) |

Adds the specified template to the matching queue.

Parameters

  [in] | linemod_template | the template to add.

int pcl::LINEMOD::createAndAddTemplate | ( | const std::vector< QuantizableModality * > & | modalities,
|  | const std::vector< MaskMap * > & | masks,
|  | const RegionXY & | region
| ) |  |

Creates a template from the specified data and adds it to the matching queue.

Parameters

  [in] | modalities | the modalities used to create the template.
  [in] | masks | the masks that determine which parts of the modalities are used for creating the template.
  [in] | region | the region which will be associated with the template (can be larger than the actual modality-maps).

void pcl::LINEMOD::deserialize | ( | std::istream & | stream | ) |

Deserializes templates from the specified stream.

Parameters

  [in] | stream | the stream the templates will be read from.

void pcl::LINEMOD::detectTemplates | ( | const std::vector< QuantizableModality * > & | modalities,
|  | std::vector< LINEMODDetection > & | detections
| ) |  | const

Detects the stored templates in the supplied modality data.

Parameters

  [in] | modalities | the modalities that will be used for detection.
  [out] | detections | the destination for the detections.

void pcl::LINEMOD::detectTemplatesSemiScaleInvariant | ( | const std::vector< QuantizableModality * > & | modalities,
|  | std::vector< LINEMODDetection > & | detections,
|  | float | min_scale = `0.6944444f`,
|  | float | max_scale = `1.44f`,
|  | float | scale_multiplier = `1.2f`
| ) |  | const

Detects the stored templates in a semi scale invariant manner by applying the detection to multiple scaled versions of the input data.

Parameters

  [in] | modalities | the modalities that will be used for detection.
  [out] | detections | the destination for the detections.
  [in] | min_scale | the minimum scale.
  [in] | max_scale | the maximum scale.
  [in] | scale_multiplier | the multiplier for getting from one scale to the next.

size_t pcl::LINEMOD::getNumOfTemplates | ( |  | ) | const

inline

Returns the number of stored/trained templates.

Definition at line 429 of file linemod.h.

const SparseQuantizedMultiModTemplate& pcl::LINEMOD::getTemplate | ( | int | template_id | ) | const

inline

Returns the template with the specified ID.

Parameters

  [in] | template_id | the ID of the template to return.

Definition at line 422 of file linemod.h.

void pcl::LINEMOD::loadTemplates | ( | const char * | file_name | ) |

Loads templates from the specified file.

Parameters

  [in] | file_name | the name of the file to load the template from.

void pcl::LINEMOD::loadTemplates | ( | std::vector< std::string > & | file_names | ) |

Loads templates from the specified files.

Parameters

  [in] | file_names | vector of files to load the templates from.

void pcl::LINEMOD::matchTemplates | ( | const std::vector< QuantizableModality * > & | modalities,
|  | std::vector< LINEMODDetection > & | matches
| ) |  | const

Matches the stored templates to the supplied modality data.

Parameters

  [in] | modalities | the modalities that will be used for matching.
  [out] | matches | the found matches.

void pcl::LINEMOD::saveTemplates | ( | const char * | file_name | ) | const

Saves the stored templates to the specified file.

Parameters

  [in] | file_name | the name of the file to save the templates to.

void pcl::LINEMOD::serialize | ( | std::ostream & | stream | ) | const

Serializes the stored templates to the specified stream.

Parameters

  [in] | stream | the stream the templates will be written to.

void pcl::LINEMOD::setDetectionAveraging | ( | bool | average_detections | ) |

inline

Enables/disables averaging of close detections.

Parameters

  [in] | average_detections | determines whether to average close detections or not.

Definition at line 413 of file linemod.h.

void pcl::LINEMOD::setDetectionThreshold | ( | float | threshold | ) |

inline

Sets the detection threshold.

Parameters

  [in] | threshold | the detection threshold.

Definition at line 395 of file linemod.h.

void pcl::LINEMOD::setNonMaxSuppression | ( | bool | use_non_max_suppression | ) |

inline

Enables/disables non-maximum suppression.

Parameters

  [in] | use_non_max_suppression | determines whether to use non-maximum suppression or not.

Definition at line 404 of file linemod.h.

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

- /build/pcl-0nnAvv/pcl-1.7.2/recognition/include/pcl/recognition/linemod.h