CARLA
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | List of all members
carla::sensor::data::DVSEventArray Class Reference

An array of DVS Events in an image structure HxW. More...

#include <DVSEventArray.h>

+ Inheritance diagram for carla::sensor::data::DVSEventArray:
+ Collaboration diagram for carla::sensor::data::DVSEventArray:

Public Types

using event_type = DVSEvent
 
- Public Types inherited from carla::sensor::data::Array< DVSEvent >
using const_iterator = typename std::add_const< value_type >::type *
 
using const_pointer = typename std::add_const< value_type >::type *
 
using const_reference = typename std::add_const< value_type >::type &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using iterator = value_type *
 
using pointer = value_type *
 
using reference = value_type &
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = size_t
 
using value_type = DVSEvent
 

Public Member Functions

auto GetFOVAngle () const
 Get horizontal field of view of the image in degrees. More...
 
auto GetHeight () const
 Get image height in pixels. More...
 
auto GetWidth () const
 Get image width in pixels. More...
 
std::vector< std::vector< std::int64_t > > ToArray () const
 Get the array of events in pure vector format. More...
 
std::vector< short > ToArrayPol () const
 Get all events' polarity for convenience. More...
 
std::vector< std::int64_t > ToArrayT () const
 Get all events' timestamp for convenience. More...
 
std::vector< std::uint16_t > ToArrayX () const
 Get all events' x coordinate for convenience. More...
 
std::vector< std::uint16_t > ToArrayY () const
 Get all events' y coordinate for convenience. More...
 
std::vector< ColorToImage () const
 Get an event "frame" image for visualization. More...
 
- Public Member Functions inherited from carla::sensor::data::Array< DVSEvent >
reference at (size_type pos)
 
const_reference at (size_type pos) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
value_typedata ()
 
const value_typedata () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (size_type pos)
 
const_reference operator[] (size_type pos) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size () const
 
- Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
double GetTimestamp () const
 Simulation-time when the data was generated. More...
 
virtual ~SensorData ()=default
 

Protected Types

using Serializer = s11n::DVSEventArraySerializer
 

Protected Member Functions

 DVSEventArray (RawData &&data)
 
- Protected Member Functions inherited from carla::sensor::data::Array< DVSEvent >
 Array (RawData &&data, FuncT get_offset)
 
 Array (size_t offset, RawData &&data)
 
const RawDataGetRawData () const
 
- Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)
 
 SensorData (const RawData &data)
 

Protected Attributes

friend Serializer
 

Private Types

using Super = Array< DVSEvent >
 

Private Member Functions

const auto & GetHeader () const
 

Detailed Description

An array of DVS Events in an image structure HxW.

Definition at line 20 of file DVSEventArray.h.

Member Typedef Documentation

◆ event_type

Definition at line 39 of file DVSEventArray.h.

◆ Serializer

Definition at line 24 of file DVSEventArray.h.

◆ Super

Definition at line 21 of file DVSEventArray.h.

Constructor & Destructor Documentation

◆ DVSEventArray()

carla::sensor::data::DVSEventArray::DVSEventArray ( RawData &&  data)
inlineexplicitprotected

Definition at line 28 of file DVSEventArray.h.

Member Function Documentation

◆ GetFOVAngle()

auto carla::sensor::data::DVSEventArray::GetFOVAngle ( ) const
inline

Get horizontal field of view of the image in degrees.

Definition at line 52 of file DVSEventArray.h.

References GetHeader().

+ Here is the call graph for this function:

◆ GetHeader()

const auto& carla::sensor::data::DVSEventArray::GetHeader ( ) const
inlineprivate

Definition at line 34 of file DVSEventArray.h.

References carla::sensor::s11n::DVSEventArraySerializer::DeserializeHeader(), and carla::sensor::data::Array< DVSEvent >::GetRawData().

Referenced by GetFOVAngle(), GetHeight(), and GetWidth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeight()

auto carla::sensor::data::DVSEventArray::GetHeight ( ) const
inline

Get image height in pixels.

Definition at line 47 of file DVSEventArray.h.

References GetHeader().

Referenced by ToImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWidth()

auto carla::sensor::data::DVSEventArray::GetWidth ( ) const
inline

Get image width in pixels.

Definition at line 42 of file DVSEventArray.h.

References GetHeader().

Referenced by ToImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToArray()

std::vector<std::vector<std::int64_t> > carla::sensor::data::DVSEventArray::ToArray ( ) const
inline

Get the array of events in pure vector format.

Definition at line 73 of file DVSEventArray.h.

◆ ToArrayPol()

std::vector<short> carla::sensor::data::DVSEventArray::ToArrayPol ( ) const
inline

Get all events' polarity for convenience.

Definition at line 109 of file DVSEventArray.h.

◆ ToArrayT()

std::vector<std::int64_t> carla::sensor::data::DVSEventArray::ToArrayT ( ) const
inline

Get all events' timestamp for convenience.

Definition at line 100 of file DVSEventArray.h.

◆ ToArrayX()

std::vector<std::uint16_t> carla::sensor::data::DVSEventArray::ToArrayX ( ) const
inline

Get all events' x coordinate for convenience.

Definition at line 82 of file DVSEventArray.h.

◆ ToArrayY()

std::vector<std::uint16_t> carla::sensor::data::DVSEventArray::ToArrayY ( ) const
inline

Get all events' y coordinate for convenience.

Definition at line 91 of file DVSEventArray.h.

◆ ToImage()

std::vector<Color> carla::sensor::data::DVSEventArray::ToImage ( ) const
inline

Get an event "frame" image for visualization.

Definition at line 57 of file DVSEventArray.h.

References GetHeight(), and GetWidth().

+ Here is the call graph for this function:

Member Data Documentation

◆ Serializer

Definition at line 26 of file DVSEventArray.h.


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