API for 8-connected connected components algorithm to find critical regions in a map demarcated by obstalces and critical lines Neigbouring critical regions help form the topological graph. Since this algorithm is 8-connected, any demarcating lines should be drawn 4-connected if they are single pixel. More...
#include <connected_components.h>
Public Member Functions | |
| ConnectedComponents (const cv::Mat &image, std::vector< int32_t > &component_map) | |
| Given an image map containing obstacles and demarcating critical lines, the constructor runs a critical components algorithm to find critical regions. | |
| size_t | getNumberComponents () |
| Returns the number of components obtained by running the critical components algorithm. | |
Private Attributes | |
| size_t | number_components_ |
| The number of critical components that are found is stored so that it can be retrieved later using getNumberComponents. | |
API for 8-connected connected components algorithm to find critical regions in a map demarcated by obstalces and critical lines Neigbouring critical regions help form the topological graph. Since this algorithm is 8-connected, any demarcating lines should be drawn 4-connected if they are single pixel.
Definition at line 56 of file connected_components.h.
| bwi_mapper::ConnectedComponents::ConnectedComponents | ( | const cv::Mat & | image, |
| std::vector< int32_t > & | component_map | ||
| ) |
Given an image map containing obstacles and demarcating critical lines, the constructor runs a critical components algorithm to find critical regions.
| image | map with obstacles and critical lines |
Definition at line 50 of file connected_components.cpp.
Returns the number of components obtained by running the critical components algorithm.
Definition at line 86 of file connected_components.cpp.
size_t bwi_mapper::ConnectedComponents::number_components_ [private] |
The number of critical components that are found is stored so that it can be retrieved later using getNumberComponents.
Definition at line 80 of file connected_components.h.