34 #include <TexturedRecognition/TexturedRecognition.h>
35 #include <TexturedRecognition/TexturedObjectDatabase.h>
50 static inline Eigen::Vector3f stringToVector3f(std::string propertyValue)
53 sscanf(propertyValue.c_str(),
"%f, %f, %f", &vec.data()[0], &vec.data()[1], &vec.data()[2]);
60 defineOptionalProperty<float>(
"SIFTThreshold", 0.01,
"A threshold for detecting SIFT descriptors in the image. Smaller value -> more features found");
62 defineOptionalProperty<float>(
"QualityThreshold", 0.0001,
"Set quality threshold for Harris interest point calculation. Smaller means more features. See CTexturedRecognition");
63 defineOptionalProperty<int>(
"nMinValidFeatures", 10,
"minimum number of features in Houghspace. See CTexturedRecognition");
64 defineOptionalProperty<float>(
"MaxError", 3.3f,
"maximum error after application of homography on valid features. See CTexturedRecognition");
68 defineOptionalProperty<Eigen::Vector3f>(
"MinPoint", Eigen::Vector3f(-3000.0f, -3000.0f, 100.0f),
"min point for valid result bounding box").setFactory(f);
69 defineOptionalProperty<Eigen::Vector3f>(
"MaxPoint", Eigen::Vector3f(3000.0f, 3000.0f, 3500.0f),
"max point for valid result bounding box").setFactory(f);
71 defineOptionalProperty<int>(
"StereoCorrelationWindowSize", 19,
"Correlation size for stereo matching");
72 defineOptionalProperty<float>(
"StereoCorrelationThreshold", 0.7f,
"The threshold for the Zero Mean-Normalized Cross Correlation (ZNCC, range: 0.0 - 1.0).");
99 return "TexturedObjectRecognition";
102 void reportStereoCalibrationChanged(
const StereoCalibration& stereoCalibration,
bool x,
const std::string& referenceFrame,
const Ice::Current&
c = Ice::emptyCurrent)
override
107 texturedRecognition->GetObjectDatabase()->SetCorrelationParameters(19, 400, 3500, 0.7f);
117 offeringTopic(getProperty<std::string>(
"DebugObserverName").getValue());
127 debugObserver = getTopic<armarx::DebugObserverInterfacePrx>(getProperty<std::string>(
"DebugObserverName").getValue());
166 float calculateRecognitionCertainty(
const std::string& objectClassName,
const Object3DEntry& entry);
167 Vec3d validResultBoundingBoxMin, validResultBoundingBoxMax;
170 CTexturedRecognition* texturedRecognition =
nullptr;
171 int correlationWindowSize = 0;
172 float correlationThreshold = 0.0f;