CSC320 Visual Computing
Assignment 4

Due: April 5 (by 2PM)
Late penalty: 15% /day to a maximum of 4 days, not accepted after that.
Hand in: Submit electronically here Note: The submit problem has now been fixed. If you want, instead of your part of the movie, we will accept a directory with two image files as well as two command files and a script named buildMovie. This script simply executes your Morph application to generate your part of the movie in the appropriate directory. Please make sure that the script generates your .png files in the appropriate place.
Marking: See the syllabus
Groups: Groups of 2
Environment:Java 1.4, under linux in 1158

Announcements

Requirements

Beier-Neely Morphing

Assignment #4 will introduce you to a fun and widely-used application of visual computing: creating a video in which the photo of an object or person is morphed into another photo of the (same or different) object or person. It closely follows an assignment given at a CMU computer graphics course. As in that assignment, your goal will be to produce a "morph" animation of your face into another student's face. Each of you will generate one second of animation, which we will put onto a video tape. The final video will be a metamorphosis through each of the faces in the class. Here is the video that the CMU students produced. Here is your chance to create your own special effects by morphing your portrait into that of another person or object!

Documentation

Please document your code, describing any interesting algorithms. Describe any interesting features you have added.

References

Questions and Answers

Question:
How do I write an image?
Answer:
Here is a small stub that contains all the ideas... import java.awt.image.*; import javax.imageio.ImageIO; import java.io.File; import java.io.IOException; public void save(){ File file = new File("hulkOut.png"); try { ImageIO.write(dest.getImagePanel().getImage(), "png" , file); } catch (IOException e) { e.printStackTrace(); } }
Question:
Can I have some starter code?
Answer:
OK, here is MorphGUI.java, code which generates the following GUI... You will still need to add code to load images into s1 and s2 as well as hookup event handlers and figure out how to gather parameters from the forms. There are two basic approaches:
  1. Fire events each time a user manipulates a parameter. Save the appropriate parameter in an object. When the user wants to compute something, just pass the object.
  2. When the user actually wants to compute something, gather all parameters from all controls and then compute it.

Question:
Where are the class pictures?
Answer:
here
Question:
What does the command file look like?
Answer:
As in assignment 1, except we really only care about lines. You should have a list of lines for each image. For Morph to work properly, there should be the same number in each cmd file. D. Save all objects currently-displayed on the GL canvas, along with their colors, to a .cmd file (10 points) File specifications: - One line per object on the screen - Lines should strictly adhere to the following format: first character on each line is the type of object, followed by a space; the remainder of the line is a space-separated sequence of integers - For polygon objects, the format should be p <N> <row1> <col1> ... <rowN> <colN> where N is the number of polygon vertices - For circle objects: c <center-row> <center-col> <radius> - For rectangles: r <row1> <col1> <row2> <col2> - For lines: l <row1> <col1> <row2> <col2> - For a point: p <row> <col> - Each drawing command may be preceded by a line: C <r> <g> <b> indicating that the drawing command(s) that follow used <r> <g> <b> as their drawing color
Question:
What about the numberws we are supposed to be assigned for naming of files?
Answer:
I have posted numbers on the set of class pictures. The final set will be up shortly.
Question:
The submit link was not working!!
Answer:
It is now.
Question:
I could not submit...
Answer:
I (Arnold) ran out of quota. I have cleaned up my space a bit. Tomorrow, I will ask Sue to increase my quota so that the remaining submissions can come in. Please do not panic if you can not submit until sometime tomorrow morning. Try submitting tomorrow.
Question:
What if I (the student) run out of quota when trying to submit?
Answer:
When logged into a linux box, you can move everything to /tmp and create your piece of the movie and tar up and submit from there. Please remember to remove your files from /tmp otherwise someone else may be tempted to copy your work.
Question:
How about that submit problem...
Answer:
It has been fixed, please see the note by the submit link above. Here is what I have in the submits so far. Please check your file sizes credit.erin> date; ls -l */*/* Wed Apr 7 20:01:35 EDT 2004 -rw------- 1 arnold 32812484 Apr 5 01:15 Atwi_MajedIsmail/a4/assign4.tar.gz -rw------- 1 arnold 0 Apr 5 02:03 Aziz_Maroquine/a4/assign4.tar.gz -rw------- 1 arnold 31916764 Apr 5 13:17 Balaura_AdrianAlexander/a4/assign4.tar.gz -rw------- 1 arnold 14965924 Apr 5 08:13 Banh_Jason/a4/assign4.tar.gz -rw------- 1 arnold 14844197 Apr 6 16:33 Butt_OmairNawaz/a4/assign4.tar.gz -rw------- 1 arnold 23953408 Apr 5 08:03 Byrd_NelvinAndrew/a4/assign4.tar.gz -rw------- 1 arnold 13728232 Apr 5 17:26 Chow_AndyYau/a4/assign4.tar.gz -rw------- 1 arnold 1383247 Apr 5 06:13 Groff_Blair/a4/assign4.tar.gz -rw------- 1 arnold 28365311 Apr 5 14:13 Gueorguiev_StefanGueorguiev/a4/assign4.tar.gz -rw------- 1 arnold 12619088 Apr 5 12:26 Huynh_JohnQuocChuong/a4/assign4.tar.gz -rw------- 1 arnold 22948590 Apr 5 16:29 Kostalas_Tasso/a4/assign4.tar.gz -rw------- 1 arnold 0 Apr 5 08:50 Krolo_Ivan/a4/assign4.tar.gz -rw------- 1 arnold 22610555 Apr 5 07:45 Manuh_Chris/a4/assign4.tar.gz -rw------- 1 arnold 31942162 Apr 5 00:48 McCash_Drew/a4/assign4.tar.gz -rw------- 1 arnold 27473303 Apr 5 05:25 McCrae_JamesPalmer/a4/assign4.tar.gz -rw------- 1 arnold 27060413 Apr 5 13:45 Perrier_Annie/a4/assign4.tar.gz -rw------- 1 arnold 191 Apr 5 00:26 Student_Joe/a4/assign4.tar.gz -rw------- 1 arnold 16567096 Apr 5 05:33 Tathgar_Gagandeep/a4/assign4.tar.gz -rw------- 1 arnold 31568233 Apr 5 07:37 Tran_Ramy/a4/assign4.tar.gz credit.erin>