CSED Class Reference

Ragnemalm's CSED distance transform algorithm. More...

#include <CSED.h>

Inheritance diagram for CSED:

DistanceTransform List of all members.

Public Member Functions

virtual bool getP (const int x, const int y, int &px, int &py) const

Public Attributes

 __pad0__: DistanceTransform(xSize
 ySize
 integer size (height) in pixels

Protected Attributes

P * v

Private Member Functions

void test (const int px, const int py, const int ox, const int oy, vector< P * > *list2, const int i)

Static Private Member Functions

static double D (const int x, const int y)
 returns the length of a vector
static double D (P &p)
 returns the length of a vector
static int sgn (int i)
 return the sign of i

Detailed Description

Ragnemalm's CSED distance transform algorithm.

As described in I. Ragnemalm, "Neighborhoods for distance transformations using ordered propagation," CVGIP:IU 56(3):399-409, 1992.

To produce code for the original algorithm, define the symbol ORIGINAL in the CSED .h or .cpp file and recompile. In some cases this code exhibits errors (in the form of unassigned distance transform values for some points). To produce an improved version, do not define this symbol.


Member Function Documentation

virtual bool CSED::getP const int  x,
const int  y,
int &  px,
int &  py
const [virtual]
 

Parameters:
x is the x location
y is the y location
px is the parent's x location to be returned
py is the parent's y location to be returned
Returns:
true if the parent is know; otherwise false.

Reimplemented from DistanceTransform.

void CSED::test const int  x,
const int  y,
const int  ox,
const int  oy,
vector< P * > *  list2,
const int  i
[private]
 

Parameters:
(x,y) is a pixel position, p
(ox,oy) is the displacement from (x,y) to a neighbor, o
list2 is a list
i is the subscript associated with (x,y)
  subroutine test ( o ):
      if D(v(p+o)) > D(v(p)+o)
          v(p+o) = v(p) + o
          p+o is put in list2  //in both


The documentation for this class was generated from the following files:
Generated on Thu Jan 12 10:28:49 2006 by  doxygen 1.4.5