evlib.representation.time_map

Time-map representation.

Classes

TimeMap(image_shape, decay)

Create a time map of events.

class evlib.representation.time_map.TimeMap(image_shape, decay)

Create a time map of events. Adapted from: Lagorce, Xavier, et al. “Hots: a hierarchy of event-based time-surfaces for pattern recognition.” IEEE transactions on pattern analysis and machine intelligence 39.7 (2016): 1346-1359.

Note that this implementation is a “random access implementation” and does not hold a state.

Parameters:
  • image_shape (Tuple[int, int]) – (height, width)

  • decay (float) – the factor in the exponential. A higher value leads to a stronger decay (sharper edges).

__call__(events)

Create time map.

Parameters:

events (ndarray) – a NumPy array of size [n x d], where n is the number of events and d = 4. Every event is encoded with 4 values (y, x, t, p).

Returns:

A 2D representation of the input events

Return type:

ndarray