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

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

#include <abstract-representation.hpp>

Public Types

using Type = typename TypeHelper<T>::Type
 

Public Member Functions

std::size_t count () const
 Number of events integrated in the representation.
 
double duration () const
 Time difference between the oldest and the newest event integrated in the representation.
 
double midTime () const
 Calculate the midpoint time between the oldest and the newest event.
 
void clear ()
 Remove all events from the representation.
 
void clear (const cv::Mat &background)
 Remove all events from the representation and add a background image.
 
bool insert (const Event &e)
 Insert one event in the representation.
 
template<std::size_t N>
bool insert (const Array< N > &array)
 Insert an array of events in the representation.
 
bool insert (const Vector &vector)
 Insert a vector of events in the representation.
 
bool insert (Queue &queue, const bool keep_events_in_queue=false)
 Insert a queue of events in the representation.
 
void setTimeOffset (const Event &e)
 Set time offset.
 
void setValue (const bool polarity, const Type &value)
 Set values for ON and OFF pixels.
 
void setValue (const Type &value)
 Set value for non-activated pixels (background).
 
void setValues (const Type &positive, const Type &negative, const Type &reset)
 Set values for ON, OFF, and non-activated pixels.
 
Type getValue (const bool polarity) const
 Get current values for ON and OFF pixels.
 
Type getValue () const
 Get current values for non-activated pixels (background).
 

Detailed Description

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE>
class ev::AbstractRepresentation_< T, Options >

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

Member Typedef Documentation

◆ Type

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
using ev::AbstractRepresentation_< T, Options >::Type = typename TypeHelper<T>::Type

Type

Member Function Documentation

◆ clear() [1/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::clear ( )

Remove all events from the representation.

Note
The way in which the events are removed should be implemented in the derived classes.

◆ clear() [2/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::clear ( const cv::Mat & background)

Remove all events from the representation and add a background image.

Note
The way in which the events are removed should be implemented in the derived classes.

◆ count()

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
std::size_t ev::AbstractRepresentation_< T, Options >::count ( ) const
inlinenodiscard

Number of events integrated in the representation.

Returns
Number of events

◆ duration()

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
double ev::AbstractRepresentation_< T, Options >::duration ( ) const
inlinenodiscard

Time difference between the oldest and the newest event integrated in the representation.

Returns
Time difference. Returns -1 if time limits are not properly set.

◆ getValue() [1/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
Type ev::AbstractRepresentation_< T, Options >::getValue ( ) const
inlinenodiscard

Get current values for non-activated pixels (background).

Returns
Values for non-activated pixels

◆ getValue() [2/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
Type ev::AbstractRepresentation_< T, Options >::getValue ( const bool polarity) const
inlinenodiscard

Get current values for ON and OFF pixels.

Parameters
polarityPositive (ON) or negative (OFF)
Returns
Values for ON/OFF pixels

◆ insert() [1/4]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
template<std::size_t N>
bool ev::AbstractRepresentation_< T, Options >::insert ( const Array< N > & array)

Insert an array of events in the representation.

Parameters
arrayEvent array to insert
Returns
True if all the events have been inserted

◆ insert() [2/4]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
bool ev::AbstractRepresentation_< T, Options >::insert ( const Event & e)

Insert one event in the representation.

Parameters
eEvent to insert
Returns
True if the event has been inserted
Note
The way in which the event is inserted should be implemented in the derived classes.

◆ insert() [3/4]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
bool ev::AbstractRepresentation_< T, Options >::insert ( const Vector & vector)

Insert a vector of events in the representation.

Parameters
vectorEvent vector to insert
Returns
True if all the events have been inserted

◆ insert() [4/4]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
bool ev::AbstractRepresentation_< T, Options >::insert ( Queue & queue,
const bool keep_events_in_queue = false )

Insert a queue of events in the representation.

Parameters
queueEvent queue to insert
keep_events_in_queueIf true, events are reinserted in the queue
Returns
True if all the events have been inserted

◆ midTime()

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
double ev::AbstractRepresentation_< T, Options >::midTime ( ) const
inlinenodiscard

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

Returns
Midpoint time. Returns -1 if time limits are not properly set.

◆ setTimeOffset()

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::setTimeOffset ( const Event & e)
inline

Set time offset.

Parameters
eEvent
Warning
Offset is set to match the event timestamp, i.e., \(\tau + t = 0\) (where \( \tau \) is the offset and \( t \) is the timestamp of the event).

◆ setValue() [1/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::setValue ( const bool polarity,
const Type & value )
inline

Set values for ON and OFF pixels.

Parameters
polarityPositive (ON) or negative (OFF)
valueValue for ON/OFF pixels

◆ setValue() [2/2]

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::setValue ( const Type & value)
inline

Set value for non-activated pixels (background).

Parameters
valueValue for non-activated pixels

◆ setValues()

template<typename T , const RepresentationOptions Options = RepresentationOptions::NONE>
void ev::AbstractRepresentation_< T, Options >::setValues ( const Type & positive,
const Type & negative,
const Type & reset )
inline

Set values for ON, OFF, and non-activated pixels.

Parameters
positiveValue for ON pixels
negativeValue for OFF pixels
resetValue for non-activated pixels

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