top of page
Writer's pictureTheia Markerless

Post-processing Theia3D Data for New Visual3D Users

Updated: Oct 15

Summary: In this post we provide some pointers for Theia users who are new to Visual3D, and how to approach post-processing in Visual3D.


Back by popular demand, this week’s blog post aims to expand on our previous post, Working with Theia3D Data in Visual3D. Our aim is to provide some pointers and guidance on Visual3D post-processing for Theia users, especially those who are new to Visual3D. While the previous blog post focused on explaining the contents of Theia-output .C3D files, how those files are interpreted and modeled within Visual3D, and how to interpret their signals, this post will outline a typical workflow for post-processing in Visual3D. If you are interested in receiving a sample pipeline script to explore post-processing methods in Visual3D, follow the link at the end of this post to contact us. Please stay tuned for a third, upcoming blog post on merging kinematics from Theia3D with other synchronized signals (e.g. force plates, EMG, etc.) in Visual3D.


Generally, the data pipeline to go from recording and collection to analysis and reporting is quite complex. For many users, this looks something like the following:

  1. Record video data using the software associated with the camera hardware

  2. Export or download videos from camera system

  3. Process video data within Theia software

  4. Perform post-processing of Theia-generated .C3D outputs in Visual3D (or similar software)

  5. Export relevant signals and metrics for final statistical analysis and outcome visualization

Figure 1: Markerless biomechanical data processing steps, including recording video data, downloading video data, processing in Theia software, post-processing in Visual3D (or similar software), and statistical analysis and visualization.


From this process, steps 1 and 2 are typically covered by the hardware manufacturer’s documentation. Step 3 is covered in Theia Markerless' documentation and tutorial videos, and step 5 is entirely up to you; this leaves step 4 as somewhat of a knowledge gap, especially for users who are new to 3D motion capture data and Visual3D. That’s where this blog post comes in, hopefully distilling the wealth of information contained in the Visual3D Wiki Documentation down to a few crucial steps that will get you started. The following sections provide an outline of some typical post-processing steps used in Visual3D.


Before diving into the details, here is a very brief summary of some of Visual3D’s capabilities (of course, it can do much more than this):


In general, the most efficient way of processing your data is by developing a custom pipeline script that allows you to perform all of your desired processing automatically. This can take some time to develop, but it can provide a great starting point for any future projects. Visual3D pipelines can be edited within the Pipeline Workshop or in a text editor such as Notepad++, and can be saved as .V3S files. If you are interested in receiving a sample pipeline script to explore post-processing methods in Visual3D, follow the link at the end of this post to contact us.


1. Opening Files

The first step in post-processing motion capture data in Visual3D is opening your .C3D files to create a Visual3D workspace (.CMZ). There are several different approaches for organizing trials from a dataset into separate workspaces. One of the most common approaches is to create a separate Visual3D workspace for each individual, which contains all of their movement trials. Once you’ve decided on how you want to organize your data into workspaces, you can go ahead with creating those workspaces.


There are two main ways to open .C3D files in Visual3D: using the Open button to manually select files (Figure 1), or using the File_Open pipeline command (Figure 2). When using the pipeline command, you can set a root file path and use the SEARCH_SUBFOLDERS argument to look for files within nested folders of the root file path, and use a wildcard (“*”) to search for partial file names. This allows specific files to be selected and opened in a flexible fashion.


Figure 1: File selection window when using the Open button from the Visual3D taskbar.


Figure 2: File Open pipeline command interface. The pipeline command can also be edited using the Edit as Text button within the Pipeline Workshop.


The Set_Pipeline_Parameter_To_List_Of_Files command can be paired with File_Open to create a list of files to be opened. It is also possible to create more complex pipelines that iterate and selectively open .C3D files, allowing the creation of separate workspaces based on file and folder hierarchies. An example of this type of approach is included in the sample pipeline available upon request.


2. Assigning Tags

Once your .C3D files have been opened, you may want to use tags to group multiple trials of the same movement, condition, or other variable. Tags allow you to easily perform operations on select groups of files by using the Select_Active_Files pipeline command before your operations.


There are two main ways to assign tags: using the Add New File Tag button in the Workspace tab (Figure 3), or using the Assign_Tags_To_Files pipeline command (Figure 4). When using the pipeline command, you can use wildcards to select all files with a specific partial filename (e.g. *Walk* to select all files with “Walk” in the filename). This approach is included in the sample pipeline.


Figure 3: Tags applied to multiple trials of two different movement types, shown in the Workspace tab of Visual3D.



Figure 4: Assign_Tags_to_Files pipeline command shown in the Pipeline Workshop. This pipeline command is available within the File Management section of the pipeline command library.


3. Creating Events

With your files opened and tagged, the next step you can take in Visual3D is to create event labels within the trials. Event labels are used to identify specific moments within a movement, such as heel-strike or toe-off during walking or running gait, arm cocking or release during a baseball pitch, and foot plant or contact during a soccer kick, as a few examples. Event labels can be used to segment or normalize signals into relevant phases within the duration of a movement, or extract signal values at those important moments, among various other uses. Event labels are not always required, but are often useful and sometimes necessary to calculate your desired signals or metrics which may be specific to an instant or phase of the movement.


