CS 111 - Introduction to Computing

Project 2 - Image Authentication

Due Date: Tuesday 3/12/2012 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 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:

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 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 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).

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

-- Main.troy - 2013-02-26

Topic revision: r1 - 2013-02-26 - 18:00:44 - Main.troy
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF