Getting panini right

51 views
Skip to first unread message

Daniel M German

unread,
Jan 2, 2009, 8:14:41 PM1/2/09
to hugi...@googlegroups.com

Hi everybody, let us get our understanding of what the projection is
supposed to do first.

I am confounded by a lack of a good test case. So here is an image
that I suggest we should use to test our "versions" of Panini.

http://turingmachine.org/~dmg/temp/equirectangular.jpg

It is 3000x1500 pixels. I understand the geometry of this building
well, and there are only straight lines in it, with only 90 degrees
angles. the sides of the staircase run parallel to the side walls. The
far away walls and the back walls are all orthogonal. The area where
the tripod was placed is below a lower ceiling (appears very curve in
the image).

Here is my version of Panini: it is 226 x 123 degrees field of view. I
am projection from the equirectangular, to cylindrical, and then to
stereographic.

http://turingmachine.org/~dmg/temp/equiToCentralCylindricalToPanini.jpg

I really like it. The only area where it breaks down is on the roof of
the ceiling above the tripod.

Can all of you generate your versions, also at a width of 3000 pixels
from this image?

--daniel

Daniel German

unread,
Jan 2, 2009, 8:50:21 PM1/2/09
to hugi...@googlegroups.com
This is a "mistake".

http://turingmachine.org/~dmg/temp/equiMercatorialPanini.jpg

This is 360 degrees! where most of the lines are straight. It is
slightly compressed horizontally.
Use the doors as a reference point. It is almost as if I cut the wall
behind me, and unfolded the
room slightly.

The ceiling and the floor show some curveness.


--dmg

Max Lyons

unread,
Jan 2, 2009, 9:25:53 PM1/2/09
to hugi...@googlegroups.com
Dan,

Great picture! A perfect location for this type of projection.

As Tom pointed out earlier today, I have added a number of new projections into
PTAssembler, one of which ("recti-perspective") appears to be quite similar to
the Panini projection. That said, here's a page with a few examples I
generated in recti-perspective projection using your image (about 235x120
degrees).

http://www.tawbaware.com/forum_posts/recti_perspective.htm

I think that we must have a slightly different projection formulas because our
results look a little different, although they seem quite similar in the
central regions.

Max

Daniel German

unread,
Jan 2, 2009, 9:43:17 PM1/2/09
to hugi...@googlegroups.com
On Fri, Jan 2, 2009 at 6:25 PM, Max Lyons <max....@verizon.net> wrote:
>
> Dan,
>
> Great picture! A perfect location for this type of projection.
>


Thanks Max.

I think I finally go the original panini right:

http://turingmachine.org/~dmg/temp/equiToCentralCylindricalToPaniniCorrect.jpg

it looks very close to your 1:2.

I am using mathlab so I don't have very good control of the field of
view. But I am going to try
see if I can fix libpano.

--dmg
--
--dmg

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

Tom Sharpless

unread,
Jan 2, 2009, 11:24:56 PM1/2/09
to hugin and other free panoramic software
Hi Dan & Max

I just finished a careful analysis of the differences between the
equiToCentralToPanini you posted earlier, and my projection of it with
Panini; and now you had to go and get it right ;-(. I won't bother to
post my images because they are identical to your new one, up to a
linear scale factor on the Y axis.

Max's are the same, too, up to scaling on X and Y (which is also
possible in Panini). So it seems that Recti-Perspective Projection ==
Panini Projection, and we all know how to do it right.

This is a Good Thing.

Regards, Tom

PS how did you make that 360 with the straight back walls?? With
Panini I can only go up to 309 degrees wide because my viewing
projection fov is limited to 150 degrees, which sees that much of the
inside of the circle at an eye distance of 1.07 radii. But past 220
degrees hfov everything looks curvy, not straight.



On Jan 2, 9:43 pm, "Daniel German" <d...@uvic.ca> wrote:
> On Fri, Jan 2, 2009 at 6:25 PM, Max Lyons <max.ly...@verizon.net> wrote:
>
> > Dan,
>
> > Great picture!  A perfect location for this type of projection.
>
> Thanks Max.
>
>  I think  I finally go the original panini right:
>
> http://turingmachine.org/~dmg/temp/equiToCentralCylindricalToPaniniCo...

Yuval Levy

