CS 111 - Program Design I

Project 2 - Image Authentication

Due Date: Thursday 3/12/2015 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 first picture, compare the color of that pixel with the color of the pixel in the same position from second 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 blue. 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 blue or nearly blue, it may be hard to detect the modified parts. Since most of our original pictures are in black and white, using the color blue does make the modified areas of the picture standout.

The following are original pictures and modified pictures. It will be assumed that everyone will be using the following picture to run/test their programs. You do not need to find/create your own pictures for this assignment (however, if you want to, you certainly can. Creating such picture is actually kind of hard to do). The picture of the Lady, the picture of the Houses, and the picture of the butterfly work best for this assignment.

Look here for results of this program.

Project Collaboration

You are allowed to receive help on this project from other students who are also taking CS 111. 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 111.
  • Devang Jariwala, netID: djariw1
  • Shun Liang, netID: sliang2
  • Hongwei Zhu, netID: hzhu7
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.

Programming Style

Your program must be written in good programming style which includes:
  • Meaningful Variable Names
  • Proper Indentation of Code
  • Blank Lines between Code Sections
  • Use of Methods
  • In-Line Commenting
  • Header Comment for the File
  • Header Comments for each Method.

How assignments should be submitted

You are also to submit the Java file electronically via the Assignment link in Blackboard for this lab. You are to name your file with the lab number and your netID. Please only submit source code file (the .java file, not the .class file nor the .java~ file). Unless you have created your own pictures to use with this program, there is no reason to send us pictures.

-- Main.troy - 2015-02-26

Edit | Attach | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2015-02-26 - 18:34:01 - Main.troy
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
Helping Women Faculty Advance
Funded by NSF