/** * Point Cloud Segmentation using Felzenszwalb-Huttenlocher Algorithm * * Copyright (C) Jacobs University Bremen * * Released under the GPL version 3. * * @author Mihai-Cotizo Sima */ #ifndef __FHGRAPH_H_ #define __FHGRAPH_H_ #include #include #include #include #include #include class FHGraph { public: FHGraph(std::vector< Point >& ps, double weight(Point, Point), double sigma, double eps, int neighbors, float radius); edge* getGraph(); Point operator[](int index); int getNumPoints(); int getNumEdges(); void dispose(); private: void compute_neighbors(double weight(Point, Point), double eps); void do_gauss(double sigma); void without_gauss(); std::vector edges; std::vector& points; int V; int E; int nr_neighbors; float radius; struct he{ int x; float w; }; std::vector< std::list > adjency_list; }; #endif