OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
event-camera-dataset.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_DATASETS_EVENT_CAMERA_DATASET_HPP
7#define OPENEV_DATASETS_EVENT_CAMERA_DATASET_HPP
8
10#include <array>
11#include <opencv2/core/types.hpp>
12#include <string>
13#include <vector>
14
15namespace ev {
16[[maybe_unused]] constexpr bool USING_EVENT_CAMERA_DATASET_HPP = true;
17
24class EventCameraDataset : public AbstractDataset {
25public:
26 static constexpr int WIDTH = 240;
27 static constexpr int HEIGHT = 180;
28 static constexpr double SECONDS_TO_MICROSECONDS = 1e6;
29
33 static constexpr std::array<const char *, 27> SEQUENCES{
34 "shapes_rotation", "shapes_translation", "shapes_6dof",
35 "poster_rotation", "poster_translation", "poster_6dof",
36 "boxes_rotation", "boxes_translation", "boxes_6dof",
37 "hdr_poster", "hdr_boxes",
38 "outdoors_walking", "outdoors_running",
39 "dynamic_rotation", "dynamic_translation", "dynamic_6dof",
40 "calibration",
41 "office_zigzag", "office_spiral",
42 "urban",
43 "slider_close", "slider_far", "slider_hdr_close", "slider_hdr_far", "slider_depth",
44 "simulation_3planes", "simulation_3walls",
45 };
46
47 [[nodiscard]] std::string name() const override;
48 [[nodiscard]] std::string shortname() const override;
49 [[nodiscard]] std::vector<std::string> sequences() const override;
50 [[nodiscard]] std::string url(const std::string &sequence) const override;
51 [[nodiscard]] cv::Size sensorSize(const std::string &sequence) const override;
52 [[nodiscard]] std::string cameraName(const std::string &sequence) const override;
53
54protected:
56 [[nodiscard]] bool isComplete_(const std::string &path) const override;
57 void load_(const std::string &sequence) override;
59};
60
61} // namespace ev
62
63#endif // OPENEV_DATASETS_EVENT_CAMERA_DATASET_HPP
Abstract base class for the datasets of event-based vision.
std::string path(const std::string &sequence) const
Directory of a sequence.
Definition abstract-dataset.cpp:157
const std::string & sequence() const
Name of the sequence that is open.
Definition abstract-dataset.hpp:150
This class extends AbstractDataset to download and open the sequences of the Event-Camera Dataset.
Definition event-camera-dataset.hpp:24
static constexpr std::array< const char *, 27 > SEQUENCES
Sequences published by the dataset.
Definition event-camera-dataset.hpp:33
std::string name() const override
Name of the dataset.
Definition event-camera-dataset.cpp:15
std::vector< std::string > sequences() const override
Sequences published by the dataset.
Definition event-camera-dataset.cpp:23
static constexpr int WIDTH
Definition event-camera-dataset.hpp:26
std::string url(const std::string &sequence) const override
Address of the zip file of a sequence.
Definition event-camera-dataset.cpp:27
static constexpr int HEIGHT
Definition event-camera-dataset.hpp:27
std::string cameraName(const std::string &sequence) const override
Name of the camera that recorded a sequence.
Definition event-camera-dataset.cpp:35
std::string shortname() const override
Short name of the dataset, also used as directory name.
Definition event-camera-dataset.cpp:19
cv::Size sensorSize(const std::string &sequence) const override
Sensor size of the camera that recorded a sequence.
Definition event-camera-dataset.cpp:31