[Gimp-user] image alignment/registration



Ok -- I believe PS is beating align_image_stack because the picture 
seems to have been taken with a very wide lens (i.e. short focal
length)
from close up... as a result, there is a lot of barrel distortion, and
in addition there is a lot of camera movement between frames, so the 
result is that the image distorts differently from frame to frame and 
align_image_stack is not able to do it automatically. Meaning, when
you
turn the camera that much, it "bends" the contents of the image in 
various different ways that make the images much harder to align. PS 
might be able to automatically correct for that distortion, but 
align_image_stack seems to struggle with it -- I get the same bad 
alignment results you did, but read on for more ideas:

Yeah, I suspect it had to do with the lens distortion, but, in this specific
photo, I couldn't have place myself more distant because that was a corridor.

If you can use a longer focal length and stand farther away, and also 
hold the camera more still, I think it will work better (and have less
barrel distortion as well.) Your PS screenshot also looks like there
was
some kind of contrast or something applied (by PS, I assume? -- maybe 
related to the layer overlay mode when you stack the frames? -- or
maybe
PS is just doing a better job!)


The only thing I did was applying the input script open stack or something like
that (can't remember at this point its name) and changing the opacity. You're
probably right assuming PS did some ajustments, because it probably calls Camera
Raw under the hoods when opening the raw files, and by default, Camera Raw uses
to open with some default settings already applied.

But note this: you don't have to, and probably shouldn't, use the
manual
layer stacking method. That creates a simple averaging of the pixels, 
and it's probably pretty tedious to set up. There is another utility
you
can use to create the median, instead of the average (aka mean), of
the
image, which usually looks better. After I do align_image_stack, I use
gmic <http://gmic.eu/> to take the median of the files. The command
line
looks like this (where test0001.tif etc are the images after
alignment):

   gmic -median_files test\*.tif -o output.tif

(you have to use "\*" with wildcards in gmic for whatever reason.)


I have tried the median method but, somehow, I generally prefer the median. As
for the process being tedious, you're right, it is, although there is a much
simpler way of doing exactly the same thing in PS, just by changing all the
layers into Smart Object. Then you can apply in a single click the various
stacking modes (including, of course, mean and median). Anyway, I'll give gmic a
try.

Then I take the resulting output.tif file, open it in gimp, change the
precision to 8 or 16bit, and remove the alpha channel (right-click the
layer). This is the result of that process: 
http://caseyconnor.org/pub/image/aligned_and_medianed.tif


It certainly looks very good!
However, it's not clear after all, if you used gmic after align_stack or just
applied it directly to the original frames.

I think it looks pretty good -- maybe not as nice as photoshop, but
that
may just be the "contrast" that PS seems to have added. Note how the 
median, as opposed to the mean, eliminates the most mis-aligned frames
automatically: those bad frames are left in if you average/mean the 
frames. As mentioned, I think you can make it look a lot better by 
taking better original pictures.

Even if you use PS to align the images, you should look into using
gmic
to take the median, rather than stacking the layers. Just remember
that
gmic outputs 32bit-float RGBA images, and you'll usually want/need to 
convert those to something more common.

(Note: current stable releases of gimp don't support high-precision 
images -- not sure if they will open the 32bit out of gmic or not. I'm
using 2.9.5.)

-c

I'm using the latest developing version, 2.9.something, and it already supports,
at least, 16-bit images. Not sure about 32-bit.

I feel like the open source tools are getting close to PS, regarding the
stacking process. As for the rest, RawTherapee is really an option, and maybe
Gimp sooner.

-- 
oneaty (via www.gimpusers.com/forums)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]