SummarizedForegroundInferenceAlgorithm.cpp
Go to the documentation of this file.
1 
19 
21 
23  : ForegroundInferenceAlgorithm(pSceneObjects)
24  , mProbability(0.0)
25  {
26  }
27 
29  {
30  }
31 
32  void SummarizedForegroundInferenceAlgorithm::doInference(std::vector<ISM::Object> pEvidenceList, std::ofstream& pRuntimeLogger)
33  {
34  // Reset the scene probability. We MARGINALZE here, so we set it to ZERO.
35  mProbability = 0.0;
36 
37  ROS_INFO_STREAM("Calculating scene probability.");
38 
39  // Iterate over all scene objects, evaluate them and summarize the results
41  {
42  // Update the scene objects with the new evidence.
43  sceneObject->update(pEvidenceList, pRuntimeLogger);
44 
45  // Add the score of the scene object to the scene probabilty.
46  mProbability += sceneObject->getSceneObjectProbability() * sceneObject->getSceneObjectPriori();
47 
48  ROS_INFO_STREAM(" > Adding to scene probability: '" << sceneObject->getSceneObjectProbability() << "' with priori '" << sceneObject->getSceneObjectPriori() << "'.");
49 
50  // TODO Think about a normalization term.
51  }
52  }
53 
55  {
56  return mProbability;
57  }
58 
59 }
SummarizedForegroundInferenceAlgorithm(boost::shared_ptr< std::vector< boost::shared_ptr< SceneObjectDescription > > > &pSceneObjects)
void doInference(std::vector< ISM::Object > pEvidenceList, std::ofstream &pRuntimeLogger)
#define ROS_INFO_STREAM(args)
boost::shared_ptr< std::vector< boost::shared_ptr< SceneObjectDescription > > > mSceneObjects


asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 04:00:08