This package owns presentation-neutral camera capture. Linux USB cameras are currently supported through V4L2Camera, which uses OpenCV's V4L2 backend.
On Pi 5, select Linux USB cameras and V4L2 controls in the host installer TUI, or use the equivalent command:
Select YOLO object detection and tracking (--feature video-perception) to install the AI runtime and verify and download the pinned yolo11n.pt weights. The installer stores them in ${XDG_DATA_HOME:-$HOME/.local/share}/openroadcode/vision/models and reuses verified weights on subsequent runs. Vision loads this file locally. If the download fails, the installer reports incomplete AI setup and you can still use the camera preview. Rerun with --feature video-perception to retry. If the installer adds the video group, log out and back in before opening Vision. The desktop capture backend supports USB V4L2 cameras.
Confirm the camera is visible and inspect its modes:
Launch ./runOrcUi, open Vision, and confirm the preview appears. Leave and reopen Vision to verify the camera is released and can be opened again. If the capture node differs from /dev/video0, select it at launch, preferably using a stable link from /dev/v4l/by-id:
Run the live OpenRoadCode preview from the repository root:
The defaults match the first OpenRoadCode road camera tested in development: /dev/video0, MJPEG, 1920x1080, 30 fps. Override them when needed:
Press q or Escape to close the preview.
CameraIf owns capture only. It returns CameraFrame objects and knows nothing about UI, recording, or computer vision. Perception consumes those frames through controllers.computer_vision.ObjectDetectorIf, allowing the preview, recorder, and future YOLO implementation to evolve independently. CameraControlsIf similarly exposes hardware-neutral DAY and LOW_LIGHT profiles. Linux-specific V4L2 commands remain in its platform adapter.
The validated USB road camera also exposes V4L2 controls for exposure, gain, gamma, backlight compensation, white balance, sharpness, and power-line frequency. OpenRoadCode currently applies two conservative hardware profiles through V4L2CameraProfileController:
Both profiles select 60 Hz power-line compensation for the current U.S. test environment. The low-light profile deliberately leaves exposure under the camera's supported auto mode and increases only bounded gain/gamma/backlight controls, avoiding an unsupported shutter override and excessive motion blur.
The profile controller shells out to v4l2-ctl, which is installed by development/debian/setup_camera_perception.sh.
vision.camera records open/close and capture failure/recovery; vision.camera.controls records profile transitions and control failures/recovery. Normal capture and already-applied profiles remain DEBUG. Records include only fixed stages, state and exception type, never frames, device paths or control command output. Parent vision operation IDs are retained. See the device validation guide.