← All skills

Skill

Image processing

Transforming images pixel by pixel. Live View converts frames to the Lab colour space and dithers them into Braille characters.

1 log entry1 project

FIRST Tech ChallengeBest example

Live View: camera video sent as text

Code

Also shows: Java

FTC rules ban streaming camera images to the driver station during a match, but telemetry text is allowed, so Live View sends the robot's camera feed as text. Each frame is shrunk and converted to the Lab colour space on the robot, then drawn with Braille characters as pixels: each character is a 2×4 block of dots, and Floyd–Steinberg dithering decides which dots are on, so shading survives with only on and off. To keep the message small, colour is added only for the game pieces: runs of characters that match the yellow, red or blue samples are wrapped in a colour tag, and only the 100 longest runs are kept. The text goes out as HTML telemetry ten times a second. It gave our drivers a view of what the robot could see during matches, within the rules.

Live View on the driver station: every frame is text.