Course Evals

by Mike Gleicher on December 12, 2015

If you haven’t already done so (and this means most of you) please do a course eval online at:

https://aefis.wisc.edu

As you will notice there are only questions for the “primary” course instructor. Unfortunately, we will not be able to fix this with the online system (it is quite rigid, and no changes can happen quickly). We will have to make another mechanism for you to evaluate Prof. Sifakis.

Use the online form to comment on me (Prof. Gleicher) and the course in general. We really do take these evaluations seriously, and your feedback will be important as we try to improve the class. If there are things you like that we should keep for next semester, or things you think we should change, please let us know. If you have no opinion tell us that as well!

Grading

by Mike Gleicher on December 12, 2015

We realize that we haven’t been giving people lots of timely feedback this semester. We apologize. We’ve tried to make this up with leniency (accepting late assignments, and being understanding that you might not realize that things aren’t the way the should be).

Here is what is going to happen with grading – note that this is in the spirit of what we said at the beginning of the semester, but with the details a bit more filled in.

The basic thing is that we’ll do grading holistically – we’ll look at the whole picture, and try to figure out what is going on. Each student is different.

  1. We are going to grade each of the “Programming Projects” on a letter grade (A-F) scale. The programming projects put together multiple assignments (there are 4: 3&4, 6-10, 11&13, 14). The grading scale is what we said in the syllabus – B’s for getting most of the basic stuff, better grades beyond that. These grades will be determined without regard for how late things are (although, extremely late programs are not accepted – don’t bother turning in P4 or P10 now).
  2. For the exams, we will look at your scores in light of everything else. If you did well on all the programs, but messed up on one exam, you were probably having a bad day and we can over look it. If you did badly on all of the programs, but did well on both exams, then maybe we should give you some consideration. In general, we really will consider each case seperately – in most cases, the exam scores are close to what everything else tells us, and the exam tells us what way to round the grades. But if your exam scores are very different from your other grades, we’ll look closely. In general, don’t expect your exam to change your grade by more than a half letter grade (e.g. B->AB), unless you totally ace both exams.
  3. For the other aspects (P1, P2, P5, quizzes, on-time performance on programs) – we’ll use this as a modifier to the Programming Projects grade. If you did well on projects but poorly on quizzes and exams, you probably figured out what was going on. If you did poorly on a few programs and did well at keeping up with class, we should probably give you the benefit of doubt. If you did badly on programs and weren’t keeping up with class aspects, well…

Sorry that this is fuzzy – but it’s actually harder to come up with hard rules than it is to just try to treat individual cases fairly. In most cases, people’s performance is somewhat consistent.

What this does mean is that you can expect to start seeing grades for your programming projects soon. So far, we’ve mainly been checking off “did you do something” – now we’ll more carefully check things. We’ll have a rubric that will check each of the key components of the project (including turning in the intermediate assignments). From these, we’ll assign a letter grade.

So, for example, your P3&4 grade (that will be delivered to you by email) will check if you had lighting, the painters algorithm, perspective, …

We expect to get you your P3&4 grade (and probably your P6-10 grade) by the last class (or at least the day of). We will hopefully get you P11&P13 grades shortly after that. The P14 grades will be made available to you before the exam (since we want to be lenient and accept late assignments).

Some Program 14 hints …

by Mike Gleicher on December 10, 2015

Since I ran out of time in class (and you might want to do this before Tuesdays class)…

A good discrete Blur Kernel

A good discrete “blur” kernel (or family of blur kernels of various sizes) can be made by repeated convolutions of the “unit box”.

In 1D, if you start with the smallest (unit box) “box”: [1/2 1/2] (it’s called a box because when you graph it, it looks like a box)

And then convolve it with the unit box (in this case, itself), you get a filter of length 3 [1/4 1/2 1/4]. Or you could write it as 1/4 [1 2 1].

If you convolve this one with the unit box, you get 1/6 [1 3 3 1]

If you convolve this with the unit box, you get 1/16 [1 4 6 4 1]

And you can see how you can keep making bigger and bigger blur kernels by repeatedly doing this.

For 2D…

There is a kernel that is formed by doing those 1D kernels above in each direction separately. So, for example, you can apply the 1D kernel 1/4 [1 2 1] to each row. Then apply it to all the columns.

Or, you can make a kernel using the same process (convolutions of the unit box) which leads to:

1 2 1
2 4 2
1 2 1

