OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::CircularBuffer_< T > Class Template Reference

This class extends boost::circular_buffer to implement event circular buffers. For more information, please refer here. More...

#include <circular.hpp>

Inheritance diagram for ev::CircularBuffer_< T >:
ev::Stats_< CircularBuffer_< T > >

Public Member Functions

template<typename... Args>
void emplace_back (Args &&...args)
 Construct an Event_<T> in-place at the back of the buffer.
template<typename... Args>
void emplace_front (Args &&...args)
 Construct an Event_<T> in-place at the front of the buffer.
Public Member Functions inherited from ev::Stats_< CircularBuffer_< T > >
ResultType duration () const
 Time difference between the last and the first event.
ResultType rate () const
 Compute event rate as the ratio between the number of events and the time difference between the last and the first event.
ResultType density (const cv::Size size) const
 Compute event density as the ratio between the number of events and the number of pixels.
std::size_t activePixels () const
 Count the pixels with at least one event.
ResultType fillRatio (const cv::Size size) const
 Compute fill ratio as the fraction of pixels with at least one event.
ResultType polarityRatio (const PolarityType p) const
 Compute polarity ratio as the fraction of events with the given polarity.
Event_< ResultType > mean () const
 Compute the mean of the events.
cv::Point_< ResultType > meanPoint () const
 Compute the mean x,y point of the events.
cv::Matx< ResultType, 2, 2 > covariance () const
 Compute the covariance of the x,y coordinates of the events around meanPoint().
cv::Rect boundingBox () const
 Compute the smallest rectangle of pixels containing the events.
ResultType meanTime () const
 Compute the mean time of the events.
ResultType midTime () const
 Calculate the midpoint time between the oldest and the newest event.
std::size_t peak () const
 Find the largest number of events on a single pixel.
ResultType entropy () const
 Compute the Shannon entropy of the spatial distribution of the events.

Additional Inherited Members

Public Types inherited from ev::Stats_< CircularBuffer_< T > >
using ResultType

Detailed Description

template<typename T>
class ev::CircularBuffer_< T >

This class extends boost::circular_buffer to implement event circular buffers. For more information, please refer here.

Event circular buffers inherit all the properties from boost circular buffers. Circular buffers are fixed-size data structures in a circular fashion (i.e, the end of the buffer is reached, it wraps around to the beginning).

Member Function Documentation

◆ emplace_back()

template<typename T>
template<typename... Args>
void ev::CircularBuffer_< T >::emplace_back ( Args &&... args)
inline

Construct an Event_<T> in-place at the back of the buffer.

Arguments are forwarded to the Event_<T> constructor. If the buffer is full, the oldest element at the front is overwritten.

◆ emplace_front()

template<typename T>
template<typename... Args>
void ev::CircularBuffer_< T >::emplace_front ( Args &&... args)
inline

Construct an Event_<T> in-place at the front of the buffer.

Arguments are forwarded to the Event_<T> constructor. If the buffer is full, the oldest element at the back is overwritten.


The documentation for this class was generated from the following file: