Inherits opentl::modalities::Modality.
Public Types | |
Public Member Functions | |
| int | buildTemplateMap (const TargetPtrVector &targets) |
| Collect offline template by sampling pixels from the opengl texture image, and back-warping points onto the 3D mesh. | |
| virtual modalities::Modality * | clone () const |
| Clone (it calls the Deep Copy Constructor). | |
| opentl::core::cvdata::TemplateMap * | getTmapData (int targetId) |
| Return the template model of a given target. | |
| void | init () |
| Memory allocation and initialization (common to both constructors). | |
| int | LossDetect (const TargetPtrVector &targets) |
| Detect target loss, by computing the NCC over the full template. | |
| virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx) |
| matchFeatLevel. Match template gray level values with underlying image values (multi-resolution) The overall similarity function can be: Sum of Squared Differences (SSD), Normalized Cross-Correlation (NCC), Mutual Information (MI). | |
| virtual int | matchObjLevel (const TargetPtrVector &targets, T_MEAS_OBJPtrVector &outputMeas, std::size_t partitionIdx) |
| matchObjLevel. Find local maximum of feature-level likelihood (i.e. the template similarity function) | |
| virtual int | preProcess (const opentl::core::cvdata::Image &image) |
| Get the multi-resolution image pyramid. | |
| void | resetOnlineTemplate (const TargetPtrVector &targets) |
| Reset the on-line template to the off-line values. | |
| virtual int | sampleModelFeatures (const TargetPtrVector &targets) |
| Compute visible points from the template map at pose p (occlusion query). | |
| TemplateMap (const TemplateMap &tmap) | |
| Deep Copy Constructor. | |
| TemplateMap (opentl::modelprojection::Warp *warp, int camIdx) | |
| Constructor. | |
| int | updateAllTemplate (const TargetPtrVector &targets) |
| Update the complete template gray values (on-line and off-line) from the pre-processed image pyramid. | |
| virtual int | updateModelFeatures (const TargetPtrVector &targets) |
| Update the on-line observed gray values (= feature) from the multi-resolution image pyramid. | |
| void | updateOnlineTemplate (const TargetPtrVector &targets, std::vector< boost::shared_ptr< opentl::core::cvdata::Image > > &imageData) |
| Update the on-line template gray values from 4 resolution images. | |
| int | warpTemplate (const TargetPtrVector &targets) |
| Warp all visible template points. | |
| virtual | ~TemplateMap () |
| Destructor. | |
Protected Attributes | |
| T_MEAS_FEATPtrVector | mFeatLevelMeas |
| Internal storage for feature level measurements NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer). | |
| TargetPtrVector | mTmpTarget |
| Temporary state NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer). | |
Common flags to all modalities: they specify which field will be filled in the output measurement, inside the matchXLevel() function. Default values = all true.
Reimplemented from opentl::modalities::Modality.
Reimplemented from opentl::modalities::Modality.
| opentl::modalities::TemplateMap::TemplateMap | ( | opentl::modelprojection::Warp * | warp, | |
| int | camIdx | |||
| ) |
Constructor.
| opentl::modalities::TemplateMap::TemplateMap | ( | const TemplateMap & | tmap | ) |
Deep Copy Constructor.
| virtual opentl::modalities::TemplateMap::~TemplateMap | ( | ) | [virtual] |
Destructor.
| int opentl::modalities::TemplateMap::buildTemplateMap | ( | const TargetPtrVector & | targets | ) |
Collect offline template by sampling pixels from the opengl texture image, and back-warping points onto the 3D mesh.
| targets | Input target vector |
| virtual modalities::Modality* opentl::modalities::TemplateMap::clone | ( | ) | const [virtual] |
| opentl::core::cvdata::TemplateMap* opentl::modalities::TemplateMap::getTmapData | ( | int | targetId | ) | [inline] |
Return the template model of a given target.
| targetId | Unique target ID number |
| void opentl::modalities::TemplateMap::init | ( | ) | [virtual] |
Memory allocation and initialization (common to both constructors).
Reimplemented from opentl::modalities::Modality.
| int opentl::modalities::TemplateMap::LossDetect | ( | const TargetPtrVector & | targets | ) |
Detect target loss, by computing the NCC over the full template.
| targets | Input target vector |
| virtual int opentl::modalities::TemplateMap::matchFeatLevel | ( | const TargetPtrVector & | targets, | |
| T_MEAS_FEATPtrVector & | outputMeas, | |||
| std::size_t | partitionIdx | |||
| ) | [virtual] |
matchFeatLevel. Match template gray level values with underlying image values (multi-resolution) The overall similarity function can be: Sum of Squared Differences (SSD), Normalized Cross-Correlation (NCC), Mutual Information (MI).
| targets | Input vector of targets | |
| outputMeas | Output feature-level measurements (gray-level pairs, Jacobians and UNIQUE residual = overall template similarity) NOTE: The second index of outputMeas (state inside the target) is not used, and always set to 0. |
Reimplemented from opentl::modalities::Modality.
| virtual int opentl::modalities::TemplateMap::matchObjLevel | ( | const TargetPtrVector & | targets, | |
| T_MEAS_OBJPtrVector & | outputMeas, | |||
| std::size_t | partitionIdx | |||
| ) | [virtual] |
matchObjLevel. Find local maximum of feature-level likelihood (i.e. the template similarity function)
| targets | Input vector of targets | |
| outputMeas | Output object-level measurements (predicted and estimated pose, and residual = incremental pose) NOTE: The second index of outputMeas (state inside the target) is not used, and always set to 0. |
Reimplemented from opentl::modalities::Modality.
| virtual int opentl::modalities::TemplateMap::preProcess | ( | const opentl::core::cvdata::Image & | image | ) | [virtual] |
Get the multi-resolution image pyramid.
| sensData | Input sensor data |
| void opentl::modalities::TemplateMap::resetOnlineTemplate | ( | const TargetPtrVector & | targets | ) |
Reset the on-line template to the off-line values.
| targets | Input target vector |
| virtual int opentl::modalities::TemplateMap::sampleModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Compute visible points from the template map at pose p (occlusion query).
| targets | Input target vector |
Reimplemented from opentl::modalities::Modality.
| int opentl::modalities::TemplateMap::updateAllTemplate | ( | const TargetPtrVector & | targets | ) |
Update the complete template gray values (on-line and off-line) from the pre-processed image pyramid.
| targets | Input target vector |
| virtual int opentl::modalities::TemplateMap::updateModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Update the on-line observed gray values (= feature) from the multi-resolution image pyramid.
| targets | Input target vector |
Reimplemented from opentl::modalities::Modality.
| void opentl::modalities::TemplateMap::updateOnlineTemplate | ( | const TargetPtrVector & | targets, | |
| std::vector< boost::shared_ptr< opentl::core::cvdata::Image > > & | imageData | |||
| ) |
Update the on-line template gray values from 4 resolution images.
| targets | Input target vector | |
| imageData | Input multi-resolution images from which to sample visible points |
| int opentl::modalities::TemplateMap::warpTemplate | ( | const TargetPtrVector & | targets | ) |
Warp all visible template points.
| targets | Input target vector |
Internal storage for feature level measurements NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer).
Temporary state NOTE: this is needed by the static function "staticSimilarityEval" (for the simplex optimizer).
1.5.8