Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
EquiRectangular Projection Help
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan  
View profile  
 More options Feb 14 2012, 8:33 am
From: Dan <dansut...@gmail.com>
Date: Tue, 14 Feb 2012 05:33:49 -0800 (PST)
Local: Tues, Feb 14 2012 8:33 am
Subject: EquiRectangular Projection Help
Hello everyone,

I am new to this group and this is my first post. I am in a way of
learning and knowing more about panoramas and its process since last
whole year. I have gone through almost all tutorials (including
panotools and hugin's) and many other papers on google and those on
other universities's site. But till date, I am not able to find the
exact foumullas to stitch images in to an equirectangular pano. 6
months ago, I was limited to only cylindrical and partial spherical
projections. But as I came across the full view 360x180
equirectangular one, it seemed interesting to me(a lot, in fact). But
let me very frank, since those last 6 months, I have been stuck on
that only. I tried searching everywhere, but I didn't find "HOW TO
ACTUALLY MAKE IT". Then I looked at panotools. The source has some
methods of generation of an equi panorama. I tried understanding it
many times, but still i am not getting it.

Can anyone here, show or point me exactly to that part in code which
applies distortion on equirectangular pano. This has nothing to do
with the stitching part. Just projection is involved.

The tutorials online and most other documents don't actually go deep
in to it. Can anybody help?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dmg  
View profile  
 More options Feb 14 2012, 11:41 am
From: dmg <d...@uvic.ca>
Date: Tue, 14 Feb 2012 05:41:58 -1100
Local: Tues, Feb 14 2012 11:41 am
Subject: Re: [hugin-ptx] EquiRectangular Projection Help

Are you interested in creating the panorama or the software that
creates the panorama?

--dmg

> Can anyone here, show or point me exactly to that part in code which
> applies distortion on equirectangular pano. This has nothing to do
> with the stitching part. Just projection is involved.

> The tutorials online and most other documents don't actually go deep
> in to it. Can anybody help?

> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/hugin-ptx

--
--dmg

---
Daniel M. German
http://turingmachine.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan  
View profile  
 More options Feb 14 2012, 12:25 pm
From: Dan <dansut...@gmail.com>
Date: Tue, 14 Feb 2012 09:25:33 -0800 (PST)
Local: Tues, Feb 14 2012 12:25 pm
Subject: Re: EquiRectangular Projection Help
in the software that creates the panorama

On Feb 14, 9:41 pm, dmg <d...@uvic.ca> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kfj  
View profile  
 More options Feb 14 2012, 12:55 pm
From: kfj <_...@yahoo.com>
Date: Tue, 14 Feb 2012 09:55:58 -0800 (PST)
Local: Tues, Feb 14 2012 12:55 pm
Subject: Re: EquiRectangular Projection Help

On 14 Feb., 18:25, Dan <dansut...@gmail.com> wrote:

> in the software that creates the panorama

The code which does the transformations is in libpano. First you have
to get a checkout of the code from their repository. Then you have to
look into the file math.c. The routines from where you can find your
way down are 'execute_stack' and 'execute_stack_new'.

The transform is a rather complicated sequence of separate partial
transforms, including translations, rotations and more involved stuff.
These are modelled as individual functions which are put onto a stack,
which is, later on, executed for every target pixel in the warped
image. The execution of the transformation stack is done inside the
warping routine, and once the source location needed for the target
pixel has been determined, it's interpolated from the source image and
written to the target. Then the same is done for the next target pixel
and so on. I wish there was proper documentation for this - I have had
to work it out from the sources myself. If you want to just play with
the transform and not dig into the C code, you can use the utility
program pano_trafo which comes with hugin, and if you have a python-
enabled hugin, you can use the transforms in python as well.

Kay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dmg  
View profile  
 More options Feb 14 2012, 3:46 pm
From: dmg <d...@uvic.ca>
Date: Tue, 14 Feb 2012 09:46:57 -1100
Local: Tues, Feb 14 2012 3:46 pm
Subject: Re: [hugin-ptx] Re: EquiRectangular Projection Help

The only thing that I would add to Kay detailed response is that the
equirectangular
is a very special type of projection in libpano. It is sort of the
intermediary projection
between fisheye or rectilinear and most projections. This is partially
because it
has the property x = \lamba and y =  \phi

--dmg

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

--
--dmg

---
Daniel M. German
http://turingmachine.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dhaval S  
View profile  
 More options Feb 14 2012, 9:44 pm
From: Dhaval S <dansut...@gmail.com>
Date: Wed, 15 Feb 2012 08:14:27 +0530
Local: Tues, Feb 14 2012 9:44 pm
Subject: Re: [hugin-ptx] Re: EquiRectangular Projection Help

> The code which does the transformations is in libpano. First you have
> to get a checkout of the code from their repository. Then you have to
> look into the file math.c. The routines from where you can find your
> way down are 'execute_stack' and 'execute_stack_new'.

Ya, i have checked both routines, the functions in math.c and also those in
remap.c. As you told the transformation is rather complicated one(even i
fear the same looking at the code), I was not able to locate the only piece
that does what i need.

and ya, I too feel the same of digging in to sources only when it comes to
understanding something with libpano. Why didn't they built
a documentation? I tried even searching on google if anyone else has
written but failed. Meanwhile let me try looking at pano_trafo.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dhaval S  
View profile  
 More options Feb 14 2012, 9:45 pm
From: Dhaval S <dansut...@gmail.com>
Date: Wed, 15 Feb 2012 08:15:52 +0530
Local: Tues, Feb 14 2012 9:45 pm
Subject: Re: [hugin-ptx] Re: EquiRectangular Projection Help

ya, is it so that libpano is converting all coordinates to spherical first
then processes them, and at the end converts back them to what is required
by the projection ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kfj  
View profile  
 More options Feb 15 2012, 5:31 am
From: kfj <_...@yahoo.com>
Date: Wed, 15 Feb 2012 02:31:54 -0800 (PST)
Local: Wed, Feb 15 2012 5:31 am
Subject: Re: EquiRectangular Projection Help

On 15 Feb., 03:45, Dhaval S <dansut...@gmail.com> wrote:

> ya, is it so that libpano is converting all coordinates to spherical first
> then processes them, and at the end converts back them to what is required
> by the projection ?

Yes. The coordinates are actually converted into 3D real-worls
coordinates, so that the extrinsic transformation (yaw, pitch, roll)
can be performed. So, since you start out with target coordinates,
first it's target projection to spherical, then rotate, then spherical
to source image projection, then the intrinsic transformations - lens
type (rectilinear, fisheye etc.), lens correction. Finally you arrive
at the location in the source image to look at and get the data from.

Kay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan  
View profile  
 More options Feb 15 2012, 8:30 am
From: Dan <dansut...@gmail.com>
Date: Wed, 15 Feb 2012 05:30:33 -0800 (PST)
Local: Wed, Feb 15 2012 8:30 am
Subject: Re: EquiRectangular Projection Help
Exactly. But, think the case where I am my self providing the
theta,phi of the center pixel of image (or some people say sight of an
image), then how would i find those for rest of pixels?

On Feb 15, 3:31 pm, kfj <_...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kfj  
View profile  
 More options Feb 16 2012, 3:33 am
From: kfj <_...@yahoo.com>
Date: Thu, 16 Feb 2012 00:33:51 -0800 (PST)
Local: Thurs, Feb 16 2012 3:33 am
Subject: Re: EquiRectangular Projection Help

On 15 Feb., 14:30, Dan <dansut...@gmail.com> wrote:

> Exactly. But, think the case where I am my self providing the
> theta,phi of the center pixel of image (or some people say sight of an
> image), then how would i find those for rest of pixels?

I don't follow your argument. Please make sure when talking about
'image', whether you are refering to the source image (i.e. the photo
you are processing) or the target image (i.e. the 'warped' image you
want to make which is to be blended into your panorama)

If you want to start from source image coordinates (which is what I
guess you mean), you need a forward transform, doing first the
intrinsics, then the rotations and then the transformation into the
target projection. This route is not usually taken (there are
exceptions, tough). The usual method is an inverse transform from
target coordinates to source coordinates. Try and play with
pano_trafo, and you'll get a feel for it.

Kay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan  
View profile  
 More options Feb 16 2012, 12:56 pm
From: Dan <dansut...@gmail.com>
Date: Thu, 16 Feb 2012 09:56:47 -0800 (PST)
Local: Thurs, Feb 16 2012 12:56 pm
Subject: Re: EquiRectangular Projection Help
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? 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;

Where do these formulas come from? Isn't there atleast some
documentation of this libpano anywhere ???

On Feb 16, 1:33 pm, kfj <_...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kfj  
View profile  
 More options Feb 17 2012, 4:22 pm
From: kfj <_...@yahoo.com>
Date: Fri, 17 Feb 2012 13:22:27 -0800 (PST)
Local: Fri, Feb 17 2012 4:22 pm
Subject: Re: EquiRectangular Projection Help

On 16 Feb., 18:56, Dan <dansut...@gmail.com> 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.

... 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan  
View profile  
 More options Feb 19 2012, 9:01 am
From: Dan <dansut...@gmail.com>
Date: Sun, 19 Feb 2012 06:01:17 -0800 (PST)
Local: Sun, Feb 19 2012 9:01 am
Subject: Re: EquiRectangular Projection Help
thanks for helping

On Feb 18, 2:22 am, kfj <_...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »