Note
Go to the end to download the full example code.
MergePolarities#
The MergePolarities
sets all polarities to zero.
import tonic
nmnist = tonic.datasets.NMNIST("../../tutorials/data", train=False)
events, label = nmnist[0]
transform = tonic.transforms.Compose(
[
tonic.transforms.MergePolarities(),
tonic.transforms.ToFrame(
sensor_size=(34, 34, 1),
time_window=10000,
),
]
)
frames = transform(events)
ani = tonic.utils.plot_animation(frames)
Total running time of the script: (0 minutes 2.508 seconds)