Paul Timpa Photography Blog Photography Tutorials and Tips from Paul Timpa Photography

14Apr/09Off

HDR Tutorial — How to take HDR Photos

Sedona, Arizona

Sedona, Arizona

High Dynamic Range photography (HDR) is becoming increasingly popular, and for good reason. It opens up a whole new set of possibilities for photographic expression, and despite that it may “seem” complicated, it’s actually pretty straightforward. This guide will help you understand what HDR is, and how to create HDR photos.

First, let’s take a moment to understand some concepts. In photography, the phrase “Dynamic Range” just refers to the range of darkness to brightness in a scene. A scene with a high dynamic range has a large range of tones from dark to bright. It is very "contrasty". For example, a scene with a flower in the shade of an old barn, with the sun behind the barn would have a high dynamic range. The area in the shade might be fairly dark while the area behind the barn that is lit by the bright sun would be very bright.  The human eye is very good at “seeing” these types of scenes correctly. Your eye adjusts quickly to the darker shaded area so that you can see the flower and it adjusts when you look at the sunlit area so that you can see details there as well. On the other hand, cameras have more difficulty with these kinds of scenes. They cannot capture the entire range of darkness to brightness the way your eye sees it.

The picture below is a finished HDR picture that shows a scene with a high dynamic range.  This is the finished product.  Later on in this tutorial I'll show you how we created this final shot, and why it would not have been possible without HDR.

Sedona, Arizona

Sedona, Arizona

Generally, when you’re presented with these types of contrasty scenes and you try to make a photograph, you have to choose which area is more important, the shadows or the highlights, and take your picture with only one exposed correctly, while the other one is not exposed correctly. For example, in our example above with the barn and the flower, if you feel the shaded area with the flower is the most important part of the scene, you expose for the shaded area, and the sunlit area will be completely overexposed and “blown out” turning into a patch of pure white with no details. If you feel the sunlit area behind the barn is most important, you would expose for that area, but then the shadow area would be underexposed, resulting in a patch of pure black with no details. The classic example of a dynamic range “situation” is the silhouette. If a person is standing in front of you with their back to the sun and you look at them, you can see their face as well as the sunset. However if you take a picture with the sunset correctly exposed, the person’s face will be completely dark in silhouette. Another photographic example is indoor photos taken during the day, when there is a window in the photo (which is also a great time to use HDR). Without HDR, if you expose so that you can see the interior of the room, the window will be just a pure white patch -- you won't be able to see what's outside at all.

HDR photography seeks to fix this problem. The goal is to be able to photograph a scene and capture all of the range of tones from very dark to very bright in one photograph. Since we already know that a camera can only capture a small range of dark-to-bright in a single photograph, then how do we get around this problem? Simple: we use more than one photograph. We photograph the same scene multiple times, each time capturing a different range of dark-to-bright, and then combine all the photos on the computer into a single photo that has all the ranges of brightness together. It may sound complicated, but it’s not, especially when you can use special software to combine the photos.
 

