iPi Automation Add-on

From iPi Docs
Jump to: navigation, search

Contents

Overview

iPi Automation Add-on allows to control iPi Recorder and iPi Mocap Studio from external application by sending JSON commands via Windows dll. It can be used for:

Note.png
Note: iPi Automation Add-on requires separate license key, which you need to activate in iPi Mocap Studio. 30-days free trial provided.

License and Trial

iPi Automation Add-on requires separate license key, which you need to activate in iPi Mocap Studio. You can order your license here, or activate 30-days free trial. Follow the steps below to start working with iPi Automation Add-on

  1. Select menu item Help > Manage Licenses > Automation Add-on.
  2. Press Start 30-days Free Trial Period or Enter Automation Add-on License Key and follow further on-screen instructions
    iPi-Integration-2-2.png
Note.png
Note: To use iPi Automation Add-on with iPi Recorder, you have to install iPi Mocap Studio on the same computer and activate iPi Automation Add-on following the instructions above. You do not need to activate any other keys (Main or Biomech Add-on), if you do not plan to perform tracking on this computer.

Using iPi Automation Add-on

Communication Library

In order to enable communication with iPi Recorder and/or iPi Mocap Studio, your program should use the library iPiMocapAutomation.dll.

Redistributable Contents

Redistributable of the library (download link) has the following structure:

  • bin Binary files to redistribute with your program. The library itself accompanied by PDB file, and C runtime library msvcr120.dll.
    • x86 32-bit version
    • x64 64-bit version
  • include Header files for the library. May be used directly in C/C++ programs, or as reference for making proper binding to DLL for other programming languages.
  • lib Static library files for linking with C/C++ programs.
    • x86 32-bit version
    • x64 64-bit version
  • samples Samples of library usage. Currently only for Visual C++ 2013.

iPiExec Console Application

iPiExec.exe included into the redistributable is a console application that allows to send JSON commands to iPi Recorder or iPi Mocap Studio without the need to write software application. It uses the same dll and API to communicate with iPi Recorder and iPi Mocap Studio.

iPiExec console application can be used for:

  • Testing iPi Automation Add-on and specific commands
  • Creating scripts for automation of frequent operations
  • Integrating iPi Motion Capture into complex production pipelines using scripts
Using iPiExec

Usage: iPiExec recorder | studio

recorder - for connecting to iPi Recorder.

studio - for connecting to iPi Mocap Studio.

After connecting just enter commands in JSON format (described below in this documentation). Multi-line commands are not supported, so each command (even long one) should be single-line.

Note.png
Note: According to Windows security policies, iPiExec must have at least the same access rights as iPi Recorder or iPi Mocap Studio to be able to connect. When iPi Recorder or iPi Mocap Studio starts automatically after installation, it runs with Windows Administrator rights. So you need to run iPiExec with Admin rights as well in this case.
SAMPLE
>ipiexec recorder
Connecting to iPi Recorder...
Connected!
 
RECORDER > { "command": "get-app-info" }
Executing: {"command":"get-app-info"}
Received: {"success":true,"result":{"appName":"iPi Recorder 3","appVersion":"3.2.3.45","mainWindowHandle":3673032,"processId":6496}}
 
RECORDER >

API

This library provides a general way of communication with supported applications. A client program establishes a connection to an application. Then, using this connection, it sends commands to the application. After executing a command, the application synchronously sends a response to that command back to a client program. Also, through the same connection, the application asynchronously notifies a client program about occurring events, such as the end of a long-running operation.

Each application has its own set of commands and events. Specific commands/events are out of scope of this library and should be handled in code using it.

Connecting and Disconnecting

iPi_Result iPi_ConnectToRecorder(LPCWSTR executablePath, iPi_EventCallback fnEventCallback, LPHANDLE phConnection, bool suppressAutoStart = false);
iPi_Result iPi_ConnectToMocapStudio(LPCWSTR executablePath, iPi_EventCallback fnEventCallback, LPHANDLE phConnection, bool suppressAutoStart = false);
ParameterDescription
executablePathPath to executable file of an application. Optional.
fnEventCallbackPointer to a function which handles events coming from an application. Optional.
phConnectionReceives a connection handle. Required.
suppressAutoStartIf this flag is set to true, application would not start automatically. Optional. Default value is false.

Functions iPi_ConnectToRecorder and iPi_ConnectToMocapStudio are used to establish connections to corresponding applications.

First, they try to connect to already running application instance if any. An application will refuse the connection if it already has other connection with some client.

If there are no running instances of the application, or they all refuse connection, then a new instance of the application is launched. If executablePath parameter is specified, then it is used to run the application. Otherwise, the function looks for path to an application in file associations and standard installation directory.

When connection is fully operational, its handle is returned in phConnection parameter. This handle is used in all subsequent calls for this connection.

Note.png
Note: According to Windows security policies, your app must have at least the same access rights as iPi Recorder or iPi Mocap Studio to be able to connect. When iPi Recorder or iPi Mocap Studio starts automatically after installation, it runs with Windows Administrator rights. So you need to run your app with Admin rights as well in this case.

Parameter fnEventCallback specifies a function to handle asynchronous application events. See the section about events below.

iPi_Result iPi_Disconnect(HANDLE hConnection);
ParameterDescription
hConnectionConnection handle. Required.

iPi_Disconnect closes previously open connection and frees all associated resources.

The function does not close the application itself. To do this, send an exit command specific to the application.

Sending Commands

iPi_Result iPi_ExecuteCommand(HANDLE hConnection, LPCWSTR jsonCommand, LPWSTR* pJsonResponse);
ParameterDescription
hConnectionConnection handle. Required.
jsonCommandCommand string. Required.
pJsonResponseReceives a response string. Required.

iPi_ExecuteCommand is used to send a command to the application. Parameter jsonCommand contains the command to send.

Response received from the application is placed into pJsonResponse. When not needed anymore, the returned response string should be freed with iPi_Free function.

Consuming Events

To consume asynchronous events coming from the application, client code should specify address of a callback function in fnEventCallback parameter when opening a connection. If callback is not specified, then application events will be discarded. The type of event callback is defined as follows:

typedef void (WINAPI *iPi_EventCallback)(HANDLE hConnection, LPWSTR jsonEvent);
ParameterDescription
hConnectionConnection handle.
jsonEventEvent string.

Every time an event comes from the application, the library calls this callback function. An event string is passed in jsonEvent parameter. When not needed, this string should be freed with iPi_Free function.

A callback is invoked on a thread from the process's thread pool. Each invocation may be on another thread, and multiple invocations may take place in the same time. So pay attention to proper thread synchronization in code.

Error Codes

Most of API functions has return type iPi_Result, which is enumeration representing error codes. The numeric values of the constants can be found in header file iPiTypes.h.

ConstantDescription
IPI_OKOperation succeeded.
IPI_GENERAL_ERRORSome error has occurred, for which there is no more specific error code.
IPI_INVALID_PARAMInvalid parameter value in a call to a function.
IPI_OUT_OF_MEMORYNot enough memory to complete an operation.
IPI_CONNECTION_BROKENConnection to an application has been broken. Should call iPi_Disconnect on this one and establish a new connection if needed.
IPI_CANNOT_START_APPApplication executable file was not found or other problem when starting application.
IPI_CANNOT_CONNECTApplication is not running or does not accept connections. For example, its an old version of the application which does not support connections. Or limit on connections is reached.
IPI_INVALID_DATAInvalid data read from a connection.

Miscellaneous

BOOL iPi_Free(LPVOID ptr);

Function iPi_Free should be used to free memory blocks that are allocated by the library and passed to client code, when they are not needed anymore. This includes response strings when executing commands and event strings when consuming events.

Command Syntax

Commands are strings based on JSON syntax. Commands are submitted via JSON requests that include command name and may optionally include command arguments.

The response is also JSON string. The response include success flag. In case of error the response include error message. In case of success the response may optionally include result that is JSON object.

Long actions (recording, background evaluation, etc.) initiated by commands generate asynchroneous events on action completion. Event is described by JSON string that include event name and may include optional arguments, depending on type of event.

SYNOPSIS

// Request for command without arguments
{
    "command": "<command_name_string>"
}
 
