Eggy Boil 6:04pm, 8 August 2006
HDR Alignment Tool v1.0

Well I got so fed up trying to get my handheld LDR photos to line up, I went and wrote this small Windows app. Its not perfect and the interface is still a bit crappy but at least it gets the job done.

If you are having similar problems then feel free to give it a go.
Click here to download it direct (thanks to asylumxl for the hosting)
or here to get it off my geocities site.


25 March 07

The new version is available off the above link and includes many new enhancements...

- Lens Correction module added.
- FOV/Perspective module added.
- Save Options dialog added.
- Improved contrast on brightness sliders.
- Keyboard support for fine control of control poins and sliders.
- 25% speed improvement.
- Many other minor tweaks and bug fixes.

Also, the delphi source files are available here if anyone wants to tinker around with them.

otra herramienta gratuita:
Skink74 9 years ago
That is a neat little tool! I just gave it a quick go and it does a really cool job.
This was done from 6 exposures that were all over the place.
Sunset over Milford-on-Sea
There's still a bit of blur as one exposure was motion blurred, but overral I am impressed.

My only concerns are that normally I do my HDRs directly from RAW files (but I could always convert them to BMP or something first), and that it's a bit awkward (but useable) for more than 3 exposures.

Thanks a lot!
Speising 9 years ago
Great tool!
At my first tries, it made a better job than photomatix' semi-manual mode.
However, some remarks:
Could you keep EXIF info on the files? HDR generators tend use on it for EV distance calculation.
And the Master image probably doesn't need to be recalculated, just copied (for having a consistent naming).
Cropping on the "least common denominator" bounding box could also be an option, we have to do it on the endresult anyway.
NY_Doll 9 years ago
wow, thanks for creating this! i just downloaded it and i'll check it out soon.. can't believe you created this on your own! :)
Skink74 9 years ago
Speising makes some good points - EXIF data would be nice to keep. And if the master wasn't reclculated it would make it less confusing when dealing with more than 3 exposures.
But I repeat - great tool - thank you!
Eggy Boil 9 years ago
Thanks for the feedback everyone, your comments and suggestions are much appreciated.

Speising, I think you've been reading my To-Do list :)
Im currently working on EXIF support, Ive had a few problems but Im over the worst of it now (I hope).
And not re-calculating the master is something Ive been meaning to do for a bit, just never got round to it. Both these features will hopefully be in the next release.
Your cropping to the 'least common denominator' is an interesting idea and I might implement something like this in the future.

Skink... nice pic, Im impressed you were able to get 6 images aligned with the tool, it certainly wasnt designed for that. I'll have to think of some way to do it without a complete rewrite, maybe some kind of queuing system would work. In the meantime I can put in a save option on the popup for each image, this might make it a bit easier.
As for RAW support, I doubt if my programming skills are up to that, but I'll see what I can do.

NY Doll, if you can find a copy, check out Delphi 6 personal from Borland, its the easiest way I know to create stand-alone windows apps like this.
Eggy Boil 9 years ago
OK, new version (v1.1) is now up on the webpage...

- EXIF support added .
- Main menu 'Save' function changed to 'Save All'.
- Single image 'Save' function added to image popup menus.
- File overwrite dialog re-formatted.
- Support for jpgs with .jpe extension added.
- Master image copied from original as opposed to being re-calculated.
strollerdos PRO 9 years ago
great work eggy.

much appreciated
Skink74 9 years ago
I've downloaded it but haven't had a chance to try it out yet.
For more than three exposures I worked in batches with the same master image each time. A bit more time consuming than if I had all six open at once, but does the trick.
Quadsk8 9 years ago
Wow, I wish I could programm, 'cause this would be the utility I would have liked to make, it's just what I was missing!

In a perfect world it would accept Canon RAW CR2 files and save as TIF, and preferably with LZH compression. Is there any chance you might consider that for your To-Do list?

TIF-in/TIF-out would be nice for starters, just to have lossless high bit pictures to do HDR with.
Fraggle Red PRO 9 years ago
Eggy, thanks for the efford you're putting into this. I only downloaded v1.0 yesterday just minutes before you uploaded your new v1.1. I haven't had a chance to try it yet, but am hopeful that my most recent autobracketed and handheld attempts can be aligned now.

Since I got a new camera I have a serious problem with handheld HDR. Every time I seem to be rotating the camera slighly between shots. Dunno why, didn't do that with the old one and Photmatix's align tool doesn't manage to align these "rotated" shots. :-(
Eggy Boil 9 years ago
Again, thanks for the feedback everyone :)

