Real-time orientation measurement for objects in a live camera feed, running on a Raspberry Pi 5 with 1GB RAM - no GPU, no cloud. Haar cascade detection, Canny edge + Hough transform for angle, sliding window filter for stable output, CSV logging. Extended from the BiViP image processing lab at FAU Erlangen-Nürnberg.
Each stage feeds the next. The design choice that matters: in stage 06, the code selects the Hough line closest to vertical (90°) rather than blindly taking the first line returned. Blindly taking lines[0] gave unstable angle readings when multiple lines were detected.
The worst-case detection sample (three false positives) is committed to results/. These limitations are not hidden.
minNeighbors reduces it but also misses weaker real detections.object_count reflects all bounding boxes but raw_angle and filtered_angle come from the first box only. Tracking angle per object ID was out of scope.scaleFactor down helps sensitivity but slows the pipeline.