// Request for command with arguments
{
    "command": "<command_name_string>",
    "arguments": 
    {
        <arguments_list_json_string>
    }
}
 
// Simple response in case of success
{
    "success": true
}
 
// Response including command result field in case of success
{
    "success": true,
    "result":
    {
      <result_json_string>
    } 
}
 
// Response in case of error
{
    "success": false,
    "error": "<error_message_string>"
}
 
// Event without arguments
{
    "event": "<event_name_string>"
}
 
// Event including arguments
{
    "event": "<event_name_string>",
    "arguments": 
    {
        <arguments_list_json_string>
    }
}

iPi Recorder Commands

General Commands

get-app-info

get-app-info command returns the name of application and its version.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
appNamestringmandatoryiPi Recorder 3 Application name.
appVersionstringmandatoryVersion number in the format XX.XXX.XXX.XXX Application version number.
mainWindowHandlenumbermandatoryInteger Windows API handle of main window.
processIdnumbermandatoryInteger Windows process id.

EXAMPLE

// Request
{
    "command": "get-app-info"
}
 
// Response
{
    "success":true,
    "result":
    {
        "appName": "iPi Recorder 3",
        "appVersion": "99.876.543.210",
        "mainWindowHandle":524736,
        "processId":12368
    }
}

open-studio

open-studio command opens iPi Mocap Studio and creates the project from specified .iPiVideo file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path of .iPiVideo file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "open-studio",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo"
    }
}
 
// Response
{
    "success": true
}

exit

exit command closes iPi Recorder.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "exit"
}
 
// Response
{
    "success": true
}

Recording Commands

open-home-screen

open-home-screen opens HOME screen of iPi Recorder.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "open-home-screen"
}
 
// Response
{
    "success": true
}

refresh-device-list

refresh-device-list returns the list of available devices.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Array of JSON objects, each representing recording device. Fields of array items:
kindstringmandatorycamera
depth-sensor
microphone
Device type.
modelstringmandatorySupported device model Device model.
idstringmandatoryUnique string, format depends on device model Unique string that is used to identify recording devices in open-recorder command.
selectedbooleanmandatorytrue
false
Device selected status.
failedbooleanmandatorytrue
false
Device failed status.
errorstringoptionalError message string Error message if device is in failed status.

EXAMPLE

// Request
{
    "command": "refresh-device-list"
}
 
// Response
{
    "success":true,
    "result":
    [
        {
            "kind": "camera",
            "model": "PlayStation Eye",
            "id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&2ed872d7&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}",
            "selected": false,
            "failed": false
        },
        {
            "kind": "depth-sensor",
            "model": "Kinect 2 for Windows",
            "id": "Default Kinect 2",
            "selected": true,
            "failed": true,
            "error": "Is not available"
        },    
        {
            "kind": "microphone",
            "model": "USB Camera-B4.04.27.1",
            "id": "Microphone (USB Camera-B4.04.27 [VID=-1; PID=-1; Driver=256; Channels=2; Supports=WAVE_FORMAT_11M08, ...]",
            "selected": false,
            "failed": false
        }
    ]
}

open-recorder

open-recorder selects devices for recording and switches to SETUP stage.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
selectedDevicesstring arraymandatoryList of device id strings Selecting devices for recording. Device ids are returned by refresh-device-list command.
Result
Empty result

EXAMPLE

// Request
{
    "command": "open-recorder",
    "arguments":
    {
        "selectedDevices":
        [
            "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&2ed872d7&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}",
            "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&1c1ec232&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}"
        ]
    }    
 
}
 
// Response
{
    "success":true
}

evaluate-background

evaluate-background runs background evaluation.

Tip.png
Tip: If parameter is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
durationnumberoptionalInteger number of seconds from 2 to 10

Setting duration of background evaluation.

startDelaynumberoptionalInteger number of seconds from 0 to 30

Setting start delay for background evaluation.

Result
Empty result
Events
background-evaluation-stopped event is generated when background evaluation ends
successbooleanmandatorytrue
false
Success flag. Set to true if background evaluation was completed successfully.
cancelledbooleanmandatorytrue
false
Cancellation flag. Set to true if background evaluation was cancelled by user.
errorstringoptional Description of the error when background evaluation has failed.

EXAMPLE

