Pixel Mirror
A real-time computer-vision art piece: a webcam watches whoever walks by, and a 64×64 LED panel mirrors them back as pixel art. One button switches between a silhouette mode and a “gloving” mode that turns fingertips into moving dots of light.
- Team
- Larry Hui, Steph Akakabota, Kyle Nelson, Wen Cao
- My part
- The MediaPipe fingertip “gloving” mode and its protocol payload
- Latency
- 50–70 ms from camera to LEDs at 25–30 fps
- Video
- Watch the demo
Engineering as art
The idea is a mirror that hands you back to yourself at the lowest resolution where a human shape still reads: 4,096 pixels. Still, it barely looks like a person. Moving, reacting, and changing color in real time, it starts to feel like a presence.
How it fits together
A laptop runs the vision code and a desktop interface, and an ESP32 drives the LED panel. A single serial link carries image frames to the ESP32 and sends the button and knob readings back.
For silhouettes, YOLOv8 segments every person in the frame, the masks are merged and cleaned up, and the result is shrunk to 64×64 and packed into 512 bytes. A potentiometer on the panel blends the silhouette color from white to red.
Gloving mode
This was my part. In gloving mode, MediaPipe Hands finds up to two hands in each frame, and I take the five fingertip landmarks on each and map them straight onto the 64×64 grid. Each fingertip becomes a 3×3 dot in a color from a palette that slowly cycles, so up to ten points of light follow your fingers across a black panel.
I also designed the payload for this mode. Instead of a full image, it sends just the list of fingertips, at most 51 bytes, so the link is nearly free and the only real cost is the hand-tracking time. MediaPipe is skipped entirely in silhouette mode, saving 6–8 ms per frame.
A link that does not drop frames
Over a raw byte stream, the receiver needs to know where each frame starts and ends, whether it arrived intact, and whether it arrived at all. Every frame is wrapped in start and end markers, a length, a mode byte, and a CRC-16 checksum. The ESP32 replies with an acknowledgment or a request to resend, and the host retries up to three times. If noise corrupts a frame, the last good image stays up, so glitches look like a brief pause rather than a black flash.
Real time
The interface is a PyQt6 app with the live camera, the silhouette, and a preview that matches the physical panel. All the heavy work runs on a background thread so the window never freezes, and the host never sends a new frame until the previous one is acknowledged, which keeps latency bounded.
| Stage | Time |
|---|---|
| Camera capture | about 5 ms |
| YOLOv8 segmentation | about 25 ms |
| Mask cleanup, downscaling, and packing | about 3 ms |
| MediaPipe Hands, gloving mode only | 6–8 ms |
| Serial transfer | about 5 ms |
| ESP32 render and acknowledgment | about 2 ms |
Pivots and lessons
The project started on a Jetson Nano with background subtraction and a larger NeoPixel grid, and planned a LabVIEW interface. Background subtraction fell apart whenever lighting changed, the NeoPixels were too slow, and LabVIEW made gluing everything together painful, so we moved to YOLOv8, a HUB75 panel, and Python. The frame format written in week five survived all of it. Our biggest lesson: freeze the wire format first, and let everything around it change.