CS178 Assignment 3 - Macro

Bugs make great macro photography subjects. Photo by Elena Adams.


Compared to the majority of the animal kingdom, humans have excellent vision. Modern photographic lenses and sensors are better still. In particular, a nice lens will have a larger aperture than the pupil in your eye, making it easier to isolate the subject and blur out everything else. Furthermore, lenses are available with much longer focal lengths than the human eye, allowing us to magnify a subject (like the lady beetle above) beyond our natural ability to see it. It's a real pleasure to take a photograph that lets us see that which we normally could not.

With this in mind, this week you'll be turning your gaze downward, at flowers and bugs and small interesting things you would normally ignore. A short depth of field is important for macro photography, so part one of the assignment is a small experiment to exercise your understanding of depth of field. The remainder of the assignment requires you, as always, to go forth and photograph.


There are two parts to the assignment this week. Part one requires you to perform an experiment in which you'll take three photographs, and part two requires you to meet five requirements with artistic photos, similarly to previous assignments. The photos in part one are strictly for scientific purposes, and you may not use them to meet the requirements in part two. As always, see the example solution for guidance.

Part One

Recall the depth of field formula is 2CNU2/f2, where U is the distance to the subject, f is the focal length of the lens, C is the size of the circle of confusion, which represents the largest acceptable blur, and N is the aperture setting. Don't worry if you're not sure right now how to figure out what these terms are - the example solution will guide you through it. Let's verify this formula. Find a ruler, and rest it against the wall at exactly 45 degrees. Place your camera on the ground about two feet away from the wall. Here's what my setup looked like:

The first photo you should take is a photograph like the one above, showing us your setup. If you have some other camera available (eg a cell-phone camera), use that to take the picture. Otherwise, place something else in your scene to represent your camera, and use your camera.

Then, place your camera back on the ground, focus it at some mark on the ruler, open the aperture as wide as possible (ie somewhere around f/2 or f/3, not f/16), and take a photo. In your comments, you should use the depth of field formula to compute how much of the ruler should have been in focus. Remember to account for the fact it was at 45 degrees (see the example solution for how to do this). Your calculation should match what we see in the photo.

Next, close the aperture by a factor of two and take another picture. So if you were at f/3, go to f/6. We know from the formula that the depth of field should double. Does this work out like the formula would indicate? It should.

For this part of the assignment, you should match closely the example solution. Write the same amount of comments - we want to see all your work.

Part Two

You should take from four to eight photographs for this part of the assignment. Feel free to hit multiple requirements using a single photo. For each photograph, the subject should be something small and close to the camera. Fun things to photograph include bugs, flowers, small pieces of trash, electronics, mundane household objects that you wouldn't normally look at closely, parts of the body (please don't take any photographs your TA is not going to want to grade), toys, leaves, water droplets, gemstones, and food. Pay attention both to the subject that is in focus, and also to the quality of the out-of-focus regions.

  1. Requirement 1: Focus on the foreground At least one of your photographs should be be focused on the closest thing in the field of view to the camera, and should contain out-of-focus elements behind it.
  2. Requirement 2: Focus on the midground At least one of your photographs should have out-of-focus elements in front of and behind the subject you are focused on.
  3. Requirement 3: Bugs At least one of your photographs should be of a bug.
  4. Requirement 4: Plants At least one of your photographs should be of part of a plant - a flower, leaf, spine, some bark, a piece of fruit, etc.
  5. Requirement 5: Man-made objects At least one of your photographs should be of a man-made object, like a toy, or some circuitry.

Upload your photos and add comments.

Upload your photos using the Picasa account you created in the first week to a public Picasa album titled "CS178 Assignment 3 - Macro". For part one, you should show all your working in the comments. For part two, add comments below each photo explaining how to you took the photo, what relevant camera settings you used and why, any image processing done to the photograph afterwards, and most importantly, which requirement the photo covers.

Example Solution

We've put up an example solution to this assignment to both let you know what we expect, and hopefully also inspire you to take better photos than the TAs can. For part two, you don't have to meet the assignment requirements in the same way as we did - surprise us!

One caveat: In our example solutions we may reuse photos we already had lying around, or borrow photos from other people to illustrate a point. Don't do this - your work for each assignment should be done by you specifically for the course.

If you have questions or comments about the photos we used in the example solution, feel free to add them as comments below the corresponding photograph in Picasa Web, or to email us.


For part one, we will grade you check or check minus depending on how successfully you performed the experiment.

For part two, as usual, we will assign grades based on whether you met the requirements of the assignment. For each requirement, you'll be given a check for meeting the requirement, check-minus for not quite meeting the requirement, or check-plus if you do something spectacular that makes your grader's jaw drop.

Due Date

11:59PM, Sunday, April 19, 2009

Assignments are generally due on Sunday at midnight at the end of the week in which they're assigned. This leaves you free to start thinking about the next assignment during your next section. Sometimes lateness is unavoidable. Here's the lateness policy from the course outline:

Since the assignments come in rapid succession, it is important that each be completed on time. Replacing photos after the deadline is not allowed, and will be treated as a violation of the honor code. To allow for unforeseeable circumstances, you will be allowed up to two weekdays of grace for up to two of your assignments. Beyond this, late assignments will be penalized by 10% of the grade for that assignment per weekday that they are late. Exceptions to this late policy will be made only in the case of a necessary (non-pleasure) trip approved in advance by the TA for your section, or severe illness. If you do not submit one of the assignments at all, you will fail the course, even if you are taking it pass/fail. In this case, or if you believe you are in danger of failing, it is your responsibility to come talk to us before the end of the course. Incompletes are given only in exceptional circumstances.


© 2009 Marc Levoy and Andrew Adams