Main Page
Namespaces
Classes
Files
File List
File Members
src
inference
model
foreground
MultipliedForegroundInferenceAlgorithm.cpp
Go to the documentation of this file.
1
18
#include "
inference/model/foreground/MultipliedForegroundInferenceAlgorithm.h
"
19
20
namespace
ProbabilisticSceneRecognition
{
21
22
MultipliedForegroundInferenceAlgorithm::MultipliedForegroundInferenceAlgorithm
(
boost::shared_ptr
<std::vector<
boost::shared_ptr<SceneObjectDescription>
> >& pSceneObjects)
23
:
ForegroundInferenceAlgorithm
(pSceneObjects)
24
, mProbability(1.0)
25
{
26
}
27
28
MultipliedForegroundInferenceAlgorithm::~MultipliedForegroundInferenceAlgorithm
()
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.
41
for
(
boost::shared_ptr<SceneObjectDescription>
sceneObject : *
mSceneObjects
)
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
55
double
MultipliedForegroundInferenceAlgorithm::getProbability
()
56
{
57
return
mProbability
;
58
}
59
60
}
ProbabilisticSceneRecognition::MultipliedForegroundInferenceAlgorithm::doInference
void doInference(std::vector< ISM::Object > pEvidenceList, std::ofstream &pRuntimeLogger)
Definition:
MultipliedForegroundInferenceAlgorithm.cpp:32
ProbabilisticSceneRecognition::ForegroundInferenceAlgorithm
Definition:
ForegroundInferenceAlgorithm.h:46
ProbabilisticSceneRecognition::MultipliedForegroundInferenceAlgorithm::~MultipliedForegroundInferenceAlgorithm
~MultipliedForegroundInferenceAlgorithm()
Definition:
MultipliedForegroundInferenceAlgorithm.cpp:28
ProbabilisticSceneRecognition::MultipliedForegroundInferenceAlgorithm::getProbability
double getProbability()
Definition:
MultipliedForegroundInferenceAlgorithm.cpp:55
boost::shared_ptr
ProbabilisticSceneRecognition::MultipliedForegroundInferenceAlgorithm::MultipliedForegroundInferenceAlgorithm
MultipliedForegroundInferenceAlgorithm(boost::shared_ptr< std::vector< boost::shared_ptr< SceneObjectDescription > > > &pSceneObjects)
Definition:
MultipliedForegroundInferenceAlgorithm.cpp:22
ProbabilisticSceneRecognition
Definition:
MappedProbabilityTable.h:33
ROS_INFO_STREAM
#define ROS_INFO_STREAM(args)
MultipliedForegroundInferenceAlgorithm.h
ProbabilisticSceneRecognition::MultipliedForegroundInferenceAlgorithm::mProbability
double mProbability
Definition:
MultipliedForegroundInferenceAlgorithm.h:80
ProbabilisticSceneRecognition::ForegroundInferenceAlgorithm::mSceneObjects
boost::shared_ptr< std::vector< boost::shared_ptr< SceneObjectDescription > > > mSceneObjects
Definition:
ForegroundInferenceAlgorithm.h:88
asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 03:57:54