IDS peak comfortC v1.9.0
Loading...
Searching...
No Matches
Frame

Modules

 Frame info
 

Typedefs

typedef struct peak_frame * peak_frame_handle
 peak Frame handle
 

Functions

peak_status peak_Frame_Release (peak_camera_handle hCam, peak_frame_handle hFrame)
 Release a frame.
 
peak_status peak_Frame_Save (peak_frame_handle hFrame, const char *fileName)
 Write the frame as image to the file system.
 

Detailed Description

Frame related functions and types.

Typedef Documentation

◆ peak_frame_handle

typedef struct peak_frame* peak_frame_handle

peak Frame handle

A frame represents an image or other types of bulk data received from a camera. It collects all information on the received data.

See also
peak_frame_info.

The frame handle represents a frame which is delivered to the user.
The frame handle is provided by peak_Acquisition_WaitForFrame and must be released by peak_Frame_Release.
The frame handle is required by the peak_Frame_Xxx functions to query information on the received frame.

As long as a frame is in the hands of the user (i.e. delivered) the implementation will not store any data to the associated buffer.
As soon as the frame is released via peak_Frame_Release new data can be stored in the associated buffer.

Note
peak_Acquisition_Start will be rejected as long as there are unreleased frame handles.

The value for an invalid frame handle is PEAK_INVALID_HANDLE.

Function Documentation

◆ peak_Frame_Release()

peak_status peak_Frame_Release ( peak_camera_handle  hCam,
peak_frame_handle  hFrame 
)

Release a frame.

Releases a frame that was previously received from peak_Acquisition_WaitForFrame or from Xxx.

The buffer that is bound to the specified frame is unlocked, so that ist can receive new image data.

Parameters
[in]hCamThe camera handle.
[in]hFrameHandle to the frame to release.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_HANDLE hCam and/or hFrame are invalid handles.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Note
The frame handle is no longer valid after the function has returned.
peak_Acquisition_Start will be rejected as long as there are unreleased frame handles for frames that were received from peak_Acquisition_WaitForFrame.

◆ peak_Frame_Save()

peak_status peak_Frame_Save ( peak_frame_handle  hFrame,
const char *  fileName 
)

Write the frame as image to the file system.

Saves the provided frame to the specified file path. The file extension specifies the image file format that is used to save the image. Default values are used for compression and quality settings.

// acquire an image
peak_Acquisition_WaitForFrame(hCam, 5000, &hFrame);
// saves the frame as jpeg file
peak_Frame_Save(hFrame, "out.jpeg");
peak_status peak_Acquisition_WaitForFrame(peak_camera_handle hCam, uint32_t timeout_ms, peak_frame_handle *hFrame)
Wait for an acquired frame.
peak_status peak_Frame_Save(peak_frame_handle hFrame, const char *fileName)
Write the frame as image to the file system.
Note
For more configuration options and restrictions see ImageWriter
Parameters
[in]hFrameA camera frame handle
[in]fileNameThe desired file path and file name to save the image.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER fileName is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hFrame is an invalid handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.