Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/panotools-wrappers/pttransform.c [66c04b] .. [495361] Maximize Restore

  Switch to side-by-side view

--- a/src/panotools-wrappers/pttransform.c
+++ b/src/panotools-wrappers/pttransform.c
@@ -59,7 +59,7 @@
     dest->yaw = src->yaw;
     dest->roll = src->roll;
     dest->pitch = src->pitch;
-    
+
     // copy lens correction parameters
     // radial distortion parameters
     if (src->coef[0] != 0.0 || src->coef[1] != 0.0 || src->coef[2] != 0.0) {
@@ -67,9 +67,9 @@
         dest->cP.correction_mode = 0;
         for (j = 0; j < 3; j++) {
             for (i = 0; i < 3; i++) {
-                dest->cP.radial_params[j][i] = src->coef[i];
+                dest->cP.radial_params[j][3-i] = src->coef[i];
             }
-            dest->cP.radial_params[0][3] = 1 - src->coef[0] - src->coef[1] - src->coef[2];
+            dest->cP.radial_params[j][0] = 1 - src->coef[0] - src->coef[1] - src->coef[2];
         }
     }
 
@@ -217,7 +217,7 @@
     return trans;
 }
 
-int panoTransformInvApply(pt_transform *transform,
+int panoTransformForward(pt_transform *transform,
             double x_in, double y_in, double *x_out, double *y_out )
 {
     // convert destination screen coordinates to cartesian coordinates
@@ -235,7 +235,7 @@
 }
 
 
-int panoTransformApply(pt_transform *transform,
+int panoTransformInverse(pt_transform *transform,
             double x_out, double y_out, double *x_in, double *y_in )
 {
     // convert destination screen coordinates to cartesian coordinates