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

This class is used to represent events as point clouds. More...

#include <point-cloud.hpp>

Inheritance diagram for ev::PointCloud_< T, Options, E >:
ev::AbstractRepresentation_< T, RepresentationOptions::NONE, int > ev::Stats_< AbstractRepresentation_< T, Options, int > >

Public Member Functions

bool contains (const Event_< E > &e) const
 Check if an event is included in the point cloud.
void visualize (const int t, const double time_scale=1.0, const double axis_size=1.0, const double point_size=2.0)
 Visualize point cloud.
Public Member Functions inherited from ev::AbstractRepresentation_< T, RepresentationOptions::NONE, int >
std::size_t count () const
 Number of events integrated in the representation.
TimeType firstTimestamp () const
 Timestamp of the oldest event integrated in the representation.
TimeType lastTimestamp () const
 Timestamp of the newest event integrated in the representation.
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 Member Functions inherited from ev::Stats_< AbstractRepresentation_< T, Options, int > >
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.

Additional Inherited Members

Public Types inherited from ev::AbstractRepresentation_< T, RepresentationOptions::NONE, int >
using Type
Public Types inherited from ev::Stats_< AbstractRepresentation_< T, Options, int > >
using ResultType

Detailed Description

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

This class is used to represent events as point clouds.

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

This class is used to represent events as point clouds.
Definition point-cloud.hpp:54
PointCloud_< cv::Vec3s > PointCloud3s
Definition point-cloud.hpp:88
PointCloud_< float > PointCloud1f
Definition point-cloud.hpp:93
PointCloud1b PointCloud1
Definition point-cloud.hpp:97
PointCloud_< short > PointCloud1s
Definition point-cloud.hpp:87
PointCloud_< double > PointCloud1d
Definition point-cloud.hpp:95
PointCloud_< cv::Vec3b > PointCloud3b
Definition point-cloud.hpp:86
PointCloud3b PointCloud3
Definition point-cloud.hpp:98
PointCloud_< cv::Vec3f > PointCloud3f
Definition point-cloud.hpp:94
PointCloud1 PointCloud
Definition point-cloud.hpp:99
PointCloud_< cv::Vec3w > PointCloud3w
Definition point-cloud.hpp:90
PointCloud_< cv::Vec3d > PointCloud3d
Definition point-cloud.hpp:96
PointCloud_< int > PointCloud1i
Definition point-cloud.hpp:91
PointCloud_< uchar > PointCloud1b
Definition point-cloud.hpp:85
PointCloud_< cv::Vec3i > PointCloud3i
Definition point-cloud.hpp:92
PointCloud_< ushort > PointCloud1w
Definition point-cloud.hpp:89

Member Function Documentation

◆ contains()

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
bool ev::PointCloud_< T, Options, E >::contains ( const Event_< E > & e) const
inlinenodiscard

Check if an event is included in the point cloud.

Parameters
eEvent to check

◆ visualize()

template<typename T, const RepresentationOptions Options = RepresentationOptions::NONE, typename E = int>
void ev::PointCloud_< T, Options, E >::visualize ( const int t,
const double time_scale = 1.0,
const double axis_size = 1.0,
const double point_size = 2.0 )

Visualize point cloud.

Parameters
tAmount of time in milliseconds for the event loop to keep running. Zero means "forever"
time_scaleEvents will be represented as (x, y, time_scale * t).
axis_sizeSize of the 3D axis in the representation
point_sizeSize of each point representing an event

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