ProjectedTextures
Prototype software for spacial augmented reality applications.
|
#include <FiducialTracker.h>
Public Slots | |
void | notifyNewFrame () |
void | lockOrigin (int state) |
void | enableKalman (int enable) |
Signals | |
void | newNumDetectedMarkers (int num) |
![]() | |
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 () |
Camera * | getCamera () |
bool | isTracked (int trackableId) |
Similarity | getPose (int trackableId) |
QString | getMarkerSetName (int trackableId) |
![]() | |
Tracker (FilterConfig filterConfig, int maxUpdateRate=60) | |
virtual | ~Tracker (void) |
void | stop () |
void | stopAndDelete () |
Protected Member Functions | |
void | update () |
![]() | |
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 |
Camera * | cam |
volatile bool | newFrame |
QMap< int, Marker > | markers |
QMap< QString, MarkerSet > | markerSets |
QMap< int, QString > | subscriptions |
const QString | originMarkerSet |
bool | originLocked |
bool | objectTracker |
![]() | |
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 const int | fpsQueueLength = 32 |
based on the ARToolKitPlus, this tracker estimates the poses of sets of 2-dimensional markers detected in camera frames.
FiducialTracker::FiducialTracker | ( | Camera * | cam, |
ARToolKitConfig | artkc, | ||
FilterConfig | filterConfig, | ||
QString | originMarkerSet, | ||
bool | objectTracker | ||
) |
cam | the camera from which we get the frames |
artkc | global parameters for the ARToolKitPlus, see ARToolKitConfig |
filterConfig | settings for filtering, see FilterConfig |
originMarkerSet | the name of the marker set that defines the global origin (for calibration) |
objectTracker | is this tracker used for tracking objects or merely for calibration? |
FiducialTracker::~FiducialTracker | ( | void | ) |
void FiducialTracker::addMarkerToSet | ( | QString | setName, |
int | markerId, | ||
QMatrix4x4 | offset | ||
) |
add a marker to a set
setName | set to which it should be added |
markerId | id of the added marker |
offset | transformation beween marker and set origin |
void FiducialTracker::addSubscription | ( | int | trackableId, |
QString | markerSetName | ||
) |
specify which marker set is attached to which trackable object
|
slot |
use the kalman filter or my own
|
inline |
get the used camera
QString FiducialTracker::getMarkerSetName | ( | int | trackableId) |
returns the name of the marker set belonging to the given trackable object
|
inlinevirtual |
returns the pose of the global origin
Implements Tracker.
|
virtual |
returns the pose of the marker set of the given trackable object
Implements Tracker.
|
inline |
does this tracker actually track objects?
|
virtual |
is the object with the given id currently tracked?
Implements Tracker.
|
slot |
sets originLocked to true or false
|
signal |
number of detected markers in current frame. for GUI.
|
slot |
called by camera if it has a new frame
void FiducialTracker::setCamera | ( | Camera * | cam) |
sets the used camera and connects the notification signals
|
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.
|
protected |
the camera in use
|
protected |
set of all markers in use. key=markerId
|
protected |
set of all markers sets in use. key=marker set name
|
protected |
is set to true by the public slot notifyNewFrame()
when the camera has one
|
protected |
is this tracker used for actual tracking or just for calibration?
|
protected |
the pose of the origin can be locked once it is detected.
when locked it is not updated anymore
|
protected |
the name of the marker set representing the global origin.
used for calibration
|
protected |
assignments between marker sets and trackable objects. key=trackableId, value=name of a marker set
|
protected |
an ARToolKitPlus clas that racks individual markers