38#include <TexturedRecognition/TexturedObjectDatabase.h>
39#include <TexturedRecognition/TexturedRecognition.h>
48 static inline Eigen::Vector3f
49 stringToVector3f(std::string propertyValue)
52 sscanf(propertyValue.c_str(),
66 "A threshold for detecting SIFT descriptors in the "
67 "image. Smaller value -> more features found");
72 "Set quality threshold for Harris interest point calculation. Smaller means more "
73 "features. See CTexturedRecognition");
77 "minimum number of features in Houghspace. See CTexturedRecognition");
80 "maximum error after application of homography on valid "
81 "features. See CTexturedRecognition");
87 Eigen::Vector3f(-3000.0f, -3000.0f, 100.0f),
88 "min point for valid result bounding box")
91 Eigen::Vector3f(3000.0f, 3000.0f, 3500.0f),
92 "max point for valid result bounding box")
96 "StereoCorrelationWindowSize", 19,
"Correlation size for stereo matching");
99 "The threshold for the Zero Mean-Normalized Cross "
100 "Correlation (ZNCC, range: 0.0 - 1.0).");
128 return "TexturedObjectRecognition";
134 const std::string& referenceFrame,
135 const Ice::Current&
c = Ice::emptyCurrent)
override
138 stereoCalibration,
x, referenceFrame,
c);
142 texturedRecognition->GetObjectDatabase()->SetCorrelationParameters(19, 400, 3500, 0.7f);
203 memoryx::ObjectLocalizationResultList
212 float calculateRecognitionCertainty(
const std::string& objectClassName,
213 const Object3DEntry& entry);
214 Vec3d validResultBoundingBoxMin, validResultBoundingBoxMax;
217 CTexturedRecognition* texturedRecognition =
nullptr;
218 int correlationWindowSize = 0;
219 float correlationThreshold = 0.0f;
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
std::function< PropertyType(std::string)> PropertyFactoryFunction
ObjectLocalizerProcessorPropertyDefinitions(std::string prefix)
CByteImage * cameraImages[2]
ObjectLocalizerProcessor()
void reportStereoCalibrationChanged(const StereoCalibration &stereoCalibration, bool imagesAreUndistorted, const std::string &referenceFrame, const Ice::Current &c=Ice::emptyCurrent) override
armarx::MetaInfoSizeBasePtr imageMetaInfo
CStereoCalibration * getStereoCalibration() const
Retrieve stereo calibration corresponding to image provider.
CByteImage ** resultImages
TexturedObjectRecognitionPropertyDefinitions(std::string prefix)
TexturedObjectRecognition uses CTexturedRecognition of IVTRecognition in order to recognize and local...
bool initRecognizer() override
Initializes textured recognition.
void onExitObjectLocalizerProcessor() override
void onInitObjectLocalizerProcessor() override
memoryx::ObjectLocalizationResultList localizeObjectClasses(const std::vector< std::string > &objectClassNames, CByteImage **cameraImages, armarx::MetaInfoSizeBasePtr imageMetaInfo, CByteImage **resultImages) override
localizes textured object instances
void onConnectObjectLocalizerProcessor() override
Initializes the CTexturedRecognition.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void reportStereoCalibrationChanged(const StereoCalibration &stereoCalibration, bool x, const std::string &referenceFrame, const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
bool addObjectClass(const memoryx::EntityPtr &objectClassEntity, const memoryx::GridFileManagerPtr &fileManager) override
Add object class to textured object recognition.
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< Entity > EntityPtr
Typedef of EntityPtr as IceInternal::Handle<Entity> for convenience.
std::shared_ptr< GridFileManager > GridFileManagerPtr