Remote camera calibration NEW!
Allows starting, cancelling and following the camera calibration through the API, the same process available in the device menu. During calibration, the device shows the calibration screen and guides the person standing in front of it.
Available only on version V6.
Start calibration
POST /remote_camera_calibration.fcgi
Opens the calibration screen on the device and starts the calibration. The screen is closed when the timeout expires, or earlier if the calibration is cancelled. If the calibration screen is already open, the calibration restarts with the new timeout.
The call returns as soon as the command is sent to the screen, without waiting for the result. To follow the calibration, use camera_calibration_status.
Parameters
- timeout (int): Optional. Calibration timeout, in seconds. Values from
10to600. Default:60. Outside this range, the call returns the error "Invalid timeout (10 to 600 seconds expected)".
Response
- This call has no return.
Request example
$.ajax({
url: "/remote_camera_calibration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
timeout: 120
})
});
Cancel calibration
POST /cancel_remote_camera_calibration.fcgi
Stops the calibration started through the API and closes the calibration screen. Has no effect if the calibration screen is not open.
Parameters
- This call has no parameters.
Response
- This call has no return.
Request example
$.ajax({
url: "/cancel_remote_camera_calibration.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json'
});
Get calibration status
POST /camera_calibration_status.fcgi
Reports whether the camera is calibrated and whether a calibration is in progress.
Parameters
- This call has no parameters.
Response
- calibrated (bool): Whether the device has a stored camera calibration.
- discrepancy_offset (float): Stored calibration value. Meaningful only when calibrated is
true. - running (bool): Whether a calibration is in progress.
Request example
$.ajax({
url: "/camera_calibration_status.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json'
});
Response example
{
"calibrated": true,
"discrepancy_offset": 0.0123,
"running": false
}