#include <HierarchicalShapeModelNode.h>
Public Member Functions | |
double | calculateProbabilityForHypothesis (std::vector< ISM::Object > pEvidenceList, std::vector< unsigned int > pAssignments, unsigned int &pSlotId, bool pCut, std::vector< boost::shared_ptr< ConditionalProbability >> &pConditionalProbabilities) |
std::vector< boost::shared_ptr< HierarchicalShapeModelNode > > | getChildren () |
unsigned int | getNumberOfNodes () |
std::string | getSceneObjectType () |
HierarchicalShapeModelNode (boost::property_tree::ptree &pPt, unsigned int &pID) | |
void | initializeVisualizer (boost::shared_ptr< Visualization::ProbabilisticPrimarySceneObjectVisualization > mSuperior) |
bool | isReference (unsigned int &pReferenceTo) |
void | load (boost::property_tree::ptree &pPt, unsigned int &pID) |
void | resetVisit () |
void | setAbsoluteParentPose (boost::shared_ptr< ISM::Pose > pPose) |
void | setParentObjectType (const std::string &pParentObject) |
void | setReferencedNode (boost::shared_ptr< HierarchicalShapeModelNode > pReferencedNode) |
void | visualize (std::vector< ISM::Object > pEvidenceList) |
~HierarchicalShapeModelNode () | |
Private Attributes | |
boost::shared_ptr< ISM::Pose > | mAbsoluteParentPose |
boost::shared_ptr< ISM::Pose > | mAbsolutePose |
std::vector< boost::shared_ptr< HierarchicalShapeModelNode > > | mChildren |
boost::shared_ptr< GaussianMixtureDistribution > | mGaussianMixtureDistributionOrientation |
boost::shared_ptr< GaussianMixtureDistribution > | mGaussianMixtureDistributionPosition |
bool | mIsReference |
std::string | mParentObject |
std::vector< Eigen::Vector3d > | mRawData |
boost::shared_ptr< HierarchicalShapeModelNode > | mReferencedNode |
unsigned int | mReferenceTo |
boost::shared_ptr< ISM::Pose > | mRelativePose |
std::string | mSceneObject |
boost::shared_ptr< Visualization::ProbabilisticSecondarySceneObjectVisualization > | mVisualizer |
bool | mWasVisited |
A node in object constellation model (OCM). It is responsible for maintaining the gaussian mixture distributions for this node. Note that all distributions are modelled in the coordinate system of their parent nodes and the transformation of evidence into this coordinate system is also handled here.
Definition at line 48 of file HierarchicalShapeModelNode.h.
ProbabilisticSceneRecognition::HierarchicalShapeModelNode::HierarchicalShapeModelNode | ( | boost::property_tree::ptree & | pPt, |
unsigned int & | pID | ||
) |
Constructor.
pPt | Data structure for performing XML operations. |
Definition at line 22 of file HierarchicalShapeModelNode.cpp.
ProbabilisticSceneRecognition::HierarchicalShapeModelNode::~HierarchicalShapeModelNode | ( | ) |
Destructor.
Definition at line 32 of file HierarchicalShapeModelNode.cpp.
double ProbabilisticSceneRecognition::HierarchicalShapeModelNode::calculateProbabilityForHypothesis | ( | std::vector< ISM::Object > | pEvidenceList, |
std::vector< unsigned int > | pAssignments, | ||
unsigned int & | pSlotId, | ||
bool | pCut, | ||
std::vector< boost::shared_ptr< ConditionalProbability >> & | pConditionalProbabilities | ||
) |
Calculates the probability for a hypothesis with the given assignments.
pEvidenceList | A list containing all evidences. |
pAssignments | Assignments of parts to slots. |
pSlotId | The id of the slot this node is associated with. |
pCut | True, if a zero-object was assigned to a direct parent node. |
pConditionalProbabilities | List of conditional probabilities associated with each slot. |
Definition at line 96 of file HierarchicalShapeModelNode.cpp.
std::vector< boost::shared_ptr< HierarchicalShapeModelNode > > ProbabilisticSceneRecognition::HierarchicalShapeModelNode::getChildren | ( | ) |
Get the node's child nodes.
Definition at line 228 of file HierarchicalShapeModelNode.cpp.
unsigned int ProbabilisticSceneRecognition::HierarchicalShapeModelNode::getNumberOfNodes | ( | ) |
Return the number of nodes in the OCM.
Definition at line 208 of file HierarchicalShapeModelNode.cpp.
|
inline |
get the type of the object that is represented by this node.
Definition at line 137 of file HierarchicalShapeModelNode.h.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::initializeVisualizer | ( | boost::shared_ptr< Visualization::ProbabilisticPrimarySceneObjectVisualization > | mSuperior | ) |
Initializes the visualization mechanism.
mSuperior | The superior visualizer coordinating the scene visualizers. |
Definition at line 72 of file HierarchicalShapeModelNode.cpp.
bool ProbabilisticSceneRecognition::HierarchicalShapeModelNode::isReference | ( | unsigned int & | pReferenceTo | ) |
Return whether the node is a reference to another.
pReferenceTo | the ID of the node this is a reference to or its own ID (non-reference nodes reference themselves). |
Definition at line 222 of file HierarchicalShapeModelNode.cpp.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::load | ( | boost::property_tree::ptree & | pPt, |
unsigned int & | pID | ||
) |
Loads the working data from an XML file.
pPt | Data structure for performing XML operations. |
Definition at line 36 of file HierarchicalShapeModelNode.cpp.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::resetVisit | ( | ) |
set the node to unvisited.
Definition at line 240 of file HierarchicalShapeModelNode.cpp.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::setAbsoluteParentPose | ( | boost::shared_ptr< ISM::Pose > | pPose | ) |
Sets the absolute pose of the parent node.
pPose | The absolute pose. |
Definition at line 91 of file HierarchicalShapeModelNode.cpp.
|
inline |
set the type of the node's parent.
pParentObject | the type of the node's parent. |
Definition at line 143 of file HierarchicalShapeModelNode.h.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::setReferencedNode | ( | boost::shared_ptr< HierarchicalShapeModelNode > | pReferencedNode | ) |
set the actually referenced node.
pReferencedNode | the node that this one actually references, if it is a reference. |
Definition at line 233 of file HierarchicalShapeModelNode.cpp.
void ProbabilisticSceneRecognition::HierarchicalShapeModelNode::visualize | ( | std::vector< ISM::Object > | pEvidenceList | ) |
Update the visualizers based on the evidence.
pEvidenceList | A list containing all evidences. |
Definition at line 166 of file HierarchicalShapeModelNode.cpp.
|
private |
The pose of the parent object in absolute coordinates.
Definition at line 165 of file HierarchicalShapeModelNode.h.
|
private |
The pose of this object in absolute coordinates. This variable is used during inference and reused in the visualization.
Definition at line 155 of file HierarchicalShapeModelNode.h.
|
private |
The chrildren of this node.
Definition at line 185 of file HierarchicalShapeModelNode.h.
|
private |
The gaussian mixture distribution representing the orientation part of the shape.
Definition at line 175 of file HierarchicalShapeModelNode.h.
|
private |
The gaussian mixture distribution representing the position part of the shape.
Definition at line 170 of file HierarchicalShapeModelNode.h.
|
private |
Whether this node is only a reference to another one.
Definition at line 195 of file HierarchicalShapeModelNode.h.
|
private |
The type of the parent object of this node.
Definition at line 217 of file HierarchicalShapeModelNode.h.
|
private |
A list of all samples that were used to learn the gaussian mixture distributions.
Definition at line 180 of file HierarchicalShapeModelNode.h.
|
private |
The actual node this one is a reference to, if it is, null otherwise.
Definition at line 206 of file HierarchicalShapeModelNode.h.
|
private |
The ID of the node this one is a reference to, if it is. If node is not a reference, ID of the node, which the references to it use (a non-reference references itself)
Definition at line 201 of file HierarchicalShapeModelNode.h.
|
private |
The pose of this object in coordinates relative to the parent frame. This variable is used during inference and reused in the visualization.
Definition at line 160 of file HierarchicalShapeModelNode.h.
|
private |
The type of the object that is represented by this node.
Definition at line 150 of file HierarchicalShapeModelNode.h.
|
private |
Coordinates the secondary scene object visualizers.
Definition at line 190 of file HierarchicalShapeModelNode.h.
|
private |
Whether this node was visited through a not cut path before (that is a path through the tree that does not contain an assignment to the null object)
Definition at line 212 of file HierarchicalShapeModelNode.h.