Skip to content

PTZ Motion Control

Overview

The ONVIF Device service provides functions to control the Pan, Tilt and Zoom. The PTZ model groups the possible movements of the PTZ unit into a pan/tilt/zoom component. To control the PTZ device, the ONVIF Device Service provides operations GetStatus, RelativeMove and AbsoluteMove.

GetStatus

Definition

A PTZ device shall be able to report its PTZ status through the Get command. For more detailed information, refer to GetStatus.

The PTZ status contains the following information:

  • Position: Specifies the absolute position of the PTZ device together with the space references.
  • MoveStatus: Indicates if the pan/tilt/zoom device unit is currently moving, idle or in an unknown state.

Request

This operation requires the ProfileToken which is a reference to an existing media profile through the Get command.

{
    "ProfileToken": "profile_1"
}

RelativeMove

Definition

Operation for Relative Pan/Tilt and Zoom Move. For more detailed information, refer to RelativeMove.

Request

  • ProfileToken: Reference to an existing media profile.
  • Translation: specify the positional translation relative to the current position.
  • Speed: specify speed vector, the range is 0 (stopped) to 1 (full speed)

The following json payload is an example of RelativeMove:

{
    "ProfileToken": "profile_1",
    "Translation": {
        "PanTilt": {
            "x": -10,
            "y": -10
        },
        "Zoom":{
            "x": 10
        }
    },
    "Speed": {
        "PanTilt": {
            "x": 1,
            "y": 0.5
        },
        "Zoom":{
            "x": 0.5
        }
    }              
}

AbsoluteMove

Definition

Operation for Absolute Pan/Tilt and Zoom Move. For more detailed information, refer to AbsoluteMove.

Request

  • ProfileToken: Reference to an existing media profile.
  • Translation: specify the positional translation relative to the current position.
  • Speed: specify speed vector.

The following json payload is an example of AbsoluteMove:

{
    "ProfileToken": "profile_1",
    "Position": {
        "PanTilt": {
            "x": -10,
            "y": -10
        },
        "Zoom":{
            "x": 10
        }
    },
    "Speed": {
        "PanTilt": {
            "x": 1,
            "y": 0.5
        },
        "Zoom":{
            "x": 0.5
        }
    }              
}