CAPABILITY PLUGIN · Camera · v0.2.0

AbstractCamera

Camera control for Python. One thread-safe CameraManager drives tethered camera bodies over libgphoto2, the computer's own cameras and DWARF smart telescopes, with a simulator for development without hardware. Installed next to AbstractCore, it adds a camera capability and a set of camera tools an agent can call. Status: beta. It installs separately and is not part of the abstractframework install profiles.

pip install abstractcamera       # webcam + simulator
abstractcamera list              # lists cameras without opening any device

One manager for every camera

The manager owns everything that does not depend on the camera family: scheduling, the settings ledger, downloads, detection and the watchdog. Each family adapter owns that family's quirks. A CameraHub runs several cameras at once, one worker per camera (validated with four at the same time).

Tethered bodies

Nikon Z (validated on a Z6 II) and Sony Alpha (validated on an A7R IV) over libgphoto2, and a generic PTP fallback for other bodies.

Nikon ZSony AlphaPTP

Webcams and telescopes

The computer's own camera through macOS AVFoundation (validated on a MacBook Pro camera), and DWARF smart telescopes over Wi-Fi, including the mount.

AVFoundationDWARF

Without hardware

Set ABSTRACTCAMERA_FAKE=1 and a simulator with Nikon Z6 II and Sony A7R IV personalities replaces every transport.

simulatortests

What you get

Capture

Live view and capture

Live view with measured frame rate, single, burst and movie capture, focus actions and automatic downloads into ~/Pictures/<device>/.

Settings

Verified settings

Every settings write is confirmed against the body or reported as reverted. A webcam exposes only the dials it really has.

Sequences

Intervalometer and detection

An intervalometer with absolute deadlines and JSONL manifests; lightning, meteor and motion detection on live view with auto-capture and a rolling pre-capture buffer.

Media

Device downloads

abstractcamera download copies the media a device holds (USB cards or the DWARF album over Wi-Fi) into ~/Pictures/<device>/; --delete frees the device after size-verified copies.

Tools

Eleven camera tools

camera_tools() gives an agent camera_* tools, including a preview that looks without firing the shutter, each classified so approval layers know it captures the environment.

Plugin

AbstractCore capability

Registered through the abstractcore.capabilities_plugins entry point: open and close cameras, capture photos and bounded clips, arm detection with auto-capture.

Install and connect

pip install abstractcamera                 # webcam + simulator (numpy + OpenCV)
pip install "abstractcamera[gphoto2]"      # + tethered PTP bodies (libgphoto2)
pip install "abstractcamera[clips]"        # + MP4 clip and movie encoding
pip install "abstractcamera[dwarf]"        # + DWARF smart telescopes (Wi-Fi)
pip install "abstractcamera[all]"          # everything
from abstractcamera import CameraManager, list_cameras

for camera in list_cameras():
    print(camera["id"], camera["name"])

manager = CameraManager()
status = manager.connect()               # first PTP body, else the webcam
manager.set_config_value("iso", "800")   # confirmed or reported reverted
manager.request_trigger()                # capture, then auto-download
jpeg, seq = manager.get_latest_frame()   # live view
manager.disconnect()

Checked against AbstractCamera 0.2.0 (src/abstractcamera/camera_manager.py); needs a connected camera (a PTP body or a webcam); not executed for this page.

from abstractcamera.integrations.abstractcore_tools import camera_tools

llm.generate("Take a photo if something moves", tools=camera_tools())

Checked against AbstractCamera 0.2.0 (integrations/abstractcore_tools.py, line 422); needs a connected camera and an llm from create_llm; not executed for this page.

Detection runs in the process that holds the camera. Waking a durable workflow on motion is something you build at a framework entry point (a gateway run or a flow); AbstractCamera ships no background service. Details: getting started, API.