--- name: vision description: Camera and computer vision on the Arduino Uno Q — MIPI-CSI-2 camera via V4L2/GStreamer and OpenCV on the Linux side. Load this for capturing images/frames, camera pipelines, or running vision on the board. --- # Vision on the Uno Q (Linux side) The camera (MIPI-CSI-2) is a **Linux/MPU** device exposed via **V4L2** (`/dev/video0`). Capture and processing run on the MPU, not the MCU. ## Capture a frame Use the **`camera`** tool — it runs a single-frame GStreamer pipeline and writes a JPEG (args: `device`, `width`, `height`, `output` under /tmp, /var/tmp, or $HOME). Equivalent pipeline it runs: ```sh gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 \ ! video/x-raw,width=1280,height=720 ! videoconvert ! jpegenc \ ! filesink location=/tmp/frame.jpg ``` ## Processing (Python, MPU) ```python import cv2 img = cv2.imread("/tmp/frame.jpg") # detect / annotate / stream ... ``` The Adreno 702 GPU provides hardware H.264/H.265/VP9 encode/decode for streaming. ## Pitfalls - The camera is not accessible from a sketch — it's a Linux device. Drive vision from Python (MPU); use Bridge if a sketch needs the result. - `output` for `camera` must be an absolute path under /tmp, /var/tmp, or $HOME.