IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Querying and setting the target value for automatic brightness control in the host.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
uint32_t target = 0;
// Read the target
status = peak_IPL_AutoBrightness_Target_Get(hCam, &target);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
uint32_t targetMin = 0;
uint32_t targetMax = 0;
uint32_t targetInc = 0;
// Query the minimum, maximum and increment of the target
status = peak_IPL_AutoBrightness_Target_GetRange(hCam, &targetMin, &targetMax, &targetInc);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
// Set the target to 150
status = peak_IPL_AutoBrightness_Target_Set(hCam, 150);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
|
Querying and setting the percentile value of the automatic brightness control in the host.
comfortC
|
peak_status status = <%NAME-PREFIX-C%_STATUS_SUCCESS;
double percentile = 0.0;
// Read the target percentile
status = peak_IPL_AutoBrightness_TargetPercentile_Get(hCam, &percentile);
if (<%NAME-PREFIX-C%_ERROR(status)) { /* Error handling ... */ }
double percentileMin = 0.0;
double percentileMax = 0.0;
double percentileInc = 0.0;
// Query the minimum, maximum and increment of the target percentile
status = peak_IPL_AutoBrightness_TargetPercentile_GetRange(hCam, &percentileMin, &percentileMax, &percentileInc);
if (<%NAME-PREFIX-C%_ERROR(status)) { /* Error handling ... */ }
// Set the target percentile to 15
status = peak_IPL_AutoBrightness_TargetPercentile_Set(hCam, 15.0);
if (<%NAME-PREFIX-C%_ERROR(status)) { /* Error handling ... */ }
|
Querying and setting the tolerance value of the automatic brightness control in the host.
comfortC
|
peak_status status = PEAK_STATUS_SUCCESS;
uint32_t targetTolerance = 0;
// Read the target tolerance
status = peak_IPL_AutoBrightness_TargetTolerance_Get(hCam, &targetTolerance);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
uint32_t targetToleranceMin = 0;
uint32_t targetToleranceMax = 0;
uint32_t targetToleranceInc = 0;
// Query the minimum, maximum and increment of the target tolerance
status = peak_IPL_AutoBrightness_TargetTolerance_GetRange(hCam, &targetToleranceMin, &targetToleranceMax, &targetToleranceInc);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
// Set the target tolerance to 3
status = peak_IPL_AutoBrightness_TargetTolerance_Set(hCam, 3);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
|
Brightness parameters: Querying and setting brightness ROI
You can set an image region (region of interest) for the brightness control to be applied. Normally, the total image ROI is used for the brightness ROI. To set a different image region, set the brightness 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_AutoBrightness_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_AutoBrightness_ROI_Set(hCam, roi);
if (PEAK_ERROR(status)) { /* Error handling ... */ }
|