Removing Lens Flare, or Sunrise over Half Dome

Sunrise over Half Dome. Yosemite National Park

I have a useful app on both my laptop and phone, The Photographer’s Ephemeris (aka TPE). An ephemeris gives the positions of astronomical objects in the sky at a given time or times. With TPE you can input a location and, for example, the time of sunrise will be displayed along with a map showing where on the horizon the sun will rise. Playing around with this app one evening in my hotel room just outside Yosemite National Park, I discovered that if I positioned myself at Glacier Point, the sun would rise directly over Half Dome. That was a sight worth getting up at 3:30 AM to see!

Screen shot of the Photographer's Ephemeris for June13, 2014. The red dot is Glacier point. The yellow line shows sunrise will be directly over Half Dome.
Screen shot of the Photographer’s Ephemeris for June 13, 2014. The red dot is Glacier point. The yellow line shows sunrise at 5:36 AM will be directly over Half Dome.

I set up my camera on a tripod in the beautiful pre-dawn light. To make the shot more interesting, I closed the lens to f/32 in order to generate multiple diffraction rays from the sun. Here is the resulting shot:

Sunrise over Half Dome
Sunrise over Half Dome

This shot turned out pretty much as I had envisioned it. Bright starburst over Half dome with rays of light illuminating the mountains and valleys, fading into the distance.

There was one flaw – severe lens flare. Now some may enjoy this effect, but for me, it detracted from an otherwise romantic scene. But I’m shooting directly into the sun. What can be done?

Then I noticed another image I had captured:

Sunrise over Half Dome, with the sun positioned on the right-hand side
Sunrise over Half Dome, with the sun positioned on the right-hand side

When the sun was positioned on the left side of the frame, the flare extended to the right. When the sun was positioned to the right side of the frame, the flare extended to the left. Could I overlay the images in a way that the flare in the first image would be obscured by the second image and vice versa?

I started by combining the two images into a panorama using Photoshop. Photoshop created two layers which looked like this:

Layers (left) and layer masks (right) created by the Photoshop
Layers (left) and layer masks (right) created by the Photoshop “Photomerge” command

In this image the gray area represents areas of transparency. The black area on the right is the area of the imaged that is masked out. Since the only part of the top layer that shows does not include the area with the flare extending to the right, that flare has been taken care of. Now to get rid of the flare extending to the left, all that needs to be done is to unmask that area of the top layer that corresponds to the area with the flare in the bottom layer. This is done by clicking on the mask of the top layer and painting with a white brush. The resulting layers look like this:

Photoshop layers after the mask was edited
Photoshop layers after the mask was edited

A little more editing to darken the sky and lighten Half Dome and we achieve the final image:

Sunrise over Half Dome. Yosemite National Park
Sunrise over Half Dome. Yosemite National Park

So, in general, one way to eliminate lens flare is to

  1. take one photo with the sun toward the right side of the frame, one with the sun toward the left side, making sure the area of interest overlaps in the two images
  2. Create a panorama from the two shots
  3. Edit the resulting masks to allow the un-flared area of one layer to cover up the flared area in the other.
Advertisements

What are your thoughts?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s