Lab 1: Exposure/Noise Lab

Goals

By the end of the lab, students should be able to:

  1. Use manual controls on a camera.
  2. Be able to explain what shutter speed, aperture, and ISO are in a jargon-free way.
  3. Understand how these relate to image exposure and noise, and predict the effects of shutter speed, aperture, and ISO on exposure and noise.

Introduction

Welcome to the first lab of the semester! Before anything else—this is a partner lab. So make sure to form groups of two before starting.

Today, you will be exploring some of the basic parameters of a camera. These are options you will find in almost every camera, smartphones included. You'll learn how to use shutter speed (SS), ISO sensitivity, aperture (F), and understand some of the effects we commonly see in photography

Fig. Photos taken by the TAs in the days before COVID-19.

Fig. Better photos, taken by more professional people.


Camera Instructions

This lab can be completed with almost any camera that allows manual controls. If you are using a smartphone camera, we are using Adobe Lightroom CC's camera application.

Installing Adobe Lightroom CC

Download Adobe Lightroom CC from the Apple AppStore or Google's Play Store depending on your device. Open the app and select the Sign In button. Everyone at Brown gets free access to the entire Adobe Creative Cloud suite through an enterprise account. To log in, enter your brown email in the email and you will be redirected to log in using Canvas. Once logged in, click the camera button at the bottom right of the screen. This should take you to the camera screen.

Using Adobe Lightroom CC

Pro mode: For this lab, we will be working in professional or Pro mode. You can change the mode you're in by clicking on the text to the left of the camera button. Pro mode allows you to manually control parameters like shutter speed, ISO, and exposure—the three left most settings above the camera button. In this lab, we will be using both the shutter speed and ISO. You need to manually select both shutter speed and ISO: if you only set one, then Lightroom may automatically change the other to compensate (so-called shutter priority or ISO priority).

