trick for extracting 2D points data from a corrupted XMALab file

58 views
Skip to first unread message

elizabeth_brainerd

unread,
Jun 24, 2022, 5:42:31 AM6/24/22
to XMALab, Beth Brainerd
Hi XMALab Google Group,

Thanks, Hannah Curtis from Ohio University, for sending the question this week about a corrupted XMALab file that would not open. This is exactly the kind of question I’d like people to ask on this forum so we can share solutions. Thanks for sending it to the group.

I was not able to fix the file, but I was able to recover the 2D tracked points and import them into a different XMALab file containing the same trial. So the points do not need to be tracked again. Hooray!

The trick I used is that .xma files are actually .zip files that have been renamed with the .xma extension. If you change the extension back to .zip, you can unzip the .xma file package and look inside. Here is a video lecture given by the XMALab developer, Dr. Ben Knörlien explaining the .xma file specifications.

Here were my steps:
  • change the .xma file extension to .zip
  • unzip the folder
  • look in the folder and find the subfolder with the name of the trial of interest
  • open that folder and look for the csv files called, e.g. Marker002points2d.csv — this contains the 2D XY coordinates of the point in both videos (4 columns of numbers). There will be one .csv file for every tracked point, plus a lot of other .csv files
  • create a new .xma file for the trial or use an older one for that same trial that opens that has some of the points tracked
  • select File/Import/2D Points
  • Select: no header row; distorted coordinates; start coordinates at 0; y axis down; no leading columns; import as Set (or Tracked, as makes sense for your data — this just sets the color coding of how the points appear)
  • click OK and then select your first marker to import (such as Marker000points2d.csv — this would import as marker 1 if you have no tracked points or the next marker in sequence if there are tracked points)
  • Repeat for all markers to be imported
The solution to this problem emphasizes one of the strengths of XMALab: you should never have to re-track 2D points. If you find yourself tracking the same points for a second time, there may be a better solution. If the files open, you can export 2D points from within XMALab and import them into a different trial or .xma file (such as if you want to change the distortion correction or calibration images). You can also “Open dataset with a different calibration.” If the .xma file is corrupted, you can try opening it as a .zip file and extracting the 2D coordinates that way. 2D coordinates are stored in their raw (distorted) space, and that makes it possible to import them into a different .xma file and they will still be correct.

Send your XMALab problems to this forum and we can all try to help each other!

Thanks,
Beth Brainerd
Brown University

sidd...@gmail.com

unread,
Dec 19, 2023, 9:06:38 AM12/19/23
to XMALab
Hi all!

I just ran into an issue when I was trying to rename the file to change the extension to .zip. However, I discovered that there was a folder setting that I didn't have enabled called "show file extension" once I enabled that, I had no issues extracting. 

Additionally you can multi select the 2d point Excel files to bulk import all at once. 

Reply all
Reply to author
Forward
0 new messages