Lens flare is caused by external light sources that do not pass directly through the lens, but rather are reflected on internal components within the lens before passing to the camera sensor, producing haze over the final image, geometric circles and/or off-color streaking. Usually this happens when shooting directly into the sun or from having the sun or other light sources just out of frame. The more elements that are present inside the lens, the more exaggerated the effect will be, and it will be particularly problematic with longer zoom lenses for that reason. Polarizing filters may help to some degree, but in general, adding filters will likely compound the problem since you are essentially erecting another element for light to reflect on. Glass used in modern lenses are coated with anti-glare material that is designed to reduce lens flare but will not remove it completely. Sometimes lens flare can be desirable. Photoshop and Lightroom actions that add lens flare as well as cell phone apps that can add lens flare artificially are popular trends right now, ironic considering a camera on a phone will be less likely to produce lens flare than a camera with an interchangeable lens.

Sometimes, it can just be distracting and obscure the elements in a scene that you really want to show with a better level of clarity. Here are some ways I deal with lens flare.
1.) Lens hood
This first line of defense starts in the field before and during shooting and it begins with using a lens hood. I’ve not found any good reasons to ever remove my lens hood, except to add filters or adjust them. Not only does the hood help prevent stray light sources from creeping into the sides of your shot, but it serves as a physical barrier of protection for the glass itself. It can also help prevent rain from reaching the lens, and if you’re shooting in humid conditions or drastic temperature changes, it may slow down condensation on the glass allowing you to shoot longer (I don’t know if this is true in practice, but I feel like it helps!).
2.) Physically block the source of light in front of the lens
A lens hood can only guard so much against lens flare, if the light source is in frame, shooting into the sun, for example, a hood will do nothing. This next option requires a little blending in Photoshop. You only need to know the basics of layers and masking but if the lighting is complex, it may require some advanced blending techniques that are too broad to cover in this post, but this little bit of knowledge can help get you started.
You’ll need to take at least two shots in the field. One with the light source covered (you can just use your hand or lens cap for this, if shooting a landscape, try not to cover up any part of the landscape itself) and a second shot taken normally. What I normally do is take a few bracketed exposures, adjusting only the shutter speed with the light source covered and uncovered; one metered for the sky, another for the landscape and the second in between the two (for example; -1, 0, -1EV). This will ensure that you have enough source material to blend everything smoothly later. Here is an example of how I blended an image in Photoshop using 3 shots.





To blend these 3 exposures, I ordered them in the order shown here and added a white layer mask to the first image and with a soft, black brush at 100% opacity painting over the areas that I did not want to keep – this is everything but the foreground rock. In the layer beneath that, the second image shown here, I did the same thing; added a layer mask and painted black over the sections that I didn’t want to show in the final image – this is just the sky, as I wanted to keep the mid-ground and the sunburst. Beneath that layer, is the correctly exposed sky, which will now show through due to the previous layer masks. Just a few curves and saturation adjustments were added and I’ve reached the final image shown below…

3.) Nature as a barrier
Sometimes you can find things in the environment to diffuse the sun’s light. Trees are often used for this purpose. Alternatively, sometimes its best to wait for the sun to be obscured by clouds or until it reaches the very edge of the horizon.


4.) Color Correction
If all else fails, the lens flare will have to be fixed in software. For small flares, you can simply use the spot healing tool in Lightroom or clone stamp in Photoshop. However, larger more intrusive flares will require some color correction. For awhile, I was doing this with an adjustment brush in Lightroom, changing the white balance to match the surrounding area of the flare, making local adjustments using Color Balance or Hue/Saturation in Photoshop, or using a 50% gray dodge and burn area and painting over the areas with color that matches the original subject. These methods work but are often difficult to match the colors precisely. I’ve recently found a much better method that simply paints in the color from a nearby area over the textures that already exist in the image. This quick video tutorial by Zack Ahern explains how to use this method. Here is a recent example how I’ve applied this method.


BONUS
I’ve found the above method works for other things like water spray on the lens as well! It may not be perfect at recovering everything, but as long as some detail shows through you can still clean up the image a bit.


High water at Big Run after a round of fresh spring rains just before it meets with the Blackwater River in West Virginia; the dark, golden colored water is a natural result of the tannins that leech into the water system from the vegetation in the area.