Class TimeSurfaceCalculator

Inheritance Relationships

Base Types

Derived Type

Class Documentation

class cpphots::interfaces::TimeSurfaceCalculator : public virtual cpphots::interfaces::Streamable, public cpphots::interfaces::ClonableBase<TimeSurfaceCalculator>

Interface for that can compute time surfaces.

Subclassed by cpphots::TimeSurfaceBase

Public Functions

inline virtual ~TimeSurfaceCalculator()

Destroy the TimeSurfaceCalculator.

virtual void update(uint64_t t, uint16_t x, uint16_t y) = 0

Update the time context with a new event.

Parameters
  • t – time of the event

  • x – horizontal coordinate of the event

  • y – vertical coordinate of the event

virtual void update(const event &ev) = 0

Update the time context with a new event.

Parameters

ev – the new event

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

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 = 0

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 std::pair<TimeSurfaceType, bool> updateAndCompute(uint64_t t, uint16_t x, uint16_t y) = 0

Update the time context and compute the new surface.

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> updateAndCompute(const event &ev) = 0

Update the time context and compute the new surface.

Parameters

ev – the event

Returns

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

virtual const TimeSurfaceType &getFullContext() const = 0

Get the temporal context.

This function returns the full temporal context (including padding) on which surfaces are computed.

You may want to use getContext() in normal circumnstances.

Returns

the temporal context

virtual TimeSurfaceType getContext() const = 0

Get the temporal context.

This function returns the whole temporal context on which surfaces are computed.

Returns

the temporal context

virtual TimeSurfaceType sampleContext(uint64_t t) const = 0

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 reset() = 0

Reset the time context.

The time context is reset to -tau

virtual std::pair<uint16_t, uint16_t> getSize() const = 0

Returns the size of the context.

Returns

{width, height}

virtual uint16_t getWx() const = 0

Get the horizontal size of the window.

Returns

the horizontal size of the window

virtual uint16_t getWy() const = 0

Get the vertical size of the window.

Returns

the vertical size of the window