6#ifndef OPENEV_CONTAINERS_CIRCULAR_HPP
7#define OPENEV_CONTAINERS_CIRCULAR_HPP
10#include <boost/circular_buffer.hpp>
11#include <opencv2/core/types.hpp>
22 using boost::circular_buffer<
Event_<T>>::circular_buffer;
26 template <
typename... Args>
27 inline void emplace_back(Args &&...args) {
28 boost::circular_buffer<Event_<T>>::push_back(
Event_<T>(std::forward<Args>(args)...));
31 template <
typename... Args>
32 inline void emplace_front(Args &&...args) {
33 boost::circular_buffer<Event_<T>>::push_front(
Event_<T>(std::forward<Args>(args)...));
47 [[nodiscard]]
inline double rate()
const;
71 [[nodiscard]]
inline double midTime()
const;
CircularBufferi CircularBuffer
Definition circular.hpp:77
CircularBuffer_< float > CircularBufferf
Definition circular.hpp:75
CircularBuffer_< long > CircularBufferl
Definition circular.hpp:74
CircularBuffer_< int > CircularBufferi
Definition circular.hpp:73
CircularBuffer_< double > CircularBufferd
Definition circular.hpp:76
This class extends boost::circular_buffer to implement event circular buffers. For more information,...
Definition circular.hpp:21
double rate() const
Compute event rate as the ratio between the number of events and the time difference between the last...
Definition circular.cpp:16
double midTime() const
Calculate the midpoint time between the oldest and the newest event.
Definition circular.cpp:42
double duration() const
Time difference between the last and the first event.
Definition circular.cpp:11
cv::Point2d meanPoint() const
Compute the mean x,y point of the events.
Definition circular.cpp:30
Eventd mean() const
Compute the mean of the events.
Definition circular.cpp:21
double meanTime() const
Compute the mean time of the events.
Definition circular.cpp:37
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:55
Basic event-based vision structures based on OpenCV components.
Event_< double > Eventd
Definition types.hpp:207