Public Member Functions | Protected Member Functions | Protected Attributes
alvar::MarkerDetectorImpl Class Reference

Templateless version of MarkerDetector. Please use MarkerDetector instead. More...

#include <MarkerDetector.h>

Inheritance diagram for alvar::MarkerDetectorImpl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int Detect (IplImage *image, Camera *cam, bool track=false, bool visualize=false, double max_new_marker_error=0.08, double max_track_error=0.2, LabelingMethod labeling_method=CVSEQ, bool update_pose=true)
 Detect Marker 's from image
int DetectAdditional (IplImage *image, Camera *cam, bool visualize=false, double max_track_error=0.2)
void SetMarkerSize (double _edge_length=1, int _res=5, double _margin=2)
void SetMarkerSizeForId (unsigned long id, double _edge_length=1)
void SetOptions (bool _detect_pose_grayscale=false)
void TrackMarkerAdd (int id, PointDouble corners[4])
 Add markers to be tracked Sometimes application or e.g. the MultiMarker implementation knows more about marker locations. Then this method can be used after Detect to indicate where additional trackable markers could be found. The DetectAdditional is called for tracking these.
void TrackMarkersReset ()
 Clear the markers that are tracked.

Protected Member Functions

virtual void _markers_clear ()=0
virtual void _markers_push_back (Marker *mn)=0
virtual size_t _markers_size ()=0
virtual void _swap_marker_tables ()=0
virtual Marker_track_markers_at (size_t i)=0
virtual void _track_markers_clear ()=0
virtual void _track_markers_push_back (Marker *mn)=0
virtual size_t _track_markers_size ()=0
 MarkerDetectorImpl ()
virtual Markernew_M (double _edge_length=0, int _res=0, double _margin=0)=0
virtual ~MarkerDetectorImpl ()

Protected Attributes

bool detect_pose_grayscale
double edge_length
Labelinglabeling
std::map< unsigned long, double > map_edge_length
double margin
int res

Detailed Description

Templateless version of MarkerDetector. Please use MarkerDetector instead.

Definition at line 54 of file MarkerDetector.h.


Constructor & Destructor Documentation

Definition at line 33 of file MarkerDetector.cpp.

Definition at line 39 of file MarkerDetector.cpp.


Member Function Documentation

virtual void alvar::MarkerDetectorImpl::_markers_clear ( ) [protected, pure virtual]
virtual void alvar::MarkerDetectorImpl::_markers_push_back ( Marker mn) [protected, pure virtual]
virtual size_t alvar::MarkerDetectorImpl::_markers_size ( ) [protected, pure virtual]
virtual void alvar::MarkerDetectorImpl::_swap_marker_tables ( ) [protected, pure virtual]
virtual Marker* alvar::MarkerDetectorImpl::_track_markers_at ( size_t  i) [protected, pure virtual]
virtual void alvar::MarkerDetectorImpl::_track_markers_clear ( ) [protected, pure virtual]
virtual void alvar::MarkerDetectorImpl::_track_markers_push_back ( Marker mn) [protected, pure virtual]
virtual size_t alvar::MarkerDetectorImpl::_track_markers_size ( ) [protected, pure virtual]
int alvar::MarkerDetectorImpl::Detect ( IplImage *  image,
Camera cam,
bool  track = false,
bool  visualize = false,
double  max_new_marker_error = 0.08,
double  max_track_error = 0.2,
LabelingMethod  labeling_method = CVSEQ,
bool  update_pose = true 
)

Detect Marker 's from image

The coordinates are little tricky. Here is a short summary.

  • Image (top-left origin).
  • The marker corners in the image are searched in sub-pixel accuracy in counter-clockwise order starting from "lower-left" corner.
  • The corresponding marker corners and marker points are in marker coordinates (x is to east, y is to north, and z is up from the marker)
  • The marker points are read from inside the margins starting from top-left and reading the bits first left-to-right one line at a time.
Examples:
SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMultiMarker.cpp, and SampleMultiMarkerBundle.cpp.

Definition at line 78 of file MarkerDetector.cpp.

int alvar::MarkerDetectorImpl::DetectAdditional ( IplImage *  image,
Camera cam,
bool  visualize = false,
double  max_track_error = 0.2 
)
Examples:
SampleMultiMarker.cpp, and SampleMultiMarkerBundle.cpp.

Definition at line 168 of file MarkerDetector.cpp.

virtual Marker* alvar::MarkerDetectorImpl::new_M ( double  _edge_length = 0,
int  _res = 0,
double  _margin = 0 
) [protected, pure virtual]
void alvar::MarkerDetectorImpl::SetMarkerSize ( double  _edge_length = 1,
int  _res = 5,
double  _margin = 2 
)

Set the default marker size to be used for all markers unless

Parameters:
_edge_lengthLength of the marker's edge in whatever units you are using (e.g. cm)
_resThe marker content resolution in pixels. By default we use 5x5 markers. If you use 0 with MarkerData, the marker resolution is detected automatically.
_marginThe marker margin resolution in pixels (The actual captured marker image has pixel resolution of _margin+_res+_margin)
Note:
The default marker content resolution (_res) of 5 can only detect marker ids from 0 to 255. For larger marker ids, you need to increase the marker content resolution accordingly.
Examples:
SampleMarkerDetector.cpp, SampleMultiMarker.cpp, and SampleMultiMarkerBundle.cpp.

Definition at line 63 of file MarkerDetector.cpp.

void alvar::MarkerDetectorImpl::SetMarkerSizeForId ( unsigned long  id,
double  _edge_length = 1 
)

Set marker size for specified marker id. This needs to be called after setting the default marker size.

Parameters:
idThe specified marker id
_edge_lengthLength of the marker's edge in whatever units you are using (e.g. cm)
Examples:
SampleMultiMarker.cpp.

Definition at line 70 of file MarkerDetector.cpp.

void alvar::MarkerDetectorImpl::SetOptions ( bool  _detect_pose_grayscale = false)

Set marker size for specified marker id. This needs to be called after setting the default marker size.

Parameters:
_detect_pose_grayscaleDo we detect marker pose using grayscale optimization?

Definition at line 74 of file MarkerDetector.cpp.

void alvar::MarkerDetectorImpl::TrackMarkerAdd ( int  id,
PointDouble  corners[4] 
)

Add markers to be tracked Sometimes application or e.g. the MultiMarker implementation knows more about marker locations. Then this method can be used after Detect to indicate where additional trackable markers could be found. The DetectAdditional is called for tracking these.

Definition at line 47 of file MarkerDetector.cpp.

Clear the markers that are tracked.

Definition at line 43 of file MarkerDetector.cpp.


Member Data Documentation

Definition at line 72 of file MarkerDetector.h.

Definition at line 69 of file MarkerDetector.h.

Definition at line 66 of file MarkerDetector.h.

std::map<unsigned long, double> alvar::MarkerDetectorImpl::map_edge_length [protected]

Definition at line 68 of file MarkerDetector.h.

Definition at line 71 of file MarkerDetector.h.

Definition at line 70 of file MarkerDetector.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 21:12:55