Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MarkerData Class Reference

Marker shapes, described by a single point in space. More...

#include <MarkerData.h>

Inheritance diagram for MarkerData:

Detailed Description

Marker shapes, described by a single point in space.

Definition at line 29 of file MarkerData.h.

List of all members.

Public Member Functions

 MarkerData (ShapeSpace &_space, const Point &center, const rgb rgbvalue=rgb())
 Constructor.
MarkerType_t getMarkerType () const
 DATASTUFF_H (MarkerData)
virtual Point getCentroid () const
 return the centroid of the shape in point format
virtual void printParams () const
 Print information about this shape.
virtual void applyTransform (const fmat::Transform &Tmat, const ReferenceFrameType_t newref=unspecified)
 Transformations. (Virtual in BaseData.).
virtual void projectToGround (const fmat::Transform &camToBase, const PlaneEquation &groundplane)
 Project to ground.
virtual void update_derived_properties ()
 Update derived properties.
virtual bool isMatchFor (const ShapeRoot &other) const
 Match blobs based on their parameters. (Virtual in BaseData.).
virtual bool updateParams (const ShapeRoot &other, bool forceUpdate=false)
 Update parameters given matching shape (for merging in mapping).
virtual bool isMatchingMarker (const Shape< MarkerData > &other) const
 Test for marker with matching features.
virtual bool localizeByCamera () const
virtual unsigned short getDimension () const
virtual std::string getMarkerDescription () const
 Return the string description for this marker (used to display marker specific information).

Static Public Member Functions

static ShapeType_t getStaticType ()
static std::string getMarkerTypeName (MarkerType_t type)
 Get the name for a given marker type.
static MarkerType_t registerMarkerType (std::string markerTypeName, MarkerExtractFn_t extractor)
static std::vector< Shape
< MarkerData > > 
extractMarkers (const Sketch< uchar > &sketch, MarkerType_t type, const MapBuilderRequest &req)
 Extract markers of type from sketch.
static std::vector< Shape
< MarkerData > > 
extractMarkers (const Sketch< uchar > &sketch, const MapBuilderRequest &req)
 Extract markers of all registered types from sketch.
static void calculateCameraDistance (Point &p, const float height)
 Set the z-coordinate (distance from the camera) for a pixel, assuming we know the object's height above the ground plane.
static const std::set
< MarkerType_t
allMarkerTypes ()
 Return set of all known marker types; used for general-purpose localization code.

Public Attributes

Point center
 center (centroid) of marker in coordinate frame. In image frame this is abused to store (pixel_x,pixel_y,distance).
MarkerType_t typeOfMarker
 The type of marker this is.

Static Public Attributes

static const MarkerType_t unknownMarkerType = "unknownMarkerType"

Private Member Functions

virtual Sketch< bool > * render () const
 Render into a sketch space and return reference. (Private.).
MarkerDataoperator= (const MarkerData &)
 don't call

Static Private Member Functions

static std::map< MarkerType_t,
MarkerExtractFn_t > & 
getExtractorMap ()
 Map for marker extraction dispatch.

Friends

class Shape< MarkerData >

Constructor & Destructor Documentation

MarkerData ( ShapeSpace _space,
const Point center,
const rgb  rgbvalue = rgb() 
)

Constructor.

Definition at line 31 of file MarkerData.cc.


Member Function Documentation

const std::set< MarkerType_t > allMarkerTypes (  )  [static]

Return set of all known marker types; used for general-purpose localization code.

Definition at line 228 of file MarkerData.cc.

void applyTransform ( const fmat::Transform Tmat,
const ReferenceFrameType_t  newref = unspecified 
) [virtual]

Transformations. (Virtual in BaseData.).

Implements BaseData.

Definition at line 80 of file MarkerData.cc.

void calculateCameraDistance ( Point p,
const float  height 
) [static]

Set the z-coordinate (distance from the camera) for a pixel, assuming we know the object's height above the ground plane.

Definition at line 178 of file MarkerData.cc.

Referenced by BiColorMarkerData::extractMarkers(), and AprilTagData::projectToGround().

DATASTUFF_H ( MarkerData   ) 
vector< Shape< MarkerData > > extractMarkers ( const Sketch< uchar > &  sketch,
const MapBuilderRequest req 
) [static]

Extract markers of all registered types from sketch.

Reimplemented in BiColorMarkerData.

