Kurse › Raspberry Pi › Stufe 22
Raspberry Pi · Intermediate · Stufe 22 / 40
Computer Vision with OpenCV
Process live camera frames to detect, measure and track objects in real time.
Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo
10 Lektionen in dieser Stufe
- Installing OpenCV and Understanding Image Arrays
Set up OpenCV in a venv and handle channel order and data types. · Lab: Display a picamera2 frame with OpenCV and fix the swapped red and blue channels. - Colour Spaces and HSV Thresholding
Isolate objects by colour under varying brightness. · Lab: Build trackbars to tune an HSV mask for one coloured object. - Blurring, Edges and Morphology
Clean up images and extract outlines. · Lab: Apply Gaussian blur, Canny edges and open and close operations to a noisy mask. - Finding and Measuring Contours
Detect shapes and compute area, centre and bounding boxes. · Lab: Count objects on a tray and draw each one's area and centroid. - Motion Detection by Background Subtraction
Detect change while ignoring noise and slow lighting drift. · Lab: Trigger on movement larger than a set area and ignore a swaying curtain zone. - Tracking a Coloured Object in Real Time
Follow a target frame to frame and output its position. · Lab: Track a ball and drive the Level 14 pan-tilt head to keep it centred. - Calibrating a Camera and Removing Lens Distortion
Compute intrinsic parameters and undistort images. · Lab: Calibrate with twenty chessboard images and straighten a wide-angle frame. - Pose from ArUco Markers
Detect fiducial markers and estimate distance and orientation. · Lab: Print markers and measure the distance to one within a few millimetres. - Reading QR Codes and Barcodes
Decode symbols from live frames and act on their content. · Lab: Scan a QR code that selects which inspection recipe to run. - Profiling a Vision Loop for Frame Rate
Find the slow stage and speed it up with resolution, regions and threads. · Lab: Time each stage, then double the frame rate using a lores stream and a capture thread.
Abschlussprojekt
A vision inspection station that counts and measures parts on a tray in millimetres, flags rejects and reads a QR job label.
Teile für diese Stufe
- 1 × Raspberry Pi 5 set from Level 1 (Pi 4 also works)
- 1 × Camera module with autofocus
- 1 × Camera mount or tripod
- 1 × Printed calibration chessboard and ArUco marker sheet
- 1 × LED light panel or ring light
- 1 × Assorted coloured objects and small parts tray
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →
Voraussetzung: Level 21: picamera2 configurations and frames as NumPy arrays.