6#ifndef OPENEV_REPRESENTATIONS_POINT_CLOUD_HPP
7#define OPENEV_REPRESENTATIONS_POINT_CLOUD_HPP
13#include <opencv2/core/hal/interface.h>
14#include <opencv2/core/matx.hpp>
15#include <opencv2/core/types.hpp>
19#include <opencv2/viz/viz3d.hpp>
45template <
typename T, const RepresentationOptions Options = RepresentationOptions::NONE,
typename E =
int>
53 return std::find(points_[e.
p].begin(), points_[e.
p].end(), cv::Point3f(e.x, e.y, e.
t)) != points_[e.
p].end();
64 void visualize(
const int t,
const double time_scale = 1.0,
const double axis_size = 1.0,
const double point_size = 2.0);
68 std::array<std::vector<cv::Point3_<typename TypeHelper<T>::FloatingPointType>>, 2> points_;
70 cv::viz::Viz3d window_{
"OpenEV"};
73 void clear_()
override;
74 void clear_(
const cv::Mat &background)
override;
75 bool insert_(
const Event_<E> &e)
override;
95#include "openev/representations/point-cloud.tpp"
Event abstract representation.
This is an auxiliary class. This class cannot be instanced.
Definition abstract-representation.hpp:119
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:60
bool p
Definition types.hpp:63
double t
Definition types.hpp:62
This class is used to represent events as point clouds.
Definition point-cloud.hpp:46
bool contains(const Event_< E > &e) const
Check if an event is included in the point cloud.
Definition point-cloud.hpp:52
OpenEV compilation options.
PointCloud_< cv::Vec3s > PointCloud3s
Definition point-cloud.hpp:80
PointCloud_< float > PointCloud1f
Definition point-cloud.hpp:85
PointCloud1b PointCloud1
Definition point-cloud.hpp:89
PointCloud_< short > PointCloud1s
Definition point-cloud.hpp:79
PointCloud_< double > PointCloud1d
Definition point-cloud.hpp:87
PointCloud_< cv::Vec3b > PointCloud3b
Definition point-cloud.hpp:78
PointCloud3b PointCloud3
Definition point-cloud.hpp:90
PointCloud_< cv::Vec3f > PointCloud3f
Definition point-cloud.hpp:86
PointCloud1 PointCloud
Definition point-cloud.hpp:91
PointCloud_< cv::Vec3w > PointCloud3w
Definition point-cloud.hpp:82
PointCloud_< cv::Vec3d > PointCloud3d
Definition point-cloud.hpp:88
PointCloud_< int > PointCloud1i
Definition point-cloud.hpp:83
PointCloud_< uchar > PointCloud1b
Definition point-cloud.hpp:77
PointCloud_< cv::Vec3i > PointCloud3i
Definition point-cloud.hpp:84
PointCloud_< ushort > PointCloud1w
Definition point-cloud.hpp:81
Basic event-based vision structures based on OpenCV components.