IDS peak comfortC  v1.1.0

Enumerations

enum  peak_color_correction_mode { PEAK_COLOR_CORRECTION_MODE_INVALID, PEAK_COLOR_CORRECTION_MODE_HQ, PEAK_COLOR_CORRECTION_MODE_USER_1 }
 peak Color correction mode More...
 

Functions

peak_access_status peak_ColorCorrection_GetAccessStatus (peak_camera_handle hCam)
 Query the color correction access status. More...
 
peak_status peak_ColorCorrection_Mode_GetList (peak_camera_handle hCam, peak_color_correction_mode *colorCorrectionModeList, size_t *colorCorrectionModeCount)
 Get the list of currently selectable color correction modes. More...
 
peak_status peak_ColorCorrection_Mode_Set (peak_camera_handle hCam, peak_color_correction_mode colorCorrectionMode)
 Set the color correction mode. More...
 
peak_status peak_ColorCorrection_Mode_Get (peak_camera_handle hCam, peak_color_correction_mode *colorCorrectionMode)
 Get the color correction mode. More...
 
peak_access_status peak_ColorCorrection_Matrix_GetAccessStatus (peak_camera_handle hCam)
 Query the color correction matrix access status. More...
 
peak_status peak_ColorCorrection_Matrix_GetRange (peak_camera_handle hCam, double *minMatrixElementValue, double *maxMatrixElementValue, double *incMatrixElementValue)
 Get the current range of valid color correction matrix element values. More...
 
peak_status peak_ColorCorrection_Matrix_Set (peak_camera_handle hCam, peak_matrix colorCorrectionMatrix)
 Sets the color correction matrix for the current selected color correction. More...
 
peak_status peak_ColorCorrection_Matrix_Get (peak_camera_handle hCam, peak_matrix *colorCorrectionMatrix)
 Get the color correction matrix. More...
 
peak_status peak_ColorCorrection_Enable (peak_camera_handle hCam, peak_bool enabled)
 Enable/Disable the color correction. More...
 
peak_bool peak_ColorCorrection_IsEnabled (peak_camera_handle hCam)
 Get the enabled status of the color correction. More...
 

Detailed Description

Color correction related functions and types.

This feature is applied in the camera.
There is also a host implementation. See Host Features / Color correction.

Enumeration Type Documentation

◆ peak_color_correction_mode

peak Color correction mode

The color correction mode defines the matrix of factors that the color correction feature applies to the image data.

Enumerator
PEAK_COLOR_CORRECTION_MODE_INVALID 

Invalid color correction.

Use this value for the initialization of variables of type peak_color_correction;.

PEAK_COLOR_CORRECTION_MODE_HQ 

HQ.

The color correction is done with the high quality matrix preset.

PEAK_COLOR_CORRECTION_MODE_USER_1 

User 1.

The color correction is done with the user-defined matrix.

By default the user-defined matrix is set to the identity matrix.
It can be changed via peak_ColorCorrection_Matrix_Set.

Function Documentation

◆ peak_ColorCorrection_Enable()

peak_status peak_ColorCorrection_Enable ( peak_camera_handle  hCam,
peak_bool  enabled 
)

Enable/Disable the color correction.

Sets the color correction to enabled or disabled.

Parameters
[in]hCamThe camera handle.
[in]enabledThe desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not accessible for write.
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.

◆ peak_ColorCorrection_GetAccessStatus()

peak_access_status peak_ColorCorrection_GetAccessStatus ( peak_camera_handle  hCam)

Query the color correction access status.

Provides the current access status for the color correction feature.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_ACCESS_READWRITE The color correction feature is readable and writeable.
PEAK_ACCESS_READONLY The color correction feature is readable only.
PEAK_ACCESS_GFA_LOCK The color correction feature is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NONE The color correction feature is not accessible.
PEAK_ACCESS_NOT_SUPPORTED The color correction feature is not supported.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_ColorCorrection_IsEnabled()

peak_bool peak_ColorCorrection_IsEnabled ( peak_camera_handle  hCam)

Get the enabled status of the color correction.

Queries whether the color correction is currently enabled or disabled.

This function implements the Enabled Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_TRUE The color correction feature is currently enabled.
PEAK_FALSE The color correction feature is currently disabled or the query failed.

◆ peak_ColorCorrection_Matrix_Get()

peak_status peak_ColorCorrection_Matrix_Get ( peak_camera_handle  hCam,
peak_matrix *  colorCorrectionMatrix 
)

Get the color correction matrix.

Reads the current color correction matrix.

Parameters
[in]hCamThe camera handle.
[out]colorCorrectionMatrixThe color correction matrix.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not available for read access. Check the access status via peak_ColorCorrection_Matrix_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER colorCorrectionMatrix 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.

