Skip to content
CoolProGamer edited this page Feb 26, 2024 · 2 revisions

Vision

We use vision for two things. Robot alignment with the field and object detection. For alignment we use Apriltags (or sometimes limelight but that is being phased out of use), which look like QR codes on the field.

Vision uses OpenCV. (Make sure to include instructions on how to install OpenCV) Most code runs in a while true loop. At the beginning of this loop, it is important to include a keyboard override to quit the program if needed.

Creating Camera Capture cap = cv2.VideoCapture(0)

Reading Camera Capture _, img = cap.read()

Keyboard Override if keyboard.is_pressed("z"): exit()

Resizing img = cv2.resize(img, (x_size, y_size))

Displaying the Image (DON’T DO THIS FOR THE FINAL RASPBERRY PI CODE) cv2.imshow("image", img) cv2.waitKey(5)

Specific Vision Documentation

Object Vision

Apriltag Vision

Camera on Shuffleboard

Clone this wiki locally