Main Page
Namespaces
Classes
Files
File List
File Members
src
inference
model
foreground
SummarizedForegroundInferenceAlgorithm.cpp
Go to the documentation of this file.
1
18
#include "
inference/model/foreground/SummarizedForegroundInferenceAlgorithm.h
"
19
20
namespace
ProbabilisticSceneRecognition
{
21
22
SummarizedForegroundInferenceAlgorithm::SummarizedForegroundInferenceAlgorithm
(
boost::shared_ptr
<std::vector<
boost::shared_ptr<SceneObjectDescription>
> >& pSceneObjects)
23
:
ForegroundInferenceAlgorithm
(pSceneObjects)
24
, mProbability(0.0)
25
{
26
}
27
28
SummarizedForegroundInferenceAlgorithm::~SummarizedForegroundInferenceAlgorithm
()
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
40
for
(
boost::shared_ptr<SceneObjectDescription>
sceneObject : *
mSceneObjects
)
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
54
double
SummarizedForegroundInferenceAlgorithm::getProbability
()
55
{
56
return
mProbability
;
57
}
58
59
}
ProbabilisticSceneRecognition::SummarizedForegroundInferenceAlgorithm::SummarizedForegroundInferenceAlgorithm
SummarizedForegroundInferenceAlgorithm(boost::shared_ptr< std::vector< boost::shared_ptr< SceneObjectDescription > > > &pSceneObjects)
Definition:
SummarizedForegroundInferenceAlgorithm.cpp:22
SummarizedForegroundInferenceAlgorithm.h
ProbabilisticSceneRecognition::SummarizedForegroundInferenceAlgorithm::doInference
void doInference(std::vector< ISM::Object > pEvidenceList, std::ofstream &pRuntimeLogger)
Definition:
SummarizedForegroundInferenceAlgorithm.cpp:32
ProbabilisticSceneRecognition::ForegroundInferenceAlgorithm
Definition:
ForegroundInferenceAlgorithm.h:46
boost::shared_ptr
ProbabilisticSceneRecognition::SummarizedForegroundInferenceAlgorithm::mProbability
double mProbability
Definition:
SummarizedForegroundInferenceAlgorithm.h:79
ProbabilisticSceneRecognition
Definition:
MappedProbabilityTable.h:33
ProbabilisticSceneRecognition::SummarizedForegroundInferenceAlgorithm::getProbability
double getProbability()
Definition:
SummarizedForegroundInferenceAlgorithm.cpp:54
ROS_INFO_STREAM
#define ROS_INFO_STREAM(args)
ProbabilisticSceneRecognition::SummarizedForegroundInferenceAlgorithm::~SummarizedForegroundInferenceAlgorithm
~SummarizedForegroundInferenceAlgorithm()
Definition:
SummarizedForegroundInferenceAlgorithm.cpp:28
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 04:00:08