topological_mapper.h
Go to the documentation of this file.
00001 
00038 #ifndef TOPOLOGICAL_MAPPER_EA94RQRE
00039 #define TOPOLOGICAL_MAPPER_EA94RQRE
00040 
00041 #include <bwi_mapper/voronoi_approximator.h>
00042 #include <bwi_mapper/graph.h>
00043 
00044 namespace bwi_mapper {
00045 
00046 
00052   class TopologicalMapper : public VoronoiApproximator {
00053 
00054     public:
00055 
00062       TopologicalMapper (const std::string &fname) :
00063         VoronoiApproximator(fname) {}
00064 
00075       void computeTopologicalGraph(double threshold, double critical_epsilon,
00076           double merge_threshold); 
00077 
00082       void drawCriticalPoints(cv::Mat &image, 
00083           uint32_t orig_x = 0, uint32_t orig_y = 0); 
00084 
00089       void drawConnectedComponents(cv::Mat &image,
00090           uint32_t orig_x = 0, uint32_t orig_y = 0); 
00091 
00092       void drawRegionGraph(cv::Mat &image, 
00093           uint32_t orig_x = 0, uint32_t orig_y = 0);
00094       void drawPointGraph(cv::Mat &image, 
00095           uint32_t orig_x = 0, uint32_t orig_y = 0);
00096 
00097       void writeRegionGraphToFile(std::string &filename);
00098       void writePointGraphToFile(std::string &filename);
00099 
00104       void printCriticalPoints(); 
00105 
00112       void drawOutput(cv::Mat &image); 
00113       void saveOutput(); 
00114 
00115     protected:
00116       
00122       void computeCriticalRegions (double critical_epsilon);
00123 
00124       void computeGraph (double merge_threshold);
00125 
00130       void drawCriticalLines(cv::Mat &image, uint32_t orig_x = 0, 
00131           uint32_t orig_y = 0, bool draw_idx = false, 
00132           bool visualization_image = false); 
00133 
00135       std::vector<VoronoiPoint> critical_points_;
00136 
00139       cv::Mat component_image_;
00140 
00143       std::vector<int32_t> component_map_;
00144 
00146       std::vector<cv::Vec3b> component_colors_;
00147 
00149       size_t num_components_;
00150 
00151       Graph region_graph_;
00152       Graph pass_1_graph_;
00153       Graph pass_2_graph_;
00154       Graph pass_3_graph_;
00155       Graph pass_4_graph_;
00156       Graph point_graph_;
00157 
00158   }; /* TopologicalMapper */
00159 
00160 } /* bwi_mapper */
00161 
00162 #endif /* end of include guard: TOPOLOGICAL_MAPPER_EA94RQRE */


bwi_mapper
Author(s): Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:21