Go to the documentation of this file. 1 #ifndef AIMAGEPROVIDER_H
2 #define AIMAGEPROVIDER_H
9 #include <opencv2/calib3d.hpp>
10 #include <opencv2/core.hpp>
11 #include <opencv2/core/eigen.hpp>
33 std::shared_ptr<Frame>
next();
42 std::vector<std::shared_ptr<ImageSensor>>
createImageSensors(
const std::vector<cv::Mat> &imgs,
43 const std::vector<cv::Mat> &masks = {});
48 std::shared_ptr<IMU>
createImuSensor(
const Eigen::Vector3d &acc,
const Eigen::Vector3d &gyr);
78 EUROCGrabber(std::string folder_path, std::shared_ptr<ADataProvider> prov)
79 : _folder_path(folder_path), _prov(prov) {}
102 double _time_tolerance = 0.0025;
103 std::string _folder_path;
104 std::queue<std::string> _cam0_filename_queue, _cam1_filename_queue;
105 std::queue<double> _cam0_timestamp_queue, _cam1_timestamp_queue,
106 _imu_timestamp_queue;
107 std::queue<std::shared_ptr<IMU>> _imu_queue;
109 std::shared_ptr<ADataProvider> _prov;
114 #endif // AIMAGEPROVIDER_H
int _nframes
Frame counter.
Definition: adataprovider.h:67
EUROCGrabber class for loading and processing frames from raw data in the EUROC format.
Definition: adataprovider.h:76
std::queue< std::shared_ptr< Frame > > _frame_queue
Queue of frames to be processed.
Definition: adataprovider.h:65
void load_filenames()
Load filenames and timestamps from .csv files.
Definition: adataprovider.cpp:270
int _ncam
Number of Image Sensors.
Definition: adataprovider.h:64
This structure contains the configuration parameters located in the config file.
Definition: slamParameters.h:65
EUROCGrabber(std::string folder_path, std::shared_ptr< ADataProvider > prov)
Definition: adataprovider.h:78
void addFrameToTheQueue(std::vector< std::shared_ptr< ASensor >> sensors, double time)
Create a frame from sensors and timestamp and add it to the queue.
Definition: adataprovider.cpp:258
void addAllFrames()
Add all frames from the queue of the data provider until no more frames are available.
Definition: adataprovider.h:94
std::shared_ptr< imu_config > getIMUConfig()
Definition: adataprovider.h:36
ADataProvider class for managing data from various sensors.
Definition: adataprovider.h:26
std::shared_ptr< imu_config > _imu_config
IMU configuration.
Definition: adataprovider.h:62
int getNCam()
Definition: adataprovider.h:37
void loadIMUConfig(YAML::Node imu_node)
Definition: adataprovider.cpp:60
std::shared_ptr< IMU > createImuSensor(const Eigen::Vector3d &acc, const Eigen::Vector3d &gyr)
From raw IMU measurements to an IMU sensor object.
Definition: adataprovider.cpp:253
ADataProvider(std::string path, Config slam_config)
Definition: adataprovider.cpp:7
void loadSensorsConfiguration(const std::string &path)
Definition: adataprovider.cpp:28
void loadCamConfig(YAML::Node cam_node)
Definition: adataprovider.cpp:81
Definition: AFeature2D.h:8
std::vector< std::shared_ptr< ImageSensor > > createImageSensors(const std::vector< cv::Mat > &imgs, const std::vector< cv::Mat > &masks={})
From raw image to sensor objects.
Definition: adataprovider.cpp:177
Config _slam_config
SLAM configuration.
Definition: adataprovider.h:66
std::shared_ptr< Frame > next()
Return the next frame from the queue.
Definition: adataprovider.cpp:14
bool addNextFrame()
Add the frame that comes next in the queue of the data provider.
Definition: adataprovider.cpp:374
std::vector< std::shared_ptr< cam_config > > getCamConfigs()
Definition: adataprovider.h:35
std::vector< std::shared_ptr< cam_config > > _cam_configs
Vector of camera configurations.
Definition: adataprovider.h:63