IDS peak comfortC v1.16.0
Loading...
Searching...
No Matches
Digital Black

Digital black is a technique used in image processing to adjust the black point before gamma correction is applied. Gamma correction often causes dark areas of an image to appear gray by lifting the overall brightness and redistributing tonal values. By pulling down the black point with digital black, the noisy pixels are eliminated first so the gamma correction does not multiply the noise. More...

Functions

peak_status peak_IPL_DigitalBlack_GetRange (peak_camera_handle hCam, double *minDigitalBlack, double *maxDigitalBlack)
 Get the current range of valid host digital black values.
peak_status peak_IPL_DigitalBlack_Set (peak_camera_handle hCam, double digitalBlack)
 Set the host digital black value.
peak_status peak_IPL_DigitalBlack_Get (peak_camera_handle hCam, double *digitalBlack)
 Get the host digital black value.

Detailed Description

Digital black is a technique used in image processing to adjust the black point before gamma correction is applied. Gamma correction often causes dark areas of an image to appear gray by lifting the overall brightness and redistributing tonal values. By pulling down the black point with digital black, the noisy pixels are eliminated first so the gamma correction does not multiply the noise.

Note
This feature is only applied in the host.

Example to use the digital black feature:

double min = 0.0;
double max = 0.0;
// Get the range of valid values for digital black
peak_status status = peak_IPL_DigitalBlack_GetRange(hCam, &min, &max);
if (PEAK_ERROR(status))
{
// handle error
}
// Set a digital black value
status = peak_IPL_DigitalBlack_Set(hCam, 0.05);
if (PEAK_ERROR(status))
{
// handle error
}
// Get current digital black value
double value = 0.0;
status = peak_IPL_DigitalBlack_Get(hCam, &value);
if (PEAK_ERROR(status))
{
// handle error
}

Function Documentation

◆ peak_IPL_DigitalBlack_Get()

peak_status peak_IPL_DigitalBlack_Get ( peak_camera_handle hCam,
double * digitalBlack )

Get the host digital black value.

Note
Digital black values are represented as factors relative to the range defined by the bit depth of the processed pixel format, with 1.0 indicating the maximum possible pixel value for that bit depth.
Parameters
[in]hCamThe camera handle.
[out]digitalBlackThe digital black value.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER digitalBlack is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.12

◆ peak_IPL_DigitalBlack_GetRange()

peak_status peak_IPL_DigitalBlack_GetRange ( peak_camera_handle hCam,
double * minDigitalBlack,
double * maxDigitalBlack )

Get the current range of valid host digital black values.

Note
Digital black values are represented as factors relative to the range defined by the bit depth of the processed pixel format, with 1.0 indicating the maximum possible pixel value for that bit depth.
Parameters
[in]hCamThe camera handle.
[out]minDigitalBlackThe minimum digital black value.
[out]maxDigitalBlackThe maximum digital black value.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER At least one of minDigitalBlack or maxDigitalBlack is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.12

◆ peak_IPL_DigitalBlack_Set()

peak_status peak_IPL_DigitalBlack_Set ( peak_camera_handle hCam,
double digitalBlack )

Set the host digital black value.

Note
Digital black values are represented as factors relative to the range defined by the bit depth of the processed pixel format, with 1.0 indicating the maximum possible pixel value for that bit depth.
Parameters
[in]hCamThe camera handle.
[in]digitalBlackThe digital black value to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_OUT_OF_RANGE digital black value is out of range. Check the range of valid values via peak_IPL_DigitalBlack_GetRange.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.12