aertb.core.processing¶
-
aertb.core.processing.clean(events, tau=0.5, val=10, R=3, allow_first=200)¶ Removes some of the noise in an event based scenario
- Parameters
events (the event structured numpy array) –
tau (float, optional) – regulates the decay of the memory, by default 0.5 important to set it properly!
val (int, optional) – Mask value threshold, by default 10
R (int, optional) – Dimension of the neighborhood, by default 3
allow_first (int, optional) – how many events are let through at the beginning without seeing the mask value, by default first 200
- Returns
the input structured array without the noise events
- Return type
np.array
-
aertb.core.processing.downscale(events, factor=2, camera_size=None)¶ Downscales the image by the given factor.
- Parameters
events (np.array) – structured array with fields (x,y)
factor (int, optional) – the downscale factor must perfectly divide the height and with of the image, otherwise it will raise an error., by default 2
camera_size (tuple, optional) – Camera size will be assumed from events, if different, it must be specified with this parameter as (width, height), by default None
- Returns
the input structured array modified so that the resulting image from events is downscaled by the given factor.
- Return type
np.array
-
aertb.core.processing.flip_diagonal(events)¶ Modifes a set of events so that the resulting image is flipped along the main diagonal
-
aertb.core.processing.flip_horizontal(events)¶ Modifies a set of events so that the resulting image is flipped horizontally
-
aertb.core.processing.flip_vertical(events)¶ Modifies a set of events so that the resulting image is flipped vertically
-
aertb.core.processing.rotate(events, angle, direction='ccw')¶ Modifes a set of events so that the resulting image is rotated
- Parameters
events (np.array,) – the input event structured array
angle (int,) – degrees to rotate: 90, 180, or 270
direction (str, optional) – ‘ccw’ counterclockwise or ‘cw’ clockwise, by default ‘ccw’
- Returns
the input array modified so the rotation takes place
- Return type
np.array