IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Gain is an amplification factor applied to all pixel values. Select the channel to be amplified in the GainSelector. Increasing gain, the image will appear brighter. For best image quality, it is recommended to use small gain values and to increase ExposureTime instead. The gain step width depends on the sensor. For automatic gain control, use GainAuto.
For manually adjusting the white balance for color cameras, select a color gain with GainSelector and change the Gain value. |
This information can be output as a chunk via the ChunkSelector. |
Name |
Gain[GainSelector] |
Category |
|
Interface |
Float |
Access |
Read/Write |
Unit |
- |
Visibility |
Beginner |
Values |
≥ 0 |
Standard |
SFNC |
Availability uEye+ |
|
Availability uEye |
|
Can only be changed if SequencerMode is "Off". |
Code example
C++
// Before accessing Gain, make sure GainSelector is set correctly
// Set GainSelector to "AnalogAll"
nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainSelector")->SetCurrentEntry("AnalogAll");
// Determine the current Gain
double value = nodeMapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("Gain")->Value();
// Set Gain to 1.0
nodeMapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("Gain")->SetValue(1.0);
C#
// Before accessing Gain, make sure GainSelector is set correctly
// Set GainSelector to "AnalogAll"
nodeMapRemoteDevice.FindNode<peak.core.nodes.EnumerationNode>("GainSelector").SetCurrentEntry("AnalogAll");
// Determine the current Gain
double value = nodeMapRemoteDevice.FindNode<peak.core.nodes.FloatNode>("Gain").Value();
// Set Gain to 1.0
nodeMapRemoteDevice.FindNode<peak.core.nodes.FloatNode>("Gain").SetValue(1.0);
Python
# Before accessing Gain, make sure GainSelector is set correctly
# Set GainSelector to "AnalogAll" (str)
nodeMapRemoteDevice.FindNode("GainSelector").SetCurrentEntry("AnalogAll")
# Determine the current Gain (float)
value = nodeMapRemoteDevice.FindNode("Gain").Value()
# Set Gain to 1.0 (float)
nodeMapRemoteDevice.FindNode("Gain").SetValue(1.0)