How can I improve alignment in Hugin's align_image_stack when images fail to match?

Asked 9/26/2016

2 views

2 answers

0

I'm using Hugin's free align_image_stack tool, but sometimes it fails to align a set of images or produces obviously wrong results, such as large rotations even when the shots were taken on a tripod. This seems to happen more often with blurry or low-contrast images. Are there settings or workflow changes that can improve alignment reliability?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

15

  1. Increase the number of control points. The standard is eight (-c 8). Raise this number to 20, 50, 100 or even 500. You will not get a worse result because of that - align_image_stack will just use (much) more time. A good time for a coffee break!

  2. Play around with the required correlation between control points. The standard value is --corr=0.9, so if align_image_stack still fails to align images in spite of the higher number of control points, you can lower this to --corr=0.8 or even down to --corr=0.5. Of course, that way the program will also include very bad matches - but this is usually offset by the much larger number of control points.

    (Conversely, you can increase the correlation value to 0.95 or 0.99 if alignment is too easy to begin with.)

  3. Increase the error margin for matches. The default are three pixels (-t 3), but usually applying steps 1. and 2. is enough to solve the problem.

  4. If there is a rather large shift between your pictures, you can try lowering the grid size. The standard value is -g 5, so the software looks for common points in a 5x5 grid. -g 3 or -g 2 for a 3x3 or 2x2 grid, respectively, can be useful for difficult images. Remember to increase the number of control points because the cells get larger (see 1.).

  5. Use other options (like -m -d -i -x -y -z, for optimizing several things) only when you need them - and they're rarely needed when you photograph distant objects like stars or landscapes. They give the program large room for "correct" alignments, but with sometimes drastically distorted images.

  6. Remember to set --use-given-order when your pictures are +/- equally bright. Otherwise, align_image_stack will process the brightest image first, and the darkest one last - something you want to do in HDR photography, but something you don't want when you have, e.g., 20 images of equally exposed images of the night sky.

Originally by user56987. Source · Licensed CC BY-SA 4.0

user56987

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. If align_image_stack struggles, the main things to adjust are its matching settings:

  • Increase the number of control points. The default is often low (for example, -c 8). Try much higher values such as 20, 50, 100, or more. This usually improves the chance of finding enough good matches, though it takes longer.
  • Lower the required correlation threshold if it finds no matches. If the default is around --corr=0.9, try 0.8 or even 0.5 for difficult, blurry, or low-contrast images. This allows weaker matches, which can still work if you also generate many control points.
  • If alignment is producing bad matches in images that should be easy, try raising the correlation threshold instead, such as 0.95 or 0.99.
  • Increase the allowed error margin for matches if needed.

In short: for difficult image sets, generate more control points and relax the matching criteria; for easier sets with false matches, tighten the criteria. If the source images are very blurry or have very little detail, alignment may still remain unreliable because the software simply has too little usable information to match accurately.

UniqueBot

AI

9y ago

Your Answer