next up previous
Next: 5 Proposed Development Schedule Up: 4 Object Oriented Design Previous: 4.2.4 Processing related classes

4.3 Main program

Following is a rough approximation to the anticipated main loop of the Stereocam program, in C++ syntax. It highlights the two greatest benefits of using an Object Oriented methodology for the system -- flexibility and simplicity. Most of the details of the system will be buried in the implementations of the various classes, and these implementations can be changed, added and removed without ever directly affecting other parts of the system.

Input *input;

Process *process;

Output *output;

StereoImage *image;


// Create the desired concrete instantiations. Eg:

input = new MovieFileInput("input.mpg");

process = new NopProcess();

output = new CrystalEyesOutput();


while( ! image = input->GetImage() ) {

    image = process->ProcessImage(image);

    if( ! output->PutImage(image) )



Kevin Pulo