33 #include <Color/ColorParameterSet.h>
34 #include <SegmentableRecognition/SegmentableRecognition.h>
35 #include <Visualizer/OpenGLVisualizer.h>
55 static inline Eigen::Vector3f stringToVector3f(std::string propertyValue)
58 sscanf(propertyValue.c_str(),
"%f, %f, %f", &vec.data()[0], &vec.data()[1], &vec.data()[2]);
65 defineOptionalProperty<std::string>(
"ColorParameterFile",
"VisionX/examples/colors.txt",
"The color parameter file configures the colors used for segmentable recognition (usually colors.txt)");
66 defineOptionalProperty<float>(
"MinPixelsPerRegion", 200,
"Minimum number of pixels per region for detecting a uniformly colored object");
67 defineOptionalProperty<float>(
"MaxEpipolarDistance", 6,
"Maximum epipolar line distance allowed for a valid 3D recognition result");
72 defineOptionalProperty<Eigen::Vector3f>(
"MinPoint", Eigen::Vector3f(-3000.0f, -3000.0f, 100.0f),
"min point for valid result bounding box").setFactory(f);
73 defineOptionalProperty<Eigen::Vector3f>(
"MaxPoint", Eigen::Vector3f(3000.0f, 3000.0f, 3500.0f),
"max point for valid result bounding box").setFactory(f);
75 defineOptionalProperty<float>(
"SizeRatioThreshold", 0.7f,
"");
76 defineOptionalProperty<float>(
"CorrelationThreshold", 0.7f,
"");
98 void reportStereoCalibrationChanged(
const StereoCalibration& stereoCalibration,
bool x,
const std::string& referenceName,
const Ice::Current&
c = Ice::emptyCurrent)
override
110 return "SegmentableObjectRecognition";
123 offeringTopic(getProperty<std::string>(
"DebugObserverName").getValue());
134 debugObserver = getTopic<armarx::DebugObserverInterfacePrx>(getProperty<std::string>(
"DebugObserverName").getValue());
172 float calculateRecognitionCertainty(
const std::string& objectClassName,
const Object3DEntry& entry);
173 void visualizeResults(
const Object3DList& objectList, CByteImage**
resultImages);
177 std::shared_ptr<CGLContext> contextGL;
178 std::shared_ptr<COpenGLVisualizer> m_pOpenGLVisualizer;
181 float minPixelsPerRegion;
182 float maxEpipolarDistance;
186 std::map<std::string, ObjectColor> objectColors;
188 Vec3d validResultBoundingBoxMin, validResultBoundingBoxMax;
191 std::map<std::string, int> seq;