ARX  1.2.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
ARTrackerSquare Class Reference

#include <ARTrackerSquare.h>

Inheritance diagram for ARTrackerSquare:
[legend]
Collaboration diagram for ARTrackerSquare:
[legend]

Public Types

typedef void(*) MatrixModeAutoCreateNewTrackablesCallback_t(const ARTrackableSquare &trackable)

Public Member Functions

 ARTrackerSquare ()
 ~ARTrackerSquare ()
ARTrackerType type () const override
std::vector< std::string > trackableConfigurations () const override
bool initialize () override
void setDebugMode (bool debug)
 Enables or disables debug mode in the tracker.
bool debugMode () const
 Returns whether debug mode is currently enabled.
void setImageProcMode (int mode)
int imageProcMode () const
void setThreshold (int thresh)
 Sets the threshold value used for image binarization.
int threshold () const
 Returns the current threshold value used for image binarization.
void setThresholdMode (AR_LABELING_THRESH_MODE mode)
 Sets the thresholding mode to use.
AR_LABELING_THRESH_MODE thresholdMode () const
 Returns the current thresholding mode.
void setLabelingMode (int mode)
 Sets the labeling mode to use.
int labelingMode () const
 Returns the current labeling mode.
void setPatternDetectionMode (int mode)
int patternDetectionMode () const
void setPattRatio (float ratio)
float pattRatio () const
void setMatrixCodeType (AR_MATRIX_CODE_TYPE type)
AR_MATRIX_CODE_TYPE matrixCodeType () const
void setPatternSize (int patternSize)
int patternSize () const
void setPatternCountMax (int patternCountMax)
int patternCountMax () const
void setMatrixModeAutoCreateNewTrackables (bool on)
bool matrixModeAutoCreateNewTrackables () const
void setMatrixModeAutoCreateNewTrackablesCallback (MatrixModeAutoCreateNewTrackablesCallback_t callback)
MatrixModeAutoCreateNewTrackablesCallback_t matrixModeAutoCreateNewTrackablesCallback () const
void setMatrixModeAutoCreateNewTrackablesDefaultWidth (ARdouble width)
float matrixModeAutoCreateNewTrackablesDefaultWidth () const
bool start (ARParamLT *paramLT, AR_PIXEL_FORMAT pixelFormat) override
bool start (ARParamLT *paramLT0, AR_PIXEL_FORMAT pixelFormat0, ARParamLT *paramLT1, AR_PIXEL_FORMAT pixelFormat1, const ARdouble transL2R[3][4]) override
bool isRunning () override
bool wantsUpdate () override
bool update (AR2VideoBufferT *buff) override
bool update (AR2VideoBufferT *buff0, AR2VideoBufferT *buff1) override
bool stop () override
void terminate () override
int newTrackable (std::vector< std::string > config) override
 ARTrackable factory method.
unsigned int countTrackables () override
std::shared_ptr< ARTrackable > getTrackable (int UID) override
std::vector< std::shared_ptr< ARTrackable > > getAllTrackables () override
bool deleteTrackable (int UID) override
 Removes the trackable with UID uid, if held by this tracker.
void deleteAllTrackables () override
bool updateDebugTextureRGBA32 (const int videoSourceIndex, uint32_t *buffer)
Public Member Functions inherited from ARTrackerVideo
 ARTrackerVideo ()
virtual ~ARTrackerVideo ()
Public Member Functions inherited from ARTracker
 ARTracker ()
virtual ~ARTracker ()

Static Public Attributes

static constexpr float k_matrixModeAutoCreateNewTrackablesDefaultWidth_default = 80.0f

Member Typedef Documentation

◆ MatrixModeAutoCreateNewTrackablesCallback_t

typedef void(*) ARTrackerSquare::MatrixModeAutoCreateNewTrackablesCallback_t(const ARTrackableSquare &trackable)

Constructor & Destructor Documentation

◆ ARTrackerSquare()

ARTrackerSquare::ARTrackerSquare ( )

◆ ~ARTrackerSquare()

ARTrackerSquare::~ARTrackerSquare ( )
Here is the call graph for this function:

