ProjectedTextures
Prototype software for spacial augmented reality applications.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FiducialTracker Class Reference

#include <FiducialTracker.h>

Inheritance diagram for FiducialTracker:
Tracker

Public Slots

void notifyNewFrame ()
 
void lockOrigin (int state)
 
void enableKalman (int enable)
 

Signals

void newNumDetectedMarkers (int num)
 
- Signals inherited from Tracker
void newOrigin (QMatrix4x4 origin)
 
void newFps (int fps)
 

Public Member Functions

 FiducialTracker (Camera *cam, ARToolKitConfig artkc, FilterConfig filterConfig, QString originMarkerSet, bool objectTracker)
 
 ~FiducialTracker (void)
 
void setCamera (Camera *cam)
 
void addMarkerToSet (QString setName, int markerId, QMatrix4x4 offset)
 
void addSubscription (int trackableId, QString markerSetName)
 
bool isObjectTracker ()
 
Similarity getOrigin ()
 
CameragetCamera ()
 
bool isTracked (int trackableId)
 
Similarity getPose (int trackableId)
 
QString getMarkerSetName (int trackableId)
 
- Public Member Functions inherited from Tracker
 Tracker (FilterConfig filterConfig, int maxUpdateRate=60)
 
virtual ~Tracker (void)
 
void stop ()
 
void stopAndDelete ()
 

Protected Member Functions

void update ()
 
- Protected Member Functions inherited from Tracker
void run ()
 
void updateFPS (int timeElapsed)
 
void initKalmanFilter (cv::KalmanFilter &KF)
 
void fillMeasurements (cv::Mat &measurements, Similarity pose)
 
void updateKalmanFilter (cv::KalmanFilter &KF, cv::Mat &measurement, Similarity &pose)
 

Protected Attributes

TrackerSingleMarker * tracker
 
Cameracam
 
volatile bool newFrame
 
QMap< int, Markermarkers
 
QMap< QString, MarkerSetmarkerSets
 
QMap< int, QString > subscriptions
 
const QString originMarkerSet
 
bool originLocked
 
bool objectTracker
 
- Protected Attributes inherited from Tracker
int maxUpdateRate
 
QTime t
 
int executionTime
 
QQueue< int > fpsQueue
 
int avgFPS
 
QMutex stopMutex
 
volatile bool doStop
 
FilterConfig filterConfig
 
int nStates
 
int nMeasurements
 
int nInputs
 
Mat measurements
 

Additional Inherited Members

- Static Protected Attributes inherited from Tracker
static const int fpsQueueLength = 32
 

Detailed Description

based on the ARToolKitPlus, this tracker estimates the poses of sets of 2-dimensional markers detected in camera frames.

Constructor & Destructor Documentation

FiducialTracker::FiducialTracker ( Camera cam,
ARToolKitConfig  artkc,
FilterConfig  filterConfig,
QString  originMarkerSet,
bool  objectTracker 
)
Parameters
camthe camera from which we get the frames
artkcglobal parameters for the ARToolKitPlus, see ARToolKitConfig
filterConfigsettings for filtering, see FilterConfig
originMarkerSetthe name of the marker set that defines the global origin (for calibration)
objectTrackeris this tracker used for tracking objects or merely for calibration?
FiducialTracker::~FiducialTracker ( void  )

Member Function Documentation

void FiducialTracker::addMarkerToSet ( QString  setName,
int  markerId,
QMatrix4x4  offset 
)

add a marker to a set

Parameters
setNameset to which it should be added
markerIdid of the added marker
offsettransformation beween marker and set origin
void FiducialTracker::addSubscription ( int  trackableId,
QString  markerSetName 
)

specify which marker set is attached to which trackable object

void FiducialTracker::enableKalman ( int  enable)
slot

use the kalman filter or my own

Camera* FiducialTracker::getCamera ( )
inline

get the used camera

QString FiducialTracker::getMarkerSetName ( int  trackableId)

returns the name of the marker set belonging to the given trackable object

Similarity FiducialTracker::getOrigin ( )
inlinevirtual

returns the pose of the global origin

Implements Tracker.

Similarity FiducialTracker::getPose ( int  trackableId)
virtual

returns the pose of the marker set of the given trackable object

Implements Tracker.

bool FiducialTracker::isObjectTracker ( )
inline

does this tracker actually track objects?

bool FiducialTracker::isTracked ( int  trackableId)
virtual

is the object with the given id currently tracked?

Implements Tracker.

void FiducialTracker::lockOrigin ( int  state)
slot

sets originLocked to true or false

void FiducialTracker::newNumDetectedMarkers ( int  num)
signal

number of detected markers in current frame. for GUI.

void FiducialTracker::notifyNewFrame ( )
slot

called by camera if it has a new frame

void FiducialTracker::setCamera ( Camera cam)

sets the used camera and connects the notification signals

void FiducialTracker::update ( )
protectedvirtual
 called in every execution of the thread's main loop.

detects markers of a frame and estimates new marker set poses.

*for (int i = 0; i < 16; i++){

Implements Tracker.

Member Data Documentation

Camera* FiducialTracker::cam
protected

the camera in use

QMap<int, Marker> FiducialTracker::markers
protected

set of all markers in use. key=markerId

QMap<QString, MarkerSet> FiducialTracker::markerSets
protected

set of all markers sets in use. key=marker set name

volatile bool FiducialTracker::newFrame
protected
 is set to true by the public slot notifyNewFrame() 

when the camera has one

bool FiducialTracker::objectTracker
protected

is this tracker used for actual tracking or just for calibration?

bool FiducialTracker::originLocked
protected
 the pose of the origin can be locked once it is detected.

when locked it is not updated anymore

const QString FiducialTracker::originMarkerSet
protected
 the name of the marker set representing the global origin. 

used for calibration

QMap<int, QString> FiducialTracker::subscriptions
protected

assignments between marker sets and trackable objects. key=trackableId, value=name of a marker set

TrackerSingleMarker* FiducialTracker::tracker
protected

an ARToolKitPlus clas that racks individual markers


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