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?
On Tue, Feb 14, 2012 at 2:33 AM, Dan <dansut...@gmail.com> wrote: > 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.
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
> On Tue, Feb 14, 2012 at 2:33 AM, Dan <dansut...@gmail.com> wrote:
> > 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.
> 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 athttp://groups.google.com/group/hugin-ptx
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.
On Tue, Feb 14, 2012 at 6:55 AM, kfj <_...@yahoo.com> wrote:
> 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.
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
> 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.
On Tue, Feb 14, 2012 at 11:25 PM, kfj <_...@yahoo.com> wrote:
> 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 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
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 ?
On Wed, Feb 15, 2012 at 2:16 AM, dmg <d...@uvic.ca> wrote: > On Tue, Feb 14, 2012 at 6:55 AM, kfj <_...@yahoo.com> wrote:
> > 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.
> 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
> -- > 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
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.
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 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.
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.
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? ::
> 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.
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 ???
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
> 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 ???
> 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