Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
aruco::MarkerDetector::Params Struct Reference

#include <markerdetector.h>

Public Member Functions

void detectEnclosedMarkers (bool do_)
 
void fromStream (std::istream &str)
 
bool getAutoSizeSpeedUp () const
 
void load (cv::FileStorage &fs)
 
void save (cv::FileStorage &fs) const
 
void setAutoSizeSpeedUp (bool v, float Ts=0.25)
 
void setCornerRefinementMethod (CornerRefinementMethod method)
 
void setDetectionMode (DetectionMode dm, float minMarkerSize)
 
void setThresholdMethod (ThresMethod method, int thresHold=-1, int wsize=-1, int wsize_range=0)
 
void toStream (std::ostream &str) const
 

Static Public Member Functions

static CornerRefinementMethod getCornerRefinementMethodFromString (const std::string &str)
 
static ThresMethod getCornerThresMethodFromString (const std::string &str)
 
static DetectionMode getDetectionModeFromString (const std::string &str)
 
static std::string toString (CornerRefinementMethod dm)
 
static std::string toString (DetectionMode dm)
 
static std::string toString (ThresMethod dm)
 

Public Attributes

int AdaptiveThresWindowSize = -1
 
int AdaptiveThresWindowSize_range = 0
 
bool autoSize = false
 
float borderDistThres = 0.015f
 
int closingSize
 
CornerRefinementMethod cornerRefinementM = CORNER_SUBPIX
 
DetectionMode detectMode = DM_NORMAL
 
std::string dictionary = "ALL_DICTS"
 
bool enclosedMarker = false
 
float error_correction_rate = 0
 
int lowResMarkerSize = 20
 
int markerWarpPixSize = 5
 
int maxThreads = 1
 
float minSize = -1
 
int minSize_pix = -1
 
int NAttemptsAutoThresFix
 
float pyrfactor = 2
 
int ThresHold = 7
 
ThresMethod thresMethod = THRES_ADAPTIVE
 
int trackingMinDetections = 0
 
float ts
 

Static Private Member Functions

static void _fromStream (std::string &strg, std::istream &str)
 
static void _toStream (const std::string &strg, std::ostream &str)
 
template<typename Type >
static bool attemtpRead (const std::string &name, Type &var, cv::FileStorage &fs)
 

Detailed Description

Operating params

Definition at line 104 of file markerdetector.h.

Member Function Documentation

◆ _fromStream()

void aruco::MarkerDetector::Params::_fromStream ( std::string &  strg,
std::istream &  str 
)
staticprivate

Definition at line 448 of file markerdetector.cpp.

◆ _toStream()

void aruco::MarkerDetector::Params::_toStream ( const std::string &  strg,
std::ostream &  str 
)
staticprivate

Definition at line 442 of file markerdetector.cpp.

◆ attemtpRead()

template<typename Type >
static bool aruco::MarkerDetector::Params::attemtpRead ( const std::string &  name,
Type &  var,
cv::FileStorage &  fs 
)
inlinestaticprivate

Definition at line 242 of file markerdetector.h.

◆ detectEnclosedMarkers()

void aruco::MarkerDetector::Params::detectEnclosedMarkers ( bool  do_)
inline

Enables/Disbles the detection of enclosed markers. Enclosed markers are markers where corners are like opencv chessboard pattern

Definition at line 132 of file markerdetector.h.

◆ fromStream()

void aruco::MarkerDetector::Params::fromStream ( std::istream &  str)

Definition at line 286 of file markerdetector.cpp.

◆ getAutoSizeSpeedUp()

bool aruco::MarkerDetector::Params::getAutoSizeSpeedUp ( ) const
inline

Definition at line 164 of file markerdetector.h.

◆ getCornerRefinementMethodFromString()

CornerRefinementMethod aruco::MarkerDetector::Params::getCornerRefinementMethodFromString ( const std::string &  str)
static

Definition at line 371 of file markerdetector.cpp.

◆ getCornerThresMethodFromString()

MarkerDetector::ThresMethod aruco::MarkerDetector::Params::getCornerThresMethodFromString ( const std::string &  str)
static

Definition at line 392 of file markerdetector.cpp.

◆ getDetectionModeFromString()

DetectionMode aruco::MarkerDetector::Params::getDetectionModeFromString ( const std::string &  str)
static

Definition at line 347 of file markerdetector.cpp.

◆ load()

void aruco::MarkerDetector::Params::load ( cv::FileStorage &  fs)

Definition at line 217 of file markerdetector.cpp.

◆ save()

void aruco::MarkerDetector::Params::save ( cv::FileStorage &  fs) const

Definition at line 192 of file markerdetector.cpp.

◆ setAutoSizeSpeedUp()

void aruco::MarkerDetector::Params::setAutoSizeSpeedUp ( bool  v,
float  Ts = 0.25 
)
inline

Definition at line 159 of file markerdetector.h.

◆ setCornerRefinementMethod()

void aruco::MarkerDetector::Params::setCornerRefinementMethod ( CornerRefinementMethod  method)

Sets the corner refinement method

  • CORNER_SUBPIX: uses subpixel refinement implemented in opencv
  • CORNER_LINES: uses all the pixels in the corner border to estimate the 4 lines of the square. Then estimate the point in which they intersect. In seems that it more robust to noise. However, it only works if input image is not resized. So, the value minMarkerSize will be set to 0.
  • CORNER_NONE: Does no refinement of the corner. Again, it requires minMakerSize to be 0

Definition at line 436 of file markerdetector.cpp.

◆ setDetectionMode()

void aruco::MarkerDetector::Params::setDetectionMode ( DetectionMode  dm,
float  minMarkerSize 
)

