Go to the documentation of this file.
32 #include <Color/ColorParameterSet.h>
33 #include <Visualizer/OpenGLVisualizer.h>
37 class CObjectFinderStereo;
46 static inline Eigen::Vector3f
47 stringToVector3f(std::string propertyValue)
50 sscanf(propertyValue.c_str(),
62 defineOptionalProperty<std::string>(
64 "VisionX/examples/colors.txt",
65 "The color parameter file configures the colors used for segmentable recognition "
66 "(usually colors.txt)");
67 defineOptionalProperty<float>(
70 "Minimum number of pixels per region for detecting a uniformly colored object");
71 defineOptionalProperty<float>(
72 "MaxEpipolarDistance",
74 "Maximum epipolar line distance allowed for a valid 3D recognition result");
79 defineOptionalProperty<Eigen::Vector3f>(
"MinPoint",
80 Eigen::Vector3f(-3000.0f, -3000.0f, 100.0f),
81 "min point for valid result bounding box")
83 defineOptionalProperty<Eigen::Vector3f>(
"MaxPoint",
84 Eigen::Vector3f(3000.0f, 3000.0f, 3500.0f),
85 "max point for valid result bounding box")
88 defineOptionalProperty<std::string>(
"RobotStateComponentName",
89 "RobotStateComponent",
90 "The name of the RobotStateComponent.");
116 const std::string& referenceName,
117 const Ice::Current&
c = Ice::emptyCurrent)
override
120 stereoCalibration,
x, referenceName,
c);
131 return "BlobRecognition";
145 offeringTopic(getProperty<std::string>(
"DebugObserverName").getValue());
146 usingProxy(getProperty<std::string>(
"RobotStateComponentName").getValue());
158 debugObserver = getTopic<armarx::DebugObserverInterfacePrx>(
159 getProperty<std::string>(
"DebugObserverName").getValue());
160 robotStateComponent = getProxy<armarx::RobotStateComponentInterfacePrx>(
161 getProperty<std::string>(
"RobotStateComponentName").getValue());
198 memoryx::ObjectLocalizationResultList
206 float calculateRecognitionCertainty(
const std::string& objectClassName,
207 const Object3DEntry& entry);
210 std::shared_ptr<CGLContext> contextGL;
211 std::shared_ptr<COpenGLVisualizer> m_pOpenGLVisualizer;
214 float minPixelsPerRegion;
215 float maxEpipolarDistance;
219 std::map<std::string, ObjectColor> objectColors;
220 std::map<ObjectColor, std::string> colorToObjectClass;
223 Vec3d validResultBoundingBoxMin, validResultBoundingBoxMax;
226 std::map<std::string, int> seq;
std::shared_ptr< CColorParameterSet > CColorParameterSetPtr
CByteImage ** resultImages
void reportStereoCalibrationChanged(const StereoCalibration &stereoCalibration, bool imagesAreUndistorted, const std::string &referenceFrame, const Ice::Current &c=Ice::emptyCurrent) override
void reportStereoCalibrationChanged(const StereoCalibration &stereoCalibration, bool x, const std::string &referenceName, const Ice::Current &c=Ice::emptyCurrent) override
VectorXD< 3, double > Vec3d
void onConnectObjectLocalizerProcessor() override
Initializes the CSegmentableRecognition.
static VirtualRobot::RobotPtr createLocalCloneFromFile(RobotStateComponentInterfacePrx robotStatePrx, VirtualRobot::RobotIO::RobotDescription loadMode=VirtualRobot::RobotIO::eFull)
This is a convenience function for createLocalClone, which automatically gets the filename from the R...
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
bool initRecognizer() override
Initializes segmentable recognition.
armarx::MetaInfoSizeBasePtr imageMetaInfo
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
void onInitObjectLocalizerProcessor() override
CByteImage * cameraImages[2]
bool addObjectClass(const memoryx::EntityPtr &objectClassEntity, const memoryx::GridFileManagerPtr &fileManager) override
Add object class to segmentable object recognition.
memoryx::ObjectLocalizationResultList localizeObjectClasses(const std::vector< std::string > &objectClassNames, CByteImage **cameraImages, armarx::MetaInfoSizeBasePtr imageMetaInfo, CByteImage **resultImages) override
localizes segmentable object instances
~BlobRecognition() override
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
void onExitObjectLocalizerProcessor() override
std::shared_ptr< CObjectFinderStereo > CObjectFinderStereoPtr
BlobRecognitionPropertyDefinitions(std::string prefix)
std::shared_ptr< GridFileManager > GridFileManagerPtr
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
BlobRecognition uses CSegmentableRecognition from IVT to recognize and localize single-colored object...
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
std::function< PropertyType(std::string)> PropertyFactoryFunction
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr
ObjectLocalizerProcessor.