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 cv {
19class Mat;
20} // namespace cv
21
22namespace ev {
23template <typename T>
24class Event_;
25
60enum class Kernel { NONE,
61 LINEAR,
62 EXPONENTIAL };
63template <typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
64class TimeSurface_ : public EventImage_<T, Options, E> {
65public:
66 template <typename... Args>
67 explicit TimeSurface_(Args &&...args) : EventImage_<T, Options, E>(std::forward<Args>(args)...) {
69 }
70
71 Mat::Time time{this->size()};
72 Mat::Polarity polarity{this->size()};
73
81 cv::Mat &render(const Kernel kernel = Kernel::NONE, const double tau = 0);
82
83private:
84 void clear_() override;
85 void clear_(const cv::Mat &background) override;
86 bool insert_(const Event_<E> &e) override;
87};
115} // namespace ev
116
118#include "openev/representations/time-surface.tpp"
120
121#endif // OPENEV_REPRESENTATIONS_TIME_SURFACE_HPP
Event abstract representation.
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:62
Definition matrices.hpp:84
Definition matrices.hpp:55
Definition time-surface.hpp:64
cv::Mat & render(const Kernel kernel=Kernel::NONE, const double tau=0)
Render timesurface matrix.
Mat::Time time
Definition time-surface.hpp:71
Mat::Polarity polarity
Definition time-surface.hpp:72
Event images.
Basic event-based vision structures based on OpenCV components.
TimeSurface_< cv::Vec4i > TimeSurface4i
Definition time-surface.hpp:103
TimeSurface_< int > TimeSurface1i
Definition time-surface.hpp:100
TimeSurface_< float > TimeSurface1f
Definition time-surface.hpp:104
TimeSurface_< cv::Vec4b > TimeSurface4b
Definition time-surface.hpp:91
TimeSurface_< cv::Vec4s > TimeSurface4s
Definition time-surface.hpp:95
TimeSurface_< cv::Vec4w > TimeSurface4w
Definition time-surface.hpp:99
TimeSurface_< cv::Vec3w > TimeSurface3w
Definition time-surface.hpp:98
TimeSurface_< cv::Vec3f > TimeSurface3f
Definition time-surface.hpp:106
TimeSurface_< cv::Vec2w > TimeSurface2w
Definition time-surface.hpp:97
TimeSurface_< cv::Vec3s > TimeSurface3s
Definition time-surface.hpp:94
TimeSurface1b TimeSurface1
Definition time-surface.hpp:112
TimeSurface_< cv::Vec2d > TimeSurface2d
Definition time-surface.hpp:109
TimeSurface_< ushort > TimeSurface1w
Definition time-surface.hpp:96
TimeSurface_< cv::Vec2f > TimeSurface2f
Definition time-surface.hpp:105
TimeSurface_< cv::Vec3i > TimeSurface3i
Definition time-surface.hpp:102
TimeSurface_< cv::Vec2b > TimeSurface2b
Definition time-surface.hpp:89
TimeSurface3b TimeSurface3
Definition time-surface.hpp:113
TimeSurface_< uchar > TimeSurface1b
Definition time-surface.hpp:88
Kernel
This class extends ev::EventImage_<T> for time surfaces.
Definition time-surface.hpp:60
TimeSurface_< cv::Vec3d > TimeSurface3d
Definition time-surface.hpp:110
TimeSurface_< cv::Vec4f > TimeSurface4f
Definition time-surface.hpp:107
TimeSurface_< double > TimeSurface1d
Definition time-surface.hpp:108
TimeSurface_< cv::Vec3b > TimeSurface3b
Definition time-surface.hpp:90
TimeSurface_< short > TimeSurface1s
Definition time-surface.hpp:92
TimeSurface1 TimeSurface
Definition time-surface.hpp:114
TimeSurface_< cv::Vec2s > TimeSurface2s
Definition time-surface.hpp:93
TimeSurface_< cv::Vec2i > TimeSurface2i
Definition time-surface.hpp:101
TimeSurface_< cv::Vec4d > TimeSurface4d
Definition time-surface.hpp:111
Basic event-based vision structures based on OpenCV components.