The UNO Q runs headless, with no monitor attached. That meant calibration windows that pop up on screen wouldn't work, so we built our own tool instead. vision_server.py is a small web server on port 8000. Any laptop on the same network can open it in a browser and see the live camera feed with our detections drawn on top.
One-command setup. setup.sh does the whole install in one go:
- Creates a Python virtual environment at ~/pandav/.venv.
- Installs opencv-contrib-python-headless, numpy and pyserial.
- Adds our user to the dialout and video groups, so we can use the serial port and camera.
- Checks at the end that OpenCV's ArUco module and pyserial both load.
The headless build of OpenCV has no windowing code, which suits a board with no monitor.
Consistent colours, all day: The C270's auto-exposure and auto white balance kept changing how colours looked under the hall lighting, which broke colour detection. cam_setup.sh fixes this. It turns off every automatic setting (exposure, white balance, gain, backlight compensation) and locks them to fixed values. It also sets anti-flicker to 60 Hz. The camera runs at 640×480 in MJPG. A background thread keeps only the newest frame, so the planner never acts on an old image.
Calibration with ArUco markers: We print four ArUco markers (IDs 0–3) and place them at the corners of a 200 × 150 mm rectangle. One click in the browser tool finds all four markers and computes the pixel-to-millimetre mapping. This replaced our first method of clicking points by hand, which was slow and depended on how carefully someone clicked. The same four corners also define the work area. Everything outside that area is ignored, so people and objects around the booth can't trigger a false detection.
What the browser tool does:
- ArUco mode: shows which markers are visible and saves the calibration.
- Background capture: averages 30 frames of the empty workspace into a reference image, used later for obstacle detection.
- Markers mode: finds coloured blobs and shows each one's position in mm and its angle. Clicking a pixel shows its colour values and its position in mm. We used this to tune the detection range for our green Crayola marker.
- Detect mode: shows the marker and any obstacles live.
- Path mode: draws the waypoints it extracts from the Sharpie line, with the start marked green and the end red.
Reading the Sharpie line. Dark ink is separated from the white paper and thinned to a one-pixel-wide line. We then search that thin line for its longest continuous stretch. This means a small ink blob or a slight overshoot at a corner no longer breaks the path. The path is ordered starting from the end nearest the marker, then sampled into waypoints. If the contrib thinning function isn't available, the code falls back to our own implementation of the same algorithm (Zhang-Suen thinning).
Arya Patel
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.