ICogAcqDigitalCameraGain DigitalHighGainSelected Property Cognex VisionPro 9.5
Reads or sets whether using high A/D gain.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 69.0.0.0
Syntax

bool DigitalHighGainSelected { get; set; }

Property Value

Type: Boolean
Events

Event TypeReason
ICogChangedEvent Changed

Fires when the gain selection changes.

The following state flag may be affected:

Remarks

Sets or gets the camera's analog/digital (A/D) gain setting.

Not all FIFOs support this property. Check whether the FIFO supports it, as in the example, before using this property.

The gain can be either high (True) or low (False).

Some digital cameras provide only manual gain control by means of a physical switch or a dial in the camera. However, some digital cameras support gain selection by means of a control line.

Default Value: False

Examples

using Cognex.VisionPro;

private CogFrameGrabbers myFrameGrabbers;
private ICogFrameGrabber myFrameGrabber;
private ICogAcqFifo myAcqFifo;

private void InitializeFifo()
{
    const string VIDEO_FORMAT = "Dalsa DLS SP-11 2048x2048";
    ICogAcqDigitalCameraGain digitalCameraGainParams;

    myFrameGrabbers = new CogFrameGrabbers();
    myFrameGrabber = myFrameGrabbers[0];
    myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, 
        Cognex.VisionPro.CogAcqFifoPixelFormatConstants.Format8Grey, 0, false);

    digitalCameraGainParams = myAcqFifo.OwnedDigitalCameraGainParams ;
    if (digitalCameraGainParams != null)
        digitalCameraGainParams.DigitalHighGainSelected = true;
}
Imports Cognex.VisionPro

Private myFrameGrabbers As CogFrameGrabbers
Private myFrameGrabber As Cognex.VisionPro.ICogFrameGrabber
Private myAcqFifo As Cognex.VisionPro.ICogAcqFifo

Private Sub InitializeFifo()
    Const VIDEO_FORMAT = "Dalsa DLS SP-11 2048x2048"
    Dim digitalCameraGainParams As Cognex.VisionPro.ICogAcqDigitalCameraGain

    myFrameGrabbers = New CogFrameGrabbers
    myFrameGrabber = myFrameGrabbers.Item(0)
    myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, CogAcqFifoPixelFormatConstants.Format8Grey, 0, False)

    digitalCameraGainParams = myAcqFifo.OwnedDigitalCameraGainParams 

    If Not digitalCameraGainParams Is Nothing Then
        digitalCameraGainParams.DigitalHighGainSelected = True
    End If
End Sub
See Also