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

This class extends ev::EventImage_<T> for event 2D histograms. More...

#include <event-histogram.hpp>

Inheritance diagram for ev::EventHistogram_< T, Options, E >:
ev::EventImage_< T, RepresentationOptions::NONE, int > ev::AbstractRepresentation_< T, Options, int >

Public Member Functions

template<typename... Args>
 EventHistogram_ (Args &&...args)
cv::Mat & render ()
 Render event histogram matrix.
void setOutlierRejection (const double k)
 Saturate the pixels whose count is abnormally high when rendering.
Public Member Functions inherited from ev::EventImage_< T, RepresentationOptions::NONE, int >
 EventImage_ (Args &&...args)
cv::Mat & render ()
Public Member Functions inherited from ev::AbstractRepresentation_< T, Options, int >
std::size_t count () const
 Number of events integrated in the representation.
TimeType duration () const
 Time difference between the oldest and the newest event integrated in the representation.
TimeType midTime () const
 Calculate the midpoint time between the oldest and the newest event.
void clear ()
 Remove all events from the representation.
bool insert (const Event_< int > &e)
 Insert one event in the representation.
void setTimeOffset (const Event_< int > &e)
 Set time offset.
void setValue (const bool polarity, const Type &value)
 Set values for ON and OFF pixels.
void setValues (const Type &positive, const Type &negative, const Type &reset)
 Set values for ON, OFF, and non-activated pixels.
void setColor (const bool polarity, const cv::viz::Color &color)
 Set colors for ON and OFF pixels. For more information, please refer here.
void setColors (const cv::viz::Color &positive, const cv::viz::Color &negative, const cv::viz::Color &reset)
 Set colors for ON, OFF, and non-activated pixels. For more information, please refer here.
void setColormap (const cv::ColormapTypes cm)
 Set colormap for the representation.

Public Attributes

Mat::Counter counter {cv::Mat_<int>(EventImage_<T, Options, E>::size())}

Additional Inherited Members

Public Types inherited from ev::AbstractRepresentation_< T, Options, int >
using Type

Detailed Description

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
class ev::EventHistogram_< T, Options, E >

This class extends ev::EventImage_<T> for event 2D histograms.

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

using EventHistogram1b = EventHistogram_<uchar>;
using EventHistogram3b = EventHistogram_<cv::Vec3b>;
using EventHistogram1s = EventHistogram_<short>;
using EventHistogram3s = EventHistogram_<cv::Vec3s>;
using EventHistogram1w = EventHistogram_<ushort>;
using EventHistogram3w = EventHistogram_<cv::Vec3w>;
using EventHistogram1i = EventHistogram_<int>;
using EventHistogram3i = EventHistogram_<cv::Vec3i>;
using EventHistogram1f = EventHistogram_<float>;
using EventHistogram3f = EventHistogram_<cv::Vec3f>;
using EventHistogram1d = EventHistogram_<double>;
using EventHistogram3d = EventHistogram_<cv::Vec3d>;
EventHistogram1 EventHistogram
Definition event-histogram.hpp:91
EventHistogram_< uchar > EventHistogram1b
Definition event-histogram.hpp:77
EventHistogram1b EventHistogram1
Definition event-histogram.hpp:89
EventHistogram_< cv::Vec3f > EventHistogram3f
Definition event-histogram.hpp:86
EventHistogram_< cv::Vec3b > EventHistogram3b
Definition event-histogram.hpp:78
EventHistogram_< cv::Vec3d > EventHistogram3d
Definition event-histogram.hpp:88
EventHistogram_< float > EventHistogram1f
Definition event-histogram.hpp:85
EventHistogram_< ushort > EventHistogram1w
Definition event-histogram.hpp:81
EventHistogram_< cv::Vec3i > EventHistogram3i
Definition event-histogram.hpp:84
EventHistogram3b EventHistogram3
Definition event-histogram.hpp:90
EventHistogram_< cv::Vec3w > EventHistogram3w
Definition event-histogram.hpp:82
EventHistogram_< double > EventHistogram1d
Definition event-histogram.hpp:87
EventHistogram_< cv::Vec3s > EventHistogram3s
Definition event-histogram.hpp:80
EventHistogram_< int > EventHistogram1i
Definition event-histogram.hpp:83
EventHistogram_< short > EventHistogram1s
Definition event-histogram.hpp:79

Member Function Documentation

◆ render()

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
cv::Mat & ev::EventHistogram_< T, Options, E >::render ( )

Render event histogram matrix.

Event histogram matrix is generated from counter matrix.

◆ setOutlierRejection()

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
void ev::EventHistogram_< T, Options, E >::setOutlierRejection ( const double k)
inline

Saturate the pixels whose count is abnormally high when rendering.

Parameters
kMedian absolute deviations above the median at which a pixel is considered an outlier.
Note
A pixel with count \( C_{i,j} \) saturates when \( |C_{i,j}| > \mathrm{median}(C) + 1.4826 \, k \, \mathrm{MAD}(C) \).

Member Data Documentation

◆ counter

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
Mat::Counter ev::EventHistogram_< T, Options, E >::counter {cv::Mat_<int>(EventImage_<T, Options, E>::size())}

Event counter


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