CONTENTS OF SRC bgfg: an executable for the non-threaded version of the program main.cpp: the primary C++ source file for the non-threaded version of the program main.h: the accompanying C++ header file for the non-threaded version of the program main_parallel.cpp: the primary C++ source file for the threaded version of the program main_parallel.h: the accompanying C++ header file for the threaded version of the program Makefile: the makefile for both programs mk: the driver script which prepares and executes either program pbgfg: an executable for the threaded version of the program SETUP 1. If you have acquired the source code from the tarball and not the svn repository, you will need to install the latest available verison of the OpenCV library package. You can find this in the Downloads section of the OpenCV website at http://opencv.willowgarage.com/wiki/ 2. Navigate to the src directory and open Makefile. Verify that the relative paths given for the includes and the libs for OpenCV are correct. If you installed OpenCV yourself, you may have to change these paths to reflect this. 3. In the src directory, open mk in a text editor and change the absolute path given by LD_LIBRARY_PATH to refer to the OpenCV library. This must be done regardless of the manner in which you acquired the project. 4. The mk script is the primary means by which the program is run. By default, it is set to make parallel and run pbgfg, the parallel version of our background-foreground segmentation system. If so chose to do so, you can specify "make serial" and run bgfg instead for the non-threaded version of this program. 5. Before running the mk script, plug in a webcam. The system will expect a webcam to be connected at runtime in order to execute. 6. Before running the program for the first time after startup, open mk in a text editor and replace "./pbgfg" with "gdb ./pbgfg" (or bgfg, as the case may be). Run mk and enter "run" into gdb. The program will crash, citing an OpenCV type mismatch. 7. Remove the gdb directive from mk and run the program again. If everything worked properly, you should see the video feed from the webcam shown on-screen. The previous type mismatch issue should not occur again (Note: the nature of this issue is not well understood and is thought to be an error on the part of OpenCV). HOW TO USE 1. After setup, run the mk script. The program should output the video feed from the webcam to the screen. 2. Consider what you would like the initial background model to include. Although the system will adapt itself regardless of the initial state, providing an optimal initial model does save some time. Adjust the scene as necessary. 3. Press any key. The screen should turn black, indicating the area in the scene is given as background. 4. You can now interact with the system by supplying motion in the scene. Objects in the foreground will appear as they would as if captured by the webcam normally. 5. When finished, press any key to exit.