33#include <Color/ColorParameterSet.h>
34#include <SegmentableRecognition/SegmentableRecognition.h>
35#include <Visualizer/OpenGLVisualizer.h>
53 static inline Eigen::Vector3f
54 stringToVector3f(std::string propertyValue)
57 sscanf(propertyValue.c_str(),
71 "VisionX/examples/colors.txt",
72 "The color parameter file configures the colors used for segmentable recognition "
73 "(usually colors.txt)");
77 "Minimum number of pixels per region for detecting a uniformly colored object");
79 "MaxEpipolarDistance",
81 "Maximum epipolar line distance allowed for a valid 3D recognition result");
88 Eigen::Vector3f(-3000.0f, -3000.0f, 100.0f),
89 "min point for valid result bounding box")
92 Eigen::Vector3f(3000.0f, 3000.0f, 3500.0f),
93 "max point for valid result bounding box")
123 const std::string& referenceName,
124 const Ice::Current&
c = Ice::emptyCurrent)
override
127 stereoCalibration,
x, referenceName,
c);
138 return "SegmentableObjectRecognition";
200 memoryx::ObjectLocalizationResultList
208 float calculateRecognitionCertainty(
const std::string& objectClassName,
209 const Object3DEntry& entry);
210 void visualizeResults(
const Object3DList& objectList, CByteImage**
resultImages);
214 std::shared_ptr<CGLContext> contextGL;
215 std::shared_ptr<COpenGLVisualizer> m_pOpenGLVisualizer;
218 float minPixelsPerRegion;
219 float maxEpipolarDistance;
223 std::map<std::string, ObjectColor> objectColors;
225 Vec3d validResultBoundingBoxMin, validResultBoundingBoxMax;
228 std::map<std::string, int> seq;
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
CByteImage ** resultImages
SegmentableObjectRecognitionPropertyDefinitions(std::string prefix)
~SegmentableObjectRecognition() override
bool initRecognizer() override
Initializes segmentable 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 segmentable object instances
void onConnectObjectLocalizerProcessor() override
Initializes the CSegmentableRecognition.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
SegmentableObjectRecognition()
void reportStereoCalibrationChanged(const StereoCalibration &stereoCalibration, bool x, const std::string &referenceName, 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 segmentable 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
std::shared_ptr< CSegmentableRecognition > CSegmentableRecognitionPtr
std::shared_ptr< CColorParameterSet > CColorParameterSetPtr