Back to Adaptive Vision Library website

You are here: Start » Function Reference » The Imaging Source » ICImagingControl_GrabImage

ICImagingControl_GrabImage


Captures a frame from The Imaging Source cameras using ICImagingControl.

Syntax

bool avl::ICImagingControl_GrabImage
(
	ICImagingControl_GrabImageState& ioState,
	const atl::Optional<atl::String> inDeviceID,
	const atl::Optional<atl::String> inColorFormat,
	const atl::Optional<avl::Box> inRoi,
	const avl::ICImagingControlColorFormat::Type inPixelFormat,
	const atl::Optional<atl::real> inFrameRate,
	const atl::Optional<int> inGain,
	const atl::Optional<int> inExposure,
	const atl::Optional<int> inGamma,
	const atl::Optional<int> inSharpness,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
ioState ICImagingControl_GrabImageState& Object used to maintain state of the function.
inDeviceID const Optional<String> NIL Serial number, display name, unique name or base name of the camera
inColorFormat const Optional<String> NIL Image color format
inRoi const Optional<Box> NIL Hardware Region of Interest
inPixelFormat const ICImagingControlColorFormat::Type Pixel format
inFrameRate const Optional<real> 1.0 - NIL Camera frame rate
inGain const Optional<int> 0 - + NIL Gain value
inExposure const Optional<int> 0 - + NIL Exposure time
inGamma const Optional<int> 0 - + NIL Gamma value
inSharpness const Optional<int> 0 - + NIL Sharpness value
outImage Image& Captured frame

Remarks

Camera driver software

This filter is intended to cooperate with a camera using its vendor SDK. To be able to connect to a camera, it is required to install ICImagingControl SDK software. Currently Adaptive Vision Studio requires ICImagingControl SDK version 3.2.

Proper camera drivers and ICImagingControl SDK (IC Imaging Control .NET Component, C++ Class Library ) can be downloaded from the following website: https://www.theimagingsource.com/support/downloads-for-windows/. After installing this SDK, you need to copy manually the .dll files from the Documents\IC Imaging Control 3.2\classlib\win32\release directory on your computer (or Documents\IC Imaging Control 3.2\classlib\x64\release if you use Adaptive Vision Studio x64) and add them to the Adaptive Vision Studio directory in Program Files.

Camera identification

When there is only one camera connected to the computer, field inDeviceID can be set to Auto. In such case, the first available camera will be found and connected.

inDeviceID can be used to pick one of multiple cameras connected to the computer. inDeviceID can be set to:

  • serial number,
  • display name,
  • unique name,
  • base name of the camera.
Camera parameters

Most of the parameters exposed by camera filters are optional, setting them to Auto leaves related parameter for automatic configuration by the camera driver.

To change other and more advanced camera parameters, use the VCD Property Inspector available with ICImagingControl SDK. Refer to SDK documentation for information about parameters and how to save them into memory channels.

Multithreaded environment

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

See Also