Hardware connector

Camera capture + OCR

camera:// is the capture+understand layer on top of usb:// camera discovery. camera://host/devices/query/list lists cameras (product names + /dev/video* nodes via the usb connector). camera://host/photo/command/capture grabs one still frame and can emit a pre-scan beep so a human knows exactly when scanning happens. camera://host/photo/query/describe returns a natural-language description of what is in the photo — scene, dominant colours, detected objects/regions, barcodes — using the img2nl engine when available. camera://host/photo/query/analyze runs the full pipeline: capture (or reuse a given image), describe it, detect the dominant object (img2nl region detector, else Pillow edge density), crop to it ('dociąć do obiektu'), and OCR the crop — returning the photo, description, object bbox + crop path, and recognised text. camera://host/photo/query/inspect adds simple rule checks (required/forbidden text, min OCR length, object required, brightness range), returns structured alerts with optional beep_on_alert/fail_on_alert, and persists a verdict (inspection.json sidecar + optional JSONL audit_log) so alerting has a durable trail without a separate log connector. camera://host/photo/query/compare does change/motion detection — compare two files, a reference vs a fresh frame, or two frames captured interval_ms apart — returning a change ratio, a changed flag and the changed region, with optional beep_on_change/fail_on_change to trigger scan-on-motion or stop-on-change flows. camera://host/photo/query/ocr just returns the text. Dependency-light core (ffmpeg + Pillow + tesseract); img2nl/imgl and OpenCV are optional upgrades.

dostępny ✓ zweryfikowany

Co robi

  • Capture a webcam frame and OCR it.
  • Describe what is in a photo — scene, objects, barcodes.
  • Inspect a scanned item against rules and raise alerts.
  • Detect change/motion between two frames.

Schematy URI

camera://

Wymagania

  • Array
  • Array
  • Array