Instructions for Digitizing Data:
Folder organization (Specific to Pig Feeding Data): Each filming session has it's own folder named with the date, the animal(s) filmed, and the letter "F" for feeding (e.g. 20061218SusABF).
- Within each session folder, there are four sub-folders:
- Calibrations: Has calibrations grids for each camera. Grids for each camera may be in a separate folder. The .tif file with the UNDIST suffix is the undistorted version, and is the one that was used to calculate the DLT coefficients
- DLTcoefs: Contains the DLT coefficients that are necessary for the Matlab procedure to calculate 3D coordinates. Use the file titled "cal01_DLTcoefs.csv"
- Grids: Contains distorted and undistorted images of distortion grids, as well as the UNDTFORM.mat files for each camera that are used to undistort the distorted calibration grids
- SusX: A separate folder is created for each animal and each trial. Within each trial folder, there should be two .avi files, one for camera 1 (C001) and one for camera 2 (C002). This is also where 3D digitized data will be saved. It should be saved with the same prefix as the trial name (e.g. 20061218SusBS05-01). Matlab will add on the appropriate suffix and will save four different files for each trial.
Digitizing (Generalized for all Data Types): Open Matlab, and in the Command Window run the .mat procedure by typing "XrayProject". A small XrayProject command window will open up. XrayProject.jpg
Before starting, the proper XrayProject files must be loaded into your version of Matlab.
Once the XrayProject command window appears (see image):
- *UNDTFORM.mat files have already been created, so click that you have these files. If the *UNDTFORM files have not yet been created, click here for instructions.
- Undistorted calibration cube images have already been created, so click that you have these files. If undistorted calibration cube images have not been created, click here for instructions.
- DLT coefficients have already been created, so click that you have these files. If DLT coefficients have not been created, click here for instructions.
- Click "Digitize". The latest version of the DLTdataviewer, DLTdatviewer5x controls will open up
Running the DLTdataviewer5x controls
- Click "Initialize". The control will prompts you for the number of cameras that are being used. For almost all CTX applications, the answer is 2.
- You will be prompted for Camera 1 and Camera 2 UNDTFORM files. These will be located in the "Grids" folder described above. There may be separate sub-folders for the two cameras. Make sure to switch to the Camera2 folder when prompted for the Camera 2 UNDTFORM file if there are separate folders.
- Next, you will be prompted for two movie files. These are located in the appropriate Trial sub-folder in the SusX main folder. The two videos will appear in the video window.
- The program will ask if the cameras are calibrated via DLT. Assuming that they have been created, pick the DLT coefficient file. This is the file "cal01_DLTcoefs.csv" located in the DLT coefs folder (location specific to pig feeding data). You are now ready to digitize.