Struct MarkerDetector::Params
Defined in File markerdetector.h
Nested Relationships
This struct is a nested type of Class MarkerDetector.
Struct Documentation
-
struct Params
Operating params
Public Functions
-
void 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.
-
inline void detectEnclosedMarkers(bool do_)
Enables/Disbles the detection of enclosed markers. Enclosed markers are markers where corners are like opencv chessboard pattern
-
void 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
-
void setThresholdMethod(ThresMethod method, int thresHold = -1, int wsize = -1, int wsize_range = 0)
Sets the thresholding method manually. Do no
-
inline void setAutoSizeSpeedUp(bool v, float Ts = 0.25)
-
inline bool getAutoSizeSpeedUp() const
-
void save(cv::FileStorage &fs) const
-
void load(cv::FileStorage &fs)
-
void toStream(std::ostream &str) const
-
void fromStream(std::istream &str)
Public Members
-
DetectionMode detectMode = DM_NORMAL
-
int maxThreads = 1
-
float borderDistThres = 0.015f
-
int lowResMarkerSize = 20
-
float minSize = -1
-
int minSize_pix = -1
-
bool enclosedMarker = false
-
float error_correction_rate = 0
-
std::string dictionary = "ALL_DICTS"
-
ThresMethod thresMethod = THRES_ADAPTIVE
-
int NAttemptsAutoThresFix = 3
-
int trackingMinDetections = 0
-
int AdaptiveThresWindowSize = -1
-
int ThresHold = 7
-
int AdaptiveThresWindowSize_range = 0
-
int markerWarpPixSize = 5
-
CornerRefinementMethod cornerRefinementM = CORNER_SUBPIX
-
bool autoSize = false
-
float ts = 0.25f
-
float pyrfactor = 2
Enables automatic image resize according to elements detected in previous frame
- Param v:
- Param ts:
is 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.
-
int closingSize = 0
Public Static Functions
-
static std::string toString(DetectionMode dm)
-
static DetectionMode getDetectionModeFromString(const std::string &str)
-
static std::string toString(CornerRefinementMethod dm)
-
static CornerRefinementMethod getCornerRefinementMethodFromString(const std::string &str)
-
static std::string toString(ThresMethod dm)
-
static ThresMethod getCornerThresMethodFromString(const std::string &str)
-
void setDetectionMode(DetectionMode dm, float minMarkerSize)