JPEG vs. DNG: For now, we will work in JPEG mode rather than what is called DNG or digital negative mode (we'll look at these in Lab II). If the application is not in JPEG mode, please switch Adobe Lightroom CC to use JPEG by tapping the DNG button near the top center:

NOTE: Smartphones typically have fixed apertures, and so you will not be able to change the aperture size on your smartphone. Please check with the course staff about the possibility of borrowing a camera with variable aperture from the equipment pool, such as the Canon T7i.


Canon T7i

The Canon T7i is a DSLR, which stands for digital single-lens reflex. Below are the three interfaces you'll be interacting with in order to manually set the ISO, shutter speed, and the aperture size:

Fig.You will use the circled buttons on the left and middle photos to change parameters of the Camera. These changes will be reflected on the screen in the right most photo.

Manual Mode

The first step is to set the camera in manual mode. Rotate the dial on the top of the camera until the M label lines up with the indicator line.

Changing Shutter Speed

After setting the camera to manual, you can change the shutter speed using the dial circled in red in the left photo. The changing shutter speed is displayed in the top row on the screen in the right photo.

Changing Aperture

To change the aperture, you will need to hold down the button circled in blue in the middle photo while using the dial circled in red in the left photo. The button switches the dial from changing shutter speed to changing aperture. Like before, the effects are reflected in the middle row of the screen in the right photo.

Changing ISO

To change the ISO, press the ISO button circled in blue in the left photo. This will allow you to change the ISO settings with the dial circled in red.

Tips:

Exploring Shutter Speed

What is the Camera Shutter? (Jargon Alert!)

The camera's shutter is a curtain in front of the camera sensor that stays closed until the camera fires. When this happens the shutter opens and fully exposes the camera sensor to the light that has passed through your lens. After the sensor is done collecting the light, the shutter closes immediately, stopping the light from hitting the sensor. The button that fires the camera is also called the “shutter” or “shutter button” because it triggers the shutter to open and close.

What is Shutter Speed

Shutter speed is the length of time your camera shutter is open, exposing light onto the camera sensor. Essentially, it’s how long your camera spends taking a photo. Shutter speed is typically measured in fractions of a second. For example, a shutter speed of 1/4 means a quarter of a second while 1/500 means one five-hundredth of a second (2 milliseconds).

When talking about shutter speed, we use the words "faster" and "slower" to avoid confusion. Faster shutter speeds have larger numbers in the denominator: 1/500 is faster than 1/4.

Your Task: Explore!

Your task now is to explore the effects of changing shutter speeds. We've set up two experiments for you to attempt.

Experiment 1

Your first experiment will be to test the effects of changing shutter speed on moving objects, independently of the aperture or ISO. Your task is to take photos at varying shutterspeeds as you perform different actions. For example, take a photo of your hand at 1/400 shutterspeed and another photo at 1/10 shutterspeed. You might try to stabilize the camera as much as possible for this process. Or, move with the camera as the photo is taken, e.g., rotation or forwards/backwards.

Talk with your partner about different ideas to try.

Once you're done, talk with your partner about the answers to the following questions:

You won't be asked to submit any of these photos, so they don't have to be perfect. This experiment is for you to better understand the effects of shutter speed.

Experiment 2

The next set of photos were all shot within ~1 minutes. Can you try to recreate the differences you see using only shutterspeed? Save the shutter speed of the photos you take (5 should be enough), write them down on a paper, and remember what shutter speed corresponds to what photo you took!

Fig. We took these photos at F5.6, ISO 400 at varying shutter speeds (decreasing in row order from top left).

After you've recreated the photos, let's explore the relationship between shutter speed and light. Your job is to:

  1. Upload your photos onto your computer.
  2. Write some code to find the average brightness of each photo.
  3. Plot the average brightness vs. shutterspeed.
  4. Does this conform to your expectation? Why or why not?

Exploring ISO

What is ISO? (More Jargon!)

The term ISO for cameras was carried over from film, where it was used to determine the sensitivity of film to light. In the past, the ISO of a film was determined chemically and could not be changed. When you change the ISO on a digital camera, the effect is a bit like changing the sensitivity of your sensor, similar to how film can be more or less sensitive. However, in reality, digital sensors can only have one sensitivity, and changing ISO is actually changing the amplification that occurs to the collected analogue charge signal after the sensor has been exposed to the incoming light but before quantization to digital numeric values occurs.

Every camera has a different range of ISO values. A typical set could be ISO 100, ISO 200, ..., ISO 6400, where values double as they increase (powers of two!). ISO values correspond to light sensitivity, with lower values being less sensitive, meaning ISO 400 is twice as sensitive (and "as bright") as ISO 200 which is twice as sensitive as ISO 100.

Your Task: Exploring ISO

While ISO values help control the brightness in a photo, they also leave other effects. Taking this into account, try using your knowledge of shutterspeed to balance the light effects of ISO and take the same photos with drastically different ISO. You should get a result similar to the ones below.

Fig. One photo was taken using an ISO100 and a slow shutter, and the other ISO6400 and a fast shutter.

If we look carefully, we can see the drawback of higher ISO: increased noise as 'grain' in the image (zooming might help). An extreme example is shown below:

Experiment 3: Reducing Noise

In this next task, we will be looking at two ways to remove noise from images: Blur & Median Filters. We've provided some photos with artifically added noise to test on—you can also take your own photos!

If you've ever come across a blurry image, you already have an inituitve understanding of what blur is. A blur filter takes an weighted average of a set number of pixels surrounding a central pixel to calculate the new value of the central pixel. There are many blur filters that change based on the which pixels and weights are used. For this exercise, we are going to use a Gaussian filter---you can find an implementation in Python package SciPy.


from scipy import ndimage 

...
	output = ndimage.gaussian_filter(image, sigma=[3, 3, 0])
...
		

Your job is to:

  1. Upload the photos onto your computer
  2. Write some code to apply a Gaussian filter to the noisy photo.
  3. Visualize the difference in noise between the original and new photo

One of the drawbacks of using a blur filter is well—the blur. Edges are not perserved when applying a blur filter to remove noise. As you can image, this may be a problem if your image contains a lot of details you want to keep. This is where the Median Filter comes in. The median filter is similar to the blur filter because it gets its central pixel value from the surrounding pixels. However, rather than taking a weighted average of the surrounding pixel values, it sets the central pixel to be the median pixel value. The median filter is also implemented in SciPy:


from scipy import ndimage 

...
	output = ndimage.median_filter(image, size=[3, 3, 1])
...
		

Your job is to:

  1. Upload the photos onto your computer
  2. Write some code to apply a Median Filter to the noisy photo
  3. Visualize the difference in noise between the original and new photo—how does it vary from the Gaussian filter?

Exploring Aperture

What is Aperture? (Still More Jargon!)

A camera's aperture is "the opening in a lens through which light passes to enter the camera." You can shrink or enlarge the aperture to allow for more or less light to reach your camera sensors. Apertures are measured in "f-numbers" or "f-stops" as ratios to the focal length. These are expressed as the letter "f" followed by a number: f/4.0. Some camera's omit the slash: f4.

The small numbers correspond to large apertures and large numbers correspond to small apertures. For example, f/4.0 actually has a larger opening that f/8.0. This may be confusing as first, but the one way to think about it is to think about it as a fraction like shutterspeed. Here, 1/4 is larger than 1/8 so f/4.0 should be larger than f/8.0.

The f-stops are also arranged such that

Depth of Focus

One important aspect of photography to understand when working with aperture is depth of field. Depth of field is the amount of your photograph that appears sharp from front to back. Some images have a “thin” or “shallow” depth of field, where the background is completely out of focus (think portrait mode). Other images have a “large” or “deep” depth of field, where both the foreground and background are sharp.

Your Task: Explore Further!

Your job now is to discover effects of aperture on photos. Now that you have a better understanding of both ISO and shutter speed, you can use and change them as you wish! You'll be able to use them to correct for changes in aperture during this section of the lab.

Experiment 4

Set up some objects at different distances from the camera, similar to our photographs of the whiteboard markers below. Your challenge is to focus the lens on different objects in the scene while also framing all objects in the same photo. Once again, your photos will not be collected, but you will use them to dive deeper into aperture through some processing in Python.

For the next sections, it'll be helpful to make use of the light meter on your camera. The light meter is a histogram of intensity values: it lets us know if the result in a photo will be properly exposed – that is, a photo that is neither too light or too dark. A "perfectly" exposed photo should fall directly in the center of the lightmeter.

Take careful note to make sure that the exposure level on your camera is the same for all the photos with changing apertures in these photos. You can use your new found powers in shutter speed and ISO to help offset the differences in aperture!

Tips for this photo taking

Your job next is to:

  1. Take photos at various apertures while trying to maintain the same exposure (try to use the intensity histogram `light meter' here)
  2. Upload the photos onto your computer
  3. Subtract two photos with different depth of fields to discover the size of the differences between them.
  4. Estimate for yourself the size of the blur-created differences across aperature settings at different depths.

Your results should appear similar to something like this below:


Hand-in

Please add your final code and any generated images to a PDF, and submit it to Gradescope! There's a temp .tex document here—for the labs, there's no need to provide a detailed write-up.

Your Next Mission

Empowered by your newfound photography skills, go and explore the world through the lens of a camera. Take 3–5 photos using the skills you've learned in this lab—changing the ISO, aperture, shutter speed on your camera. Photos should:

Go out and capture unconventional and interesting photos that you have never captured before!

Please submit your interesting pictures as part of the Project 1 questions; Q4.