(this needs to be scaled by 1/16th – since we want it to add up to 1). Turns out this is exactly the same as using the 2 1D kernels separately in each direction. It turns out that not all 2D convolutions can be done as 2 1D convolutions – but this one can (as can most blur kernels). It can be much more efficient to do 2 1D kernels than a 2D kernel.

Choosing Kernels for Down Sampling

When you downsample (say reduce an image by a factor of 2) you need to use a blur to get rid of the high frequencies. There’s a cool piece of math (thanks to the Nyquist theorem) that tells us exactly the right filter to use. Unfortunately, we aren’t going to teach you that math. Instead use some other bluring kernel that approximates it.

For downsampling by 2, a 3×3 blur kernel is almost good enough (a 5×5 will be a little better). If you try to use unweighted averaging (all a constant value) you will get more aliasing (and actually more excess blurring at the same time) than if you use the blur kernels described above. It turns out that the 1/4 [1 2 1] kernel (or it’s 2D equivalent that is shown in the tic-tac-toe board above) is a pretty decent approximation for the “right” kernel for 2D downsampling. Certainly good enough for this assignment.

If you want to downsample by an amount other than 2, you’ll need a “bigger” blur kernel. A rough rule of thumb (for using those simple kernels above) is that the kernels should overlap when placed at adjacent samples. When there’s 1 space between each sample, pick a kernel with at least 1 non-zero of each side of the center, and maybe 2. So, if I am going to take every third sample, a kernel of size 5 (1 4 6 4 1 above) is just barely big enough. Using X for samples I am going to evaluate (and O for samples I’ll skip):

   O O X O O X O O X O O X O O X ...
   1 4 6 4 1
         1 4 6 4 1

Notice how when I sample at the target locations (no use computing the convolution at places I am not sampling) the kernels overlap completely – nothing gets missed. Making the kernel a little bigger (so that sampling at one X picks up the neighbors) is a little but too much blurring – but will lead to less aliasing.

Interpolating for Upsampling

When you want to upsample (have more samples than you had originally), you can do interpolation (but that is actually a form of filtering – as we explained in class). Given that we don’t really have enough of a chance to see why filtering is a better way to think about it (it will let us do things better than linear interpolation) – linear interpolation is just fine for the assignment. In fact, if you do nearest neighbor (pixel replication) it’s probably good enough to get full credit for the assignment.

Course Evals Online

by Mike Gleicher on December 10, 2015

This class will do course evals online. Please do an evaluation for this class. Even if you don’t come to lecture regularly (it’s a chance to tell us why). There is supposed to be an opportunity to comment on both professors (I can’t see the actual form)

http://aefis.wisc.edu

If you go there, you can do online evals for all your classes using this system.

I really do read all the feedback, and try to adapt the class based on it. Many of the changes we’ve made in this class are based on feedback we’ve gotten through evals. (for example, having more, smaller assignments).

If you prefer to give feedback non-anonymously, I welcome it as well (send me email, catch me after class, …). However, please do the online survey as well.

Also: the use of online evaluations in our department is an experiment. If you have feedback on that, please let me know (since I am involved in getting the department to switch over).

Programming Assignment 14: Image Processing

by Mike Gleicher on December 6, 2015

The goal of this assignment is to give you some experience processing images yourself.

We’ll provide you with code that will load an image into the web browser, and call your functions to change the image when a button is pressed, and show the results. You don’t have to use our framework code, but it will make things easier.

You need to write functions that take images as input and provide images as output. You need to do a few simple image operations. But you can do fancier ones too. You must describe what your functions do (in canvas for the handin), and each must work with a button (so you press the button and something happens). Some examples as part of the framework code.

Due: Normally the assignment is due on Thursday, but since we didn’t get to discuss image processing in class, you get a “free” extension – we won’t count your assignment as late providing it is turned on or before the last day of class (December 15th). Note: if you assignment is not turned on or before December 20th, it may not be graded.

Note: this assignment will make a lot more sense after the lecture on Thursday, December 10th, when we’ll talk about the practical issues in doing these things.

Handin: You should use the regular course handin (P14 directories). You must also turn things in via Canvas – a link to your directory, and a description of what your functions do. The Canvas page is here.

Grading: This assignment will be given a letter grade. You will get an F if you don’t turn anything in. Getting the minimum functions working correctly will earn a B. Doing more than the minimum will earn a higher grade.

What functions to implement:

