Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

Querying the auto gain (GainAuto) of the camera.

comfortC

peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_AutoBrightness_Gain_GetAccessStatus(hCam);
if (PEAK_IS_READABLE(accessStatus))
{
  // Get the current gain auto mode
  peak_auto_feature_mode mode = PEAK_AUTO_FEATURE_MODE_INVALID;
  status = peak_AutoBrightness_Gain_Mode_Get(hCam, &mode);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
 
  switch (mode)
  {
  case PEAK_AUTO_FEATURE_MODE_OFF:
      // Gain auto is disabled
      break;
  case PEAK_AUTO_FEATURE_MODE_ONCE:
      // Gain auto is in "once" mode and switches to "off" when converged
      break;
  case PEAK_AUTO_FEATURE_MODE_CONTINUOUS:
      // Gain auto is continuously enabled
      break;
  default:
      // Acquiring gain auto mode failed
      break;
  }
}

genericC++

// Get current GainAuto mode in the camera
std::string gainAuto = m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainAuto")->CurrentEntry()->SymbolicValue();
 
if ("Off" == gainAuto)
{
  // Gain auto is disabled
}
else if ("Once" == gainAuto)
{
  // Gain auto is in "once" mode and switches to "off" when converged
}
else if ("Continuous" == gainAuto)
{
  // Gain auto is continuously enabled
}

Setting the auto gain (GainAuto) of the camera.

comfortC

peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_AutoBrightness_Gain_GetAccessStatus(hCam);
if (PEAK_IS_WRITEABLE(accessStatus))
{
  // Disable gain auto
  status = peak_AutoBrightness_Gain_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_OFF);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
 
  // Enable gain auto once, until it has converged
  status = peak_AutoBrightness_Gain_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_ONCE);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
 
  // Continuously enable gain auto
  status = peak_AutoBrightness_Gain_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_CONTINUOUS);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
}

genericC++

// Disable GainAuto mode
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainAuto")->SetCurrentEntry("Off");
 
// Enable one time GainAuto mode
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainAuto")->SetCurrentEntry("Once");
 
// Enable continuous GainAuto mode
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("GainAuto")->SetCurrentEntry("Continuous");

GainAuto: Querying and setting brightness parameters and ROI

The brightness parameters (BrightnessAutoPercentile, BrightnessAutoTarget, BrightnessAutoTargetTolerance) and the image area for control apply jointly to auto exposure and auto gain. See Brightness parameters (for auto exposure and auto gain).

© 2024 IDS Imaging Development Systems GmbH