Hi,

after some experimenting I have found that the mosaic mode provides exactly 
the right transformation for stereoscopic images.
The attached patch adds options for this mode to align_image_stack.

Regards,
Vladimir

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
diff -r 389d0ad73d00 -r 517766989028 src/tools/align_image_stack.cpp
--- a/src/tools/align_image_stack.cpp	Mon Nov 21 21:19:13 2011 +0100
+++ b/src/tools/align_image_stack.cpp	Wed Nov 23 22:30:37 2011 +0100
@@ -85,6 +85,9 @@
          << "             Useful for aligning focus stacks with slightly different magnification." << std::endl
          << "  -d        Optimize radial distortion for all images, except for first." << std::endl
          << "  -i        Optimize image center shift for all images, except for first." << std::endl
+         << "  -x        Optimize X coordinate of the camera position." << std::endl
+         << "  -y        Optimize Y coordinate of the camera position." << std::endl
+         << "  -z        Optimize Z coordinate of the camera position." << std::endl
          << "             Useful for aligning more distorted images." << std::endl
          << "  -S        Assume stereo images - allow horizontal shift of control points." << std::endl
          << "  -A        Align stereo window - assumes -S." << std::endl
@@ -410,6 +413,9 @@
     bool optHFOV;
     bool optDistortion;
     bool optCenter;
+    bool optX;
+    bool optY;
+    bool optZ;
     bool fisheye;
     bool stereo;
     bool stereo_window;
@@ -600,6 +606,15 @@
                 vars.insert("d");
                 vars.insert("e");
             }
+            if (param.optX) {
+                vars.insert("TrX");
+            }
+            if (param.optY) {
+                vars.insert("TrY");
+            }
+            if (param.optZ) {
+                vars.insert("TrZ");
+            }
             optvars.push_back(vars);
         }
         delete leftImg;
@@ -706,7 +721,7 @@
 int main(int argc, char *argv[])
 {
     // parse arguments
-    const char * optstring = "a:ef:g:hlmdiSAPCp:vo:s:t:c:";
+    const char * optstring = "a:ef:g:hlmdiSAPCp:vo:s:t:c:xyz";
     int c;
 
     opterr = 0;
@@ -757,6 +772,15 @@
         case 'i':
             param.optCenter = true;
             break;
+        case 'x':
+            param.optX = true;
+            break;
+        case 'y':
+            param.optY = true;
+            break;
+        case 'z':
+            param.optZ = true;
+            break;
         case 'S':
             param.stereo = true;
             break;

Reply via email to