Class LinearTimeSurface

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class cpphots::LinearTimeSurface : public cpphots::interfaces::Clonable<LinearTimeSurface, TimeSurfaceBase>

Class that can compute linear time surfaces.

This class keeps track of the time context for the current stream of events and can compute the time surface for new ones.

The time surface has a linear activation as described in (Maro et al., 2020).

Subclassed by cpphots::interfaces::Clonable< WeightedLinearTimeSurface, LinearTimeSurface >

Public Functions

virtual std::pair<TimeSurfaceType, bool> compute(uint64_t t, uint16_t x, uint16_t y) const override

Compute the time surface for an event.

This function does not update the time context.

A time surface is considered valid if there is a certain number of relevant events, determined using an heuristic extended from the one described in the paper.

Parameters
  • t – time of the event

  • x – horizontal coordinate of the event

  • y – vertical coordinate of the event

Returns

a std::pair with the computed time surface and whether the surface is valid or not

virtual std::pair<TimeSurfaceType, bool> compute(const event &ev) const override

Compute the time surface for an event.

This function does not update the time context.

A time surface is considered valid if there is a certain number of relevant events, determined using an heuristic extended from the on described in the paper.

Parameters

ev – the event

Returns

a std::pair with the computed time surface and whether the surface is valid or not

virtual TimeSurfaceType sampleContext(uint64_t t) const override

Sample and decay all temporal context.

This functions applies the decay to the whole temporal context and returns it.

Parameters

t – sample time

Returns

decayed temporal context

virtual void toStream(std::ostream &out) const override

Insert to stream.

Does not save the current time context.

Parameters

out – stream where to insert to

virtual void fromStream(std::istream &in) override

Extract from stream.

Parameters/current state is expected to be overwritten or invalidated.

Parameters

in – stream where to extract from