detection.py
Example Usage: python detection.py

Purpose: to test detection algorithm
Input: an image with red, green, blue, and yellow markers
Output: threshold, erosion, contour, and centers of the four color markers

Before Use:
1) change path in line 8 to the folder housing the image
2) change the input image name in line 9 to the appropriate image name
3) option to open original image and threshold during run in line 66-67
4) option to print out the center in line 73
5) change path in line 93 to folder housing the output
6) change the output image name in line 94

_________________________________________________________________
main_image.py
Example Usage: python main_image.py

Purpose: to track and display four markers
Secondary purpose: graphic tests
Input: calibration results and 4 corresponding images
Output: graphic display and 4 3D points with respect to Camera 1

Before Use:
1) change path to calibration results in line 283-289 appropriately
2) change path to 4 corresponding images in line 311
3) change names of input files in lines 313-322
4) change matrix output file in line 334
5) change graphic output file in line 338
6) there is an option to uncomment lines for un-normalized calculations
	and comment normalized calculations
_________________________________________________________________
main_image2.py

Example Usage: python main_image2.py

Purpose: to track and display two markers
Secondary purpose: graphic tests
Input: calibration results and 4 corresponding images
Output: graphic display and 2 3D points with respect to Camera 1

Before Use:
1) change path to calibration results in line 271-277 appropriately
2) change path to 4 corresponding images in line 299
3) change names of input files in lines 301-310
4) change matrix output file in line 322
5) change graphic output file in line 326
6) there is an option to uncomment lines for un-normalized calculations
	and comment normalized calculations
_________________________________________________________________
main_video.py
Example Usage: python main_video.py

Purpose: to track and display four markers
Secondary purpose: time tests
Input: calibration results and 4 corresponding images
Output: video of graphic display and 4 matrices of 3D points with respect to Camera 1 

Before Use:
1) change path to calibration results in line 288-294 appropriately
2) change path to 4 corresponding images in line 320
3) change names of input files in lines 322-328
4) change graphic output file in line 332
5) change matrix output file in line 383-386
6) there is an option to uncomment lines for un-normalized calculations
	and comment normalized calculations

_________________________________________________________________
main_video2.py

Example Usage: python main_video2.py

Purpose: to track and display two markers
Secondary purpose: time tests
Input: calibration results and 4 corresponding images
Output: video of graphic display and 2 matrices of 3D points with respect to Camera 1

Before Use:
1) change path to calibration results in line 279-285 appropriately
2) change path to 4 corresponding images in line 309
3) change names of input files in lines 311-317
4) change graphic output file in line 321
5) change matrix output file in line 365-6
6) there is an option to uncomment lines for un-normalized calculations
	and comment normalized calculations

_________________________________________________________________
Software Dependencies:
Python (and the following python modules)
	-numpy
	-scipy
	-matplotlib
	-pickle
	-mlabwrap
	-cv2
	-ffmpeg
	-time
OpenCV
Matlab (and the following matlab add-ons)
	-matlab calibration toolbox

_________________________________________________________________
Data Acquisition:
see Appendix B

_________________________________________________________________
Short Explanation of Algorithm Approach:

DETECTION
-convert RGB to YUV
-threshold for color of interest
-erode, dilate, dilate, erode (morphological operations to delete noise, then close holes)
-find all connected components
-find first moment of largest component

3D POINT RECONSTRUCTION
-find normalized (or unnormalized) image projection for each center in pixel locations (described in paper)
-transform to Camera 1 coordinate space
-find point between the shortest distance between each pair of lines (least squares approach described in the paper)
-take the average between each of these points to find the midpoint of the midpoints