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

This is an auxiliary class. This class cannot be instanced. More...

#include <abstract-container.hpp>

Inheritance diagram for ev::AbstractContainer_< Container, T >:
ev::Array_< int, N > ev::Array_< long, N > ev::Array_< float, N > ev::Array_< double, N > ev::CircularBuffer_< int > ev::CircularBuffer_< long > ev::CircularBuffer_< float > ev::CircularBuffer_< double > ev::Deque_< int > ev::Deque_< long > ev::Deque_< float > ev::Deque_< double > ev::Queue_< int > ev::Queue_< long > ev::Queue_< float > ev::Queue_< double > ev::Vector_< int > ev::Vector_< long > ev::Vector_< float > ev::Vector_< double >

Public Types

using ResultType = TimeType

Public Member Functions

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 midTime () const
 Calculate the midpoint time between the oldest and the newest event.
Event_< ResultType > mean () const
 Compute the mean of the events.
cv::Point_< ResultType > meanPoint () const
 Compute the mean x,y point of the events.
ResultType meanTime () const
 Compute the mean time of the events.
ResultType entropy () const
 Compute the Shannon entropy of the spatial distribution of the events.

Detailed Description

template<typename Container, typename T>
class ev::AbstractContainer_< Container, T >

This is an auxiliary class. This class cannot be instanced.

It holds the statistics every event container offers, so that each of them only has to derive from it passing its own type:

template <typename T>
class Vector_ : public std::vector<Event_<T>>, public AbstractContainer_<Vector_<T>, T> { ... };
This is an auxiliary class. This class cannot be instanced.
Definition abstract-container.hpp:31
This class extends std::vector to implement event vectors. For more information, please refer here.
Definition vector.hpp:23

Member Function Documentation

◆ duration()

template<typename Container, typename T>
ResultType ev::AbstractContainer_< Container, T >::duration ( ) const
inlinenodiscard

Time difference between the last and the first event.

Returns
Time difference

◆ entropy()

template<typename Container, typename T>
ResultType ev::AbstractContainer_< Container, T >::entropy ( ) const
inlinenodiscard

Compute the Shannon entropy of the spatial distribution of the events.

Returns
Entropy in bits
Note
\( H = -\sum_i p_i \log_2 p_i \), where \( p_i \) is the fraction of events falling on the i-th pixel, so \( 2^H \) is the effective number of active pixels.

◆ mean()

template<typename Container, typename T>
Event_< ResultType > ev::AbstractContainer_< Container, T >::mean ( ) const
inlinenodiscard

Compute the mean of the events.

Returns
An Eventd object containing the mean values of x, y, t, and p attributes.

◆ meanPoint()

template<typename Container, typename T>
cv::Point_< ResultType > ev::AbstractContainer_< Container, T >::meanPoint ( ) const
inlinenodiscard

Compute the mean x,y point of the events.

Returns
Mean point

◆ meanTime()

template<typename Container, typename T>
ResultType ev::AbstractContainer_< Container, T >::meanTime ( ) const
inlinenodiscard

Compute the mean time of the events.

Returns
Mean time

◆ midTime()

template<typename Container, typename T>
ResultType ev::AbstractContainer_< Container, T >::midTime ( ) const
inlinenodiscard

Calculate the midpoint time between the oldest and the newest event.

Returns
Midpoint time

◆ rate()

template<typename Container, typename T>
ResultType ev::AbstractContainer_< Container, T >::rate ( ) const
inlinenodiscard

Compute event rate as the ratio between the number of events and the time difference between the last and the first event.

Returns
Event rate

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