Member Function Documentation

◆ countTrackables()

unsigned int ARTrackerSquare::countTrackables ( )
overridevirtual

Implements ARTracker.

◆ debugMode()

bool ARTrackerSquare::debugMode ( ) const

Returns whether debug mode is currently enabled.

Returns
true when debug mode is enabled, false when debug mode is disabled
See also
setDebugMode()

◆ deleteAllTrackables()

void ARTrackerSquare::deleteAllTrackables ( )
overridevirtual

Implements ARTracker.

◆ deleteTrackable()

bool ARTrackerSquare::deleteTrackable ( int UID)
overridevirtual

Removes the trackable with UID uid, if held by this tracker.

Returns
true if the trackable was held by this tracker and removed, false otherwise.

Implements ARTracker.

◆ getAllTrackables()

std::vector< std::shared_ptr< ARTrackable > > ARTrackerSquare::getAllTrackables ( )
overridevirtual

Implements ARTracker.

◆ getTrackable()

std::shared_ptr< ARTrackable > ARTrackerSquare::getTrackable ( int UID)
overridevirtual

Implements ARTracker.

◆ imageProcMode()

int ARTrackerSquare::imageProcMode ( ) const

◆ initialize()

bool ARTrackerSquare::initialize ( )
overridevirtual

Implements ARTracker.

Here is the call graph for this function:

◆ isRunning()

bool ARTrackerSquare::isRunning ( )
overridevirtual

Implements ARTracker.

◆ labelingMode()

int ARTrackerSquare::labelingMode ( ) const

Returns the current labeling mode.

Returns
The current labeling mode.
See also
setLabelingMode()

◆ matrixCodeType()

AR_MATRIX_CODE_TYPE ARTrackerSquare::matrixCodeType ( ) const

◆ matrixModeAutoCreateNewTrackables()

bool ARTrackerSquare::matrixModeAutoCreateNewTrackables ( ) const
inline

◆ matrixModeAutoCreateNewTrackablesCallback()

MatrixModeAutoCreateNewTrackablesCallback_t ARTrackerSquare::matrixModeAutoCreateNewTrackablesCallback ( ) const
inline

◆ matrixModeAutoCreateNewTrackablesDefaultWidth()

float ARTrackerSquare::matrixModeAutoCreateNewTrackablesDefaultWidth ( ) const
inline

◆ newTrackable()

int ARTrackerSquare::newTrackable ( std::vector< std::string > config)
overridevirtual

ARTrackable factory method.

single;data/hiro.patt;80 single_buffer;80;buffer=234 221 237... single_barcode;0;80 multi;data/multi/marker.dat nft;data/nft/pinball 2d;pinball.jpg;188.0

Returns
The UID of the new trackable.

Implements ARTracker.

Here is the call graph for this function:

◆ patternCountMax()

int ARTrackerSquare::patternCountMax ( ) const

◆ patternDetectionMode()

int ARTrackerSquare::patternDetectionMode ( ) const

◆ patternSize()

int ARTrackerSquare::patternSize ( ) const

◆ pattRatio()

float ARTrackerSquare::pattRatio ( ) const

◆ setDebugMode()

void ARTrackerSquare::setDebugMode ( bool debug)

Enables or disables debug mode in the tracker.

When enabled, a black and white debug image is generated during marker detection. The debug image is useful for visualising the binarization process and choosing a threshold value.

Parameters
debugtrue to enable debug mode, false to disable debug mode
See also
getDebugMode()
Here is the call graph for this function:

◆ setImageProcMode()

void ARTrackerSquare::setImageProcMode ( int mode)
Here is the call graph for this function:

◆ setLabelingMode()

void ARTrackerSquare::setLabelingMode ( int mode)

Sets the labeling mode to use.

Parameters
modeThe new labeling mode to use.
See also
getLabelingMode()
Here is the call graph for this function:

◆ setMatrixCodeType()

void ARTrackerSquare::setMatrixCodeType ( AR_MATRIX_CODE_TYPE type)
Here is the call graph for this function:

◆ setMatrixModeAutoCreateNewTrackables()

void ARTrackerSquare::setMatrixModeAutoCreateNewTrackables ( bool on)
inline

◆ setMatrixModeAutoCreateNewTrackablesCallback()

void ARTrackerSquare::setMatrixModeAutoCreateNewTrackablesCallback ( MatrixModeAutoCreateNewTrackablesCallback_t callback)
inline

◆ setMatrixModeAutoCreateNewTrackablesDefaultWidth()

void ARTrackerSquare::setMatrixModeAutoCreateNewTrackablesDefaultWidth ( ARdouble width)
inline

◆ setPatternCountMax()

void ARTrackerSquare::setPatternCountMax ( int patternCountMax)
Here is the call graph for this function:

◆ setPatternDetectionMode()

void ARTrackerSquare::setPatternDetectionMode ( int mode)
Here is the call graph for this function:

◆ setPatternSize()

void ARTrackerSquare::setPatternSize ( int patternSize)
Here is the call graph for this function:

◆ setPattRatio()

void ARTrackerSquare::setPattRatio ( float ratio)
Here is the call graph for this function:

◆ setThreshold()

void ARTrackerSquare::setThreshold ( int thresh)

Sets the threshold value used for image binarization.

Parameters
threshThe new threshold value to use
See also
getThreshold()
Here is the call graph for this function:

◆ setThresholdMode()

void ARTrackerSquare::setThresholdMode ( AR_LABELING_THRESH_MODE mode)

Sets the thresholding mode to use.

Parameters
modeThe new thresholding mode to use.
See also
getThresholdMode()
Here is the call graph for this function:

◆ start() [1/2]

bool ARTrackerSquare::start ( ARParamLT * paramLT,
AR_PIXEL_FORMAT pixelFormat )
overridevirtual

Implements ARTrackerVideo.

Here is the call graph for this function:

◆ start() [2/2]

bool ARTrackerSquare::start ( ARParamLT * paramLT0,
AR_PIXEL_FORMAT pixelFormat0,
ARParamLT * paramLT1,
AR_PIXEL_FORMAT pixelFormat1,
const ARdouble transL2R[3][4] )
overridevirtual

Implements ARTrackerVideo.

Here is the call graph for this function:

◆ stop()

bool ARTrackerSquare::stop ( )
overridevirtual

Implements ARTracker.

Here is the call graph for this function:

◆ terminate()

void ARTrackerSquare::terminate ( )
overridevirtual

Implements ARTracker.

Here is the call graph for this function:

◆ threshold()

int ARTrackerSquare::threshold ( ) const

Returns the current threshold value used for image binarization.

Returns
The current threshold value
See also
setThreshold()

◆ thresholdMode()

AR_LABELING_THRESH_MODE ARTrackerSquare::thresholdMode ( ) const

Returns the current thresholding mode.

Returns
The current thresholding mode.
See also
setThresholdMode()

◆ trackableConfigurations()

std::vector< std::string > ARTrackerSquare::trackableConfigurations ( ) const
inlineoverridevirtual

Implements ARTracker.

◆ type()

ARTrackerType ARTrackerSquare::type ( ) const
inlineoverridevirtual

Implements ARTracker.

◆ update() [1/2]

bool ARTrackerSquare::update ( AR2VideoBufferT * buff)
overridevirtual

Implements ARTrackerVideo.

Here is the call graph for this function:

◆ update() [2/2]

bool ARTrackerSquare::update ( AR2VideoBufferT * buff0,
AR2VideoBufferT * buff1 )
overridevirtual

Implements ARTrackerVideo.

Here is the call graph for this function:

◆ updateDebugTextureRGBA32()

bool ARTrackerSquare::updateDebugTextureRGBA32 ( const int videoSourceIndex,
uint32_t * buffer )
Here is the call graph for this function:

◆ wantsUpdate()

bool ARTrackerSquare::wantsUpdate ( )
overridevirtual

Implements ARTracker.

Member Data Documentation

◆ k_matrixModeAutoCreateNewTrackablesDefaultWidth_default

float ARTrackerSquare::k_matrixModeAutoCreateNewTrackablesDefaultWidth_default = 80.0f
staticconstexpr

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