// Request
{
    "command": "evaluate-background",
    "arguments": 
    {
        "duration": 3,
        "startDelay": 1
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "background-evaluation-stopped",
    "arguments":
    {
        "success": true,
        "cancelled": false
    }
}

go-to-screen

go-to-screen opens SETUP, BACKGROUND or RECORD screen of iPi Recorder. /

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
screenstringmandatorysetup
background
record
Screen name to open as it is shown in user interface.
Result
Empty result

EXAMPLE

// Request
{
    "command": "go-to-screen",
    "arguments":
    {
        "screen": "record"
    }
}
 
// Response
{
    "success": true
}

start-recording

start-recording starts recording.

Tip.png
Tip: If parameter is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringoptionalValid file path

Full path to destination file for recording.

startDelaynumberoptionalInteger number of seconds from 0 to 60

Setting start delay for recording.

forceStartbooleanoptionaltrue
false

Setting this flag to true allows to start recording despite fps is lower than expected. We recommend first run the command without this flag. If you get fps error message, while fps is generally fine, wait 1 second while statistics recalculates and run the commmand with this flag set to true.

Result
Empty result
Events
recording-stopped event is generated when recording is stopped
successbooleanmandatorytrue
false
Success flag. Set to true if background evaluation was completed successfully.
cancelledbooleanmandatorytrue
false
Cancellation flag. Set to true if background evaluation was cancelled by user or due to error.
filePathstringmandatoryValid file path

Full path to destination file.

fileSizenumbermandatoryNon-negative integer Size of the recorded file in bytes.
durationstringmandatoryTimespan value in format
hh:mm:ss.sssssss

Duration of the recording.

frameCountnumbermandatoryNon-negative integer Number of the recorded frames.

EXAMPLE

// Request
{
    "command": "start-recording",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo",
        "startDelay": 1,
        "forceStart": true
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "recording-stopped",
    "arguments":
    {
        "success": true,
        "cancelled": false,
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo",
        "fileSize": 39975560,
        "duration": "00:00:04.0155425",
        "frameCount": 197,
        "statistics" :
        {
                        "devicesStatistics" :
                        [
                                {
                                        "badFramesPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "deviceName" : "PlayStation Eye #1",
                                        "frameGapsPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "framesPerSecond" :
                                        {
                                                "average" : 60.2884,
                                                "deviation" : 0.436367,
                                                "max" : 62.5,
                                                "min" : 60
                                        },
                                        "maxFrameGap" : 0,
                                        "maxSpanOfBadFrames" : 0,
                                        "totalBadFrames" : 0,
                                        "totalFrameGaps" : 0
                                },
                                {
                                        "badFramesPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "deviceName" : "PlayStation Eye #2",
                                        "frameGapsPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "framesPerSecond" :
                                        {
                                                "average" : 60.3032,
                                                "deviation" : 0.450399,
                                                "max" : 62.5,
                                                "min" : 60
                                        },
                                        "maxFrameGap" : 0,
                                        "maxSpanOfBadFrames" : 0,
                                        "totalBadFrames" : 0,
                                        "totalFrameGaps" : 0
                                },
                                {
                                        "badFramesPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "deviceName" : "PlayStation Eye #3",
                                        "frameGapsPerSecond" :
                                        {
                                                "average" : 0,
                                                "deviation" : 0,
                                                "max" : 0,
                                                "min" : 0
                                        },
                                        "framesPerSecond" :
                                        {
                                                "average" : 60.2264,
                                                "deviation" : 0.321094,
                                                "max" : 61.7,
                                                "min" : 60
                                        },
                                        "maxFrameGap" : 0,
                                        "maxSpanOfBadFrames" : 0,
                                        "totalBadFrames" : 0,
                                        "totalFrameGaps" : 0
                                }
                        ],
                        "overallStatistics" :
                        {
                                "badFramesPerSecond" :
                                {
                                        "average" : 0,
                                        "deviation" : 0,
                                        "max" : 0,
                                        "min" : 0
                                },
                                "deviceName" : "Overall",
                                "frameGapsPerSecond" :
                                {
                                        "average" : 0,
                                        "deviation" : 0,
                                        "max" : 0,
                                        "min" : 0
                                },
                                "framesPerSecond" :
                                {
                                        "average" : 60.2701,
                                        "deviation" : 0.39055,
                                        "max" : 62.1,
                                        "min" : 60
                                },
                                "maxFrameGap" : 0,
                                "maxSpanOfBadFrames" : 0,
                                "totalBadFrames" : 0,
                                "totalFrameGaps" : 0
                        },
                        "primaryChannelMistiming" :
                        {
                                "average" : 0.00180621,
                                "deviation" : 0.000746511,
                                "max" : 0.0073028,
                                "min" : 3.39e-005
                        },
                        "secondaryChannelMistiming" :
                        {
                                "average" : 0,
                                "deviation" : 0,
                                "max" : 0,
                                "min" : 0
                        }
         },
    }
}

stop-recording

stop-recording command stops recording.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
recording-stopped event is generated when recording is stopped
successbooleanmandatorytrue
false
Success flag. Set to true if background evaluation was completed successfully.
cancelledbooleanmandatorytrue
false
Cancellation flag. Set to true if background evaluation was cancelled by user or due to error.
filePathstringmandatoryValid file path

Full path to destination file.

fileSizenumbermandatoryNon-negative integer Size of the recorded file in bytes.
durationstringmandatoryTimespan value in format
hh:mm:ss.sssssss

Duration of the recording.

frameCountnumbermandatoryNon-negative integer Number of the recorded frames.

EXAMPLE

// Request
{
    "command": "stop-recording"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "recording-stopped",
    "arguments":
    {
        "success": true,
        "cancelled": false,
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo",
        "fileSize": 39975560,
        "duration": "00:00:04.0155425",
        "frameCount": 197
    }
}

get-devices-state

get-devices-state returns the state and statistics for all selected devices.

Tip.png
Tip: This command is used to make sure recording process is ok. You can use it before and after recording.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Array of JSON objects, each representing selected device. Fields of array items:
kindstringmandatorycamera
depth-sensor
microphone
Device type.
modelstringmandatorySupported device model Device model.
indexnumericmandatoryPositive integer. Device index starting from 1 as it is seen in iPi Recorder.
idstringmandatoryUnique string, format depends on device model Unique string that is used to identify recording devices in open-recorder command.
selectedbooleanmandatorytrue
false
Device selected status.
failedbooleanmandatorytrue
false
Device failed status.
errorstringoptionalError message string Error message if device is in failed status.
statisticsJSON object
optional

Camera statistics.

frameRatenumbermandatory DoubleAverage frame rate.
frameDropsPerSecondnumbermandatory DoubleAverage frame drops per second.
badFramesPerSecondnumbermandatory DoubleAverage bad frames per second.
totalFrameDropsnumbermandatory IntegerTotal frame drops.
totalBadFramesnumbermandatory IntegerTotal bad frames.
backgroundAreaPercentnumericoptional Percent value rounded to integer.Percent of area equal to recorded background.

EXAMPLE

// Request
{
    "command": "get-devices-state"
}
 
// Response
{
    "success":true,
    "result":
    [
        {
            "kind": "camera",
            "model": "PlayStation Eye",
            "index": 1,
            "id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&2ed872d7&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}",
            "selected": true,
            "failed": false,
            "statistics":
            {
                "frameRate": 50.0,
                "frameDropsPerSecond": 0.0,
                "badFramesPerSecond": 0.0,
                "totalFrameDrops": 0,
                "totalBadFrames": 0,
                "backgroundAreaPercent": 76
            }        
        },
        {
            "kind": "microphone",
            "model": "USB Camera-B4.04.27.1",
            "index": 2,
            "id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&1c1ec232&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}",
            "selected": true,
            "failed": false,
            "statistics":
            {
                "frameRate": 50.0,
                "frameDropsPerSecond": 0.0,
                "badFramesPerSecond": 0.0,
                "totalFrameDrops": 0,
                "totalBadFrames": 0,
                "backgroundAreaPercent": 98
            }        
        }
    ]
}

get-recorder-props

get-recorder-props command gets current properties for setup, background and recording stages specified in user interface.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Properties for SETUP Stage:
videoModestringmandatory

Available modes depend on camera model.

Selected RGB video mode.

videoModeListstring arraymandatory

List of available modes depend on camera model.

Possible videoMode values.

audioModestringoptional

Available modes depend on microphone model.

Selected audio mode. This field is included into the response, if microphone is selected.

audeoModeListstring arrayoptional

List of available modes depend on microphone model.

Possible audioMode values. This field is included into the response, if microphone selected.

globalDevicePropsJSON object
optional

Device-specific list of properties visible in “SHARED SETTINGS” section of SETUP stage.

PlayStation Eye: Darkening for Calibrationstringoptional "None"
"Darkening"
"Extra Darkening"

Selected darkening mode for Sony PS3 Eye cameras. This field is included into the response, if Sony PS3 Eye camera is selected.

PlayStation Eye: Darkening for Calibration/Liststring arrayoptional List of available modes

Available darkening modes for Sony PS3 Eye cameras. This field is included into the response, if Sony PS3 Eye camera is selected.

screensInRownumbermandatoryInteger from 1 to number of cameras

Selected number of screens in a row for multiple camera video view.

screenLayoutstringmandatory

For RGB cameras:
"Color"

For depth sensors:
"Depth"
"Picture in picture"
"Side by side"

Selected screen layout.

screenLayoutListstring arraymandatory Available screenLayout modes.Available screen layout modes. Depend on type of selected cameras.
Properties for BACKGROUND Stage:
backgroundEvaluationDurationnumbermandatoryInteger number of seconds from 2 to 10

Selected duration of background evaluation.

backgroundEvaluationStartDelaynumbermandatoryInteger number of seconds from 0 to 30

Selected start delay for background evaluation.

showEvaluatedBackgroundbooleanmandatorytrue
false

Selected show background mode.

Properties for RECORD Stage:
recordingStartDelaynumbermandatoryInteger number of seconds from 0 to 60

Selected start delay for recording.

hideBackgroundWhenRecordingbooleanmandatorytrue
false

Selected hide background mode.

destinationFilePathstringmandatory

Valid file path

Selected full path to destination file for recording.

colorCompressionstringmandatory

"None"
"Background subtraction"
"JPEG"

Selected RGB video compression mode.

jpegQualitynumbermandatoryinteger from 0 to 100

Selected JPEG quality for JPEG compression.

depthCompressionstringmandatory"None"
"Background subtraction"

Selected depth compression mode.

Result
Empty result

EXAMPLE

// Request
{
    "command": "get-recorder-props"
}
 
// Response
{
    "success": true,
    "result":
    {
        "videoMode": "640x480 color @ 50Hz",
        "videoModeList":
        [
            "640x480 color @ 60Hz",
            "640x480 color @ 50Hz",
            "640x480 color @ 40Hz",
            "640x480 color @ 30Hz",
            "640x480 color @ 25Hz",
            "320x240 color @ 60Hz",
            "320x240 color @ 50Hz",
            "320x240 color @ 37Hz",
            "320x240 color @ 30Hz"
        ],
        "screensInRow": 1,
        "screenLayout": "Color",
        "screenLayoutList":
        [
            "Color"
        ],
        "globalDeviceProps":
        {
            "PlayStation Eye: Darkening for Calibration": "None",
            "PlayStation Eye: Darkening for Calibration/List":
            [
                "None",
                "Darkening",
                "Extra Darkening"
            ]
        },
        "backgroundEvaluationStartDelay": 5,
        "backgroundEvaluationDuration": 2,
        "showEvaluatedBackground": false,
        "recordingStartDelay": 1,
        "hideBackgroundWhenRecording": true,
        "destinationFilePath": "D:\\iPiMocap\\<time stamp>.iPiVideo",
        "colorCompression": "Jpeg",
        "jpegQuality": 100,
        "depthCompression": "BackgroundSubtraction"
    }
 
}

set-recorder-props

set-recorder-props command sets properties for setup, background and recording stages.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
Properties for SETUP Stage:
videoModestringoptional

Available modes depend on camera model.

Setting RGB video mode. You can see available modes in "Video Mode" combobox at SETUP stage, or get it in the result of get-recorder-props command.

audioModestringoptional

Available modes depend on microphone model.

Setting audio mode. You can see available modes in "Audio Mode" combobox at SETUP stage, or get it in the result of get-recorder-props command.

globalDevicePropsJSON object
optional

Device-specific list of properties visible in “SHARED SETTINGS” section of SETUP stage.

PlayStation Eye: Darkening for Calibrationstringoptional "None"
"Darkening"
"Extra Darkening"

Darkening mode for Sony PS3 Eye cameras

screensInRownumberoptionalInteger from 1 to number of cameras

Setting number of screens in a row for multiple camera video view.

screenLayoutstringoptional

For RGB cameras:
"Color"

For depth sensors:
"Depth"
"Picture in picture"
"Side by side"

Setting screen layout.

Properties for BACKGROUND Stage:
backgroundEvaluationDurationnumberoptionalInteger number of seconds from 2 to 10

Setting duration of background evaluation.

backgroundEvaluationStartDelaynumberoptionalInteger number of seconds from 0 to 30

Setting start delay for background evaluation.

showEvaluatedBackgroundbooleanoptionaltrue
false

Show background mode on / off.

Properties for RECORD Stage:
recordingStartDelaynumberoptionalInteger number of seconds from 0 to 60

Setting start delay for recording.

hideBackgroundWhenRecordingbooleanoptionaltrue
false

Show hide background mode on / off.

destinationFilePathstringoptional

Valid file path

Full path to destination file for recording.

colorCompressionstringoptional

"None"
"Background subtraction"
"JPEG"

Setting RGB video compression mode.

jpegQualitynumberoptionalinteger from 0 to 100

JPEG quality for JPEG compression.

depthCompressionstringoptional"None"
"Background subtraction"

Setting depth compression mode.

Result
Empty result

EXAMPLE

// Request
{
    "command": "set-recorder-props",
    "arguments":
    {
        "colorCompression": "jpeg",
	"globalDeviceProps":
        {
	    "PlayStation Eye: Darkening for calibration":"None"
        },
    "hideBackgroundWhenRecording": true,
    "recordingStartDelay": 0,
    "videoMode": "640x480 color @ 50Hz"
    }
}
 
// Response
{
    "success": true
}

merge-videos

merge-videos performs merging of videos recorded by individual PCs during distributed recording, similarly to Merge Videos button in the toolbar.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
inputFilePathsstring arraymandatory2 or more valid file pathsiPiVideo files to merge
outputFilePathstringmandatoryValid file path

Resulting iPiVideo file.

Result
Empty result
Events
merge-videos-completed event is generated a merge operation ends.
successbooleanmandatorytrue
false
Success flag. Set to true if video files have been merged successfully.
cancelledbooleanmandatorytrue
false
Cancellation flag. Set to true if operation has been cancelled by user.
errorstringoptional Description of the error when a merge operation has failed.
Important.png
Important! If output file exists, it will be overwritten without a notice.
Tip.png
Tip: It is recommended to use absolute file paths. Relative paths are treated against the current directory of iPi Recorder process.

EXAMPLE

// Request
{
    "command": "merge-videos",
    "arguments": 
    {
        "inputFilePaths": ["d:\\videos\\test.master.iPiVideo", "d:\\videos\\test.slave0.iPiVideo"],
        "outputFilePath": "d:\\videos\\test.iPiVideo"
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "merge-videos-completed",
    "arguments":
    {
        "success": true,
        "cancelled": false
    }
}

Player Commands

set-player-props

set-player-props command sets properties for player.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
screensInRownumberoptionalInteger from 1 to number of cameras

Setting number of screens in a row for multiple camera video view.

hideBackgroundbooleanoptionaltrue
false

Turn hide background mode on / off.

Result
Empty result

EXAMPLE

// Request
{
    "command": "set-player-props",
    "arguments":
    {
        "screensInRow": 2,
	"hideBackground": true
    }
}
 
// Response
{
    "success": true
}

open-player

open-player command opens .iPiVideo file in player.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path

Full path to file to be opened in player.

Result
Empty result

EXAMPLE

// Request
{
    "command": "open-player",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo"
    }
}
 
// Response
{
    "success": true
}

play-forward

play-forward starts playing video forward starting from the current frame. If current frame is the last frame playing starts from the first frame.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
playing-stopped event is generated when playing is competed (reached the last frame) or stopped by user
No event arguments

EXAMPLE

// Request
{
    "command": "play-forward"
}
 
// Response
{
    "success": true
}

play-backward

play-backward starts playing video backward starting from the current frame. If current frame is the first frame playing starts from the last frame.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "play-backward"
}
 
// Response
{
    "success": true
}

frame-forward

frame-forward steps one frame forward. If current frame is the last frame error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "frame-forward"
}
 
// Response
{
    "success": true,
    "error": "Last frame reached"
}

frame-backward

frame-backward steps one frame backward. If current frame is the first frame error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "frame-backward"
}
 
// Response
{
    "success": true,
    "error": "First frame reached"
}

go-to-frame

go-to-frame command selects current frame. If case of invalid frame index error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
frameIndexnumbermandatoryNon-negative integer

Frame index. The first frame index is 0, the last frame index is <total_number_of_frames> - 1.

Result
Empty result

EXAMPLE

// Request
{
    "command": "go-to-frame",
    "arguments": 
    {
        "frameIndex": 27
    }
}
 
// Response
{
    "success": true
}

iPi Mocap Studio Commands

General Commands

get-app-info

get-app-info command returns the name of application and its version.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
appNamestringmandatoryiPi Mocap Studio 3 Application name.
appVersionstringmandatoryVersion number in the format XX.XXX.XXX.XXX Application version number.
mainWindowHandlenumbermandatoryInteger Windows API handle of main window.
processIdnumbermandatoryInteger Windows process id.

EXAMPLE

// Request
{
    "command": "get-app-info"
}
 
// Response
{
    "success":true,
    "result":
    {
        "appName": "iPi Mocap Studio 3",
        "appVersion": "99.876.543.210",
        "mainWindowHandle":19925022,
        "processId":7328
    }
}

exit

exit command closes iPi Mocap Studio.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "exit"
}
 
// Response
{
    "success": true
}

Project Commands

create-project

create-project creates new project from specified .iPiVideo file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
videoFilePathstringmandatoryValid file path Full path of .iPiVideo file.
projectTypestringmandatoryaction
calibration
Type of the project.
sceneFilePathstringmandatoryValid file path Scene file path or project file path to take calibration information from.
Mandatory for action projects. No needed for calibration projects.
actorsstring arraymandatoryList of valid .iPiActor file paths Array of .iPiActor file paths to read actor parameters from.
Mandatory for action projects. No needed for calibration projects.
actorsJSON objects arraymandatory Array of actor parameters objects. Alternative way to specify actors' parameters.
Mandatory for action projects. No needed for calibration projects.
genderstringmandatoryfemale
male
Gender of actor.
heightnumbermandatoryDouble Height of actor.
clothingModelstringoptionallongsleeveshirt
tshirt
tshirtoverlongsleeveshirt
Actor clothing model.
Requred for projects recorded with RGB cameras.
cameraFovnumberoptionalDouble Required for calibration projects recorded with RGB cameras. Camera diagonal field of view in degrees.
autoAdjustFovbooleanoptionaltrue
false
Required for calibration projects recorded with RGB cameras. Turns on auto detection of camera field of view.
autoDetectInitialCameraPositionsbooleanoptionaltrue
false
Required for calibration projects recorded with RGB cameras. Turns on auto detection of initial camera positions.
Result
Empty result

EXAMPLE

// Request
{
    "command": "create-project",
    "arguments": 
    {
        "videoFilePath": "D:\\iPiMocap\\test_project.iPiVideo",
        "projectType": "action",
        "sceneFilePath": "D:\\iPiMocap\\test_project.iPiScene",
        "actors":["D:\\iPiMocap\\test_actor.iPiActor"]
    }
}

open-project

open-project command opens existing project from specified .iPiMotion file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path of .iPiMotion file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "open-project",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_project.iPiMotion"
    }
}
 
// Response
{
    "success": true
}

save-project

save-project command saves current project to file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringoptionalValid file path Full path of .iPiMotion file.
You do not need to specify file path if you save previously opened project to the same file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "save-project",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_project.iPiMotion"
    }
}
 