Specifies the detection mode. We have preset three types of detection modes. These are ways to configure the internal parameters for the most typical situations. The modes are:

  • DM_NORMAL: In this mode, the full resolution image is employed for detection and slow threshold method. Use this method when you process individual images that are not part of a video sequence and you are not interested in speed.
  • DM_FAST: In this mode, there are two main improvements. First, image is threshold using a faster method using a global threshold. Also, the full resolution image is employed for detection, but, you could speed up detection even more by indicating a minimum size of the markers you will accept. This is set by the variable minMarkerSize which shoud be in range [0,1]. When it is 0, means that you do not set a limit in the size of the accepted markers. However, if you set 0.1, it means that markers smaller than 10% of the total image area, will not be detected. Then, the detection can be accelated up to orders of magnitude compared to the normal mode.
  • DM_VIDEO_FAST: This is similar to DM_FAST, but specially adapted to video processing. In that case, we assume that the observed markers when you call to detect() have a size similar to the ones observed in the previous frame. Then, the processing can be speeded up by employing smaller versions of the image automatically calculated.

Definition at line 416 of file markerdetector.cpp.

◆ setThresholdMethod()

void aruco::MarkerDetector::Params::setThresholdMethod ( MarkerDetector::ThresMethod  method,
int  thresHold = -1,
int  wsize = -1,
int  wsize_range = 0 
)

Sets the thresholding method manually. Do no

Definition at line 400 of file markerdetector.cpp.

◆ toStream()

void aruco::MarkerDetector::Params::toStream ( std::ostream &  str) const

Definition at line 261 of file markerdetector.cpp.

◆ toString() [1/3]

std::string aruco::MarkerDetector::Params::toString ( CornerRefinementMethod  dm)
static

Definition at line 358 of file markerdetector.cpp.

◆ toString() [2/3]

std::string aruco::MarkerDetector::Params::toString ( DetectionMode  dm)
static

Definition at line 333 of file markerdetector.cpp.

◆ toString() [3/3]

std::string aruco::MarkerDetector::Params::toString ( MarkerDetector::ThresMethod  dm)
static

Definition at line 381 of file markerdetector.cpp.

Member Data Documentation

◆ AdaptiveThresWindowSize

int aruco::MarkerDetector::Params::AdaptiveThresWindowSize = -1

Definition at line 213 of file markerdetector.h.

◆ AdaptiveThresWindowSize_range

int aruco::MarkerDetector::Params::AdaptiveThresWindowSize_range = 0

Definition at line 213 of file markerdetector.h.

◆ autoSize

bool aruco::MarkerDetector::Params::autoSize = false

Definition at line 219 of file markerdetector.h.

◆ borderDistThres

float aruco::MarkerDetector::Params::borderDistThres = 0.015f

Definition at line 192 of file markerdetector.h.

◆ closingSize

int aruco::MarkerDetector::Params::closingSize
Initial value:
=
0

Definition at line 235 of file markerdetector.h.

◆ cornerRefinementM

CornerRefinementMethod aruco::MarkerDetector::Params::cornerRefinementM = CORNER_SUBPIX

Definition at line 217 of file markerdetector.h.

◆ detectMode

DetectionMode aruco::MarkerDetector::Params::detectMode = DM_NORMAL

Definition at line 186 of file markerdetector.h.

◆ dictionary

std::string aruco::MarkerDetector::Params::dictionary = "ALL_DICTS"

Definition at line 204 of file markerdetector.h.

◆ enclosedMarker

bool aruco::MarkerDetector::Params::enclosedMarker = false

Definition at line 202 of file markerdetector.h.

◆ error_correction_rate

float aruco::MarkerDetector::Params::error_correction_rate = 0

Definition at line 203 of file markerdetector.h.

◆ lowResMarkerSize

int aruco::MarkerDetector::Params::lowResMarkerSize = 20

Definition at line 193 of file markerdetector.h.

◆ markerWarpPixSize

int aruco::MarkerDetector::Params::markerWarpPixSize = 5

Definition at line 215 of file markerdetector.h.

◆ maxThreads

int aruco::MarkerDetector::Params::maxThreads = 1

Definition at line 189 of file markerdetector.h.

◆ minSize

float aruco::MarkerDetector::Params::minSize = -1

Definition at line 200 of file markerdetector.h.

◆ minSize_pix

int aruco::MarkerDetector::Params::minSize_pix = -1

Definition at line 201 of file markerdetector.h.

◆ NAttemptsAutoThresFix

int aruco::MarkerDetector::Params::NAttemptsAutoThresFix
Initial value:
=
3

Definition at line 207 of file markerdetector.h.

◆ pyrfactor

float aruco::MarkerDetector::Params::pyrfactor = 2

Enables automatic image resize according to elements detected in previous frame

Parameters
v
tsis a factor in the range $(0,1]$ that accounts for the camera motion speed. For instance, when ts=0.1 , it means that in the next frame, $\tau_i$ is such that markers $10%$ smaller than the smallest marker in the current image will be seek. To avoid loosing track of the markers.

Definition at line 234 of file markerdetector.h.

◆ ThresHold

int aruco::MarkerDetector::Params::ThresHold = 7

Definition at line 213 of file markerdetector.h.

◆ thresMethod

ThresMethod aruco::MarkerDetector::Params::thresMethod = THRES_ADAPTIVE

Definition at line 206 of file markerdetector.h.

◆ trackingMinDetections

int aruco::MarkerDetector::Params::trackingMinDetections = 0

Definition at line 209 of file markerdetector.h.

◆ ts

float aruco::MarkerDetector::Params::ts
Initial value:
=
0.25f

Definition at line 220 of file markerdetector.h.


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


aruco
Author(s): Rafael Muñoz Salinas , Bence Magyar
autogenerated on Sat Sep 23 2023 02:26:45