
Lab : HDR photography explained, definition and realization. |
One of the problems of films and even more of digital sensors is their capacity to reproduce scenes with high contrast. This is characterized by blowned high-lights and/or completely dark shadows, whereas in the field, the eye discern much more tonalities. Sensors have indeed a limited dynamic range (a capacity to record variations of luminosity), inherent in technology employed. It is thus necessary in such scenes to choose between an exposure preserving high-lights, or an exposure preserving shadows. There are however solutions, but which impose certain constraints in term of shooting. We will try here to understand HDR photography and its usability.
 HDR, definition
Application to photography
HDR photography, realization (shooting)
HDR with Photoshop CS2
Conclusion
HDR, definition
First, let us start by defining term “HDR”, or High Dynamic Range. I use myself such images since the end of nineties, when it appeared thanks to Paul Debevec studies, in 3D images and animations. This format is now more used in openEXR (developed by ILM, the famous studio of George Lucas) in rendering and compositing.
A pixel of an image is composed of three layers of colors, Red Blue Green, each layer being able to contain a certain number of tones. In 8bits, each layer is thus coded on 8bits (or 8bpc, for Bits Per Channel), to say 256 tones of red, green, and blue. Indeed, data processing being binary, one has 8 “0” or “1” to code information, so 28 = 256 possibilities. On three layers, one thus obtains 2563 = 16 777 216 colors, in other words 24bpp (Bit Per Pixel).
A 32bits file is in fact a 8bpc file (so 24bpp) but with a fourth layer, called alpha layer, containing information of transparency. For example, a pixel 100,100,100,128 will be a dark gray pixel, at 50% of transparency. This just in order to clarify things, as we won't be interested here in the alpha layer.
Well, any scene should be divisible in 256 levels, but that depends directly on the dynamic range that the sensor is able to stand, and thus on the technology of the current sensors. For example, if you have shadows in a fully sunny scene, the sensors (even best films) won't be able to "divide” such high variation of contrast into 256 levels. From a technical point of view, while recording the very low number of photons emitted by the shadows of the scene, the photosites of the sensor (or silver grains of a film) should be able to record at the same time an enormous quantity of photons in the high-lights. Today, such a quantity of photons “overflows” of the photosites, they saturate, and thus records a pure white. It's even more obvious on ultra compact cameras, which have very tiny photosites. Maybe one day we will have some photosites able to be emptied and record continuously during one exposure time, but that's still far … Thus, in such a scene, on one hand you increase exposure time to capture the shadows, saturating high-lights, on the other hand you decrease exposure time to preserve high-lights, but then shadows will be black, because too little (or no) photons emitted by the shadows will hit the sensor in such a short time !
You should now glimpse a solution : to divide the capture of the scene to once for shadows and another once for high-lghts, and then to merge these two parts to make only one larger image ! That's indeed the principle of shooting HDR.
HDRI images (High Dynamic Range Image) are in fact a combination of several shots with different exposures, authorizing levels for brightness and chrominance higher than 255. For example, where a white wall will have an intensity of 1.0 (255,255,255 in RVB space),, the sun, also white in space RVB, will have an intensity of 4.5.
The raw, recorded in 12bits, now in 14bits on last Canon DSLRs (and 16bits on the digital backs) makes it possible to get the complete dynamic range of the sensor, already higher than 8bits, but does not completely solve the problem. HDR Formats are indeed much wider, reaching usually 32bpc. Still some figures :
8bpc = 28 = 256 tones per channel.
12bpc = 212 = 4096 tones per channel.
14bpc = 214 = 16384 tones per channel.
16bpc = 216 = 65536 tones per channel.
32bpc = 232 = 4.2 billion tones per channel.
Even our 16bits raw file is all at sea by an HDR file, including 4.2 billion tones per channel. Do we have to still refer to the 256 tones of our jpgs files ?
Particular case of the human vision.
We could argue that an HDR file approach human vision and the capacity of the eye to distinguish details in the shadows even in full sun. It would a lot simplifying things, because the eye dynamic range, even if wider than any sensor or film, is far from being infitite, and doesn't work in the same way. Indeed, when we show an image file (screen or prints), all informations is contained in the file and do not vary.
But the eye doesn't see the entire scene, or rather see it, but don't make out details apart in a restricted aera, where you really look at , corresponding to the fovea, central zone of macula, zone of the retina where the vision of details is most precise. And where the grace of nature resides, is that the eye adapts in nearly real time to the average brightness present in the fovea, on the one hand by instinctive reaction by adapting the diameter of the pupil, but also by adapting the sensitivity of the retina, which translates in a nonlinear way this brightness into luminosity sensation (in electric signal to the brain). Thus, like our sensor, you won't be able to tell apart details in shadows if the sun is directly in your field of vision (in the fovea), on the other hand by shifting your field of vision a bit, even if the sun is still “visible”, the eye adapts and tells apart details.
It will thus be necessary in our HDR file, which is complete, to have an even wider dynamic range than the eye. |
 |
