tonic.functional.to_frame#

Module Contents#

Functions#

to_frame_numpy(events, sensor_size[, time_window, ...])

Accumulate events to frames by slicing along constant time (time_window), constant number of

tonic.functional.to_frame.to_frame_numpy(events, sensor_size, time_window=None, event_count=None, n_time_bins=None, n_event_bins=None, overlap=0.0, include_incomplete=False)[source]#

Accumulate events to frames by slicing along constant time (time_window), constant number of events (event_count) or constant number of frames (n_time_bins / n_event_bins).

Parameters:
  • events – ndarray of shape [num_events, num_event_channels]

  • sensor_size – size of the sensor that was used [W,H,P]

  • time_window (None) – window length in us.

  • event_count (None) – number of events per frame.

  • n_time_bins (None) – fixed number of frames, sliced along time axis.

  • n_event_bins (None) – fixed number of frames, sliced along number of events in the recording.

  • overlap – overlap between frames defined either in time in us, number of events or number of bins.

  • include_incomplete (False) – if True, includes overhang slice when time_window or event_count is specified. Not valid for bin_count methods.

Returns:

numpy array with dimensions (TxPxHxW)