◆ peak_ColorCorrection_Matrix_GetAccessStatus()

peak_access_status peak_ColorCorrection_Matrix_GetAccessStatus ( peak_camera_handle  hCam)

Query the color correction matrix access status.

Provides the current access status for the color correction feature.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_ACCESS_READWRITE The color correction feature is readable and writeable.
PEAK_ACCESS_READONLY The color correction feature is readable only.
PEAK_ACCESS_GFA_LOCK The color correction feature is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NONE The color correction feature is not accessible.
PEAK_ACCESS_NOT_SUPPORTED The color correction feature is not supported.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_ColorCorrection_Matrix_GetRange()

peak_status peak_ColorCorrection_Matrix_GetRange ( peak_camera_handle  hCam,
double *  minMatrixElementValue,
double *  maxMatrixElementValue,
double *  incMatrixElementValue 
)

Get the current range of valid color correction matrix element values.

Queries the current range of valid values for the color correction matrix elements.

The range of valid matrix values may depend on the camera configuration and the camera status.

Parameters
[in]hCamThe camera handle.
[out]minMatrixElementValueThe minimum element value.
[out]maxMatrixElementValueThe maximum element value.
[out]incMatrixElementValueThe element increment value.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER At least one of minMatrixElementValue, maxMatrixElementValue, and incMatrixElementValue 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.

◆ peak_ColorCorrection_Matrix_Set()

peak_status peak_ColorCorrection_Matrix_Set ( peak_camera_handle  hCam,
peak_matrix  colorCorrectionMatrix 
)

Sets the color correction matrix for the current selected color correction.

Writes the desired image color correction matrix for the current color correction.

Parameters
[in]hCamThe camera handle.
[in]colorCorrectionMatrixThe color correction matrix to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_OUT_OF_RANGE one or more matrix values are out of range. Check the range of valid values via peak_ColorCorrection_Matrix_GetRange.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not available for write access. Check the access status via peak_ColorCorrection_Matrix_GetAccessStatus.
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.

◆ peak_ColorCorrection_Mode_Get()

peak_status peak_ColorCorrection_Mode_Get ( peak_camera_handle  hCam,
peak_color_correction_mode *  colorCorrectionMode 
)

Get the color correction mode.

Reads the current color correction mode.

Parameters
[in]hCamThe camera handle.
[out]colorCorrectionModeThe color correction mode.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not available for read access.
PEAK_STATUS_INVALID_PARAMETER colorCorrectionMode 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.

◆ peak_ColorCorrection_Mode_GetList()

peak_status peak_ColorCorrection_Mode_GetList ( peak_camera_handle  hCam,
peak_color_correction_mode *  colorCorrectionModeList,
size_t *  colorCorrectionModeCount 
)

Get the list of currently selectable color correction modes.

Queries the list of currently selectable color correction modes.

The list of selectable color correction modes may depend on the camera configuration and the camera status.

This function implements the Two Staged Data Query principle.

Parameters
[in]hCamThe camera handle.
[out]colorCorrectionModeListPointer to a user allocated array buffer to receive the color correction mode list.
If this parameter is NULL, colorCorrectionModeCount will contain the current number of color correction modes.
The required size of colorCorrectionModeList in bytes is colorCorrectionModeCount x sizeof(peak_color_correction_mode).
[in,out]colorCorrectionModeCount
  • colorCorrectionModeList equal NULL:
    out: minimal number of color correction modes colorCorrectionModeList must be large enough to hold
  • colorCorrectionModeList unequal NULL:
    in: number of color corrections modes colorCorrectionModeList can hold
    out: number of color correction modes filled by the function
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_BUFFER_TOO_SMALL colorCorrectionModeList is not NULL and the value of *colorCorrectionModeCount is too small to receive the expected amount of data.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not accessible. Check the access status via peak_ColorCorrection_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER colorCorrectionModeCount 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.
Note
Please consider that the color correction mode list might change between the size query call and the list query call.
This may be the case if the camera configuration or the camera status have changed in the time between the two function calls.

◆ peak_ColorCorrection_Mode_Set()

peak_status peak_ColorCorrection_Mode_Set ( peak_camera_handle  hCam,
peak_color_correction_mode  colorCorrectionMode 
)

Set the color correction mode.

Sets the specified color correction mode.

Parameters
[in]hCamThe camera handle.
[in]colorCorrectionModeThe color correction mode to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_OUT_OF_RANGE colorCorrectionMode is out of range. Check the list of valid color correction modes via peak_ColorCorrection_Mode_GetList.
PEAK_STATUS_ACCESS_DENIED The color correction feature is not available for write access. Check the access status via peak_ColorCorrection_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER colorCorrectionMode is an invalid color correction mode. Check peak_color_correction_mode.
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.