Back to Aurora Vision Library website

You are here: Start » Function Reference » Camera Support » XIMEA » XiApi_GrabImage_WithTimeout

XiApi_GrabImage_WithTimeout


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Captures an image from a XIMEA camera.

Syntax

bool avl::XiApi_GrabImage_WithTimeout
(
	XIAPIState& ioState,
	const atl::Optional<atl::String>& inDeviceID,
	int inTimeout,
	avl::XiApiImageDataFormat::Type inImageDataFormat,
	atl::Optional<const avl::XiApiTriggerSource::Type&> inTriggerSource,
	atl::Optional<const avl::XiApiDownsampling::Type&> inDownsampling,
	atl::Optional<int> inExposureTime,
	atl::Optional<float> inGain,
	atl::Optional<const avl::Box&> inAoi,
	atl::Optional<bool> inBadPixelCorrection,
	atl::Optional<bool> inAutomaticExposureGain,
	atl::Conditional<avl::Image>& outImage,
	atl::Conditional<atl::int64>& outFrameID,
	atl::Conditional<atl::int64>& outTimestamp
)

Parameters

Name Type Range Default Description
Input will be modified ioState XIAPIState& Object used to maintain state of the function.
Input value inDeviceID const Optional<String>& NIL Camera chip ID or camera index
Input value inTimeout int 0 - 100 Maximum time to wait for frame in milliseconds
Input value inImageDataFormat XiApiImageDataFormat::Type Output data format
Input value inTriggerSource Optional<const XiApiTriggerSource::Type&> NIL Defines source of trigger
Input value inDownsampling Optional<const XiApiDownsampling::Type&> NIL Changes image resolution by binning or skipping
Input value inExposureTime Optional<int> 0 - + NIL Exposure time in microseconds
Input value inGain Optional<float> NIL Gain in dB
Input value inAoi Optional<const Box&> NIL Required fragment of image to stream
Input value inBadPixelCorrection Optional<bool> NIL Correction of bad pixels
Input value inAutomaticExposureGain Optional<bool> NIL Automatic exposure gain
Output value outImage Conditional<Image>& Captured frame
Output value outFrameID Conditional<int64>& Captured frame ID
Output value outTimestamp Conditional<int64>& Captured frame timestamp

Description

To be able to use a XIMEA camera, you need to install camera driver. You can find it at the following address (select binaries):

https://www.ximea.com/support/wiki/apis/XIMEA_API_Software_Package

Pleas make sure that xiApi SDK is properly installed on your computer. To verify the driver installation, you can run xiApiViewer.exe. If the camera was detected and you can see the image from it, you can use your XIMEA camera in Aurora Vision Studio.

Recommended xiApi SDK version for Aurora Vision Studio usage is 4.26.

Setting parameters

All the auto parameters (those with checkboxes in the Property window) are initially set to the default values of the camera (they are not changed in Aurora Vision Studio). You can modify them by checking a checkbox and entering your own value.

The inDeviceID parameter is set only once when the filter is executed for the first time (if it set to Auto, the first available camera in the system will be used). All the other parameters are set during the first filter execution or when the parameter is changed (they are not set in every iteration when the value is not changed).

In inAoi parameter, the values of X, Y and Height should be even and the value of Width should be divisible by 4 or 16 (the exact value depends on the camera model).

To set more complex parameters, please use one of the following filters: XiApi_SetParamInt, XiApi_SetParamFloat. Please note, that if you set some parameter value in the XiApi_GrabImage filter you should not modify it by xiApi_SetParamXxx filter - it may cause problems.

Remarks

The full description of camera parameters can be found at the XIMEA website .

Alternatively you can also use GenICam filters to work with XIMEA cameras. Please refer to the article Working with Gen TL devices.

Multithreaded environment

This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.

See Also