I am sorry Guido  I dropped the ball from this.

(This discussion should go into libpano, but there is also an issue
with hugin).

Hi Guido,


I am looking at your patch right now, and I see you changed some of
the computations.  The biggest one I don't quite follow is:

replacing:

-       C = cos(phi1) * cos(phi1) + 2.0 * n * sin(phi1);

with

+ C = 1.0 + Aux_sin_phi1 * Aux_sin_phi2;

I can try to follow the math but it is easier to ask you ;)

Also, with respect to making it rho0 a huge number instead of letting
the computation proceed with an INF value:

rho0 = ( (n != 0) ? (Aux_1 / n) : (1.7E+308) );

I would prefer we use INF and deal with that where appropriate, which
is the result of the calculation of the projection. Is hugin handling
INF properly? It might be a problem in hugin, not in libpano.

-       twiceN = sin(phi1) + sin(phi2);
-       n = twiceN /2.0;

-       rho0 = sqrt(C - 2.0 * n * sin(phi0)) / n;
+    // precompute sinus functions
+    Aux_sin_phi0 = sin(phi0);
+    Aux_sin_phi1 = sin(phi1);
+    Aux_sin_phi2 = sin(phi2);
 
+       Aux_2N = Aux_sin_phi1 + Aux_sin_phi2;
+    n = Aux_2N / 2.0;
+
+    // C = cos(phi1) * cos(phi1) + 2.0 * n * sin(phi1);
+    // rho0 = sqrt(C - 2.0 * n * sin(phi0)) / n;
+    Aux_1 = (C - (Aux_2N * Aux_sin_phi0));
+    Aux_1 = ( (Aux_1 > 0) ? (sqrt(Aux_1)) : (0.0) );
+    rho0 = ( (n != 0) ? (Aux_1 / n) : (1.7E+308) );
+



-- 
--
Daniel M. German                  
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

--
Daniel M. German                  "Sooner or later all the peoples of the world,
                                   without regard to the political system
                                   under which they live,
                                   will have to discover a way
   Martin Luther King, jr. ->      to live together in peace."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 

--~--~---------~--~----~------------~-------~--~----~
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 hugin-ptx@googlegroups.com
To unsubscribe from this group, send email to 
hugin-ptx-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---

Reply via email to