|
Public Member Functions |
| | DistanceTransform (const int xSize, const int ySize, const bool unload=true) |
| | construct a distance transform object for an image of size (xSize,ySize).
|
|
virtual void | doTransform (const unsigned char *const I)=0 |
| | calculate the distance transform
|
|
double | getD (const int x, const int y) const |
| | return the distance value assigned to a particular position
|
| virtual bool | getP (const int x, const int y, int &px, int &py) const |
| | return the "parent" (border point) associated with this point
|
Static Public Attributes |
| static const int | IntInfinity = INT_MAX / 2 |
| static const double | FloatInfinity = FLT_MAX / 2.0 |
Protected Member Functions |
| int | sub (const int x, const int y) const |
|
template<class T> |
| void | initImmediate (const unsigned char *const I, T *d, const T halfDx=0, const T halfDy=0) |
| | init elements of the immediate interior (i.e., border points).
|
|
template<class T> |
| void | check (T *d, const int center, const int X, const int Y, const T Delta) |
|
virtual void | borderCheck (const unsigned char *const I) |
|
void | cleanUp () |
| void | finish (const unsigned char *const I, double *d) |
| void | finish (const unsigned char *const I, int *d, const int dx, const int dy) |
Protected Attributes |
|
int | xSize |
| | integer size (width) in pixels
|
|
int | ySize |
| | integer size (height) in pixels
|
|
double * | dD |
| | result of distance transform (as doubles)
|
|
int * | iD |
| | the calculated distance transform (as ints)
|
Private Attributes |
|
int * | rowOffsets |
| | used to speed up 2d array indexing
|
|
bool | unloadFlag |
| | convert ints to doubles (if necessary)
|
Classes |
| class | P |
| | DistanceTransform::P class. Simply a 2D point. More...
|