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

Spatial map encoding event polarity at each pixel. More...

#include <matrices.hpp>

Inheritance diagram for ev::Mat::Ternary_< Tb >:
ev::Mat::Mat_< Tb >

Public Member Functions

template<typename T>
Tb insert (const Event_< T > &e)
 Insert an event, writing POSITIVE or NEGATIVE at (e.x, e.y) based on e.p.
template<typename T>
Tb emplace (const T x, const T y, const bool p)
 Write polarity p at (x, y) without constructing an Event_.
Public Member Functions inherited from ev::Mat::Mat_< Tb >
void updateStats (const Event &e)
 Account for an event in the statistics reported by count() and duration().
CounterType count () const
 Number of events accounted for by updateStats() since the last resetStats().
TimeType duration () const
 Time elapsed between the first and the last event accounted for by updateStats().
void resetStats ()
 Reset statistics (count, first timestamp, last timestamp).
void clear ()
 Reset all pixels.

Static Public Attributes

static constexpr Tb POSITIVE = std::numeric_limits<Tb>::max()
static constexpr Tb ZERO = static_cast<Tb>(0)
static constexpr Tb NEGATIVE = std::numeric_limits<Tb>::min()

Friends

std::ostream & operator<< (std::ostream &os, const Ternary_ &ternary)

Detailed Description

template<typename Tb>
class ev::Mat::Ternary_< Tb >

Spatial map encoding event polarity at each pixel.

Positive-polarity events set the pixel to POSITIVE; negative-polarity events set it to NEGATIVE. Pixels with no events remain at ZERO. Only the last inserted polarity per pixel is retained.

The following alias is defined for convenience:

using Ternary = Ternary_<signed char>;
Spatial map encoding event polarity at each pixel.
Definition matrices.hpp:169

Member Function Documentation

◆ emplace()

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

Write polarity p at (x, y) without constructing an Event_.

Parameters
xSpatial coordinate x
ySpatial coordinate y
pPolarity (true → POSITIVE, false → NEGATIVE)
Returns
New pixel value

◆ insert()

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

Insert an event, writing POSITIVE or NEGATIVE at (e.x, e.y) based on e.p.

Parameters
eEvent to insert
Returns
New pixel value

Member Data Documentation

◆ NEGATIVE

template<typename Tb>
Tb ev::Mat::Ternary_< Tb >::NEGATIVE = std::numeric_limits<Tb>::min()
staticconstexpr

Value for negative-polarity events

◆ POSITIVE

template<typename Tb>
Tb ev::Mat::Ternary_< Tb >::POSITIVE = std::numeric_limits<Tb>::max()
staticconstexpr

Value for positive-polarity events

◆ ZERO

template<typename Tb>
Tb ev::Mat::Ternary_< Tb >::ZERO = static_cast<Tb>(0)
staticconstexpr

Value after clear()


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