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

This class keeps the ingredients of the statistics of Stats_ up to date without storing the events. More...

#include <stats_container.hpp>

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

Public Types

using value_type = Event_<T>
Public Types inherited from ev::Stats_< StatsContainer_< T > >
using ResultType

Public Member Functions

void push (const Event_< T > &e)
 Account for an event.
std::size_t size () const
 Number of events accounted for.
bool empty () const
 Check whether no event was accounted for.
TimeType firstTimestamp () const
TimeType lastTimestamp () const
cv::Point2d sum () const
double sumT () const
double sumP () const
cv::Vec3d squares () const
cv::Rect bounds () const
std::size_t activeCount () const
std::size_t peakCount () const
double sumCLogC () const
void clear ()
 Forget every event. The per-pixel count keeps its extent, so accounting for a similar stream again does not grow it.
Public Member Functions inherited from ev::Stats_< StatsContainer_< 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.

Detailed Description

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

This class keeps the ingredients of the statistics of Stats_ up to date without storing the events.

Analogously to OpenCV library, the following aliases are defined for convenience:

This class keeps the ingredients of the statistics of Stats_ up to date without storing the events.
Definition stats_container.hpp:56
StatsContainer_< long > StatsContainerl
Definition stats_container.hpp:184
StatsContainer_< double > StatsContainerd
Definition stats_container.hpp:186
StatsContaineri StatsContainer
Definition stats_container.hpp:187
StatsContainer_< float > StatsContainerf
Definition stats_container.hpp:185
StatsContainer_< int > StatsContaineri
Definition stats_container.hpp:183

Member Function Documentation

◆ activeCount()

template<typename T>
std::size_t ev::StatsContainer_< T >::activeCount ( ) const
inlinenodiscard

Number of pixels with events

◆ bounds()

template<typename T>
cv::Rect ev::StatsContainer_< T >::bounds ( ) const
inlinenodiscard

Smallest rectangle of pixels holding the events

◆ empty()

template<typename T>
bool ev::StatsContainer_< T >::empty ( ) const
inlinenodiscard

Check whether no event was accounted for.

Returns
True if empty

◆ firstTimestamp()

template<typename T>
TimeType ev::StatsContainer_< T >::firstTimestamp ( ) const
inlinenodiscard

Timestamp of the first event

◆ lastTimestamp()

template<typename T>
TimeType ev::StatsContainer_< T >::lastTimestamp ( ) const
inlinenodiscard

Timestamp of the last event

◆ peakCount()

template<typename T>
std::size_t ev::StatsContainer_< T >::peakCount ( ) const
inlinenodiscard

Largest number of events on a pixel

◆ push()

template<typename T>
void ev::StatsContainer_< T >::push ( const Event_< T > & e)
inline

Account for an event.

Parameters
eEvent

◆ size()

template<typename T>
std::size_t ev::StatsContainer_< T >::size ( ) const
inlinenodiscard

Number of events accounted for.

Returns
Event count

◆ squares()

template<typename T>
cv::Vec3d ev::StatsContainer_< T >::squares ( ) const
inlinenodiscard

Sums of x^2, y^2 and x*y

◆ sum()

template<typename T>
cv::Point2d ev::StatsContainer_< T >::sum ( ) const
inlinenodiscard

Sum of x and y

◆ sumCLogC()

template<typename T>
double ev::StatsContainer_< T >::sumCLogC ( ) const
inlinenodiscard

Sum of c*log2(c) over the pixel counts c

◆ sumP()

template<typename T>
double ev::StatsContainer_< T >::sumP ( ) const
inlinenodiscard

Sum of p

◆ sumT()

template<typename T>
double ev::StatsContainer_< T >::sumT ( ) const
inlinenodiscard

Sum of t


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