Difference between revisions of "iPi Automation Add-on"
m (→stop-live-recording) |
|||
(172 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
− | '''iPi | + | '''iPi Automation Add-on''' allows to control [[iPi Recorder]] and [[iPi Mocap Studio]] from external application by sending [http://en.wikipedia.org/wiki/JSON JSON] commands via Windows dll. It can be used for: |
* Using [[iPi Recorder]] and [[iPi Mocap Studio]] as a part of a third-party solution | * Using [[iPi Recorder]] and [[iPi Mocap Studio]] as a part of a third-party solution | ||
* Automation of repeatable tasks | * Automation of repeatable tasks | ||
* Automation of custom workflow | * Automation of custom workflow | ||
− | {{Note| '''iPi | + | {{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 = | = License and Trial = | ||
− | '''iPi | + | '''iPi Automation Add-on''' requires separate license key, which you need to activate in [[iPi Mocap Studio]]. You can order your license [http://ipisoft.com/software/automation-add-on/ here], or activate 30-days free trial. |
− | Follow the steps below to start working with '''iPi | + | Follow the steps below to start working with '''iPi Automation Add-on''' |
− | # Select menu item '''Help > Manage Licenses > | + | # Select menu item '''Help > Manage Licenses > Automation Add-on'''. |
− | # Press '''Start 30-days Free Trial Period''' or '''Enter | + | # Press '''Start 30-days Free Trial Period''' or '''Enter Automation Add-on License Key''' and follow further on-screen instructions |
#:[[Image:iPi-Integration-2-2.png|400px|]] | #:[[Image:iPi-Integration-2-2.png|400px|]] | ||
− | {{Note|To use '''iPi | + | {{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 | + | = Using iPi Automation Add-on = |
== Communication Library == | == Communication Library == | ||
− | In order to enable communication with [[iPi Recorder]] and/or [[iPi Mocap Studio]], your program should use the 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 Contents === | ||
− | Redistributable of the library has the following structure: | + | Redistributable of the library ([http://files.ipisoft.com/iPiMocapAutomation.zip download link]) has the following structure: |
− | * '''bin''' Binary files to redistribute with your program. The library | + | * '''bin''' Binary files to redistribute with your program. The library file '''iPiMocapAutomation.dll''' accompanied by C runtime library '''msvcr120.dll''', command line utility '''iPiExec.exe''' and .NET managed wrapper for the library '''iPiMocapAutomation.Net.dll'''. |
** '''x86''' 32-bit version | ** '''x86''' 32-bit version | ||
** '''x64''' 64-bit version | ** '''x64''' 64-bit version | ||
Line 34: | Line 34: | ||
** '''x64''' 64-bit version | ** '''x64''' 64-bit version | ||
* '''samples''' Samples of library usage. Currently only for Visual C++ 2013. | * '''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 [http://en.wikipedia.org/wiki/JSON 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:''' <tt>iPiExec</tt> <tt>recorder</tt> | <tt>studio</tt> | ||
+ | |||
+ | <tt>recorder</tt> - for connecting to iPi Recorder. | ||
+ | |||
+ | <tt>studio</tt> - 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|According to Windows security policies, <tt>iPiExec</tt> 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 <tt>iPiExec</tt> with Admin rights as well in this case.}}SAMPLE | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | |||
+ | >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 > | ||
+ | </syntaxhighlight> | ||
=== API === | === API === | ||
Line 44: | Line 81: | ||
<syntaxhighlight lang=c> | <syntaxhighlight lang=c> | ||
− | iPi_Result iPi_ConnectToRecorder(LPCWSTR executablePath, iPi_EventCallback fnEventCallback, LPHANDLE phConnection); | + | 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); | + | iPi_Result iPi_ConnectToMocapStudio(LPCWSTR executablePath, iPi_EventCallback fnEventCallback, LPHANDLE phConnection, bool suppressAutoStart = false); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 53: | Line 90: | ||
<tr><td>fnEventCallback</td><td>Pointer to a function which handles events coming from an application. Optional.</td></tr> | <tr><td>fnEventCallback</td><td>Pointer to a function which handles events coming from an application. Optional.</td></tr> | ||
<tr><td>phConnection</td><td>Receives a connection handle. Required.</td></tr> | <tr><td>phConnection</td><td>Receives a connection handle. Required.</td></tr> | ||
+ | <tr><td>suppressAutoStart</td><td>If this flag is set to ''true'', application would not start automatically. Optional. Default value is ''false''.</td></tr> | ||
</table> | </table> | ||
Line 62: | Line 100: | ||
When connection is fully operational, its handle is returned in '''phConnection''' parameter. This handle is used in all subsequent calls for this connection. | When connection is fully operational, its handle is returned in '''phConnection''' parameter. This handle is used in all subsequent calls for this connection. | ||
+ | |||
+ | {{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 [[#Consuming Events|the section about events]] below. | Parameter '''fnEventCallback''' specifies a function to handle asynchronous application events. See [[#Consuming Events|the section about events]] below. | ||
Line 212: | Line 252: | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td><tt>appName</tt></td><td>string</td><td align=center>mandatory</td><td><tt>iPi Recorder 3</tt></td> | <tr><td><tt>appName</tt></td><td>string</td><td align=center>mandatory</td><td><tt>iPi Recorder 3</tt></td> | ||
− | <td>Application name. | + | <td>Application name. </td></tr> |
− | </td></tr> | + | |
<tr><td><tt>appVersion</tt></td><td>string</td><td align=center>mandatory</td><td>Version number in the format <tt>XX.XXX.XXX.XXX</tt></td> | <tr><td><tt>appVersion</tt></td><td>string</td><td align=center>mandatory</td><td>Version number in the format <tt>XX.XXX.XXX.XXX</tt></td> | ||
− | <td>Application version number. | + | <td>Application version number. </td></tr> |
− | </td></tr> | + | <tr><td><tt>mainWindowHandle</tt></td><td>number</td><td align=center>mandatory</td><td><tt>Integer</tt></td> |
− | + | <td>Windows API handle of main window.</td></tr> | |
+ | <tr><td><tt>processId</tt></td><td>number</td><td align=center>mandatory</td><td><tt>Integer</tt></td> | ||
+ | <td>Windows process id.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 233: | Line 274: | ||
{ | { | ||
"appName": "iPi Recorder 3", | "appName": "iPi Recorder 3", | ||
− | "appVersion": "99.876.543.210" | + | "appVersion": "99.876.543.210", |
+ | "mainWindowHandle":524736, | ||
+ | "processId":12368 | ||
} | } | ||
} | } | ||
Line 400: | Line 443: | ||
// Request | // Request | ||
{ | { | ||
− | "command": "open-recorder" | + | "command": "open-recorder", |
"arguments": | "arguments": | ||
{ | { | ||
Line 436: | Line 479: | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
− | <tr><td colspan="5">'''background-evaluation-stopped''' event is generated when background evaluation | + | <tr><td colspan="5">'''background-evaluation-stopped''' event is generated when background evaluation ends</td></tr> |
<tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | <tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
<td>Success flag. Set to <tt>true</tt> if background evaluation was completed successfully.</td></tr> | <td>Success flag. Set to <tt>true</tt> if background evaluation was completed successfully.</td></tr> | ||
<tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | <tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
− | <td>Cancellation flag. Set to <tt>true</tt> if background evaluation was cancelled by user | + | <td>Cancellation flag. Set to <tt>true</tt> if background evaluation was cancelled by user.</td></tr> |
+ | <tr><td><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Description of the error when background evaluation has failed.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 447: | Line 492: | ||
// Request | // Request | ||
{ | { | ||
− | "command": "evaluate- | + | "command": "evaluate-background", |
"arguments": | "arguments": | ||
{ | { | ||
Line 468: | Line 513: | ||
"cancelled": false | "cancelled": false | ||
} | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== go-to-screen ==== | ||
+ | |||
+ | ''go-to-screen'' opens SETUP, BACKGROUND or RECORD screen of [[iPi Recorder]]. / | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>screen</tt></td><td>string</td><td align=center>mandatory</td><td><tt>setup<br>background<br>record</tt></td> | ||
+ | <td>Screen name to open as it is shown in user interface.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "go-to-screen", | ||
+ | "arguments": | ||
+ | { | ||
+ | "screen": "record" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 485: | Line 560: | ||
<tr><td><tt>startDelay</tt></td><td>number</td><td align=center>optional</td><td>Integer number of seconds from 0 to 60<td> | <tr><td><tt>startDelay</tt></td><td>number</td><td align=center>optional</td><td>Integer number of seconds from 0 to 60<td> | ||
Setting start delay for recording. | Setting start delay for recording. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>forceStart</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true</tt><br><tt>false</tt><td> | ||
+ | Setting this flag to <tt>true</tt> 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 <tt>true</tt>. | ||
</td></tr> | </td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
− | <tr><td colspan="5">'''recording- | + | <tr><td colspan="5">'''recording-started''' event is generated when recording has started successfully.</td></tr> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
<tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path<td> | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path<td> | ||
Full path to destination file. | Full path to destination file. | ||
</td></tr> | </td></tr> | ||
− | <tr><td><tt>fileSize</tt></td><td>number</td><td align=center> | + | <tr><td><tt>startMoment</tt></td><td>string</td><td align=center>mandatory</td><td>Date and time value in format<br/><tt>yyyy-MM-ddTHH:mm:ss.sssssss</tt></td> |
− | <td>Size of the recorded file in bytes.</td></tr> | + | <td>Moment when recording has started, in local time.</td></tr> |
− | <tr><td><tt>duration</tt></td><td>string</td><td align=center> | + | <tr><td colspan="5">'''recording-stopped''' event is generated when recording is stopped due to sending '''[[#stop-recording|stop-recording]]''' command or abnormally in case of some error.</td></tr> |
− | Duration of the recording. | + | <tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> |
+ | <td>Success flag. Set to <tt>true</tt> if recording is successful.</td></tr> | ||
+ | <tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Cancellation flag. Set to <tt>true</tt> if recording was cancelled by user before any frame has been recorded.</td></tr> | ||
+ | <tr><td><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Error message. Set if there was an error during background evaluation.</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path<td> | ||
+ | Full path to destination file. Set on successful recording. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>fileSize</tt></td><td>number</td><td align=center>optional</td><td>Non-negative integer</td> | ||
+ | <td>Size of the recorded file in bytes. Set on successful recording.</td></tr> | ||
+ | <tr><td><tt>duration</tt></td><td>string</td><td align=center>optional</td><td>Timespan value in format<br><tt>hh:mm:ss.sssssss</tt><td> | ||
+ | Duration of the recording. Set on successful recording. | ||
</td></tr> | </td></tr> | ||
− | <tr><td><tt>frameCount</tt></td><td>number</td><td align=center> | + | <tr><td><tt>frameCount</tt></td><td>number</td><td align=center>optional</td><td>Non-negative integer</td> |
− | <td>Number of the recorded frames.</td></tr> | + | <td>Number of the recorded frames. Set on successful recording.</td></tr> |
+ | <tr><td><tt>statistics</tt></td><td>object</td><td align=center>optional</td><td></td> | ||
+ | <td>Statistics of the recording. Set on successful recording.</td></tr> | ||
+ | <tr><td><tt>slaveResults</tt></td><td>array</td><td align=center>optional</td><td></td> | ||
+ | <td>Results of recording on slave PCs. Set on distributed recording. Fields of array items are described below.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>hostName</tt></td><td>string</td><td align=center>mandatory</td><td></td> | ||
+ | <td>Host name of the slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br/>false</tt></td> | ||
+ | <td>Whether recording on that PC was successful.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Error message. Set if there was an error during recording on that slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>remoteFilePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path</td> | ||
+ | <td>Local path to a recorded iPiVideo file on that slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>statistics</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Statistics of the recording on that slave PC. Set on successful recording.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 514: | Line 614: | ||
{ | { | ||
"filePath": "D:\\iPiMocap\\test_record.iPiVideo", | "filePath": "D:\\iPiMocap\\test_record.iPiVideo", | ||
− | "startDelay": 1 | + | "startDelay": 1, |
+ | "forceStart": true | ||
} | } | ||
} | } | ||
Line 521: | Line 622: | ||
{ | { | ||
"success": true | "success": true | ||
+ | } | ||
+ | |||
+ | // Event | ||
+ | { | ||
+ | "event": "recording-started", | ||
+ | "arguments": | ||
+ | { | ||
+ | "filePath": "D:\\iPiMocap\\test_record.iPiVideo", | ||
+ | "startMoment": "2017-08-14T10:25:14.6457890" | ||
+ | } | ||
} | } | ||
Line 533: | Line 644: | ||
"fileSize": 39975560, | "fileSize": 39975560, | ||
"duration": "00:00:04.0155425", | "duration": "00:00:04.0155425", | ||
− | "frameCount": 197 | + | "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 | ||
+ | } | ||
+ | }, | ||
} | } | ||
} | } | ||
Line 549: | Line 793: | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
− | <tr><td colspan="5">'''recording-stopped''' event is generated when recording is stopped</td></tr> | + | <tr><td colspan="5">'''recording-stopped''' event is generated when recording is stopped, either by sending '''stop-recording''' command or abnormally in case of some error.</td></tr> |
<tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | <tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
<td>Success flag. Set to <tt>true</tt> if background evaluation was completed successfully.</td></tr> | <td>Success flag. Set to <tt>true</tt> if background evaluation was completed successfully.</td></tr> | ||
<tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | <tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
− | <td>Cancellation flag. Set to <tt>true</tt> if | + | <td>Cancellation flag. Set to <tt>true</tt> if recording was cancelled by user before any frame has been recorded.</td></tr> |
− | <tr><td><tt>filePath</tt></td><td>string</td><td align=center> | + | <tr><td><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> |
− | Full path to destination file. | + | <td>Error message. Set if there was an error during background evaluation.</td></tr> |
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path<td> | ||
+ | Full path to destination file. Set on successful recording. | ||
</td></tr> | </td></tr> | ||
− | <tr><td><tt>fileSize</tt></td><td>number</td><td align=center> | + | <tr><td><tt>fileSize</tt></td><td>number</td><td align=center>optional</td><td>Non-negative integer</td> |
− | <td>Size of the recorded file in bytes.</td></tr> | + | <td>Size of the recorded file in bytes. Set on successful recording.</td></tr> |
− | <tr><td><tt>duration</tt></td><td>string</td><td align=center> | + | <tr><td><tt>duration</tt></td><td>string</td><td align=center>optional</td><td>Timespan value in format<br><tt>hh:mm:ss.sssssss</tt><td> |
− | Duration of the recording. | + | Duration of the recording. Set on successful recording. |
</td></tr> | </td></tr> | ||
− | <tr><td><tt>frameCount</tt></td><td>number</td><td align=center> | + | <tr><td><tt>frameCount</tt></td><td>number</td><td align=center>optional</td><td>Non-negative integer</td> |
− | <td>Number of the recorded frames.</td></tr> | + | <td>Number of the recorded frames. Set on successful recording.</td></tr> |
+ | <tr><td><tt>statistics</tt></td><td>object</td><td align=center>optional</td><td></td> | ||
+ | <td>Statistics of the recording. Set on successful recording.</td></tr> | ||
+ | <tr><td><tt>slaveResults</tt></td><td>array</td><td align=center>optional</td><td></td> | ||
+ | <td>Results of recording on slave PCs. Set on distributed recording. Fields of array items are described below.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>hostName</tt></td><td>string</td><td align=center>mandatory</td><td></td> | ||
+ | <td>Host name of the slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br/>false</tt></td> | ||
+ | <td>Whether recording on that PC was successful.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Error message. Set if there was an error during recording on that slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>remoteFilePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path</td> | ||
+ | <td>Local path to a recorded iPiVideo file on that slave PC.</td></tr> | ||
+ | <tr><td style="padding-left:40px"><tt>statistics</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Statistics of the recording on that slave PC. Set on successful recording.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 609: | Line 869: | ||
<tr><td><tt>model</tt></td><td>string</td><td align=center>mandatory</td><td>Supported device model</td> | <tr><td><tt>model</tt></td><td>string</td><td align=center>mandatory</td><td>Supported device model</td> | ||
<td>Device model.</td></tr> | <td>Device model.</td></tr> | ||
+ | <tr><td><tt>index</tt></td><td>numeric</td><td align=center>mandatory</td><td>Positive integer.</td> | ||
+ | <td>Device index starting from 1 as it is seen in iPi Recorder.</td></tr> | ||
<tr><td><tt>id</tt></td><td>string</td><td align=center>mandatory</td><td>Unique string, format depends on device model</td> | <tr><td><tt>id</tt></td><td>string</td><td align=center>mandatory</td><td>Unique string, format depends on device model</td> | ||
<td>Unique string that is used to identify recording devices in ''open-recorder'' command.</td></tr> | <td>Unique string that is used to identify recording devices in ''open-recorder'' command.</td></tr> | ||
Line 631: | Line 893: | ||
<tr><td style="padding-left: 40px;"><tt>totalBadFrames</tt></td><td>number</td><td align=center>mandatory | <tr><td style="padding-left: 40px;"><tt>totalBadFrames</tt></td><td>number</td><td align=center>mandatory | ||
</td><td>Integer</td><td>Total bad frames.</td></tr> | </td><td>Integer</td><td>Total bad frames.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>backgroundAreaPercent</tt></td><td>numeric</td><td align=center>optional | ||
+ | </td><td>Percent value rounded to integer.</td><td>Percent of area equal to recorded background.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 637: | Line 901: | ||
// Request | // Request | ||
{ | { | ||
− | "command": " | + | "command": "get-devices-state" |
} | } | ||
Line 648: | Line 912: | ||
"kind": "camera", | "kind": "camera", | ||
"model": "PlayStation Eye", | "model": "PlayStation Eye", | ||
+ | "index": 1, | ||
"id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&2ed872d7&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}", | "id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&2ed872d7&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}", | ||
"selected": true, | "selected": true, | ||
Line 657: | Line 922: | ||
"badFramesPerSecond": 0.0, | "badFramesPerSecond": 0.0, | ||
"totalFrameDrops": 0, | "totalFrameDrops": 0, | ||
− | "totalBadFrames": 0 | + | "totalBadFrames": 0, |
+ | "backgroundAreaPercent": 76 | ||
} | } | ||
}, | }, | ||
Line 663: | Line 929: | ||
"kind": "microphone", | "kind": "microphone", | ||
"model": "USB Camera-B4.04.27.1", | "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}", | "id": "\\\\?\\usb#vid_1415&pid_2000&mi_00#7&1c1ec232&0&0000#{4cff9941-d72f-4951-9291-03d8fc97fe30}", | ||
"selected": true, | "selected": true, | ||
Line 672: | Line 939: | ||
"badFramesPerSecond": 0.0, | "badFramesPerSecond": 0.0, | ||
"totalFrameDrops": 0, | "totalFrameDrops": 0, | ||
− | "totalBadFrames": 0 | + | "totalBadFrames": 0, |
+ | "backgroundAreaPercent": 98 | ||
} | } | ||
} | } | ||
Line 775: | Line 1,043: | ||
Selected depth compression mode. | Selected depth compression mode. | ||
</td></tr> | </td></tr> | ||
− | |||
− | |||
</table> | </table> | ||
Line 936: | Line 1,202: | ||
{ | { | ||
"success": true | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== discover-slaves ==== | ||
+ | |||
+ | ''discover-slaves'' finds PCs on the network running [[iPi Recorder]] in the slave mode ready to participate in distributed recording. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>timeout</tt></td><td>string</td><td align=center>optional</td><td>Time span value in format '''hh:mm:ss[.sssssss]'''</td> | ||
+ | <td>Time to wait for slaves to be discovered. Default value is 5 seconds.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">Array of host names of slave PCs which have been found.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "discover-slaves", | ||
+ | "arguments": | ||
+ | { | ||
+ | "timeout": "0:0:2" // 2 seconds | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": ["PC-MIKE", "NB-ANDY"] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== connect-to-slaves ==== | ||
+ | |||
+ | ''connect-to-slaves'' connects to PCs on the network running [[iPi Recorder]] in the slave mode for distributed recording. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>timeout</tt></td><td>string</td><td align=center>optional</td><td>Time span value in format '''hh:mm:ss[.sssssss]'''</td> | ||
+ | <td>Time to wait for slaves to be discovered. Default value is 5 seconds.</td></tr> | ||
+ | <tr><td><tt>hostNames</tt></td><td>array</td><td align=center>optional</td><td>Array items are strings.</td> | ||
+ | <td>A list of host names of slave PCs to connect to. If not specified, connects to all slaves found. If some of the specified slaves was not found, the command results in an error.</tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">Array of host names of slave PCs which have been connected.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "connect-to-slaves", | ||
+ | "arguments": | ||
+ | { | ||
+ | "timeout": "0:0:2", // 2 seconds | ||
+ | "hostNames": ["PC-MIKE"] // connect only to this PC | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": ["PC-MIKE"] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== disconnect-from-slaves ==== | ||
+ | |||
+ | ''disconnect-from-slaves'' ends existing connection to slave instances of [[iPi Recorder]]. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "disconnect-from-slaves" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== enter-slave-mode ==== | ||
+ | |||
+ | ''enter-slave-mode'' puts [[iPi Recorder]] into the slave mode, enabling it to participate in distributed recording. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "enter-slave-mode" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== exit-slave-mode ==== | ||
+ | |||
+ | ''exit-slave-mode'' returns [[iPi Recorder]] from the slave mode. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "exit-slave-mode" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== start-broadcasting ==== | ||
+ | |||
+ | ''start-broadcasting'' starts broadcasting data for [[Real-time Tracking for Live Preview|real-time tracking]]. | ||
+ | |||
+ | {{AutomationPrimitiveCommand|start-broadcasting}}} | ||
+ | |||
+ | ==== stop-broadcasting ==== | ||
+ | |||
+ | ''stop-broadcasting'' stops broadcasting data for [[Real-time Tracking for Live Preview|real-time tracking]]. | ||
+ | |||
+ | {{AutomationPrimitiveCommand|stop-broadcasting}} | ||
+ | |||
+ | ==== merge-videos ==== | ||
+ | |||
+ | ''merge-videos'' performs merging of videos recorded by individual PCs during [[Distributed Recording|distributed recording]], similarly to '''Merge Videos''' button in the toolbar. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>inputFilePaths</tt></td><td>string array</td><td align=center>mandatory</td><td>2 or more valid file paths</td><td>iPiVideo files to merge</td></tr> | ||
+ | <tr><td><tt>outputFilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td><td> | ||
+ | Resulting iPiVideo file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''merge-videos-completed''' event is generated when the merge operation ends.</td></tr> | ||
+ | <tr><td><tt>success</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Success flag. Set to <tt>true</tt> if video files have been merged successfully.</td></tr> | ||
+ | <tr><td><tt>cancelled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Cancellation flag. Set to <tt>true</tt> if operation has been cancelled by user.</td></tr> | ||
+ | <tr><td><tt>error</tt></td><td>string</td><td align=center>optional</td><td></td> | ||
+ | <td>Description of the error when a merge operation has failed.</td></tr> | ||
+ | </table> | ||
+ | |||
+ | {{Important|If output file exists, it will be overwritten without a notice.}} | ||
+ | |||
+ | {{Tip|It is recommended to use absolute file paths. Relative paths are treated against the current directory of iPi Recorder process.}} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,021: | Line 1,495: | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
<tr><td colspan="5">'''playing-stopped''' event is generated when playing is competed (reached the last frame) or stopped by user</td></tr> | <tr><td colspan="5">'''playing-stopped''' event is generated when playing is competed (reached the last frame) or stopped by user</td></tr> | ||
<tr><td colspan="5">''No event arguments''</td></tr> | <tr><td colspan="5">''No event arguments''</td></tr> | ||
Line 1,048: | Line 1,523: | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
− | |||
− | |||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 1,168: | Line 1,641: | ||
<td>Application version number. | <td>Application version number. | ||
</td></tr> | </td></tr> | ||
− | + | <tr><td><tt>mainWindowHandle</tt></td><td>number</td><td align=center>mandatory</td><td><tt>Integer</tt></td> | |
+ | <td>Windows API handle of main window.</td></tr> | ||
+ | <tr><td><tt>processId</tt></td><td>number</td><td align=center>mandatory</td><td><tt>Integer</tt></td> | ||
+ | <td>Windows process id.</td></tr> | ||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 1,184: | Line 1,660: | ||
{ | { | ||
"appName": "iPi Mocap Studio 3", | "appName": "iPi Mocap Studio 3", | ||
− | "appVersion": "99.876.543.210" | + | "appVersion": "99.876.543.210", |
+ | "mainWindowHandle":19925022, | ||
+ | "processId":7328 | ||
} | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | ==== exit ==== | ||
+ | |||
+ | ''exit'' command closes [[iPi Mocap Studio]]. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "exit" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Project Commands === | ||
==== create-project ==== | ==== create-project ==== | ||
''create-project'' creates new project from specified [[.iPiVideo File Extension|'''.iPiVideo''']] file. | ''create-project'' creates new project from specified [[.iPiVideo File Extension|'''.iPiVideo''']] file. | ||
+ | |||
+ | ===== Action projects ===== | ||
<table class="wikitable" style="font-size: smaller; min-width: 50%"> | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
Line 1,199: | Line 1,706: | ||
<td>Full path of [[.iPiVideo File Extension|'''.iPiVideo''']] file. | <td>Full path of [[.iPiVideo File Extension|'''.iPiVideo''']] file. | ||
</td></tr> | </td></tr> | ||
− | <tr><td><tt>projectType</tt></td><td>string</td><td align=center>mandatory</td><td><tt>action | + | <tr><td><tt>projectType</tt></td><td>string</td><td align=center>mandatory</td><td><tt>action</tt></td> |
<td>Type of the project. | <td>Type of the project. | ||
</td></tr> | </td></tr> | ||
<tr><td><tt>sceneFilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | <tr><td><tt>sceneFilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
− | <td>Scene | + | <td>Scene or project file path to take calibration information from: [[.iPiScene File Extension|.iPiScene]], [[.iPiCalib File Extension|.iPiCalib]] or [[.iPiMotion File Extension|.iPiMotion]] file.</td></tr> |
− | + | <tr><td><tt>actors</tt></td><td>array</td><td align=center>mandatory</td><td></td> | |
− | + | <td>Each item should be either a string containing an [[.iPiActor File Extension|.iPiActor]] file path, or an object specifying actor parameters directly. Fields of such object are listed below.</td></tr> | |
− | + | ||
− | </td></tr> | + | |
− | <tr><td><tt>actors</tt></td><td> | + | |
− | <td> | + | |
− | + | ||
− | + | ||
− | + | ||
<tr><td style="padding-left: 40px;"><tt>height</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | <tr><td style="padding-left: 40px;"><tt>height</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
<td>Height of actor.</td></tr> | <td>Height of actor.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>gender</tt></td><td>string</td><td align=center>optional</td><td><tt>female<br>male</tt></td> | ||
+ | <td>Gender of actor. Default is <tt>male</tt>.</td></tr> | ||
<tr><td style="padding-left: 40px;"><tt>clothingModel</tt></td><td>string</td><td align=center>optional</td><td><tt>longsleeveshirt<br>tshirt<br>tshirtoverlongsleeveshirt<br></tt></td> | <tr><td style="padding-left: 40px;"><tt>clothingModel</tt></td><td>string</td><td align=center>optional</td><td><tt>longsleeveshirt<br>tshirt<br>tshirtoverlongsleeveshirt<br></tt></td> | ||
− | <td>Actor clothing model.<br>Requred for projects recorded with RGB cameras.</td></tr> | + | <td>Actor clothing model.<br>Requred for projects recorded with RGB cameras. Default is <tt>longsleeveshirt</tt></td></tr> |
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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"] | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===== Calibration projects ===== | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>videoFilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path of [[.iPiVideo File Extension|'''.iPiVideo''']] file. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>projectType</tt></td><td>string</td><td align=center>mandatory</td><td><tt>calibration</tt></td> | ||
+ | <td>Type of the project. | ||
+ | </td></tr> | ||
<tr><td><tt>cameraFov</tt></td><td>number</td><td align=center>optional</td><td>Double</td> | <tr><td><tt>cameraFov</tt></td><td>number</td><td align=center>optional</td><td>Double</td> | ||
− | <td> | + | <td>Camera diagonal field of view in degrees. Default is <tt>75</tt>.<br/>If the video file contains valid FOV values for cameras, they override the value of this parameter. |
</td></tr> | </td></tr> | ||
<tr><td><tt>autoAdjustFov</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | <tr><td><tt>autoAdjustFov</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
− | <td> | + | <td>Switches auto detection of camera field of view. Default is <tt>false</tt>. |
</td></tr> | </td></tr> | ||
<tr><td><tt>autoDetectInitialCameraPositions</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | <tr><td><tt>autoDetectInitialCameraPositions</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
− | <td> | + | <td>Switches auto detection of initial camera positions. Default is <tt>true</tt>. |
</td></tr> | </td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
Line 1,237: | Line 1,769: | ||
"arguments": | "arguments": | ||
{ | { | ||
− | "videoFilePath": "D:\\iPiMocap\\ | + | "videoFilePath": "D:\\iPiMocap\\test_calibration.iPiVideo", |
− | "projectType": " | + | "projectType": "calibration", |
− | " | + | "cameraFov": 80, |
− | + | ||
} | } | ||
} | } | ||
Line 1,254: | Line 1,785: | ||
<tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
<td>Full path of [[.iPiMotion File Extension|'''.iPiMotion''']] file. | <td>Full path of [[.iPiMotion File Extension|'''.iPiMotion''']] file. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>videoFilePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path</td> | ||
+ | <td>Full path of [[.iPiVideo File Extension|'''.iPiVideo''']] file. | ||
</td></tr> | </td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
Line 1,266: | Line 1,800: | ||
"arguments": | "arguments": | ||
{ | { | ||
− | "filePath": "D:\\iPiMocap\\test_project.iPiMotion" | + | "filePath": "D:\\iPiMocap\\test_project.iPiMotion", |
+ | "videoFilePath": "D:\\iPiMocap\\test_project.iPiVideo" | ||
} | } | ||
} | } | ||
Line 1,371: | Line 1,906: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | === Project Properties Commands === | ||
==== get-timeline-props ==== | ==== get-timeline-props ==== | ||
Line 1,445: | Line 1,982: | ||
''set-timeline-props'' command sets timeline properties of the current project. | ''set-timeline-props'' command sets timeline properties of the current project. | ||
+ | |||
+ | {{Tip|If property is not specified in command arguments, current value in user interface will be used. }} | ||
<table class="wikitable" style="font-size: smaller; min-width: 50%"> | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
Line 1,468: | Line 2,007: | ||
// Request | // Request | ||
{ | { | ||
− | "command": "set-timeline-props" | + | "command": "set-timeline-props", |
"arguments": | "arguments": | ||
{ | { | ||
Line 1,498: | Line 2,037: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==== | + | ==== get-view-props ==== |
− | '' | + | ''get-view-props'' command gets current view properties specified via ''View'' menu. |
+ | |||
+ | <table class="wikitable" style="font-size: smaller;"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''General view properties''</td></tr> | ||
+ | <tr><td><tt>skin</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show skin flag value.</td></tr> | ||
+ | <tr><td><tt>skinOpacity</tt></td><td>numeric</td><td align=center>mandatory</td><td>Double from 0 to 1</td> | ||
+ | <td>Skin opacity value.</td></tr> | ||
+ | <tr><td><tt>bones</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show bones flag value.</td></tr> | ||
+ | <tr><td><tt>viewportBackgroundColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Viewport background color.</td></tr> | ||
+ | <tr><td><tt>cameras</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show cameras flag value.</td></tr> | ||
+ | <tr><td><tt>currentCamera</tt></td><td>numeric</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Selected camera index starting from 0.</td></tr> | ||
+ | <tr><td><tt>groundPlane</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show ground plane flag value.</td></tr> | ||
+ | <tr><td><tt>viewBackground</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show background flag value.</td></tr> | ||
+ | <tr><td colspan="5">''Action projects view properties''</td></tr> | ||
+ | <tr><td><tt>currentActor</tt></td><td>numeric</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Selected actor index starting from 0.</td></tr> | ||
+ | <tr><td><tt>trajectories</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show trajectories flag value.</td></tr> | ||
+ | <tr><td><tt>skeletonStrobe</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show skeleton strobe flag value.</td></tr> | ||
+ | <tr><td><tt>extraSkeletonStrobe</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show extra skeleton strobe flag value.</td></tr> | ||
+ | <tr><td><tt>collisionObjects</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show collision objects flag value.</td></tr> | ||
+ | <tr><td><tt>massObjects</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show mass objects flag value.</td></tr> | ||
+ | <tr><td><tt>poseMismatch</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show pose mismatch flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing RGB information''</td></tr> | ||
+ | <tr><td><tt>video</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show video flag value.</td></tr> | ||
+ | <tr><td><tt>videoOpacity</tt></td><td>numeric</td><td align=center>mandatory</td><td>Double from 0 to 1</td> | ||
+ | <td>Video opacity value.</td></tr> | ||
+ | <tr><td><tt>videoThumbnails</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show video thumbnails flag value.</td></tr> | ||
+ | <tr><td><tt>lightSource</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show light source flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing depth information''</td></tr> | ||
+ | <tr><td><tt>depth</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show depth flag value.</td></tr> | ||
+ | <tr><td><tt>depthOpacity</tt></td><td>numeric</td><td align=center>mandatory</td><td>Double from 0 to 1</td> | ||
+ | <td>Depth opacity value.</td></tr> | ||
+ | <tr><td><tt>hideBackground</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Hide background flag value.</td></tr> | ||
+ | <tr><td><tt>depthFromAllSensors</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show depth from all sensors flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing RGB and depth information''</td></tr> | ||
+ | <tr><td><tt>alignColorVideoToDepth</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Align color video to depth flag value.</td></tr> | ||
+ | <tr><td><tt>colorPointCloudWithRgbData</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Color point cloud with RGB data flag value.</td></tr> | ||
+ | </table> | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== set-view-props ==== | ||
+ | |||
+ | ''set-view-props'' command sets view properties specified via ''View'' menu. | ||
+ | |||
+ | {{Tip|If property is not specified in command arguments, current value in user interface will be used. }} | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller;"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''General view properties''</td></tr> | ||
+ | <tr><td><tt>skin</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show skin flag value.</td></tr> | ||
+ | <tr><td><tt>skinOpacity</tt></td><td>numeric</td><td align=center>optional</td><td>Double from 0 to 1</td> | ||
+ | <td>Skin opacity value.</td></tr> | ||
+ | <tr><td><tt>bones</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show bones flag value.</td></tr> | ||
+ | <tr><td><tt>viewportBackgroundColor</tt></td><td>string</td><td align=center>optional</td><td>Valid html color value</td> | ||
+ | <td>Viewport background color.</td></tr> | ||
+ | <tr><td><tt>cameras</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show cameras flag value.</td></tr> | ||
+ | <tr><td><tt>currentCamera</tt></td><td>numeric</td><td align=center>optional</td><td>Non-negative integer</td> | ||
+ | <td>Selected camera index starting from 0.</td></tr> | ||
+ | <tr><td><tt>groundPlane</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show ground plane flag value.</td></tr> | ||
+ | <tr><td><tt>viewBackground</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show background flag value.</td></tr> | ||
+ | <tr><td colspan="5">''Action projects view properties''</td></tr> | ||
+ | <tr><td><tt>currentActor</tt></td><td>numeric</td><td align=center>optional</td><td>Non-negative integer</td> | ||
+ | <td>Selected actor index starting from 0.</td></tr> | ||
+ | <tr><td><tt>trajectories</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show trajectories flag value.</td></tr> | ||
+ | <tr><td><tt>skeletonStrobe</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show skeleton strobe flag value.</td></tr> | ||
+ | <tr><td><tt>extraSkeletonStrobe</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show extra skeleton strobe flag value.</td></tr> | ||
+ | <tr><td><tt>collisionObjects</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show collision objects flag value.</td></tr> | ||
+ | <tr><td><tt>massObjects</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show mass objects flag value.</td></tr> | ||
+ | <tr><td><tt>poseMismatch</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show pose mismatch flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing RGB information''</td></tr> | ||
+ | <tr><td><tt>video</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show video flag value.</td></tr> | ||
+ | <tr><td><tt>videoOpacity</tt></td><td>numeric</td><td align=center>optional</td><td>Double from 0 to 1</td> | ||
+ | <td>Video opacity value.</td></tr> | ||
+ | <tr><td><tt>videoThumbnails</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show video thumbnails flag value.</td></tr> | ||
+ | <tr><td><tt>lightSource</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show light source flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing depth information''</td></tr> | ||
+ | <tr><td><tt>depth</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show depth flag value.</td></tr> | ||
+ | <tr><td><tt>depthOpacity</tt></td><td>numeric</td><td align=center>optional</td><td>Double from 0 to 1</td> | ||
+ | <td>Depth opacity value.</td></tr> | ||
+ | <tr><td><tt>hideBackground</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Hide background flag value.</td></tr> | ||
+ | <tr><td><tt>depthFromAllSensors</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Show depth from all sensors flag value.</td></tr> | ||
+ | <tr><td colspan="5">''View properties of projects containing RGB and depth information''</td></tr> | ||
+ | <tr><td><tt>alignColorVideoToDepth</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Align color video to depth flag value.</td></tr> | ||
+ | <tr><td><tt>colorPointCloudWithRgbData</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Color point cloud with RGB data flag value.</td></tr><tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "set-view-props", | ||
+ | "arguments": | ||
+ | { | ||
+ | "currentActor": 0, | ||
+ | "skin": false, | ||
+ | "skinOpacity": 0.5, | ||
+ | "bones": true, | ||
+ | "viewportBackgroundColor": "#7D90A3", | ||
+ | "cameras": true, | ||
+ | "currentCamera": 2, | ||
+ | "groundPlane": true, | ||
+ | "videoOpacity": 0.6, | ||
+ | "videoThumbnails": false, | ||
+ | "lightSource": true | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Scene Commands === | ||
+ | |||
+ | ==== load-scene ==== | ||
+ | |||
+ | ''load-scene'' loads scene and light information from [[.iPiScene File Extension|'''.iPiScene''']], [[.iPiCalib File Extension|'''.iPiCalib''']] or [[.iPiMotion File Extension|'''.iPiMotion''']] file. | ||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "load-scene", | ||
+ | "arguments": | ||
+ | { | ||
+ | "filePath": "D:\\iPiMocap\\test.iPiMotion" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== save-scene ==== | ||
+ | |||
+ | ''save-scene'' saves scene and light information (if available) to [[.iPiScene File Extension|'''.iPiScene''']] file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "save-scene", | ||
+ | "arguments": | ||
+ | { | ||
+ | "filePath": "D:\\iPiMocap\\test.iPiScene" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== recenter-coordinates-on-character ==== | ||
+ | |||
+ | ''recenter-coordinates-on-character'' aligns coordinate system with character pose. | ||
<table class="wikitable" style="font-size: smaller; min-width: 50%"> | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
<tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
Line 1,514: | Line 2,314: | ||
// Request | // Request | ||
{ | { | ||
− | "command": " | + | "command": "recenter-coordinates-on-character" |
} | } | ||
Line 1,520: | Line 2,320: | ||
{ | { | ||
"success": true | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== move-coordinate-system ==== | ||
+ | |||
+ | ''move-coordinate-system'' allows to change coordinate system. Y axis remains vertical relative to detected ground plane. | ||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>shiftX</tt></td><td>string</td><td align=center>optional</td><td>Double</td> | ||
+ | <td>Shift of coordinate system along X axis, in meters.</td></tr> | ||
+ | <tr><td><tt>shiftY</tt></td><td>string</td><td align=center>optional</td><td>Double</td> | ||
+ | <td>Shift of coordinate system along Y axis, in meters. Is used to tune ground height.</td></tr> | ||
+ | <tr><td><tt>shiftZ</tt></td><td>string</td><td align=center>optional</td><td>Double</td> | ||
+ | <td>Shift of coordinate system along Z axis, in meters.</td></tr> | ||
+ | <tr><td><tt>cameraAzimuth</tt></td><td>string</td><td align=center>optional</td><td>Double</td> | ||
+ | <td>Sets azimuth angle of current camera, in degrees.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "move-coordinate-system", | ||
+ | "arguments": | ||
+ | { | ||
+ | "shiftX": 0.23, | ||
+ | "shiftY": -0.02, | ||
+ | "shiftZ": -0.6, | ||
+ | "cameraAzimuth": 0.0 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Actor Commands === | ||
+ | |||
+ | ==== load-actor ==== | ||
+ | |||
+ | |||
+ | ''load-actor'' loads actor properties from ''.iPiActor'' file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>actorIndex</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Actor index starting from 0. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "load-actor", | ||
+ | "arguments": | ||
+ | { | ||
+ | "actorIndex": 0, | ||
+ | "filePath": "D:\\iPiMocap\\test.iPiActor" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== save-actor ==== | ||
+ | |||
+ | ''save-actor'' saves actor properties to ''.iPiActor'' file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>actorIndex</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Actor index starting from 0.</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "save-actor", | ||
+ | "arguments": | ||
+ | { | ||
+ | "actorIndex": 0, | ||
+ | "filePath": "D:\\iPiMocap\\test.iPiActor" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== detect-actor-colors ==== | ||
+ | |||
+ | ''detect-actor-colors'' runs auto-detection of actor colors. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>handsColorSameAsFace</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Setting "Hands are the Same Color as Face" flag value. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''detect-actor-colors-finished''' event is generated when operation is competed or stopped by user</td></tr> | ||
+ | <tr><td><tt>shirtColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Shirt color.</td></tr> | ||
+ | <tr><td><tt>pantsColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Pants color.</td></tr> | ||
+ | <tr><td><tt>handsColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Hands color.</td></tr> | ||
+ | <tr><td><tt>faceColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Face color.</td></tr> | ||
+ | <tr><td><tt>shoesColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Shoes color.</td></tr> | ||
+ | <tr><td><tt>shoeSolesColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Shoe soles color.</td></tr> | ||
+ | <tr><td><tt>hairColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Hair color.</td></tr> | ||
+ | <tr><td><tt>sleevesColor</tt></td><td>string</td><td align=center>mandatory</td><td>Valid html color value</td> | ||
+ | <td>Sleeves color.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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" | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== get-actor-props ==== | ||
+ | |||
+ | ''get-actor-props'' returns actor properties. | ||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td><tt>gender</tt></td><td>string</td><td align=center>mandatory</td><td><tt>female<br>male</tt></td> | ||
+ | <td>Gender of actor.</td></tr> | ||
+ | <tr><td><tt>height</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Height of actor.</td></tr> | ||
+ | <tr><td><tt>clothingModel</tt></td><td>string</td><td align=center>optional</td><td><tt>longsleeveshirt<br>tshirt<br>tshirtoverlongsleeveshirt<br></tt></td> | ||
+ | <td>Actor clothing model.<br>Requred for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>shirtLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Shirt length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>longSleeveLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Long sleeve length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>shortSleeveLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Short sleeve length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>dimensions</tt></td><td>JSON object</td><td><center>optional</center></td><td> | ||
+ | <td>Actor dimensions.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>headHeight</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Height of head from chin to top in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>shouldersWidth</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Distance between shoulder joints in T-pose in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>armLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of straight arm between shoulder and wrist joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>forearmLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of forearm between elbow and wrist joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>legLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of straight leg between hip and ankle joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>lowerlegLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of lower leg between knee and ankle joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>footLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length foot between heel and big toe end in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bodyMassIndex</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Body mass index. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>chestScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Chest scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bustScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Bust scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>waistScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Waist scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>hipsScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Hips scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bellyScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Belly scale factor. 0 means default value.</td></tr> | ||
+ | </table> | ||
+ | |||
+ | {{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'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "get-actor-props" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": | ||
+ | { | ||
+ | "gender": "female", | ||
+ | "height": 1.8, | ||
+ | "clothingModel": "tshirtoverlongsleeveshirt", | ||
+ | "dimensions": | ||
+ | { | ||
+ | "headHeight": 0.21, | ||
+ | "shouldersWidth": 0.3, | ||
+ | "armLength": 0.57, | ||
+ | "legLength": 0.89, | ||
+ | "footLength": 0.26 | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== set-actor-props ==== | ||
+ | |||
+ | ''set-actor-props'' sets actor properties. | ||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>gender</tt></td><td>string</td><td align=center>mandatory</td><td><tt>female<br>male</tt></td> | ||
+ | <td>Gender of actor.</td></tr> | ||
+ | <tr><td><tt>height</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Height of actor.</td></tr> | ||
+ | <tr><td><tt>clothingModel</tt></td><td>string</td><td align=center>optional</td><td><tt>longsleeveshirt<br>tshirt<br>tshirtoverlongsleeveshirt<br></tt></td> | ||
+ | <td>Actor clothing model.<br>Requred for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>shirtLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Shirt length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>longSleeveLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Long sleeve length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>shortSleeveLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Short sleeve length. 0 means default value. Available for projects recorded with RGB cameras.</td></tr> | ||
+ | <tr><td><tt>dimensions</tt></td><td>JSON object</td><td><center>optional</center></td><td> | ||
+ | <td>Actor dimensions.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>headHeight</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Height of head from chin to top in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>shouldersWidth</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Distance between shoulder joints in T-pose in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>armLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of straight arm between shoulder and wrist joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>forearmLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of forearm between elbow and wrist joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>legLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of straight leg between hip and ankle joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>lowerlegLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length of lower leg between knee and ankle joints in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>footLength</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double</td><td>Length foot between heel and big toe end in meters.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bodyMassIndex</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Body mass index. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>chestScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Chest scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bustScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Bust scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>waistScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Waist scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>hipsScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Hips scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>bellyScale</tt></td><td>number</td><td align=center>optional | ||
+ | </td><td>Double from -1 to 1</td><td>Belly scale factor. 0 means default value.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | |||
+ | {{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'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,535: | Line 2,664: | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
− | |||
− | |||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 1,562: | Line 2,689: | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
− | |||
− | |||
</table> | </table> | ||
''EXAMPLE'' | ''EXAMPLE'' | ||
Line 1,664: | Line 2,789: | ||
==== pause-play ==== | ==== pause-play ==== | ||
− | ''pause-play'' pauses | + | ''pause-play'' pauses playing. |
<table class="wikitable" style="font-size: smaller; min-width: 50%"> | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
Line 1,685: | Line 2,810: | ||
"success": true | "success": true | ||
} | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== export-video ==== | ||
+ | |||
+ | ''export-video'' command exports viewport to avi video. | ||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>fileName</tt></td><td>string</td><td align=center>mandatory</td><td>File name<td> | ||
+ | File name. Must include <tt>.avi</tt> extension.</td></tr> | ||
+ | <tr><td><tt>encoding</tt></td><td>string</td><td align=center>mandatory</td><td><tt>Uncompressed<br>Jpeg</tt><td> | ||
+ | Video encoding.</td></tr> | ||
+ | <tr><td><tt>quality</tt></td><td>number</td><td align=center>optional</td><td>Integer within [1,100]<td> | ||
+ | Jpeg quality. Must be specified for <tt>Jpeg</tt>. Must not be specified for <tt>Uncompressed</tt>.</td></tr> | ||
+ | <tr><td><tt>takeIndex</tt></td><td>number</td><td align=center>optional</td><td>Non-negative integer<td> | ||
+ | Zero-based take index. If not specified, Region-of-Interest is exported. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "export-video", | ||
+ | "arguments": | ||
+ | { | ||
+ | "fileName": "D:\\iPiMocap\\textexport.avi", | ||
+ | "encoding": "jpeg", | ||
+ | "quality": 70, | ||
+ | "takeIndex": 0 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | |||
+ | // Event | ||
+ | { | ||
+ | "event": "video-export-finished", | ||
+ | "arguments": | ||
+ | { | ||
+ | "elapsedTime": 62.321, | ||
+ | "fps": 4.05963, | ||
+ | "framesProcessed": 253 | ||
+ | } | ||
+ | } | ||
+ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,691: | Line 2,867: | ||
==== get-tracking-props ==== | ==== get-tracking-props ==== | ||
− | ''get-tracking-props'' command gets current tracking properties specified in ''Tracking'' tab. | + | ''get-tracking-props'' command gets current tracking properties specified in ''Tracking'' or ''Live'' tab. |
<table class="wikitable" style="font-size: smaller;"> | <table class="wikitable" style="font-size: smaller;"> | ||
Line 1,698: | Line 2,874: | ||
<tr><td colspan="5">''No arguments''</td></tr> | <tr><td colspan="5">''No arguments''</td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td><tt>useFastTrackingAlgorithm</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Whether fast tracking algorithm is used. Not returned for projects with RGB, multiple actors or multiple GPUs, and for live session.</td></tr> | ||
<tr><td><tt>enableFootTracking</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | <tr><td><tt>enableFootTracking</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
<td>Foot tracking enabled flag value.</td></tr> | <td>Foot tracking enabled flag value.</td></tr> | ||
Line 1,713: | Line 2,891: | ||
<td>Integer index of selected ''Tracking resolution'' combobox item.<br><tt>0</tt> - ''High''<br><tt>1</tt> - ''Low''</td> | <td>Integer index of selected ''Tracking resolution'' combobox item.<br><tt>0</tt> - ''High''<br><tt>1</tt> - ''Low''</td> | ||
<td>Selected tracking resolution.</td></tr> | <td>Selected tracking resolution.</td></tr> | ||
− | <tr><td><tt>jitterRemovalOptions</tt></td><td>number array</td><td align=center> | + | <tr><td><tt>jitterRemovalOptions</tt></td><td>number array</td><td align=center>optional</td> |
<td>Array containing 6 integers each in the range from 0 to 5.<br><tt>Item 0</tt> - value for ''Torso''<br><tt>Item 1</tt> - value for ''Left arm''<br><tt>Item 2</tt> - value for ''Right arm''<br><tt>Item 3</tt> - value for ''Left leg''<br><tt>Item 4</tt> - value for ''Right leg''<br><tt>Item 5</tt> - value for ''Head''</td> | <td>Array containing 6 integers each in the range from 0 to 5.<br><tt>Item 0</tt> - value for ''Torso''<br><tt>Item 1</tt> - value for ''Left arm''<br><tt>Item 2</tt> - value for ''Right arm''<br><tt>Item 3</tt> - value for ''Left leg''<br><tt>Item 4</tt> - value for ''Right leg''<br><tt>Item 5</tt> - value for ''Head''</td> | ||
− | <td>Selected jitter removal options.</td></tr> | + | <td>Selected jitter removal options. Not returned for live sessions.</td></tr> |
− | <tr><td><tt>trajectoryFilter</tt></td><td>number</td><td align=center> | + | <tr><td><tt>trajectoryFilter</tt></td><td>number</td><td align=center>optional</td> |
− | <td>Integers in the range from 0 to 5.</td><td>Selected trajectory filter value.</td></tr> | + | <td>Integers in the range from 0 to 5.</td><td>Selected trajectory filter value. Not returned for live sessions.</td></tr> |
+ | <tr><td><tt>liveSmoothingFilter</tt></td><td>integer</td><td align=center>optional</td> | ||
+ | <td>Ranged from 0 to 75.</td><td>Actual value of smoothing filter for live session. Not returned for regular projects.</td></tr> | ||
</table> | </table> | ||
Line 1,748: | Line 2,928: | ||
==== set-tracking-props ==== | ==== set-tracking-props ==== | ||
− | ''set-tracking-props'' command sets tracking properties in ''Tracking'' tab. | + | ''set-tracking-props'' command sets tracking properties in ''Tracking'' or ''Live'' tab. |
+ | |||
+ | {{Tip|If property is not specified in command arguments, current value in user interface will be used. }} | ||
<table class="wikitable" style="font-size: smaller;"> | <table class="wikitable" style="font-size: smaller;"> | ||
Line 1,768: | Line 2,950: | ||
<td>Integer index of selected ''Tracking resolution'' combobox item.<br><tt>0</tt> - ''High''<br><tt>1</tt> - ''Low''</td> | <td>Integer index of selected ''Tracking resolution'' combobox item.<br><tt>0</tt> - ''High''<br><tt>1</tt> - ''Low''</td> | ||
<td>Selected tracking resolution.</td></tr> | <td>Selected tracking resolution.</td></tr> | ||
+ | <tr><td><tt>useFastTrackingAlgorithm</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Use fast tracking algorthm flag value.<br/>''Currently available only for regular projects with depth sensors, single actor and single GPU tracking.''</td></tr> | ||
<tr><td><tt>jitterRemovalOptions</tt></td><td>number array</td><td align=center>optional</td> | <tr><td><tt>jitterRemovalOptions</tt></td><td>number array</td><td align=center>optional</td> | ||
<td>Array containing 6 integers each in the range from 0 to 5.<br><tt>Item 0</tt> - value for ''Torso''<br><tt>Item 1</tt> - value for ''Left arm''<br><tt>Item 2</tt> - value for ''Right arm''<br><tt>Item 3</tt> - value for ''Left leg''<br><tt>Item 4</tt> - value for ''Right leg''<br><tt>Item 5</tt> - value for ''Head''</td> | <td>Array containing 6 integers each in the range from 0 to 5.<br><tt>Item 0</tt> - value for ''Torso''<br><tt>Item 1</tt> - value for ''Left arm''<br><tt>Item 2</tt> - value for ''Right arm''<br><tt>Item 3</tt> - value for ''Left leg''<br><tt>Item 4</tt> - value for ''Right leg''<br><tt>Item 5</tt> - value for ''Head''</td> | ||
− | <td>Selected jitter removal options.</td></tr> | + | <td>Selected jitter removal options. Not allowed for live session.</td></tr> |
<tr><td><tt>trajectoryFilter</tt></td><td>number</td><td align=center>optional</td> | <tr><td><tt>trajectoryFilter</tt></td><td>number</td><td align=center>optional</td> | ||
− | <td>Integers in the range from 0 to 5.</td><td>Selected trajectory filter value.</td></tr> | + | <td>Integers in the range from 0 to 5.</td><td>Selected trajectory filter value. Not allowed for live session.</td></tr> |
+ | <tr><td><tt>liveSmoothingFilter</tt></td><td>integer</td><td align=center>optional</td> | ||
+ | <td>Ranged from 0 to 75.</td><td>Value of smoothing filter for live session. Greater values make motion look smoother. Not allowed for regular projects.</td></tr> | ||
<tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
<tr><td colspan="5">''Empty result''</td></tr> | <tr><td colspan="5">''Empty result''</td></tr> | ||
Line 1,782: | Line 2,968: | ||
// Request | // Request | ||
{ | { | ||
− | "command": "set-tracking-props" | + | "command": "set-tracking-props", |
"arguments": | "arguments": | ||
{ | { | ||
Line 1,794: | Line 2,980: | ||
"trajectoryFilter": 3 | "trajectoryFilter": 3 | ||
} | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== refit-pose ==== | ||
+ | |||
+ | ''refit-pose'' starts ''Refit Pose'' operation. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''refit-pose-finished''' event is generated when operation is competed or stopped by user</td></tr> | ||
+ | <tr><td><tt>mismatch</tt></td><td>Number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Pose mismatch value.</td></tr> | ||
+ | <tr><td><tt>translation</tt></td><td>JSON object</td><td align=center>mandatory</td><td></td> | ||
+ | <td>Coordinates of root bone translation.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>x</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>x cooordinate.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>y</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>y cooordinate.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>z</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>z cooordinate.</td></tr> | ||
+ | <tr><td><tt>joints</tt></td><td>JSON objects array</td><td align=center>mandatory</td><td></td> | ||
+ | <td>List of joints rotations.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>name</tt></td><td>string</td><td align=center>string</td><td></td> | ||
+ | <td>Name of joint.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>rotation</tt></td><td>JSON object</td><td align=center>mandatory</td><td></td> | ||
+ | <td>Quaternion coordinates of joint rotation relative to parent joint.</td></tr> | ||
+ | <tr><td style="padding-left: 80px;"><tt>w</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>w cooordinate.</td></tr> | ||
+ | <tr><td style="padding-left: 80px;"><tt>x</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>x cooordinate.</td></tr> | ||
+ | <tr><td style="padding-left: 80px;"><tt>y</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>y cooordinate.</td></tr> | ||
+ | <tr><td style="padding-left: 80px;"><tt>z</tt></td><td>number</td><td align=center>Double</td><td></td> | ||
+ | <td>z cooordinate.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== get-pose-mismatch ==== | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td><tt>mismatch</tt></td><td>number</td><td align=center>mandatory</td><td>Negative double</td> | ||
+ | <td>Current pose mismatch.</td></tr> | ||
+ | </table> | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "get-pose-mismatch" | ||
} | } | ||
Line 1,799: | Line 3,329: | ||
{ | { | ||
"success": true, | "success": true, | ||
+ | "result": | ||
+ | { | ||
+ | "mismatch": -0.036337155848741531 | ||
+ | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | ==== delete-pose ==== | ||
+ | |||
+ | ''delete-pose'' deleted pose in current frame. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "delete-pose" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== track-forward ==== | ||
+ | |||
+ | ''track-forward'' starts tracking forward. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''tracking-operation-finished''' event is generated when tracking is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== track-backward ==== | ||
+ | |||
+ | ''track-backward'' starts tracking backward. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''tracking-operation-finished''' event is generated when tracking is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== refine-forward ==== | ||
+ | |||
+ | ''refine-forward'' starts refine forward. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''tracking-operation-finished''' event is generated when tracking is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== refine-backward ==== | ||
+ | |||
+ | ''refine-backward'' starts refine backward. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''tracking-operation-finished''' event is generated when tracking is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== pause-tracking ==== | ||
+ | |||
+ | ''pause-tracking'' stops tracking or refine operation. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "pause-tracking" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== remove-jitter ==== | ||
+ | |||
+ | ''remove-jitter'' starts jitter removal. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''tracking-operation-finished''' event is generated when jitter removal is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Live (Real-Time) Session Commands === | ||
+ | |||
+ | These commands control [[Real-time Tracking for Live Preview|real-time tracking]] function. | ||
+ | |||
+ | ==== start-live-session ==== | ||
+ | |||
+ | ''start-live-session'' starts live (real-time) session. | ||
+ | You can set desired tracking options using [[#set-tracking-props|set-tracking-props]] command after starting a session but before connecting to live sources with [[#connect-to-live-sources|connect-to-live-sources]]. | ||
+ | |||
+ | {{Note|Before live session is started a previously open project is closed automatically.}} | ||
+ | |||
+ | {{AutomationPrimitiveCommand|start-live-session}} | ||
+ | |||
+ | ==== end-live-session ==== | ||
+ | |||
+ | ''end-live-session'' ends live (real-time) session. | ||
+ | |||
+ | {{AutomationPrimitiveCommand|end-live-session}} | ||
+ | |||
+ | ==== discover-live-sources ==== | ||
+ | |||
+ | ''discover-live-sources'' finds hosts on the network which run compatible versions of [[iPi Recorder]] in [[Real-time Tracking for Live Preview#Recording|broadcast mode]]. Should be executed while in live session. | ||
+ | |||
+ | {{AutomationCommandParams | ||
+ | |args= | ||
+ | {{AutomationCommandParam|name=timeout|values=Time span value in format '''hh:mm:ss[.sssssss]'''|desc= | ||
+ | Time to wait for live sources to be discovered. Default value is 5 seconds.}} | ||
+ | |result= | ||
+ | {{AutomationCommandSimpleResult|Array of host names running available live sources.}} | ||
+ | }} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "discover-live-sources", | ||
+ | "arguments": | ||
+ | { | ||
+ | "timeout": "0:0:2" // 2 seconds | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": ["PC-MIKE"] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== connect-to-live-sources ==== | ||
+ | |||
+ | ''connect-live-sources'' establishes a connection to available or specified hosts and start real-time tracking. Should be executed while in live session. | ||
+ | |||
+ | {{AutomationCommandParams | ||
+ | |args= | ||
+ | {{AutomationCommandParam|name=hostNames|type=array|values=String array.|desc= | ||
+ | Names of hosts to connect to. If omitted, all available hosts will be used. If some of specified hosts cannot be connected the command will fail.}} | ||
+ | {{AutomationCommandParam|name=timeout|values=Time span in format '''hh:mm:ss'''.|desc= | ||
+ | Timeout to establish a connection. Default value is 5 seconds.}} | ||
+ | |result= | ||
+ | {{AutomationCommandSimpleResult|Array of host names to which a connection has been established.}} | ||
+ | }} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "connect-to-live-sources", | ||
+ | "arguments": | ||
+ | { | ||
+ | "hostNames": ["PC-MIKE"], | ||
+ | "timeout": "0:0:2" // 2 seconds | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": ["PC-MIKE"] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== disconnect-from-live-sources ==== | ||
+ | |||
+ | ''disconnect-from-live-sources'' stops real-time tracking and disconnects from hosts. Should be executed while connected. | ||
+ | |||
+ | {{AutomationPrimitiveCommand|disconnect-from-live-sources}} | ||
+ | |||
+ | ==== start-live-recording ==== | ||
+ | |||
+ | ''start-live-recording'' starts recording real-time tracking data to a project file. Should be executed while connected. | ||
+ | |||
+ | {{AutomationCommandParams | ||
+ | |args= | ||
+ | {{AutomationCommandParam|name=projectPath|values=Valid file path.|desc= | ||
+ | Path to a project file for recording. Prefer absolute path to avoid unintended location. If omitted then a value currently set in UI will be used.}} | ||
+ | |result= | ||
+ | {{AutomationCommandParam|name=projectPath|usage=mandatory|desc= | ||
+ | Actual project path used.}} | ||
+ | }} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "start-live-recording", | ||
+ | "arguments": | ||
+ | { | ||
+ | "projectPath": "D:\\iPiMocap\\test.iPiMocap" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": | ||
+ | { | ||
+ | "projectPath": "D:\\iPiMocap\\test.iPiMocap" | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== stop-live-recording ==== | ||
+ | |||
+ | ''stop-live-recording'' stops recording real-time data. Should be executed while recording. | ||
+ | |||
+ | {{AutomationCommandParams | ||
+ | |result= | ||
+ | {{AutomationCommandParam|name=projectPath|usage=mandatory|desc=Path of the recorded project.}} | ||
+ | {{AutomationCommandParam|name=frameCount|type=integer|usage=mandatory|desc=Number of frames recorded.}} | ||
+ | {{AutomationCommandParam|name=duration|usage=mandatory|values=Timespan in format '''hh:mm:ss.ffffff'''.|desc=Duration of recording.}} | ||
+ | }} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "stop-live-recording" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": | ||
+ | { | ||
+ | "projectPath": "D:\\iPiMocap\\test.iPiMocap", | ||
+ | "frameCount": 900, | ||
+ | "duration": "00:00:30.000000" | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Biomech Commands === | ||
+ | |||
+ | ==== load-biomech-profile ==== | ||
+ | |||
+ | ''load-biomech-profile'' loads biomech profile from ''.iPiBiomech'' file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>profilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "load-biomech-profile", | ||
+ | "arguments": | ||
+ | { | ||
+ | "profilePath": "D:\\iPiMocap\\test.iPiBiomech" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== plot-biomech-data ==== | ||
+ | |||
+ | ''plot-biomech-data'' plots biomech data. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "plot-biomech-data" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== export-biomech-data ==== | ||
+ | |||
+ | ''export-biomech-data'' exports bones motion data to file or copies to clipboard. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>format</tt></td><td>string</td><td align=center>mandatory</td><td><tt>text<br>matlab<br>clipboard</tt></td> | ||
+ | <td>Export format. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path</td> | ||
+ | <td>Full path to file. Not needed in case of copying to clipboard. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''biomech-data-export-completed''' event is generated when export is competed </td></tr> | ||
+ | <tr><td colspan="5">''No event arguments''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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 | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== export-point-cloud ==== | ||
+ | |||
+ | ''export-point-cloud'' exports point cloud data to file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>format</tt></td><td>string</td><td align=center>mandatory</td><td><tt>pcd<br>obj<br>matlab<br>ply<br>pts<br>prt<br>xyz</tt></td> | ||
+ | <td>Export format.</td></tr> | ||
+ | <tr><td><tt>folderPath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid folder path</td> | ||
+ | <td>Full path to folder to export to.</td></tr> | ||
+ | <tr><td><tt>fileName</tt></td><td>string</td><td align=center>mandatory</td><td>File name</td> | ||
+ | <td>File name (does not include path to folder but includes extension).</td></tr> | ||
+ | <tr><td><tt>subtractBackground</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Subtract background flag value.</td></tr> | ||
+ | <tr><td><tt>subtractBackgroundThreshold</tt></td><td>numeric</td><td align=center>optional</td><td>Double from -4 to 5</td> | ||
+ | <td>Background subtraction threshold. Bigger value means more points will be subtracted.</td></tr> | ||
+ | <tr><td><tt>exportRGB</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Export RGB information flag value.</td></tr> | ||
+ | <tr><td><tt>currentFrameOnly</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>If <tt>true</tt>, only current frame will be exported.<br>If <tt>false</tt>, all frames of Region-of-Interest will be exported.</td></tr> | ||
+ | <tr><td><tt>cameraIndises</tt></td><td>numeric array</td><td align=center>optional</td><td></td> | ||
+ | <td>Array of camera indicese (starting from 0) to include in export. If not set, all cameras will be exported.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''point-cloud-export-finished''' event is generated when point cloud export is competed or cancelled</td></tr> | ||
+ | <tr><td><tt>framesProcessed</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of frames processed. In case of successful completion equal to '''Region-of-Interest''' number of frames.</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // 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, | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Calibration Commands === | ||
+ | |||
+ | ==== run-calibration ==== | ||
+ | |||
+ | ''run-calibration'' starts calibration. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>markerSpotSize</tt></td><td>string</td><td align=center>optional</td><td><tt>small<br>medium<br>large</tt></td> | ||
+ | <td>Marker spot size on video setting.</td></tr> | ||
+ | <tr><td><tt>markerColor</tt></td><td>string</td><td align=center>optional</td><td>Valid html color value</td> | ||
+ | <td>Marker color setting.</td></tr> | ||
+ | <tr><td><tt>autoDetectInitialCameraPositions</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Auto detect initial camera positions flag value. RGB projects only.</td></tr> | ||
+ | <tr><td><tt>autoAdjustFov</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Auto adjust FOV flag value. RGB projects only.</td></tr> | ||
+ | <tr><td><tt>calibrationMode</tt></td><td>string</td><td align=center>optional</td><td><tt>fast<br>normal<br>extended<br>extreme</tt></td> | ||
+ | <td>Calibration mode. RGB projects only.</td></tr> | ||
+ | <tr><td><tt>board</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Depth projects only. Set this flag to <tt>true</tt> for running calibration with board. Other parameters are not applicable in this case.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Events'''</td></tr> | ||
+ | <tr><td colspan="5">'''calibration-finished''' event is generated when point cloud export is competed or canceled</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>canceled</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Set to <tt>true</tt> if calibration was canceled by user.</td></tr> | ||
+ | <tr><td><tt>rgbCalibrationStat</tt></td><td>JSON objects array</td><td align=center>optional</td><td></td> | ||
+ | <td>List of calibration statistics per camera for RBG projects.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>quality</tt></td><td>string</td><td align=center>mandatory</td><td><tt>failed<br>good<br>perfect<br>unknown</tt></td> | ||
+ | <td>Camera calibration quality.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>reprojectionError</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Camera reprojection error.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>mistetects</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Camera misdetects percent.</td></tr> | ||
+ | <tr><td><tt>depthMarkerCalibrationStat</tt></td><td>JSON object</td><td align=center>optional</td><td></td> | ||
+ | <td>Calibration statistics for depth projects calibrated with flashlight.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>quality</tt></td><td>string</td><td align=center>mandatory</td><td><tt>failed<br>good<br>perfect<br>unknown</tt></td> | ||
+ | <td>Camera calibration quality.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>goodFramesCount</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of good frames.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>averagePositionError</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average position error.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>markerCloudMinSize</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Marker point cloud minimum size.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>occlusionPercent</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Occlusion percent.</td></tr> | ||
+ | <tr><td><tt>depthBoardCalibrationStat</tt></td><td>JSON object</td><td align=center>optional</td><td></td> | ||
+ | <td>Calibration statistics for depth projects calibrated with board.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>quality</tt></td><td>string</td><td align=center>mandatory</td><td><tt>failed<br>good<br>perfect<br>unknown</tt></td> | ||
+ | <td>Camera calibration quality.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>goodFramesCount</tt></td><td>number</td><td align=center>mandatory</td><td>Non-negative integer</td> | ||
+ | <td>Number of good frames.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>averageAngleError</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average angle error.</td></tr> | ||
+ | <tr><td style="padding-left: 40px;"><tt>averagePositionError</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average position error.</td></tr> | ||
+ | <tr><td colspan="5">'''progress-updated''' event is generated every 1 second while operation is running</td></tr> | ||
+ | <tr><td><tt>elapsedTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Total processing time in seconds.</td></tr> | ||
+ | <tr><td><tt>remainingTime</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Remaining time in seconds.</td></tr> | ||
+ | <tr><td><tt>progress</tt></td><td>number</td><td align=center>mandatory</td><td>Double within <tt>[0,1]</tt> range</td> | ||
+ | <td>Progress estimation. <tt>1</tt> means 100%.</td></tr> | ||
+ | <tr><td><tt>fps</tt></td><td>number</td><td align=center>mandatory</td><td>Double</td> | ||
+ | <td>Average processing speed in frames per second.</td></tr></table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "run-calibration", | ||
+ | "arguments": | ||
+ | { | ||
+ | "markerSpotSize": "large", | ||
+ | "markerColor": "#0099FF", | ||
+ | "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 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== mark-ground-points ==== | ||
+ | |||
+ | ''mark-ground-points'' marks ground points. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>frames</tt></td><td>numeric array</td><td align=center>mandatory</td><td></td> | ||
+ | <td>List of frame indices to be marked as ground</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | |||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "mark-ground-points", | ||
+ | "arguments": | ||
+ | { | ||
+ | "frames": [28, 304, 504, 1123] | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== ummark-ground-points ==== | ||
+ | |||
+ | ''unmark-ground-points'' unmarks ground points. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>frames</tt></td><td>numeric array</td><td align=center>optional</td><td></td> | ||
+ | <td>List of ground points frame indices to be unmarked. Unmarks all ground points if empty.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | |||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "unmark-ground-points", | ||
+ | "arguments": | ||
+ | { | ||
+ | "frames": [28, 304, 504, 1123] | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Animation Export Commands === | ||
+ | |||
+ | ==== load-target-character ==== | ||
+ | |||
+ | ''load-target-character'' loads target character from file or selects from predefined characters list. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>rigName</tt></td><td>string</td><td align=center>optional</td><td><tt>default<br>motionbuilder<br>3dsmax<br>endorphin<br>iclone<br>blender</tt></td> | ||
+ | <td>Name of predefined rig.</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>optional</td><td>Valid file path</td> | ||
+ | <td>Full path to character file.</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "load-target-character", | ||
+ | "arguments": | ||
+ | { | ||
+ | "rigName": "3dsmax" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== load-motion-transfer-profile ==== | ||
+ | |||
+ | ''load-motion-transfer-profile'' loads motion transfer profile from ''.iPiTransfer'' file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>profilePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "load-motion-transfer-profile", | ||
+ | "arguments": | ||
+ | { | ||
+ | "profilePath": "D:\\iPiMocap\\test.iPiTransfer" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== get-export-props ==== | ||
+ | |||
+ | ''get-export-props'' command gets export properties. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller;"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td colspan="5">''No arguments''</td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td><tt>advancedMotionTransfer</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt><td> | ||
+ | Advanced motion transfer flag value. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>recenterCoordinateSystemOnCharacter</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt><td> | ||
+ | Recenter coordinate system on character flag value. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>exportTPoseInFirstFrame</tt></td><td>boolean</td><td align=center>mandatory</td><td><tt>true<br>false</tt><td> | ||
+ | Export T-Pose in first frame flag value. | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "get-export-props" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true, | ||
+ | "result": | ||
+ | { | ||
+ | "advancedMotionTransfer": true, | ||
+ | "recenterCoordinateSystemOnCharacter": false, | ||
+ | "exportTPoseInFirstFrame": true, | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== set-export-props ==== | ||
+ | |||
+ | ''set-export-props'' command sets export properties. | ||
+ | |||
+ | {{Tip|If property is not specified in command arguments, current value in user interface will be used. }} | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller;"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>advancedMotionTransfer</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt><td> | ||
+ | Advanced motion transfer flag value. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>recenterCoordinateSystemOnCharacter</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt><td> | ||
+ | Recenter coordinate system on character flag value. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>exportTPoseInFirstFrame</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt><td> | ||
+ | Export T-Pose in first frame flag value. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "set-export-props", | ||
+ | "arguments": | ||
+ | { | ||
+ | "advancedMotionTransfer": true, | ||
+ | "recenterCoordinateSystemOnCharacter": false, | ||
+ | "exportTPoseInFirstFrame": true, | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== export-animation ==== | ||
+ | |||
+ | ''export-animation'' exports animation to file. | ||
+ | |||
+ | <table class="wikitable" style="font-size: smaller; min-width: 50%"> | ||
+ | <tr><th>Parameter Name</th><th>Type</th><th>Mandatory /<br>Optional</th><th>Allowed Values</th><th>Description</th></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Arguments'''</td></tr> | ||
+ | <tr><td><tt>filePath</tt></td><td>string</td><td align=center>mandatory</td><td>Valid file path</td> | ||
+ | <td>Full path to file. Animation format is defined by file extension. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>fbxIsBinary</tt></td><td>string</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Fbx binary format flag for FBX format. If <tt>false</tt> or not set, ASCII format is used. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>fbxVersion</tt></td><td>string</td><td align=center>optional</td><td><tt>2014<br>2013<br>2012<br>2011<br>2010</tt></td> | ||
+ | <td>Fbx version for FBX format. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>exportCameras</tt></td><td>boolean</td><td align=center>optional</td><td><tt>true<br>false</tt></td> | ||
+ | <td>Whether to include camera positions to an animation file.<br/>Default is <tt>false</tt>. | ||
+ | </td></tr> | ||
+ | <tr><td><tt>targetFrameRate</tt></td><td>integer</td><td align=center>optional</td><td>Positive value</td> | ||
+ | <td>Target frame rate for exported animation. When omitted, frame rate of a source iPiVideo file is used. | ||
+ | </td></tr> | ||
+ | <tr><td colspan="5" style="background-color: white;">'''Result'''</td></tr> | ||
+ | <tr><td colspan="5">''Empty result''</td></tr> | ||
+ | </table> | ||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "export-animation", | ||
+ | "arguments": | ||
+ | { | ||
+ | "filePath": "D:\\iPiMocap\\test.bvh", | ||
+ | "targetFrameRate": 30 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== start-streaming-animation ==== | ||
+ | |||
+ | ''start-streaming-animation'' starts [[Streaming to Unity|streaming pose data]] to a network. | ||
+ | |||
+ | {{AutomationCommandParams|args= | ||
+ | {{AutomationCommandParam|name=port|type=integer|values=Positive value|desc= | ||
+ | UDP port for streaming. If omitted, the currently set value is used.}} | ||
+ | }} | ||
+ | |||
+ | ''EXAMPLE'' | ||
+ | |||
+ | <syntaxhighlight lang=javascript> | ||
+ | // Request | ||
+ | { | ||
+ | "command": "start-streaming-animation" | ||
+ | } | ||
+ | |||
+ | // Response | ||
+ | { | ||
+ | "success": true | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== stop-streaming-animation ==== | ||
+ | |||
+ | ''stop-streaming-animation'' stops [[Streaming to Unity|streaming pose data]] to a network. | ||
+ | |||
+ | {{AutomationPrimitiveCommand|stop-streaming-animation}} |
Latest revision as of 12:10, 26 February 2020
Contents
- 1 Overview
- 2 License and Trial
- 3 Using iPi Automation Add-on
- 3.1 Communication Library
- 3.2 Command Syntax
- 3.3 iPi Recorder Commands
- 3.3.1 General Commands
- 3.3.2 Recording Commands
- 3.3.2.1 open-home-screen
- 3.3.2.2 refresh-device-list
- 3.3.2.3 open-recorder
- 3.3.2.4 evaluate-background
- 3.3.2.5 go-to-screen
- 3.3.2.6 start-recording
- 3.3.2.7 stop-recording
- 3.3.2.8 get-devices-state
- 3.3.2.9 get-recorder-props
- 3.3.2.10 set-recorder-props
- 3.3.2.11 discover-slaves
- 3.3.2.12 connect-to-slaves
- 3.3.2.13 disconnect-from-slaves
- 3.3.2.14 enter-slave-mode
- 3.3.2.15 exit-slave-mode
- 3.3.2.16 start-broadcasting
- 3.3.2.17 stop-broadcasting
- 3.3.2.18 merge-videos
- 3.3.3 Player Commands
- 3.4 iPi Mocap Studio Commands
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:
- Using iPi Recorder and iPi Mocap Studio as a part of a third-party solution
- Automation of repeatable tasks
- Automation of custom workflow

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
- Select menu item Help > Manage Licenses > Automation Add-on.
- Press Start 30-days Free Trial Period or Enter Automation Add-on License Key and follow further on-screen instructions

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 file iPiMocapAutomation.dll accompanied by C runtime library msvcr120.dll, command line utility iPiExec.exe and .NET managed wrapper for the library iPiMocapAutomation.Net.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.

>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);
Parameter | Description |
---|---|
executablePath | Path to executable file of an application. Optional. |
fnEventCallback | Pointer to a function which handles events coming from an application. Optional. |
phConnection | Receives a connection handle. Required. |
suppressAutoStart | If 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.

Parameter fnEventCallback specifies a function to handle asynchronous application events. See the section about events below.
iPi_Result iPi_Disconnect(HANDLE hConnection);
Parameter | Description |
---|---|
hConnection | Connection 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);
Parameter | Description |
---|---|
hConnection | Connection handle. Required. |
jsonCommand | Command string. Required. |
pJsonResponse | Receives 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);
Parameter | Description |
---|---|
hConnection | Connection handle. |
jsonEvent | Event 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.
Constant | Description |
---|---|
IPI_OK | Operation succeeded. |
IPI_GENERAL_ERROR | Some error has occurred, for which there is no more specific error code. |
IPI_INVALID_PARAM | Invalid parameter value in a call to a function. |
IPI_OUT_OF_MEMORY | Not enough memory to complete an operation. |
IPI_CONNECTION_BROKEN | Connection to an application has been broken. Should call iPi_Disconnect on this one and establish a new connection if needed. |
IPI_CANNOT_START_APP | Application executable file was not found or other problem when starting application. |
IPI_CANNOT_CONNECT | Application 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_DATA | Invalid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
appName | string | mandatory | iPi Recorder 3 | Application name. |
appVersion | string | mandatory | Version number in the format XX.XXX.XXX.XXX | Application version number. |
mainWindowHandle | number | mandatory | Integer | Windows API handle of main window. |
processId | number | mandatory | Integer | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Array of JSON objects, each representing recording device. Fields of array items: | ||||
kind | string | mandatory | camera depth-sensor microphone |
Device type. |
model | string | mandatory | Supported device model | Device model. |
id | string | mandatory | Unique string, format depends on device model | Unique string that is used to identify recording devices in open-recorder command. |
selected | boolean | mandatory | true false |
Device selected status. |
failed | boolean | mandatory | true false |
Device failed status. |
error | string | optional | Error 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
selectedDevices | string array | mandatory | List 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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
duration | number | optional | Integer number of seconds from 2 to 10 |
Setting duration of background evaluation. |
startDelay | number | optional | Integer 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 | ||||
success | boolean | mandatory | true false |
Success flag. Set to true if background evaluation was completed successfully. |
cancelled | boolean | mandatory | true false |
Cancellation flag. Set to true if background evaluation was cancelled by user. |
error | string | optional | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
screen | string | mandatory | setup 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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | optional | Valid file path |
Full path to destination file for recording. |
startDelay | number | optional | Integer number of seconds from 0 to 60 |
Setting start delay for recording. |
forceStart | boolean | optional | true 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-started event is generated when recording has started successfully. | ||||
filePath | string | mandatory | Valid file path |
Full path to destination file. |
startMoment | string | mandatory | Date and time value in format yyyy-MM-ddTHH:mm:ss.sssssss |
Moment when recording has started, in local time. |
recording-stopped event is generated when recording is stopped due to sending stop-recording command or abnormally in case of some error. | ||||
success | boolean | mandatory | true false |
Success flag. Set to true if recording is successful. |
cancelled | boolean | mandatory | true false |
Cancellation flag. Set to true if recording was cancelled by user before any frame has been recorded. |
error | string | optional | Error message. Set if there was an error during background evaluation. | |
filePath | string | optional | Valid file path |
Full path to destination file. Set on successful recording. |
fileSize | number | optional | Non-negative integer | Size of the recorded file in bytes. Set on successful recording. |
duration | string | optional | Timespan value in format hh:mm:ss.sssssss |
Duration of the recording. Set on successful recording. |
frameCount | number | optional | Non-negative integer | Number of the recorded frames. Set on successful recording. |
statistics | object | optional | Statistics of the recording. Set on successful recording. | |
slaveResults | array | optional | Results of recording on slave PCs. Set on distributed recording. Fields of array items are described below. | |
hostName | string | mandatory | Host name of the slave PC. | |
success | boolean | mandatory | true false |
Whether recording on that PC was successful. |
error | string | optional | Error message. Set if there was an error during recording on that slave PC. | |
remoteFilePath | string | optional | Valid file path | Local path to a recorded iPiVideo file on that slave PC. |
statistics | string | optional | Statistics of the recording on that slave PC. Set on successful recording. |
EXAMPLE
// Request { "command": "start-recording", "arguments": { "filePath": "D:\\iPiMocap\\test_record.iPiVideo", "startDelay": 1, "forceStart": true } } // Response { "success": true } // Event { "event": "recording-started", "arguments": { "filePath": "D:\\iPiMocap\\test_record.iPiVideo", "startMoment": "2017-08-14T10:25:14.6457890" } } // 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
recording-stopped event is generated when recording is stopped, either by sending stop-recording command or abnormally in case of some error. | ||||
success | boolean | mandatory | true false |
Success flag. Set to true if background evaluation was completed successfully. |
cancelled | boolean | mandatory | true false |
Cancellation flag. Set to true if recording was cancelled by user before any frame has been recorded. |
error | string | optional | Error message. Set if there was an error during background evaluation. | |
filePath | string | optional | Valid file path |
Full path to destination file. Set on successful recording. |
fileSize | number | optional | Non-negative integer | Size of the recorded file in bytes. Set on successful recording. |
duration | string | optional | Timespan value in format hh:mm:ss.sssssss |
Duration of the recording. Set on successful recording. |
frameCount | number | optional | Non-negative integer | Number of the recorded frames. Set on successful recording. |
statistics | object | optional | Statistics of the recording. Set on successful recording. | |
slaveResults | array | optional | Results of recording on slave PCs. Set on distributed recording. Fields of array items are described below. | |
hostName | string | mandatory | Host name of the slave PC. | |
success | boolean | mandatory | true false |
Whether recording on that PC was successful. |
error | string | optional | Error message. Set if there was an error during recording on that slave PC. | |
remoteFilePath | string | optional | Valid file path | Local path to a recorded iPiVideo file on that slave PC. |
statistics | string | optional | Statistics of the recording on that slave PC. Set on successful recording. |
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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Array of JSON objects, each representing selected device. Fields of array items: | ||||
kind | string | mandatory | camera depth-sensor microphone |
Device type. |
model | string | mandatory | Supported device model | Device model. |
index | numeric | mandatory | Positive integer. | Device index starting from 1 as it is seen in iPi Recorder. |
id | string | mandatory | Unique string, format depends on device model | Unique string that is used to identify recording devices in open-recorder command. |
selected | boolean | mandatory | true false |
Device selected status. |
failed | boolean | mandatory | true false |
Device failed status. |
error | string | optional | Error message string | Error message if device is in failed status. |
statistics | JSON object |
Camera statistics. | ||
frameRate | number | mandatory | Double | Average frame rate. |
frameDropsPerSecond | number | mandatory | Double | Average frame drops per second. |
badFramesPerSecond | number | mandatory | Double | Average bad frames per second. |
totalFrameDrops | number | mandatory | Integer | Total frame drops. |
totalBadFrames | number | mandatory | Integer | Total bad frames. |
backgroundAreaPercent | numeric | optional | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Properties for SETUP Stage: | ||||
videoMode | string | mandatory |
Available modes depend on camera model. |
Selected RGB video mode. |
videoModeList | string array | mandatory |
List of available modes depend on camera model. |
Possible videoMode values. |
audioMode | string | optional |
Available modes depend on microphone model. |
Selected audio mode. This field is included into the response, if microphone is selected. |
audeoModeList | string array | optional |
List of available modes depend on microphone model. |
Possible audioMode values. This field is included into the response, if microphone selected. |
globalDeviceProps | JSON object |
Device-specific list of properties visible in “SHARED SETTINGS” section of SETUP stage. | ||
PlayStation Eye: Darkening for Calibration | string | optional | "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/List | string array | optional | 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. |
screensInRow | number | mandatory | Integer from 1 to number of cameras |
Selected number of screens in a row for multiple camera video view. |
screenLayout | string | mandatory |
For RGB cameras: |
Selected screen layout. |
screenLayoutList | string array | mandatory | Available screenLayout modes. | Available screen layout modes. Depend on type of selected cameras. |
Properties for BACKGROUND Stage: | ||||
backgroundEvaluationDuration | number | mandatory | Integer number of seconds from 2 to 10 |
Selected duration of background evaluation. |
backgroundEvaluationStartDelay | number | mandatory | Integer number of seconds from 0 to 30 |
Selected start delay for background evaluation. |
showEvaluatedBackground | boolean | mandatory | true false |
Selected show background mode. |
Properties for RECORD Stage: | ||||
recordingStartDelay | number | mandatory | Integer number of seconds from 0 to 60 |
Selected start delay for recording. |
hideBackgroundWhenRecording | boolean | mandatory | true false |
Selected hide background mode. |
destinationFilePath | string | mandatory |
Valid file path |
Selected full path to destination file for recording. |
colorCompression | string | mandatory |
"None" |
Selected RGB video compression mode. |
jpegQuality | number | mandatory | integer from 0 to 100 |
Selected JPEG quality for JPEG compression. |
depthCompression | string | mandatory | "None" "Background subtraction" |
Selected depth compression mode. |
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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
Properties for SETUP Stage: | ||||
videoMode | string | optional |
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. |
audioMode | string | optional |
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. |
globalDeviceProps | JSON object |
Device-specific list of properties visible in “SHARED SETTINGS” section of SETUP stage. | ||
PlayStation Eye: Darkening for Calibration | string | optional | "None" "Darkening" "Extra Darkening" |
Darkening mode for Sony PS3 Eye cameras |
screensInRow | number | optional | Integer from 1 to number of cameras |
Setting number of screens in a row for multiple camera video view. |
screenLayout | string | optional |
For RGB cameras: |
Setting screen layout. |
Properties for BACKGROUND Stage: | ||||
backgroundEvaluationDuration | number | optional | Integer number of seconds from 2 to 10 |
Setting duration of background evaluation. |
backgroundEvaluationStartDelay | number | optional | Integer number of seconds from 0 to 30 |
Setting start delay for background evaluation. |
showEvaluatedBackground | boolean | optional | true false |
Show background mode on / off. |
Properties for RECORD Stage: | ||||
recordingStartDelay | number | optional | Integer number of seconds from 0 to 60 |
Setting start delay for recording. |
hideBackgroundWhenRecording | boolean | optional | true false |
Show hide background mode on / off. |
destinationFilePath | string | optional |
Valid file path |
Full path to destination file for recording. |
colorCompression | string | optional |
"None" |
Setting RGB video compression mode. |
jpegQuality | number | optional | integer from 0 to 100 |
JPEG quality for JPEG compression. |
depthCompression | string | optional | "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 }
discover-slaves
discover-slaves finds PCs on the network running iPi Recorder in the slave mode ready to participate in distributed recording.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
timeout | string | optional | Time span value in format hh:mm:ss[.sssssss] | Time to wait for slaves to be discovered. Default value is 5 seconds. |
Result | ||||
Array of host names of slave PCs which have been found. |
EXAMPLE
// Request { "command": "discover-slaves", "arguments": { "timeout": "0:0:2" // 2 seconds } } // Response { "success": true, "result": ["PC-MIKE", "NB-ANDY"] }
connect-to-slaves
connect-to-slaves connects to PCs on the network running iPi Recorder in the slave mode for distributed recording.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
timeout | string | optional | Time span value in format hh:mm:ss[.sssssss] | Time to wait for slaves to be discovered. Default value is 5 seconds. |
hostNames | array | optional | Array items are strings. | A list of host names of slave PCs to connect to. If not specified, connects to all slaves found. If some of the specified slaves was not found, the command results in an error. |
Result | ||||
Array of host names of slave PCs which have been connected. |
EXAMPLE
// Request { "command": "connect-to-slaves", "arguments": { "timeout": "0:0:2", // 2 seconds "hostNames": ["PC-MIKE"] // connect only to this PC } } // Response { "success": true, "result": ["PC-MIKE"] }
disconnect-from-slaves
disconnect-from-slaves ends existing connection to slave instances of iPi Recorder.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "disconnect-from-slaves" } // Response { "success": true, }
enter-slave-mode
enter-slave-mode puts iPi Recorder into the slave mode, enabling it to participate in distributed recording.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "enter-slave-mode" } // Response { "success": true, }
exit-slave-mode
exit-slave-mode returns iPi Recorder from the slave mode.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "exit-slave-mode" } // Response { "success": true, }
start-broadcasting
start-broadcasting starts broadcasting data for real-time tracking.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "start-broadcasting" } // Response { "success": true }
stop-broadcasting
stop-broadcasting stops broadcasting data for real-time tracking.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "stop-broadcasting" } // 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
inputFilePaths | string array | mandatory | 2 or more valid file paths | iPiVideo files to merge |
outputFilePath | string | mandatory | Valid file path |
Resulting iPiVideo file. |
Result | ||||
Empty result | ||||
Events | ||||
merge-videos-completed event is generated when the merge operation ends. | ||||
success | boolean | mandatory | true false |
Success flag. Set to true if video files have been merged successfully. |
cancelled | boolean | mandatory | true false |
Cancellation flag. Set to true if operation has been cancelled by user. |
error | string | optional | Description of the error when a merge operation has failed. |


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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
screensInRow | number | optional | Integer from 1 to number of cameras |
Setting number of screens in a row for multiple camera video view. |
hideBackground | boolean | optional | true 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
frameIndex | number | mandatory | Non-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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
appName | string | mandatory | iPi Mocap Studio 3 | Application name. |
appVersion | string | mandatory | Version number in the format XX.XXX.XXX.XXX | Application version number. |
mainWindowHandle | number | mandatory | Integer | Windows API handle of main window. |
processId | number | mandatory | Integer | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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.
Action projects
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
videoFilePath | string | mandatory | Valid file path | Full path of .iPiVideo file. |
projectType | string | mandatory | action | Type of the project. |
sceneFilePath | string | mandatory | Valid file path | Scene or project file path to take calibration information from: .iPiScene, .iPiCalib or .iPiMotion file. |
actors | array | mandatory | Each item should be either a string containing an .iPiActor file path, or an object specifying actor parameters directly. Fields of such object are listed below. | |
height | number | mandatory | Double | Height of actor. |
gender | string | optional | female male |
Gender of actor. Default is male. |
clothingModel | string | optional | longsleeveshirt tshirt tshirtoverlongsleeveshirt |
Actor clothing model. Requred for projects recorded with RGB cameras. Default is longsleeveshirt |
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"] } }
Calibration projects
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
videoFilePath | string | mandatory | Valid file path | Full path of .iPiVideo file. |
projectType | string | mandatory | calibration | Type of the project. |
cameraFov | number | optional | Double | Camera diagonal field of view in degrees. Default is 75. If the video file contains valid FOV values for cameras, they override the value of this parameter. |
autoAdjustFov | boolean | optional | true false |
Switches auto detection of camera field of view. Default is false. |
autoDetectInitialCameraPositions | boolean | optional | true false |
Switches auto detection of initial camera positions. Default is true. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "create-project", "arguments": { "videoFilePath": "D:\\iPiMocap\\test_calibration.iPiVideo", "projectType": "calibration", "cameraFov": 80, } }
open-project
open-project command opens existing project from specified .iPiMotion file.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid file path | Full path of .iPiMotion file. |
videoFilePath | string | optional | Valid file path | Full path of .iPiVideo file. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "open-project", "arguments": { "filePath": "D:\\iPiMocap\\test_project.iPiMotion", "videoFilePath": "D:\\iPiMocap\\test_project.iPiVideo" } } // Response { "success": true }
save-project
save-project command saves current project to file.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | optional | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
projectType | string | mandatory | action calibration dummy |
Type of the project. Dummy stands for empty project. |
camerasType | string | mandatory | Depth RGB |
Type of the cameras. |
camerasCount | number | mandatory | Non-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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
timeline | TimelineClip JSON object | mandatory | Whole timeline properties. | |
regionOfInterest | TimelineClip JSON object | mandatory | Region of Interest (ROI) properties. | |
takes | TimelineClip JSON objects array | mandatory | List of takes. | |
TimelineClip JSON objects properties: | ||||
beginFrame | number | mandatory | Non-negative integer | Begin frame index (first frame is 0). |
framesCount | number | mandatory | Positive integer | Number of frames. |
secondsPerFrame | number | mandatory | Double | Seconds per frame. |
durationInSeconds | number | mandatory | Double | Duration in seconds. |
description | string | optional | string | 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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
regionOfInterest | TimelineClip JSON object | mandatory | Region of Interest (ROI) properties. | |
takes | TimelineClip JSON objects array | mandatory | List of takes. | |
TimelineClip JSON objects properties: | ||||
beginFrame | number | mandatory | Non-negative integer | Begin frame index (first frame is 0). |
framesCount | number | mandatory | Positive integer | Number of frames. |
description | string | optional | string | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
General view properties | ||||
skin | boolean | mandatory | true false |
Show skin flag value. |
skinOpacity | numeric | mandatory | Double from 0 to 1 | Skin opacity value. |
bones | boolean | mandatory | true false |
Show bones flag value. |
viewportBackgroundColor | string | mandatory | Valid html color value | Viewport background color. |
cameras | boolean | mandatory | true false |
Show cameras flag value. |
currentCamera | numeric | mandatory | Non-negative integer | Selected camera index starting from 0. |
groundPlane | boolean | mandatory | true false |
Show ground plane flag value. |
viewBackground | boolean | mandatory | true false |
Show background flag value. |
Action projects view properties | ||||
currentActor | numeric | mandatory | Non-negative integer | Selected actor index starting from 0. |
trajectories | boolean | mandatory | true false |
Show trajectories flag value. |
skeletonStrobe | boolean | mandatory | true false |
Show skeleton strobe flag value. |
extraSkeletonStrobe | boolean | mandatory | true false |
Show extra skeleton strobe flag value. |
collisionObjects | boolean | mandatory | true false |
Show collision objects flag value. |
massObjects | boolean | mandatory | true false |
Show mass objects flag value. |
poseMismatch | boolean | mandatory | true false |
Show pose mismatch flag value. |
View properties of projects containing RGB information | ||||
video | boolean | mandatory | true false |
Show video flag value. |
videoOpacity | numeric | mandatory | Double from 0 to 1 | Video opacity value. |
videoThumbnails | boolean | mandatory | true false |
Show video thumbnails flag value. |
lightSource | boolean | mandatory | true false |
Show light source flag value. |
View properties of projects containing depth information | ||||
depth | boolean | mandatory | true false |
Show depth flag value. |
depthOpacity | numeric | mandatory | Double from 0 to 1 | Depth opacity value. |
hideBackground | boolean | mandatory | true false |
Hide background flag value. |
depthFromAllSensors | boolean | mandatory | true false |
Show depth from all sensors flag value. |
View properties of projects containing RGB and depth information | ||||
alignColorVideoToDepth | boolean | mandatory | true false |
Align color video to depth flag value. |
colorPointCloudWithRgbData | boolean | mandatory | true 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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
General view properties | ||||
skin | boolean | optional | true false |
Show skin flag value. |
skinOpacity | numeric | optional | Double from 0 to 1 | Skin opacity value. |
bones | boolean | optional | true false |
Show bones flag value. |
viewportBackgroundColor | string | optional | Valid html color value | Viewport background color. |
cameras | boolean | optional | true false |
Show cameras flag value. |
currentCamera | numeric | optional | Non-negative integer | Selected camera index starting from 0. |
groundPlane | boolean | optional | true false |
Show ground plane flag value. |
viewBackground | boolean | optional | true false |
Show background flag value. |
Action projects view properties | ||||
currentActor | numeric | optional | Non-negative integer | Selected actor index starting from 0. |
trajectories | boolean | optional | true false |
Show trajectories flag value. |
skeletonStrobe | boolean | optional | true false |
Show skeleton strobe flag value. |
extraSkeletonStrobe | boolean | optional | true false |
Show extra skeleton strobe flag value. |
collisionObjects | boolean | optional | true false |
Show collision objects flag value. |
massObjects | boolean | optional | true false |
Show mass objects flag value. |
poseMismatch | boolean | optional | true false |
Show pose mismatch flag value. |
View properties of projects containing RGB information | ||||
video | boolean | optional | true false |
Show video flag value. |
videoOpacity | numeric | optional | Double from 0 to 1 | Video opacity value. |
videoThumbnails | boolean | optional | true false |
Show video thumbnails flag value. |
lightSource | boolean | optional | true false |
Show light source flag value. |
View properties of projects containing depth information | ||||
depth | boolean | optional | true false |
Show depth flag value. |
depthOpacity | numeric | optional | Double from 0 to 1 | Depth opacity value. |
hideBackground | boolean | optional | true false |
Hide background flag value. |
depthFromAllSensors | boolean | optional | true false |
Show depth from all sensors flag value. |
View properties of projects containing RGB and depth information | ||||
alignColorVideoToDepth | boolean | optional | true false |
Align color video to depth flag value. |
colorPointCloudWithRgbData | boolean | optional | true false |
Color point cloud with RGB data flag value. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "set-view-props", "arguments": { "currentActor": 0, "skin": false, "skinOpacity": 0.5, "bones": true, "viewportBackgroundColor": "#7D90A3", "cameras": true, "currentCamera": 2, "groundPlane": true, "videoOpacity": 0.6, "videoThumbnails": false, "lightSource": true } } // Response { "success": true }
Scene Commands
load-scene
load-scene loads scene and light information from .iPiScene, .iPiCalib or .iPiMotion file.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid file path | Full path to file. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "save-scene", "arguments": { "filePath": "D:\\iPiMocap\\test.iPiScene" } } // Response { "success": true }
recenter-coordinates-on-character
recenter-coordinates-on-character aligns coordinate system with character pose.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "recenter-coordinates-on-character" } // Response { "success": true }
move-coordinate-system
move-coordinate-system allows to change coordinate system. Y axis remains vertical relative to detected ground plane.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
shiftX | string | optional | Double | Shift of coordinate system along X axis, in meters. |
shiftY | string | optional | Double | Shift of coordinate system along Y axis, in meters. Is used to tune ground height. |
shiftZ | string | optional | Double | Shift of coordinate system along Z axis, in meters. |
cameraAzimuth | string | optional | Double | Sets azimuth angle of current camera, in degrees. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "move-coordinate-system", "arguments": { "shiftX": 0.23, "shiftY": -0.02, "shiftZ": -0.6, "cameraAzimuth": 0.0 } } // Response { "success": true }
Actor Commands
load-actor
load-actor loads actor properties from .iPiActor file.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
actorIndex | number | mandatory | Non-negative integer | Actor index starting from 0. |
filePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
actorIndex | number | mandatory | Non-negative integer | Actor index starting from 0. |
filePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
handsColorSameAsFace | boolean | optional | true 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 | ||||
shirtColor | string | mandatory | Valid html color value | Shirt color. |
pantsColor | string | mandatory | Valid html color value | Pants color. |
handsColor | string | mandatory | Valid html color value | Hands color. |
faceColor | string | mandatory | Valid html color value | Face color. |
shoesColor | string | mandatory | Valid html color value | Shoes color. |
shoeSolesColor | string | mandatory | Valid html color value | Shoe soles color. |
hairColor | string | mandatory | Valid html color value | Hair color. |
sleevesColor | string | mandatory | Valid 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" } }
get-actor-props
get-actor-props returns actor properties.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
gender | string | mandatory | female male |
Gender of actor. |
height | number | mandatory | Double | Height of actor. |
clothingModel | string | optional | longsleeveshirt tshirt tshirtoverlongsleeveshirt |
Actor clothing model. Requred for projects recorded with RGB cameras. |
shirtLength | number | optional | Double from -1 to 1 | Shirt length. 0 means default value. Available for projects recorded with RGB cameras. |
longSleeveLength | number | optional | Double from -1 to 1 | Long sleeve length. 0 means default value. Available for projects recorded with RGB cameras. |
shortSleeveLength | number | optional | Double from -1 to 1 | Short sleeve length. 0 means default value. Available for projects recorded with RGB cameras. |
dimensions | JSON object | Actor dimensions. | ||
headHeight | number | optional | Double | Height of head from chin to top in meters. |
shouldersWidth | number | optional | Double | Distance between shoulder joints in T-pose in meters. |
armLength | number | optional | Double | Length of straight arm between shoulder and wrist joints in meters. |
forearmLength | number | optional | Double | Length of forearm between elbow and wrist joints in meters. |
legLength | number | optional | Double | Length of straight leg between hip and ankle joints in meters. |
lowerlegLength | number | optional | Double | Length of lower leg between knee and ankle joints in meters. |
footLength | number | optional | Double | Length foot between heel and big toe end in meters. |
bodyMassIndex | number | optional | Double from -1 to 1 | Body mass index. 0 means default value. |
chestScale | number | optional | Double from -1 to 1 | Chest scale factor. 0 means default value. |
bustScale | number | optional | Double from -1 to 1 | Bust scale factor. 0 means default value. |
waistScale | number | optional | Double from -1 to 1 | Waist scale factor. 0 means default value. |
hipsScale | number | optional | Double from -1 to 1 | Hips scale factor. 0 means default value. |
bellyScale | number | optional | Double from -1 to 1 | Belly scale factor. 0 means default value. |

EXAMPLE
// Request { "command": "get-actor-props" } // Response { "success": true, "result": { "gender": "female", "height": 1.8, "clothingModel": "tshirtoverlongsleeveshirt", "dimensions": { "headHeight": 0.21, "shouldersWidth": 0.3, "armLength": 0.57, "legLength": 0.89, "footLength": 0.26 } } }
set-actor-props
set-actor-props sets actor properties.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
gender | string | mandatory | female male |
Gender of actor. |
height | number | mandatory | Double | Height of actor. |
clothingModel | string | optional | longsleeveshirt tshirt tshirtoverlongsleeveshirt |
Actor clothing model. Requred for projects recorded with RGB cameras. |
shirtLength | number | optional | Double from -1 to 1 | Shirt length. 0 means default value. Available for projects recorded with RGB cameras. |
longSleeveLength | number | optional | Double from -1 to 1 | Long sleeve length. 0 means default value. Available for projects recorded with RGB cameras. |
shortSleeveLength | number | optional | Double from -1 to 1 | Short sleeve length. 0 means default value. Available for projects recorded with RGB cameras. |
dimensions | JSON object | Actor dimensions. | ||
headHeight | number | optional | Double | Height of head from chin to top in meters. |
shouldersWidth | number | optional | Double | Distance between shoulder joints in T-pose in meters. |
armLength | number | optional | Double | Length of straight arm between shoulder and wrist joints in meters. |
forearmLength | number | optional | Double | Length of forearm between elbow and wrist joints in meters. |
legLength | number | optional | Double | Length of straight leg between hip and ankle joints in meters. |
lowerlegLength | number | optional | Double | Length of lower leg between knee and ankle joints in meters. |
footLength | number | optional | Double | Length foot between heel and big toe end in meters. |
bodyMassIndex | number | optional | Double from -1 to 1 | Body mass index. 0 means default value. |
chestScale | number | optional | Double from -1 to 1 | Chest scale factor. 0 means default value. |
bustScale | number | optional | Double from -1 to 1 | Bust scale factor. 0 means default value. |
waistScale | number | optional | Double from -1 to 1 | Waist scale factor. 0 means default value. |
hipsScale | number | optional | Double from -1 to 1 | Hips scale factor. 0 means default value. |
bellyScale | number | optional | Double from -1 to 1 | Belly scale factor. 0 means default value. |
Result | ||||
Empty result |

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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
frameIndex | number | mandatory | Non-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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "pause-play" } // Response { "success": true }
export-video
export-video command exports viewport to avi video.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
fileName | string | mandatory | File name | File name. Must include .avi extension. |
encoding | string | mandatory | Uncompressed Jpeg | Video encoding. |
quality | number | optional | Integer within [1,100] | Jpeg quality. Must be specified for Jpeg. Must not be specified for Uncompressed. |
takeIndex | number | optional | Non-negative integer |
Zero-based take index. If not specified, Region-of-Interest is exported. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "export-video", "arguments": { "fileName": "D:\\iPiMocap\\textexport.avi", "encoding": "jpeg", "quality": 70, "takeIndex": 0 } } // Response { "success": true } // Event { "event": "video-export-finished", "arguments": { "elapsedTime": 62.321, "fps": 4.05963, "framesProcessed": 253 } }
Tracking Commands
get-tracking-props
get-tracking-props command gets current tracking properties specified in Tracking or Live tab.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
useFastTrackingAlgorithm | boolean | optional | true false |
Whether fast tracking algorithm is used. Not returned for projects with RGB, multiple actors or multiple GPUs, and for live session. |
enableFootTracking | boolean | mandatory | true false |
Foot tracking enabled flag value. |
enableGroundCollisions | boolean | mandatory | true false |
Ground collisions enabled flag value. |
enableHeadTracking | boolean | mandatory | true false |
Head tracking enabled flag value. |
shouldersTrackingMode | number | mandatory | Integer index of selected Shoulders combobox item. 0 - Calculated from arm position 1 - Tracked from video |
Selected shoulder tracking mode. |
spineTrackingMode | number | mandatory | Integer index of selected Spine combobox item. 0 - Stiff Lower Spine 1 - Flexible Lower Spine 2 - Very Flexible Lower Spine |
Selected spine tracking mode. |
trackingResolution | number | mandatory | Integer index of selected Tracking resolution combobox item. 0 - High 1 - Low |
Selected tracking resolution. |
jitterRemovalOptions | number array | optional | 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. Not returned for live sessions. |
trajectoryFilter | number | optional | Integers in the range from 0 to 5. | Selected trajectory filter value. Not returned for live sessions. |
liveSmoothingFilter | integer | optional | Ranged from 0 to 75. | Actual value of smoothing filter for live session. Not returned for regular projects. |
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 or Live tab.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
enableFootTracking | boolean | optional | true false |
Foot tracking enabled flag value. |
enableGroundCollisions | boolean | optional | true false |
Ground collisions enabled flag value. |
enableHeadTracking | boolean | optional | true false |
Head tracking enabled flag value. |
shouldersTrackingMode | number | optional | Integer index of selected Shoulders combobox item. 0 - Calculated from arm position 1 - Tracked from video |
Selected shoulder tracking mode. |
spineTrackingMode | number | optional | Integer index of selected Spine combobox item. 0 - Stiff Lower Spine 1 - Flexible Lower Spine 2 - Very Flexible Lower Spine |
Selected spine tracking mode. |
trackingResolution | number | optional | Integer index of selected Tracking resolution combobox item. 0 - High 1 - Low |
Selected tracking resolution. |
useFastTrackingAlgorithm | boolean | optional | true false |
Use fast tracking algorthm flag value. Currently available only for regular projects with depth sensors, single actor and single GPU tracking. |
jitterRemovalOptions | number array | optional | 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. Not allowed for live session. |
trajectoryFilter | number | optional | Integers in the range from 0 to 5. | Selected trajectory filter value. Not allowed for live session. |
liveSmoothingFilter | integer | optional | Ranged from 0 to 75. | Value of smoothing filter for live session. Greater values make motion look smoother. Not allowed for regular projects. |
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
refit-pose-finished event is generated when operation is competed or stopped by user | ||||
mismatch | Number | mandatory | Double | Pose mismatch value. |
translation | JSON object | mandatory | Coordinates of root bone translation. | |
x | number | Double | x cooordinate. | |
y | number | Double | y cooordinate. | |
z | number | Double | z cooordinate. | |
joints | JSON objects array | mandatory | List of joints rotations. | |
name | string | string | Name of joint. | |
rotation | JSON object | mandatory | Quaternion coordinates of joint rotation relative to parent joint. | |
w | number | Double | w cooordinate. | |
x | number | Double | x cooordinate. | |
y | number | Double | y cooordinate. | |
z | number | Double | 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 } } ] } }
get-pose-mismatch
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
mismatch | number | mandatory | Negative double | Current pose mismatch. |
EXAMPLE
// Request { "command": "get-pose-mismatch" } // Response { "success": true, "result": { "mismatch": -0.036337155848741531 } }
delete-pose
delete-pose deleted pose in current frame.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "delete-pose" } // Response { "success": true }
track-forward
track-forward starts tracking forward.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
tracking-operation-finished event is generated when tracking is competed or cancelled | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
tracking-operation-finished event is generated when tracking is competed or cancelled | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
tracking-operation-finished event is generated when tracking is competed or cancelled | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
tracking-operation-finished event is generated when tracking is competed or cancelled | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "pause-tracking" } // Response { "success": true }
remove-jitter
remove-jitter starts jitter removal.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result | ||||
Events | ||||
tracking-operation-finished event is generated when jitter removal is competed or cancelled | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | 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 } }
Live (Real-Time) Session Commands
These commands control real-time tracking function.
start-live-session
start-live-session starts live (real-time) session. You can set desired tracking options using set-tracking-props command after starting a session but before connecting to live sources with connect-to-live-sources.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "start-live-session" } // Response { "success": true }
end-live-session
end-live-session ends live (real-time) session.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "end-live-session" } // Response { "success": true }
discover-live-sources
discover-live-sources finds hosts on the network which run compatible versions of iPi Recorder in broadcast mode. Should be executed while in live session.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
timeout | string | optional | Time span value in format hh:mm:ss[.sssssss] | Time to wait for live sources to be discovered. Default value is 5 seconds. |
Result | ||||
Array of host names running available live sources. |
EXAMPLE
// Request { "command": "discover-live-sources", "arguments": { "timeout": "0:0:2" // 2 seconds } } // Response { "success": true, "result": ["PC-MIKE"] }
connect-to-live-sources
connect-live-sources establishes a connection to available or specified hosts and start real-time tracking. Should be executed while in live session.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
hostNames | array | optional | String array. | Names of hosts to connect to. If omitted, all available hosts will be used. If some of specified hosts cannot be connected the command will fail. |
timeout | string | optional | Time span in format hh:mm:ss. | Timeout to establish a connection. Default value is 5 seconds. |
Result | ||||
Array of host names to which a connection has been established. |
EXAMPLE
// Request { "command": "connect-to-live-sources", "arguments": { "hostNames": ["PC-MIKE"], "timeout": "0:0:2" // 2 seconds } } // Response { "success": true, "result": ["PC-MIKE"] }
disconnect-from-live-sources
disconnect-from-live-sources stops real-time tracking and disconnects from hosts. Should be executed while connected.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "disconnect-from-live-sources" } // Response { "success": true }
start-live-recording
start-live-recording starts recording real-time tracking data to a project file. Should be executed while connected.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
projectPath | string | optional | Valid file path. | Path to a project file for recording. Prefer absolute path to avoid unintended location. If omitted then a value currently set in UI will be used. |
Result | ||||
projectPath | string | mandatory | Actual project path used. |
EXAMPLE
// Request { "command": "start-live-recording", "arguments": { "projectPath": "D:\\iPiMocap\\test.iPiMocap" } } // Response { "success": true, "result": { "projectPath": "D:\\iPiMocap\\test.iPiMocap" } }
stop-live-recording
stop-live-recording stops recording real-time data. Should be executed while recording.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
projectPath | string | mandatory | Path of the recorded project. | |
frameCount | integer | mandatory | Number of frames recorded. | |
duration | string | mandatory | Timespan in format hh:mm:ss.ffffff. | Duration of recording. |
EXAMPLE
// Request { "command": "stop-live-recording" } // Response { "success": true, "result": { "projectPath": "D:\\iPiMocap\\test.iPiMocap", "frameCount": 900, "duration": "00:00:30.000000" } }
Biomech Commands
load-biomech-profile
load-biomech-profile loads biomech profile from .iPiBiomech file.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
profilePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
format | string | mandatory | text matlab clipboard |
Export format. |
filePath | string | optional | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
format | string | mandatory | pcd obj matlab ply pts prt xyz |
Export format. |
folderPath | string | mandatory | Valid folder path | Full path to folder to export to. |
fileName | string | mandatory | File name | File name (does not include path to folder but includes extension). |
subtractBackground | boolean | optional | true false |
Subtract background flag value. |
subtractBackgroundThreshold | numeric | optional | Double from -4 to 5 | Background subtraction threshold. Bigger value means more points will be subtracted. |
exportRGB | boolean | optional | true false |
Export RGB information flag value. |
currentFrameOnly | boolean | optional | true false |
If true, only current frame will be exported. If false, all frames of Region-of-Interest will be exported. |
cameraIndises | numeric array | optional | 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 | ||||
framesProcessed | number | mandatory | Non-negative integer | Number of frames processed. In case of successful completion equal to Region-of-Interest number of frames. |
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
fps | number | mandatory | Double | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
markerSpotSize | string | optional | small medium large |
Marker spot size on video setting. |
markerColor | string | optional | Valid html color value | Marker color setting. |
autoDetectInitialCameraPositions | boolean | optional | true false |
Auto detect initial camera positions flag value. RGB projects only. |
autoAdjustFov | boolean | optional | true false |
Auto adjust FOV flag value. RGB projects only. |
calibrationMode | string | optional | fast normal extended extreme |
Calibration mode. RGB projects only. |
board | boolean | optional | true 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 | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
canceled | boolean | mandatory | true false |
Set to true if calibration was canceled by user. |
rgbCalibrationStat | JSON objects array | optional | List of calibration statistics per camera for RBG projects. | |
quality | string | mandatory | failed good perfect unknown |
Camera calibration quality. |
reprojectionError | number | mandatory | Double | Camera reprojection error. |
mistetects | number | mandatory | Double | Camera misdetects percent. |
depthMarkerCalibrationStat | JSON object | optional | Calibration statistics for depth projects calibrated with flashlight. | |
quality | string | mandatory | failed good perfect unknown |
Camera calibration quality. |
goodFramesCount | number | mandatory | Non-negative integer | Number of good frames. |
averagePositionError | number | mandatory | Double | Average position error. |
markerCloudMinSize | number | mandatory | Double | Marker point cloud minimum size. |
occlusionPercent | number | mandatory | Double | Occlusion percent. |
depthBoardCalibrationStat | JSON object | optional | Calibration statistics for depth projects calibrated with board. | |
quality | string | mandatory | failed good perfect unknown |
Camera calibration quality. |
goodFramesCount | number | mandatory | Non-negative integer | Number of good frames. |
averageAngleError | number | mandatory | Double | Average angle error. |
averagePositionError | number | mandatory | Double | Average position error. |
progress-updated event is generated every 1 second while operation is running | ||||
elapsedTime | number | mandatory | Double | Total processing time in seconds. |
remainingTime | number | mandatory | Double | Remaining time in seconds. |
progress | number | mandatory | Double within [0,1] range | Progress estimation. 1 means 100%. |
fps | number | mandatory | Double | Average processing speed in frames per second. |
EXAMPLE
// Request { "command": "run-calibration", "arguments": { "markerSpotSize": "large", "markerColor": "#0099FF", "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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
frames | numeric array | mandatory | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
frames | numeric array | optional | 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
rigName | string | optional | default motionbuilder 3dsmax endorphin iclone blender |
Name of predefined rig. |
filePath | string | optional | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
profilePath | string | mandatory | Valid 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
advancedMotionTransfer | boolean | mandatory | true false |
Advanced motion transfer flag value. |
recenterCoordinateSystemOnCharacter | boolean | mandatory | true false |
Recenter coordinate system on character flag value. |
exportTPoseInFirstFrame | boolean | mandatory | true 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.

Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
advancedMotionTransfer | boolean | optional | true false |
Advanced motion transfer flag value. |
recenterCoordinateSystemOnCharacter | boolean | optional | true false |
Recenter coordinate system on character flag value. |
exportTPoseInFirstFrame | boolean | optional | true 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 Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
filePath | string | mandatory | Valid file path | Full path to file. Animation format is defined by file extension. |
fbxIsBinary | string | optional | true false |
Fbx binary format flag for FBX format. If false or not set, ASCII format is used. |
fbxVersion | string | optional | 2014 2013 2012 2011 2010 |
Fbx version for FBX format. |
exportCameras | boolean | optional | true false |
Whether to include camera positions to an animation file. Default is false. |
targetFrameRate | integer | optional | Positive value | Target frame rate for exported animation. When omitted, frame rate of a source iPiVideo file is used. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "export-animation", "arguments": { "filePath": "D:\\iPiMocap\\test.bvh", "targetFrameRate": 30 } } // Response { "success": true }
start-streaming-animation
start-streaming-animation starts streaming pose data to a network.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
port | integer | optional | Positive value | UDP port for streaming. If omitted, the currently set value is used. |
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "start-streaming-animation" } // Response { "success": true }
stop-streaming-animation
stop-streaming-animation stops streaming pose data to a network.
Parameter Name | Type | Mandatory / Optional | Allowed Values | Description |
---|---|---|---|---|
Arguments | ||||
No arguments | ||||
Result | ||||
Empty result |
EXAMPLE
// Request { "command": "stop-streaming-animation" } // Response { "success": true }