Templateless version of MarkerDetector. Please use MarkerDetector instead.
More...
#include <MarkerDetector.h>
|
void | TrackMarkersReset () |
| Clear the markers that are tracked.
|
|
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 | 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) |
|
int | Detect (cv::Mat &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 (cv::Mat &image, Camera *cam, bool visualize=false, double max_track_error=0.2) |
|
|
virtual Marker * | new_M (double _edge_length=0, int _res=0, double _margin=0)=0 |
|
virtual void | _markers_clear ()=0 |
|
virtual void | _markers_push_back (Marker *mn)=0 |
|
virtual size_t | _markers_size ()=0 |
|
virtual void | _track_markers_clear ()=0 |
|
virtual void | _track_markers_push_back (Marker *mn)=0 |
|
virtual size_t | _track_markers_size ()=0 |
|
virtual Marker * | _track_markers_at (size_t i)=0 |
|
virtual void | _swap_marker_tables ()=0 |
|
|
Labeling * | labeling |
|
std::map< unsigned long, double > | map_edge_length |
|
double | edge_length |
|
int | res |
|
double | margin |
|
bool | detect_pose_grayscale |
|
Templateless version of MarkerDetector. Please use MarkerDetector instead.
Definition at line 54 of file MarkerDetector.h.
◆ Detect()
int Detect |
( |
cv::Mat & |
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.
◆ SetMarkerSize()
void 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.
◆ SetMarkerSizeForId()
void 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) |
◆ SetOptions()
void 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? |
The documentation for this class was generated from the following file: