Back to Aurora Vision Library website

You are here: Start » Function Reference » Camera Support » IDS » IDS_GrabImage

IDS_GrabImage


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Captures an image from an IDS camera.

Syntax

bool avl::IDS_GrabImage
(
	IDS_BaseState& ioState,
	const atl::Optional<atl::String>& inDeviceID,
	const atl::String& inPixelFormat,
	int inInputQueueSize,
	bool inAutoReconnect,
	const atl::Optional<avl::IDSTriggerMode::Type>& inTriggerMode,
	const atl::Optional<avl::Box>& inAoi,
	const atl::Optional<float>& inFrameRate,
	const atl::Optional<float>& inExposureTime,
	const atl::Optional<avl::IDSBinning::Type>& inHorizontalBinning,
	const atl::Optional<avl::IDSBinning::Type>& inVerticalBinning,
	const atl::Optional<avl::IDSMirror::Type>& inMirror,
	const atl::Optional<bool>& inAutoBlackLevel,
	const atl::Optional<int>& inBlackLevelOffset,
	const atl::Optional<int>& inGamma,
	const atl::Optional<bool>& inGainBoost,
	const atl::Optional<int>& inGainMaster,
	const atl::Optional<int>& inGainRed,
	const atl::Optional<int>& inGainGreen,
	const atl::Optional<int>& inGainBlue,
	avl::Image& outImage,
	atl::int64& outFrameNumber,
	atl::int64& outTimestamp
)

Parameters

Name Type Range Default Description
Input will be modified ioState IDS_BaseState& Object used to maintain state of the function.
Input value inDeviceID const Optional<String>& NIL Device serial number or user definable camera ID
Input value inPixelFormat const String& \"Mono8\" Pixel format. Supported values: Raw8, Mono8, Rgb8, Bgr8, Rgba8, Bgra8
Input value inInputQueueSize int 1 - 3 Capacity of input frames queue
Input value inAutoReconnect bool True Automatically reconnect with the camera
Input value inTriggerMode const Optional<IDSTriggerMode::Type>& NIL Camera trigger mode
Input value inAoi const Optional<Box>& NIL Required fragment of image to stream
Input value inFrameRate const Optional<float>& 0.1 - 400.0 NIL Frame rate
Input value inExposureTime const Optional<float>& 0.0 - NIL Exposure time in microseconds
Input value inHorizontalBinning const Optional<IDSBinning::Type>& NIL Horizontal binning
Input value inVerticalBinning const Optional<IDSBinning::Type>& NIL Vertical binning
Input value inMirror const Optional<IDSMirror::Type>& NIL Mirror effect
Input value inAutoBlackLevel const Optional<bool>& NIL Enable auto black level
Input value inBlackLevelOffset const Optional<int>& 0 - NIL Black level offset
Input value inGamma const Optional<int>& 1 - 1000 NIL Set gamma value
Input value inGainBoost const Optional<bool>& NIL Set gain boost mode
Input value inGainMaster const Optional<int>& 0 - 100 NIL Set gain master value
Input value inGainRed const Optional<int>& 0 - 100 NIL Set gain red value
Input value inGainGreen const Optional<int>& 0 - 100 NIL Set gain green value
Input value inGainBlue const Optional<int>& 0 - 100 NIL Set gain blue value
Output value outImage Image& Output image
Output value outFrameNumber int64& Output frame number
Output value outTimestamp int64& Output image timestamp

Remarks

Camera driver software

This filter is intended to cooperate with cameras using their vendor's SDK. In order to connect with the camera, it is required to install IDS SDK software.

IDS SDK can be downloaded from the following website: https://en.ids-imaging.com/downloads.html

To verify the driver installation, you can run IDS Camera Manager. If the camera was detected and you can see the view from the camera, you can use IDS SDK in Aurora Vision Studio.

Recommended IDS SDK version for Aurora Vision Studio usage is 4.96.1.

Camera identification

When there is only one IDS camera connected, the field inDeviceID can be set to Auto. In this situation, the first available camera will be used.

inDeviceID can be used to pick one of multiple cameras connected to the computer. inDeviceID should be set to device serial number or user definable camera ID.

Source code

In Professional edition this filter is open source. You can use this filter as reference when implementing support for your specific hardware. You can also modify this filter and add some additional functionality.

The source code is located in the directory:

Public Documents\Aurora Vision Studio 5.x Professional\Sources\UserFilters\IDS

Typically it is:

C:\Users\Public Documents\Aurora Vision Studio 5.x Professional\Sources\UserFilters\IDS 
Working with camera

If you work with USB cameras, then inAutoReconnect parameter as well as camera disconnection detection may not work. To enable these features in USB cameras, IDS SDK requires the user to manually add the following registry key:

 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ueye\Parameters
 DWORD DevChangeHandlerMode = 1

Multithreaded environment

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

See Also

  • IDS_ForceTrigger – Forces software-controlled captures of an image while a capturing process triggered by hardware is in progress.