![]() |
IDS peak comfortC v1.14.1
|
Chunks refer to blocks of metadata transmitted alongside image data. More...
Data Structures | |
| struct | peak_chunks_frame_info |
| Structure representing frame information. More... | |
| struct | peak_chunks_exposure |
| Structure representing exposure information. More... | |
| struct | peak_chunks_gain |
| Structure representing gain information. More... | |
| struct | peak_chunks_sequencer |
| Structure representing sequencer status. More... | |
| struct | peak_chunks_timestamp |
| Structure representing timestamp information. More... | |
| struct | peak_chunks_exposure_trigger |
| Structure representing exposure trigger timestamp information. More... | |
| struct | peak_chunks_usable_roi |
| Structure representing usable ROI (Region of Interest). More... | |
| struct | peak_chunks_line_status |
| Structure representing line status information. More... | |
| struct | peak_chunks_autofeature_status |
| Structure representing the status of an auto feature. More... | |
| struct | peak_chunks_autofeature |
| Structure representing the status of multiple auto features. More... | |
| struct | peak_chunks_ptp_status |
| Structure representing the PTP status. More... | |
Functions | |
| peak_access_status | peak_Chunks_GetAccessStatus (peak_camera_handle hCam) |
| Query the chunks access status. | |
| peak_status | peak_Chunks_Enable (peak_camera_handle hCam, peak_bool enabled) |
| Control whether the chunk transmission is enabled or disabled. | |
| peak_bool | peak_Chunks_IsEnabled (peak_camera_handle hCam) |
| Indicates whether chunks are enabled or disabled. | |
| peak_status | peak_Chunks_AutoUpdate_Enable (peak_camera_handle hCam, peak_bool enabled) |
| Control whether the chunks auto update is enabled or disabled. | |
| peak_bool | peak_Chunks_AutoUpdate_IsEnabled (peak_camera_handle hCam) |
| Indicates whether the chunks auto update is enabled or disabled. | |
| peak_status | peak_Chunks_Update (peak_camera_handle hCam, peak_frame_handle hFrame) |
| Update the chunk data from the frame. | |
| peak_access_status | peak_Chunks_Type_GetAccessStatus (peak_camera_handle hCam, peak_chunks_type type) |
| Query the chunk type's access status. | |
| peak_status | peak_Chunks_Type_Enable (peak_camera_handle hCam, peak_chunks_type type, peak_bool enabled) |
| Control whether a specific chunk type is enabled or disabled. | |
| peak_bool | peak_Chunks_Type_IsEnabled (peak_camera_handle hCam, peak_chunks_type type) |
| Indicates whether a specific chunk type is enabled or disabled. | |
| peak_status | peak_Chunks_Type_Supported_GetList (peak_camera_handle hCam, peak_chunks_type *chunksTypesSupported, size_t *chunksTypesSize) |
| Get the list of supported chunk types. | |
| peak_status | peak_Chunks_FrameInfo_Get (peak_camera_handle hCam, peak_chunks_frame_info *data) |
| Retrieves the frame information from chunk data, including pixel format and region of interest (ROI). | |
| peak_status | peak_Chunks_Exposure_Get (peak_camera_handle hCam, peak_chunks_exposure *data) |
| Retrieves the exposure information from chunk data. | |
| peak_status | peak_Chunks_Gain_Get (peak_camera_handle hCam, peak_chunks_gain *data) |
| Retrieves the gain information from chunk data, including analog master gain and digital gains for red, green, and blue channels. | |
| peak_status | peak_Chunks_Sequencer_Get (peak_camera_handle hCam, peak_chunks_sequencer *data) |
| Retrieves the sequencer information from chunk data. | |
| peak_status | peak_Chunks_Timestamp_Get (peak_camera_handle hCam, peak_chunks_timestamp *data) |
| Retrieves the timestamp information from chunk data. | |
| peak_status | peak_Chunks_ExposureTrigger_Get (peak_camera_handle hCam, peak_chunks_exposure_trigger *data) |
| Retrieves the exposure trigger timestamp information from chunk data. | |
| peak_status | peak_Chunks_UsableROI_Get (peak_camera_handle hCam, peak_chunks_usable_roi *data) |
| Retrieves the usable region of interest (ROI) information from chunk data. | |
| peak_status | peak_Chunks_LineStatus_Get (peak_camera_handle hCam, peak_chunks_line_status *data) |
| Retrieves the status information of all lines from chunk data. | |
| peak_status | peak_Chunks_AutoFeature_Get (peak_camera_handle hCam, peak_chunks_autofeature *data) |
| Retrieves the auto-feature information from chunk data. | |
| peak_status | peak_Chunks_PTPStatus_Get (peak_camera_handle hCam, peak_chunks_ptp_status *data) |
| Retrieves the Precision Time Protocol (PTP) status information from chunk data. | |
Chunks refer to blocks of metadata transmitted alongside image data.
These chunks contain information about the camera’s settings and operation, such as exposure time, gain, timestamps, and other control parameters.
They help provide context to the image data, allowing for more accurate processing and analysis. Chunks can be enabled or disabled as needed to optimize data transmission.
To use chunks the following steps are needed:
Before using chunks, a check for support is advised as support depends on the camera type and version. Note that the PEAK_CAMERA_TYPE_UEYE_USB and PEAK_CAMERA_TYPE_UEYE_ETH cameras do not support chunks at all.
In the camera, the chunks transmission must be enabled before they are used:
The support of each type depends on the camera support. To check for support, either use peak_Chunks_Type_GetAccessStatus or iterate through the list of supported types:
Enable a specific chunk type to receive it. This is done here for PEAK_CHUNKS_TYPE_TIMESTAMP as an example:
There are two ways in which the chunks can be updated. The mode can be changed by a call to peak_Chunks_AutoUpdate_Enable.
This is the default mode.
With each call to peak_Acquisition_WaitForFrame the chunks are automatically updated if the frame contains chunk data.
In manual mode, the update must be carried out by a call to peak_Chunks_Update.
Start the image acquisition with peak_Acquisition_Start and wait for a frame with peak_Acquisition_WaitForFrame.
Each of the chunk type has a corresponding function for data retrieval. These are:
This is done as an example for peak_Chunks_Timestamp_Get, as shown below. The other types and their functions are interchangeable:
Sample output:
Timestamp for frame 0: 5183205018150 Timestamp for frame 1: 5183255018750 Timestamp for frame 2: 5183305019350 Timestamp for frame 3: 5183355019900 Timestamp for frame 4: 5183405020500 Timestamp for frame 5: 5183455021100 Timestamp for frame 6: 5183505021700 Timestamp for frame 7: 5183555022300 Timestamp for frame 8: 5183605022900 Timestamp for frame 9: 5183655023500
If newer chunk types that are not supported by the current API version are required, they can be enabled and retrieved using the GFA interface.
Enumeration representing the status of an auto feature.
| enum peak_chunks_type |
Enumeration for chunk types.
| Enumerator | |
|---|---|
| PEAK_CHUNKS_TYPE_INVALID | Invalid chunk type. Use this value to initialize variables of type peak_chunks_type. |
| PEAK_CHUNKS_TYPE_FRAME_INFO | Chunk type frame info, with the data type peak_chunks_frame_info |
| PEAK_CHUNKS_TYPE_EXPOSURE | Chunk type exposure, with the data type peak_chunks_exposure |
| PEAK_CHUNKS_TYPE_GAIN | Chunk type gain, with the data type peak_chunks_gain |
| PEAK_CHUNKS_TYPE_SEQUENCER | Chunk type sequencer, with the data type peak_chunks_sequencer |
| PEAK_CHUNKS_TYPE_TIMESTAMP | Chunk type sequencer, with the data type peak_chunks_sequencer |
| PEAK_CHUNKS_TYPE_EXPOSURE_TRIGGER | Chunk type exposure trigger, with the data type peak_chunks_exposure_trigger |
| PEAK_CHUNKS_TYPE_USABLE_ROI | Chunk type usable roi, with the data type peak_chunks_usable_roi |
| PEAK_CHUNKS_TYPE_LINE_STATUS | Chunk type line status, with the data type peak_chunks_line_status |
| PEAK_CHUNKS_TYPE_AUTO_FEATURE_STATUS | Chunk type auto feature status, with the data type peak_chunks_autofeature |
| PEAK_CHUNKS_TYPE_PTP_STATUS | Chunk type ptp status, with the data type peak_chunks_ptp_status |
| enum peak_ptp_status |
Enumeration representing the status of PTP (Precision Time Protocol).
| peak_status peak_Chunks_AutoFeature_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_autofeature * | data ) |
Retrieves the auto-feature information from chunk data.
This includes the status of the auto brightness and the auto white balance features. If the camera does not support all auto features, the corresponding status will be PEAK_AUTO_FEATURE_STATUS_INVALID.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_autofeature where the auto feature information will be stored. |
hCam is invalid. | peak_status peak_Chunks_AutoUpdate_Enable | ( | peak_camera_handle | hCam, |
| peak_bool | enabled ) |
Control whether the chunks auto update is enabled or disabled.
This changes the behavior when the chunks are updated:
| [in] | hCam | The camera handle. |
| [in] | enabled | The desired auto update status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
hCam is an invalid camera handle. | peak_bool peak_Chunks_AutoUpdate_IsEnabled | ( | peak_camera_handle | hCam | ) |
Indicates whether the chunks auto update is enabled or disabled.
When auto update is enabled, the chunks are updated with each call to peak_Acquisition_WaitForFrame. When auto update is disabled, the chunks must be updated by calling peak_Chunks_Update.
| [in] | hCam | The camera handle. |
| peak_status peak_Chunks_Enable | ( | peak_camera_handle | hCam, |
| peak_bool | enabled ) |
Control whether the chunk transmission is enabled or disabled.
This controls whether the frame includes chunks or not. It must be enabled to use any chunk type. Each type that is to be transmitted must be enabled individually by calling peak_Chunks_Type_Enable.
| [in] | hCam | The camera handle. |
| [in] | enabled | The desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
hCam is an invalid camera handle. | peak_status peak_Chunks_Exposure_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_exposure * | data ) |
Retrieves the exposure information from chunk data.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_exposure where the exposure information will be stored. |
hCam is invalid. | peak_status peak_Chunks_ExposureTrigger_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_exposure_trigger * | data ) |
Retrieves the exposure trigger timestamp information from chunk data.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_exposure_trigger where the exposure trigger timestamp information will be stored. |
hCam is invalid. | peak_status peak_Chunks_FrameInfo_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_frame_info * | data ) |
Retrieves the frame information from chunk data, including pixel format and region of interest (ROI).
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_frame_info where the frame information will be stored. |
hCam is invalid. | peak_status peak_Chunks_Gain_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_gain * | data ) |
Retrieves the gain information from chunk data, including analog master gain and digital gains for red, green, and blue channels.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_gain where the gain information will be stored. |
hCam is invalid. | peak_access_status peak_Chunks_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the chunks access status.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
| peak_bool peak_Chunks_IsEnabled | ( | peak_camera_handle | hCam | ) |
Indicates whether chunks are enabled or disabled.
| [in] | hCam | The camera handle. |
| peak_status peak_Chunks_LineStatus_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_line_status * | data ) |
Retrieves the status information of all lines from chunk data.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_line_status where the line status information will be stored. |
hCam is invalid. | peak_status peak_Chunks_PTPStatus_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_ptp_status * | data ) |
Retrieves the Precision Time Protocol (PTP) status information from chunk data.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_ptp_status where the PTP status information will be stored. |
hCam is invalid. | peak_status peak_Chunks_Sequencer_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_sequencer * | data ) |
Retrieves the sequencer information from chunk data.
This includes the active sequencer set for the frame.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_sequencer where the sequencer information will be stored. |
hCam is invalid. | peak_status peak_Chunks_Timestamp_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_timestamp * | data ) |
Retrieves the timestamp information from chunk data.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_timestamp where the timestamp information will be stored. |
hCam is invalid. | peak_status peak_Chunks_Type_Enable | ( | peak_camera_handle | hCam, |
| peak_chunks_type | type, | ||
| peak_bool | enabled ) |
Control whether a specific chunk type is enabled or disabled.
When a chunk type is enabled, it will be transmitted if chunks are generally enabled through peak_Chunks_Enable.
| [in] | hCam | The camera handle. |
| [in] | type | The chunk type to enable or disable. |
| [in] | enabled | The desired chunk enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
type is not a valid type. hCam is an invalid camera handle. | peak_access_status peak_Chunks_Type_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_chunks_type | type ) |
Query the chunk type's access status.
Use this function to check if a specific chunk type is supported. For a list of supported types, see peak_Chunks_Type_Supported_GetList.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | type | The chunk type to check. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
| peak_bool peak_Chunks_Type_IsEnabled | ( | peak_camera_handle | hCam, |
| peak_chunks_type | type ) |
Indicates whether a specific chunk type is enabled or disabled.
| [in] | hCam | The camera handle. |
| [in] | type | The chunk type to check. |
type is enabled. type is disabled or the query failed.| peak_status peak_Chunks_Type_Supported_GetList | ( | peak_camera_handle | hCam, |
| peak_chunks_type * | chunksTypesSupported, | ||
| size_t * | chunksTypesSize ) |
Get the list of supported chunk types.
The list of supported chunk types depends on the camera and interface technology.
This function implements the Two Staged Data Query principle.
| [in] | hCam | The camera handle. |
| [out] | chunksTypesSupported | Pointer to a user allocated array buffer to receive the list of supported chunk types. If this parameter is NULL, chunksTypesSize will contain the current number of chunk types supported. The required size of chunksTypesSupported in bytes is chunksTypesSize x sizeof(peak_chunks_type). |
| [in,out] | chunksTypesSize |
|
chunksTypesSupported is not NULL and the value of *chunksTypesSize is too small to receive the expected amount of data. chunksTypesSize is an invalid pointer. hCam is an invalid camera handle. | peak_status peak_Chunks_Update | ( | peak_camera_handle | hCam, |
| peak_frame_handle | hFrame ) |
Update the chunk data from the frame.
Use this function when auto update is disabled and the chunk data needs to be updated. When the frame includes no chunk data, this function call will fail.
| [in] | hCam | The camera handle. |
| [in] | hFrame | The frame with the chunk data to update. |
hCam is an invalid camera handle. hFrame is not a valid frame. hFrame has no chunk data. | peak_status peak_Chunks_UsableROI_Get | ( | peak_camera_handle | hCam, |
| peak_chunks_usable_roi * | data ) |
Retrieves the usable region of interest (ROI) information from chunk data.
This is used for some cameras where invalid pixel values are transmitted and need to be cut out.
| [in] | hCam | The camera handle. |
| [out] | data | Pointer of type peak_chunks_usable_roi where the usable ROI information will be stored. |
hCam is invalid.