Templateless version of MarkerDetector. Please use MarkerDetector instead.
More...
#include <MarkerDetector.h>
|
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 More...
|
|
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. More...
|
|
void | TrackMarkersReset () |
| Clear the markers that are tracked. More...
|
|
Templateless version of MarkerDetector. Please use MarkerDetector instead.
Definition at line 54 of file MarkerDetector.h.
alvar::MarkerDetectorImpl::MarkerDetectorImpl |
( |
| ) |
|
|
protected |
alvar::MarkerDetectorImpl::~MarkerDetectorImpl |
( |
| ) |
|
|
protectedvirtual |
virtual void alvar::MarkerDetectorImpl::_markers_clear |
( |
| ) |
|
|
protectedpure virtual |
virtual void alvar::MarkerDetectorImpl::_markers_push_back |
( |
Marker * |
mn | ) |
|
|
protectedpure virtual |
virtual size_t alvar::MarkerDetectorImpl::_markers_size |
( |
| ) |
|
|
protectedpure virtual |
virtual void alvar::MarkerDetectorImpl::_swap_marker_tables |
( |
| ) |
|
|
protectedpure virtual |
virtual Marker* alvar::MarkerDetectorImpl::_track_markers_at |
( |
size_t |
i | ) |
|
|
protectedpure virtual |
virtual void alvar::MarkerDetectorImpl::_track_markers_clear |
( |
| ) |
|
|
protectedpure virtual |
virtual void alvar::MarkerDetectorImpl::_track_markers_push_back |
( |
Marker * |
mn | ) |
|
|
protectedpure virtual |
virtual size_t alvar::MarkerDetectorImpl::_track_markers_size |
( |
| ) |
|
|
protectedpure 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.
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 |
|
) |
| |
virtual Marker* alvar::MarkerDetectorImpl::new_M |
( |
double |
_edge_length = 0 , |
|
|
int |
_res = 0 , |
|
|
double |
_margin = 0 |
|
) |
| |
|
protectedpure 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_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) |
- 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.
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
-
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.
- Parameters
-
_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.
void alvar::MarkerDetectorImpl::TrackMarkersReset |
( |
| ) |
|
bool alvar::MarkerDetectorImpl::detect_pose_grayscale |
|
protected |
double alvar::MarkerDetectorImpl::edge_length |
|
protected |
Labeling* alvar::MarkerDetectorImpl::labeling |
|
protected |
std::map<unsigned long, double> alvar::MarkerDetectorImpl::map_edge_length |
|
protected |
double alvar::MarkerDetectorImpl::margin |
|
protected |
int alvar::MarkerDetectorImpl::res |
|
protected |
The documentation for this class was generated from the following files: