Listed below are the directories, their contents, and usage notes for each program (most of which have some parameters to set before they will work)

Note that only stereo_test_sparse_pi.py is optimized for the Raspberry Pi; however, the final version of the tracker/rangefinder is version 4, which includes disparity-deviation and epipolar filtering with iterative feedback loop using convex hull match comparison (Pi version does not have these upgrades, so tracking is less robust)

Arduino:
	rpm.ino - the RPM estimator/transmitter code
Processing:
	CSV_Plotter.pde - serial data visualizer
		- insert video and .csv log file into the data folder to run
			- name video 'data.mp4'
			- name log 'data.csv'
		- change columns to number of columns in log file for proper formatting
Python:
	LBP Demo:
		cascade.xml - the trained LBP Cascade for car recognition
		Stereo_Jeep_Right.mp4 - test video
		vehicle_detection.py - script to play the test video and highlight matches
			- the video source can also be set to a webcam index for live demo
	cap_bright.py - automatic camera brightness setting script
	serial_logger_[linux/win].py - logs serial data from the arduino
		- set the Baud Rate to same as the arduino
		- have arduino transmit 'RESET' when setup() finishes so the logger can begin a new file (the reset button acts as a lap counter)
		- set NUM_ENTRIES to the number of data columns to log
		- set arduino.port to the appropriate value depending on your OS
	stereo_calib_feed.py - automated stereo calibration script
		- set VideoCapture arguments to the capture source indices (NB: if your laptop has a webcam, that will usually be index 0, so left is 1 and right is 2)(the order in which you plug in the cameras determines their indices; we tried to change that behavior but it is tough, since the cameras have exactly the same name and ID number)
		- uses the chessboard pattern. you need to move it to many different poses for calibration
		- if you get a really bad calibration, delete the stereo_params directory to begin again from scratch; otherwise the previous calibration is used as a starting point
	stereo_calib_test.py - loads calibration parameters and displays the disparity map from the two cameras
		- set VideoCapture arguments to the capture source indices
		- won't work until you've run the calibration script successfully
		- saves .ply point cloud files; these can be opened with MeshLab, an open source 3D modeling software
	stereo_test_sparse_4.py - the feature tracker and stereo rangefinder
		- set VideoCapture arguments to the capture source indices
		- won't work until you've run the calibration script successfully
		- saves .ply point cloud files; these can be opened with MeshLab, an open source 3D modeling software
		- set the NUM_TICKS parameter to the number of ticks on the mount at which the camera is located (on one side, not the sum of both sides)
		- adjust focal length so that measurements are linear
		- this should be run on a more powerful computer than the RPi for demonstrations, since that makes it more entertaining to watch
	stereo_test_sparse_pi.py - low-latency simplified feature tracker/ranger for Pi
		- displays the algorithm latency
		- does not show the rich output like version 4 for purpose of efficiency
		- set VideoCapture arguments to the capture source indices
		- won't work until you've run the calibration script successfully
		- set the NUM_TICKS parameter to the number of ticks on the mount at which the camera is located (on one side, not the sum of both sides)
		- adjust focal length so that measurements are linear

If you have any question, please email brm217@lehigh.edu. 