September 28, 2006 2:24 PM

Session 11

Here are all the materials we used today in class, available for you to use as you study:

For next time, study for our firsty exam. It will cover all the material we've seen in class and in the textbook through Chapter 6.

Don't forget Homework 3, which is due at 8 AM on Tuesday! Start sooner, rather than later, and ask questions as you run into them...


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 26, 2006 4:21 PM

Homework 3: Loops and Choices over Images

This assignment consists of two tasks.

Task 1

Add a lakeEffect() method to the Picture class that takes no arguments. lakeEffect() makes a new Picture that is twice as tall as the original. Into the top half of this new picture it copies the original. Into the bottom half it mirrors the original, but with a twist... Each pixel is mirrored by the average of its left and right neighbors.

three pixels in a row

Pixel (x,y) will be mirrored by a pixel whose color is an average of pixels (x-1,y) and (x+1,y). Pixels on the end -- pixels (0,y) and (width-1,y) -- have only one neighbor, so they are mirrored by a pixel whose color is an average of pixel (x,y) and its one neigbor.

For example, I applied the lakeEffect() method to the sundial image used above and received this resultant image.

Apply your lakeEffect() method to an image or two of your choosing. Cool effects are appreciated!

Task 2

Add a fogEffect() method to the Picture class that takes one argument, an int named threshold that indicates a level of light. threshold must be in the range 0..255, inclusive. fogEffect() turns all pixels lighter than threshold to grayscale, to simulate fog.

For example, I applied a fogEffect(150) filter to the mediasources' beach image and received this resultant image. When I applied fogEffect(125) filter to the mediasources' church image, I received this image.

Apply your fogEffect() method to an image or two of your choosing. Do you notice anything about what images your method works best on?

Deliverables

Submit one Picture.java file containing your two new methods, plus whatever "helper" methods you create..

By the 8:00 AM on Tuesday, October 3, submit these files:

  • Picture.java
  • your various images from Task 1, both originals and creations
following the submission instructions for the course. You do not have to submit printouts of your images.


Posted by Eugene Wallingford | Permalink | Categories: Homework

September 26, 2006 2:12 PM

Session 10

Here are all the materials we used today in class, available for you to use as you study:

If you'd like to read more about edge detection and computer vision, check out this web page that describes some neat little applications.

For next time, read the rest of Chapter 6.

Oh, and keep an eye out for Homework 3, which will appear on-line by day's end and be due at 8 AM on Tuesday.


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 21, 2006 2:18 PM

Session 9

Here are all the materials we used today in class, available for you to use as you study:

For next time, read the first half of Chapter 6.

Oh, and work on Homework 2, which is due at 8 AM on Tuesday!


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 21, 2006 2:10 PM

Change of Date for Exam 1

As discussed in class today, our first exam will be on Tuesday, October 3, not September 26 as originally scheduled. See the course syllabus for the update.


Posted by Eugene Wallingford | Permalink | Categories: General

September 19, 2006 4:59 PM

Homework 2: Copying and Embedding Images

NOTE: The assignment is now complete. I decided to assign just one method to write, which cuts the assignment roughly in half. As a result, let's return to the originally-planned due date, Tuesday, September 26.

This assignment consists of a single task.

Add an embedImage() method to the Picture class, which takes four arguments:

  • a Picture that is a source image
  • an int that is an x-coordinate
  • an int that is an y-coordinate
  • an int that is the width of a square

embedImage() copies a square of that width from the source image, beginning at (x,y), into the lower righthand corner of the receiving image. It also draws a black border around the inset image that is three pixels wide. For example, I embedded a 185x185 region beginning at (70,15) from this image of a sundial into the mediasources' butterfly2 image and produced this resultant image.

Deliverables

By the 8:00 AM on Tuesday, September 26, submit these files:

  • Picture.java
  • two original images of your choosing
  • an image produced by your method embedding one of the originals inside the other
following the submission instructions for the course.

You do not have to submit printouts of your images.


Posted by Eugene Wallingford | Permalink | Categories: Homework

September 19, 2006 3:22 PM

Session 8

Here are all the materials we used today in class, available for you to use as you study:

For next time, be sure that you have read all of Chapter 5. If you have any questions, be ready to ask.

And watch for Homework 2, which I'll post soon and make due at 8 AM next Tuesday.


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 12, 2006 3:21 PM

Session 7

The notes for Session 07 are now available. As always, work through them carefully, paying special attention to the Java we wrote involving arrays and loops.

