Back to Adaptive Vision Library website

You are here: Start » Function Reference » AXIS » AXIS_GrabImage

AXIS_GrabImage


Header:ThirdPartySdk.h
Namespace:avl

Captures a frame using AXIS.

Syntax

bool avl::AXIS_GrabImage
(
	AXIS_GrabImageState& ioState,
	const atl::String& inAddress,
	int inCameraID,
	atl::Optional<const atl::String&> inLogin,
	atl::Optional<const atl::String&> inPassword,
	atl::Optional<avl::AXISResolution::Type> inResolution,
	atl::Optional<avl::AXISRotation::Type> inRotation,
	atl::Optional<int> inCompression,
	atl::Optional<const atl::String&> inTextString,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
ioState AXIS_GrabImageState& Object used to maintain state of the function.
inAddress const String& Source device host or ip address
inCameraID int 1 - 4 ID of camera
inLogin Optional<const String&> NIL Login for Basic authorization
inPassword Optional<const String&> NIL Login for Basic authorization
inResolution Optional<AXISResolution::Type> NIL Resolution of the returned image
inRotation Optional<AXISRotation::Type> NIL Rotates the image clockwise
inCompression Optional<int> 0 - 100 NIL Compression level of the image
inTextString Optional<const String&> NIL
outImage Image& Output image

Remarks

Camera identification

Camera is identified by two inputs:

  • inAddress - server name or IP address of camera. It is not a http address using to view image by website. For example:
    http://my.camera.com/folder/view/viewer_index.shtml?id=217
    
    inAddress is
    http://my.camera.com/folder/
    
  • inCameraID - camera source. Applies only to video servers with more than one video input.
Changing parameters

AXIS Camera support is based on MJPEG streaming, and after changing any parameter the connection must be reset.

The simplest way to reset connection is to stop and restart the program.

Multithreaded environment

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

Errors

List of possible exceptions:

Error type Description
DomainError Empty inAddress in AXIS_GrabImage.