10 #ifndef __READER_BASE_HPP 11 #define __READER_BASE_HPP 13 #include <Eigen/Dense> 65 float inverse_scale = 0.0f;
85 bool drop_frames =
false;
96 void readYaml(
const std::string& filename);
193 ReaderStatus getPose(Eigen::Matrix4f& T_WB,
const size_t frame);
202 virtual void restart() = 0;
208 virtual std::string name()
const = 0;
225 size_t frame()
const;
232 size_t numFrames()
const;
238 Eigen::Vector2i depthImageRes()
const;
244 Eigen::Vector2i RGBAImageRes()
const;
250 bool isLiveReader()
const;
260 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
296 ReaderStatus readPose(Eigen::Matrix4f& T_WB,
const size_t frame,
const char delimiter =
' ');
313 size_t ground_truth_frame_;
314 char ground_truth_delimiter_;
315 std::chrono::steady_clock::time_point prev_frame_timestamp_;
Use the se::OpenNIReader.
Definition: reader_base.hpp:46
virtual ~Reader()
Definition: reader_base.hpp:150
size_t num_frames_
Definition: reader_base.hpp:279
Base abstract class for dataset readers.
Definition: reader_base.hpp:139
std::string sequence_path
The path to the dataset.
Definition: reader_base.hpp:54
std::ifstream ground_truth_fs_
Definition: reader_base.hpp:265
std::ostream & operator<<(std::ostream &os, const FieldDataConfig< se::Field::Occupancy > &c)
ReaderStatus
The result of trying to read a depth/RGB image or a pose.
Definition: reader_base.hpp:105
double spf_
Definition: reader_base.hpp:269
Temporary data read error.
bool drop_frames_
Definition: reader_base.hpp:270
Eigen::Vector2i depth_image_res_
Definition: reader_base.hpp:266
std::string sequence_path_
Definition: reader_base.hpp:263
virtual std::string name() const =0
The name of the reader.
Use the se::InteriorNetReader.
std::string reader_type_to_string(ReaderType t)
bool is_live_reader_
Definition: reader_base.hpp:272
Use the se::NewerCollegeReader.
std::string header_to_pretty_str(const std::string &header_name, const int width=default_width)
Convert header name to a standardised string output.
ReaderStatus status_
Definition: reader_base.hpp:273
float fps_
Definition: reader_base.hpp:268
std::string str_to_pretty_str(const std::string &string, const std::string &string_name="", const int width=default_width)
Convert a string name and value to a standardised string output.
int verbose_
Definition: reader_base.hpp:271
size_t numFrames() const
The total number of frames in the current dataset.
ReaderType
Definition: reader_base.hpp:26
std::string ground_truth_file
The path to the ground truth file.
Definition: reader_base.hpp:58
std::string ground_truth_file_
Definition: reader_base.hpp:264
Eigen::Vector2i rgba_image_res_
Definition: reader_base.hpp:267
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17
ReaderType string_to_reader_type(const std::string &s)
size_t frame_
The frame_ is initialized to SIZE_MAX, so that when first incremented it becomes 0.
Definition: reader_base.hpp:278