CSCE 5703 - Homework 3
Due Date - TBA at 11:59 PM

1. Problem Statement:

The goal of this programming assignment is to gain experience in common motion detection techniques. You will be working with collections of JPEG images captured from stationary cameras. Your task is to perform motion analysis to look at images pixel(x,y,f) in video sequence to detect motion. Your program should create a sequence of output images motion(x,y,f) where the pixel at (x,y,f) is white(255) if there is motion and black(0) otherwise.

2. Design:

The input images for this project are in the src/video directory. Each sequence subdirectory contains JPEG images numbered 001.jpg to NNN.jpg. There are also thumbnail images 001.icon to NNN.icon and an index.html file that you can use to quickly get an overview of the images in the sequence. You can copy the sequence you want to work with to your computer using the wget command. For example:

wget -r

Before you can perform motion detection, you need to process the sequence of input images and calculate four images that contain motion summary information. The image mean(x,y) will contain the temporal mean of all pixels at location (x,y) in the input sequence. The image max(x,y) will contain the maximum pixel value at location (x,y) in the input sequence. Similarly, min(x,y) will be the minimum pixel value. Finally, the image stdev(x,y) will contain the standard deviation of all pixels at location (x,y) over the input sequence.

To detect motion in each frame of the image sequence, you can compare the pixel(x,y,f) value to the mean(x,y) value and decide if the difference is significant or not depending on corresponding values of max(x,y), min(x,y), and stdev(x,y). To reduce the effects of noise in the input sequence, you may want to peform averaging or median filtering on your motion(x,y) image before you save it.

Your final task is to combine the information in your motion(x,y,t) images to create a motion summary image. How you do this is up to you. The only requirement is that we should be able to look at the motion summary image and determine "was there motion?" and "where was the motion in the image?". If there is a lot of motion in the input images, the summary may look cluttered, but that is ok. Users of your program could reduce this clutter by selecting a smaller sequence of input images if they choose.

3. Implementation:

For this project, you should use the image processing libraries in the src/libim directory to read/process/write your images. There are no built-in commands for reading a subdirectory of images, so you will need to write this as part of your project.

Regardless of which technique you choose to use, you should develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete.

4. Testing:

Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Try your program with several inputs, and save your output files for submission on the program due date.

5. Documentation:

When you have completed your C++ program, write a short report describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate file to be submitted electronically.

6. Project Submission:

For this project, you are asked to submit your project via email. Place all of your source code, input images, output images, and your project report in a hw3 directory and use "tar cvf hw3.tar hw3" to create a tar file containing your work. Then email this file to the instructor on the due date. You do not need to print a copy of your report or code. Everything will be viewed and graded online.