Player not loading? Watch on YouTube
Paul McWhorter's lesson 48 builds a hand detection program with MediaPipe and OpenCV on Raspberry Pi 5. It starts with an existing camera capture script in Thonny that displays frames per second. McWhorter changes the camera index for his two-camera setup and reports roughly 33 FPS before adding hand processing; this is not a benchmark for the completed detector.
The tutorial uses the mp.solutions.hands.Hands API in the class-specific environment and configures the detector with model complexity 0, minimum detection and tracking confidence of 0.5, and a maximum of two hands. McWhorter chooses the lowest complexity for speed on the Pi. He then defines drawing styles for purple landmark circles and green connections, including their thickness and circle radius.
The processing loop converts OpenCV frames from BGR to RGB, passes them to the hand detector, and iterates through results.multi_hand_landmarks. MediaPipe's drawing utilities overlay the landmarks and hand connections on the camera image. The demonstration detects two hands. Gesture recognition is a proposed next step, rather than a feature implemented in this lesson.
The on-device AI exercise ends with homework: combine face mesh and hand landmarks on the kit's OLED display. The supplied setup notes specify the AI Fusion Lab Kit and a class-specific Raspberry Pi Bookworm image with libraries and drivers already installed. They caution against updating that image and recommend a separate SD card for other projects.