Tuesday, 17 May 2016

hugin - Cannot align images with align_image_stack


align_image_stack is free and part of the Hugin tools. However, sometimes aligning images fails, or will give you awkward results - especially in the case of blurry images with little contrast. So it either finds no match between pictures, or the pictures will be rotated by 40 or 70 degrees even if you have used a tripod...


So, what can you do?




Answer





  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.





No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...