I'll improve the interface for better multi-image support, and if I can get hold of useable libraries for Tiff and RAW, I'll try to include support for these too.

However Im off on holiday in a couple of weeks time and Im going to pretty busy with work and stuff till then, so dont be expecting anything major for a while :(

TBH I find it odd that the commercial software packages like Photomatix etc dont have this sort of capability built in, its a bit like putting the cart before the horse.
OldDogNewTrick PRO 9 years ago
Thanks Eggy,

I will give it a try too. Just recently began shooting for HDR, and I don't always have a tripod when the mood hits me. Have had to pass on some images that were too misaligned.
Quadsk8 9 years ago
Mmmm don't know about libraries but for programmers this info about Canon RAW could be interesting:

Photomatix has an alignment function, but sometimes the bottom half seems aligned and nothing but echos at the top half, it is 'automatic' and there is no way to improve something by hand. Best to use a tripod for HDR, but I don't carry it around as much...

Have a nice Holiday, you deserved it after this work on v1.1 ;-)
Jonas Thomén Posted 9 years ago. Edited by Jonas Thomén (member) 9 years ago
Any plans for making a mac version? =)
strollerdos PRO 9 years ago
Thanks eggy - maybe you should offer your code to the commercial versions. Better still would be for this to be a feature in a fully featured piece of open source HDR software.

there is similar code ive noticed for aligning overlapping photos in panorama software like hugin.
...Ashish... 9 years ago
Thanks for the alignment tool - works like a charm!!
JPaul23 PRO 9 years ago
Quadsk8, you can align pictures by hand in Photomatix, I've done it myself. Read the FAQ.
Kris Kros 9 years ago
Pretty hard to use. Unless overlayed pictures are utilized, it's pretty tough to align the pictures using your tool.

But I'm very impressed with the programming effort you gave to this one.
himarj 9 years ago
The program is very useful for hand held HDR shots. Thanks alot !
TrevinC PRO 9 years ago
I haven't tried it yet, but will download when i get home. This tool will be priceless!
Marc Lambrechts PRO 9 years ago
Works fine and with good accuracy. Thanks Eggy!

A nice tool to rework my shaky handheld HDRs during this rainy weekend.

One of my first test results :

Please be seated
ElaraSophia 9 years ago
Thank you so much for writing this tool! It is simple to use and very effective -- it has let me do HDRs with images that Photoshop couldn't align by itself. It is an excellent utility.
Miville Photo Posted 9 years ago. Edited by Miville Photo (member) 9 years ago
Hey, any chance we'll see a Mac version?
Peter Bryl 9 years ago
I second the motion for a Mac version.
me, charlotte PRO 9 years ago
me too :-)
Marc Lambrechts PRO 9 years ago
I have added two more pictures in my stream, aligned with this nice tool.

I found out that aligning in Photomatix the "already aligned LDR pictures" gives the best results.
Photo Steve 9 years ago
Awesome tool!
claustral PRO 9 years ago
I've been having trouble aligning quite a few of my shots, and HDR Alignment tool has solved most of my problems, but some still refuse to sit 100% right.

I align to the pixel level (at max magnification) 3 shots for an HDR using two control points. This should be enough for perfect alignment across the whole image, but what I often find is that the images are sharp near the control points but show ghosting further from those points. It's not moving subject matter, rather it seems like the photos are distorted. These are shots taken straight from the CF card and not manipulated in any way at all (they are JPEGs). The shots were all taken at a fixed aperture in rapid sequence using auto-bracketing, hand-held.

I have now found I have to set one control point and then fiddle with the other to get the best compromise across the image for these troublesome sets.

Has anyone else noted this kind of problem?
Quadsk8 9 years ago
Do you shoot in Aperture mode? I can imagine that with 3 bracketed shots with different Aperture there will be some distortion /change in out of focus blur.
But also if the horizon is somewhat higher/lower the picture will be skewed somewhat different. For the best panorama shots you should align the horizon exactly in the middle it seems. I use Hugin for Panorama shots which requires a lot more than 2 control points and it can skew the separate pictures so that the fit together as a panorama.