Let’s talk a little about the procedure to create an HDR photo. There are really just two primary steps: (1) capturing the series of photos that have all the ranges of tones from dark to bright, and (2) combining them on the computer. We’ll take them one at a time. The first step is to capture a series of photos, all of the same scene, without the camera moving while you are shooting all the shots (for this reason, most HDR shots are taken on a tripod, although if the shutter speed is fast enough, it is possible to handhold an HDR shot, but that is much less common). Each picture will contain a different range of brightness levels. So how many photos do you need and how do you know what the exposures should be? There are varying opinions on both topics, but for the majority of scenes, three photos is enough to capture the whole dynamic range. The three photos capture the dark, medium, and light tones in the scene. Occasionally I’ll shoot a fourth, and very rarely I’ll shoot a fifth, but that’s in extreme circumstances. As for the exposures, you’ll want them spaced 2 stops (or EV) apart. For example, if the middle exposure is 1/100th a second, then the other two exposures will be 1/25th second (which is two stops brighter) and 1/400th second (which is two stops darker). So how do you determine what exposures to shoot? Everyone has their own method. Here’s mine: First I set the ISO to 100. The process of combining the three photos can sometimes introduce or magnify noise in an image, so I like to start with the cleanest images possible. Shooting ISO 100 helps produce clean images. If your camera has RAW mode, I also suggest using it (see my separate note on RAW vs JPEG for more information). RAW files contain a lot more information than JPEGs, which is really important in HDR photography. Once the ISO is set to 100, I set the camera to full-manual (M) mode and I set the aperture so that it’s appropriate for the scene. The next step is to determine the exposure that will properly expose the highlights (bright areas) without them being blown out. I estimate a shutter speed and take a shot to see how the exposure looks. If there are any areas that look blown out or too bright, I set the shutter speed to a little faster and try again. Keep in mind that when you look at the shot, most of the shot will be very dark or even completely black. What you’re trying to do here is determine the shutter speed where you don’t blow out the highlights, that’s all.  The picture below, which is part of the final image, is the picture I took being careful not to blow out the highlights.  Note how the rest of the image is extremely dark.  On its own, this photo is unusable.  On the other hand, it captures the sky and all the details in the clouds without blowing anything out.

Sedona, Arizona, HDR, -2 EV
Sedona, Arizona, HDR, -2 EV

Let’s say a shutter speed of 1/400th of a second is what’s needed so that I can see detail in the clouds.  We will keep this photo as the first in the series, because it correctly captures just the clouds.

So now that we’ve established that 1/400th is the exposure that accurately captures the highlights, it’s time to take the other photos. This is pretty straightforward. Just set the shutter speed for two stops brighter and take another shot. In this case, two stops brighter is 1/100th second. Set the shutter and take the shot. Here's the middle exposure:

Sedona, Arizona, HDR, Normal EV
Sedona, Arizona, HDR, Normal EV

Note how the main rock is now pretty close to a good exposure (though still a little dark) and the brightest parts of the grasses and fence are also at a good exposure.  Also note that now we've blown out the clouds -- they are very overexposed.  We also still do not have enough detail in the shadows and darker areas -- this photo is still not bright enough.  On its own, although this picture captures some of the grass and the rock at a good exposure, it is for the most part unusable due to the blown out clouds and dark shadows.

Now we need one final shot that’s two more stops brighter. Set the shutter speed to 1/25th second and take the shot.  Here's the exposure at two stops brighter:

Sedona, Arizona, HDR, +2 EV
Sedona, Arizona, HDR, +2 EV

Note how the sky is completely and utterly blown out, the rocks are fairly overexposed, but the shadows of the fence and the darker parts of the grasses are now correctly exposed.  Like the other two shots, on its own, this shot is unusable.  However, it correctly captures the darker areas of the scene.

In most circumstances, you’ll be done here. If you look at the third shot and there are still areas that look dark and underexposed, you can take a fourth shot that’s two stops brighter still (1/6th) and so on. Once you’ve captured a series of shots that contains all the ranges of brightness from dark to bright, you’re all set and ready to move on to the next phase, which is combining the shots on the computer. But first, let’s talk a little bit about auto-exposure-bracketing.

