TWiki
>
CS111 Web
>
CS111Spring2017
>
AssignmentsS17
>
Proj2s17
(2017-02-20, Main.troy)
(raw view)
E
dit
A
ttach
---++ <a href="https://www.cs.uic.edu/CS111" target="_top">CS 111 - Program Design I </a> ---++ Project 2 - Image Authentication ---+++ Due Date: Thursday 3/9/2017 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 pickAFile() twice is the suggested way to prompt the user for these two pictures). The 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, 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. * Picture 1: Lady in Stripes<br /> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/barbara_jpeg_wm.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/barbara_jpeg_wm.gif" target="_top">Original Image</a></p> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/barbara_jpeg_manip.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/barbara_jpeg_manip.gif" target="_top">Modified Image</a></p> <p> </p> * Picture 2: Birds of a Feather<br /> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/birds_1.jpg" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/birds_1.jpg" target="_top">Original Image</a></p> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/birds_2.jpg" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/birds_2.jpg" target="_top">Modified Images</a></p> <p> </p> * Picture : The Shipyard <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/fishingboat_wm.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/fishingboat_wm.gif" target="_top">Original Image</a></p> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/fishingboat_manip.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/fishingboat_manip.gif" target="_top">Modified Images</a></p> <p> </p> * Picture 4: Where's Alfred? <br /> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/houses_jpeg_wm.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/houses_jpeg_wm.gif" target="_top">Original Image</a></p> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/houses_jpeg_manip.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/houses_jpeg_manip.gif" target="_top">Modified Images</a></p> <p> </p> * Picture 5: Eating Oranges <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/man512_jpeg_wm.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/man512_jpeg_wm.gif" target="_top">Original Image</a></p> <p><img alt="" src="http://www.cs.uic.edu/~troy/spring10/cs101/projects/man512_jpeg_manip.gif" /><br /> <a href="http://www.cs.uic.edu/%7Etroy/spring10/cs101/projects/man512_jpeg_manip.gif" target="_top">Modified Images</a></p> * <p> </p> * Picture 6: The Butterfly <p><img alt="butterflyorig.jpg" src="http://www.cs.uic.edu/pub/CS101/Proj2s12/butterflyorig.jpg" /><br /> Original Image</p> <p><img alt="butterflymanip.jpg" src="http://www.cs.uic.edu/pub/CS101/Proj2s12/butterflymanip.jpg" /><br /> Modified Image</p> <p> </p> [[CS101.Proj2ResultsS12][<font face="#mce_temp_font#">Look here for results of this program.</font>]] ---+++ 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: <blockquote> 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 </blockquote> 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 Python file electronically via the Assignment link in Blackboard for this lab. You are to name your file with the lab number and your netID. Unless you have created your own pictures to use with this program, there is no reason to send us pictures.
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2017-02-20 - 21:09:22 - Main.troy
CS111
Web Page Spr 18
Syllabus Spr 18
Lecture Notes Spr 18
Sample Code Spr 18
Assignments Spr 18
[edit this menu
]
Log In
CS 111 Main Page
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
ABOUT US
Our Department
Recent News
Contact Us
ACADEMICS
Prospective Students
Undergraduate
CS Minor
Graduate
Courses
RESEARCH
Overview
By Faculty
Labs
PEOPLE
Faculty
Adjuncts
Staff
Students
Alumni
Copyright 2016 The Board of Trustees
of the University of Illinois.
webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF