Analog Control
    • 06 Sep 2024
    • 8 Minutes to read
    • PDF

    Analog Control

    • PDF

    Article summary

    Gain Selector

    Name

    GainSelector

    Standard

    Description

    Selects which Gain is controlled by the Gain features.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    See enum entries table below.

    Default value

    All – For color camera

    White – For mono camera

    Availability

    ALL

    Notes

    The linear gain reflects the product of the analog and digital gain.

    Setting the linear gain will adapt the analog (if available) as well as the digital gain.

    The analog gain is not supported for all products. If the analog gain is not available, the digital gain is not displayed separately. In this case the linear gain reflects the digital gain value.

    If the gain is read while All/AnalogAll/DigitalAll is selected, an average of all available color channels depending on PixelFormat is returned. If the gain is written, the value is written to all color channels defined in PixelFormat.
    In case of using ColorToGrey the PixelFormat will be Mono but the color channels for reading and writing the gain value will be Red,Green and Blue.

    Error behavior

    See the device error code documentation.

    Gain Selector Enum Entries:

    Name

    Description

    All

    Selects linear gain of all available color channels.

    Red

    Selects linear gain red

    Green

    Selects linear gain green

    Blue

    Selects linear gain blue

    White

    Selects linear gain white

    Infrared

    Selects linear gain infrared

    AnalogAll

    Selects analog gain of all available color channels.

    AnalogRed

    Selects analog gain red

    AnalogGreen

    Selects analog gain green

    AnalogBlue

    Selects analog gain blue

    AnalogWhite

    Selects analog gain white

    DigitalAll

    Selects digital gain of all available color channels.

    DigitalRed

    Selects digital gain red

    DigitalGreen

    Selects digital gain green

    DigitalBlue

    Selects digital gain blue

    DigitalWhite

    Selects digital gain white

    Gain

    Name

    Gain[GainSelector]

    Standard

    Description

    This is an amplification factor applied to the video signal.

    Interface

    Float

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    The value range varies for different camera variants.

    Therefore, query the value range from the feature parameters (min/max entries)

    However, for the digital gain the value range is the same for all camera variants.

    LinearGain = [DigitalMin * AnalogMin, DigitalMax * AnalogMax]

    AnalogGain = camera dependent

    DigitalGain = [1.0 , 3.999]

    Default value

    1.0

    Availability

    ALL

    Notes

    This feature is available for Gain Selector
    You should create new DSNU reference when changing analog gain.

    Error behavior

    See the device error code documentation.

    Gain Auto

    Name

    GainAuto[GainSelector]

    Standard

    Description

    Sets the automatic gain control (AGC) mode. The exact algorithm used to implement AGC is device-specific.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    See enum entries table below.

    Default value

    Off

    Availability

    ALL

    Notes

    This feature is available only if Gain Selector is All or White (White for Mono cameras)

    The status of automatic gain control is reflected in GainAutoStatus feature.

    When the GainAuto feature has changed its value to Off after performing the “Once” or “AdjustTargetValueToMaxVideo” calibration, please query GainAutoStatus to check whether the automatic gain control was successful.

    Error behavior

    See the device error code documentation.

    Gain Auto Enum Entries:

    Name

    Description

    Off

    Gain is user-controlled using Gain.

    Once

    Gain is automatically adjusted once by the device. Once it has converged, it automatically returns to the Off state.

    Continuous

    Gain is constantly adjusted by the device.

    AdjustTargetValueToMaxVideo

    This process adjusts “Target value” for “GainControlRegion” that the resulting maximum video level fits to given “Target value”.

    (see feature “Target value”)

    Therefore, the Target value feature defines the target value for AdjustTargetValueToMaxVideo command but at the same time the command will adapt the same Target value feature.

    The adapted Target value will be the base for further GainAuto commands.

    Next to adapting the target values this command will perform GainAuto Once command implicitly.

    After process has finished it automatically return to Off state.

    Gain Auto Status

    Name

    GainAutoStatus

    Standard

    Description

    Returns the state of the automatic gain control

    Interface

    Enumeration

    Access mode

    Read only

    Adjustable

    while grabbing

    -

    Value range

    See enum entries table below.

    Default value

    Control off

    Availability

    ALL

    Notes

    -

    Error behavior

    -

    Gain Auto Enum Entries:

    Name

    Description

    ControlOff

    No automatic gain control in progress.

    ControlSuccessful

    The automatic gain control was successfully performed.

    ControlInProgress

    The automatic gain control is in progress.

    ControlStopped

    Continuous gain control temporarily stopped.

    Gain stop control enabled; gain stop condition reached!

    ReferenceTimeout

    No reference data from the gain control region available! Camera might be in triggered mode. Probably there are no trigger pulses.

    LowerGainLimit

    Warning! The automatic gain control has reached lower gain limit!

    UpperGainLimit

    Warning! The automatic gain control has reached upper gain limit!

    VideoLevelLowerLimit

    Warning!
    Process “AdjustTargetValueToMaxVideo”, video level too low for target value adjustment

    VideoLevelUpperLimit

    Warning!

    Process “AdjustTargetValueToMaxVideo”, video level too high for target value adjustment

    TargetValueOutOfRange

    Warning!

    Process “AdjustTargetValueToMaxVideo”, adjusted target values are out of range

    Synchronization Mode Enable

    Name

    GainAutoSyncModeEnable

    Custom

    Description

    Controls whether the gain control reference values are taken synchronous to frame start or independent of frame start. In case of synchronous mode is activated only one reference per frame will be captured. In case of synchronous mode is inactive the reference values are taken continuously from image data stream.

    Interface

    Boolean

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    True – Enables synchronization mode

    False – Disables synchronization mode

    Default value

    False

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Stop Control Enable

    Name

    GainAutoStopControlEnable

    Custom

    Description

    Controls whether the gain auto continuous mode is limited according to the gain stop factor.

    Interface

    Boolean

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    True – Enables Gain Auto Stop Control

    False – Disables Gain Auto Stop Control

    Default value

    False

    Availability

    ALL

    Notes

    -

    Error behavior

    -

    Stop Factor

    Name

    GainAutoStopFactor

    Custom

    Description

    The stop factor is used to limit the continuous gain control.

    The factor is multiplied with the target reference values. The result defines a threshold for the current reference values.

    Whenever the current reference values are equal or fall below the threshold, the continuous gain control is not performed till the current reference values are again larger than the threshold.

    Interface

    Float

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [0.0 , 1.0]

    Default value

    0.8

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Gain Control Region Offset X

    Name

    GainControlRegionOffsetX

    Custom

    Description

    Sets the offset x of the gain control region. (in pixel)

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    No

    Value range

    [2 , (SensorWidth- GainControlRegionWidth)]

    Default value

    (SensorWidth / 2 ) - 48

    Availability

    ALL

    Notes

    The minimal step of the value is one.

    Error behavior

    See the device error code documentation.

    Gain Control Region Width

    Name

    GainControlRegionWidth

    Custom

    Description

    Sets the width of the gain control region. (in pixels)

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    No

    Value range

    [8 , 240]

    Default value

    48

    Availability

    ALL

    Notes

    The step of the width is two.

    Error behavior

    See the device error code documentation.

    Gain Control Region Offset Y

    Name

    GainControlRegionOffsetY

    Custom

    Description

    Sets the offset y of the gain control region. (in pixels)

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    No

    Value range

    Frame trigger off:      [3, HeightGainControlRegionHeight]

    Frame trigger on:      [3 -TriggerDelayLines, 32767]

    Default value

    3

    Availability

    ALL

    Notes

    This feature only takes effect if the Synchronization Mode Enable is set true!

    Error behavior

    See the device error code documentation.

    Gain Control Region Height

    Name

    GainControlRegionHeight

    Custom

    Description

    Sets the height of the gain control region. (in pixel)

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    No

    Value range

    [2 , 240]

    Default value

    32

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Gain Control Region visible

    Name

    GainControlRegionVisible

    Custom

    Description

    The borders of the gain control region are drawn into the image if enabled.

    Interface

    Boolean

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    True – Displays the borders of the gain control region

    False – Does not display the borders of the gain control region

    Default value

    False

    Availability

    ALL

    Notes

    -

    Error behavior

    -

    Average Samples

    Name

    GainAutoAverageSamples

    Custom

    Description

    The number of reference samples which are averaged before doing a gain control step.

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [1 , 32]

    Default value

    4

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Gain Control Region Channel Selector

    Name

    GainControlRegionChannelSelector

    Custom

    Description

    Selects the color channel to define the target intensity value or to read the current intensity value of the gain control region.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    See enum entries table below.

    Default value

    Red

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Gain Control Region Channel Selector Enum Entries:

    Name

    Description

    All

    Selects all available channels for the actual PixelFormat to set the target value to same number.
    Reading the target value will return the average of all available channels for the current PixelFormat.

    Reading the current value will return the average of all available channels for the current PixelFormat.

    Red

    Selects red channel to define the target intensity value or to read the current intensity value of the gain control region.

    Green

    Selects green channel to define the target intensity value or to read the current intensity value of the gain control region.

    Blue

    Selects blue channel to define the target intensity value or to read the current intensity value of the gain control region.

    White

    Selects white channel to define the target intensity value or to read the current intensity value of the gain control region.

    Infrared

    Selects InfraRed channel to define the target intensity value or to read the current intensity value of the gain control region.

    Target value

    Name

    GainControlRegionTargetValue[GainControlRegionChannelSelector]

    Custom

    Description

    The target luminance intensity value of the selected channel in the gain control region. The bit depth of the value is 10-bit.

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [0 , 1023]

    Default value

    700

    Availability

    ALL

    Notes

    Gain AutoOnce“ or “Continuous”:
    Internal Gain Control adjusts gain values until current value of GainControlRegion have reached target values.

    Gain AutoAdjustTargetValueToMaxVideo”:

    Target value determines the maximum video level which the raw image (without PRNU correction) should reach when doing gain adjustment with GainAuto (Once or Continuous). For that the camera adapts the Target value, until that criterion is fulfilled.

    Error behavior

    See the device error code documentation.

    Current value

    Name

    GainControlRegionCurrentValue[GainControlRegionChannelSelector]

    Custom

    Description

    The current luminance intensity value of the selected channel in the gain control region. The bit depth of the value is 10-bit.

    Interface

    Integer

    Access mode

    Read only

    Adjustable

    while grabbing

    -

    Value range

    -

    Default value

    -

    Availability

    ALL

    Notes

    -

    Error behavior

    -

    Sensor Sensitivity Channel Selector

    Name

    SensorSensitivityChannelSelector

    Custom

    Description

    Selects the color to be controlled for the sensor sensitivity.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    See enum entries table below.

    Default value

    Red

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Sensor Sensitivity Channel Selector Enum Entries:

    Name

    Availability

    Description

    All

    ALL

    Selects all color channels to control sensor sensitivity.
    If the sensor sensitivity is modified, the specified value is applied to all color channels. If you read the sensor sensitivity, the lastly set value is returned in this case. After a boot-up, 0 is returned.

    White

    ax_X

    Selects white channel to control sensor sensitivity.

    Red

    ax_X

    Selects red channel to control sensor sensitivity.

    Green

    ax_X

    Selects green channel to control sensor sensitivity.

    Blue

    ax_X

    Selects blue channel to control sensor sensitivity.

    Sensor Sensitivity

    Name

    SensorSensitivity[SensorSensitivityChannelSelector]

    Custom

    Description

    Controls the sensor sensitivity of the specified selector.

    Interface

    Integer

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    Variant

    Min Value

    Max Value

    ax_X

    0

    2

    g8_X

    0

    7

    Default value

    Variant

    Default Value

    ax_X

    2

    g8_X

    4

    Availability

    ALL

    Notes

    You should create new DSNU/PRNU reference when changing this parameter.

    g8_X:

    At sensitivity value 0 the FullWell of the pixels can be exhausted and the maximum SNR of the sensor can be reached, but an analog signal limitation can be expected at ~168dn@8bit. This can be brought back to the full digital range of 0...255 by the PRNU or DigGain.

    Error behavior

    See the device error code documentation.

    Gamma

    Name

    Gamma

    Standard

    Description

    Controls the gamma correction of pixel intensity. This is typically used to compensate for non-linearity of the display system (such as CRT).

    Interface

    Float

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [0.1 – 2.5]

    Default value

    1.0

    Availability

    ALL

    Notes

    The gamma values 0.2 – 2.5 behave corresponding to the standard gamma definition. The gamma value 0.1 enables a special sRGB gamma table.

    The gamma feature is effective only if the Gamma LUT is enabled.

    Error behavior

    See the device error code documentation.

    Brightness Contrast Enable

    Name

    BrightnessContrastEnable

    Custom

    Description

    Enable brightness and contrast image processing unit.

    Interface

    Boolean

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    True – Enables brightness and contrast image processing unit.

    False – Disables brightness and contrast image processing unit.

    Default value

    False

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Brightness Contrast Channel Selector

    Name

    BrightnessContrastChannelSelector

    Custom

    Description

    Selects the color channel to control the brightness and contrast.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    See enum entries table below.

    Default value

    Red

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Brightness Contrast Channel Selector Enum Entries:

    Name

    Description

    Red

    Brightness or Contrast will be applicable to the red channel.

    Green

    Brightness or Contrast will be applicable to the green channel.

    Blue

    Brightness or Contrast will be applicable to the blue channel.

    White

    Brightness or Contrast will be applicable to the white channel.

    Infrared

    Brightness or Contrast will be applicable to the infrared channel.

    Contrast

    Name

    BrightnessContrastGain[BrightnessContrastChannelSelector]

    Custom

    Description

    Controls the contrast (gain) value for the selected color channel.

    Interface

    Float

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [0.0 , 1.999]

    Default value

    1.0

    Availability

    ALL

    Notes

    -

    Error behavior

    See the device error code documentation.

    Brightness

    Name

    BrightnessContrastOffset[BrightnessContrastChannelSelector]

    Custom

    Description

    Controls the brightness (offset) value for the selected color channel.

    Interface

    Enumeration

    Access mode

    Read/Write

    Adjustable

    while grabbing

    Yes

    Value range

    [-0.25 , 0.25]

    Default value

    0.0

    Availability

    ALL

    Notes

    The resulting brightness (offset) is defined by the features value multiplied with the maximum value of a pixel defined by the pixel formats bit-depth.

    Example:

    The maximum value of a pixel using the pixel format RGB8 (bit-depth 8-bit) is 255.

    Brightness value of 0.1 would increase the output pixel value by:

    Offset= 0.1x 255 = 25dn’s

    Error behavior

    See the device error code documentation.


    Was this article helpful?

    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence