Skip to content
Snippets Groups Projects
Commit 4b6a1c59 authored by Jean Patrick Mathes's avatar Jean Patrick Mathes
Browse files

Only show objects with confidence above threshold

parent 18437779
No related branches found
No related tags found
1 merge request!283Resolve "Add component to interactively change the object instances in the memory via ArViz interactive"
......@@ -110,7 +110,7 @@ namespace armarx
providing.timestamp = DateTime::Now();
}
if (current.confidence > 0)
if (current.confidence > properties.confidenceThreshold)
{
remainingPoses.push_back(current);
}
......@@ -130,7 +130,10 @@ namespace armarx
for (objpose::ObjectPose & objectPose: storedPoses)
{
visualizeObject(objectPose);
if (objectPose.confidence > properties.confidenceThreshold)
{
visualizeObject(objectPose);
}
}
changes.visualizeNewObjects(this);
......
......@@ -18,6 +18,7 @@ namespace armarx
{
std::string providerName;
float const& objectScaling;
float const& confidenceThreshold;
};
explicit Editor(viz::Client& client,
......
......@@ -16,6 +16,9 @@ namespace armarx
defs->optional(this->objectScaling, "Editor.ObjectScaling",
"Scaling factor that is applied to all intractable objects.");
defs->optional(this->confidenceThreshold, "Editor.ConfidenceThreshold",
"Only objects with a confidence greater than this value are shown.");
return defs;
}
......@@ -63,7 +66,12 @@ namespace armarx
objpose::ObjectPoseClient client = getClient();
Editor::Properties properties = { .providerName = getName(), .objectScaling = objectScaling };
Editor::Properties properties =
{
.providerName = getName(),
.objectScaling = objectScaling,
.confidenceThreshold = confidenceThreshold
};
Editor editor(arviz, properties,
[&](objpose::ProvidedObjectPoseSeq &poses)
......
......@@ -41,6 +41,7 @@ namespace armarx
objpose::ProviderInfo providerInfo;
float objectScaling = 1.01F;
float confidenceThreshold = 0.0F;
armarx::SimpleRunningTask<>::pointer_type objectVizTask;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment