thanks for helping

On Feb 18, 2:22 am, kfj <[email protected]> wrote:
> On 16 Feb., 18:56, Dan <[email protected]> wrote:
>
> > sorry,,i forgot to mention that I was talking about forward transform
> > and the image was the source image. and most of time they do inverse
> > transform. I just went for forward just to understand. It should work
> > atleast (even if it leaves some pixels blank, thats not the concern
> > right now), I dont want to go for interpolation. Thing is just it
> > should work, quality i will check later on.  I was reading the source
> > code of libpano and stuck again. Can you tell me what these lines are
> > doing in math.c of libpano library ?
>
> > what is sphere_tp_erect doing?
>
> sphere_to_erect converts from spherical coordinates to equirectangular
> projection, says it's name - and that's about all I know.
>
>
>
>
>
>
>
>
>
> > and these lines in it? ::
> > phi     = x_dest / distanceparam;
> >         theta   =  - y_dest / distanceparam  + PI / 2;
> >         if(theta < 0)
> >         {
> >                 theta = - theta;
> >                 phi += PI;
> >         }
> >         if(theta > PI)
> >         {
> >                 theta = PI - (theta - PI);
> >                 phi += PI;
> >         }
>
> >         s = sin( theta );
> >         v[0] =  s * sin( phi );        //  y' -> x // sin(theta)*sin(phi)
> >         v[1] =  cos( theta );                          //  z' -> y // 
> > cos(theta)
>
> >         r = sqrt( v[1]*v[1] + v[0]*v[0]);
> >        theta = distanceparam * atan2( r , s * cos( phi ) );
>
> >         *x_src =  theta * v[0] / r;
> >         *y_src =  theta * v[1] / r;
>
> ... I fear you'll have to figure it out yourself. I suppose it's
> reasonably sraightforword trigonometry, but I haven't looked into the
> details - I'm more interested in using the transforms than
> understanding their inner workings, so I can't really help you there.
>
> > Where do these formulas come from? Isn't there atleast some
> > documentation of this libpano anywhere ???
>
> you'll have to do some research. Try
>
> http://wiki.panotools.org/Projection
>
> for starters and see where it takes you. It's a complex topic. Trying
> to figure out libpano isn't for the fainthearted. If you want it
> simple and well-documented, this is probably not where you want to
> look. Best of luck
>
> Kay

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

Reply via email to