Definition at line 168 of file MarkerData.cc.

vector< Shape< MarkerData > > extractMarkers ( const Sketch< uchar > &  sketch,
MarkerType_t  type,
const MapBuilderRequest req 
) [static]

Extract markers of type from sketch.

Definition at line 156 of file MarkerData.cc.

Point getCentroid (  )  const [virtual]

return the centroid of the shape in point format

Implements BaseData.

Definition at line 39 of file MarkerData.cc.

Referenced by BiColorMarkerData::getMarkerDescription().

virtual unsigned short getDimension (  )  const [virtual]

Implements BaseData.

Definition at line 80 of file MarkerData.h.

std::map< MarkerType_t, MarkerExtractFn_t > & getExtractorMap (  )  [static, private]

Map for marker extraction dispatch.

Definition at line 223 of file MarkerData.cc.

Referenced by MarkerData::allMarkerTypes(), MarkerData::extractMarkers(), and MarkerData::registerMarkerType().

string getMarkerDescription (  )  const [virtual]

Return the string description for this marker (used to display marker specific information).

Reimplemented in BiColorMarkerData.

Definition at line 152 of file MarkerData.cc.

MarkerType_t getMarkerType (  )  const

Definition at line 44 of file MarkerData.h.

string getMarkerTypeName ( MarkerType_t  type  )  [static]

Get the name for a given marker type.

Definition at line 154 of file MarkerData.cc.

Referenced by ShapeSpace::getShapeListForGUI().

static ShapeType_t getStaticType (  )  [static]

Definition at line 42 of file MarkerData.h.

bool isMatchFor ( const ShapeRoot other  )  const [virtual]

Match blobs based on their parameters. (Virtual in BaseData.).

Implements BaseData.

Definition at line 108 of file MarkerData.cc.

bool isMatchingMarker ( const Shape< MarkerData > &  other  )  const [virtual]

Test for marker with matching features.

Unlike isMatchFor, does not consider positions, should just compare things like colors or other marker-specific features.

Reimplemented in BiColorMarkerData.

Definition at line 140 of file MarkerData.cc.

Referenced by MarkerData::isMatchFor().

virtual bool localizeByCamera (  )  const [virtual]

Reimplemented from BaseData.

Definition at line 78 of file MarkerData.h.

MarkerData& operator= ( const MarkerData  )  [private]

don't call

void printParams (  )  const [virtual]

Print information about this shape.

Implements BaseData.

Reimplemented in BiColorMarkerData.

Definition at line 43 of file MarkerData.cc.

void projectToGround ( const fmat::Transform camToBase,
const PlaneEquation groundplane 
) [virtual]

Project to ground.

Implements BaseData.

Definition at line 84 of file MarkerData.cc.

MarkerType_t registerMarkerType ( std::string  markerTypeName,
MarkerExtractFn_t  extractor 
) [static]

Definition at line 215 of file MarkerData.cc.

Sketch< bool > * render (  )  const [private, virtual]

Render into a sketch space and return reference. (Private.).

Implements BaseData.

Definition at line 50 of file MarkerData.cc.

void update_derived_properties (  )  [virtual]

Update derived properties.

Definition at line 106 of file MarkerData.cc.

Referenced by MarkerData::updateParams().

bool updateParams ( const ShapeRoot other,
bool  forceUpdate = false 
) [virtual]

Update parameters given matching shape (for merging in mapping).

Implements BaseData.

Definition at line 122 of file MarkerData.cc.


Friends And Related Function Documentation

friend class Shape< MarkerData > [friend]

Definition at line 48 of file MarkerData.h.


Member Data Documentation

center (centroid) of marker in coordinate frame. In image frame this is abused to store (pixel_x,pixel_y,distance).

Definition at line 32 of file MarkerData.h.

Referenced by MarkerData::applyTransform(), BiColorMarkerData::extractMarkers(), MarkerData::getCentroid(), MarkerData::isMatchFor(), MarkerData::printParams(), BiColorMarkerData::printParams(), MarkerData::projectToGround(), MarkerData::render(), and MarkerData::updateParams().

const MarkerType_t unknownMarkerType = "unknownMarkerType" [static]

Definition at line 36 of file MarkerData.h.


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

DualCoding 5.1CVS
Generated Mon May 9 04:56:31 2016 by Doxygen 1.6.3