OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::Mat::Counter Class Reference

Spatial map accumulating signed event counts per pixel. More...

#include <matrices.hpp>

Inheritance diagram for ev::Mat::Counter:
ev::Mat::Mat_< CounterType >

Public Member Functions

template<typename T>
CounterType insert (const Event_< T > &e)
 Insert an event, incrementing (p=true) or decrementing (p=false) the counter at (e.x, e.y).
template<typename T>
CounterType emplace (const T x, const T y, const bool p)
 Increment or decrement the counter at (x, y) without constructing an Event_.
Public Member Functions inherited from ev::Mat::Mat_< CounterType >
void updateStats (const Event &e)
CounterType count () const
TimeType duration () const
void resetStats ()
 Reset statistics (count, first timestamp, last timestamp).
void clear ()
 Reset all pixels.

Friends

std::ostream & operator<< (std::ostream &os, const Counter &counter)

Detailed Description

Spatial map accumulating signed event counts per pixel.

Each positive-polarity event increments the pixel counter by +1; each negative-polarity event decrements it by -1. Counters are stored as CounterType (int16_t by default).

Member Function Documentation

◆ emplace()

template<typename T>
CounterType ev::Mat::Counter::emplace ( const T x,
const T y,
const bool p )
inline

Increment or decrement the counter at (x, y) without constructing an Event_.

Parameters
xSpatial coordinate x
ySpatial coordinate y
ptrue to increment (+1), false to decrement (-1)
Returns
Updated counter value

◆ insert()

template<typename T>
CounterType ev::Mat::Counter::insert ( const Event_< T > & e)
inline

Insert an event, incrementing (p=true) or decrementing (p=false) the counter at (e.x, e.y).

Parameters
eEvent to insert
Returns
Updated counter value

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