IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Querying the current setting of the automatic white balance in the host.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
// Get the current white balance auto mode
peak_auto_feature_mode mode = PEAK_AUTO_FEATURE_MODE_INVALID;
status = peak_IPL_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;
}
|
Setting the automatic white balance in the host.
genericC++
|
peak_status status = PEAK_STATUS_SUCCESS;
// Disable white balance auto
status = peak_IPL_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_IPL_AutoWhiteBalance_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_ONCE);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
// Continuously enable white balance auto
status = peak_IPL_AutoWhiteBalance_Mode_Set(hCam, PEAK_AUTO_FEATURE_MODE_CONTINUOUS);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
|
Automatic white balance: Querying and setting white balance ROI
You can set an image region (region of interest) for the auto white balance to be applied. Normally, the total image ROI is used for the white balance ROI. To set a different image region, set the white balance ROI mode to manual. Then you can set the new values for the position and size.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
status = peak_IPL_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_IPL_AutoWhiteBalance_ROI_Set(hCam, roi);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
|