This next paragraph talks about auto-exposure-bracketing, which is completely optional and not “necessary” for HDR, but it will make your life a bit easier. If your camera has this feature, read on. Otherwise, feel free to skip this paragraph.  Auto-bracketing is something you may already be familiar with, if your camera has this feature (many newer cameras do). It was originally designed simply as a way to ensure you cover your bases when shooting in tricky lighting situations. If you’re not sure of the correct exposure for a scene, you can set your camera to auto-bracket the shot, which means it will take three shots for you. The first time you press the shutter, the camera will take a photo at the exposure you set. Then you press the shutter again, and it will take another shot, but this time it will be a little darker than the original shot. The third time you press the shutter, it will take a shot that is a little brighter than the original. You specify how much brighter / darker, in stops, when you set up the bracketing. For instance, you can set up auto-bracketing to take three shots, one at the target exposure, and then a shot that is one-stop brighter, and a shot that is one-stop darker. This way, if it turns out that you incorrectly calculated the target exposure, you may still have a correctly exposed photograph in one of the two bracketed shots. It’s basically an insurance policy for exposure mistakes! The best part is, you can set it so that the camera takes all three shots in a row automatically. On my cameras, when I use the remote control, if the camera is set to auto-exposure-bracket, it takes all three shots in a row automatically with one button press. So you press the remote control button one time, and voila, three shots at varying brightness levels. I’m sure you can guess where this is going. It’s absolutely perfect for HDR! Especially because the shots are taken so quickly in succession. Even if there are objects moving in the frame, the three shots are taken so quickly that it may be barely noticeable. Using our previous example, this is how I would set it up. To start, you’ll want to turn off the auto-bracketing so you can determine the target exposures. Experiment with various shutter speeds to determine the shutter speed that captures the highlights accurately, as we did before, and make a mental note of it. In our previous example, it was 1/400th second. Now set the shutter speed on your camera for two-stops brighter than that shutter speed you just noted. In our case, that would be 1/100th second. Now go ahead and turn on the auto-bracketing feature, set it for +/- two stops (meaning that the camera will take one shot at the target exposure, one shot that is two stops darker, and one shot that is two stops brighter), and take the shots. It will take the first shot at 1/100th, the next shot at 1/400th, and the final shot at 1/25th. Perfect! You’ve just completely taken the correct series of shots with a single button press! Notice how it’s the same exact exposures that you had set manually above during the first example, except it’s all automatic. Fantastic. If your camera has auto-bracketing, of course I suggest you use it. If not, no worries. You can always just set the exposures manually, and unless your camera can be set to take more than three shots in a bracket (most cannot), you would need to set the exposure manually anyway if you needed a fourth of fifth shot to complete the series. You can also use auto-bracketing if you want to try to handhold an HDR shot. Set the camera to auto-bracket and then set the shooting mode to continuous (like sports mode, meaning it will continue taking multiple shots for as long as you hold down the shutter button). On my cameras, if it’s set to auto-bracket and continuous mode, holding the shutter button down will take three shots in very rapid succession at the correct exposures. If the shutter speeds are fast enough (for instance, 1/400th, 1/800th, and 1/100th), it is possible to handhold an HDR shot, but you must be sure to remain perfectly still when taking the shots so that camera doesn’t move at all in between shots.

OK, so now you have your series of shots with all the levels of brightness in the scene. What now? Now it’s time to combine them in software on the computer. There are many different software products that allow you to create an HDR image from a series of photos. In my opinion, Photomatix by HDRsoft is the best and most popular. Newer versions of Photoshop also have this feature, as well as a variety of other products. I personally use Photomatix, as do many other people. The rest of this tutorial will describe my personal process for Photomatix. Everybody’s workflow and procedure will be different, so feel free to use this as a guideline and to adapt it to your own style.