This is your choice. However, at a minimum, you must implement 1 from each category.

  1. Point process (change the color of each pixel independently). Simple examples: dimming is provided as a sample, but you can do de-saturate, or shift to a different color, or convert to grayscale (remember to weight the channels differently), … More complicated examples include histogram equalization, or turning everything to grayscale except for a particular color (like this or this – although these do it in a more sophisticated way).
  2. Convolution (run a simple convolution over an image). Simple example: a small blur, or edge enhancement. Note: be careful about the edges!
  3. Downsample (make an image smaller). Simplest is to just use nearest neighbor to reduce an image by 1/2. A better solution would use better sampling: make sure that a black and white checkerboard turns gray (if the checks are small) or stays a checkerboard (if the checks are big enough). Reducing by factors other than 2 is a good way to make things harder.
  4. Upsample (make an image bigger). Simplest is just to double the size by doubling each pixel (really doubling twice, since you need to do it in both directions). Better implementations would do some kind of interpolation, and allow for variable size scaling.

Number 1 is mainly a warm up to make sure that you understand how to use the framework code and access images.

We will try your upsample/downsample on checkerboards of various sizes.

The framework code:

The framework code provides a simple setup. An HTML page that allows you to open an image on your disk – it will appear. You can write functions that take an image (in a browser standard format – basically an array of pixels with size information) and return a resulting image – if you put them on a list, the framework code will make the buttons for you.

There are 3 files in the framework: index.html (you can guess), image.js (the framework), and image_examples.js (a file like the one you should write – it provides 3 examples of image processing functions). You can do save as, but if you want a ZIP file it’s here.

Make sure you have some small images to test things with. Here’s a 50% gray square and a checkerboard.

Note: doing these kinds of image processing operations in JavaScript can be very slow (since JavaScript converts everything to float and then back to unsigned bytes). We don’t expect your solutions to be fast: we’ll test them on small images.

The week in 559: Week 15 (Dec 7-11)

by Mike Gleicher on December 4, 2015

We’re getting to the end… so much graphics, so little time.

Last week, you learned about ray tracing. If you haven’t done the reading, now is a time to catch up on it. There is also a quiz, and you have until when classes end to complete it.

This week, we’ll learn about image-based graphics. It’s a big topic, so we’ll only get to talk about some of the foundations – with a focus on some practical stuff you will want to know for the upcoming programming assignment.

Reading assignment: Reading 14 – it’s OK if you “read behind” the lectures – the lectures will (hopefully) give you a practical perspective, and the readings will fill in some of the theory. A quiz will be announced after the lectures – but it’s mainly to help you prepare for the exam.

Programming assignment: Program 14 will be assigned after Tuesday’s lecture. That doesn’t give you much time to do it before Thursday – but that’s OK since we’ll accept it until the last day of classes (12/16) without penalty.

Reading 14: Image Processing (the last one!)

by Mike Gleicher on December 2, 2015

For our last reading, we’ll read about image processing. This is the topic of the last 3 lectures (Dec 8, 10 and 15) and the last programming assignment.

We’ve finally gotten the lesson and will de-couple readings from the weekly quiz/assignments. There will be a quiz on Ray Tracing for 12/8 (details coming in a separate post), and a quiz on image processing for 12/14. These quizzes are meant to help you make sure you’re ready for the final exam.

This reading is due before class on 12/8. The readings are designed to complement the lectures – it’s good if you look at it before lecture, but you will also want to review it afterwards. There’s a lot to read, but it’s to be read over 2 weeks.

The readings:

  1. Chapter 9 (Signal Processing) from Foundations of Computer Graphics.
  2. Chapter 3 (parts listed below) of Rick Szeliski’s Book “Computer Vision.” Even though this is a published book, he makes it available online –with the request that if you want the book, you should download the whole thing. So, you need to download the whole book even though we’re only looking at chapter 3. And not even all of that. But the rest of the book is really good (Chapters 2 and 10 are relevant to the class), so you might want to look through it.

The parts of Szeliski to read:

  • 3.1 and 3.2 are required. Expect to have to things from this on the programming assignment
  • 3.3.1 is recommended for the programming assignment.
  • The rest of 3.3 is optional – but these are some of my favorite algorithms, they just aren’t as relevant for class
  • 3.4 is a good introduction to the theory – it’s optional (you can get the theory from the FCG chapter – but seeing it presented again might be helpful).
  • 3.5.1 and 3.5.2 are strongly recommended for the programming assignment, the rest of the section is useful (it’s the formalization of mip-mapping), but not something we’ll get to for this class
  • 3.6 is optional – stuff I wish we had time to discuss more in class. If you want to know how texture mapping works, this is a great place to start.

Graphics Town (P10 and earlier) Hand-ins

