ON THIS PAGE

  • CameraControl
  • Examples of functionality
  • Reference

CameraControl

This message is used for controlling the ColorCamera as well as the MonoCamera. The message handles things like capturing still images, configuring auto focus, anti banding, white balance, scenes, effects etc.

Examples of functionality

Reference

class

depthai.CameraControl(depthai.Buffer)

class
class
class
class
class
Command
Members:
class
ControlMode
Members:
class
EffectMode
Members:
class
class
SceneMode
Members:
method
__init__(self)
Construct CameraControl message
method
get(self) -> RawCameraControl: RawCameraControl
Retrieve configuration data for CameraControl.

Returns:
    config for CameraControl
method
getCaptureStill(self) -> bool: bool
Check whether command to capture a still is set

Returns:
    True if capture still command is set
method
method
getLensPosition(self) -> int: int
Retrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: float
Retrieves lens position, range 0.0f..1.0f.
method
getSensitivity(self) -> int: int
Retrieves sensitivity, as an ISO value
method
set(self, config: RawCameraControl) -> CameraControl: CameraControl
Set explicit configuration.

Parameter ``config``:
    Explicit configuration
method
setAntiBandingMode(self, mode: RawCameraControl.AntiBandingMode) -> CameraControl: CameraControl
Set a command to specify anti-banding mode. Anti-banding / anti-flicker works in
auto-exposure mode, by controlling the exposure time to be applied in multiples
of half the mains period, for example in multiple of 10ms for 50Hz (period 20ms)
AC-powered illumination sources.

If the scene would be too bright for the smallest exposure step (10ms in the
example, with ISO at a minimum of 100), anti-banding is not effective.

Parameter ``mode``:
    Anti-banding mode to use. Default: `MAINS_50_HZ`
method
setAutoExposureCompensation(self, compensation: int) -> CameraControl: CameraControl
Set a command to specify auto exposure compensation

Parameter ``compensation``:
    Compensation value between -9..9, default 0
method
method
method
setAutoExposureLock(self, lock: bool) -> CameraControl: CameraControl
Set a command to specify lock auto exposure

Parameter ``lock``:
    Auto exposure lock mode enabled or disabled
method
setAutoExposureRegion(self, startX: int, startY: int, width: int, height: int) -> CameraControl: CameraControl
Set a command to specify auto exposure region in pixels. Note: the region should
be mapped to the configured sensor resolution, before ISP scaling

Parameter ``startX``:
    X coordinate of top left corner of region

Parameter ``startY``:
    Y coordinate of top left corner of region

Parameter ``width``:
    Region width

Parameter ``height``:
    Region height
method
setAutoFocusLensRange(self, infinityPosition: int, macroPosition: int) -> CameraControl: CameraControl
Set autofocus lens range, `infinityPosition < macroPosition`, valid values
`0..255`. May help to improve autofocus in case the lens adjustment is not
typical/tuned
method
setAutoFocusMode(self, mode: RawCameraControl.AutoFocusMode) -> CameraControl: CameraControl
Set a command to specify autofocus mode. Default `CONTINUOUS_VIDEO`
method
setAutoFocusRegion(self, startX: int, startY: int, width: int, height: int) -> CameraControl: CameraControl
Set a command to specify focus region in pixels. Note: the region should be
mapped to the configured sensor resolution, before ISP scaling

Parameter ``startX``:
    X coordinate of top left corner of region

Parameter ``startY``:
    Y coordinate of top left corner of region

Parameter ``width``:
    Region width

Parameter ``height``:
    Region height
method
method
setAutoWhiteBalanceLock(self, lock: bool) -> CameraControl: CameraControl
Set a command to specify auto white balance lock

Parameter ``lock``:
    Auto white balance lock mode enabled or disabled
method
setAutoWhiteBalanceMode(self, mode: RawCameraControl.AutoWhiteBalanceMode) -> CameraControl: CameraControl
Set a command to specify auto white balance mode

