Back to Adaptive Vision Library website

You are here: Start » Function Reference » Dahua » Dahua_GrabImage_WithTimeout

Dahua_GrabImage_WithTimeout


Header:ThirdPartySdk.h
Namespace:avl

Captures a frame using Dahua.

Syntax

bool avl::Dahua_GrabImage_WithTimeout
(
	Dahua_State& ioState,
	atl::Optional<const atl::String&> inDeviceID,
	int inTimeout,
	int inInputQueueSize,
	atl::Optional<float> inFrameRate,
	atl::Optional<float> inExposureTime,
	atl::Optional<float> inGain,
	atl::Optional<int> inBlackLevel,
	atl::Optional<bool> inTriggerEnabled,
	atl::Optional<avl::DahuaTriggerSource::Type> inTriggerSource,
	atl::Optional<avl::DahuaTriggerActivation::Type> inTriggerActivation,
	atl::Conditional < avl::Image>& outImage,
	atl::Conditional < atl::int64>& outFrameID,
	atl::Conditional < atl::int64>& outTimestamp
)

Parameters

Name Type Range Default Description
ioState Dahua_State& Object used to maintain state of the function.
inDeviceID Optional<const String&> NIL Device identifying number
inTimeout int 1 - 100 Maximum time to wait for frame in milliseconds
inInputQueueSize int 1 - 200 4 Capacity of output frames queue
inFrameRate Optional<float> NIL Requested camera frame rate in frames per second
inExposureTime Optional<float> NIL Camera frame exposition time
inGain Optional<float> NIL Analog gain of source image in device raw unit
inBlackLevel Optional<int> NIL Black level of source image
inTriggerEnabled Optional<bool> NIL Configure trigger enable
inTriggerSource Optional<DahuaTriggerSource::Type> NIL Source of acquisition trigger
inTriggerActivation Optional<DahuaTriggerActivation::Type> NIL Circumstances defining when the trigger is activated
outImage Conditional < Image>& Captured frame
outFrameID Conditional < int64>& Captured frame ID
outTimestamp Conditional < int64>& Captured frame timestamp

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 MVViewer software with camera dedicated drivers.

MVViewer can be downloaded from the following website: https://www.dahuasecurity.com/ (registration may be required).

Add DLL path to system environment variable may be required.

Recommended MVViewer version for Adaptive Vision Studio usage is 2.1.6.

Camera identification

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

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

  • Serial number - should be specified on device casing in format "vendor:serial number".
Camera parameters

Setting inInputQueueSize parameter to 'Auto' will select four value as input queue size.

All the other parameters exposed by camera filters are optional, setting them to 'Auto' leaves related parameter unchanged in camera (device default or user set configuration).

To change other, more advanced camera parameters, use specific filters.

Multithreaded environment

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

See Also