2026-08-05 14:10:14 +00:00
|
|
|
# pi5-camera-webui
|
|
|
|
|
|
2026-08-05 23:16:25 +09:00
|
|
|
Camera service for a Raspberry Pi 5: a live video feed served over a small web UI, with face
|
|
|
|
|
recognition planned as a later stage.
|
|
|
|
|
|
|
|
|
|
Developed on the machine it runs on (`pi5`), with Codex as the coding client — see [AGENTS.md](AGENTS.md).
|
|
|
|
|
|
|
|
|
|
## Hardware
|
|
|
|
|
|
|
|
|
|
| | |
|
|
|
|
|
|---|---|
|
|
|
|
|
| Board | Raspberry Pi 5 Model B Rev 1.1 |
|
|
|
|
|
| OS | Debian 12 (bookworm), aarch64 |
|
|
|
|
|
| Camera | Pi camera module, connected to a CAM port |
|
|
|
|
|
| Host | `pi5`, `192.168.2.154` |
|
|
|
|
|
|
|
|
|
|
## ⚠ Current state: the camera is NOT detected
|
|
|
|
|
|
|
|
|
|
Nothing is built yet, and **the camera is not visible to the system**, so start here:
|
|
|
|
|
|
|
|
|
|
```console
|
|
|
|
|
$ rpicam-hello --list-cameras
|
|
|
|
|
No cameras available!
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This is a *detection* problem, not a software one — the userland is already in place:
|
|
|
|
|
|
|
|
|
|
- `camera_auto_detect=1` is set in `/boot/firmware/config.txt` (the correct default; nothing to add)
|
|
|
|
|
- 12 `libcamera`/`rpicam` packages are installed
|
|
|
|
|
- **`dmesg` contains no camera probe lines at all** — no sensor (`imx*`, `ov5647`), no CFE
|
|
|
|
|
|
|
|
|
|
That last point is the diagnostic one. A camera that is seen but misconfigured still leaves probe
|
|
|
|
|
messages; **silence means the sensor is not being reached electrically.** So check the physical
|
|
|
|
|
connection before changing any config:
|
|
|
|
|
|
|
|
|
|
1. The Pi 5 has **two CAM/DISP connectors, and they are interchangeable in shape** — a camera in a
|
|
|
|
|
DISP port looks correctly seated and will never appear.
|
|
|
|
|
2. Ribbon **orientation**: contacts face the correct side at both ends (the board end and the camera
|
|
|
|
|
end are not the same way round).
|
|
|
|
|
3. The connector latch is fully seated at both ends.
|
|
|
|
|
4. The Pi 5 uses the **narrower 22-pin** connector — a 15-pin camera cable needs an adapter.
|
|
|
|
|
|
|
|
|
|
Power off before reseating. Re-check with:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
rpicam-hello --list-cameras # should list a sensor
|
|
|
|
|
dmesg | grep -iE 'imx|ov5647|cfe'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
⚠ **Do not treat `/dev/video*` as evidence the camera works.** Those nodes exist on this Pi already
|
|
|
|
|
and belong to the video codec and ISP blocks — they are present with no camera attached at all.
|
|
|
|
|
|
|
|
|
|
`picamera2` is **not** installed yet (`import picamera2` fails); it is the expected capture library
|
|
|
|
|
once a sensor is detected.
|
|
|
|
|
|
|
|
|
|
## Planned stages
|
|
|
|
|
|
|
|
|
|
1. **Capture** — confirm a sensor, grab a still, establish resolution/format.
|
|
|
|
|
2. **Live feed** — MJPEG stream first (simplest thing that works in a browser); WebRTC later if
|
|
|
|
|
latency demands it.
|
|
|
|
|
3. **Web UI** — single page showing the live feed, plus basic controls.
|
|
|
|
|
4. **Face recognition** — detection first, recognition after; run it on a downscaled frame, not the
|
|
|
|
|
full stream.
|
|
|
|
|
|
|
|
|
|
Each stage should be usable on its own before the next begins.
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
|
|
The model endpoint and MCP gateway live on `halogen` and are reachable from this Pi by name.
|
|
|
|
|
Codex is installed and configured here; see [AGENTS.md](AGENTS.md) for how it is expected to work in
|
|
|
|
|
this repo.
|