Parameter ``mode``:
    Auto white balance mode to use. Default `AUTO`
method
setBrightness(self, value: int) -> CameraControl: CameraControl
Set a command to adjust image brightness

Parameter ``value``:
    Brightness, range -10..10, default 0
method
setCaptureIntent(self, mode: RawCameraControl.CaptureIntent) -> CameraControl: CameraControl
Set a command to specify capture intent mode

Parameter ``mode``:
    Capture intent mode
method
method
setChromaDenoise(self, value: int) -> CameraControl: CameraControl
Set a command to adjust chroma denoise amount

Parameter ``value``:
    Chroma denoise amount, range 0..4, default 1
method
setContrast(self, value: int) -> CameraControl: CameraControl
Set a command to adjust image contrast

Parameter ``value``:
    Contrast, range -10..10, default 0
method
setControlMode(self, mode: RawCameraControl.ControlMode) -> CameraControl: CameraControl
Set a command to specify control mode

Parameter ``mode``:
    Control mode
method
setEffectMode(self, mode: RawCameraControl.EffectMode) -> CameraControl: CameraControl
Set a command to specify effect mode

Parameter ``mode``:
    Effect mode
method
setExternalTrigger(self, numFramesBurst: int, numFramesDiscard: int) -> CameraControl: CameraControl
Set a command to enable external trigger snapshot mode

A rising edge on the sensor FSIN pin will make it capture a sequence of
`numFramesBurst` frames. First `numFramesDiscard` will be skipped as configured
(can be set to 0 as well), as they may have degraded quality
method
setFrameSyncMode(self, mode: RawCameraControl.FrameSyncMode) -> CameraControl: CameraControl
Set the frame sync mode for continuous streaming operation mode, translating to
how the camera pin FSIN/FSYNC is used: input/output/disabled
method
setLumaDenoise(self, value: int) -> CameraControl: CameraControl
Set a command to adjust luma denoise amount

Parameter ``value``:
    Luma denoise amount, range 0..4, default 1
method
method
setManualFocus(self, lensPosition: int) -> CameraControl: CameraControl
Set a command to specify manual focus position

Parameter ``lensPosition``:
    specify lens position 0..255
method
setManualFocusRaw(self, lensPositionRaw: float) -> CameraControl: CameraControl
Set a command to specify manual focus position (more precise control).

Parameter ``lensPositionRaw``:
    specify lens position 0.0f .. 1.0f

Returns:
    CameraControl&
method
setManualWhiteBalance(self, colorTemperatureK: int) -> CameraControl: CameraControl
Set a command to manually specify white-balance color correction

Parameter ``colorTemperatureK``:
    Light source color temperature in kelvins, range 1000..12000
method
setSaturation(self, value: int) -> CameraControl: CameraControl
Set a command to adjust image saturation

Parameter ``value``:
    Saturation, range -10..10, default 0
method
setSceneMode(self, mode: RawCameraControl.SceneMode) -> CameraControl: CameraControl
Set a command to specify scene mode

Parameter ``mode``:
    Scene mode
method
setSharpness(self, value: int) -> CameraControl: CameraControl
Set a command to adjust image sharpness

Parameter ``value``:
    Sharpness, range 0..4, default 1
method
method
method
method
setStrobeExternal(self, gpioNumber: int, activeLevel: int) -> CameraControl: CameraControl
Enable STROBE output driven by a MyriadX GPIO, optionally configuring the
polarity This normally requires a FSIN/FSYNC/trigger input for MyriadX (usually
GPIO 41), to generate timings
method
setStrobeSensor(self, activeLevel: int) -> CameraControl: CameraControl
Enable STROBE output on sensor pin, optionally configuring the polarity. Note:
for many sensors the polarity is high-active and not configurable
class

depthai.CameraControl.Command

variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class

depthai.CameraControl.SceneMode

variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.