Skip to content

fetch_from_image_sourceFetchFromImageSourceFetchFromImageSourcefetch_from_image_sourceT_fetch_from_image_source🔗

Short description🔗

fetch_from_image_sourceFetchFromImageSourceFetchFromImageSourcefetch_from_image_sourceT_fetch_from_image_source — Fetch images and corresponding meta data from the image source buffer queue.

Signature🔗

fetch_from_image_source( out image Images, image_source ImageSourceHandle, out dict Data )void FetchFromImageSource( HObject* Images, const HTuple& ImageSourceHandle, HTuple* Data )static void HOperatorSet.FetchFromImageSource( out HObject images, HTuple imageSourceHandle, out HTuple data )def fetch_from_image_source( image_source_handle: HHandle ) -> Tuple[HObject, HHandle]

Herror T_fetch_from_image_source( Hobject* Images, const Htuple ImageSourceHandle, Htuple* Data )

HImage HImageSource::FetchFromImageSource( HDict* Data ) const

HImage HImageSource.FetchFromImageSource( out HDict data )

Description🔗

fetch_from_image_sourceFetchFromImageSource fetches Imagesimagesimages from the buffer queue of the image source defined in the handle ImageSourceHandleimageSourceHandleimage_source_handle. For conventional devices, Imagesimagesimages is most likely to be a single image, but complex sensors, e.g. 3D sensors, might provide multiple images at once. Additionally, meta information is returned in Datadatadata.

fetch_from_image_sourceFetchFromImageSource tries to pull images from the buffer queue of the image source and deliver it to the application. If the buffer queue is empty, the operator waits for an image to arrive in the buffer queue up to the configured timeout value (see 'fetch_timeout'"fetch_timeout" in get_image_source_paramGetImageSourceParam). If images have arrived in the buffer queue before the call of fetch_from_image_sourceFetchFromImageSource it returns immediately by pulling one buffer from the queue and delivering its contained images. The operator runtime depends on various factors like for example the state of the buffer queue and the current configuration of the imaging device. See 'num_buffers'"num_buffers" in get_image_source_paramGetImageSourceParam on how to adapt the buffer queue capacity.

Based on availability, the returned meta information in the Datadatadata dictionary contains the following:

  • In the sub-dictionary 'buffer_info'"buffer_info":

    • 'frame_id'"frame_id" Linearly increasing image counter transmitted by the device alongside the image data. Inconsistencies in the counter sequence indicate lost buffers.

    • 'is_incomplete'"is_incomplete" Completeness status of the acquired data. Incomplete data might indicate data transmission problems.

      List of values: 00 (complete), 11 (incomplete).

    • 'timestamp_ns'"timestamp_ns" Timestamp [ns] of the image transmitted by the device alongside the image data. It reflects the value of the devices internal clock at the moment of exposure.

  • In the sub-dictionary 'chunk_data'"chunk_data":

    If supported and activated on the device side, GenICam chunk data received alongside the image is returned here. This mechanism is usually controlled by the device parameters 'ChunkModeActive'"ChunkModeActive", 'ChunkSelector'"ChunkSelector", and 'ChunkEnable'"ChunkEnable".

    In some cases it is not possible to return all chunk-related values via this output dictionary. For example, chunks that either select or are selected by others are not returned here. Therefore it is also possible to query the chunk values with get_image_source_paramGetImageSourceParam directly.

The device and a corresponding stream defined in ImageSourceHandleimageSourceHandleimage_source_handle need to be connected and started when calling fetch_from_image_sourceFetchFromImageSource. See connect_image_sourceConnectImageSource on how to connect and start_image_sourceStartImageSource on how to start your image source.

For further information about the states of an image source see Image Source.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

Imagesimagesimages (output_object) image(-array) → object (byte / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real)HImage (byte / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real)Hobject * (byte / int1 / int2 / uint2 / int4 / int8 / real)

Retrieved images.

ImageSourceHandleimageSourceHandleimage_source_handle (input_control) image_source → (handle)HTuple (HHandle)HImageSource, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the image source whose buffer queue should be accessed.

Datadatadata (output_control) dict → (handle)HTuple (HHandle)HDict, HTuple (IntPtr)HHandleHtuple (handle)

Meta information about the images.

Result🔗

If the parameter values are correct, fetch_from_image_sourceFetchFromImageSource returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

start_image_sourceStartImageSource

Possible successors

stop_image_sourceStopImageSource

Module🔗

Foundation