236 virtual public DenseCRFSegmentationProcessorInterface,
249 return "DenseCRFSegmentationProcessor";
259 const Ice::Current& current)
override;
294 template <
typename TimestampMap>
295 struct vertex_timestamp_unequal_filter
297 vertex_timestamp_unequal_filter() =
default;
299 vertex_timestamp_unequal_filter(
TimestampMap tsm,
double ts) : m_tsm(tsm), m_ts(ts)
303 template <
typename Vertex>
305 operator()(
const Vertex& v)
const
308 double current_ts = get(m_tsm, v);
309 return abs(m_ts - current_ts) > 0.00001;
316 template <
typename TimestampMap>
317 struct vertex_timestamp_equal_filter
319 vertex_timestamp_equal_filter() =
default;
321 vertex_timestamp_equal_filter(
TimestampMap tsm,
double ts) : m_tsm(tsm), m_ts(ts)
325 template <
typename Vertex>
327 operator()(
const Vertex& v)
const
330 double current_ts = get(m_tsm, v);
331 return abs(m_ts - current_ts) < 0.00001;
338 double initial_time_;
342 std::deque<Graph> graph_queue_;
343 std::deque<double> timestamp_queue_;
345 void computeGraphUsingVoxelGrid(
const PointCloudT::Ptr inputCloudPtr);
347 void computeVertexOnlyGraph(pcl::PointCloud<PointT>::Ptr input_cloud_ptr);
349 void generateRandomClassLabels();
351 void relabelPointCloud(pcl::PointCloud<PointT>::Ptr input_cloud_ptr);
357 void updatePersistentGraph();
359 void addGraphToPersistentGraph(
Graph& graph);
361 void addCurrentGraphToPersistentGraph();
363 void removeGraphFromPersistentGraph(
Graph& graph);
365 void removeCurrentGraphFromPersistentGraph();
367 void removeTimestampFromPersistentGraph(
double ts);
369 static void copyRGBLToRGBLNormal(
PointCloudT& input_cloud,
379 template <
typename FilterT>
381 filterAndCopyPersistentGraph(
TimestampMap tsm, FilterT filter)
384 typedef boost::filtered_graph<GraphWithTimestamp, boost::keep_all, FilterT>
387 typename boost::graph_traits<FilteredGraph>::vertex_iterator FilteredVertexIterator;
388 FilteredGraph filtered_graph =
389 boost::make_filtered_graph(*persistent_graph_ptr_, boost::keep_all(), filter);
390 FilteredVertexIterator vi, v_end;
392 TimestampMap temp_tsm = boost::get(boost::vertex_timestamp_t(), temp_graph.m_graph);
394 boost::get(boost::vertex_confidence_t(), persistent_graph_ptr_->m_graph);
395 ConfidenceMap temp_cm = boost::get(boost::vertex_confidence_t(), temp_graph.m_graph);
396 int num_vertices = 0;
397 for (boost::tie(vi, v_end) = boost::vertices(filtered_graph); vi != v_end; ++vi)
400 VertexWTsId new_vertex = boost::add_vertex(temp_graph);
401 boost::put(temp_tsm, new_vertex, get(tsm, *vi));
402 boost::put(temp_cm, new_vertex, get(cm, *vi));
403 PointWithNormalT point = filtered_graph.m_g.m_graph.m_point_cloud->points[*vi];
404 temp_graph[new_vertex] = point;
411 pcl::PointCloud<pcl::PointXYZL>::ConstPtr selectRandomSeeds();
413 Eigen::MatrixXf computeRandomUnaryEnergy(
int num_points);
415 void provideAllGraphs();
416 void provideAllConfidences();
418 WriteBufferedTripleBuffer<armarx::densecrf::config::data> config_;
419 std::mutex write_mutex_;
#define ARMARX_CONFIG_STRUCT_DEFINE_ADAPT_CONFIGURE(Namespace, Name,...)
Usage ARMARX_CONFIG_STRUCT_DEFINE_ADAPT_CONFIGURE( foospace, foo, (float, flooat, AX_DEFAULT(1234),...