by Mike Gleicher on December 1, 2015

We have started to grade P10 (and the graphics town project overall), but have run into some difficulties where people have not followed the instructions. Also many people have not turned in the assignment – so we wanted to warn you that this is your last chance.

You must turn in P10 on (or before) Friday December 4th.

The graphics town project will be graded this weekend (12/5) – so 12/4 is the hard deadline for P7, P8, P9 and P10. If you want to turn things in, now is your last chance. Late assignments are better than nothing.

In our initial examination of the assignments, we noted some problems. There is a (partial) list of things to fix below. If you turned in assignments without adding the comments on Canvas, please go back and add them (on or before 12/4). If you turned in the wrong files, please fix them.

Please note:

  1. You must turn in P9, even if you turn in P10. If you’ve turned in P10 already, you can turn in a P7, P8, or P9 that says “look at P10”. However, in your comments, you must still explain why your assignments meet the criteria (e.g. for P8 saying which texture you made yourself, and which texture wraps around). So, you must turn in a Canvas description for P8 and P9 even if you turned in a P10. (for P7, there was a problem with Canvas – but you still might want to have a posting there saying why your assignment meets the criteria).
  2. You need to turn in a P10. Even if it’s no better than your P9 (or P8 or P7).  But you need to actually put a project (with an html file) into your P10 directory.
  3. Don’t forget to turn in P9 on Canvas including the description of what advanced texturing you did. If we cannot figure out what you did, we can’t give you credit (and we can’t always guess). Be clear and honest (“I tried to get bump mapping to work, but it doesn’t look right” – is still worth more than just having a gray square that we puzzle over).
  4. Don’t forget to turn in P10 on Canvas, including a description of your project. Basically, if you don’t explain what we should see, we might not see it. You might describe your theme, where your textures came from, anything special we should notice, anything of particular technical merit (things you modeled yourself), what your “advanced texturing” examples are (how can we see them), where can we see good evidence of the world being effected by the time of day, any actions or behaviors
  5. For your assignments (especially for P10) – there should only be a single HTML file in your directory – otherwise we have to guess, and sometimes we guess wrong.
  6. If the features of your earlier assignments aren’t easily visible in your final (P10), make sure to note that in your commentary. For grading P10, we can look at your old assignments if you tell us. (tell us “I had working shadow maps in P9, but took them out for P10” – or “my P7 had specular lighting that worked with the sun direction, but in P10 all my objects are dull stone”).

In your writeup for P10 (handed in via canvas – comments are OK. if you prefer to have a readme file in your handin directory, you must have a link on canvas) you should consider addressing the following things (unless they are obvious):

559 Assignment Schedule

by Mike Gleicher on December 1, 2015

We have been pretty lenient with allowing late assignments for class. However, as we get towards the end of the semester, we need to set some deadlines.

Any assignment turned in more than a week late will be noted as “very late” – however, it is better to do things “very late” than not at all.

For the quizzes (assignments), you must complete them by Thursday, December 17th. (the first day of exams) for them to be counted.

For the programming assignments:

  1. For assignments 1-5, these are already marked. In the event something went wrong and your grade was not recorded correctly (we sent people messages if we didn’t have assignments from them). You should be able to check in canvas to see that the assignments have been graded. If something is wrong, check with Jyoti.
  2. For the graphics town assignments: We will start grading this weekend. If you do not turn in P10 (and the prior assignments) by Friday 12/4 (e.g. have it in place before Saturday morning), it will not be graded. A coming posting will detail some things to check about to make sure grades happen smoothly.
  3. The train assignment is Due Thursday, December 3rd. Late assignments will be accepted until the last day of class. However, if you turn things in very late you will not only be penalized, but will lose out on the opportunity to have us ask you questions if things go wrong.
  4. There will be one last programming assignment – it will be “due” on Thursday December 10th (since assignments are always due on Thursdays), but there will be a grace period (no cost extension) until the last of of classes (Tuesday, December 15th). You will have a week beyond that to turn in late assignments.
  5. No late assignments can be accepted after the exam.

Extra Office Hours and Train Help

by Mike Gleicher on December 1, 2015

Neither of the Professors will have office hours on Wednesday, December 2 at 11am.

Prof. Gleicher will have an office “hour” at 5:15-6:00 on Wednesday, December 2. (I will need to leave at 6pm, so don’t come right at the end).

Prof. Sifakis will hold a help session before class on Thursday, December 3 at 10:15 (in 1120 BioChem where class is held). Bring questions.