Skip to content

Gain (dart E)#

The Gain camera feature allows you to increase the brightness of the images output by the camera.

Increasing the gain increases all pixel values of the image.

To adjust the gain value automatically, use the Gain Auto feature.

Using the Feature#

Configuring Gain Settings#

  1. Set the GainAuto parameter to Off.
  2. Set the Gain parameter to the required value.
    The minimum and maximum parameter values vary depending on the camera model, the pixel format chosen, and the Binning settings.

Specifics#

Analog and Digital Gain#

Analog gain is applied before the signal from the camera sensor is converted into digital values. Digital gain is applied after the conversion, i.e., it is basically a multiplication of the digitized values.

Gain Values#

Camera Model Minimum Gain Setting Minimum Gain Setting with Vertical Binning Enabled Maximum Gain Setting (8-bit Pixel Formats) Maximum Gain Setting (10-bit Pixel Formats) Maximum Gain Setting (12-bit Pixel Formats)
daA2500-60mc 0 - 26.85 - -
daA2500-60mci 0 Not supported 33.98 - -
daA3840-30mc 0 - 15.56 - -
daA4200-30mci 0 Not supported 33.06 - -

Sample Code#

// Set the gain to 4.2 dB
camera.Gain.SetValue(4.2);
INodeMap& nodemap = camera.GetNodeMap();
// Set the gain to 4.2 dB
CFloatParameter(nodemap, "Gain").SetValue(4.2);
// Set the gain to 4.2 dB
camera.Parameters[PLCamera.Gain].SetValue(4.2);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Set the gain to 4.2 dB */
errRes = PylonDeviceSetFloatFeature(hdev, "Gain", 4.2);
CHECK(errRes);
# Set the gain to 4.2 dB
camera.Gain.Value = 4.2
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Set the gain to 4.2 dB */
errRes = PylonDeviceSetFloatFeature(hdev, "Gain", 4.2);
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.