OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
event-histogram.hpp
Go to the documentation of this file.
1
6#ifndef OPENEV_REPRESENTATIONS_EVENT_HISTOGRAM_HPP
7#define OPENEV_REPRESENTATIONS_EVENT_HISTOGRAM_HPP
8
12#include <opencv2/core.hpp>
13#include <opencv2/core/hal/interface.h>
14#include <opencv2/core/mat.hpp>
15#include <opencv2/core/matx.hpp>
16#include <opencv2/core/utility.hpp>
17#include <utility>
18
19namespace ev {
54template <typename T, const RepresentationOptions Options = RepresentationOptions::NONE>
55class EventHistogram_ : public EventImage_<T, Options> {
56public:
57 template <typename... Args>
58 explicit EventHistogram_(Args &&...args) : EventImage_<T, Options>(std::forward<Args>(args)...) {
60 }
61
62 cv::Mat_<int> counter{cv::Mat_<int>(EventImage_<T, Options>::size())};
68 cv::Mat &render();
69
70private:
71 void clear_() override;
72 void clear_(const cv::Mat &background) override;
73 bool insert_(const Event &e) override;
74 int peak_{0};
75};
103} // namespace ev
104
106#include "openev/representations/event-histogram.tpp"
109#endif // OPENEV_REPRESENTATIONS_EVENT_HISTOGRAM_HPP
Event abstract representation.
This class extends ev::EventImage_<T> for event 2D histograms.
Definition event-histogram.hpp:55
cv::Mat_< int > counter
Definition event-histogram.hpp:62
cv::Mat & render()
Render event histogram matrix.
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
Event images.
Basic event-based vision structures based on OpenCV components.