// Response
{
    "success": true
}

close-project

close-project command closes project curretnly opened in iPi Mocap Studio.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "close-project"
}
 
// Response
{
    "success": true
}

get-project-info

get-project-info command returns current project information.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
projectTypestringmandatoryaction
calibration
dummy
Type of the project. Dummy stands for empty project.
camerasTypestringmandatoryDepth
RGB
Type of the cameras.
camerasCountnumbermandatoryNon-negative integer Number of cameras.

EXAMPLE

// Request
{
    "command": "get-project-info"
}
 
// Response
{
    "success":true,
    "result":
    {
        "projectType": "action",
        "camerasType": "RGB",
        "camerasCount": 6
    }
}

Project Properties Commands

get-timeline-props

get-timeline-props command returns timeline properties of the current project.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
timelineTimelineClip JSON objectmandatory Whole timeline properties.
regionOfInterestTimelineClip JSON objectmandatory Region of Interest (ROI) properties.
takesTimelineClip JSON objects arraymandatory List of takes.
TimelineClip JSON objects properties:
beginFramenumbermandatoryNon-negative integer Begin frame index (first frame is 0).
framesCountnumbermandatoryPositive integer Number of frames.
secondsPerFramenumbermandatoryDouble Seconds per frame.
durationInSecondsnumbermandatoryDouble Duration in seconds.
descriptionstringoptionalstring Description.

EXAMPLE

// Request
{
    "command": "get-timeline-props"
}
 
// Response
{
    "success": true,
    "result":
    {
        "timeline":
        {
            "beginFrame": 0,
            "framesCount": 758,
            "secondsPerFrame": 0.02,
            "durationInSeconds": 15.1399
        },
        "regionOfInterest":
        {
            "beginFrame": 0,
            "framesCount": 758,
            "secondsPerFrame": 0.02,
            "durationInSeconds": 15.1399,
            "description": "Region of Interest"
        },
        "takes":
        [
            {
                "beginFrame": 0,
                "framesCount": 758,
                "secondsPerFrame": 0.02,
                "durationInSeconds": 15.1399,
                "description": "Take 1"
            }
        ]
    }
}

set-timeline-props

set-timeline-props command sets timeline properties of the current project.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
regionOfInterestTimelineClip JSON objectmandatory Region of Interest (ROI) properties.
takesTimelineClip JSON objects arraymandatory List of takes.
TimelineClip JSON objects properties:
beginFramenumbermandatoryNon-negative integer Begin frame index (first frame is 0).
framesCountnumbermandatoryPositive integer Number of frames.
descriptionstringoptionalstring Description.
Result
Empty result

EXAMPLE

// Request
{
    "command": "set-timeline-props"
    "arguments":
    {
        "regionOfInterest":
        {
            "beginFrame": 10,
            "framesCount": 558,
        },
        "takes":
        [
            {
                "beginFrame": 10,
                "framesCount": 158,
                "description": "Take 1"
            },
            {
                "beginFrame": 200,
                "framesCount": 558,
                "description": "Take 2"
            }
        ]
    }
}
 
// Response
{
    "success": true
}

get-view-props

get-view-props command gets current view properties specified via View menu.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
General view properties
skinbooleanmandatorytrue
false
Show skin flag value.
skinOpacitynumericmandatoryDouble from 0 to 1 Skin opacity value.
bonesbooleanmandatorytrue
false
Show bones flag value.
viewportBackgroundColorstringmandatoryValid html color value Viewport background color.
camerasbooleanmandatorytrue
false
Show cameras flag value.
currentCameranumericmandatoryNon-negative integer Selected camera index starting from 0.
groundPlanebooleanmandatorytrue
false
Show ground plane flag value.
viewBackgroundbooleanmandatorytrue
false
Show background flag value.
Action projects view properties
currentActornumericmandatoryNon-negative integer Selected actor index starting from 0.
trajectoriesbooleanmandatorytrue
false
Show trajectories flag value.
skeletonStrobebooleanmandatorytrue
false
Show skeleton strobe flag value.
extraSkeletonStrobebooleanmandatorytrue
false
Show extra skeleton strobe flag value.
collisionObjectsbooleanmandatorytrue
false
Show collision objects flag value.
massObjectsbooleanmandatorytrue
false
Show mass objects flag value.
poseMismatchbooleanmandatorytrue
false
Show pose mismatch flag value.
View properties of projects containing RGB information
videobooleanmandatorytrue
false
Show video flag value.
videoOpacitynumericmandatoryDouble from 0 to 1 Video opacity value.
videoThumbnailsbooleanmandatorytrue
false
Show video thumbnails flag value.
lightSourcebooleanmandatorytrue
false
Show light source flag value.
View properties of projects containing depth information
depthbooleanmandatorytrue
false
Show depth flag value.
depthOpacitynumericmandatoryDouble from 0 to 1 Depth opacity value.
hideBackgroundbooleanmandatorytrue
false
Hide background flag value.
depthFromAllSensorsbooleanmandatorytrue
false
Show depth from all sensors flag value.
View properties of projects containing RGB and depth information
alignColorVideoToDepthbooleanmandatorytrue
false
Align color video to depth flag value.
colorPointCloudWithRgbDatabooleanmandatorytrue
false
Color point cloud with RGB data flag value.

EXAMPLE

// Request
{
    "command": "get-view-props"
}
 
// Response
{
    "success": true,
    "result":
    {
        "skin": true,
        "skinOpacity": 0.7,
        "bones": true,
        "viewportBackgroundColor": "#7D90A3",
        "cameras": true,
        "currentCamera": 0,
        "groundPlane": true,
        "viewBackground": false,
        "currentActor": 0,
        "trajectories": false,
        "skeletonStrobe": false,
        "extraSkeletonStrobe": false,
        "collisionObjects": false,
        "massObjects": false,
        "poseMismatch": false,
        "video": true,
        "videoOpacity": 0.7,
        "videoThumbnails": true,
        "lightSource": true    
    }
 
}

set-view-props

set-view-props command sets view properties specified via View menu.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
General view properties
skinbooleanoptionaltrue
false
Show skin flag value.
skinOpacitynumericoptionalDouble from 0 to 1 Skin opacity value.
bonesbooleanoptionaltrue
false
Show bones flag value.
viewportBackgroundColorstringoptionalValid html color value Viewport background color.
camerasbooleanoptionaltrue
false
Show cameras flag value.
currentCameranumericoptionalNon-negative integer Selected camera index starting from 0.
groundPlanebooleanoptionaltrue
false
Show ground plane flag value.
viewBackgroundbooleanoptionaltrue
false
Show background flag value.
Action projects view properties
currentActornumericoptionalNon-negative integer Selected actor index starting from 0.
trajectoriesbooleanoptionaltrue
false
Show trajectories flag value.
skeletonStrobebooleanoptionaltrue
false
Show skeleton strobe flag value.
extraSkeletonStrobebooleanoptionaltrue
false
Show extra skeleton strobe flag value.
collisionObjectsbooleanoptionaltrue
false
Show collision objects flag value.
massObjectsbooleanoptionaltrue
false
Show mass objects flag value.
poseMismatchbooleanoptionaltrue
false
Show pose mismatch flag value.
View properties of projects containing RGB information
videobooleanoptionaltrue
false
Show video flag value.
videoOpacitynumericoptionalDouble from 0 to 1 Video opacity value.
videoThumbnailsbooleanoptionaltrue
false
Show video thumbnails flag value.
lightSourcebooleanoptionaltrue
false
Show light source flag value.
View properties of projects containing depth information
depthbooleanoptionaltrue
false
Show depth flag value.
depthOpacitynumericoptionalDouble from 0 to 1 Depth opacity value.
hideBackgroundbooleanoptionaltrue
false
Hide background flag value.
depthFromAllSensorsbooleanoptionaltrue
false
Show depth from all sensors flag value.
View properties of projects containing RGB and depth information
alignColorVideoToDepthbooleanoptionaltrue
false
Align color video to depth flag value.
colorPointCloudWithRgbDatabooleanoptionaltrue
false
Color point cloud with RGB data flag value.
Result
Empty result

EXAMPLE

// Request
{
    "command": "set-view-props"
}
 
