Skip to main content

Stitching

Description

The Stitching API documentation introduces you to the steps that lets you set the blending amount and parallax compensation distance in order to reach optimized alignment in a panoramic video stream. By using this API you will also be able to align the sensor images in a panoramic view in the event that one or several sensors have been moved from their original position.

Model

The API implements stitching.cgi as its communications interface and supports the following methods:

MethodDescription
getSupportedVersionsRetrieves API versions supported by your device.
getCapabilitiesRetrieves stitching capabilities available on your device.
getBlendingAmountRetrieves the current blending amount.
setBlendingAmountSets the blending amount.
getParallaxCompensationDistanceRetrieves the current distance to an object.
setParallaxCompensationDistanceSets the distance to an object (in meters).
rotateAngleRotates a sensor ID.
restoreRestores a sensor ID to the factory default setting, i.e. removes all changes made with: setBlendingAmount setParallaxCompensationDistance rotateAngle
getHorizonStraighteningPropertiesRetrieves the value of horizon straightening tilt, if horizon straightening stretch is enabled, and the stretch amount.
setHorizonStraighteningEnabledEnables or disables horizon straightening.
getHorizonStraighteningEnabledRetrieves if horizon straightening is enabled.
setHorizonStraighteningTiltSets horizon straightening tilt to make the straight horizon not in the middle of the image.
setHorizonStraighteningStretchEnabledEnables or disables horizon straightening stretch.
setHorizonStraighteningStretchAmountSets the horizon straightening stretch amount.
getFieldOfViewRetrieves the value of horizontal and vertical field of view.

Identification

  • API Discovery: id=stitching

Use cases

Retrieve supported API versions and capabilities

Use these examples to retrieve a list of API versions and information about what parts of the stitching.cgi are supported by your device.

Retrieve supported API versions

  1. Request a list containing the API versions supported by your device.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"context": "abc",
"method": "getSupportedVersions"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getSupportedVersions",
"data": {
"apiVersions": [
"1.0",
"2.1",
"3.0"
]
}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getSupportedVersions",
"error": {
"code": 8000,
"message": "Internal error, could not complete request."
}
}

API references

getSupportedVersions

Retrieve supported capabilities

  1. Request a list containing supported stitching.cgi capabilities.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "getCapabilities"
}
  1. Parse the JSON response, which should include a list containing the supported methods.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getCapabilities",
"data": {
"capabilities": {
"getBlendingAmount": true,
"setBlendingAmount": true,
"getParallaxCompensationDistance": true,
"setParallaxCompensationDistance": true,
"rotateAngle": true,
"restore": true
}
"limits": {
"blendingAmountMin": 0.0,
"blendingAmountMax": 100.0,
"parallaxCompensationDistanceMin": 1.0,
"parallaxCompensationDistanceMax": 50.0,
"idMin": 0,
"idMax": 3,
"angleMin": -180,
"angleMax": 180
}
}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getCapabilities",
"error": {
"code": 2003,
"message": "The requested API version is not supported."
}
}

API references

getCapabilities

Change blending amount

Use these examples to change the blending amount, which makes seams between sensor images appear sharper or blurrier.

Retrieve blending amount

  1. Request the current value of the blending amount.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "getBlendingAmount"
}
  1. Parse the JSON response, which should include the current value of the blending amount.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getBlendingAmount",
"data": {
"blendingAmount": 50.0
}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getBlendingAmount",
"error": {
"code": 2004,
"message": "Method not supported."
}
}

API references

getBlendingAmount

Set blending amount

  1. Set a new blending amount value.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "setBlendingAmount"
"params": {
"blendingAmount": 75.0
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "setBlendingAmount",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "setBlendingAmount",
"error": {
"code": 2004,
"message": "Method not supported."
}
}

API references

setBlendingAmount

Change parallax compensation distance

Use these examples to change the parallax compensation distance so that the most important object is aligned around the seams.