There are numerous ways to create and modify events, as shown by the various commands in the Event Creation and Event Management sections of the pipeline command library (Figure 5). The Automatic_Gait_Events command can be used to automatically create gait events when force platforms are present. Other commands can be used alongside specific signals from the movement to create kinematic-based events, such as the kinematic gait events created in the example pipeline script.


Figure 5: Event-related pipeline commands available within the pipeline command library.


4. Computing Signals

Computing signals is one of the most important post-processing steps, and is one area where Visual3D demonstrates exceptional utility through the wide array of possible calculations. As noted in our previous blog post on Working with Theia3D Data in Visual3D, there are several signals that are automatically generated when Visual3D applies its built-in Theia model to the movement trials, such as segment positions, and linear and angular velocities and accelerations. Aside from these signals, you can also produce your own using the Compute_Model_Based_Data pipeline command, or any of the signal-related commands in the Signal Filter, Signal Math, Signal Process, and Signal/Data Management folders of the pipeline command library.


The Compute_Model_Based_Data command can be used to calculate a large list of signals, but a few of interest include kinematic signals such as joint angles, joint angular velocities and joint angular accelerations, and kinetic signals such as joint moments, joint forces, and joint powers. It should be noted that synchronized force signals are required for the calculation of the kinetic signals. Check out this Visual3D tutorial on Model-Based Items for more information, or our example pipeline script which includes joint center position, joint angle, and segment angle calculations.


Figure 6: Signal-related pipeline commands available within the pipeline command library.


5. Computing Metrics

Computing metrics is another important post-processing step that may be undertaken in Visual3D. A metric is a discrete value, typically extracted from a calculated signal, that may represent a maximum, minimum, average, or the value of a signal at a specific time or event. In most cases, it is necessary to compute a signal of interest and create an event label before obtaining a relevant metric. For example, by calculating a joint angle then creating a heel strike event label, you could generate a metric that captures the value of the joint angle at heel strike. Metrics can be obtained in very flexible ways, allowing the value to be obtained at every possible instance of an event (e.g. at every single heel strike), at only a specific instance (e.g. at the first heel strike), or as an average measure across multiple instances. Check out this Visual3D tutorial on Metrics Processing for more information.


Figure 7: Metric-related pipeline commands available within the pipeline command library.


6. Saving a Workspace

After undertaking all of the above steps to process your 3D motion capture data, it’s crucial to save the Visual3D workspace. All of the processing up to this point is saved as part of the workspace, including the opened .C3D files and their contents, the assigned tags, created events, and calculated signals and metrics. When using a pipeline script to perform all of this processing, it’s as simple as including a File_Save_As command, and including a FILE_NAME argument which can include a specific path. As mentioned previously, it’s possible to pair the use of pipeline parameters with other pipeline commands in order to save and reference specific string values throughout the pipeline. When saving, this could easily be used to save each pipeline to a specific folder, which is the method used in our example pipeline script.


7. Exporting Signals and Metrics

Often, the final post-processing step performed in Visual3D is exporting a selection of relevant signals or metrics for final analysis and visualization using separate software such as Microsoft Excel, or a scripting language such as Matlab or Python. Depending on your workflow, you may choose to use the Export_Data_To_ASCII_File or the Export_Data_To_Matfile pipeline command. In either case, it’s simply a matter of providing the signals or metrics you wish to export (including the signal type, folder, and name), and the destination file name and path for the output file. It is always important to ensure the desired files are active (e.g. by using the Select_Active_File pipeline command) prior to exporting.


When exporting to ASCII (.TXT) files, there are several other options that you can specify, including whether to include mean and standard deviation values for the exported signals, whether to normalize the signals, and whether to use events to crop the output signals. With no event sequence used, the entire signal throughout the selected trials will be exported, which may vary in length between trials. Using an event sequence will export the signal values between the specified events; these signals may also vary in length, depending on when the events occur within each trial. For cases where the event sequence occurs multiple times within one trial, all instances of that sequence will be exported (e.g. separate output signals for every heel strike-to-heel strike gait cycle). Using the Normalize Data option with or without an event sequence will result in the exported signals being of equal length, according to the specified number of points for normalization. Therefore, normalizing can be useful for ensuring that the outputs are equal lengths (i.e. equal data points), and can also be used to normalize signals within cyclic movement such as walking or running gait.


Figure 8: Export Data to Ascii File pipeline command dialog window.


Conclusion

Post-processing of Theia data in Visual3D is an important step that allows you to group .C3D files, label important events, generate relevant biomechanical signals or metrics, and export your data for final analysis and visualization. Visual3D is a hugely capable tool with nearly endless possibilities, and we hope this blog post has effectively summarized some of the processing steps that are often performed by Theia users in Visual3D.


Click here to request an example Visual3D pipeline script that demonstrates many of the steps described in this blog. This pipeline script creates separate Visual3D workspaces for individuals from a TMBatch ‘_c3d’ output folder that contains subject folders within the root ‘_c3d’ folder. The processing steps are performed on walking gait trials (e.g. trials with “Walk” in the filename), and include: kinematic event creation, model-based signal generation, and normalized signal exporting.


To learn more about Theia, click here to book a demo.

903 views0 comments

Recent Posts

See All

Komen


Join our mailing list

Thanks for subscribing!

bottom of page