As previously mentioned, it’s best to shoot RAW files (vs. JPEGs) as they contain the most information. Some HDR software tools can create HDR files directly from the RAW files, but I like to convert my RAW files to 16-bit TIFF files and process those into the HDR image. This is because I prefer to let my dedicated RAW conversion software do the conversion, vs. the HDR software. (If this paragraph isn't clear, see my article on RAW vs JPEG for more info).

Once I have my series of 16-bit TIFF files, it’s time to start the process of creating the HDR image. I’ll go through this process on a conceptual level, rather than bogging you down with the technical details of every mouse-click and screen. This will also make it more applicable to a variety of HDR software products, but will still provide enough detail on how to do it.

Firstly, load up your HDR software. In my case, it’s Photomatix. You should see a button or menu choice that says “Create HDR image” or something to that effect, and you’ll be asked to select all the photos in the series you took. Select the three (or more) photos you took, that have all the brightness levels. After you’ve selected the series of photos and clicked OK, the computer will do some processing and soon a weird looking photo that doesn’t look quite right will appear on your screen. This is “technically speaking” an HDR image, but it’s not yet in a format that can be correctly displayed on your screen. There are so many levels of brightness in that “technically HDR” image that your computer monitor (or printer) cannot handle it. The next step is what creates the final image that looks good, and that step is to “tonemap” the image, which really just means to combine all the levels of brightness in the series of photos into a single photo that can be properly displayed on your monitor and printed. To do this, you’ll click a button that says Tonemap Image, or something to that effect, and after your computer does some more number crunching, you’ll see your photo appear on the screen for the first time with all of the levels of brightness combined properly. At this stage, the photo with appear with the saturation, brightness, etc. set at the defaults for Photomatix. It is at this point you’ll begin the process of tweaking it to make it look how you want, to put your own personal touch on it. In Photomatix, there are a variety of settings that you can set using on-screen buttons and sliders that control the brightness of the image, the saturation, and most importantly the intensity of how strong the “HDR effect” looks. This is all a matter of personal preference so I won’t get into too much detail here. In Photomatix, the most important sliders / buttons are the “Strength” slider and the “Light Smoothing” buttons which control how intense the HDR effect looks. You may have seen HDR images that have that “painted” look. The Strength and Light Smoothing settings are the two settings that most affect how much of that painted look is applied to the final image. I personally prefer a more photo-realistic look, and use HDR to capture images with the same dynamic range as my eye sees, but I can absolutely see the merits of the painted look as well. Of course the other sliders and buttons also have a huge effect, and you’ll just need to experiment to see what you like best.

Once you’ve set the sliders and buttons and adjusted the image to how you like it, the final step is to save the final image. Press the “process” button and the computer will crunch some numbers again and will create a JPEG file based on the settings you’ve chosen. Save the JPEG and you’ve successfully created an HDR image!  As an optional step, many people will load the final HDR image into Photoshop or any other image editing program to make some final tweaks to saturation, contrast, etc. I often do this myself (I use Corel Paint Shop Pro Photo).

Our final HDR image looks like this:

Sedona, Arizona
Sedona, Arizona

I find HDR to be useful in a wide variety of situations. I particularly like using it for night shots. For instance, I can use it to properly expose a night cityscape with buildings and water, while keeping the highlights from the city lights properly exposed as well. The Brooklyn Bridge image you see below is an example of this technique, and is an HDR image. If you combine the information in my previous article on Night Photography with the HDR techniques you learned here, you’ll be taking similar images in no time.

I've also created an app for iPhone, Android, and iPod Touch which teaches you photography -- more info can be found here:

Photography Trainer for iPhone and Android

Photography Trainer iPhone app

Photography Trainer iPhone app

(This HDR tutorial is part of the iPhone / Android app mentioned above -- take it wherever you go!)

If you have any questions or comments, please let me know, and feel free to share this tutorial with your Facebook friends:

Share

Best,
Paul

To keep up-to-date with the latest photo additions and other topics, you can also become a fan at my Photography Facebook page at:

Paul Timpa Photography's Facebook Page

If you'd like to purchase prints or stock photography licenses for my photos (for advertising and editorial use), please visit:

http://www.timpaphotography.com/purchase

Paul offers one-on-one photography workshops in New York City, including an "Intro to Digital Photography" course.  For more information, please use the link below.

http://www.timpaphotography.com/

Share/Bookmark

Copyright 2009, Paul Timpa

Brooklyn Bridge, New York City
Brooklyn Bridge, New York City


22Feb/09Off

Shooting in RAW vs. JPEG

Sedona, Arizona

Sedona, Arizona

I often see questions in forums and magazines about whether to shoot in RAW vs. JPEG, and asking what are the advantages / disadvantages of each. I thought I'd tackle this topic since a lot of what's out there can be confusing. This post is long, but if you take the time to get through it, you will have a full understanding of RAW and JPEG shooting.
First, let me come right out and say it: if you're serious about your photography, you should be shooting in RAW. It's significantly better in just about every way possible. I'll explain:

As I'm sure you know, digital pictures are just a series of 1's and 0's collected together to form an image. There are many picture formats, such as JPEG, TIF, GIF, BMP, various RAW formats, etc. Each format stores the 1's and 0's in its own way. The most common picture format for viewing on the web, and even "general" printing is JPEG...that's what we're all familiar with. But let's backtrack a little and get behind the scenes to how we get to that final JPEG picture, and you'll see why shooting in RAW is so important.

When you take a picture with a D-SLR, the shutter opens and the sensor captures the picture. However, it does NOT capture a JPEG file. It captures a RAW file, which is a digital version of exactly what the sensor sees through the lens, no more, no less. It temporarily stores that RAW version in memory. Here's where the famous choice comes in...do you store the image on your memory card as the RAW file that was just captured, or do you store it as a JPEG? It is NOT the same thing. Here's why:

We know that JPEG files are the "standard" format for pictures, for posting on the web, emailing to friends, etc. We also know that "eventually" every picture we take will probably become a JPEG at some point for that very reason -- so we can share it with friends, put it on websites, and email it. However, when you're taking the picture, I recommend you shoot in RAW and not shoot in JPEG, and there are several reasons why. Firstly, a JPEG version of your picture has been compressed so that the file size is smaller, for purposes of emailing, posting to the web, etc. By compressed, I mean that actual picture information is thrown in the garbage. Picture information that you took the time to capture! When you take the picture, it's stored as a series of 1's and 0's. JPEGs are stored in such a way that a computer chip takes a look at all the 1's and 0's and tries to determine what is not important in your picture, and it throws away that data so that the file size is smaller. This results in loss of detail, subtle changes in color, brightness, etc. The problem is that the computer chip is deciding what to throw out. It may throw out more or less than you want. You may be saying to yourself, "well eventually the picture will become a JPEG and all that info will be thrown out anyway, so what's the problem?" I'll get to that, after I explain what a RAW file is.

A RAW file is an exact representation of what the sensor saw when you clicked the shutter. No information is thrown out. It's all there. All the detail, colors, brightness, everything. The only problem with RAW files is that the format is specific to that camera's brand. A RAW file cannot be viewed on a web page, or e-mailed to a friend for them to just double-click on it and view it. It must be...well...converted into a JPEG by you, manually, on your home computer. BUT...you say..."my camera could have just done that conversion to JPEG for me!" Here's why that's a bad idea:

A JPEG picture is a "final" version. It is the equivalent of a finished print you hold in your hand. That's the picture you show people and give to people. That final picture is going to have a certain level of sharpness, color saturation, contrast, etc, set to however you like it. If you shoot JPEGs in your camera, you're going to have set the sharpness, saturation, contrast in your camera's menus (that's partly what those shooting modes like "portrait" or "landscape" or "sports" are for...). You may also set the white balance to something like "Sunny" or "Cloudy" or "Candle", to correct the color of your photo for the lighting conditions. Once you snap the shutter, the RAW file is temporarily stored, the computer chip in your camera looks at the settings you've set for sharpness, color, white balance, etc., it converts the RAW file to a JPEG using those exact settings, it then compresses the file by throwing out information as described above, and THEN IT DISCARDS THE RAW FILE. The information and picture detail that the camera threw out: GONE FOREVER. That's it. It stores only the finished compressed JPEG, with the sharpness, colors, saturation, and white balance that you set in the camera. You're done at this point, and it's ready to post or email. There are several problems with this method when you compare to shooting in RAW. I'll explain below.