I have also posted a second chance for Homework 1, giving you until 8:00 AM to submit or re-submit any files for the assignment. Take advantage of this chance to overcome any problems you had with the submission system, or any problems you had with your solutions. You are free to ask me, Prof. Schafer, or the TAs for help.

Remember: We do not have class on Thursday. Instead, there is an optional help session with Prof. Schafer (usual time, usual place) where you can ask any questions you have at this point in the course, but especially those related to solving Homework 1. This might involve the Java itself, or the mechanics of using Dr. Java or the submission system.

I will see you again in class next Tuesday (unless you stop by to see me during office hours...).


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 12, 2006 3:09 PM

Homework 1 Second Chance

Some of you completed Homework 1 but had some trouble submitting your files.

Others of you had trouble completing part of the assignment and would benefit from some extra time to work on your loops.

So: Here is a second chance. You may submit files again, or make changes and additions to your files and submit.

By the 8:00 AM on Thursday, September 14, you may submit -- or re-submit -- any of these files:

  • grayscale-experiment.txt
  • Picture.java
  • your various images from Task 1

Be sure to follow the homework submission instructions for the course! Because we do not have a regular class on Thursday, you may submit printouts of your grayscale-experiment.txt and Picture.java files in one of two ways:

  • Deliver them to my office anytime before 12:30 PM on Thursday. (Louise will take them and place them in my mailbox.)
  • Take them to class at the regular on Thursday and give them to Prof. Schafer. (He will be there for the optional Q-n-A session on Homework 1, Dr. Java, etc.)

I'll be available between now and Thursday at 8:30 AM or so, so please ask any questions you may have -- I'll do my best to help.


Posted by Eugene Wallingford | Permalink | Categories: Homework

September 07, 2006 3:37 PM

Session 6

I do not have a separate HTML file for today's session, but I do have all the materials we used today in class available for you to use as you study:

For next time, read the first half of so Chapter 5.

And, of course, do Homework 1, which is due 8 AM on Tuesday. If you have any questions, including about the submission system, please let me know as soon as possible! (Monday night is probably too late for me to be of much help...)


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 05, 2006 4:23 PM

Session 5

The notes for Session 05 are now available. As always, work through them carefully, paying special attention to the new Java we have learned for arrays and loops.

I have also posted Homework 1, which is due one week from today at 8:00 AM. (That deadline is for the on-line submission; the hardcopy is due at class time the same day.)

This is your first chance to "fly solo", though as I said last time you won't really be flying solo. You have me, your classmates (via the mailing list), Prof. Schafer, and the lab assistants to help you. Be sure to use these resources early and often!

For next time, be sure to finish Chapter 4 in Guzdial & Ericson. Come to class prepared to ask any questions you have about the chapter.


Posted by Eugene Wallingford | Permalink | Categories: Sessions

September 05, 2006 4:08 PM

Homework 1: Experimenting with Loops over Images

This assignment consists of two tasks.

Task 1

Use any color image of your choosing. You may select from the images in the textbook's mediasources/ folder, the images I've used in class, or an image you obtain from somewhere else. In any case, document the source of your image.

Create several different grayscale versions of your image, by experimenting with the intensity value you set each pixel to. One way to come up with some interesting combinations is to weight the red, green, and blue components of a pixel differently when creating the intensity value.

Write up a short description of your experiments in a text file (not a Word document!) named "grayscale-experiment.txt". Be sure to say which of the grayscale versions of your image seems to be the most faithful to the original -- and why you think that version looks better than the others.

Submit your "grayscale-experiment.txt" file and all of your images.

Task 2

Add a method to the Picture class that draws a black border around the inside of the image. For example,

Then write a method that adds some flourish of your own choosing to this idea, say, a different color for the border, or a thicker border. Remember -- this method should work for any picture!

Submit your modified "Picture.java" file.

Deliverables

By the 8:00 AM on Tuesday, September 12, submit these files:

  • grayscale-experiment.txt
  • Picture.java
  • your various images from Task 1
following the submission instructions for the course. You do not have to submit printouts of your images.


Posted by Eugene Wallingford | Permalink | Categories: Homework

September 05, 2006 3:50 PM

Added Another Link

I have added another new link to the the LINKS menu on the left, to the homework submission requirements for the course. This includes electronic submission and hard copy, both of which are usually required. You may want to check them out now and then refer back to them as you work on upcoming assignments.


Posted by Eugene Wallingford | Permalink | Categories: General