IDS Peak comfortSDK, genericSDK, AFL, ICL, and IPL developer manuals are external documents.
Please contact us if you need these manuals.
Querying the auto white balance (BalanceWhiteAuto) of the camera.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_AutoWhiteBalance_GetAccessStatus(hCam);
if (PEAK_IS_READABLE(accessStatus))
{
// Get the current white balance auto mode
peak_auto_feature_mode mode = PEAK_AUTO_FEATURE_MODE_INVALID;
status = peak_AutoWhiteBalance_Mode_Get(hCam, &mode);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
switch (mode)
{
case PEAK_AUTO_FEATURE_MODE_OFF:
// White balance auto is disabled
break;
case PEAK_AUTO_FEATURE_MODE_ONCE:
// White balance auto is in "once" mode and switches to "off" when converged
break;
case PEAK_AUTO_FEATURE_MODE_CONTINUOUS:
// White balance auto is continuously enabled
break;
default:
// Acquiring white balance auto mode failed
break;
}
}
|
genericC++
|
// Get current BalanceWhiteAuto mode in the camera
std::string balanceWhiteAuto = m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("BalanceWhiteAuto")->CurrentEntry()->SymbolicValue();
if ("Off" == balanceWhiteAuto)
{
// BalanceWhiteAuto is disabled
}
else if ("Once" == balanceWhiteAuto)
{
// BalanceWhiteAuto is in "once" mode and switches to "off" when converged
}
else if ("Continuous" == balanceWhiteAuto)
{
// BalanceWhiteAuto is continuously enabled
}
|
Setting the auto white balance (BalanceWhiteAuto) of the camera.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_AutoWhiteBalance_GetAccessStatus(hCam);
if (PEAK_IS_WRITEABLE(accessStatus))
{
// Disable white balance auto
status = peak_AutoWhiteBalance_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_OFF);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
// Enable white balance auto once, until it has converged
status = peak_AutoWhiteBalance_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_ONCE);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
// Continuously enable white balance auto
status = peak_AutoWhiteBalance_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_CONTINUOUS);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
}
|
genericC++
|
// Disable BalanceWhiteAuto
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("BalanceWhiteAuto")->SetCurrentEntry("Off");
// Enable BalanceWhiteAuto once, until it has converged
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("BalanceWhiteAuto")->SetCurrentEntry("Once");
// Continuously enable BalanceWhiteAuto
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("BalanceWhiteAuto")->SetCurrentEntry("Continuous");
|
BalanceWhiteAuto: Querying and setting a sub-region
You can set an image area (sub-region) for auto white balance to be applied. Normally, the total image ROI is used for the white balance ROI. To set a different sub-region, first disable SubRegionFollowSource of the white balance ROI. Then you can set the new values for the position and size.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_AutoWhiteBalance_GetAccessStatus(hCam);
if (PEAK_IS_WRITEABLE(accessStatus))
{
status = peak_AutoWhiteBalance_ROI_Mode_Set(hCam, PEAK_AUTO_FEATURE_ROI_MODE_MANUAL);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
peak_roi roi = { { 16, 16 }, { 256, 256 } };
status = peak_AutoWhiteBalance_ROI_Set(hCam, roi);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
}
|
genericC++
|
m_nodemapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("SubRegionSelector")->SetCurrentEntry("AutoFeatureBalanceWhiteAuto");
m_nodemapRemoteDevice->FindNode<peak::core::nodes::BooleanNode>("SubRegionFollowSource")->SetValue(false);
m_nodemapRemoteDevice->FindNode<peak::core::nodes::IntegerNode>("SubRegionOffsetX")->SetValue(20);
m_nodemapRemoteDevice->FindNode<peak::core::nodes::IntegerNode>("SubRegionOffsetY")->SetValue(20);
m_nodemapRemoteDevice->FindNode<peak::core::nodes::IntegerNode>("SubRegionOffsetWidth")->SetValue(200);
m_nodemapRemoteDevice->FindNode<peak::core::nodes::IntegerNode>("SubRegionOffsetHeight")->SetValue(200);
|