When you shoot in RAW, you click the shutter, and the RAW file is stored on your memory card. The RAW file is simply an exact representation of what the lens saw. No compression is done, no information is thrown out. None of the in-camera settings for sharpness, color, contrast, white balance are used -- they are all ignored. You have a perfectly pristine copy of the scene on your memory card. Now comes the next step. We already know that in order for the photo to be viewable by other people on the web, or emailed, it must become a JPEG at some point. This step is called RAW conversion. It must be done manually, by you, on your home computer, by a piece of software called a RAW converter that comes with your camera (you can also use 3rd party RAW converters). And THAT'S the beauty of it. YOU are now in complete control of what the final JPEG will look like. Not the camera. There are many advantages of doing the RAW conversion yourself on the computer. Firstly, when you convert to JPEG on your computer, the RAW files stays in-tact and remains unchanged. You can make a hundred different versions of the JPEG from your RAW file, each one tweaked a different way, and you'll still always have the original RAW file to use again. That's why RAW files are sometimes called "digital negatives". It's the equivalent of a film negative, where you can make many prints off of one copy, and make some darker, some brighter, some more colorful, etc. Also, when you convert a RAW file on your computer (vs. in-camera) your computer processor is much more powerful than the chip in your camera. It does a better job of analyzing your picture and deciding what to throw out. You also have control over the compression-level, meaning you can compress it only a little bit, keeping a lot of detail (but resulting in a larger file), or compressing a lot, and having a nice small file to email. You make the choice. The same goes for all the settings like sharpness, saturation, contrast, white balance, etc. You can look on the nice large computer monitor and decide on exactly how much sharpness you want, how much color, etc by simply moving some sliders on the screen. You can see instantly how each slider affects the picture. You can change the white balance AFTER-THE-FACT so that when you get home, you can see that maybe the "Sunny" setting looks better than the "Cloudy" setting after all. Once you have the picture looking exactly how you like it, you press the "convert" button, and voila, you have your final JPEG exactly as you want it. And if you change your mind about the saturation or sharpness a week later, simply go back into the RAW converter, tweak the settings, and make a new JPEG. You always have the option of having the photos exactly how you want them. JPEGs have all this information permanently burned into the picture. If you shoot in JPEG, and accidentally had the white-balance set to Sunny and you took pictures at your daughter's birthday party of her blowing out candles in the dark, that picture is ruined, and the moment is lost. The wrong white-balance would have been permanently burned into the JPEG. Sure you could try to rescue it in Photoshop, but it's not the same, and the quality will be terrible. If you'd shot RAW, you just change the white-balance in the RAW converter to Candle, and the picture is perfect.