unread,
Jan 2, 2009, 11:37:48 PM1/2/09
to hugi...@googlegroups.com
Daniel M German wrote:
>
> Hi everybody, let us get our understanding of what the projection is
> supposed to do first.
>
> I am confounded by a lack of a good test case. So here is an image
> that I suggest we should use to test our "versions" of Panini.
>
> http://turingmachine.org/~dmg/temp/equirectangular.jpg

perfect symmetry, congratulations.


> Here is my version of Panini: it is 226 x 123 degrees field of view. I
> am projection from the equirectangular, to cylindrical, and then to
> stereographic.
>
> http://turingmachine.org/~dmg/temp/equiToCentralCylindricalToPanini.jpg

quite different from what I get with the lastest libpano/hugin from SVN:

http://www.photopla.net/hugin/equi2panini.jpg

230x179.9 degrees.

If I enter 226 HFOV in the stitcher panel, it returns 173.1 VFOV.


> I really like it.

I like yours better.

And I like a lot Max' Recti-Perspective.

Can you help me understand how to add projections to libpano13 -
specifically how to pass parameters such as the width/height of the
input image (in pixel) and its HFOV/VFOV? I've tried to peek around in
the code, but I still can't find the start and the end, only bits of it
(such as that what is in math.c). Needless to say that this is because I
am an analphabet and probably what I look for is just under my nose.

Yuv

Tom Sharpless

unread,
Jan 3, 2009, 12:30:01 AM1/3/09
to hugin and other free panoramic software
Hey, Yuv,

Take a look at the 3 latest posts. It seems that Dan, Max and I now
agree on how to do this projection.

Max's "Recti-Perspective" and my "Pannini" were already the same, and
now Dan's mathlab implementation is, too.

It is not the same as the ones from Dan you are considering here
(incl. the one in pano13). Not that that one is necessarily bad...

Regards, Tom

Daniel German

unread,
Jan 3, 2009, 1:18:35 AM1/3/09
to hugi...@googlegroups.com
is projection.
>
> Max's "Recti-Perspective" and my "Pannini" were already the same, and
> now Dan's mathlab implementation is, too.
>
> It is not the same as the ones from Dan you are considering here
> (incl. the one in pano13). Not that that one is necessarily bad...
>
> Regards, Tom
>

Thanks Tom, Max, Yuv,

ok, so the pannini projection (emphasis on the double n) is going to be the
one created going from sphere to central cylindrical to stereographic.

We have several variants of the pannini, depending on what middle
projection is used. The one I implemented originally in panotools is
the "equirectangular pannini". We could further derive from Max's idea
and call it
equirectangular perspective.

This means that we can compute this type of projections from any type of
cylindrical projection. It will be interesting to see what would Miller of it.

Every use is different, for this particular image I prefer the
equirectangular pannini more
than the pannini. What do others think?

I am going to try to implement it in panotools next.

--daniel

Bruno Postle

unread,
Jan 3, 2009, 8:17:28 AM1/3/09
to Hugin ptx
On Fri 02-Jan-2009 at 20:24 -0800, Tom Sharpless wrote:
>
>I just finished a careful analysis of the differences between the
>equiToCentralToPanini you posted earlier, and my projection of it with
>Panini; and now you had to go and get it right ;-(. I won't bother to
>post my images because they are identical to your new one, up to a
>linear scale factor on the Y axis.

Me too, Daniel's equiToCentralCylindricalToPaniniCorrect.jpg is
identical to the results I get with my original mathmap script.

>>  I think  I finally go the original panini right:
>>

>> http://turingmachine.org/~dmg/temp/equiToCentralCylindricalToPaniniCorrect.jpg


>>
>> it looks very close to your 1:2.

--
Bruno

Dale Beams

unread,
Jan 3, 2009, 1:17:33 PM1/3/09
to hugi...@googlegroups.com
I love your mistake.  I'd like this projection.






> Date: Fri, 2 Jan 2009 17:50:21 -0800
> From: d...@uvic.ca
> To: hugi...@googlegroups.com
> Subject: [hugin-ptx] Re: Getting panini right

Tom Sharpless

unread,
Jan 3, 2009, 2:00:35 PM1/3/09
to hugin and other free panoramic software
Hey Dale, Dan

On Jan 3, 1:17 pm, Dale Beams <drbe...@hotmail.com> wrote:
> I love your mistake.  I'd like this projection.
>
Me, too. -- Tom
> _________________________________________________________________
> It’s the same Hotmail®. If by “same” you mean up to 70% faster.http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_b...
Reply all
Reply to author
Forward
0 new messages