Talk:Align image stack
Some findings from my experiments with Stereo image parameters in align_image_stack
The parameters I believe that apply are: -i, -S, -A, -P. The command I finally ended up with was: /Applications/Hugin/HuginTools/align_image_stack -i -a AIS_ -S -A -P IMG_????.JPG But, refer to Vladimir's comments below.
From Thomas: "This feature was implemented by Vladimir Nadvornik (http://groups.google.com/group/hugin-ptx/browse_thread/thread/eb25297bdc55102b). See http://vndlinuxphoto.blogspot.de/2011/01/stereo-image-alignment-in-hugin.html for a tutorial and more details."
-i - Optimize image center shift for all images, except for first.
I added this parameter because Vladimir used it in his tutorial mentioned above. Without it the second image I experimented with tended to have some blank space along the left edge. When I used -i that space seemed to diminish and be better balanced between the left and right edges; ... centered it it did.
The first time I tried aligning my two images I didn't use any of the options -i, -S, -A, -P ... the effect was a 3D rendering but I believed the 3D effect looked better towards the outside of the image when I adding in the -S parameter.
-S - Assume stereo images - allow horizontal shift of control points.
Without the -S option the right image was about 1.5% shorter between horizontal points then the left. With the -S option this changed to about 2.3% (which matched the difference in the original images). I was mostly moving away from the scene in my images so I think this foreshortening is a normal effect and should remain the same as the originals, as happened using the -S parameter.
-A - Align stereo window - assumes -S.
This is not, as I first thought, referring to two windows (one on each stereo image) ... otherwise I guess they'd call it "stereo windows". This refers to the window that you're looking at the stereo image through (best understood if you're looking at an Anaglyph). So, reread this after reading about -P below ... the stereo window is at the screen and within the window frame containing the image and anything "popping out" would appear to be in front of the stereo window.
-P - Align stereo window with pop-out effect - assumes -S.
It seems that this refers to the idea of part of your image appearing to be in front of the screen plain; that is, parts of the picture seem to "pop-out" of the screen. With my mountain scene it didn't seem to have an effect ... maybe it would if there was something in the image a lot close to the camera. So, without -P everything would be deeper then the screen itself; whereas with the -P option you can have things jump out at you.
I'm thinking that you use -A or -P but not both. I don't know which one would override the other when both are included.
From Terry: "The "stereo window" is the frame, or plane, in which the stereo pair are viewed, some parts of the image may be behind and some in front. I think "pop out" refers to having some or all of the image appear in front of the stereo window."
|The description of the "stereo window" above is correct.|
|align_image_stack with -S adds all control points as "horizontal lines". Then, with -A or -P it adds one "normal" control point, that controls horizontal shift of the images.|
|The point with zero horizontal shift will appear to be in the display plane, points with positive shift will appear behind, points with negative shift will appear in front of the plane.|
|-A selects the nearest point so everything will appear behind the display plane.|
|-P selects the nearest point from the border areas so the center of the image may appear in front of the display plane, depending on the photo.|
|After some experiments I now use these options for stereo alignment:|
|align_image_stack -p out.pto -x -s 4 -P -C right.tif left.tif|
|Sometimes, the closest point is identified incorrectly, in that caseI open hugin, delete the only "normal" point and add it again on the object that should be in the display plane.|