// Response
{
    "success": true,
    "result":
    {
        "skin": false,
        "skinOpacity": 0.5,
        "bones": true,
        "viewportBackgroundColor": "#7D90A3",
        "cameras": true,
        "currentCamera": 2,
        "groundPlane": true,
        "videoOpacity": 0.6,
        "videoThumbnails": false,
        "lightSource": true    
    }
 
}

load-scene

load-scene loads scene and light information from .iPiScene, .iPiCalib or .iPiMotion file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "load-scene",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test.iPiMotion"
    }
}
 
// Response
{
    "success": true
}

save-scene

save-scene saves scene and light information (if available) to .iPiScene file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "save-scene",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test.iPiScene"
    }
}
 
// Response
{
    "success": true
}

Actor Commands

load-actor

load-actor loads actor properties from .iPiActor file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
actorIndexnumbermandatoryNon-negative integer Actor index starting from 0.
filePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "load-actor",
    "arguments": 
    {
        "actorIndex": 0,
        "filePath": "D:\\iPiMocap\\test.iPiActor"
    }
}
 
// Response
{
    "success": true
}

save-actor

save-actor saves actor properties to .iPiActor file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
actorIndexnumbermandatoryNon-negative integer Actor index starting from 0.
filePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "save-actor",
    "arguments": 
    {
        "actorIndex": 0,
        "filePath": "D:\\iPiMocap\\test.iPiActor"
    }
}
 
// Response
{
    "success": true
}

detect-actor-colors

detect-actor-colors runs auto-detection of actor colors.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
handsColorSameAsFacebooleanoptionaltrue
false
Setting "Hands are the Same Color as Face" flag value.
Result
Empty result
Events
detect-actor-colors-finished event is generated when operation is competed or stopped by user
shirtColorstringmandatoryValid html color value Shirt color.
pantsColorstringmandatoryValid html color value Pants color.
handsColorstringmandatoryValid html color value Hands color.
faceColorstringmandatoryValid html color value Face color.
shoesColorstringmandatoryValid html color value Shoes color.
shoeSolesColorstringmandatoryValid html color value Shoe soles color.
hairColorstringmandatoryValid html color value Hair color.
sleevesColorstringmandatoryValid html color value Sleeves color.

EXAMPLE

// Request
{
    "command": "detect-actor-colors",
    "arguments": 
    {
        "handsColorSameAsFace": false
    }
}
 
// Response
{
    "success": true
}
 
// Event
{
    "event": "detect-actor-colors-finished",
    "arguments":  
    {
        "shirtColor":"#384662",
        "pantsColor":"#1F2431",
        "handsColor":"#9A9DA6",
        "faceColor":"#7A7077",
        "shoesColor":"#504C4C",
        "shoeSolesColor":"#504C4C",
        "hairColor":"#57555E",
        "sleevesColor":"#384662"
    }
}

set-actor-props

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
genderstringmandatoryfemale
male
Gender of actor.
heightnumbermandatoryDouble Height of actor.
clothingModelstringoptionallongsleeveshirt
tshirt
tshirtoverlongsleeveshirt
Actor clothing model.
Requred for projects recorded with RGB cameras.
dimensionsJSON object
optional
Actor dimensions.
headHeightnumberoptional DoubleHeight of head from chin to top in meters.
shouldersWidthnumberoptional DoubleDistance between shoulder joints in T-pose in meters.
armLengthnumberoptional DoubleLength of straight arm between shoulder and wrist joints in meters.
forearmLengthnumberoptional DoubleLength of forearm between elbow and wrist joints in meters.
legLengthnumberoptional DoubleLength of straight leg between hip and ankle joints in meters.
lowerlegLengthnumberoptional DoubleLength of lower leg between knee and ankle joints in meters.
footLengthnumberoptional DoubleLength foot between heel and big toe end in meters.
Result
Empty result
Note.png
Note: Dimensions are set approximately to minimize standard deviation from the specified segment lengths. Specifying incorrect values will lead to incorrect body dimensions thus increasing tracking errors. So visual alignment of the model with actual video is highly recommended.

EXAMPLE

// Request
{
    "command": "set-actor-props",
    "arguments": 
    {
        "gender": "female",
        "height": 1.8,
        "clothingModel": "tshirtoverlongsleeveshirt",
        "dimensions":
        {
            "headHeight": 0.21,
            "shouldersWidth": 0.3,
            "armLength": 0.57,
            "legLength": 0.89,
            "footLength": 0.26
        } 
    }
}

Playing Commands

play-forward

play-forward starts playing forward starting from the current frame. If current frame is the last frame playing starts from the first frame.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "play-forward"
}
 
// Response
{
    "success": true
}

play-backward

play-backward starts playing backward starting from the current frame. If current frame is the first frame playing starts from the last frame.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "play-backward"
}
 
// Response
{
    "success": true
}

frame-forward

frame-forward steps one frame forward. If current frame is the last frame error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "frame-forward"
}
 
// Response
{
    "success": false,
    "error": "Frame index exceeds total frames count"
}

frame-backward

frame-backward steps one frame backward. If current frame is the first frame error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "frame-backward"
}
 
// Response
{
    "success": true
}

go-to-frame

go-to-frame command selects current frame. If case of invalid frame index error message returned.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
frameIndexnumbermandatoryNon-negative integer

Frame index. The first frame index is 0, the last frame index is <total_number_of_frames> - 1.

Result
Empty result

EXAMPLE

// Request
{
    "command": "go-to-frame",
    "arguments": 
    {
        "frameIndex": 27
    }
}
 
// Response
{
    "success": true
}

pause-play

pause-play pauses playing.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "pause-play"
}
 
// Response
{
    "success": true
}

Tracking Commands

get-tracking-props

get-tracking-props command gets current tracking properties specified in Tracking tab.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
enableFootTrackingbooleanmandatorytrue
false
Foot tracking enabled flag value.
enableGroundCollisionsbooleanmandatorytrue
false
Ground collisions enabled flag value.
enableHeadTrackingbooleanmandatorytrue
false
Head tracking enabled flag value.
shouldersTrackingModenumbermandatory Integer index of selected Shoulders combobox item.
0 - Calculated from arm position
1 - Tracked from video
Selected shoulder tracking mode.
spineTrackingModenumbermandatory Integer index of selected Spine combobox item.
0 - Stiff Lower Spine
1 - Flexible Lower Spine
2 - Very Flexible Lower Spine
Selected spine tracking mode.
trackingResolutionnumbermandatory Integer index of selected Tracking resolution combobox item.
0 - High
1 - Low
Selected tracking resolution.
jitterRemovalOptionsnumber arraymandatory Array containing 6 integers each in the range from 0 to 5.
Item 0 - value for Torso
Item 1 - value for Left arm
Item 2 - value for Right arm
Item 3 - value for Left leg
Item 4 - value for Right leg
Item 5 - value for Head
Selected jitter removal options.
trajectoryFilternumbermandatory Integers in the range from 0 to 5.Selected trajectory filter value.

EXAMPLE

// Request
{
    "command": "get-tracking-props"
}
 
// Response
{
    "success": true,
    "result":
    {
        "enableFootTracking": true,
        "enableGroundCollisions": true,
        "enableHeadTracking": true,
        "shouldersTrackingMode": 1,
        "spineTrackingMode": 0,
        "trackingResolution": 0,
        "jitterRemovalOptions": [2, 2, 2, 2, 2, 2],
        "trajectoryFilter": 2
    }
 
}

set-tracking-props

set-tracking-props command sets tracking properties in Tracking tab.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
enableFootTrackingbooleanoptionaltrue
false
Foot tracking enabled flag value.
enableGroundCollisionsbooleanoptionaltrue
false
Ground collisions enabled flag value.
enableHeadTrackingbooleanoptionaltrue
false
Head tracking enabled flag value.
shouldersTrackingModenumberoptional Integer index of selected Shoulders combobox item.
0 - Calculated from arm position
1 - Tracked from video
Selected shoulder tracking mode.
spineTrackingModenumberoptional Integer index of selected Spine combobox item.
0 - Stiff Lower Spine
1 - Flexible Lower Spine
2 - Very Flexible Lower Spine
Selected spine tracking mode.
trackingResolutionnumberoptional Integer index of selected Tracking resolution combobox item.
0 - High
1 - Low
Selected tracking resolution.
jitterRemovalOptionsnumber arrayoptional Array containing 6 integers each in the range from 0 to 5.
Item 0 - value for Torso
Item 1 - value for Left arm
Item 2 - value for Right arm
Item 3 - value for Left leg
Item 4 - value for Right leg
Item 5 - value for Head
Selected jitter removal options.
trajectoryFilternumberoptional Integers in the range from 0 to 5.Selected trajectory filter value.
Result
Empty result