Retrieve parallax compensation distance

  1. Request the current value of the parallax compensation distance.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "getParallaxCompensationDistance"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getParallaxCompensationDistance",
"data": {
"parallaxCompensationDistance": 10.0
}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "getParallaxCompensationDistance",
"error": {
"code": 2004,
"message": "Method not supported."
}
}

API references

getParallaxCompensationDistance

Set parallax compensation distance

  1. Set the new value for the parallax compensation distance.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "setParallaxCompensationDistance"
"params": {
"parallaxCompensationDistance": 20.0
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "setParallaxCompensationDistance",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "setParallaxCompensationDistance",
"error": {
"code": 2004,
"message": "Method not supported."
}
}

API references

setParallaxCompensationDistance

Align the sensor images in a panoramic view

Use these examples to align the sensor images in a panoramic view in the event that they have become unaligned.

Pan the sensor

  1. Pan sensor 2 by 0.05 degrees.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle"
"params": {
"id": 2,
"axis": "pan",
"angle": 0.05
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"error": {
"code": 1000,
"message": "Invalid parameter value."
}
}

Tilt the sensor

  1. Tilt sensor 0 by 0.15 degrees.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle"
"params": {
"id": 0,
"axis": "tilt",
"angle": 0.15
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"error": {
"code": 1000,
"message": "Invalid parameter value."
}
}

Roll the sensor

  1. Roll sensor 3 by -0.2 degrees.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle"
"params": {
"id": 3,
"axis": "roll",
"angle": -0.2
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "rotateAngle",
"error": {
"code": 4001,
"message": "Mandatory input parameter was not found in the input."
}
}

API references

rotateAngle

Restore settings back to factory default

Use this example to restore the device settings to factory default. This is useful when you have made changes to either the blending amount, parallax compensation distance or alignment in the previous examples and want to return to the original settings.

  1. Undo the current actions on sensor 0 with the restore method. This will restore the configuration back to factory default.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.0",
"context": "abc",
"method": "restore"
"params": {
"id": 0,
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "restore",
"data": {}
}

Error response example

{
"apiVersion": "3.0",
"context": "abc",
"method": "restore",
"error": {
"code": 1000,
"message": "Invalid parameter value."
}
}

API references

restore

Enable or disable horizon straightening

Use these examples to enable horizon straightening to make the horizon to be straight, or disable horizon straightening.

Enable horizon straightening

  1. Use a supported version to enable horizon straightening.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"params": {
"horizonStraighteningEnabled": true
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"error": {
"code": 2300,
"message": "Internal vipd error, could not complete request."
}
}

Disable horizon straightening

  1. Use a supported version to disable horizon straightening.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"params": {
"horizonStraighteningEnabled": false
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningEnabled",
"error": {
"code": 2004,
"message": "Method not supported."
}
}

API references

setHorizonStraighteningEnabled

Check if horizon straightening is enabled

Use this example to check if horizon straightening is enabled.

  1. Use a supported version to retrieve horizon straightening.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningEnabled"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningEnabled",
"data": {
"enabled": true
}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningEnabled",
"error": {
"code": 2213,
"message": "Operation is not supported."
}
}

API references

getHorizonStraighteningEnabled

Change horizon straightening tilt

Use these examples to change the horizon straightening tilt to make the straight horizon not in the middle of the image.

Retrieve horizon straightening properties

  1. Request the horizon straightening properties.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"data": {
"horizonStraighteningTilt": 10.0,
"horizonStraighteningStretchEnabled": true,
"horizonStraighteningStretchAmount": 50.0
}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"error": {
"code": 2215,
"message": "Horizon Straightening is not enabled."
}
}

API references

getHorizonStraighteningProperties

Set horizon straightening tilt

  1. Set a new value for horizon straightening tilt.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningTilt",
"params": {
"horizonStraighteningTilt": 10
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningTilt",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningTilt",
"error": {
"code": 2213,
"message": "Operation is not supported."
}
}

API references

setHorizonStraighteningTilt

