OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
frames.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_CORE_FRAMES_HPP
7#define OPENEV_CORE_FRAMES_HPP
8
10#include <opencv2/core/mat.hpp>
11#include <queue>
12#include <string>
13#include <vector>
14
15namespace ev {
16[[maybe_unused]] constexpr bool USING_FRAMES_HPP = true;
17
27class StampedMat : public cv::Mat {
28public:
29 TimeType t{0};
30
31 using cv::Mat::copyTo;
32
37 void copyTo(StampedMat &dst) const {
38 cv::Mat::copyTo(dst);
39 dst.t = t;
40 }
41
45 void release() {
46 cv::Mat::release();
47 t = 0;
48 }
49};
50using StampedMatVector = std::vector<StampedMat>;
51using StampedMatQueue = std::queue<StampedMat>;
52
61struct FrameFile {
62 TimeType t{0};
63 std::string path;
64};
65using FrameFileVector = std::vector<FrameFile>;
66
67} // namespace ev
68
69#endif // OPENEV_CORE_FRAMES_HPP
This class extends cv::Mat to include timestamp.
Definition frames.hpp:27
void copyTo(StampedMat &dst) const
Copy image data and timestamp to another StampedMat.
Definition frames.hpp:37
void release()
Release the image data and reset the timestamp.
Definition frames.hpp:45
This struct is a frame kept as an image file, for the frames that are loaded only when needed.
Definition frames.hpp:61
TimeType t
Definition frames.hpp:62
std::string path
Definition frames.hpp:63
Basic event-based vision structures based on OpenCV components.