Merge branch 'ue5-dev' into marcel/wip-crash-ubuntu-22
This commit is contained in:
commit
619ff5bc43
|
@ -1194,7 +1194,7 @@ class CameraManager(object):
|
|||
# Example of converting the raw_data from a carla.DVSEventArray
|
||||
# sensor into a NumPy array and using it as an image
|
||||
dvs_events = np.frombuffer(image.raw_data, dtype=np.dtype([
|
||||
('x', np.uint16), ('y', np.uint16), ('t', np.int64), ('pol', np.bool)]))
|
||||
('x', np.uint16), ('y', np.uint16), ('t', np.int64), ('pol', np.bool_)]))
|
||||
dvs_img = np.zeros((image.height, image.width, 3), dtype=np.uint8)
|
||||
# Blue is positive, red is negative
|
||||
dvs_img[dvs_events[:]['y'], dvs_events[:]['x'], dvs_events[:]['pol'] * 2] = 255
|
||||
|
|
Loading…
Reference in New Issue