Templateless version of MarkerDetector. Please use MarkerDetector instead. More...
#include <MarkerDetector.h>
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 Marker * | new_M (double _edge_length=0, int _res=0, double _margin=0)=0 |
virtual | ~MarkerDetectorImpl () |
Protected Attributes | |
bool | detect_pose_grayscale |
double | edge_length |
Labeling * | labeling |
std::map< unsigned long, double > | map_edge_length |
double | margin |
int | res |
Templateless version of MarkerDetector. Please use MarkerDetector instead.
Definition at line 53 of file MarkerDetector.h.
alvar::MarkerDetectorImpl::MarkerDetectorImpl | ( | ) | [protected] |
Definition at line 33 of file MarkerDetector.cpp.
alvar::MarkerDetectorImpl::~MarkerDetectorImpl | ( | ) | [protected, virtual] |
Definition at line 39 of file MarkerDetector.cpp.
virtual void alvar::MarkerDetectorImpl::_markers_clear | ( | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual void alvar::MarkerDetectorImpl::_markers_push_back | ( | Marker * | mn | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual size_t alvar::MarkerDetectorImpl::_markers_size | ( | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual void alvar::MarkerDetectorImpl::_swap_marker_tables | ( | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual Marker* alvar::MarkerDetectorImpl::_track_markers_at | ( | size_t | i | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual void alvar::MarkerDetectorImpl::_track_markers_clear | ( | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual void alvar::MarkerDetectorImpl::_track_markers_push_back | ( | Marker * | mn | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
virtual size_t alvar::MarkerDetectorImpl::_track_markers_size | ( | ) | [protected, pure virtual] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
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.
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 |
||
) |
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] |
Implemented in alvar::MarkerDetector< M >, and alvar::MarkerDetector< MarkerData >.
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
_edge_length | Length of the marker's edge in whatever units you are using (e.g. cm) |
_res | The marker content resolution in pixels. By default we use 5x5 markers. If you use 0 with MarkerData, the marker resolution is detected automatically. |
_margin | The marker margin resolution in pixels (The actual captured marker image has pixel resolution of _margin+_res+_margin) |
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.
id | The specified marker id |
_edge_length | Length of the marker's edge in whatever units you are using (e.g. cm) |
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.
_detect_pose_grayscale | Do 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.
bool alvar::MarkerDetectorImpl::detect_pose_grayscale [protected] |
Definition at line 71 of file MarkerDetector.h.
double alvar::MarkerDetectorImpl::edge_length [protected] |
Definition at line 68 of file MarkerDetector.h.
Labeling* alvar::MarkerDetectorImpl::labeling [protected] |
Definition at line 65 of file MarkerDetector.h.
std::map<unsigned long, double> alvar::MarkerDetectorImpl::map_edge_length [protected] |
Definition at line 67 of file MarkerDetector.h.
double alvar::MarkerDetectorImpl::margin [protected] |
Definition at line 70 of file MarkerDetector.h.
int alvar::MarkerDetectorImpl::res [protected] |
Definition at line 69 of file MarkerDetector.h.