6#ifndef OPENEV_CONTAINERS_PERSISTENT_QUEUE_HPP
7#define OPENEV_CONTAINERS_PERSISTENT_QUEUE_HPP
12#include <opencv2/core/types.hpp>
15constexpr bool USING_PERSISTENT_QUEUE_HPP =
true;
25 using ResultType = TimeType;
40 for(
int i = 0; i < n; i++) {
50 return {x / n, y / n, t / n, p / n > 0.5};
58 [[nodiscard]]
inline cv::Point_<ResultType>
meanPoint() {
63 for(
int i = 0; i < n; i++) {
71 return {x / n, y / n};
83 for(
int i = 0; i < n; i++) {
92using PersistentQueuei = PersistentQueue_<int>;
93using PersistentQueuel = PersistentQueue_<long>;
94using PersistentQueuef = PersistentQueue_<float>;
95using PersistentQueued = PersistentQueue_<double>;
96using PersistentQueue = PersistentQueuei;
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:77
PolarityType p
Definition types.hpp:80
TimeType t
Definition types.hpp:79
This class extends std::queue to implement persistent event queues. For more information,...
Definition persistent_queue.hpp:23
cv::Point_< ResultType > meanPoint()
Compute the mean x,y point of the events without consuming the queue.
Definition persistent_queue.hpp:58
ResultType meanTime()
Compute the mean time of the events without consuming the queue.
Definition persistent_queue.hpp:79
Event_< ResultType > mean()
Compute the mean of the events without consuming the queue.
Definition persistent_queue.hpp:33
This class extends std::queue to implement event queues. For more information, please refer here.
Definition queue.hpp:23
Persistent queue container for basic event structures.
Basic event-based vision structures based on OpenCV components.