Does that help any with your problemsolving?
claustral PRO 9 years ago
Thanks quadsk8. The shots were taken with a fixed aperture. I was more wondering if JPEG compression could possible affect things like this? That said, I have only seen the problem on hand-held shots, not tripod sets - so that suggests the problem is related to movement between shots.
They were not taken with fixed focus now I think about it, but these are all subjects at least 6 metres from the lens, and at f5.6 and above with a wide(ish) focal length I wouldn't have expected that to matter. Perhaps it does?
Skink74 9 years ago
@claustral - I have noticed somthing similar in one of my recent shots (not up yet) where I am having trouble aligning. I suspect I kicked the tripod accidentally between shots and it looks to me like the problem is parallax.
Like you I wouldn't expect focus to be an issue with a wide angle for subjects more than a few metres away, but a parallax shift affects the relative positions of objects in the frame and so with likely throw off the alignment. Sounds like the distortion you mention.
tsk1979 9 years ago
Geocities has a monthly transfer limit. If you dont mind, can I mirror your software on my website?
This way people will not be denied this wonderful app!
Eggy Boil 9 years ago
Hi all... appologies for my recent inactivity, but I've been on holiday for the last couple of weeks :)

@tsk1979... sure, thanks, although I dont think I've hit any of the limits yet, it would be good to have a mirror just in case. Just load the file up to your site and post the link here or msg me.

@claustral... I doubt if your alignment problems are related to focus or JPEG compression. Since you say the shots were taken at a widish angle it is more probable that the issue is due to field of view distortion. This is caused by the way most cameras generate flat images from the spherical rays of light that enter the lens, a pixel near the centre of your image will represent a greater total area of your scene than a pixel near the edge, the geater the field of view, the greater this difference. For small amounts of mis-alignment this isnt much of an issue, but larger amounts will produce images that are impossible to alin properly with the current version of the program.
The only way round this is to map the input images onto the surface of a sphere before aligning, then to project the aligned images back out onto the image plane of the master. I have already written some code that can do this, but didnt include it in the released version as it slows the program down by about 15 times !!! (the spherical trig equations used are quite complex and the whole routine is in serious need of optimisation). The issue is complicated by the fact that a lot lenses at wide angle exhibit a certain ammount of barrel distortion, I have made some prgress in this direction but have no working code at present. Of course your problem could be as Skink74 suggested, ie a parallax error caused by too much camera movement relative to the scene, in which case there is not a lot that can be done I'm afraid :(
However, if you (or anyone else) is interested, I could knock together a beta version using the FOV compensation to see if it helps solve your problem... let me know.

@The Mac users... sorry guys, but I've no idea how to program for a Mac, but if there is someone who does know how and is willing to give me a hand then please get in touch.

@Skink74 and willie whopper... love the pics, you two guys were the final push that I needed to go DSLR, I will be ordering a D50 w/kit lens next week, unless someone can convince me otherwise :)... thnx
btw willie whopper, may I suggest the use of the tag "HDRAT" for those that want to, its less of a mouthfull than "hdralignmenttoolv11" and isnt subject to version changes etc.

@everyone else... thanks for the comments and feedback... very useful and much appreciated.
claustral PRO 9 years ago
Thanks for your thoughts on the misalignment problems. Some very good ideas. Lens distortion is definately a candidate for causing my problem. This lens has notable barrel and pincushion distortion at the extremes of its zoom range. Do you think there may be a simplistic, non-perfect work around by adding more alignment points? Obviously two points should work, put perhaps finding a compromise between 3-4 points might be better for these troublesome shots?

Thanks again for all your work!
Its All Shots 9 years ago
Great stuff, fantastic program!! I havent had the chance to buy myself a tripod yet as i'm hoping for a miracle tripod that can extend upto 6ft and collapse to a foot so it can fit in my bag!! So all my HDR shots (im new) have been taken by hand and this program has solved all the shakes encountered, very user friendly and great result!!

Heres one of the shots i had taken, 3xp's and were all over the place !!

The Great Ol' University
tsk1979 9 years ago
Hi, I have uploaded a the software on my site too. So you have a mirror if geocities runs out of BW
g.h.vandoorn PRO 9 years ago
@claustral: I think your problem might be due to a transformation that can not be solved by the software (which i like a lot btw. Thanks for programming that). The tool only deals with translation and rotation around one axis (am i right Eggy?)
FWIW, I currently use my panorama software, PTAssembler (built on PanoTools) to align my images very accurately. At the same time, I can remove lens distortions and abberations.

But, Photoshops autoalign feature is improving, and I prefer feeding Photoshops Merge to HDR with RAW images.
JimNtexas PRO 9 years ago
Very useful. Outstanding effort, thanks!

Made with three very shakey handheld shots, hdr possible only with this tool:

