The only file you may edit is Project1.cpp.  If you find that the current infrastructure is insufficient in meeting the requirements to complete the project, please contact the course staff rather than editing the code provided.  We have designed the code so that you may construct your algorithms and test them on a desktop machine with stored images and then seemlessly transition your code to the production device.

Note: The following has all been tested on Linux, but for Windows users, we have decided to include a Visual Studio project file.  There is one caveat in that Windows does not provide support for getopt.  Therefore, getopt.{c,h} have been included for your use.  Please, let the course staff know of any issues related to the Visual Studio build process and we will investigate a solution.  The phone component for this project will remain supported in Linux only.

If you happen to be using Windows, then you must install OpenCV v2.1.  http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/  The project file is configured for an OpenCV installation at c:\OpenCV2.1.  The course staff has found some issues with how libavcodec has been compiled for Windows and warns you to proceed at your own risk.  If you are without a Linux machine, the lab is always an option rather than debugging your Windows install.

To compile for the PC:
./make_pc
and to clean:
./make_pc clean

For information on how to run the compiled binary:
./cs4670 -h

Example usage:
Load your_image.jpg, apply gaussian blur, and display in window.
./cs4670 -f gaussian -i your_image.jpg

Load your_image.jpg, apply sharpen filter, display in window, and save as new_image.jpg.
./cs4670 -f sharpen -i your_image.jpg -o new_image.jpg

Load your_image.jpg, apply median filter of size (2*3+1)x(2*3+1), and display to screen.
./cs4670 -f median -p 3 -i your_image.jpg

Using the command line tools to build for the N900.  When prompted for a password, it will be 'maemo', no quotes:
mad qmake
mad make
scp cs4670 root@192.168.2.15:
ssh root@192.168.2.15
./cs4670

NOTE: If you decide to debug on the phone and would like to copy your code over so that gdb may provide code listings, remember to delete it before returning your phone.  It is an academic integrity violation to derive solutions from code that is accidentally left on the device between checkouts.  Please, inform the course staff if you encounter such an instance.

Using Qt Creator to deploy to the N900 instead:
Open cs4670.pro in Qt Creator
Press run
