IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
comfortSDK
The comfortSDK creates all necessary buffers when calling "peak_Acquisition_Start" if the buffers do not already exist.
comfortC |
---|
peak_status status = PEAK_STATUS_SUCCESS; |
genericSDK
To receive images from the camera, you must first create a DataStream object. Additionally, you create a NodeMap to access the nodes of the DataStream object (see Setting camera parameters).
genericC++ |
---|
auto dataStreams = device->DataStreams(); |
You can query the data volume required for a buffer via the PayloadSize node in the DataStream NodeMap. This buffer must be created so that the camera can transfer the image data to the IDS peak API after each captured image. PayloadSize depends on the image size, the source pixel format, and on whether additional information (chunks) on the image is transmitted besides the image data (see Setting ROI (region of interest) or Chunks (metadata)).
The image acquisition works with several buffers, at least 2 buffers are always required. While the image data is transferred to one buffer, the other buffer can be used by the application ("double buffering"). However, it is recommended to allocate more than 2 buffers. In this way, you can prevent images from being lost more effectively if, for example, the host system is briefly unable to process an image. If this happens, the number of concurrent buffers would go up for a short time until the host can retrieve the images. Note that this method can only handle short workload peaks, but not permanent overloads in the host system. The buffers are added to the so-called "buffer pool", from which the IDS peak API gets as required.
You can query how many buffers are required as a minimum for image acquisition via the dataStream->NumBuffersAnnouncedMinRequired() function. You can also use a larger number of buffers.
Creating buffers automatically by IDS peak API
1.Set the image size (see Setting ROI (region of interest)). This automatically defines the PayloadSize.
2.Query the PayloadSize (required size in bytes) for a buffer memory.
3.Query the minimum number of buffers required.
4.Allocate the buffer and announce it to the system ("AllocAndAnnounce").
5.Add the buffer to the "Buffer Pool" ("QueueBuffer").
genericC++ |
---|
// Set ROI |
Remove and release buffers from the buffer pool at the end of image acquisition
genericC++ |
---|
if (dataStream) |