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