CS 101 - Introduction to Computing, Spring 2010

Project 2 - Image Authentication

Due Date: Thursday 3/11/2010 at 11:59 pm

For this assignment, we will be doing image authentication. The idea is that we are checking to see if a copy of a picture has been modified away from the original picture.

We will be using three pictures for this project. The first picture will be the original. The second picture will be the copy that is being checked for modifications. The third picture will be created by the program which will show only the parts of the original that were modified in the copy. The user is to prompt the user for the original and the copy (using FileChooser.pickAFile() twice is the suggested way to prompt the user for these two pictures).

The first two pictures must have the same width and height. If the two pictures do not have the same size, print out an error message and quit the program. The third pictures is to be created to have the same width and height.

For each pixel position in the original picture, compare the color of that pixel with the color of the pixel in the same position from copy picture. If the two pixels have the same color (i.e. the original is not modified in the copy), set the color of this position in the third picture to black. If the two pixels do not have the same color, set the color of this position in the third picture to the color of the pixel from the original picture.

After all the positions have been checked and the third picture has been completely created, the third picture is to be displayed and the user should be asked to provide a filename to save the third picture. Again, FileChooser.pickAFile() should be used for the prompting of the filename.

Note: if the color in the original picture at a modified position is black or nearly black, it may be hard to detect the modified parts.

The following are original pictures and modified pictures:

Project Collaboration

You are allowed to receive help on this project from other students who are also taking CS 101. Each student must still complete and submit his/her own project. You will be required to include a Collaboration Statement somewhere on your project if you receive help. This statement can simply be something like the following:
For this project, I received help from the following member of CS 101.
This statement should list each helping student's name in a comment in the "header comment" of your Java file that includes the main() method.

How assignments should be submitted

  1. Go to the blackboard site for the class
  2. Select "Assignments" on the left bar
  3. Locate the correct assignment to submit; click on "View/Complete Assignment" at the bottom of that assignment
  4. Next to "Attach local file", click "Choose file", choose the file you want to submit; please submit only ONE file, properly named.
    For example for Proj1, name it Proj1yournetid.java, for example if your Net ID is sfranz3, the filename would be Proj1sfranz3.java
    Please only submit source code file (the .java file, not the .class). Also, if you have any comment about your program, please write it down in the same file; please do NOT write in the "Comments" field on the submission page (this will go into a different file and will be easily missed).
  5. Hit "Submit"
  6. Go back once again to View/Complete assignment and make sure that your file was submitted; also, this page will show your grade and comments (if any) after assignments are graded.

CS 101 Home Page
Department of Computer Science
University of Illinois at Chicago