Top
Application to photography
In the figures, our HDR file is thus exceptional and makes it possible indeed to quantify any scene with high contrast. Now remain to inform these informations in the field so we can use them ! There are two ways of doing this, only one relly being “HDR”:
Multiple RAW developpment.
A raw file contains more information than a jpg file, being quantified on 12, 14 or 16bpc instead of 8. A simple way to extract all the raw informations is thus to develop different versions from a single raw, one under exposed, one neutral, one over exposed, and merge them to an HDR file. However, as said above, even if the dynamic range of a raw is wider than that of a jpg, it doesn't have anything extraordinary since it corresponds in fact to the real dynamic range of the sensor, which is limited. We could have 32bpc file, if the sensor "fill" only 10bpc informations, this is non sense.
Moreover, if this technique allowed a few years ago to recover some delicate shots, today derawtisers are very sophisticated and allow to directly achieve suchs work, thanks to precise adjustments on the curves and to certain special functions (in particular the recovery highlights).
Multiple exposures.
The real HDR shooting method consist in taking multiple exposures of the same scene, at different durations (by making “bracketing”), for successively collecting different part of the scene (in term of brightness/chrominance), and then merging these exposures in only wide one. We can, for example, shoot once under expose by 2 stops, another one at neutral metering, and a third one over exposed by 2 stops. The under exposed shot will give us high-lights informations, over exposed one shadows informations, and neutral one will enable us to join the whole around average information. Here, each shot containing entire sensor dynamic range, with three shots, we get three times the sensor dynamic range (not exactly as each exposure intersect others) !
You can shoot in jpg or raw, but in raw, takes cares to develop them at neutral exposure (0 EV compensation during development).
On the other hand, we see that such technique is doable only in certain conditions. That's why manufacturers works a lot to improve their sensors dynamic range. Indeed, requiring multiple exposures of the same scene, it can be considered only on tripod, with fixed subjects. Even for landscape, you will have to avoid any wind that would ruins sharpness of foliages since each exposure would be different not only in exposure ! Good-byes thus sport shooting, street shooting,
portraits, etc…
Rmq : This technique also work with films, by scanning the various exposures then by following the same workflow. |
 |
Top
HDR photography, realization
Now that we understand what is an HDR file and how realizing such file with multiples exposures, we have the theory and tools, so go for it !
Shooting
Use a tripod, perfectly stable, with if possible a cable release. And avoid windy days …
Set your body on manual, select ISO (usually 100 ISO on tripod), and set your desire aperture.
Measure high-lights and shadows of the scene. For that, in spot metering or Av, point on these zones and note exposure time indicated by the body metering (or use a spotmeter). Without spot metering you can zoom on each zone to get more reliable measures.
Once you have these two values, you have the variation (range) of the scene. The other values should be determined for averages values. Generally, we use variations of 1.5 or 2IL (1IL measuring itself by 1 stop) between each exposure, for 2 stops, it is thus necessary to multiply or divide the exposure time by 4.
Example: Metering get 1/1600èm in high-lights, and 1/8èm in shadows.
While proceeding every IL, we have : 1/1600, 1/800, 1/400, 1/200, 1/100, 1/50, 1/25, 1/12, 1/6. What gives us 8IL variation.
By taking a shot every 2IL, we have five exposures : 1/1600èm, 1/400èm, 1/100è, 1/25èm, 1/6èm.
Note that the majority of the sensors take around 6IL without problems, 8IL should be ok (in raw) but will have less tones in shadows, whereas in HDR, much more tones will be captured in shadows, since over-exposed. Indeed, the response of a sensor is linear, which means that the more light (or photons), the more captured tones, therefore even with only 6IL, an HDR file will be richer in shadows. However, with less than 6IL variation, HDR is not really necessary, unless seeking some special effects.
Manually adjust the exposure time for each shot. Some bodies have bracketing functions for that.
Software tools for HDR.
Once
realized your shots, you will have to merge them to form only one full image. This stage is done with some specific softwares able to handle such large dynamic range :
-Photomatix pro
- Photoshop which has this function since version CS2.
- easyHDR pro, which also has a free version.
- Photogenics HDR
The goal will be to merge the 8bpc images in one 32bpc image, then to reduce this image in 8bpc again, by compressing HDR informations through curves. Indeed, screens and printers, except some rares ones, are able to restore only 8bpc, you won't be able to see your HDR file on a screen such as it is really, you will only see part of it ! This technique of compression through curves from multiple exposures is called “Tone-mapping”. |
 |
