CS178 Assignment 3 - Macro

Bugs make great macro photography subjects. Photo by Jesse Levinson.

100% crop of above (meaning pixel-for-pixel from original image, without upsizing or downsizing).
Notice honeycomb eyes and extremely shallow DOF


Humans have excellent vision compared to the majority of the animal kingdom, yet modern photographic lenses and sensors are better still. 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. Also, 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.


This week you'll be turning your gaze downward at flowers, bugs and other small, interesting things you might normally ignore. As you will learn, depth of field plays a central role when your subject is this close to the lens. In part one of this assignment, you will conduct a small experiment that will help you to test and quantify the trade-offs involving depth of field at these close focusing distances. You will take three depth-of-field photographs and conduct a series of calculations to explain your results. The second part of the assignment requires you, as always, to go forth and take photographs that meet the five requirements spelled out below.

Note that the photos in part one are strictly for the depth of field experiment; you may not use them to meet the requirements in part two. As always, refer to the example solution if you need additional guidance.

Part One

Recall from lecture that the depth of field is approximated as 2CNU2/f2 where U is the distance to the subject, f is the focal length of the lens, N is the aperture F-number, and C is the size of the circle of confusion that represents the largest acceptable blur before we consider the object out of focus on the image plane. For the circle of confusion, use the pixel size of your camera. (In your comments, be sure to tell us what value you used for C.) If you're unsure how to choose the other terms for your camera and lens setup, you can refer to the example solutions which will guide you through the process. To verify this formula, you will rest a ruler against the wall at exactly 45 degrees. Place your camera on the ground about two feet away from the wall. Here's what our setup looked like:

First, take a photograph of your setup like the one above. If you have some other camera available (e.g. 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 to take the photo.

Next, place your camera on the ground, focus it at some mark on the ruler, open the aperture as wide as possible (to achieve a narrow depth of field), and take a photo. Use the depth of field formula to compute how much of the ruler should have been in focus, and include your calculation and results in the photo comments on Vela. Remember to account for the fact that the ruler is 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. (For example, if you were at f/3 set the aperture to f/6). Based on the formula, what is the new expected depth of field? Take a photo and confirm that the depth of field changes as you would expect. Be sure to include your calculated and measured results in the photo comments.

This part of the assignment should match the example solution. In particular, be sure to read the example photo comments. Your answers should follow a similar approach. Be detailed in your explanation - we want to see all your work.

Part Two

Take five to seven photographs for this part of the assignment. For each photograph, the subject should be something small and close to the camera. You may enjoy photographing 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 or classmates are not going to want to grade), toys, leaves, water droplets, gemstones, and food, among other things. 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 have a bug as its main subject. If you can't find a bug, other very small animals are just fine, too. Keep it really small, though (dogs and cats are way too big, but little lizards could work).
  4. Requirement 4: Plants. Take at least one photograph whose subject is part of a plant - e.g. a flower, leaf, spine, some bark, a piece of fruit.
  5. Requirement 5: Man-made objects. At least one of your photographs should feature a man-made object like a toy, some circuitry, jewelry, etc.

Upload your photos and add comments.

Upload your photos to your Google+ account in an album titled "CS178 Assignment 3 - Macro", and submit your assignment on Vela. For part one, you must show all your work in the comments. For part two, add comments below each photo explaining how 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

As usual, we've post an example solution to this assignment to let you know what we expect. Please remember that your comments must be included on Vela, and not just as comments in Picasa (despite the way it's done in the sample solution). For additional inspiration, you may want to peruse the best CS178 photographs (as selected by the TA's and instructor) from 2009, 2010, 2011, 2012, and 2013. However, you do not need to meet the assignment requirements in the same way as these solutions do - in fact, you should challenge yourself to come up with creative, unique compositions. There are plenty of possibilities out there. Surprise us!

Also, please remember that the photographs that you submit for each assignment must be taken by you specifically for this course. Do not reuse old photographs that you may have laying around, even if they perfectly meet one of the requirements!

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.

Peer Grading

For part one, you won't need to peer grade these photos.

For part two, follow the same rubric as Assignment 1 and Assignment 2.

Practice problems

Here's your third set of practice problems, related to Autofocus/Exposure Metering.

Note: answers have now been marked in bold.

  • Problem 1. True or False? An infinite depth of field can be obtained by tilting the lens of a view camera.

  • Problem 2. True or False? Contrast-based autofocus is generally faster than phase-based autofocus, because in the former case, analyzing a single image tells the camera where to move its lens to achieve focus.

  • Problem 3. True or False? In aperture priority (Av) mode, your camera picks the F-number for you based on your other settings.

  • Problem 4. Changes in pupil size account for 10:1 of the human dynamic range. If the maximum pupil diameter is 9mm, what is the minimum?
    • a) 2.85mm
    • b) 0.90mm
    • c) 1.80mm
    • d) 4.02mm
    • e) Not enough info

Due Date

Assignment Deadline: 11:59PM, Sunday, April 20, 2014
Late Deadline: 11:59PM, Tuesday, April 22, 2014
Review Deadline: 11:59PM, Sunday, April 27, 2014

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, so familiarize yourself with the lateness policy in the course outline.

© 2009-2014 Marc Levoy, Andrew Adams, and Jesse Levinson