RedRock handheld
Flamsmark 9 years ago
Any chance of native RAW or TIFF support coming up?
Hari_Menon 9 years ago
Thanks for the tool Eggy... It works like a charm...
raul.sobon 9 years ago
Good program Eggy,
I wish I had the time to do the same.

Some small requests.

1. keyboard control key adjustments for fine movement.
2. is it possible to use 3 or 4 reference points?

nex 9 years ago
I might be able to help port it to the Mac, but ... can it do anything Hugin can't?
Buggs' Photography 9 years ago
Wow, thanks, this is just what I was looking for!
cambria9684 [deleted] 9 years ago
Thank you very much! I've been looking for a program like this and was lucky enough to find yours!
Eggy Boil 9 years ago
Hi all, thanks for the feedback

Most of you will be pleased to hear that version 2.0 is now available

The new version includes many new enhancements...
- Lens Correction module added.
- FOV/Perspective module added.
- Save Options dialog added.
- Improved contrast on brightness sliders.
- Keyboard support for fine control of control poins and sliders (thanks to raul.sobon).
- 25% speed improvement.
- Many other minor tweaks and bug fixes.
AusAlive Photography 9 years ago

Is it possible to set up for use on linux?
MaxymZ 9 years ago
Looks like a briliant tool for me. I have spent few hours on my last (and first) photo to align source images. Will check it for sure :)
Peggie Scott PRO 9 years ago
Nex, I'm a hack using just a little handheld camera and a Mac so thanks for the Hugin question/suggestion. It works just fine.
Teemu R 9 years ago
I just put link to your program into my HDR tutorial blog! Hope you dont mind!
Fraggle Red PRO 9 years ago
Fantastic job, Eggy. Your tool has saved a lot of my hand-held HDRs.
Ramon Snellink 8 years ago
It seems like a really useful tool, yet I can't use it, since I'm on a mac. I would really appreciate it if you could convert it for use on mac :)
hdr_okinawa [deleted] 8 years ago
Nice tool, I have been giving thought into doing more handheld HDR work, a tripod just seems the rock solid way to get the shot though not always a convenient way. :)
J.Livingston PRO 8 years ago
Thank you for that nice tool. its exactly what I needed, because I dont have a tripod. instead I have My S3 in my pockets and shoot whenever it makes sense ;-)
sacheez 8 years ago
is this windows only? Any body try this with a Mac?
viscidlyphotography 8 years ago
This is a total great tool! Thanks for sharing it. Here is an image made possible by your program:
hoolyproductions [deleted] Posted 8 years ago. Edited by hoolyproductions (member) 8 years ago
Musee Rath

I took several shots of this guy in the hope of catching a nice 'stance'. As it worked out I liked all of them so I decided to blend them into a single image.

Not having a time machine, it was rather late for using a tripod, so I used your excellent HDR alignment tool

Then I dragged each of the four aligned pictures on top of each other using the 'darken' blend mode in CS2.

Nice one!
Olynewcastle 8 years ago
Great piece of soft , well done ! It really works !
upcoast 8 years ago
just downloaded it.
have yet to try it but im sure it works great!
I will give feed back when I have some
dmmaus PRO 8 years ago
I'm so glad I found this. I took a lot of hand-held AEB brackets on a recent 3-week vacation and discovered just how misaligned they were and how obviously blurred the resulting composites look only after I got home. I searched for something to align them, and this tool works wonders. Another happy customer. :-)

Kloster St Michael, interior
hooyatalking2 8 years ago
eggy, thank you for making this great tool!

I wish there was a way to temporarily toggle an overlay of the MASTER, with just one of the other two images... I guess that would be a button that allows "muting" either of the two non-master sources. just a suggestion.
Jon the Happy Web Creative Posted 8 years ago. Edited by Jon the Happy Web Creative (member) 8 years ago
Thanks Eggy for the fantastic app! It just opens the horizons for HDR photography. I have a tripod that's only about 1 metre tall - that limits what photos I can take. But your tool frees me of the constraint.

Also the idea of how a simple discussion thread like this can end up with a great app that meet users' needs just blew me away. I hope this doesn't sound naive, but I think this is the way software development should work.
Jon the Happy Web Creative Posted 8 years ago. Edited by Jon the Happy Web Creative (member) 8 years ago
I did a comparison of Photomatix auto-align and HDRAT. Here are the results:


Photomatix Aligned - Artizen Fattal Toned


HDRAT Aligned - Artizen Fattal Toned

And here is a close-up:


I used exactly the same tone-mapping operator with exactly the same settings. The tonality of the images is somewhat different, probably because of the way the images are cropped determine how Artizen tone-maps the images.

Observing the images above, I think it's true that HDRAT does a better job than Photomatix's auto-alignment, although the differences are minute. Examine for yourself by viewing them large. Let me know if you agree, guys.
oernii 8 years ago
Hi, would it maybe possible to extend the program to more that 3 images ? Also the free dcraw could provide RAW image support. And maybe bigger preview windows.

I do want much, I know.
Kumquat Alley 8 years ago
Would you be able to implement the features from AutoPano from and use it to automatically find all the control points between all the images? This would be of great benefit to those times where we are caught doing a hand-held set of bracketing shots.
nex 8 years ago
If you're using AutoPano anyways, why use HDRAT at all? [deleted] 8 years ago
Thankyou very much eggy boil, the software looks great
zontar1066 Posted 8 years ago. Edited by zontar1066 (member) 8 years ago
Hi Eggy Boil, thank you for your software. It's very nice even though the inteface could be, without hassle, even easier.

I've taken a lot of triple sequences of pictures in my recent trip to Cambodia and Thailand, mostly handheld, and the alignement is almost never correct. I suspect lens distortion.
Can you suggest a way to discover lens parameters for my camera (canon A710IS)? I thought one way can be to shoot a picture of a regular grid, and then adjust it in your calibrating panel, but maybe this varies with the zoom factor?

Again, thank you!

BTW the problem arises, even if more subtle, even with tripod pictures..

tuatara57macaw 8 years ago
Eggy Boil: Thank you, thank you, thank you, for making HDR Alignment Tool available. Now there's hope for some of my earlier attempts at HDR--the problems of which I brought on myself by not having a tripod handy.

An enhancement suggestion: Add more Control Points.
zontar1066 8 years ago
Frankz, a friend of mine, excellent photographer and the one who introduced me to HDRi, exlpained me how to correct lens distortion whithout knowing the parameters:

just try and use PTLens. Unfortunately it is not free but you can try it with 10 pictures without watermarks or other hassles.

Then, the biggest improvement on aligning handhel pictures comes from the FOV/FL slider in HDR Alignement Tool. By setting it to the focal you used when the picture was taken, many problems disappear. Just be careful, the values in the slider are 35mm equivalent of your camera focal length. A little bit of math should do the trick.

Now the alignement is much better, not perfect but far, far better.
Thank you Eggy Boil!

HDR image corrected
sassamafracken 8 years ago
wow - this works pretty well. the only thing i hope for in future updates (if they will exist) is the ability to use RAW files. you can lose so much when converting to jpeg!
CsabX Posted 7 years ago. Edited by CsabX (member) 7 years ago
Thanx a bunch Eggy Boil! That looks very promising!
I'll try a HDR with this.
Actually with the trick I'm using in the Canon 40D (in liveview there is no mirror movement, as it's in MLU so it's even faster, 3 shot in about half a sec!!!), I'm able to create very good handheld bracketed shots, but still it's a very valuable tool!

Thanx again!
Javier E. López Posted 7 years ago. Edited by Javier E. López (member) 7 years ago
This tool is great, man. Im doing some "handheld HDR" and I found it better than any other alignment module. I really like the amount of control that it has.
This image was particulary difficult to align:
"tacho" by javier_lopez [?]

but with some tweaking the program made a great job. Thanks and happy new year. J.
ed7929 PRO 6 years ago
where do i send contributions

@gmharrison PRO 6 years ago
this is over two years old...
Metempsyc0se 6 years ago
I maybe is ther a new software for now ?
HDR AT does not take in charge the TIFF format ....a probleme for me
tomgerst 4 years ago
Is this program still available, I could not find it using the links in the article.
Kulu40 PRO 4 years ago
go here.
try the bitbucket link.
Luke I 4 years ago
this was originally posted in 2006. Is it even relevant any more? I never have a problem with software auto aligning my images even when I shoot handheld. Surely the autoalign nowadays does a better job than you can by hand in 5 year old software. You must have some serious misalignment for your software not to be able to merge them itself.
Kulu40 PRO Posted 4 years ago. Edited by Kulu40 (member) 4 years ago
^ yep but bless Eggy for sharing it for free, when it was needed.
Trevor Dennis PRO 4 years ago
'Eggy Boil' That is the best flickr user name I have ever seen. LOL
Groups Beta