You are here: Start » Function Reference » Camera Support » IDS » IDS_GrabImage
Header: | ThirdPartySdk.h |
---|---|
Namespace: | fil |
Module: | ThirdParty |
Captures an image from an IDS camera.
Syntax
bool fil::IDS_GrabImage ( IDS_BaseState& ioState, const ftl::Optional<ftl::String>& inDeviceID, const ftl::String& inPixelFormat, int inInputQueueSize, bool inAutoReconnect, const ftl::Optional<fil::IDSTriggerMode::Type>& inTriggerMode, const ftl::Optional<fil::Box>& inAoi, const ftl::Optional<float>& inFrameRate, const ftl::Optional<float>& inExposureTime, const ftl::Optional<fil::IDSBinning::Type>& inHorizontalBinning, const ftl::Optional<fil::IDSBinning::Type>& inVerticalBinning, const ftl::Optional<fil::IDSMirror::Type>& inMirror, const ftl::Optional<bool>& inAutoBlackLevel, const ftl::Optional<int>& inBlackLevelOffset, const ftl::Optional<int>& inGamma, const ftl::Optional<bool>& inGainBoost, const ftl::Optional<int>& inGainMaster, const ftl::Optional<int>& inGainRed, const ftl::Optional<int>& inGainGreen, const ftl::Optional<int>& inGainBlue, fil::Image& outImage, ftl::int64& outFrameNumber, ftl::int64& outTimestamp )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
ioState | IDS_BaseState& | Object used to maintain state of the function. | ||
![]() |
inDeviceID | const Optional<String>& | NIL | Device serial number or user definable camera ID | |
![]() |
inPixelFormat | const String& | \"Mono8\" | Pixel format. Supported values: Raw8, Mono8, Rgb8, Bgr8, Rgba8, Bgra8 | |
![]() |
inInputQueueSize | int | 1 - ![]() |
3 | Capacity of input frames queue |
![]() |
inAutoReconnect | bool | True | Automatically reconnect with the camera | |
![]() |
inTriggerMode | const Optional<IDSTriggerMode::Type>& | NIL | Camera trigger mode | |
![]() |
inAoi | const Optional<Box>& | NIL | Required fragment of image to stream | |
![]() |
inFrameRate | const Optional<float>& | 0.1 - 400.0 | NIL | Frame rate |
![]() |
inExposureTime | const Optional<float>& | 0.0 - ![]() |
NIL | Exposure time in microseconds |
![]() |
inHorizontalBinning | const Optional<IDSBinning::Type>& | NIL | Horizontal binning | |
![]() |
inVerticalBinning | const Optional<IDSBinning::Type>& | NIL | Vertical binning | |
![]() |
inMirror | const Optional<IDSMirror::Type>& | NIL | Mirror effect | |
![]() |
inAutoBlackLevel | const Optional<bool>& | NIL | Enable auto black level | |
![]() |
inBlackLevelOffset | const Optional<int>& | 0 - ![]() |
NIL | Black level offset |
![]() |
inGamma | const Optional<int>& | 1 - 1000 | NIL | Set gamma value |
![]() |
inGainBoost | const Optional<bool>& | NIL | Set gain boost mode | |
![]() |
inGainMaster | const Optional<int>& | 0 - 100 | NIL | Set gain master value |
![]() |
inGainRed | const Optional<int>& | 0 - 100 | NIL | Set gain red value |
![]() |
inGainGreen | const Optional<int>& | 0 - 100 | NIL | Set gain green value |
![]() |
inGainBlue | const Optional<int>& | 0 - 100 | NIL | Set gain blue value |
![]() |
outImage | Image& | Output image | ||
![]() |
outFrameNumber | int64& | Output frame number | ||
![]() |
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/download-ueye.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 FabImage Studio.
Recommended IDS SDK version for FabImage Studio usage is 4.94.
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 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\FabImage Studio 4.x Professional\Sources\UserFilters\IDS
Typically it is:
C:\Users\Public Documents\FabImage Studio 4.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
See Also
- IDS_GrabImage_WithTimeout – Captures an image from an IDS camera.
- IDS_StartAcquisition – Initialize2s and starts image acquisition in a camera.
- IDS_LoadParameterSet – Loads specific camera parameters.
- IDS_ForceTrigger – Forces software-controlled captures of an image while a capturing process triggered by hardware is in progress.