OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::ARToolKitPlusModule Class Reference
[Core Classes]

The module and factory to drive the test source nodes. More...

#include <ARToolKitPlusModule.h>

Inheritance diagram for ot::ARToolKitPlusModule:

Inheritance graph
[legend]
Collaboration diagram for ot::ARToolKitPlusModule:

Collaboration graph
[legend]
List of all members.

Public Types

 MAX_MARKERID = 511
enum  { MAX_MARKERID = 511 }

Public Member Functions

 ARToolKitPlusModule ()
virtual ~ARToolKitPlusModule ()
virtual NodecreateNode (const std::string &name, StringTable &attributes)
virtual void pushEvent ()
void update ()
int getSizeX () const
int getSizeY () const
ARToolKitPlus::TrackerSingleMarker * getARToolKitPlus ()
const char * getARToolKitPlusDescription () const
void setCameraDeviceHint (const char *nDeviceName)
NodeVectorgetVisibleMarkers ()
void newVideoFrame (const unsigned char *image, int width, int height, PIXEL_FORMAT format)

Public Attributes

bool doBench

Protected Member Functions

void init (StringTable &attributes, ConfigNode *localTree)
void updateSingleMarkerSource (Node *source, float cf, float matrix[3][4])
void updateMultiMarkerSource (Node *source, float cf, float matrix[3][4])
void updateEvent (Event &event, float matrix[3][4])

Protected Attributes

MarkerIdMap sourcesMap
NodeVector sources
NodeVector visibleMarkers
float * bestCFs
int maxMarkerId
std::string cameradata
int sizeX
int sizeY
std::string patternDirectory
std::string cameraDeviceHint
bool useMarkerDetectLite
int stop
float trackerNear
float trackerFar
ARToolKitPlus::TrackerSingleMarker * tracker
ARToolKitPlus::Logger * logger

Detailed Description

The module and factory to drive the test source nodes.

It constructs TestSource nodes via the NodeFactory interface and pushes events into the tracker tree according to the nodes configuration.

Author:
Gerhard Reitmayr

Definition at line 110 of file ARToolKitPlusModule.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
MAX_MARKERID 

Definition at line 157 of file ARToolKitPlusModule.h.


Constructor & Destructor Documentation

ot::ARToolKitPlusModule::ARToolKitPlusModule (  ) 

ot::ARToolKitPlusModule::~ARToolKitPlusModule (  )  [virtual]

Destructor method, clears nodes member.

Definition at line 220 of file ARToolKitPlusModule.cxx.

References logger, sources, sourcesMap, and tracker.


Member Function Documentation

Node * ot::ARToolKitPlusModule::createNode ( const std::string &  name,
StringTable attributes 
) [virtual]

This method is called to ruct a new Node.

It compares name to the TestSource element name, and if it matches creates a new TestSource node.

Parameters:
name reference to string containing element name refenrence to StringMap containing attribute values
Returns:
pointer to new Node or NULL. The new Node must be allocated with new !

Implements ot::NodeFactory.

Definition at line 231 of file ARToolKitPlusModule.cxx.

References ot::Context::addDirectoryFirst(), bestCFs, ot::Module::context, ot::Context::findFile(), ot::StringTable::get(), LOG_ACE_ERROR(), LOG_ACE_INFO(), maxMarkerId, patternDirectory, ot::Context::removeDirectory(), sources, sourcesMap, tracker, and ot::Node::type.

ARToolKitPlus::TrackerSingleMarker* ot::ARToolKitPlusModule::getARToolKitPlus (  )  [inline]

Definition at line 192 of file ARToolKitPlusModule.h.

const char * ot::ARToolKitPlusModule::getARToolKitPlusDescription (  )  const

Definition at line 822 of file ARToolKitPlusModule.cxx.

References tracker.

int ot::ARToolKitPlusModule::getSizeX (  )  const [inline]

returns the width of the grabbed image in pixels

Definition at line 187 of file ARToolKitPlusModule.h.

int ot::ARToolKitPlusModule::getSizeY (  )  const [inline]

returns the height of the grabbed image in pixels

Definition at line 190 of file ARToolKitPlusModule.h.

NodeVector& ot::ARToolKitPlusModule::getVisibleMarkers (  )  [inline]

Definition at line 207 of file ARToolKitPlusModule.h.

