DropPixel#
- class tonic.transforms.DropPixel(coordinates: list[tuple[int, int]] | None = None, hot_pixel_frequency: int | None = None)[source]#
Drops events for individual pixels. If the locations of pixels to be dropped is known, a list of x/y coordinates can be passed directly. Alternatively, a cutoff frequency for each pixel can be defined above which pixels will be deactivated completely. This prevents so- called hot pixels which fire at a high frequency even in the absence of any input signal (e.g. due to faulty hardware).
- Parameters:
coordinates (list[tuple[int, int]] | None) – List of (x,y) coordinates for which all events will be deleted.
hot_pixel_frequency (int | None) – Drop pixels completely that fire higher than the given frequency.
Example
>>> from tonic.transforms import DropPixel >>> transform1 = DropPixel(coordinates=[[10,10], [10,11], [11,10], [11,11]]) >>> transform2 = DropPixel(hot_pixel_frequency=60) # Hertz