OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::ARToolKitModule Class Reference

#include <ARToolKitModule.h>

Inheritance diagram for ot::ARToolKitModule:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ARToolKitModule ()
virtual ~ARToolKitModule ()
virtual NodecreateNode (const std::string &name, StringTable &attributes)
virtual void start ()
virtual void close ()
virtual void pushEvent ()
virtual void init (StringTable &attributes, ConfigNode *localTree)
bool isStereo ()
int getSizeX (int stereo_buffer=STEREO_L)
int getSizeY (int stereo_buffer=STEREO_L)
void getFlipping (bool *isFlippedH, bool *isFlippedV, int stereo_buffer=STEREO_L)
unsigned char * lockFrame (MemoryBufferHandle *pHandle, int stereo_buffer=STEREO_L)
void unlockFrame (MemoryBufferHandle Handle, int stereo_buffer=STEREO_L)
int getImageFormat (int stereo_buffer=STEREO_L)

Protected Member Functions

virtual void run ()
void grab ()

Protected Attributes

NodeVector sources
int did
int treshhold
int stop
std::string cameradata
double rate
std::string videomode
std::string videomode2
bool stereo
unsigned char * frame
int sizeX
int sizeY
std::string patternDirectory

Detailed Description

Definition at line 248 of file ARToolKitModule.h.


Constructor & Destructor Documentation

ot::ARToolKitModule::ARToolKitModule (  ) 

constructor method

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

destructor method


Member Function Documentation

virtual void ot::ARToolKitModule::close (  )  [virtual]

closes the artoolkit library

Reimplemented from ot::ThreadModule.

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

This method is called to construct a new Node.

It compares name to the ARToolKitSource element name, and if it matches creates a new ARToolKitSource 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.

void ot::ARToolKitModule::getFlipping ( bool *  isFlippedH,
bool *  isFlippedV,
int  stereo_buffer = STEREO_L 
)

returns whether the grabbed image is flipped horizontally or vertically

int ot::ARToolKitModule::getImageFormat ( int  stereo_buffer = STEREO_L  ) 

returns the OpenGL flag that is used by ARToolkit to describe the pixel format in the frame buffer.

This is a simple way to pass the necessary information to use the image data in GL calls.

int ot::ARToolKitModule::getSizeX ( int  stereo_buffer = STEREO_L  ) 

returns the width of the grabbed image in pixels

int ot::ARToolKitModule::getSizeY ( int  stereo_buffer = STEREO_L  ) 

returns the height of the grabbed image in pixels

void ot::ARToolKitModule::grab (  )  [protected]

grabs a frame and processes the data

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

initializes the ARToolKit module.

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

Reimplemented from ot::Module.

bool ot::ARToolKitModule::isStereo (  ) 

returns whether two cameras are configured

unsigned char* ot::ARToolKitModule::lockFrame ( MemoryBufferHandle pHandle,
int  stereo_buffer = STEREO_L 
)

returns a pointer to the grabbed image.

The image format is depending on the pixel format and typically RGB or RGBA times X times Y bytes.

Returns:
pointer to image buffer

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

pushes events into the tracker tree.

Checks all source nodes for new events and pushes them into the tracker tree.

Reimplemented from ot::Module.

virtual void ot::ARToolKitModule::run (  )  [protected, virtual]

the work method for the module thread.

This method grabs a frame and computes any marker information from it. Then it updates the source nodes accordingly. If the stop flag is set, it finishes.

Reimplemented from ot::ThreadModule.

virtual void ot::ARToolKitModule::start (  )  [virtual]

This method is called after initialisation is finished and before the main loop is started.

It opens the artoolkit library and video system.

Reimplemented from ot::ThreadModule.

void ot::ARToolKitModule::unlockFrame ( MemoryBufferHandle  Handle,
int  stereo_buffer = STEREO_L 
)

releases the pointer to the grabbed image.

frame pointer


Member Data Documentation

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

file name of cameradata file

Definition at line 260 of file ARToolKitModule.h.

int ot::ARToolKitModule::did [protected]

Definition at line 254 of file ARToolKitModule.h.

unsigned char* ot::ARToolKitModule::frame [protected]

pointer to the buffer map

Definition at line 271 of file ARToolKitModule.h.

std::string ot::ARToolKitModule::patternDirectory [protected]

an optional prefix for pattern filenames

Definition at line 275 of file ARToolKitModule.h.

double ot::ARToolKitModule::rate [protected]

desired maximal framerate

Definition at line 262 of file ARToolKitModule.h.

int ot::ARToolKitModule::sizeX [protected]

size of the image in pixels

Definition at line 273 of file ARToolKitModule.h.

int ot::ARToolKitModule::sizeY [protected]

Definition at line 273 of file ARToolKitModule.h.

stores the sources

Definition at line 253 of file ARToolKitModule.h.

bool ot::ARToolKitModule::stereo [protected]

flag to denote if two cameras are configured

Definition at line 268 of file ARToolKitModule.h.

int ot::ARToolKitModule::stop [protected]

flag to stop image processing thread

Definition at line 258 of file ARToolKitModule.h.

treshhold value to use in image processing

Definition at line 256 of file ARToolKitModule.h.

std::string ot::ARToolKitModule::videomode [protected]

videomode string

Definition at line 264 of file ARToolKitModule.h.

std::string ot::ARToolKitModule::videomode2 [protected]

videomode string for second camera

Definition at line 266 of file ARToolKitModule.h.


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

copyright (c) 2006 Graz University of Technology