In addition, you can use the RAW converter to convert to other formats besides just JPEG. For example, I convert to TIF files for editing. I use the RAW converter to make a TIF file which I can open in Paint Shop Pro. TIF files, like RAW files, are not compressed -- no information has been thrown out. So I convert to TIF and then edit in Paint Shop Pro to do my cropping, converting to Black & White, etc. on the TIF file. This way, I'm working with ALL the information and detail that was in the original picture. When that editing has all been done, then I convert the TIF file to the final JPEG to be used to post to the web or emailed or printed.

You may ask, well why would anybody shoot JPEG then? It's simple. Time. It's quicker. If someone doesn't have the time or desire to do the RAW conversion, then they shoot JPEG. (It also used to be that because JPEGs were smaller than RAW files, you could get away with buying smaller memory cards, but prices have come down so much on memory this is not really that much of a factor anymore). My question is: if you took all that time to set up and shoot the perfect picture, don't you want to take the time to get the best end result? If so, for all the reasons above, RAW is the way to go.

I've also created an app for iPhone, Android, and iPod Touch which teaches you photography -- more info can be found here:

Photography Trainer for iPhone and Android

Photography Trainer iPhone app

Photography Trainer iPhone app

If you have any questions or comments, please let me know.

http://www.timpaphotography.com/

If you'd like to purchase prints or stock photography licenses for my photos (for advertising and editorial use), please visit:

http://www.timpaphotography.com/purchase

To keep up-to-date with the latest photo additions and other topics, you can also become a fan at my Photography Facebook page at:

Paul Timpa Photography's Facebook Page

Best,
Paul

Copyright 2009, Paul Timpa