Child pages
  • *OBSOLETE* Digitizing in DLTdataviewer
Skip to end of metadata
Go to start of metadata

*** OBSOLETE, DO NOT USE ***

CRITICAL UPDATE: Use new XMALab software for marker-based XROMM, including Undistortion, Calibration, Marker Tracking, and Rigid Bodies.
XMALab replaces MATLAB XrayProject. See Bitbucket XMALab wiki for XMALab User Manual (not this wiki). 

Getting Started:

  1. Open MATLAB, and in the Command Window, type DLTdv3Brown, and press Enter. This will open up the digitizing window.
  2. Click Initialize
  3. The control will prompt you for the number of cameras that are being used. For almost all XROMM applications, the answer is 2.
  4. You will be prompted for Camera 1 and Camera 2 UNDTFORM.mat files. The top of the window will specify whether you should chose the .mat for camera 1 or camera 2. The easiest way to find these files is often to simply search for .mat
  5. You will be prompted for two movie files (raw, distorted movies). If your movies are in the jpg.zip format from the XMAportal, extract the directory and then remove the dot from the directory name (the DLTdv process will fail if the folder name has a period in it).
  6. The program will ask if the cameras are calibrated via DLT. Assuming you have run the calibration program, the answer to that is yes.
  7. Pick the DLT coefficients file. This is a .csv file that was created during calibration. The title of the file will likely be either MergedProjectionMatrixDLT or MergedProjectionMatrixModel.
  8. A window will open with all camera views for the video sequence loaded. In the example below, two cameras were loaded with camera 1 in the left panel and camera 2 in the right. You are now ready to digitize.
  9. Identify the frame you would like to begin digitizing with. It is generally recommended to begin digitizing 10 or 20 frames before movements starts, to have a buffer for filtering data later.
  10. Navigate to that frame by typing in the number into the Frame number box or by sliding the scroll bar.
  11. Choose tracking direction. Sometimes the view lends itself at the end of a sequence to marker identification, but is not as clear earlier on. In such cases, it is possible to digitize the movies in reverse frame order.

*** OBSOLETE, DO NOT USE ***

Saving Digitizing Data

Please do this frequently. It is easy to reload data, and if MATLAB crashes or you accidentally quit it, you will lose your data.

The Save Data button in DLTdvBrown acts like a Save As command. Entering the same prefix from session to session is generally desirable and will write over data from a previous digitizing session. Selecting a new prefix will establish an archive of your sessions.

Saving your data creates five files, all with the prefix that you have selected. These are:

  • *offsets.csv: lists the offsets for each frame
  • *xypts.csv: lists the raw digitized xy coordinates for each camera view in each frame
  • *xyzpts.csv: lists the 3D xyz coordinates for each frame once the DLT coefficients have been applied to the 2D data from each camera
  • *xyzres.csv: lists the DLT residuals for each marker point in every frame
  • *markerDistances.csv: lists the pair-wise distances between all points

When the merged DLT has been modified, Shift R will recalculate the xyz coordinates from the xy data.
To recalculate data, save with a different file name or discard the old xyz and res files.

*** OBSOLETE, DO NOT USE ***

Reload Digitized Data

  1. Re-open the DLTdataviewer. This requires following all of the same steps that were required to begin digitizing the first time (load .mat files, load .cine files, load DLT file
  2. On the dataviewer controls, click the Load data button. You will be prompted to select a .csv file of the format *xypts.csv. This contains previously digitized data and will load the appropriate number of points and will apply the digitized data to the videos. 
  3. A warning will appear that you should check the offset values. As long as these are still set to zero and you have not adjusted them when digitizing, you can ignore this warning.
  4. Notes:
    1. When the merged DLT has been modified, Shift+R will recalculate the xyz coordinates from the xy data (mouse pointer has to be over the video).
    2. To recalculate data, save with a different file name or discard the old xyz and res files.

Digitizing:

To track a single point manually:
  1. Choose the autotrack mode desired. Pick "off" or "auto-advance" or "auto-retreat" to manually digitize the point. "Off" requires the user to manually advance frames, while "auto-advance" will advance to next frame once the point is manually clicked. "auto-retreat" will retreat to the previous frame once the point is manually clicked.
  2. Make sure the point you are tracking is selected in the Current Point drop down menu.
  3. Click the point in one camera view. A blue line should appear in all other views and should be running through the same point in the other camera views.
  4. Click the point in a second camera view. A green diamond should appear over the red circle in all camera views. The red circle is the value recorded as position data in the spreadsheets generated.
  5. Advance to the next frame a repeat.
To track a single point automatically:
  1. Choose the autotrack mode desired. Pick "automatic", "reverse automatic", "semiautomatic", or "reverse semiautomatic" to automatically digitize the point. "Automatic" will autotrack the point for as long as it can and will automatically advance frames, while "semiautomatic" requires input from the user to advance the frame. "reverse automatic" will autotrack the point for as long as it can and will automatically retreat frames. Similarly, "reverse semiautomatic" will retreat the frame on user input.
  2. Make sure the point you are tracking is selected in the Current Point drop down menu.
  3. Click the point in one camera view. If autotracking, the program should automatically follow the point just clicked. If the red circle goes off the point or the user desired to stop autotracking, pressing "x" will stop the tracking.
  4. Once sequence is completely autotracked in one camera view, return to the beginning of the sequence and autotrack in the next camera view.
To track multiple points automatically:

Multi autotrack mode will automatically track multiple points simultaneously.

  1. Select "multi or "reverse multi".
  2. Create and click all of the points you want to track.
  3. Hold SHIFT and click or middle mouse click anywhere on the image.
  4. Release the SHIFT key. Pressing "x" will stop the autotracking midstream.
After tracking points, you can use the Check Distance Button to graph the distance between any two markers. This will give you a sense for the accuracy of your tracking.

 


Unknown macro: {center}                 Table of Contents                

Unknown macro: {center}                      Workflow Diagrams