TrackAruco class
Tracking of OpenCV Aruoc tags.
Contents
This class handles the tracking of OpenCV Aruco tags. We track the top left corner of the tag as compared to the pose of the tag or any other corners. Right now we hardcode the dictionary to be cv::aruco::DICT_6X6_25, so please generate tags in this family of tags.
Base classes
- class TrackBase
- Visual feature tracking base class.
Constructors, destructors, conversion operators
- TrackAruco()
- Public default constructor.
- TrackAruco(int numaruco, bool do_downsizing) explicit
- Public constructor with configuration variables.
Public functions
- void feed_monocular(double timestamp, cv::Mat& img, size_t cam_id) override
- Process a new monocular image.
- void feed_stereo(double timestamp, cv::Mat& img_left, cv::Mat& img_right, size_t cam_id_left, size_t cam_id_right) override
- Process new stereo pair of images.
- void display_active(cv::Mat& img_out, int r1, int g1, int b1, int r2, int g2, int b2) override
- We override the display equation so we can show the tags we extract.
Function documentation
ov_core:: TrackAruco:: TrackAruco(int numaruco,
bool do_downsizing) explicit
Public constructor with configuration variables.
| Parameters | |
|---|---|
| numaruco | the max id of the arucotags, we don't use any tags greater than this value even if we extract them |
| do_downsizing | we can scale the image by 1/2 to increase Aruco tag extraction speed |
void ov_core:: TrackAruco:: feed_monocular(double timestamp,
cv::Mat& img,
size_t cam_id) override
Process a new monocular image.
| Parameters | |
|---|---|
| timestamp | timestamp the new image occurred at |
| img | new cv:Mat grayscale image |
| cam_id | the camera id that this new image corresponds too |
void ov_core:: TrackAruco:: feed_stereo(double timestamp,
cv::Mat& img_left,
cv::Mat& img_right,
size_t cam_id_left,
size_t cam_id_right) override
Process new stereo pair of images.
| Parameters | |
|---|---|
| timestamp | timestamp this pair occured at (stereo is synchronised) |
| img_left | first grayscaled image |
| img_right | second grayscaled image |
| cam_id_left | first image camera id |
| cam_id_right | second image camera id |
void ov_core:: TrackAruco:: display_active(cv::Mat& img_out,
int r1,
int g1,
int b1,
int r2,
int g2,
int b2) override
We override the display equation so we can show the tags we extract.
| Parameters | |
|---|---|
| img_out | image to which we will overlayed features on |
| r1 | first color to draw in |
| g1 | first color to draw in |
| b1 | first color to draw in |
| r2 | second color to draw in |
| g2 | second color to draw in |
| b2 | second color to draw in |