HDR photos with the GIMP
introHDR photos with the GIMP
A tutorial on making High Dynamic Range photos using the GIMP or similar software.
This instructable is aimed at a range of people, so you can skip to the bits relevant to you with the information below. I apologise for the verbosity of the main instructions, but I figure you can skip parts you already understand, and I may as well put in the detail for people who don't.
If you don't know what High Dynamic Range (HDR) is or how it works, read on.
If you are comfortable with the concept of HDR and want to know how to do it in photo editing software, go to step 3
If you are familiar with the process of making HDR images and just want details of how to do it in the GIMP, go to step 4
If you are familiar with the interface of the GIMP and just want a quick set of instructions on how to make HDR (for instance if the theory bores you and you just want to make some HDR images), go to the recap stage in step 10. The details of each step are in... the relevant step.
If you know the theory, how to make HDR images and are familiar with using the GIMP.. I'm not sure why you are reading this, but hello anyway. My pitiful attempts (I'm relatively new to HDR and the GIMP) are in the later steps, perhaps you could give me some pointers? :D
Lastly, if you find this instructable helpful (or even not particularly) and have constructive suggestions for how I could improve it, let me know and I'll edit it.
|

step 1Theory- photographic
What is dynamic range?A camera, like the human eye, has a light sensor that captures the image. The sensor has a limited sensitivity to light, so under any given condition…

step 2Theory- layered image editing
How do we do it?HDR is where layered image editing programs such as GIMP or Photoshop are very useful. Using a technique called layer masks, we stack the photos with diffe…

step 3Take your stock photos
For this step you will need: - A digital camera with the ability to set aperture/shutter speed, to control the exposure- A good sturdy tripod- this will save you a lot of t…

step 4Open the "middle" image
Unsurprisingly, this usually involves File - Open... and selecting your middle image. I suggest renaming your photos from the usual "P100327.jpg" your camera may call them …

