XROMM and XMALab

 Traditionally, most studies of skeletal kinematics came from motion capture of external markers attached to skin or tight clothing. However, these estimates suffered due to a lack of fidelity between skin movement and underlying bone movement and were unable to visualise deep internal structures.

What is XROMM?

XROMM (X-ray reconstruction of moving morphology) is a set of 3D X-ray motion analysis techniques that involve combining skeletal morphology data from a CT scan with bone motion data from in vivo X-ray videos, resulting in a precise and accurate animation of 3D bone meshes moving in 3D space. Whilst it's been used to study skeletal motion in various species, what's relevant here is that XROMM has been increasingly used to explore ROM both in vivo and in cadaveric specimens. 

XROMM methods include marker-based XROMM, in which radio-opaque markers are surgically implanted into skeletal elements and markerless XROMM, which includes manual alignment of bone models to video sequences and semi-automated bone model registration methods. Implantation of radio-opaque bone markers allows bone models to be animated directly from bone marker co-ordinates, offering potentially higher throughput and more precise results... but at the expense of requiring invasive surgery. 

Previously XROMM required specialised software to correct distortion introduced by fluoroscopic image intensifiers, calibrating cameras, tracking radio-opaque markers and calculating rigid body motion, as well as complex file inputs (at least seven input to 22 outputs - 29 files in total per trial, meaning a small study with 25 trials would have 725 files). However, new open-source software packages have been made (and further developed to account for these issues - XMALab and XMAPortal. XMALab - and the XROMM workflow as a whole, were fundamental to the work carried out in my thesis. 

What is XMALab?

XMALab (X-ray Motion Analysis Lab), whilst designed for XROMM, works equally well for motion analysis from standard light-video cameras. The XMALab user interface contains three workspaces: unidistortion, calibration and marker tracking. Since its creation in 2016, XMALab has become commony used in marker-based XROMM studies.

Since VROMM uses data from video cameras, rather than X-ray cameras, the footage I took for my thesis lacked the complex image distortion seen in fluoroscopic videos. Whilst GoPros semi-automatically undistort video footage, at the wide and super-wide fields of view, this may not be perfect.


In the Calibration workspace, users load one or more sets of calibration images for two or more cameras, along with a frame specification file containing the XYZ co-ordinates of all positions on the object. The user identifies four locations on the 3D object, XMALab then detects all visible calibration points and provides the user with feedback on goodness of fit (error) of detected points relative to the object's known geometry. The user can then manually or exclude calibration points and refine the locations of points if required. 

The marker tracking workspace (see above) provides a toolbox for automatically tracking points. Specific points can be named and selected in the Points window. For each point, users can select the type of automatic detection (X-ray marker, black marker, white marker, blob detection etc). Selecting a point makes it active in the Camera views, Detailed View window and Plot window. The Points window is also used to group sets of markers located in the individual bones into rigid bodies. Points can be set, moved or selected with the left mouse button and modifier keys, the mouse wheel zooms the cursor position and the right mouse is used for panning.

The Detailed View window (see below) shows a magnified view of the selected point, permitting manual refinement of its position. Manual refinement is often necessary when automatic tracking fails (especially when markers either intersect or overlap with other objects in the scene). The Plot window offers six different viewing options: 2D positions, 3D positions, marker to marker distance, reprojection error, rigid body transformations and rigid body error. Clicking on a frame in the plot window moves the Camera View and Detailed View windows to that frame, and shift-dragging over data and pressing the delete key removes tracked points. The window updates automatically as points are tracked, providing instant feedback on tracking as well as updating if the user goes back to fine-tune undistortion or calibration.

Erroneous point positions can be identified in the reprojection error plot, which shows the mean error in pixels of the calculated 3D point reprojected back onto the 2D image planes. In addition, errors can also be detected in the marker-to-marker distance plot of the distance between a pair of markers. Since distances should be constant for markers implanted in the same skeletal points... so, if they aren't, you're doing something wrong. 


Comments