*** OBSOLETE, DO NOT USE ***
CRITICAL UPDATE: Use new XMALab software for marker-based XROMM, including Undistortion, Calibration, Marker Tracking, Rigid Bodies and Filtering.
XMALab replaces MATLAB XrayProject. See Bitbucket XMALab wiki for XMALab User Manual (not this wiki).
Use these instructions and Matlab XrayProject if you want to filter XYZ coordinates. XMALab filters the rigid body transformations, not the coordinates.
Background on filtering and smoothing
Despite the high precision of the biplanar fluoroscopy system, digitized data contain errors compounded from several potential sources. (1) The undistortion relies on accurately determining the centroids of the grid. Image quality and/or imperfection in flattening the grid may cause small error. (2) camera calibration provides a "best estimate" of camera position based on digitized clicks on the image and the "true" measured distances of the points on the calibration object. Digitizing error and/or offsets in the calibration object point distances can also add uncertainty. (3) Digitizing, whether automated or by hand can also add error and finally (4) 3D reconstruction between the two cameras may also add error.
Even very small error for individual markers can cause larger and more noticeable errors in rigid object orientation. This is clearly visible as "jittery bones" when raw data are used to drive animations. Therefore it is often useful to filter the XYZ coordinate data before calculating rigid body motion. But care must always be taken when filtering data to be sure that real movements are not smoothed out of the data. It is always a good idea to compare raw and smoothed data graphically to detect oversmoothing.
- Type butterBatch into the MATLAB commandline.
- Select your xyzpts.csv data file.
- Enter the cutoff frequency, recording frequency (i.e. frame rate), and filter type
Note: it is important to enter your correct frame rate. The default is 250 frames per second. It is also important to select an appropriate cutoff frequency; generally 5 to 10 times greater than the frequency of the motion in your videos
- Original and filtered data will be plotted for the first data file
- Files are saved in the original directory with BUTTER## appended to the
end of the original file name. The ## specifies the cutoff frequency