Go to the documentation of this file.
22 #ifndef OV_CORE_TRACK_BASE_H
23 #define OV_CORE_TRACK_BASE_H
29 #include <unordered_map>
31 #include <boost/date_time/posix_time/posix_time.hpp>
32 #include <opencv2/core/core.hpp>
33 #include <opencv2/highgui/highgui.hpp>
34 #include <opencv2/opencv.hpp>
44 class FeatureDatabase;
88 TrackBase(std::unordered_map<
size_t, std::shared_ptr<CamBase>> cameras,
int numfeats,
int numaruco,
bool stereo,
106 virtual void display_active(cv::Mat &img_out,
int r1,
int g1,
int b1,
int r2,
int g2,
int b2, std::string overlay =
"");
116 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 = {},
117 std::string overlay =
"");
186 std::unordered_map<size_t, std::vector<cv::KeyPoint>>
pts_last;
189 std::unordered_map<size_t, std::vector<size_t>>
ids_last;
std::vector< std::mutex > mtx_feeds
Mutexs for our last set of image storage (img_last, pts_last, and ids_last)
std::atomic< size_t > currid
Master ID for this tracker (atomic to allow for multi-threading)
std::shared_ptr< FeatureDatabase > database
Database with all our current features.
std::map< size_t, cv::Mat > img_mask_last
Last set of images (use map so all trackers render in the same order)
std::mutex mtx_last_vars
Mutex for editing the *_last variables.
HistogramMethod
Desired pre-processing image method.
boost::posix_time::ptime rT3
virtual void feed_new_camera(const CameraData &message)=0
Process a new image.
std::map< size_t, bool > camera_fisheye
If we are a fisheye model or not.
bool use_stereo
If we should use binocular tracking or stereo tracking for multi-camera.
Struct for a collection of camera measurements.
int num_features
Number of features we should try to track frame to frame.
TrackBase(std::unordered_map< size_t, std::shared_ptr< CamBase >> cameras, int numfeats, int numaruco, bool stereo, HistogramMethod histmethod)
Public constructor with configuration variables.
void set_num_features(int _num_features)
Setter method for number of active features.
HistogramMethod histogram_method
What histogram equalization method we should pre-process images with?
boost::posix_time::ptime rT7
std::unordered_map< size_t, std::vector< size_t > > get_last_ids()
Getter method for active features in the last frame (ids per camera)
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.
std::unordered_map< size_t, std::vector< size_t > > ids_last
Set of IDs of each current feature in the database.
boost::posix_time::ptime rT2
boost::posix_time::ptime rT5
boost::posix_time::ptime rT1
void change_feat_id(size_t id_old, size_t id_new)
Changes the ID of an actively tracked feature to another one.
std::unordered_map< size_t, std::vector< cv::KeyPoint > > get_last_obs()
Getter method for active features in the last frame (observations per camera)
boost::posix_time::ptime rT6
std::shared_ptr< FeatureDatabase > get_feature_database()
Get the feature database with all the track information.
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)
std::unordered_map< size_t, std::vector< cv::KeyPoint > > pts_last
Last set of tracked points.
int get_num_features()
Getter method for number of active features.
std::map< size_t, cv::Mat > img_last
Last set of images (use map so all trackers render in the same order)
std::unordered_map< size_t, std::shared_ptr< CamBase > > camera_calib
Camera object which has all calibration in it.
Core algorithms for OpenVINS.
Visual feature tracking base class.
boost::posix_time::ptime rT4
ov_core
Author(s): Patrick Geneva
, Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:46