コンテンツにスキップ

Basler Vision Connector Messaging: Setting Camera Parameters#

To set the camera parameters, you can send the message described in this topic. It's possible to update a range of parameters, however, any error that may occur, resets the camera to the original state without applying any modification.

You can define enumeration parameter types using human-readable values. For example, you can set the pixel format using the Mono 8 value instead of the enumeration integer value.

For string and integer parameters, the Basler Vision Connector expects an exact match for the set value. For float parameters, a difference of no more than 1 % is allowed due to floating-point comparison. If the provided value is outside the expected range, the setting call returns an error.

The list of set values is returned in the response message.

The SetParameters command is allocated to one of the following node maps:

@CameraDevice -> CInstantCamera::GetNodeMap

@CameraInstance -> CInstantCamera::GetInstantCameraNodeMap

@DeviceTransportLayer -> CInstantCamera::GetTLNodeMap

@StreamGrabber0 -> CInstantCamera::GetStreamGrabberNodeMap

@EventGrabber -> CInstantCamera::GetEventGrabberNodeMap

If no node map is defined, the @CameraDevice default node map is used. This node map represents the camera parameters. All other commands only operate on the @CameraDevice default node map.

The syntax for using the node maps is as follows:

    "ParameterList": [
        "Width",
        "@CameraDevice/Height"
    ]

For an explanation of node maps, see the pylon API documentation.

You can find documentation about the available node maps at:

JSON Payload#

Field Optional タイプ 説明
TransactionID はい String Transaction identification
アクション いいえ String Method called. Fixed value: SetParameters
DeviceID いいえ String Device identification
ParameterList いいえ Parameter Object Array Object to encapsulate the parameters to be updated

Parameter Object#

Field Optional タイプ 説明
名前 いいえ String Unique parameter name
Valuea いいえ String/ Integer (64-bit signed)/ Float/ Bool New value

  1. On enumerations, it can be the integer value or the symbolic name. See Retrieving Parameter List for further information.

{
    "TransactionID": "123567",
    "Action": "SetParameters",
    "DeviceID": "548451887",
    "ParameterList":[
        {"Name": "@CameraDevice/Width", "Value": 800},
        {"Name": "Height", "Value": 600},
        {"Name": "PixelFormat", "Value": "Mono8"} //Setting using the human readable string. This could be also the correspondent enum integer.
    ]
}

Response Object#

Field Optional タイプ 説明
TransactionID はい String Transaction identification
ReturnCode いいえ Integer (32-bit unsigned) Message code following Message Codes
メッセージ はい String Response message
ParameterList いいえ Parameter Object Array Object to encapsulate the parameters to be updated

Parameter Object#

Field Optional タイプ 説明
名前 いいえ String Unique parameter name
いいえ String/ Integer (64-bit signed)/ Float/ Bool New value
{
    "TransactionID": "123567",
    "ReturnCode": 0,
    "Message": "Paramters updated.",
    "ParameterList":[
        {"Name": "@CameraDevice/Width", "Value": 800},
        {"Name": "Height", "Value": 600},
        {"Name": "PixelFormat", "Value": "Mono8"}
    ]
}