Top
HDR with Photoshop CS2
At this stage, workflow is specific to each software, while being overall the same : import the various shots, then by the different available tools, set the importance of each shot on the tonalities in the final image, the tone-mapping itself.
To illustrate this article, I had of course to take a few shots. I thus prepare my body, cable release, the whole firmly fixed on my tripod, and being time to leave the house ... impossible, due to wind ! Concrete example that this technique include its own limits ! I thus closed the shutters (house ones !), and decided to shoot a turned on spot in the dark, and get details from the lit bulb, typical cases of extreme cut in the high-lights, even our eyes are all at sea on such variations of brightness
Here is only one shot, in raw, developed with hard curve manipulation to get something usable. Anyway, it is rather dark, and bulbs are completely blown.
By measuring the values, I did get 1/1000èm and 0.3sec, but without spot metering, I started with 1/4000èm by making five shots : 1/4000, 1/1000, 1/250, 1/60, 1/15, 1/3 (thus 2IL of variation each time).
Click here to see all shots.
Inide photoshop, go to File / Automate / Merge to HDR
With “Browse”, go in the directorie containing your shots and select them, then “ok”.
 Photoshop opens the files, and handle the merging. A window appears with a composite in 32bpc and the imported images, simply made “ok” without applying adjustments. You thus obtain a true HDR image in 32bpc ! Your screen being completely unable to restore such a wide range of tones, it appears blowned out, which is normal.
To visualize and set up the image such as it could be diffused or printed, it should now be converted, in 16 or 8bpc. It is preferable to convert it into 16bpc, which will make it possible to make final improvements preserving a maximum quality, but it will have then to be converted into 8bpc. In both cases, converting an HDR image into 16 or 8bpc opens a window for adjustment, to choose the manner of compressing these 32bpc into 16 or 8.
In window HDR conversion opened, you have several option. Choose “Local adaptation”, the only option allowing you to custom the curve to compress the values.
 Now set the curve as you need, as well as the two adjustments “radius” and “threshold”, in order to find the best compromise, then click on “ok” to get your final image ! Done !
Here typically an image impossible to realize without such techniques !
Attention : If I had had to realize such a shot, I would not have used HDR technique. Indeed, we put ourselves voluntarily in a dirty situation, in order to create an enormeous brightness variation to illustrate this technique (on spot alone in dark environment).
In a case like that, the same spot, on, but in a clear environment like studio lighting in order to counterbalance the variations of brightness generated by the bulbs, would not have been a problem, and the result would have surely been better !
On the other hand, in landscape, especially for sunset/sunrise, it is more difficult to put the scene in a studio lighting setup ... |
 |
Top
Conclusion
We saw that in front of the limited dynamic range of sensors, there is a solution, relatively simple, which allows to get all the tones of a scene even with very high contrast. This solution, HDR photography, contains however constraints and so limits its application to the fixed scenes, without winds nor moving subject, and imposes to work on tripod. If results are convincing, supplying extremely rich images, this technique becomes fast very heavy if one want to generalize it on several photos. For example, if you realize 10 shots during a session, this technique will forces you to take 50 shots (or at least 30), without being mistaken (!!), and to be extremely rigorous not to mix them all !
The manufacturers of sensors must thus continue to improve dynamic range, for maybe being a day able to work in HDR with only one exposure/shot, in 32bpc raw file, and especially sensors able to catch such dynamic range. However, such files are very large in size, and not tomorrow to see a body able to shoot 10fps 32bpc raw files at 10mp !
Now, I have to admit something: although limited, the dynamic range of current sensors allows to answer the great majority of cases, and according to your artistic aspiration, HDR photography is not necessarily useful. None of the photos on this site were realized in HDR, which doesn't prevent me from fully expressing myself through my shots !
Technique is only a tool, and must meet a need, knowing such techniques don't means you should use it every day (the example of the spot illustrates it well, where a studio lighting would have been much more judicious). As an information, the photograph in top of the article does not have anything HDR, it's just a raw developed with a reversed S-curve ; -)
Nicolas Genette, on August 21, 2007 |
 |
|