Public Member Functions | Protected Attributes | List of all members
ov_core::TrackAruco Class Reference

Tracking of OpenCV Aruoc tags. More...

#include <TrackAruco.h>

Inheritance diagram for ov_core::TrackAruco:
Inheritance graph
[legend]

Public Member Functions

void feed_new_camera (const CameraData &message) override
 Process a new image. More...
 
 TrackAruco (std::unordered_map< size_t, std::shared_ptr< CamBase >> cameras, int numaruco, bool stereo, HistogramMethod histmethod, bool downsize)
 Public constructor with configuration variables. More...
 
- Public Member Functions inherited from ov_core::TrackBase
void change_feat_id (size_t id_old, size_t id_new)
 Changes the ID of an actively tracked feature to another one. More...
 
virtual void display_active (cv::Mat &img_out, int r1, int g1, int b1, int r2, int g2, int b2, std::string overlay="")
 Shows features extracted in the last image. More...
 
virtual void display_history (cv::Mat &img_out, int r1, int g1, int b1, int r2, int g2, int b2, std::vector< size_t > highlighted={}, std::string overlay="")
 Shows a "trail" for each feature (i.e. its history) More...
 
std::shared_ptr< FeatureDatabaseget_feature_database ()
 Get the feature database with all the track information. More...
 
std::unordered_map< size_t, std::vector< size_t > > get_last_ids ()
 Getter method for active features in the last frame (ids per camera) More...
 
std::unordered_map< size_t, std::vector< cv::KeyPoint > > get_last_obs ()
 Getter method for active features in the last frame (observations per camera) More...
 
int get_num_features ()
 Getter method for number of active features. More...
 
void set_num_features (int _num_features)
 Setter method for number of active features. More...
 
 TrackBase (std::unordered_map< size_t, std::shared_ptr< CamBase >> cameras, int numfeats, int numaruco, bool stereo, HistogramMethod histmethod)
 Public constructor with configuration variables. More...
 
virtual ~TrackBase ()
 

Protected Attributes

bool do_downsizing
 
int max_tag_id
 
- Protected Attributes inherited from ov_core::TrackBase
std::unordered_map< size_t, std::shared_ptr< CamBase > > camera_calib
 Camera object which has all calibration in it. More...
 
std::map< size_t, bool > camera_fisheye
 If we are a fisheye model or not. More...
 
std::atomic< size_t > currid
 Master ID for this tracker (atomic to allow for multi-threading) More...
 
std::shared_ptr< FeatureDatabasedatabase
 Database with all our current features. More...
 
HistogramMethod histogram_method
 What histogram equalization method we should pre-process images with? More...
 
std::unordered_map< size_t, std::vector< size_t > > ids_last
 Set of IDs of each current feature in the database. More...
 
std::map< size_t, cv::Mat > img_last
 Last set of images (use map so all trackers render in the same order) More...
 
std::map< size_t, cv::Mat > img_mask_last
 Last set of images (use map so all trackers render in the same order) More...
 
std::vector< std::mutex > mtx_feeds
 Mutexs for our last set of image storage (img_last, pts_last, and ids_last) More...
 
std::mutex mtx_last_vars
 Mutex for editing the *_last variables. More...
 
int num_features
 Number of features we should try to track frame to frame. More...
 
std::unordered_map< size_t, std::vector< cv::KeyPoint > > pts_last
 Last set of tracked points. More...
 
boost::posix_time::ptime rT1
 
boost::posix_time::ptime rT2
 
boost::posix_time::ptime rT3
 
boost::posix_time::ptime rT4
 
boost::posix_time::ptime rT5
 
boost::posix_time::ptime rT6
 
boost::posix_time::ptime rT7
 
bool use_stereo
 If we should use binocular tracking or stereo tracking for multi-camera. More...
 

Additional Inherited Members

- Public Types inherited from ov_core::TrackBase
enum  HistogramMethod { NONE, HISTOGRAM, CLAHE }
 Desired pre-processing image method. More...
 

Detailed Description

Tracking of OpenCV Aruoc tags.

This class handles the tracking of OpenCV Aruco tags. We track the corners 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_1000, so please generate tags in this family of tags. You can generate these tags using an online utility: https://chev.me/arucogen/ The actual size of the tags do not matter since we do not recover the pose and instead just use this for re-detection and tracking of the four corners of the tag.

Definition at line 43 of file TrackAruco.h.

Constructor & Destructor Documentation

◆ TrackAruco()

ov_core::TrackAruco::TrackAruco ( std::unordered_map< size_t, std::shared_ptr< CamBase >>  cameras,
int  numaruco,
bool  stereo,
HistogramMethod  histmethod,
bool  downsize 
)
inlineexplicit

Public constructor with configuration variables.

Parameters
camerascamera calibration object which has all camera intrinsics in it
numarucothe max id of the arucotags, we don't use any tags greater than this value even if we extract them
stereoif we should do stereo feature tracking or binocular
histmethodwhat type of histogram pre-processing should be done (histogram eq?)
downsizewe can scale the image by 1/2 to increase Aruco tag extraction speed

Definition at line 54 of file TrackAruco.h.

Member Function Documentation

◆ feed_new_camera()

void TrackAruco::feed_new_camera ( const CameraData message)
overridevirtual

Process a new image.

Parameters
messageContains our timestamp, images, and camera ids

Implements ov_core::TrackBase.

Definition at line 31 of file TrackAruco.cpp.

Member Data Documentation

◆ do_downsizing

bool ov_core::TrackAruco::do_downsizing
protected

Definition at line 107 of file TrackAruco.h.

◆ max_tag_id

int ov_core::TrackAruco::max_tag_id
protected

Definition at line 104 of file TrackAruco.h.


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


ov_core
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Jan 22 2024 03:08:17