Difference between revisions of "Data Export: CSV"

 
(46 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Tip|'''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION''' 
+
  [[Main Page]] → [[Motive Documentation|Motive Documentation]] → [[Data Export]] → [[Data Export: CSV]]
 
+
----
'''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION'''  '''THIS PAGE IS UNDER CONSTRUCTION''' }}
+
__NOTOC__
 
+
=CSV Export=
  [[OptiTrack Documentation Wiki|Back to the Main Page]] ---> [[MD_Temp| Back to Motive Documentation]]
 
 
----
 
----
 +
Captured tracking data can be exported in Comma Separated Values (CSV) format. This file format uses comma delimiters to separate multiple values in each row, and it can be imported by spreadsheet software or a programming script. Depending on which data export options are enabled, exported CSV files can contain marker data, rigid body data, and/or skeleton data. CSV export options are listed in the following chart:
  
Captured tracking data can be exported in Comma Separated Values (CSV) format. This file format use comma delimiters to separate multiple values in each row, and it can be imported in a spreadsheet software or a programming script. Depending on which data export options are enabled, exported CSV files can contain marker data, rigid body data, and skeleton data. CSV export options are listed in the below chart.
+
{|class="wikitable" style="color:black; margin: auto; width:85%;"
 
 
 
 
{|class="wikitable" style="color:black; margin: auto; width:70%;"
 
 
|+CSV Export Options
 
|+CSV Export Options
!style = "width: 25%"|CSV Options
+
!style = "width: 20%"|CSV Options
 
!Description
 
!Description
 
|-
 
|-
|Unit
+
|style="padding: 10px;"|Frame Rate
|Sets units for positional data in exported CSV files
+
|style="padding: 10px;"|Number of samples included per every second of exported data.
 
|-
 
|-
|Markers
+
|style="padding: 10px;"|Start Frame
|Enabling this option includes X/Y/Z reconstructed 3D positions for each marker in exported CSV files.
+
|style="padding: 10px;"|Start frame of the exported data. You can either set it to the recorded first frame of the exported ''Take'' or to the start of the working range, or scope range, as configured under the [[Control Deck]] or in the [[Graph View pane]].  
 
|-
 
|-
|Rigid Bodies
+
|style="padding: 10px;"|End Frame
|When this option is set to true, exported CSV file will contain 6 DoF data for each rigid body from the Take. 6 DoF data contain orientations (pitch,roll, and yaw in the chosen '''rotation type''' as well as 3D positions (x,y,z) of the rigid body center.
+
|style="padding: 10px;"|End frame of the exported data. You can either set it to the recorded end frame of the exported ''Take'' or to the end of the working range, or scope range, as configured under the [[Control Deck]] of in the [[Graph View pane]].
 
|-
 
|-
|RigidBodyMarkers
+
|style="padding: 10px;"|Scale
|Enabling this option includes 3D position data for each [[Data Recording#Expected Marker Positions: Rigid Body Markers and Bone Markers|expected marker locations]] within rigid body assets.
+
|style="padding: 10px;"|Apply scaling to the exported tracking data.
 
|-
 
|-
|Bones
+
|style="padding: 10px;"|Markers
|When this option is set to true, exported CSV files will include 6 DoF data for each bone segment of skeletons in exported Takes. 6 DoF data contain orientations (pitch, roll, and yaw) in the chosen rotation type, and also 3D positions (x,y,z) for the center of the bone.
+
|style="padding: 10px;"|Enabling this option includes X/Y/Z reconstructed 3D positions for each marker in exported CSV files.
 
|-
 
|-
|BoneMarkers
+
|style="padding: 10px;"|Unlabeled Markers
|Enabling this option will include 3D position data for each [[Data Recording#Expected Marker Positions: Rigid Body Markers and Bone Markers|expected marker locations]] within skeleton assets.
+
|style="padding: 10px;"|
 +
Enableing this option includes tracking data of all of the ''unlabeled'' makers to the exported CSV file along with other labeled markers. If you just want to view the ''labeled'' marker data, you can turn off this export setting.
 
|-
 
|-
|Rotation Type
+
|style="padding: 10px;"|Quality Statistics
|Rotation type determines whether '''Quaternion''' or '''Euler''' Angles is used for orientation convention in exported CSV files. For Euler rotation, all different orders of elemental rotation is available
+
|style="padding: 10px;"|Adds a column of '''Error per marker''' values for each rigid body position data.
 +
 
 +
Adds a column of '''Marker quality''' values after each rigid body marker data.
 
|-
 
|-
|Coordinate Space
+
|style="padding: 10px;"|Rigid Bodies
|This option decides whether exported data will be based on global or local coordinate system.  
+
|style="padding: 10px;"|When this option is set to true, exported CSV file will contain 6 Degree of Freedom (6 DoF) data for each rigid body from the Take. 6 DoF data contain orientations (pitch,roll, and yaw in the chosen '''rotation type''' as well as 3D positions (x,y,z) of the rigid body center.
 
+
|-
Global: Sets 3D position data in respect to coordinate system at a global origin, which was defined with a ground plane during [[Calibration]].  
+
|style="padding: 10px;"|RigidBodyMarkers
 +
|style="padding: 10px;"|Enabling this option includes 3D position data for each [[Data Recording#Expected Marker Positions: Rigid Body Markers and Bone Markers|expected marker locations]] (not actual marker location) of rigid body assets. Compared to the positions of the reconstructed marker positions included within the ''Markers'' columns, the Rigid Body Markers show the ''solved'' positions of the markers as affected by the rigid body tracking but not affected by occlusions.
 +
|-
 +
|style="padding: 10px;"|Bones
 +
|style="padding: 10px;"|When this option is set to true, exported CSV files will include 6 DoF data for each bone segment of skeletons in exported Takes. 6 DoF data contain orientations (pitch, roll, and yaw) in the chosen rotation type, and also 3D positions (x,y,z) for the proximal joint center of the bone which is the pivot point of the bone.
 +
|-
 +
|style="padding: 10px;"|BoneMarkers
 +
|style="padding: 10px;"|Enabling this option will include 3D position data for each [[Data Recording#Expected Marker Positions: Rigid Body Markers and Bone Markers|expected marker locations]] (not actual marker location) of bone segments in skeleton assets. Compared to the real marker positions included within the ''Markers'' column, the Bone Markers show the ''solved'' positions of the markers as affected by the skeleton tracking but not affected by occlusions.
 +
|-
 +
|style="padding: 10px;"|Header information
 +
|style="padding: 10px;"|Includes detailed information about capture data as a header in exported CSV files. Types of information included in the header section is listed in the following section.
 +
|-
 +
|style="padding: 10px;"|Rotation Type
 +
|style="padding: 10px;"|Rotation type determines whether '''Quaternion''' or '''Euler''' Angles is used for orientation convention in exported CSV files. For Euler rotation, right-handed coordinate system is used and all different orders (XYZ, XZY, YXZ, YZX, ZXY, ZYX) of elemental rotation is available. More specifically, the XYZ order indicates pitch is degree about the X axis, yaw is degree about the Y axis, and roll is degree about the Z axis.
 +
|-
 +
|style="padding: 10px;"|Unit
 +
|style="padding: 10px;"|Sets units for positional data in exported CSV files
 +
|-
 +
|style="padding: 10px;"|Export Device Data
 +
|style="padding: 10px;"|When set to True, separate CSV files for recorded device data will be exported. This includes force plate data and analog data from NI-DAQ devices. A CSV file will be exported for each device included in the ''Take''.
 +
|-
 +
|style="padding: 10px;"|Use World Coordinates
 +
|style="padding: 10px;"|This option decides whether exported data will be based on world(global) or local coordinate systems.  
  
Local: Sets 3D position data of expected marker locations in respect to local segment axis on corresponding assets. These axes can be set to visible from [[Application Settings]] or display properties of assets in [[Project Pane]].
+
'''Global:''' Defines the position and orientation in respect to the global coordinate system of the calibrated capture volume. The global coordinate system is the origin of the ground plane which was set with a calibration square during [[Calibration]] process.
|-
 
|Quality Stats
 
|Adds a column of '''Error per marker''' values for each rigid body position data.  
 
  
Adds a column of '''Marker quality''' values after each rigid body marker data.
+
'''Local:''' Defines the bone segment position and orientation in respect to the coordinate system of the parent segment. Note that the hip of the skeleton is always the top-most parent of the segment hierarchy. Local coordinate axes can be set to visible from [[Application_Settings#Skeletons|Application Settings]] or display properties of assets in [[Project Pane]]. The Bone segment rotation values in the Local coordinate space can be used to roughly represent the joint angles; however, for precise analysis, joint angles should be computed through a biomechanical analysis software using the exported capture data (C3D).  
|-
 
|Include Header information
 
|Includes detailed information about capture data as a header in exported CSV files. Types of information included in the header section is listed in the following section.
 
 
|}
 
|}
  
 +
[[Image:DataExport_ExportPanel_20.png|thumb|550 px|center|Tracking data export dialogue window in Motive. CSV export is selected and corresponding options are displayed.]]
  
===Errors in the data, Quality Stats===
 
The quality stats display the reliability of associated marker data. Errors per marker lists average displacement between detected markers and expected marker locations within corresponding assets. Marker Quality values rate how well camera rays converged when respective marker was reconstructed. The value varies from 0 (unstable marker) to 1 (accurate marker). 
 
  
 +
==Errors in the data, Quality Stats==
 +
<div class="padded">
 +
The quality stats display the reliability of associated marker data. Errors per marker lists average displacement between detected markers and expected marker locations within corresponding assets. Marker Quality values rate how well camera rays converged when the respective marker was reconstructed. The value varies from 0 (unstable marker) to 1 (accurate marker). 
 +
</div>
  
===CSV Header===
+
==CSV Header==
When the header is disabled, these information will be excluded from the CSV files. Instead, the file will have frame IDs in the first column, time data on the second column, and the corresponding mocap data in the remaining columns. Header information will need to be acquired first in order to understand what data exists in each column.
+
<div class="padded">
 +
When the header is disabled, this information will be excluded from the CSV files. Instead, the file will have frame IDs in the first column, time data on the second column, and the corresponding mocap data in the remaining columns.
  
{|class="wikitable" style="color:black; margin: auto; width:70%;"
+
{|class="wikitable" style="color:black; margin: auto; width:85%;"
!style = "width:20%"|Row
+
|+ CSV Headers
 +
!style = "width:15%"|Row
 
!Description
 
!Description
 
|-
 
|-
|1st row
+
|style="padding: 10px;"|1st row
|General information about the Take and export settings. Included information are: format version of the CSV export, name of the TAK file, the captured frame rate, the export frame rate, capture start time, number of total frames, rotation type, length units, and coordinate space type.
+
|style="padding: 10px;"|General information about the Take and export settings. Included information are: format version of the CSV export, name of the TAK file, the captured frame rate, the export frame rate, capture start time, number of total frames, rotation type, length units, and coordinate space type.
 
|-
 
|-
|2nd row
+
|style="padding: 10px;"|2nd row
|Empty
+
|style="padding: 10px;"|Empty
 
|-
 
|-
|3rd row
+
|style="padding: 10px;"|3rd row
|Displays which data type is listed in each corresponding column. Data types include raw marker, rigid body, rigid body marker, bone, bone marker, or unlabeled marker. Read more about [[Data Recording#Marker Types in Motive|Marker Types]].
+
|style="padding: 10px;"|Displays which data type is listed in each corresponding column. Data types include raw marker, rigid body, rigid body marker, bone, bone marker, or unlabeled marker. Read more about [[Data Recording#Marker Types in Motive|Marker Types]].
 
|-
 
|-
|4th row
+
|style="padding: 10px;"|4th row
|Includes marker or asset labels for each corresponding data set.  
+
|style="padding: 10px;"|Includes marker or asset labels for each corresponding data set.  
 
|-
 
|-
|5th row
+
|style="padding: 10px;"|5th row
|Displays marker ID.
+
|style="padding: 10px;"|Displays marker ID.
 
|-
 
|-
|6th and 7th row
+
|style="padding: 10px;"|6th and 7th row
|Includes header label on which data is included in the column: position and orientation on X/Y/Z.
+
|style="padding: 10px;"|Includes header label on which data is included in the column: position and orientation on X/Y/Z.
 
|}
 
|}
  
Line 85: Line 106:
 
<center>[[Image:DataExport_CSV.png]]</center>
 
<center>[[Image:DataExport_CSV.png]]</center>
  
 +
{{Info|'''TIP: Occlusion in the marker data'''
 +
 +
When there is an occlusion in a marker, the CSV file will contain blank cells. This can interfere when running a script to process the CSV data. It is recommended to optimize the system setup to reduce occlusions. To omit unnecessary frame ranges with frequent marker occlusions, select the frame range with the most complete tracking results. Another solution to this is to use [[Data Editing#Fill Gaps|Fill Gaps]] to interpolate missing trajectories in post-processing.}}</div>
 +
 +
==Force Plate Data / Analog Data==
 +
<div class="padded">
 +
For ''Takes'' containing force plates ([[AMTI Force Plate Setup|AMTI]] or [[Bertec Force Plate Setup|Bertec]]) or data acquisition ([[NI-DAQ Setup|NI-DAQ]]) devices, additional CSV files will be exported for each connected device. For example, if you have two force plates and a NI-DAQ device in the setup, total 4 CSV files will be saved when you export the tracking data from Motive. Each of the exported CSV files will contain basic properties and settings at its header, including device information and sample counts. Also, mocap frame rate to device sampling rate ratio is included since force plate and analog data are sampled at higher sampling rates.
  
{{Tip|'''TIP:Occlusion in the marker data'''
+
<div class="padded">
 +
* '''Force Plate Data''': Each of the force plate CSV files will contain basic properties such as platform dimensions and mechanical-to-electrical center offset values. The mocap frame number, force plate sample number, forces (Fx/Fy/Fz), moments (Mx, My, Mz), and location of the center of pressure (Cx, Cy, Cz) will be listed below the header.
  
When there is any occlusion in a marker data, the CSV file will contain blank cells. This can interfere when running a script to process CSV data. It is recommended to optimize the capture setting to prevent occlusions. To omit unnecessary frame ranges with frequent marker occlusions, select frame range with best tracking results. Another solution to this is to use [[Data Editing#Fill Gaps|Fill Gaps]] to interpolate missing trajectories.}}
+
* '''Analog Data''': Each of the analog data CSV files contains analog voltages from each configured channel.
 +
</div>
 +
</div>

Latest revision as of 00:47, 21 November 2019

Main PageMotive DocumentationData ExportData Export: CSV

CSV Export


Captured tracking data can be exported in Comma Separated Values (CSV) format. This file format uses comma delimiters to separate multiple values in each row, and it can be imported by spreadsheet software or a programming script. Depending on which data export options are enabled, exported CSV files can contain marker data, rigid body data, and/or skeleton data. CSV export options are listed in the following chart:

CSV Export Options
CSV Options Description
Frame Rate Number of samples included per every second of exported data.
Start Frame Start frame of the exported data. You can either set it to the recorded first frame of the exported Take or to the start of the working range, or scope range, as configured under the Control Deck or in the Graph View pane.
End Frame End frame of the exported data. You can either set it to the recorded end frame of the exported Take or to the end of the working range, or scope range, as configured under the Control Deck of in the Graph View pane.
Scale Apply scaling to the exported tracking data.
Markers Enabling this option includes X/Y/Z reconstructed 3D positions for each marker in exported CSV files.
Unlabeled Markers

Enableing this option includes tracking data of all of the unlabeled makers to the exported CSV file along with other labeled markers. If you just want to view the labeled marker data, you can turn off this export setting.

Quality Statistics Adds a column of Error per marker values for each rigid body position data.

Adds a column of Marker quality values after each rigid body marker data.

Rigid Bodies When this option is set to true, exported CSV file will contain 6 Degree of Freedom (6 DoF) data for each rigid body from the Take. 6 DoF data contain orientations (pitch,roll, and yaw in the chosen rotation type as well as 3D positions (x,y,z) of the rigid body center.
RigidBodyMarkers Enabling this option includes 3D position data for each expected marker locations (not actual marker location) of rigid body assets. Compared to the positions of the reconstructed marker positions included within the Markers columns, the Rigid Body Markers show the solved positions of the markers as affected by the rigid body tracking but not affected by occlusions.
Bones When this option is set to true, exported CSV files will include 6 DoF data for each bone segment of skeletons in exported Takes. 6 DoF data contain orientations (pitch, roll, and yaw) in the chosen rotation type, and also 3D positions (x,y,z) for the proximal joint center of the bone which is the pivot point of the bone.
BoneMarkers Enabling this option will include 3D position data for each expected marker locations (not actual marker location) of bone segments in skeleton assets. Compared to the real marker positions included within the Markers column, the Bone Markers show the solved positions of the markers as affected by the skeleton tracking but not affected by occlusions.
Header information Includes detailed information about capture data as a header in exported CSV files. Types of information included in the header section is listed in the following section.
Rotation Type Rotation type determines whether Quaternion or Euler Angles is used for orientation convention in exported CSV files. For Euler rotation, right-handed coordinate system is used and all different orders (XYZ, XZY, YXZ, YZX, ZXY, ZYX) of elemental rotation is available. More specifically, the XYZ order indicates pitch is degree about the X axis, yaw is degree about the Y axis, and roll is degree about the Z axis.
Unit Sets units for positional data in exported CSV files
Export Device Data When set to True, separate CSV files for recorded device data will be exported. This includes force plate data and analog data from NI-DAQ devices. A CSV file will be exported for each device included in the Take.
Use World Coordinates This option decides whether exported data will be based on world(global) or local coordinate systems.

Global: Defines the position and orientation in respect to the global coordinate system of the calibrated capture volume. The global coordinate system is the origin of the ground plane which was set with a calibration square during Calibration process.

Local: Defines the bone segment position and orientation in respect to the coordinate system of the parent segment. Note that the hip of the skeleton is always the top-most parent of the segment hierarchy. Local coordinate axes can be set to visible from Application Settings or display properties of assets in Project Pane. The Bone segment rotation values in the Local coordinate space can be used to roughly represent the joint angles; however, for precise analysis, joint angles should be computed through a biomechanical analysis software using the exported capture data (C3D).

Tracking data export dialogue window in Motive. CSV export is selected and corresponding options are displayed.


Errors in the data, Quality Stats

The quality stats display the reliability of associated marker data. Errors per marker lists average displacement between detected markers and expected marker locations within corresponding assets. Marker Quality values rate how well camera rays converged when the respective marker was reconstructed. The value varies from 0 (unstable marker) to 1 (accurate marker).

CSV Header

When the header is disabled, this information will be excluded from the CSV files. Instead, the file will have frame IDs in the first column, time data on the second column, and the corresponding mocap data in the remaining columns.

CSV Headers
Row Description
1st row General information about the Take and export settings. Included information are: format version of the CSV export, name of the TAK file, the captured frame rate, the export frame rate, capture start time, number of total frames, rotation type, length units, and coordinate space type.
2nd row Empty
3rd row Displays which data type is listed in each corresponding column. Data types include raw marker, rigid body, rigid body marker, bone, bone marker, or unlabeled marker. Read more about Marker Types.
4th row Includes marker or asset labels for each corresponding data set.
5th row Displays marker ID.
6th and 7th row Includes header label on which data is included in the column: position and orientation on X/Y/Z.


DataExport CSV.png

Info2.png

TIP: Occlusion in the marker data

When there is an occlusion in a marker, the CSV file will contain blank cells. This can interfere when running a script to process the CSV data. It is recommended to optimize the system setup to reduce occlusions. To omit unnecessary frame ranges with frequent marker occlusions, select the frame range with the most complete tracking results. Another solution to this is to use Fill Gaps to interpolate missing trajectories in post-processing.

Force Plate Data / Analog Data

For Takes containing force plates (AMTI or Bertec) or data acquisition (NI-DAQ) devices, additional CSV files will be exported for each connected device. For example, if you have two force plates and a NI-DAQ device in the setup, total 4 CSV files will be saved when you export the tracking data from Motive. Each of the exported CSV files will contain basic properties and settings at its header, including device information and sample counts. Also, mocap frame rate to device sampling rate ratio is included since force plate and analog data are sampled at higher sampling rates.

  • Force Plate Data: Each of the force plate CSV files will contain basic properties such as platform dimensions and mechanical-to-electrical center offset values. The mocap frame number, force plate sample number, forces (Fx/Fy/Fz), moments (Mx, My, Mz), and location of the center of pressure (Cx, Cy, Cz) will be listed below the header.
  • Analog Data: Each of the analog data CSV files contains analog voltages from each configured channel.