Skip to main content

Module camera_control

Module camera_control 

Source
Expand description

The camera.control.set plugin method: set exposure, gain or the auto-exposure mode of a camera the vision engine owns, and report the values the driver reads back.

The plugin host relays the request to the vision engine over vision.sock under the same method name. The engine applies it through the device handle it already streams from (the device is never opened a second time), reads every touched control back and answers with a CameraControlResult. applied is true only when every requested control was set and its read-back matches (exposure and gain within one driver step); otherwise reason carries one of the reason codes.

Only cameras configured capture: true in cameras[] may be controlled; any other camera is refused with reason::NOT_CAPTURE_CAMERA.

gain is a multiplier (1.0 is unity gain), on the request and on the read-back alike. The engine maps it to the driver’s gain code linearly, taking the control’s default code as 1×; a control whose default does not name a unit gain is refused with reason::GAIN_UNIT_UNKNOWN rather than guessed at.

The types are the wire shape on both hops: the SDK encodes the request, the host and the engine decode it, and the reply travels back unchanged.

Modules§

reason
Why a request was not applied.

Structs§

CameraControlRequest
camera.control.set arguments. An absent field leaves that control as it is. exposure_us implies manual exposure; gain is a multiplier (1.0 is unity gain).
CameraControlResult
camera.control.set reply. exposure_us and gain (a multiplier) are the values the driver reads back (None when the camera has no such control, its gain unit is unknown, or it was not reached), not the requested ones.

Constants§

CAMERA_CONTROL_CAPABILITY
The capability the method is gated on.
CAMERA_CONTROL_METHOD
The plugin method, also the vision.sock method the host relays it as.
ENGINE_WAIT_MS
How long the engine waits, per request, for the camera’s capture thread to apply it. A request not applied by then is answered reason::NOT_STREAMING and dropped, never applied later.