These docs are public and open source.Edit on GitHub
RC.CAMERA
The camera module provides color frames as a NumPy array.
METHODS
EXAMPLE USAGE
pythonimport racecar_core import numpy as np rc = racecar_core.create_racecar() def start(): pass def update(): image = rc.camera.get_color_image() # average brightness of the colour frame print("brightness:", np.mean(image)) # the centre pixel as blue, green, red. The NeoRacer is RGB-only, # so reach for the LiDAR (rc.lidar), not a depth frame, for distance. h, w = image.shape[0], image.shape[1] b, g, r = image[h // 2, w // 2] print("centre BGR:", b, g, r) rc.set_start_update(start, update) rc.go()
For full documentation, visit the racecar-neo-library documentation.
