Nav2 Navigation Stack - kilted
kilted
ROS 2 Navigation Stack
|
Union-find data structure Implementation of union-find data structure, described in reference article. Store rooted trees, where each node of a tree is a provisional label and each edge represents an equivalence between two labels. More...
#include <nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp>
Public Member Functions | |
void | reset (const size_t rows, const size_t columns, ConnectivityType connectivity) |
Reset labels tree to initial state. More... | |
Label | makeLabel () |
Creates new next unused label and returns it back. More... | |
Label | unionTrees (Label i, Label j) |
Unite the two trees containing nodes i and j and return the new root See union function in reference article. More... | |
const std::vector< Label > & | getLabels () |
Convert union-find trees to labels lookup table. More... | |
Union-find data structure Implementation of union-find data structure, described in reference article. Store rooted trees, where each node of a tree is a provisional label and each edge represents an equivalence between two labels.
Label | integer type of label |
Definition at line 393 of file image_processing.hpp.
|
inline |
Convert union-find trees to labels lookup table.
Definition at line 465 of file image_processing.hpp.
|
inline |
Creates new next unused label and returns it back.
LabelOverflow | if all possible labels already used |
Definition at line 428 of file image_processing.hpp.
Referenced by nav2_costmap_2d::imgproc_impl::ProcessPixel< ConnectivityType::Way8 >::pass(), and nav2_costmap_2d::imgproc_impl::ProcessPixel< ConnectivityType::Way4 >::pass().
|
inline |
Reset labels tree to initial state.
rows | number of image rows |
columns | number of image columns |
connectivity | pixels connectivity type |
Definition at line 402 of file image_processing.hpp.
|
inline |
Unite the two trees containing nodes i and j and return the new root See union function in reference article.
i | tree node |
j | tree node |
Definition at line 445 of file image_processing.hpp.
Referenced by nav2_costmap_2d::imgproc_impl::ProcessPixel< ConnectivityType::Way8 >::pass(), and nav2_costmap_2d::imgproc_impl::ProcessPixel< ConnectivityType::Way4 >::pass().