OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
time-surface.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_REPRESENTATIONS_TIME_SURFACE_HPP
7#define OPENEV_REPRESENTATIONS_TIME_SURFACE_HPP
8
10#include "openev/core/types.hpp"
13#include <opencv2/core/hal/interface.h>
14#include <opencv2/core/mat.hpp>
15#include <opencv2/core/matx.hpp>
16#include <utility>
17
18namespace ev {
53enum class Kernel { NONE,
54 LINEAR,
55 EXPONENTIAL };
56template <typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
57class TimeSurface_ : public EventImage_<T, Options, E> {
58public:
59 template <typename... Args>
60 explicit TimeSurface_(Args &&...args) : EventImage_<T, Options, E>(std::forward<Args>(args)...) {
62 }
63
64 TimeMat time{this->size()};
65 PolarityMat polarity{this->size()};
74 cv::Mat &render(const Kernel kernel = Kernel::NONE, const double tau = 0);
75
76private:
77 void clear_() override;
78 void clear_(const cv::Mat &background) override;
79 bool insert_(const Event_<E> &e) override;
80};
108} // namespace ev
109
111#include "openev/representations/time-surface.tpp"
114#endif // OPENEV_REPRESENTATIONS_TIME_SURFACE_HPP
Event abstract representation.
This class extends cv::Mat_<T> for event images. For more information, please refer here.
Definition event-image.hpp:52
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:60
Definition matrices.hpp:42
Definition matrices.hpp:12
Definition time-surface.hpp:57
cv::Mat & render(const Kernel kernel=Kernel::NONE, const double tau=0)
Render timesurface matrix.
TimeMat time
Definition time-surface.hpp:64
PolarityMat polarity
Definition time-surface.hpp:65
Event images.
Basic event-based vision structures based on OpenCV components.
Kernel
This class extends ev::EventImage_<T> for time surfaces.
Definition time-surface.hpp:53
Basic event-based vision structures based on OpenCV components.