31#include <pcl/common/transforms.h>
32#include <pcl/correspondence.h>
33#include <pcl/features/fpfh_omp.h>
34#include <pcl/features/normal_3d_omp.h>
35#include <pcl/filters/filter.h>
36#include <pcl/filters/passthrough.h>
37#include <pcl/io/pcd_io.h>
38#include <pcl/kdtree/kdtree_flann.h>
39#include <pcl/point_types.h>
40#include <pcl/recognition/cg/geometric_consistency.h>
41#include <pcl/search/kdtree.h>
48#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
51#include <VisionX/interface/components/DeepSegmenterInterface.h>
52#include <VisionX/interface/components/PointCloudSegmenter.h>
58#include <Image/ByteImage.h>
64 using PointL = pcl::PointXYZL;
90 "DebugDrawerTopicName",
"DebugDrawerUpdates",
"Name of the debug drawer topic");
92 "DeepSegmenterPythonUpdates",
93 "Name of the deep segmenter topic");
97 "Name of the offered segmentation method (EC, LCCP or RG)");
99 "StartEnabled",
true,
"Enable or disable the segmentation by default");
101 "SingleRun",
false,
"Segment only one scene after each enable call");
106 "Minimum segment size required for the lccp segmentation");
108 "lccpVoxelResolution",
110 "Supervoxel resolution required for the lccp segmentation");
112 "lccpSeedResolution", 80,
"Seed resolution required for the lccp segmentation");
114 "lccpColorImportance", 0.0,
"Color importance required for the lccp segmentation");
117 "Spatial importance required for the lccp segmentation");
120 "Normal importance required for the lccp segmentation");
123 "Concavity threshold required for the lccp segmentation");
125 "lccpSmoothnessThreshold",
127 "Smoothness threshold required for the lccp segmentation");
131 "rgSmoothnessThreshold",
133 "Smoothness threshold required for the region growing segmentation");
135 "rgCurvatureThreshold",
137 "Curvature threshold required for the region growing segmentation");
141 "VisualizeCropBox",
false,
"Visualize crop box via debug drawer");
155 virtual public PointCloudSegmenterInterface,
168 return "PointCloudSegmenter";
172 const Ice::Current&
c = Ice::emptyCurrent)
override;
208 armarx::TimestampBasePtr
212 const Ice::Current&
c = Ice::emptyCurrent)
override;
214 const Ice::Current&
c = Ice::emptyCurrent)
override;
219 float curvatureThreshold,
220 const Ice::Current&
c = Ice::emptyCurrent)
override;
222 const Ice::Current&
c = Ice::emptyCurrent)
override;
228 void convertFromXYZRGBAtoXYZL(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr& sourceCloudPtr,
229 pcl::PointCloud<pcl::PointXYZL>::Ptr& targetCloudPtr);
230 void pushColoredLabeledCloudtoBuffer();
241 std::mutex timestampMutex;
242 long lastProcessedTimestamp;
244 std::mutex enableMutex;
247 std::mutex providerMutex;
248 std::string providerName;
249 std::string segmentationMethod;
258 float concavityThres;
259 float smoothnessThes;
262 float rgSmoothnessThes;
263 float rgCurvatureThres;
265 void colorizeLabeledCloud();
268 armarx::DeepSegmenterInterfacePrx deepSegmenterTopic;
269 armarx::Blob rgbImage;
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)
Properties of PointCloudProcessor.
PointCloudProcessorPropertyDefinitions(std::string prefix)
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
PointCloudSegmenterPropertyDefinitions(std::string prefix)
void loadLccpParametersFromFile(const std::string &filename, const Ice::Current &c=Ice::emptyCurrent) override
void RemoteGui_update() override
void onExitPointCloudProcessor() override
LccpParameters getLccpParameters(const Ice::Current &c=Ice::emptyCurrent) override
void enablePipelineStep(const Ice::Current &c=Ice::emptyCurrent) override
void onConnectPointCloudProcessor() override
void disablePipelineStep(const Ice::Current &c=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onDisconnectPointCloudProcessor() override
void changePointCloudProvider(const std::string &providerName, const Ice::Current &c=Ice::emptyCurrent) override
void setRgParameters(float smoothnessThreshold, float curvatureThreshold, const Ice::Current &c=Ice::emptyCurrent) override
void setLccpParameters(const LccpParameters ¶meters, const Ice::Current &c=Ice::emptyCurrent) override
void loadRgParametersFromFile(const std::string &filename, const Ice::Current &c=Ice::emptyCurrent) override
void onInitPointCloudProcessor() override
void createRemoteGuiTab()
armarx::TimestampBasePtr getLastProcessedTimestamp(const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
bool isPipelineStepEnabled(const Ice::Current &c=Ice::emptyCurrent) override
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
pcl::PointCloud< PointO >::Ptr PointOPtr
pcl::PointCloud< PointL >::Ptr PointLPtr
pcl::PointXYZRGBL PointRGBL
pcl::PointCloud< PointRGBL >::Ptr PointRGBLPtr
FloatSpinBox rgCurvatureThreshold
FloatSpinBox rgSmoothnessThreshold