A DistanceField implementation that uses a raster scanning type method by Felzenszwalb et. al. More...
#include <pf_distance_field.h>
Public Types | |
typedef std::vector< float > | FloatArray |
typedef std::vector< int > | IntArray |
Public Member Functions | |
virtual void | addPointsToField (const std::vector< tf::Vector3 > points) |
PFDistanceField (double size_x, double size_y, double size_z, double resolution, double origin_x, double origin_y, double origin_z) | |
virtual void | reset () |
Resets the distance field to the max_distance. | |
virtual | ~PFDistanceField () |
Public Attributes | |
const float | DT_INF |
Private Member Functions | |
void | computeDT () |
void | dt (const FloatArray &f, size_t nn, FloatArray &ft, IntArray &v, FloatArray &z) |
virtual double | getDistance (const float &object) const |
float | sqr (float x) |
A DistanceField implementation that uses a raster scanning type method by Felzenszwalb et. al.
Implementation of "Distance Transforms of Sampled Functions", Pedro F. Felzenszwalb and Daniel P. Huttenlocher, Cornell Computing and Information Science TR2004-1963
Definition at line 51 of file pf_distance_field.h.
typedef std::vector<float> distance_field::PFDistanceField::FloatArray |
Definition at line 60 of file pf_distance_field.h.
typedef std::vector<int> distance_field::PFDistanceField::IntArray |
Definition at line 61 of file pf_distance_field.h.
distance_field::PFDistanceField::PFDistanceField | ( | double | size_x, |
double | size_y, | ||
double | size_z, | ||
double | resolution, | ||
double | origin_x, | ||
double | origin_y, | ||
double | origin_z | ||
) |
Definition at line 43 of file pf_distance_field.cpp.
distance_field::PFDistanceField::~PFDistanceField | ( | ) | [virtual] |
Definition at line 51 of file pf_distance_field.cpp.
void distance_field::PFDistanceField::addPointsToField | ( | const std::vector< tf::Vector3 > | points | ) | [virtual] |
Definition at line 55 of file pf_distance_field.cpp.
void distance_field::PFDistanceField::computeDT | ( | ) | [private] |
Definition at line 69 of file pf_distance_field.cpp.
void distance_field::PFDistanceField::dt | ( | const FloatArray & | f, |
size_t | nn, | ||
FloatArray & | ft, | ||
IntArray & | v, | ||
FloatArray & | z | ||
) | [private] |
Definition at line 122 of file pf_distance_field.cpp.
double distance_field::PFDistanceField::getDistance | ( | const float & | object | ) | const [inline, private, virtual] |
Implements distance_field::DistanceField< float >.
Definition at line 78 of file pf_distance_field.h.
void distance_field::PFDistanceField::reset | ( | ) | [virtual] |
Resets the distance field to the max_distance.
Implements distance_field::DistanceField< float >.
Definition at line 163 of file pf_distance_field.cpp.
float distance_field::PFDistanceField::sqr | ( | float | x | ) | [inline, private] |
Definition at line 69 of file pf_distance_field.h.
const float distance_field::PFDistanceField::DT_INF |
Definition at line 66 of file pf_distance_field.h.