Enable or disable horizon straightening stretch

Use these examples to enable or disable horizon straightening stretch to hide or show the black areas in the corners of the image.

Retrieve horizon straightening properties

  1. Request the horizon straightening properties.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"data": {
"horizonStraighteningTilt": 10.0,
"horizonStraighteningStretchEnabled": true,
"horizonStraighteningStretchAmount": 50.0
}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"error": {
"code": 2215,
"message": "Horizon Straightening is not enabled."
}
}

API references

getHorizonStraighteningProperties

Enable horizon straightening stretch

  1. Use a supported version to enable horizon straightening stretch.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"params": {
"horizonStraighteningStretchEnabled": true
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"error": {
"code": 2213,
"message": "Operation is not supported."
}
}

Disable horizon straightening stretch

  1. Use a supported version to disable horizon straightening stretch.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"params": {
"horizonStraighteningStretchEnabled": false
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchEnabled",
"error": {
"code": 2213,
"message": "Operation is not supported."
}
}

API references

setHorizonStraighteningStretchEnabled

Change horizon straightening stretch amount

Use these examples to change the horizon straightening stretch amount.

Retrieve horizon straightening properties

  1. Request the horizon straightening properties.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"data": {
"horizonStraighteningTilt": 10.0,
"horizonStraighteningStretchEnabled": true,
"horizonStraighteningStretchAmount": 50.0
}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"error": {
"code": 2215,
"message": "Horizon Straightening is not enabled."
}
}

API references

getHorizonStraighteningProperties

Set horizon straightening stretch amount

  1. Set a new value for horizon straightening stretch amount.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchAmount",
"params": {
"horizonStraighteningStretchAmount": 50
}
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchAmount",
"data": {}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "setHorizonStraighteningStretchAmount",
"error": {
"code": 2216,
"message": "Horizon Straightening stretch is disabled."
}
}

API references

setHorizonStraighteningStretchAmount

Get horizontal and vertical field of view

Use this example to get the supported horizontal and vertical field of view.

  1. Use a supported version to retrieve supported horizontal and vertical field of view.
http://<servername>/axis-cgi/stitching.cgi

JSON input parameters

{
"apiVersion": "3.2",
"context": "my context",
"method": "getFieldOfView"
}
  1. Parse the JSON response.

Successful response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getFieldOfView",
"data": {
"hFoV": 180,
"vFoV": 90
}
}

Error response example

{
"apiVersion": "3.2",
"context": "my context",
"method": "getFieldOfView",
"error": {
"code": 2003,
"message": "The requested API version is not supported."
}
}

API references

getFieldOfView

API specifications

getSupportedVersions

