Back to Aurora Vision Library website

You are here: Start » Function Reference » Camera Support » Hikvision » Hikvision_StartAcquisition

Hikvision_StartAcquisition


Header: ThirdPartySdk.h
Namespace: avl
Module: ThirdParty

Initializes and starts image acquisition in a device.

Syntax

void avl::Hikvision_StartAcquisition
(
	Hikvision_State& ioState,
	atl::Optional<const atl::String&> inDeviceID,
	int inInputQueueSize,
	avl::HikvisionPixelFormat::Type inPixelFormat,
	atl::Optional<const avl::Box&> inRoi,
	atl::Optional<float> inFrameRate,
	bool inFrameRateAuto,
	atl::Optional<float> inExposureTime,
	bool inExposureTimeAuto,
	atl::Optional<float> inGain,
	bool inGainAuto
)

Parameters

Name Type Range Default Description
Input will be modified ioState Hikvision_State& Object used to maintain state of the function.
Input value inDeviceID Optional<const String&> NIL Camera serial number, name or IP address, Auto = first camera
Input value inInputQueueSize int 1 - 8 Sets size of image queue (on acquisition start)
Input value inPixelFormat HikvisionPixelFormat::Type Image pixel format (set on acquisition start)
Input value inRoi Optional<const Box&> NIL Region of interest (set on acquisition start)
Input value inFrameRate Optional<float> 0.0 - NIL Sets the frame rate limit
Input value inFrameRateAuto bool True True if frame rate is not limited
Input value inExposureTime Optional<float> 0.0 - 10000.0f Sets the target exposure time in microseconds
Input value inExposureTimeAuto bool True if using automatic exposure time
Input value inGain Optional<float> 0.0 - 0.0f Sets gain in dB
Input value inGainAuto bool True if using automatic gain

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 Hikvision Machine Vision Software with camera dedicated drivers.

Hikvision Machine Vision Software can be downloaded from the following website: https://www.hikrobotics.com/en/machinevision/service/download?module=0 (registration may be required).

Add DLL path to system environment variable may be required.

Recommended Hikvision Machine Vision Software version for Aurora Vision Studio usage is 4.0.1 (DLL version 4.0.0.5).

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 - serial number of the device which can be viewed in the MVS software from Hikvision under Feature Tree / Device Control / Device Serial Number. Please note that this serial number may differ from the one printed on the device housing.
  • Camera name - user-defined ID which can be set in the MVS software from Hikvision under Feature Tree / Device Control / Device User ID.
  • IP address - ip address of the camera on the local network.
Setting bandwidth for GigEVision cameras

Bandwidth of Hikvision GigEVision cameras needs to be configured before use, otherwise packet loss and image artifacts may occur.

Open MVS software from Hikvision and connect to the camera. Open Settings / Options menu and go to Network tab. Bandwidth Control slider will be shown. To preserve new value of bandwidth after disconnecting power from the camera, you will need to save it using User Set Control parameters in Features tab.

Multithreaded environment

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

See Also