38 #include "modules/perception/lidar/detector/ncut_segmentation/common/graph_felzenszwalb/disjoint_set.h" 41 namespace perception {
45 #define THRESHOLD(size, c) (c / size) 67 std::sort(edges, edges + num_edges);
73 float *
threshold =
new float[num_vertices];
74 for (
int i = 0; i < num_vertices; i++) {
79 for (
int i = 0; i < num_edges; i++) {
80 edge *pedge = &edges[i];
83 int a = u->
find(pedge->
a);
84 int b = u->
find(pedge->
b);
86 if ((pedge->
w <= threshold[a]) && (pedge->
w <= threshold[b])) {
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
int find(int x)
Definition: disjoint_set.h:75
void join(int x, int y)
Definition: disjoint_set.h:84
bool operator<(const edge &a, const edge &b)
Definition: segment_graph.h:53
int a
Definition: segment_graph.h:49
Definition: segment_graph.h:47
int size(int x) const
Definition: disjoint_set.h:55
#define THRESHOLD(size, c)
Definition: segment_graph.h:45
Definition: disjoint_set.h:49
Universe * segment_graph(int num_vertices, int num_edges, edge *edges, float c)
Definition: segment_graph.h:65
float w
Definition: segment_graph.h:48
int b
Definition: segment_graph.h:50
Image< uchar > * threshold(Image< T > *src, int t)
Definition: imutil.h:63