This method is used when you want to retrieve a list of API versions supported by your device. The list will consist of the major API versions along with their highest supported minor version. Please note that the version is for the API as a whole, i.e. all methods supported by stitching.cgi.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"context": <string>,
"method": "getSupportedVersions"
}
ParameterDescription
context=<string>The context set by the user and echoed in the response (optional).
method=<"getSupportedVersions">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getSupportedVersions",
"data": {
"apiVersions": [
<string>,
<string>
]
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getSupportedVersions"The requested method.
data=<JSON object>Container for the response specific parameter listed below.
apiVersions=<array>The supported API versions in the format "Major.Minor", i.e. 1.4 or 2.1.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getSupportedVersions",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getSupportedVersions">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

getCapabilities

This method is used when you want to retrieve a list of stitching.cgi methods supported on your device.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "getCapabilities"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getCapabilities">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getCapabilities",
"data": {
"capabilities": {
"getBlendingAmount": <boolean>,
"setBlendingAmount": <boolean>,
"getParallaxCompensationDistance": <boolean>,
"setParallaxCompensationDistance": <boolean>,
"rotateAngle": true,
"restore": true
},
"limits": {
"blendingAmountMin": <number>,
"blendingAmountMax": <number>,
"parallaxCompensationDistanceMin": <number>,
"parallaxCompensationDistanceMax": <number>,
"idMin": <number>,
"idMax": <number>,
"angleMin": <number>,
"angleMax": <number>
}
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getCapabilities"The requested method.
data=<JSON object>Container for the response specific parameters listed below.
capabilities=<JSON object>Container for the method support responses.
getBlendingAmount=<boolean>Value can be either true or false depending on if the method is supported.
setBlendingAmount=<boolean>Value can be either true or false depending on if the method is supported.
getParallaxCompensationDistance=<boolean>Value can be either true or false depending on if the method is supported.
setParallaxCompensationDistance=<boolean>Value can be either true or false depending on if the method is supported.
rotateAngle=<boolean>Value can be either true or false depending on if the method is supported.
restore=<boolean>Value can be either true or false depending on if the method is supported.
limits=<JSON object>Container for the limits responses.
blendingAmountMin=<number>The minimum blending amount value used for setBlendingAmount.
blendingAmountMax=<number>The maximum blending amount value used for setBlendingAmount.
parallaxCompensationDistanceMin=<number>The minimum parallax compensation distance value used for setParallaxCompensationDistance.
parallaxCompensationDistanceMax=<number>The maximum parallax compensation distance value used for setParallaxCompensationDistance.
idMin=<number>The minimum id value used for rotateAngle and restore.
idMax=<number>The maximum id value used for rotateAngle and restore.
angleMin=<number>The minimum angle value used for rotateAngle .
angleMax=<number>The maximum angle value used for rotateAngle .

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getCapabilities",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getCapabilities">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

getBlendingAmount

This method is used when you want to return the current blending amount value.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "getBlendingAmount"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getBlendingAmount">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getBlendingAmount",
"data": {
"blendingAmount": <number>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getBlendingAmount"The requested method.
data=<JSON object>Container for the response specific parameters listed below.
blendingAmount=<number>The returned value that specifies the current amount of blurriness around the image seams.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getBlendingAmount",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getBlendingAmount">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

setBlendingAmount

This method is used when you want to set a new blending amount value. Changing this value is useful when there are differences in the white balance between sensors.

It is generally a good idea to set the blending amount to 0 when there is only one object at the same distance as the parallax compensation distance around the seams. This will add a sharp transition between seams, however, in cases where there are many different objects at different distances around the seams it is usually better to increase the blending amount. Doing this will blur our any skewered alignments that might occur around the seams.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setBlendingAmount"
"params": {
"blendingAmount": <number>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"setBlendingAmount">The requested method.
params=<JSON object>Container for method specific parameters.
blendingAmount=<number>Specifies the new value with a range between 0–100. The value can be entered as a <number> and when using decimals only the 15 first are used. 0 = sharp edges with no blurriness. 100 = maximum blurriness.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setBlendingAmount",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setBlendingAmount"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setBlendingAmount",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setBlendingAmount">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2204Failed to apply blending.
2214Blending is disabled.

See General error codes for a complete list of potential errors.

getParallaxCompensationDistance

This method is used when you want to retrieve the value for the parallax compensation distance.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "getParallaxCompensationDistance"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getParallaxCompensationDistance">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getParallaxCompensationDistance",
"data": {
"parallaxComensationDistance": <number>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getParallaxCompensationDistance"The requested method.
data=<JSON object>Container for the response specific parameter listed below.
parallaxCompensationDistance=<number>The returned value where the alignment is currently being calculated, measured in meters.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getParallaxCompensationDistance",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getParallaxCompensationDistance">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

setParallaxCompensationDistance

This method is used when you want to set a new value for the parallax compensation distance.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setParallaxCompensationDistance"
"params": {
"parallaxCompensationDistance": <number>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"setParallaxCompensationDistance">The requested method.
params=<JSON object>Container for the method specific parameter below.
parallaxCompensationDistance=<number>Specifies the distance to the objects in meters. The distance is where the alignment between the seams will be calculated with a value between 1–50 entered as a <number>. Please note that only the first 15 decimals can be used.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setParallaxCompensationDistance",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setParallaxCompensationDistance"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setParallaxCompensationDistance",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setParallaxCompensationDistance">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

rotateAngle

This method is used when you want to align the sensor images in the panoramic view to improve the stitching effect.

Each sensor can rotate on the "pan", "tilt" and "roll" axis. The hard limits of the angles can’t exceed -180 to +180 degrees, but there are lower soft limits that are product and sensor dependent. AXIS Q3819–PVE for example, has a soft limit of ± 1.4 degrees when using pan. Exceeding these limits can cause unknown behavior in the image.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "rotateAngle"
"params": {
"id": <number>,
"axis": <string>,
"angle": <number>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"rotateAngle">The requested method.
params=<JSON object>Container for the method specific parameter below.
id=<number>Specifies what sensor image that should be rotated. Valid range is 0 to the number of sensors minus 1.
axis=<string>Specifies which axis that should be rotated. Valid values are "pan", "tilt" and "roll".
angle=<number>Specifies how many degrees the axis should be rotated for a chosen sensor id. The value can be entered as <number> with valid values between -180 to +180. Please note that if you are using decimals, only the first 15 are used.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "rotateAngle",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="rotateAngle"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "rotateAngle",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"rotateAngle">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

restore

This method is used when you want to reset the alignment, parallax compensation distance or blending amount to the unit specific default settings.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "restore"
"params": {
"id": <number>,
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"restore">The requested method.
params=<JSON object>Container for the method specific parameter below.
id=<number>Specifies what sensor image that should be restored. Valid range is 0 to the number of sensors minus 1.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "restore",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="restore"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "restore",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"restore">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

setHorizonStraighteningEnabled

Use this method to enable or disable horizon straightening.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningEnabled",
"params": {
"horizonStraighteningEnabled": <boolean>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method="setHorizonStraighteningEnabled"The requested method.
params=<JSON object>Container for method specific parameters.
horizonStraighteningEnabled=<boolean>true: Enable horizon straightening.
false: Disable horizon straightening.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningEnabled",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setHorizonStraighteningEnabled"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningEnabled",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setHorizonStraighteningEnabled">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2300Internal vipd error, could not complete request.

getHorizonStraighteningEnabled

Use this method to retrieve if the horizon straightening is enabled.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "getHorizonStraighteningEnabled"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getHorizonStraighteningEnabled">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getHorizonStraighteningEnabled",
"data": {
"enabled": <boolean>
}
}

ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getHorizonStraighteningEnabled"The requested method.
data=<JSON object>Container for the response specific parameters listed below.
enabled=<boolean>true: Horizon straightening is enabled.
false: Horizon straightening is not enabled.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getHorizonStraighteningEnabled",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getHorizonStraighteningEnabled">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

getHorizonStraighteningProperties

Use this method to retrieve the value of horizon straightening tilt, if horizon straightening stretch is enabled, and the stretch amount.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getHorizonStraighteningProperties">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"data": {
"horizonStraighteningTilt": 10.0,
"horizonStraighteningStretchEnabled": true,
"horizonStraighteningStretchAmount": 50.0
}
}

ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getHorizonStraighteningProperties"The requested method.
data=<JSON object>Container for the response specific parameters listed below.
horizonStraighteningTilt=<number>The current value of the straight horizon position.
horizonStraighteningStretchEnabled=<boolean>Whether the image is stretched over the black areas.
horizonStraighteningStretchAmount=<number>The returned value shows how the stretching is performed.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": "3.2",
"context": "my context",
"method": "getHorizonStraighteningProperties",
"error": {
"code": 2215,
"message": "Horizon Straightening is not enabled."
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getHorizonStraighteningProperties">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2215Horizon straightening is not enabled.

setHorizonStraighteningTilt

Use this method to set the position of the straight horizon.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningTilt"
"params": {
"horizonStraighteningTilt": <number>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"setHorizonStraighteningTilt">The requested method.
params=<JSON object>Container for the method specific parameter below.
horizonStraighteningTilt=<number>Specifies the position of the straight horizon in angles relative to the middle of the image. Please note that only the first 15 decimals can be used.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningTilt",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setHorizonStraighteningTilt"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningTilt",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setHorizonStraighteningTilt">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2215Horizon straightening is not enabled.

setHorizonStraighteningStretchEnabled

Use this method to enable or disable horizon straightening stretch.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchEnabled",
"params": {
"horizonStraighteningStretchEnabled": <boolean>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method="setHorizonStraighteningStretchEnabled"The requested method.
params=<JSON object>Container for method specific parameters.
horizonStraighteningStretchEnabled=<boolean>true: Enable horizon straightening stretch.
false: Disable horizon straightening stretch.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchEnabled",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setHorizonStraighteningStretchEnabled"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchEnabled",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setHorizonStraighteningStretchEnabled">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2215Horizon straightening is not enabled.

setHorizonStraighteningStretchAmount

Use this method to set a value of horizon straightening stretch amount.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchAmount"
"params": {
"horizonStraighteningStretchAmount": <number>
}
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"setHorizonStraighteningStretchAmount">The requested method.
params=<JSON object>Container for method specific parameters.
horizonStraighteningStretchAmount=<number>Specifies the new value with a range between 0–100. 0 = Stretch images non-linearly. 100 = Stretch images linearly.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchAmount",
"data": {}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="setHorizonStraighteningStretchAmount"The requested method.
data=<JSON object>Container for the response.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "setHorizonStraighteningStretchAmount",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"setHorizonStraighteningStretchAmount">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

CodeDescription
2215Horizon straightening is not enabled.
2216Horizon Straightening stretch is disabled.

getFieldOfView

Use this method to retrieve the supported horizontal and vertical field of view.

Request

  • Security level: Admin
  • Method: POST
  • Content-Type: application/json
http://<servername>/axis-cgi/stitching.cgi
{
"apiVersion": <string>,
"context": <string>,
"method": "getFieldOfView"
}
ParameterDescription
apiVersion=<string>The API version that should be used.
context=<string>The context set by the user and echoed in the response (optional).
method=<"getFieldOfView">The requested method.

Return value - Success

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getFieldOfView",
"data": {
"hFoV": <number>,
"vFoV": <number>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method="getFieldOfView"The requested method.
data=<JSON object>Container for the response specific parameters listed below.
hFoV=<number>The supported horizontal field of view.
vFoV=<number>The supported vertical field of view.

Return value - Failure

  • HTTP Code: 200 OK
  • Content-Type: application/json

Response body syntax

{
"apiVersion": <string>,
"context": <string>,
"method": "getFieldOfView",
"error": {
"code": <number>,
"message": <string>
}
}
ParameterDescription
apiVersion=<string>The API version returned from the request.
context=<string>The context set by the user in the request (optional).
method=<"getFieldOfView">The requested method.
error.code=<integer error code>The error code.
error.message=<string>The error message for the corresponding error code.

Error codes

See General error codes for a complete list of potential errors.

General error codes

This table lists the errors that can occur for all CGI methods. Method specific errors are listed under their respective API specification.

CodeDescription
1000Invalid parameter value.
2000Failed to allocate memory.
2004Method not supported.
2200Unknown error has occurred.
2201Failed to init transformation tables.
2202Failed to generate table with given parameters.
2203Failed to apply table with given parameters.
2205Failed read calibration file.
2206Calibration file is missing.
2207Failed to unlink calibration file.
2208Unsupported stitching mode.
2209Failed to read configuration file.
2210Failed to save configuration file.
2211Failed to parse configuration file.
2212Method is not allowed in disabled mode.
2213Operation is not supported.
2300Internal vipd error, could not complete request.
4001Mandatory input parameters was not found in the input.
4002The type of a provided JSON parameter was incorrect.
8000Internal error, could not complete request.
8002Generic error.