Back to Adaptive Vision Library website

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

Dahua_StartAcquisition


Header:ThirdPartySdk.h
Namespace:avl

Initializes and starts image acquisition in a camera.

Syntax

void avl::Dahua_StartAcquisition
(
	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
)

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
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

Remarks

This filter is intended for establishing connection with a Dahua camera device using MVViewer interface, to initialize image streaming. It is only needed when explicit image acquisition start is required in the initial phase of a program. For example, it can be used to prepare a camera, running in triggered mode, to be able to capture trigger signals before the first invoke of Dahua_GrabImage or to start multiple cameras in sync before the acquisition phase.

The use of this filter is not obligatory. Dahua_GrabImage or Dahua_GrabImage_WithTimeout] filters will initialize and start image acquisition upon their first invoke.

This filter has no effect when invoked for the second time and when invoked after image grabbing filters.

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