Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

AprilTags::Edge Class Reference

Represents an edge between adjacent pixels in the image. More...

#include <Edge.h>


Detailed Description

Represents an edge between adjacent pixels in the image.

The edge is encoded by the indices of the two pixels. Edge cost is proportional to the difference in local orientations.

Definition at line 20 of file Edge.h.

List of all members.

Public Member Functions

 Edge ()
 Constructor.
bool operator< (const Edge &other) const
 Compare edges based on cost.

Static Public Member Functions

static short int edgeCost (float theta0, float theta1, float mag1)
 Cost of an edge between two adjacent pixels; -1 if no edge here.
static void calcEdges (float theta0, int x, int y, const FloatImage &theta, const FloatImage &mag, std::vector< Edge > &edges, size_t &nEdges)
 Calculates and inserts up to four edges into 'edges', a vector of Edges.
static void mergeEdges (std::vector< Edge > &edges, UnionFindSimple &uf, float tmin[], float tmax[], float mmin[], float mmax[])
 Process edges in order of increasing cost, merging clusters if we can do so without exceeding the thetaThresh.

Public Attributes

int pixelIdxA
int pixelIdxB
short int cost

Static Public Attributes

static float const minMag = 0.004f
 minimum intensity gradient for an edge to be recognized
static float const maxEdgeCost = 30.f * float(M_PI) / 180.f
 30 degrees = maximum acceptable difference in local orientations
static int const WEIGHT_SCALE = 100
static float const thetaThresh = 100
 theta threshold for merging edges
static float const magThresh = 1200
 magnitude threshold for merging edges

Constructor & Destructor Documentation

AprilTags::Edge::Edge (  ) 

Constructor.

Definition at line 33 of file Edge.h.


Member Function Documentation

void AprilTags::Edge::calcEdges ( float  theta0,
int  x,
int  y,
const FloatImage theta,
const FloatImage mag,
std::vector< Edge > &  edges,
size_t &  nEdges 
) [static]

Calculates and inserts up to four edges into 'edges', a vector of Edges.

Definition at line 26 of file Edge.cc.

Referenced by AprilTags::TagDetector::extractTags().

short int AprilTags::Edge::edgeCost ( float  theta0,
float  theta1,
float  mag1 
) [static]

Cost of an edge between two adjacent pixels; -1 if no edge here.

An edge exists between adjacent pixels if the magnitude of the intensity gradient at both pixels is above threshold. The edge cost is proportional to the difference in the local orientation at the two pixels. Lower cost is better. A cost of -1 means there is no edge here (intensity gradien fell below threshold).

Definition at line 14 of file Edge.cc.

Referenced by calcEdges().

void AprilTags::Edge::mergeEdges ( std::vector< Edge > &  edges,
UnionFindSimple uf,
float  tmin[],
float  tmax[],
float  mmin[],
float  mmax[] 
) [static]

Process edges in order of increasing cost, merging clusters if we can do so without exceeding the thetaThresh.

Definition at line 69 of file Edge.cc.

Referenced by AprilTags::TagDetector::extractTags().

bool AprilTags::Edge::operator< ( const Edge other  )  const

Compare edges based on cost.

Definition at line 36 of file Edge.h.


Member Data Documentation

Definition at line 30 of file Edge.h.

Referenced by operator<().

float const AprilTags::Edge::magThresh = 1200 [static]

magnitude threshold for merging edges

Definition at line 26 of file Edge.h.

Referenced by mergeEdges().

float const AprilTags::Edge::maxEdgeCost = 30.f * float(M_PI) / 180.f [static]

30 degrees = maximum acceptable difference in local orientations

Definition at line 23 of file Edge.h.

Referenced by edgeCost().

float const AprilTags::Edge::minMag = 0.004f [static]

minimum intensity gradient for an edge to be recognized

Definition at line 22 of file Edge.h.

Referenced by edgeCost(), and AprilTags::TagDetector::extractTags().

Definition at line 28 of file Edge.h.

Definition at line 29 of file Edge.h.

float const AprilTags::Edge::thetaThresh = 100 [static]

theta threshold for merging edges

Definition at line 25 of file Edge.h.

Referenced by mergeEdges().

int const AprilTags::Edge::WEIGHT_SCALE = 100 [static]

Definition at line 24 of file Edge.h.

Referenced by edgeCost().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:19 2016 by Doxygen 1.6.3