step 5Add dark layer
Open the dark image in a new window. Copy the contents, then go back to your original image (from now I will refer to this as the composite, and the other photos as the st…

step 6Make the dark layer mask
Now go back to the dark stock image. Desaturate the image (convert to greyscale) with Layer - Colors - Desaturate. This forms the basis of your layer mask- the white part…

step 7Apply the dark layer mask
Copy the contents of the dark layer mask image. Go back to the composite, and open the layers window (Ctrl-L or Dialogs - Layers). Right-click on the dark layer, and sele…

step 8The light layer
This process is almost exactly the same as adding the dark layer but with a few notable exceptions. Open the light stock image, paste it into a new layer in the composite …

step 9Your first HDR image!
You now have your first complete composite HDR image! Save the image (preferably a layered copy as well as a flattened JPEG), and compare it against the original "middle" …

step 10Recap- steps for creating brightness-mapped HDR
- Take stock photos- one exposed normally, one 1 stop underexposed, one 1 stop overexposed, from a tripod.
- Open middle image as background
- Open dark image, copy, pa…

step 11Hold on.. "brightness mapped"?
Astute readers may have noticed the previous step was labeled "for brightness-mapped HDR". There are other techniques for achieving a similar effect, which I will outline,…

step 12Man, that was a lot of text
Paste the bright and dark stock images into the composite as separate layers. After desaturating the stock images, perform an edge detect (Filters - Edge-detect - Edge... …
| this is great, but you can do it in adobe cs3/4 in 2 steps.
|
| that's great for commercial use but for home use gimp's free.
|
| This is very well done. I will be attempting an HDR process in the next
few days using these instructions. If I have problems following the
instructions, I'll let you know.
Thanks very much!
|
| Right click on the layer in the layers window, make sure edit layer mask
is selected, then go into the edit menu, paste into.
|
| I am amazed how much stuff one has to wiggle through just to get to be
making a HDR image!!
Or" To just to make a Colour Photo to be partly Black and White.
Trying to follow some of these instructions are just plain difficult.
This is mainly because it is often assumed that one knows where to look
for what button or icon to press when an insttructions says; Paste image
on to layer"
Ok" Sounds simple. But wait! Now show me where to go to do this
and what sequence to follow instead of just written basic intructions.
They are ok if you know the Gimp program. What about the ones who are
trying to make sense as to where everything is and what sequence to follow!
Gimp is obviously a fairly loaded Software with all sorts of goodies.
Just not user friendly. No wonder it is Free!
I have a paid version i use to do HDR images with and it works great.
Easy to follow and simple!
It aslo has all the funtions one needs to make great HDR images. I was
curious to see how Gimp would be for me. I'll stick to my paid Program.
As i always say" Keep it simple. The world is complex enough as it is.
Cheers"
I have a HDR
|
| No wonder it is Free!
Yeah, cause professional-grade, feature-rich programs that took years of
volunteer time to develop are obviously worthless!
|
| gimp is awsome, but this new version kills me, idk where half the stuff
are :S
|
| I would love to be nice about these directions, but I cannot be
constructive because I did not find them useful. I have effectively
produced an image worse than the 3 I started out with using your
directions, because they are not clear.
|
| Mar 9, 2009. 4:23 AM PKM (author)
says:
I wrote this Instructable ages ago, and coming back to it I sometimes think "How on earth did I write so much about such a simple process?" I'm probably going to strip out and rewrite the instructions, in a simpler manner. |
| These instructions are great for someone who is familiar with GIMP.
Thank you.
I think you should state that upfront, so people have their
expectations set right.
Thanks for taking the time. I found it very usefull.
|
| Jan 6, 2009. 10:14 AMEOBeav
says:
Comment about layer masks: When I was doing this at home, I
experimented with one more step after desaturating the mask. I used a
threshold filter on it so that I could get entire sections that were
either opaque or transparent. This seemed to work when I had, for
example, a cliff, part of a river, and a sky. Each one of those three
items were exposed at different levels, and I wanted to get the best
ones compiled into one picture. This gave me a more pronounced HDR
effect, but not so much that it didn't look realistic.
What are your thoughts on using the threshold filter after decomposing?
BTW, this is a great tutorial, and one that has really got me going in
HDR images. It's a great way to improve your own photographs.
|
| Well, now that I have tried this technique with GIMP on many photos I
have set up for this, I am disappointed. The final image looked roughly
the same, although some dark and light spots had changed, and I can see
the exact changes from the layer masks. I have no idea if this is truly
HDR or not, but certainly none of the final images I ended up with were
anything much better than what I started with. Even in your example
image, the picture is still very poor, although you now have some really
bright spots around one tree. When I search around or HDR photos, they
all look amazingly vibrant and surreal, and this effect is no where to
be found on my photos or your example. It doesn't help that there are no
other comments from people ere who have tried it. Has anyone else tried
this? It would be good to find out if I am just doing something wrong,
or if this instructable is not really making an HDR image.
Thanks
Andy
|
| Apr 27, 2008. 3:25 PM PKM (author)
says:
As far as I know, most of the HDR pictures posted in the web are made using software or plugins that use edge detection and do a lot of fairly involved maths and very complex manipulation that is out of the scope of using the GIMP by hand. Your HDR will only be as good as the stock images- are they taken from a stable point so they all line up, and with a large enough range of exposures? You want as large a range of exposures as you can reasonably take, but +1EV to -1EV from the best balanced exposure is a minimum. My examples weren't great because they were hurriedly hacked together on a very, very old and underpowered PC, and involve moving trees taken at long intervals because I hadn't worked out bracketing on my camera at that point. The bright spots are an unavoidable consequence of parts of the subject moving between shots, so parts of the image that were tree in one shot are sky in another, which messes up the layering. If you want the very vibrant surreal pictures like the ones on the Flickr HDR pool etc., I suggest you download some HDR software or experiment with tone mapping as described above. I do state in the Instructable that this is a subtle effect, better for evening out the range of exposures in a photo than creating an artistic or surreal feel. Other than that I'm not sure what to suggest, but if you linked me to your source images and the finished image I could hazard a guess at ways to improve it? |
| Ok, so I messed around with it more and figured out some other issues
with the pictures I am using. I need to try a new set up I think. The
light seemed great for a regular shot today, so I took 3 different
angles for attempts with this HDR, but one was too hard to line up, and
another was just too poor color to start with. But I'll try to paste the
image of before/after of the one I had the best luck with.
Problems:
1) It is incredibly hard to line up pixels. I tried using
HDRAlignmentTool which does a reasonably good job at getting the photos
in line, but only handles 3 shots to a screen. I then put in the layers
and their masks, and found that images were still 1-3 pixels off which
creates odd gray ghosting all over the place. So I manually moved them
until it appeared to line up. Still though, when I zoom in to a far
edge, I can see ghosted outlines (rotational translation maybe?)
2) The color curves were just plain bad to start with. Without changing
anything on them, I end up with very gray images. I think crummy parts
just added up in the layers to make blobs of gray. I went to colors >
curves and pulled the right side lower, the left side higher (not
technical I know, but this was after playing around with many
configurations and it seemed best). This helped a lot in removing the
gray blobs and making the overall color much better.
3) The color in the final image is better, but I think due to the small
1-2 pixel translations the sharpness decreased for the HDR image. Even
with a tripod, a program to line up photos, and manually trying to move
them, it seems almost impossible to get them exact to the pixel. Maybe a
remote on the camera would help, but I don't know if my camera can
change shutter speed by remote (I have a Canon Powershot S5 IS). Anyway,
the sky added real texture, the underside of the kiosk is visible, and
the grass is more vibrant. The tree edges and the gravel in the road are
blurrier though.
|
| Having looked into HDR on the net for a bit, I have discovered this
plugin for GIMP which seems to automate a lot of the process and I think
would come up with better results than doing it manually.
ExposureBlend
There are instructions on the site- seems to include more options for
tweaking as well. It's quite a powerful tool from what I can make out
after 5 minutes of playing about!
I was looking at this tut to see if I could create a faux-HDR image from
a single photo. I'll give it a go now!
|
| This plugin is amazing, thanks for sharing it!
|
| May 21, 2008. 6:30 AM PKM (author)
says:
Geekguyandy, it looks from that sample like you've got the technique right. For a dramatic effect you will need a large spread of exposures (at least 4 EV stops). My approach to lining up the images was to set one to 50% opacity and line up a spot in the centre of the image, then if the corners are out there must be a rotation, and a little trial and error with small-angle rotations should even it out a little. Your camera will probably not have remote shutter speed control but it may well have bracketing- you set it to take a range of exposures and it takes them one after the other from one button press or remote click. Have a play with your camera to see if you can find bracketing, because it's a great improvement over adjusting the exposure by hand, meaning you jog the camera between each shot.
ScaryDave: I'll look into that plugin, it looks like it's doing pretty much the same as my technique but automating it. Call me a purist but I like the ability to tweak the curves on my images and layer masks myself.. but I will download the plugin and play with it to see if it makes the process quicker.
|
| Agreed, PKM, I like to have control too. However, the plugin does seem
to be doing some other stuff to the images like applying gaussian blurs-
not that that's too hard anyway.
The other sweet feature is the exposure alignment which is probably the
only reason for using this plugin rather than doing it manually.
Thanks for the guide by the way- was very helpful =]
|
| Well, here's my attempt at it...it actually turned out pretty good.
|
| Qtpfsgui is a great program for doing this, despite having the worst and
least memorable of any software name ever.
I would still rather do HDR in gimp, but I am not sure how to do the
tone mapping. I think it is the tone mapping part that makes HDR images
look so different.
|
| Nov 24, 2008. 10:09 PMturt-o
says:
I'm stuck here, I can't paste the mask layer :(
|
| Your tutorial was perfect. Although my pictures didn't come out as HDR
as I thought they would be, I still get the concept. Thanks! :D
|
| What's the fill type for this layer?
|
| Jun 22, 2008. 8:07 AM PKM (author)
says:
It doesn't matter, as you are going to paste a non-transparent image straight into it as soon as you create it so the initial fill colour is unimportant. |
| Interesting. I shall try this soon I hope!
|
| i've been using the GIMP for about 6 months now
its an amazing piece of freeware
|
| it sure is :)
It was originally a free Linux replacement of Adobe Photoshop, but the
creators were nice enough to port it to Windows & Mac, too.
|
| It is not a freeware is it Free Software . Confused ? Read this
and this
. And thanks for liking GIMP anyways. I too like it very much.
|
| Mar 18, 2008. 12:21 PM PKM (author)
says:
I think the term free-as-in-beer needs greater usage- it's a simple way of expressing how freeware is not necessarily free software. (I guess free software is a subset of freeware..?) But yes, you have a good point- the GIMP is not just free-as-in-beer, it's free as in the free software foundation. |
| There is an option on the "add layer mask" dialog,
"Grayscale copy of layer" which makes this a bit quicker.
|
| Feb 21, 2008. 10:03 AM PKM (author)
says:
You speak the truth, helenst, and I had no idea you could do that when I wrote this Instructable (was quite new to the GIMP at the time). I should amend that step, but that would mean wading through all that text... |
| "Paste the dark stock into it" <--- how do we do it..?
|
| You can "Open as Layer" in the middle image to import the dark
image directly into the layer.
|
| EXCELLENT INSTRUCTABLE! VERY well written! A+
|
| I will be trying this soon! Very well described and illustrated. Thank You!
|
| May 30, 2007. 8:47 AM PKM (author)
says:
Myself- while I'd love to take credit for the great idea of downsizing my workspace.. I run the machine at 1024x768 and edited the images at about half that again because the editing was done on a 500MHz Pentium III with 256 MB of RAM. Trying to do it with full size digital cam photos runs at a speed best described as glacial. As soon as there's a GTK that runs on 64 bit windows I can start using my Athlon 3700 which will be a lot more fun.
HooLooVoo- see above; once I actually make a full size image I'll post it, but I'm revising for finals at the moment so it will be a while. If you search for HDR on Flickr, there are hundreds of photos using this technique that are way better than my attempts.
|
| Great intstuctable! Im defiantly going to try this this weekend. Do you
think you could upload a final pic.? I mean you have that comparison
one, but its a little small, and hard to see.
But great job, i've never heard of this technique, but it seems great.
|
| May 30, 2007. 2:44 AMMyself
says:
Sweet instructable, very well documented! Downsizing your workspace so
everything fits into the Instructables photos with readable text is a
nice touch.
I'm rather partial to my (ancient, but not severely bloated) copy of
Paint Shop Pro 5, and it includes some layer mask functions. I'll have
to play with some of these techniques and see if I can do HDR composites
with less
than a gig of ram. ;)
I look forward to the flurry of technique nitpicks that're sure to
follow in the comments here. Any time you involve photography, the
pedants come out. And buried in their pages of chitchat are occasional
gems of insight. Let the winnowing begin!
|