void ot::ARToolKitPlusModule::init ( StringTable attributes,
ConfigNode localTree 
) [protected, virtual]

initializes the tracker module.

This class provides an implementation that sets the initialization flag to true. Subclasses should call this method, if they override it, before doing anything else. It takes the attributes of the element configuring this module and a local tree consisting of the children of the element. This tree must be build of Nodes.

Parameters:
attributes StringTable of elements attribute values. Should be possibly , but is not for convenience.
localTree pointer to root of configuration nodes tree

Reimplemented from ot::Module.

Definition at line 371 of file ARToolKitPlusModule.cxx.

References ot::Context::addDirectoryFirst(), cameradata, cameraDeviceHint, ot::Module::context, ot::ConfigNode::countChildren(), ot::Context::findFile(), ot::StringTable::get(), ot::ConfigNode::getChild(), ot::Module::initialized, LOG_ACE_ERROR(), LOG_ACE_INFO(), patternDirectory, ot::Context::removeDirectory(), tracker, trackerFar, trackerNear, and useMarkerDetectLite.

void ot::ARToolKitPlusModule::newVideoFrame ( const unsigned char *  image,
int  width,
int  height,
PIXEL_FORMAT  format 
) [virtual]

void ot::ARToolKitPlusModule::pushEvent (  )  [virtual]

pushes events into the tracker tree.

Checks all TestSources and pushes new events, if a TestSource fires.

Reimplemented from ot::Module.

Definition at line 734 of file ARToolKitPlusModule.cxx.

References sources.

void ot::ARToolKitPlusModule::setCameraDeviceHint ( const char *  nDeviceName  )  [inline]

This device name can be used to select between several available camera files.

This must be done before the ARToolKitPlus::init() is called. If no camera hint is set or the config file does not contain any <CameraHint> sections, the standard 'camera-parameter' value is used.

Definition at line 205 of file ARToolKitPlusModule.h.

void ot::ARToolKitPlusModule::update (  ) 

queries the camera and pushes data into the tree

void ot::ARToolKitPlusModule::updateMultiMarkerSource ( Node source,
float  cf,
float  matrix[3][4] 
) [protected]

Referenced by newVideoFrame().

void ot::ARToolKitPlusModule::updateSingleMarkerSource ( Node source,
float  cf,
float  matrix[3][4] 
) [protected]

Referenced by newVideoFrame().


Member Data Documentation

stores a list of the best marker confidences found in an image

Definition at line 124 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), createNode(), and newVideoFrame().

std::string ot::ARToolKitPlusModule::cameradata [protected]

file name of cameradata file

Definition at line 128 of file ARToolKitPlusModule.h.

Referenced by init().

an optional camera device name

Definition at line 137 of file ARToolKitPlusModule.h.

Referenced by init().

Definition at line 211 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule().

ARToolKitPlus::Logger* ot::ARToolKitPlusModule::logger [protected]

Definition at line 153 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), and ~ARToolKitPlusModule().

Definition at line 125 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), createNode(), and newVideoFrame().

an optional prefix for pattern filenames

Definition at line 134 of file ARToolKitPlusModule.h.

Referenced by createNode(), and init().

size of the image in pixels

Definition at line 131 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), and newVideoFrame().

Definition at line 131 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), and newVideoFrame().

list of TestSource nodes in the tree

Definition at line 118 of file ARToolKitPlusModule.h.

Referenced by createNode(), pushEvent(), and ~ARToolKitPlusModule().

map to find nodes that contain markers

Definition at line 115 of file ARToolKitPlusModule.h.

Referenced by createNode(), newVideoFrame(), and ~ARToolKitPlusModule().

flag to stop image processing thread

Definition at line 143 of file ARToolKitPlusModule.h.

ARToolKitPlus::TrackerSingleMarker* ot::ARToolKitPlusModule::tracker [protected]

Definition at line 151 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), and init().

Definition at line 151 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), and init().

if true ot will use arDetectMarkerLite instead of arDetectMarker

Definition at line 140 of file ARToolKitPlusModule.h.

Referenced by ARToolKitPlusModule(), init(), and newVideoFrame().

stores the list of all markers that were visible during the last update

Definition at line 121 of file ARToolKitPlusModule.h.

Referenced by newVideoFrame().


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

copyright (c) 2006 Graz University of Technology