Re: [Gimp-user] image alignment/registration

2017-03-29 Thread Casey Connor



So, by looking at the help text, it seems that you used all the options suited
to focus stacking.


At least in the help file I'm looking at, I think the only option "for" 
focus stacking is -m ? For lenses with focus breathing (i.e. almost all 
lenses) if you are changing the focus for each shot, that will have the 
effect of changing the FOV a little bit, and that option apparently 
enables correction for that effect. But it may also be useful if you 
happened to move forward/back a bit between shots (which isn't really 
the same as zooming, of course, but is similar). You could try not using 
-m and see if it makes a difference for your use.


-x -y and -z sound like they attempt to correct for moving around 
slightly when you take the picture (i.e. translational as opposed to 
rotational changes?)


-d sounds like it might compensate for distortion due to rotation (i.e. 
the distortion when you are close with a wide angle lens) but I'm just 
guessing. :-)


I think the lesson is that align_image_stack defaults to not applying 
most of the corrections, and if you want them, you have to enable them.


I wonder if --distortion would also be a smart thing to turn on.

-c

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-29 Thread Casey Connor
D'oh, the -d option! And -x -y -z sound promising as well. Not clear 
what -i does -- doesn't it always optimize the center shift? Or does 
"center shift" mean something more complex than simple x/y translation?


Thanks, Pat! Pays to RTFM. The hugin toolkit continues to amaze me.

That generates a result as good as photoshop for me, judging from the 
demo that oneaty posted. Good to learn how to better use this tool.


-c

On 03/29/2017 06:43 AM, Pat David wrote:

align_image_stack.exe -v -m -d -i -x -y -z -a aligned_ *.tif

Gave me pretty rock solid results with your .tif files:

https://transfer.sh/DgimG/oneaty.zip

pat

On Tue, Mar 28, 2017 at 3:03 PM oneaty  wrote:


Could I have another link to the images to test something?

Sure.

https://goo.gl/photos/GCoSg4uANxLGunDAA


--
oneaty (via www.gimpusers.com/forums)
___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list



___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-27 Thread Pat David
Could I have another link to the images to test something?

On Mon, Mar 27, 2017 at 12:59 PM oneaty  wrote:

> >One last thought: if you are going to remove the barrel distortion in
> >those images, you might try removing it before doing the image
> >alignment... that might allow align_image_stack to work better... -c
>
> That's a good idea, I'll try that.
>
> Besides, many thanks for your patience and willingness to help.
>
> I hope soon Gimp will present us a new alignment algorithm so we can
> forget,
> forever and ever, closed source apps.
>
> Best wishes!
>
> --
> oneaty (via www.gimpusers.com/forums)
> ___
> gimp-user-list mailing list
> List address:gimp-user-list@gnome.org
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
> List archives:   https://mail.gnome.org/archives/gimp-user-list
>
-- 
https://patdavid.net
GPG: 66D1 7CA6 8088 4874 946D  18BD 67C7 6219 89E9 57AC
___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-27 Thread Casey Connor
One last thought: if you are going to remove the barrel distortion in 
those images, you might try removing it before doing the image 
alignment... that might allow align_image_stack to work better... -c



___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-27 Thread Casey Connor

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 did align_image_stack, and then applied gmic to the aligned frames.


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


Yeah, it should work fine.

It's interesting to see that PS apparently handles lens distortion when 
aligning images -- those are impressive results. But maybe 
align_image_stack + gmic + gimp can work for you in some cases, too.


Good luck with it,
-c

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-26 Thread Casey Connor
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:


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!)


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  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.)

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


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

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-25 Thread Casey Connor



I tried

align_image_stack -a align -g 10 -t 5 *.tif


Did you try with a lower-than-default -g? E.g. "-g 3"?

If you want to upload the base .tif files somewhere, I can try to align 
them, so we can see if there is some strange difference between 
align_image_stack on our machines.


-c

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-24 Thread Casey Connor

Ah, ok. So what exactly goes wrong: one or two of the images is off-kilter?

If you specify -g, try using something besides the default, as I'm not 
sure that using the default will change the behavior. (Meaning, not 
specifying -g probably results in the same thing as just "-g" -- the 
documentation is a little unclear, but I assume it's active when not 
specified.) Perhaps try -g 3 or 4 instead? I'm not 100% sure how to 
interpret it. If that doesn't work, try 6 or 7?



Btw, what os are you using?


Kubuntu 16.10.

-c

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-24 Thread Casey Connor
So, backing up a step: when you say align_image_stack doesn't work, what 
do you mean exactly? I assumed you meant that it did a poor job aligning 
the images, but I don't think the command lines you list there would 
even work to start the program, so I'm wondering now if you meant that 
it doesn't even run?


"-a" requires a prefix following it, and "-g" requires a number.

E.g.:

align_image_stack -a someprefix -g 8 *.tif

Documentation is here: http://wiki.panotools.org/Align_image_stack

___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-03-24 Thread Casey Connor

Did you try the -g option with align_image_stack? Or -t?

I align hand-held images with align_image_stack and it works fine, even 
without those options... e.g. this one: 
https://www.flickr.com/photos/lacinato/32628735771/in/dateposted-public/


-c

On 03/24/2017 12:58 PM, oneaty wrote:

Per recommendations here, I've used it and it worked really well; I've
read, and experienced, that it seems to need images to be pretty close

Thanks for the feedback.
I believe if I shoot with a tripod it would work fine.
The point is that a tripod isn't an option to me most of the time.
My only camera is an old point & shoot Canon A3100, boosted by CHDK. CHDK has
many wonderful features, but the one I mostly use is its raw capability, not
available on Canon original  firmware.
Besides, I usually do a lot of stacking, pushing the final image quality to its
limits.
And here is my problem.
With PS, I can auto align hand held shots with excellent results. The
differences in perspective between shots do exist but are not big, because I try
to hold the camera the most steadier I can when shooting.
I just came from aligning the same set of pictures in PS I tried in Hugin, and
it worked almost perfectly.
Before that, I had also tried using JImage (and its full package FiJi), but it
is really, really complex and I gave up.
So, unfortunately (being an open source fan), I will still have to keep with PS,
until I find an open source alternative to its auto alignment feature.




___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list


Re: [Gimp-user] image alignment/registration

2017-02-05 Thread Pat David
Align_image_stack is usually the best option other than possibly attempting
it manually directly in Hugin.
On Sat, Feb 4, 2017 at 8:57 PM Casey Connor 
wrote:

> Hi - I was curious what the best overall image alignment plugin/method
> in GIMP (or out of GIMP) was these days?
>
> "Best" for me means "most powerful/flexible/option-rich".
>
> I've come across the hugin align_image_stack, the G'MIC plugin's "Align
> layers" option, and the image registration plugin
> . (I've also used the "Exact
> Aligner" script, but it's two layers only.)
>
> The goal is to align and then use mean/median for noise reduction
> stacking. I'll probably be working in 16bit.
>
> Do all three methods do sub-pixel alignment? I read someone on pixls.us
> suggesting that the user upscale the source images by up to 1.33x before
> aligning for the sake of effectively achieving sub-pixel alignment, but
> if the current alignment methods do that anyway, seems like I should
> skip it... ?
>
> Thanks!
>
> -c
>
>
> ___
> gimp-user-list mailing list
> List address:gimp-user-list@gnome.org
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
> List archives:   https://mail.gnome.org/archives/gimp-user-list
>
-- 
Pat David
GPG: 66D1 7CA6 8088 4874 946D  18BD 67C7 6219 89E9 57AC
___
gimp-user-list mailing list
List address:gimp-user-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list