EXAMPLE

// Request
{
    "command": "set-tracking-props"
    "arguments":
    {
        "enableFootTracking": true,
        "enableGroundCollisions": false,
        "enableHeadTracking": false,
        "shouldersTrackingMode": 0,
        "spineTrackingMode": 2,
        "trackingResolution": 0,
        "jitterRemovalOptions": [5, 4, 3, 2, 1, 0],
        "trajectoryFilter": 3
    }
}
 
// Response
{
    "success": true,
}

refit-pose

refit-pose starts Refit Pose operation.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
refit-pose-finished event is generated when operation is competed or stopped by user
mismatchNumbermandatoryDouble Pose mismatch value.
translationJSON objectmandatory Coordinates of root bone translation.
xnumberDouble x cooordinate.
ynumberDouble y cooordinate.
znumberDouble z cooordinate.
jointsJSON objects arraymandatory List of joints rotations.
namestringstring Name of joint.
rotationJSON objectmandatory Quaternion coordinates of joint rotation relative to parent joint.
wnumberDouble w cooordinate.
xnumberDouble x cooordinate.
ynumberDouble y cooordinate.
znumberDouble z cooordinate.

EXAMPLE

// Request
{
    "command": "refit-pose"
}
 
// Response
{
    "success": true
}
 
// Event
{
    "event": "refit-pose-finished",
    "arguments":
    {
        "mismatch": -0.0346799499867484,
        "translation":
        {
            "x": 0.20735317468643188,
            "y": 0.93647444248199463,
            "z": 0.1268109530210495
        },
        "joints":
        [
            {
                "name": "Hip",
                "rotation":
                {
                    "w": 0.99089264869689941,
                    "x": -0.024765072390437126,
                    "y": -0.13141168653964996,
                    "z": -0.015792140737175941
                }
            },
            {
                "name": "LowerSpine",
                "rotation":
                {
                    "w": 0.9960486888885498,
                    "x": 0.028381859883666039,
                    "y": -0.083706416189670563,
                    "z": -0.008648967370390892
                }
            },
            {
                "name": "MiddleSpine",
                "rotation":
                {
                    "w": 0.9960486888885498,
                    "x": 0.028381859883666039,
                    "y": -0.083706416189670563,
                    "z": -0.008648967370390892
                }
            },
            {
                "name": "Chest",
                "rotation":
                {
                    "w": 0.9960486888885498,
                    "x": 0.028381859883666039,
                    "y": -0.083706416189670563,
                    "z": -0.008648967370390892
                }
            },
            {
                "name": "Neck",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "Head",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "EffectorHead",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "LClavicle",
                "rotation":
                {
                    "w": 0.99793654680252075,
                    "x": 0.0059945755638182163,
                    "y": 0.046108484268188477,
                    "z": 0.044281467795372009
                }
            },
            {
                "name": "LShoulder",
                "rotation":
                {
                    "w": 0.9549943208694458,
                    "x": -0.034553475677967072,
                    "y": 0.29447850584983826,
                    "z": 0.0086394213140010834
                }
            },
            {
                "name": "LForearm",
                "rotation":
                {
                    "w": 0.91743868589401245,
                    "x": -0.036340668797492981,
                    "y": -0.39591813087463379,
                    "z": 0.015319216065108776
                }
             },
             {
                "name": "LHand",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "RClavicle",
                "rotation":
                {
                    "w": 0.995156466960907,
                    "x": -0.040068801492452621,
                    "y": -0.048379208892583847,
                    "z": 0.075615249574184418
                }
            },
            {
                "name": "RShoulder",
                "rotation":
                {
                    "w": 0.965262770652771,
                    "x": -0.0052053602412343025,
                    "y": 0.26098120212554932,
                    "z": -0.011395715177059174
                }
            },
            {
                "name": "RForearm",
                "rotation":
                {
                    "w": 0.99951714277267456,
                    "x": -0.020441532135009766,
                    "y": -0.0027645230293273926,
                    "z": -0.023236606270074844
                }
            },
            {
                "name": "RHand",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "RThigh",
                "rotation":
                {
                    "w": 0.79308795928955078,
                    "x": 0.068257540464401245,
                    "y": 0.60094189643859863,
                    "z": 0.072259068489074707
                }
            },
            {
                "name": "RShin",
                "rotation":
                {
                    "w": 0.79541802406311035,
                    "x": 0.053630385547876358,
                    "y": 0.60230922698974609,
                    "z": -0.040715586394071579
                }
            },
            {
                "name": "RFoot",
                "rotation":
                {
                    "w": 0.99298214912414551,
                    "x": -0.11810562759637833,
                    "y": -0.00553984334692359,
                    "z": -0.0026492751203477383
                }
            },
            {
                "name": "RToe",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "EffectorRToe",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "LThigh",
                "rotation":
                {
                    "w": 0.99825394153594971,
                    "x": -0.0010303414892405272,
                    "y": 0.021972890943288803,
                    "z": 0.054818056523799896
                }
            },
            {
                "name": "LShin",
                "rotation":
                {
                    "w": 0.99794912338256836,
                    "x": 0.059693548828363419,
                    "y": 0.023080151528120041,
                    "z": -0.0013148610014468431
                }
            },
            {
                "name": "LFoot",
                "rotation":
                {
                    "w": 0.98020839691162109,
                    "x": -0.18852591514587402,
                    "y": -0.054500121623277664,
                    "z": -0.026062563061714172
                }
            },
            {
                "name": "LToe",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            },
            {
                "name": "EffectorLToe",
                "rotation":
                {
                    "w": 1.0,
                    "x": 0.0,
                    "y": 0.0,
                    "z": 0.0
                }
            }
        ]
    }
}

delete-pose

delete-pose deleted pose in current frame.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "delete-pose"
}
 
// Response
{
    "success": true
}

track-forward

track-forward starts tracking forward.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
tracking-operation-finished event is generated when tracking is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "track-forward"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "tracking-operation-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

track-backward

track-backward starts tracking backward.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
tracking-operation-finished event is generated when tracking is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "track-backward"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "tracking-operation-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

refine-forward

refine-forward starts refine forward.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
tracking-operation-finished event is generated when tracking is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "refine-forward"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "tracking-operation-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

refine-backward

refine-backward starts refine backward.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
tracking-operation-finished event is generated when tracking is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "refine-backward"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "tracking-operation-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

pause-tracking

pause-tracking stops tracking or refine operation.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "pause-tracking"
}
 
// Response
{
    "success": true
}

remove-jitter

remove-jitter starts jitter removal.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result
Events
tracking-operation-finished event is generated when jitter removal is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "remove-jitter"
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "tracking-operation-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

Biomech Commands

load-biomech-profile

load-biomech-profile loads biomech profile from .iPiBiomech file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
profilePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "load-biomech-profile",
    "arguments": 
    {
        "profilePath": "D:\\iPiMocap\\test.iPiBiomech"
    }
}
 
// Response
{
    "success": true
}

plot-biomech-data

plot-biomech-data plots biomech data.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "plot-biomech-data"
}
 
// Response
{
    "success": true
}

export-biomech-data

export-biomech-data exports bones motion data to file or copies to clipboard.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
formatstringmandatorytext
matlab
clipboard
Export format.
filePathstringoptionalValid file path Full path to file. Not needed in case of copying to clipboard.
Result
Empty result
Events
biomech-data-export-completed event is generated when export is competed
No event arguments

EXAMPLE

