Back to Adaptive Vision Library website

You are here: Start » Function Reference » Camera Support » Dahua » Dahua_GrabImage

Dahua_GrabImage


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Captures a frame using Dahua.

Syntax

bool avl::Dahua_GrabImage
(
	Dahua_State& ioState,
	atl::Optional<const atl::String&> inDeviceID,
	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,
	avl::Image& outImage,
	atl::int64& outFrameID,
	atl::int64& outTimestamp
)

Parameters

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