CARLA
Loading...
Searching...
No Matches
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:

Public Types

using event_type = DVSEvent
Public Types inherited from carla::sensor::data::Array< DVSEvent >
using const_iterator
using const_pointer
using const_reference
using const_reverse_iterator
using iterator
using pointer
using reference
using reverse_iterator
using size_type
using value_type

Public Member Functions

auto GetFOVAngle () const
 Get horizontal field of view of the image in degrees.
auto GetHeight () const
 Get image height in pixels.
auto GetWidth () const
 Get image width in pixels.
std::vector< std::vector< std::int64_t > > ToArray () const
 Get the array of events in pure vector format.
std::vector< short > ToArrayPol () const
 Get all events' polarity for convenience.
std::vector< std::int64_t > ToArrayT () const
 Get all events' timestamp for convenience.
std::vector< std::uint16_t > ToArrayX () const
 Get all events' x coordinate for convenience.
std::vector< std::uint16_t > ToArrayY () const
 Get all events' y coordinate for convenience.
std::vector< Color > ToImage () const
 Get an event "frame" image for visualization.
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_type * data ()
const value_type * data () 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.
const rpc::Transform & GetSensorTransform () const
 Sensor's transform when the data was generated.
double GetTimestamp () const
 Simulation-time when the data was generated.
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 RawData & GetRawData () const
Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 SensorData (const RawData &data)
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)

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

◆ Serializer

◆ 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.

References carla::sensor::data::Array< DVSEvent >::data().

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().

◆ GetHeader()

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

◆ 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().

◆ 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().

◆ 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().

Member Data Documentation

◆ Serializer

Definition at line 26 of file DVSEventArray.h.


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