// Request
{
    "command": "export-biomech-data",
    "arguments": 
    {
        "format": "text",
        "filePath": "D:\\iPiMocap\\test.txt"
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "biomech-data-export-completed",
    "arguments":
    {
        "success": true
    }
}

export-point-cloud

export-point-cloud exports point cloud data to file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
formatstringmandatorypcd
obj
matlab
ply
pts
prt
xyz
Export format.
folderPathstringmandatoryValid folder path Full path to folder to export to.
fileNamestringmandatoryFile name File name (does not include path to folder but includes extension).
subtractBackgroundbooleanoptionaltrue
false
Subtract background flag value.
subtractBackgroundThresholdnumericoptionalDouble from -4 to 5 Background subtraction threshold. Bigger value means more points will be subtracted.
exportRGBbooleanoptionaltrue
false
Export RGB information flag value.
currentFrameOnlybooleanoptionaltrue
false
If true, only current frame will be exported.
If false, all frames of Region-of-Interest will be exported.
cameraIndisesnumeric arrayoptional Array of camera indicese (starting from 0) to include in export. If not set, all cameras will be exported.
Result
Empty result
Events
point-cloud-export-finished event is generated when point cloud export is competed or cancelled
framesProcessednumbermandatoryNon-negative integer Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames.
elapsedTimenumbermandatoryDouble Total processing time in seconds.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "export-point-cloud",
    "arguments": 
    {
        "format": "pcd",
        "folderPath": "D:\\iPiMocap",
        "fileName": "test.pcd",
        "subtractBackground": true,
        "exportRGB": true
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "point-cloud-export-finished",
    "arguments":
    {
        "framesProcessed": 253,
        "elapsedTime": 62.321,
        "fps": 4.05963,
    }
}

Calibration Commands

run-calibration

run-calibration starts calibration.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
markerSpotSizestringoptionalsmall
medium
large
Marker spot size on video setting.
autoDetectInitialCameraPositionsbooleanoptionaltrue
false
Auto detect initial camera positions flag value. RGB projects only.
autoAdjustFovbooleanoptionaltrue
false
Auto adjust FOV flag value. RGB projects only.
calibrationModestringoptionalfast
normal
extended
extreme
Calibration mode. RGB projects only.
boardbooleanoptionaltrue
false
Depth projects only. Set this flag to true for running calibration with board. Other parameters are not applicable in this case.
Result
Empty result
Events
calibration-finished event is generated when point cloud export is competed or canceled
elapsedTimenumbermandatoryDouble Total processing time in seconds.
canceledbooleanmandatorytrue
false
Set to true if calibration was canceled by user.
rgbCalibrationStatJSON objects arrayoptional List of calibration statistics per camera for RBG projects.
qualitystringmandatoryfailed
good
perfect
unknown
Camera calibration quality.
reprojectionErrornumbermandatoryDouble Camera reprojection error.
mistetectsnumbermandatoryDouble Camera misdetects percent.
depthMarkerCalibrationStatJSON objectoptional Calibration statistics for depth projects calibrated with flashlight.
qualitystringmandatoryfailed
good
perfect
unknown
Camera calibration quality.
goodFramesCountnumbermandatoryNon-negative integer Number of good frames.
averagePositionErrornumbermandatoryDouble Average position error.
markerCloudMinSizenumbermandatoryDouble Marker point cloud minimum size.
occlusionPercentnumbermandatoryDouble Occlusion percent.
depthBoardCalibrationStatJSON objectoptional Calibration statistics for depth projects calibrated with board.
qualitystringmandatoryfailed
good
perfect
unknown
Camera calibration quality.
goodFramesCountnumbermandatoryNon-negative integer Number of good frames.
averageAngleErrornumbermandatoryDouble Average angle error.
averagePositionErrornumbermandatoryDouble Average position error.
progress-updated event is generated every 1 second while operation is running
elapsedTimenumbermandatoryDouble Total processing time in seconds.
remainingTimenumbermandatoryDouble Remaining time in seconds.
progressnumbermandatoryDouble within [0,1] range Progress estimation. 1 means 100%.
fpsnumbermandatoryDouble Average processing speed in frames per second.

EXAMPLE

// Request
{
    "command": "run-calibration",
    "arguments": 
    {
        "markerSpotSize": "large",
        "calibrationMode": "fast"
    }
}
 
// Response
{
    "success": true
}
 
// Event 
{
    "event": "calibration-finished",
    "arguments":
    {
        "elapsedTime": 49.0548727,
        "canceled": false,
        "rgbCalibrationStat":
        [
            {
                "quality": "perfect",
                "reprojectionError": 0.8999624,
                "misdetects": 0.36743924
            },
            {
                "quality": "perfect",
                "reprojectionError": 0.5540145,
                "misdetects": 0.328137815
            },
            {
                "quality": "perfect",
                "reprojectionError": 0.8146306,
                "misdetects": 0.5209761
            },
            {
                "quality": "perfect",
                "reprojectionError": 0.567752242,
                "misdetects": 1.13636363
            }
        ]    
    }
}
 
// Event 
{
    "event": "progress-updated",
    "arguments":
    {
        "elapsedTime": 5.3501876,
        "remainingTime": 0.80599999999999994,
        "progress":0.86486486486486491,
        "fps":6.169
    }
}

mark-ground-points

mark-ground-points marks ground points.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
framesnumeric arraymandatory List of frame indices to be marked as ground
Result
Empty result

EXAMPLE

// Request
{
    "command": "mark-ground-points",
    "arguments": 
    {
        "frames": [28, 304, 504, 1123]
    }
}
 
// Response
{
    "success": true
}

ummark-ground-points

unmark-ground-points unmarks ground points.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
framesnumeric arrayoptional List of ground points frame indices to be unmarked. Unmarks all ground points if empty.
Result
Empty result

EXAMPLE

// Request
{
    "command": "unmark-ground-points",
    "arguments": 
    {
        "frames": [28, 304, 504, 1123]
    }
}
 
// Response
{
    "success": true
}

Animation Export Commands

load-target-character

load-target-character loads target character from file or selects from predefined characters list.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
rigNamestringoptionaldefault
motionbuilder
3dsmax
endorphin
iclone
blender
Name of predefined rig.
filePathstringoptionalValid file path Full path to character file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "load-target-character",
    "arguments": 
    {
        "rigName": "3dsmax"
    }
}
 
// Response
{
    "success": true
}

load-motion-transfer-profile

load-motion-transfer-profile loads motion transfer profile from .iPiTransfer file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
profilePathstringmandatoryValid file path Full path to file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "load-motion-transfer-profile",
    "arguments": 
    {
        "profilePath": "D:\\iPiMocap\\test.iPiTransfer"
    }
}
 
// Response
{
    "success": true
}

get-export-props

get-export-props command gets export properties.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
advancedMotionTransferbooleanmandatorytrue
false

Advanced motion transfer flag value.

recenterCoordinateSystemOnCharacterbooleanmandatorytrue
false

Recenter coordinate system on character flag value.

exportTPoseInFirstFramebooleanmandatorytrue
false

Export T-Pose in first frame flag value.

EXAMPLE

// Request
{
    "command": "get-export-props"
}
 
// Response
{
    "success": true,
    "result":
    {
	"advancedMotionTransfer": true,
	"recenterCoordinateSystemOnCharacter": false,
	"exportTPoseInFirstFrame": true,
    }
}

set-export-props

set-export-props command sets export properties.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
advancedMotionTransferbooleanoptionaltrue
false

Advanced motion transfer flag value.

recenterCoordinateSystemOnCharacterbooleanoptionaltrue
false

Recenter coordinate system on character flag value.

exportTPoseInFirstFramebooleanoptionaltrue
false

Export T-Pose in first frame flag value.

Result
Empty result

EXAMPLE

// Request
{
    "command": "set-export-props",
    "arguments":
    {
	"advancedMotionTransfer": true,
	"recenterCoordinateSystemOnCharacter": false,
	"exportTPoseInFirstFrame": true,
    }
}
 
// Response
{
    "success": true
}

export-animation

export-animation exports animation to file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path to file. Animation format is defined by file extension.
fbxIsBinarystringoptionaltrue
false
Fbx binary format flag for FBX format. If false or not set, ASCII format is used.
fbxVersionstringoptional2014
2013
2012
2011
2010
Fbx version for FBX format.
Result
Empty result

EXAMPLE

// Request
{
    "command": "export-animation",
    "arguments": 
    {
        "profilePath": "D:\\iPiMocap\\test.bvh"
    }
}
 
// Response
{
    "success": true
}