|
|
| AbstractDataset (const AbstractDataset &)=delete |
|
| AbstractDataset (AbstractDataset &&) noexcept=default |
|
AbstractDataset & | operator= (const AbstractDataset &)=delete |
|
AbstractDataset & | operator= (AbstractDataset &&) noexcept=default |
| virtual std::string | name () const =0 |
| | Name of the dataset.
|
| virtual std::string | shortname () const =0 |
| | Short name of the dataset, also used as directory name.
|
| virtual std::vector< std::string > | sequences () const =0 |
| | Sequences published by the dataset.
|
| virtual std::string | url (const std::string &sequence) const =0 |
| | Address of the zip file of a sequence.
|
| virtual cv::Size | sensorSize (const std::string &sequence) const =0 |
| | Sensor size of the camera that recorded a sequence.
|
| virtual std::string | cameraName (const std::string &sequence) const =0 |
| | Name of the camera that recorded a sequence.
|
| void | setDirectory (const std::string &directory) |
| | Set the directory where the sequences of this dataset are kept.
|
| std::string | directory () const |
| | Directory where the sequences of this dataset are kept.
|
| std::string | path (const std::string &sequence) const |
| | Directory of a sequence.
|
| bool | isAvailable (const std::string &sequence) const |
| | Check if a sequence has been downloaded.
|
| bool | download (const std::string &sequence, const Progress &progress=nullptr) |
| | Download a sequence and extract it in path(). Nothing is done if the sequence is already available.
|
| bool | open (const std::string &sequence, const Progress &progress=nullptr) |
| | Open a sequence, downloading it first if it is not available.
|
|
void | close () |
| | Close the sequence.
|
| bool | isOpen () const |
| | Check if a sequence is open.
|
| const std::string & | sequence () const |
| | Name of the sequence that is open.
|
| ConcurrentQueue & | events (const std::size_t n=0) |
| | Read a given number of events, add them to the queue, and return it, see AbstractReader_::events().
|
| void | prefetch (const std::size_t n) |
| | Keep the queue at a given number of events from a background thread, see AbstractReader_::prefetch().
|
| std::size_t | prefetchCapacity () const |
| | Number of events prefetch() keeps in the queue, see AbstractReader_::prefetchCapacity().
|
| void | setRoi (const cv::Rect &roi) |
| | Deliver only the events inside a region of interest, as the cameras of the devices module do. The events keep their coordinates.
|
| cv::Rect | getRoi () const |
| | Get the region of interest.
|
|
void | reset () |
| | Go back to the beginning of the sequence, see AbstractReader_::reset().
|
| const FrameFileVector & | frames () const |
| | Frames of the sequence, empty if it has none.
|
| const ImuVector & | imu () const |
| | Inertial measurements of the sequence, empty if it has none.
|
| const std::string & | error () const |
| | Reason why the last download() failed.
|
This is an auxiliary class. This class cannot be instanced.
A dataset knows which sequences it publishes, where each one is downloaded from, and where they are kept in this machine.
- Note
- Events are read on demand: events(n) reads n events from the sequence, adds them to a queue and returns it. With prefetch(n), a background thread keeps n events in the queue instead.
-
Frames are listed by frames() as image files with their timestamps, sorted by time.
-
Inertial measurements are all loaded when the sequence is opened, and listed by imu() sorted by time.