#include <segment_expander.h>
|
std::vector< std::vector< Eigen::Vector2d > > | calcEndpoints (float *_potential) |
| looks for crossings and saves all segment endpoints of it More...
|
|
std::vector< Segment > | getGraph (const std::vector< std::vector< Eigen::Vector2d >> &_endPoints, float *_potential, const float _min_length, float _optimizePixelsCrossing, const float _optimizePixelsEndSegments) |
| returns a list of segments, which represent the found search graph More...
|
|
void | Initialize (cv::Mat &_map, cv::Mat &_distField, cv::Mat &_voronoiPath) |
| initializes the expander by setting the voronoi path map and distancefield More...
|
|
| Segment_Expander () |
|
|
void | addExpansionCandidate (const Index ¤t, const Index &next, float *potential) |
|
bool | checkSegmentPoint (const Index &_point) |
|
template<class T , class S , class C > |
void | clearpq (std::priority_queue< T, S, C > &q) |
|
std::vector< Eigen::Vector2d > | expandCrossing (const Index &i, float *_potential) |
|
Eigen::Vector2d | expandSegment (Index start, float *_potential, const std::vector< std::vector< Eigen::Vector2d >> &_endpoints) |
|
float | getMinSegmentWidth (const std::vector< Eigen::Vector2d > &_path) |
|
std::vector< Eigen::Vector2d > | getPath (const Index &start, float *_potential, const std::vector< std::vector< Eigen::Vector2d >> &_endpoints) |
|
bool | isEndpoint (Index &_current, const std::vector< std::vector< Eigen::Vector2d >> &_endpoints) |
|
uint32_t | nrOfNeighbours (uint32_t i) const |
|
void | optimizeSegments (std::vector< Segment > &_segments, float _maxPixelsCrossing, float _maxPixelsEndSeg) |
|
void | optimizeSegmentsAroundPoint (std::vector< Segment > &_segments, const Eigen::Vector2d &pt, float maxPixels, int startIndex) |
|
void | removeEndpoint (const Index &_current, std::vector< std::vector< Eigen::Vector2d >> &_endpoints) |
|
void | removeSegmentFromList (const uint32_t _id, std::vector< Segment > &_segments) |
|
const std::vector< tuw_graph::Segment > | splitPath (const std::vector< Eigen::Vector2d > &_path, const float _minimum_length) |
|
Definition at line 43 of file segment_expander.h.
tuw_graph::Segment_Expander::Segment_Expander |
( |
| ) |
|
void tuw_graph::Segment_Expander::addExpansionCandidate |
( |
const Index & |
current, |
|
|
const Index & |
next, |
|
|
float * |
potential |
|
) |
| |
|
private |
std::vector< std::vector< Eigen::Vector2d > > tuw_graph::Segment_Expander::calcEndpoints |
( |
float * |
_potential | ) |
|
looks for crossings and saves all segment endpoints of it
- Parameters
-
_potential | voronoi map potential |
- Returns
- a list of crossings which contains all endpoints of the crossing
Definition at line 323 of file segment_expander.cpp.
bool tuw_graph::Segment_Expander::checkSegmentPoint |
( |
const Index & |
_point | ) |
|
|
private |
template<class T , class S , class C >
void tuw_graph::Segment_Expander::clearpq |
( |
std::priority_queue< T, S, C > & |
q | ) |
|
|
inlineprivate |
std::vector< Eigen::Vector2d > tuw_graph::Segment_Expander::expandCrossing |
( |
const Index & |
i, |
|
|
float * |
_potential |
|
) |
| |
|
private |
Eigen::Vector2d tuw_graph::Segment_Expander::expandSegment |
( |
Segment_Expander::Index |
_start, |
|
|
float * |
_potential, |
|
|
const std::vector< std::vector< Eigen::Vector2d >> & |
_endpoints |
|
) |
| |
|
private |
std::vector< Segment > tuw_graph::Segment_Expander::getGraph |
( |
const std::vector< std::vector< Eigen::Vector2d >> & |
_endPoints, |
|
|
float * |
_potential, |
|
|
const float |
_min_length, |
|
|
float |
_optimizePixelsCrossing, |
|
|
const float |
_optimizePixelsEndSegments |
|
) |
| |
returns a list of segments, which represent the found search graph
- Parameters
-
_endPoints | a list of all found endpoints (list of crossings which contain a set of endpoints) |
_potential | potential used to expand the pats |
_min_length | the minimum length a segment has to have (max = _min_length * 2 - epsilon) |
_optimizePixelsCrossing | if crossings have less distance than _optimizePixelsCrossing to each other they are merged |
_optimizePixelsEndSegments | if a end segment has less length than this var it is removed |
- Returns
- a list of segments representing the graph
Definition at line 241 of file segment_expander.cpp.
float tuw_graph::Segment_Expander::getMinSegmentWidth |
( |
const std::vector< Eigen::Vector2d > & |
_path | ) |
|
|
private |
std::vector< Eigen::Vector2d > tuw_graph::Segment_Expander::getPath |
( |
const Index & |
start, |
|
|
float * |
_potential, |
|
|
const std::vector< std::vector< Eigen::Vector2d >> & |
_endpoints |
|
) |
| |
|
private |
void tuw_graph::Segment_Expander::Initialize |
( |
cv::Mat & |
_map, |
|
|
cv::Mat & |
_distField, |
|
|
cv::Mat & |
_voronoiPath |
|
) |
| |
initializes the expander by setting the voronoi path map and distancefield
- Parameters
-
_map | the map |
_distField | the distance_field generated from the map (e.g.: opencv distance_transform) |
_voronoiPath | the generated voronoi path out of the distance field (e.g.: ridge following; zhang suen thinning...) |
Definition at line 38 of file segment_expander.cpp.
bool tuw_graph::Segment_Expander::isEndpoint |
( |
Segment_Expander::Index & |
_current, |
|
|
const std::vector< std::vector< Eigen::Vector2d >> & |
_endpoints |
|
) |
| |
|
private |
uint32_t tuw_graph::Segment_Expander::nrOfNeighbours |
( |
uint32_t |
i | ) |
const |
|
private |
void tuw_graph::Segment_Expander::optimizeSegments |
( |
std::vector< Segment > & |
_segments, |
|
|
float |
_maxPixelsCrossing, |
|
|
float |
_maxPixelsEndSeg |
|
) |
| |
|
private |
void tuw_graph::Segment_Expander::optimizeSegmentsAroundPoint |
( |
std::vector< Segment > & |
_segments, |
|
|
const Eigen::Vector2d & |
pt, |
|
|
float |
maxPixels, |
|
|
int |
startIndex |
|
) |
| |
|
private |
void tuw_graph::Segment_Expander::removeEndpoint |
( |
const Index & |
_current, |
|
|
std::vector< std::vector< Eigen::Vector2d >> & |
_endpoints |
|
) |
| |
|
private |
void tuw_graph::Segment_Expander::removeSegmentFromList |
( |
const uint32_t |
_id, |
|
|
std::vector< Segment > & |
_segments |
|
) |
| |
|
private |
const std::vector< tuw_graph::Segment > tuw_graph::Segment_Expander::splitPath |
( |
const std::vector< Eigen::Vector2d > & |
_path, |
|
|
const float |
_minimum_length |
|
) |
| |
|
private |
std::unique_ptr<float[]> tuw_graph::Segment_Expander::distance_field_ |
|
private |
bool tuw_graph::Segment_Expander::findEdgeSegments_ = true |
|
private |
std::unique_ptr<int8_t[]> tuw_graph::Segment_Expander::global_map_ |
|
private |
int tuw_graph::Segment_Expander::ns_ |
|
private |
int tuw_graph::Segment_Expander::nx_ |
|
private |
int tuw_graph::Segment_Expander::ny_ |
|
private |
std::priority_queue<Index, std::vector<Index>, greater1> tuw_graph::Segment_Expander::queue_ |
|
private |
std::unique_ptr<int8_t[]> tuw_graph::Segment_Expander::voronoi_graph_ |
|
private |
The documentation for this class was generated from the following files: