Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

AprilTags::Quad Class Reference

Represents four segments that form a loop, and might be a tag. More...

#include <Quad.h>


Detailed Description

Represents four segments that form a loop, and might be a tag.

Definition at line 22 of file Quad.h.

List of all members.

Public Member Functions

 Quad (const std::vector< std::pair< float, float > > &p, const std::pair< float, float > &opticalCenter)
 Constructor.
std::pair< float, floatinterpolate (float x, float y)
 Interpolate given that the lower left corner of the lower left cell is at (-1,-1) and the upper right corner of the upper right cell is at (1,1).
std::pair< float, floatinterpolate01 (float x, float y)
 Same as interpolate, except that the coordinates are interpreted between 0 and 1, instead of -1 and 1.

Static Public Member Functions

static void search (const FloatImage &fImage, std::vector< Segment * > &path, Segment &parent, int depth, std::vector< Quad > &quads)
 Searches through a vector of Segments to form Quads.

Public Attributes

std::vector< std::pair< float,
float > > 
quadPoints
 Points for the quad (in pixel coordinates), in counter clockwise order. These points are the intersections of segments.
std::vector< Segment * > segments
 Segments composing this quad.
float observedPerimeter
 Total length (in pixels) of the actual perimeter observed for the quad.
Homography33 homography
 Given that the whole quad spans from (0,0) to (1,1) in "quad space", compute the pixel coordinates for a given point within that quad.

Static Public Attributes

static const int minimumEdgeLength = 6
 Minimum size of a tag (in pixels) as measured along edges and diagonals.
static float const maxQuadAspectRatio = 32
 Early pruning of quads with insane ratios.

Private Attributes

fmat::Column< 2, floatp0
fmat::Column< 2, floatp3
fmat::Column< 2, floatp01
fmat::Column< 2, floatp32

Constructor & Destructor Documentation

AprilTags::Quad::Quad ( const std::vector< std::pair< float, float > > &  p,
const std::pair< float, float > &  opticalCenter 
)

Constructor.

(x,y) are the optical center of the camera, which is needed to correctly compute the homography.

Definition at line 11 of file Quad.cc.


Member Function Documentation

std::pair< float, float > AprilTags::Quad::interpolate ( float  x,
float  y 
)

Interpolate given that the lower left corner of the lower left cell is at (-1,-1) and the upper right corner of the upper right cell is at (1,1).

Definition at line 36 of file Quad.cc.

Referenced by interpolate01().

std::pair<float,float> AprilTags::Quad::interpolate01 ( float  x,
float  y 
)

Same as interpolate, except that the coordinates are interpreted between 0 and 1, instead of -1 and 1.

Definition at line 36 of file Quad.h.

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

void AprilTags::Quad::search ( const FloatImage fImage,
std::vector< Segment * > &  path,
Segment parent,
int  depth,
std::vector< Quad > &  quads 
) [static]

Searches through a vector of Segments to form Quads.

Definition at line 48 of file Quad.cc.

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


Member Data Documentation

Given that the whole quad spans from (0,0) to (1,1) in "quad space", compute the pixel coordinates for a given point within that quad.

Note that for most of the Quad's existence, we will not know the correct orientation of the tag.

Definition at line 53 of file Quad.h.

Referenced by AprilTags::TagDetector::extractTags(), interpolate(), and Quad().

Early pruning of quads with insane ratios.

Definition at line 25 of file Quad.h.

Referenced by search().

const int AprilTags::Quad::minimumEdgeLength = 6 [static]

Minimum size of a tag (in pixels) as measured along edges and diagonals.

Definition at line 24 of file Quad.h.

Referenced by search().

Total length (in pixels) of the actual perimeter observed for the quad.

This is in contrast to the geometric perimeter, some of which may not have been directly observed but rather inferred by intersecting segments. Quads with more observed perimeter are preferred over others.

Definition at line 49 of file Quad.h.

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

Definition at line 66 of file Quad.h.

Referenced by interpolate(), and Quad().

Definition at line 66 of file Quad.h.

Referenced by interpolate(), and Quad().

Definition at line 66 of file Quad.h.

Referenced by interpolate(), and Quad().

Definition at line 66 of file Quad.h.

Referenced by interpolate(), and Quad().

std::vector< std::pair<float,float> > AprilTags::Quad::quadPoints

Points for the quad (in pixel coordinates), in counter clockwise order. These points are the intersections of segments.

Definition at line 39 of file Quad.h.

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

Segments composing this quad.

Definition at line 42 of file Quad.h.


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