panini perspective tool available

82 views
Skip to first unread message

Tom Sharpless

unread,
Dec 30, 2008, 3:19:50 PM12/30/08
to PTGui Support
panini (formerly pvQt) version 0.6 is available for download at
http://sourceforge.net/projects/pvqt/

The recently rediscovered "Panini projection" is a big step forward
for panoramic photography, because it can render some images up to 200
degrees wide in what looks like true perspective.

The name honors the 18th century painter and teacher of perspective,
Gianpaolo Panini (or Pannini) one of whose paintings was the source
from which Bruno deduced the projection.

As luck would have it, a rather simple modification of my pano viewer,
pvQt, gave it the ability to display views in the Panini family of
projections as well as the stereographic family. So now the wacky
pano viewer, pvQt, has become a serious tool for creating wide
perspective views, called "panini".

Those families of projections are obtained by changing the distance of
the point of view from a 3D "panosurface" on which the original image
is painted in linear projection. The panosurface is a sphere for the
stereographic family, and a cylinder for the Panini family. The view
projection is linear when the eye is at the center of curvature of the
panosurface, true stereographic or "Panini" with the eye 1 radius
back, and closely approaches spherical othographic or cylindrical when
the eye distance is over 20 radii.

panini can go continuously through all those projections, and also
stretch the image, rather like a view camera, by shifting the eye
point perpendicular to the projection axis. So it really gives you a
lot of control over the apparent perspective of your view. And of
course you can rotate and shift the view to frame it perfectly, then
save it to a jpeg file at 2.5 times screen resolution.

You will like it if you try it. Have a look at some recent posts on
hugin-ptx for links to "Panini" images.

Happy New Year! -- Tom

Ken Warner

unread,
Dec 30, 2008, 4:41:49 PM12/30/08
to pt...@googlegroups.com
Hi Tom,

Panini sound interesting. Any links to the appropriate papers?

joergen

unread,
Dec 30, 2008, 5:19:17 PM12/30/08
to PTGui Support
this sounds incredible interesting.

joost,

what do you think about implementing those projections in an
experimental build (not the regular beta build), and give it to us to
play?

http://panospace.wordpress.com/2008/12/30/vedutismo/
http://groups.google.com/group/hugin-ptx/browse_thread/thread/9acc6eb237a28c99

and not to forget this one: http://www.tawbaware.com/forum2/viewtopic.php?t=5290

happy new year

joergen
luminous-newyork.com

Tom Sharpless

unread,
Dec 30, 2008, 5:30:12 PM12/30/08
to PTGui Support
Hi Ken

On Dec 30, 4:41 pm, Ken Warner <kwarner...@verizon.net> wrote:
> Hi Tom,
>
> Panini sound interesting.  Any links to the appropriate papers?
>

I know of no appropriate papers.

The academic art history community seems totally ignorant of
perspective projections other than the linear. I found one treatise
on perspective, written by an architect and published in 1882, that
describes the cylindrical projection. The idea of combining the
cylindrical and linear projections appears not to have occurred to
anyone -- except the Baroque view painters, almost all of whose
perspectives are such combinations, and Bruno Postle.

I'm working on a website, vedutismonuovo.net, to be devoted to
research on the view painters' perspective methods and their
application in panoramic photography. There is plenty of evidence,
and much to be discovered.

There are a few remarks by Bruno and myself in this thread:
http://groups.google.com/group/hugin-ptx/browse_thread/thread/9acc6eb237a28c99

Regards, Tom

Tom Sharpless

unread,
Dec 30, 2008, 5:38:49 PM12/30/08
to PTGui Support
Hello Joergen

On Dec 30, 5:19 pm, joergen <jgee...@gmail.com> wrote:
> this sounds incredible interesting.
>
> joost,
>
> what do you think about implementing those projections in an
> experimental build (not the regular beta build), and give it to us to
> play?
>

You don't need a new stitcher to do that, just get the panini program
and load your existing panos.

> http://panospace.wordpress.com/2008/12/30/vedutismo/http://groups.google.com/group/hugin-ptx/browse_thread/thread/9acc6eb...
It is likely that Max's new projection is not the same as the Panini.
Looks very nice, though.

also check out: http://www.flickr.com/groups/vedutismo/ for some
Panini views.

Cheers, Tom

Tom Sharpless

unread,
Dec 30, 2008, 5:50:51 PM12/30/08
to PTGui Support


On Dec 30, 5:38 pm, Tom Sharpless <TKSharpl...@gmail.com> wrote:

>
> You don't need a new stitcher to do that, just get the panini program
> and load your existing panos.
>

I see I forgot to mention that panini will save any view as a jpeg at
a "printable" resolution -- 2.5 times screen size, 8 to 10 Mpixels is
possible. So it is a real perspective converter, not just a viewer.

Cheers, Tom

joergen

unread,
Dec 30, 2008, 10:52:22 PM12/30/08
to PTGui Support
On Dec 30, 5:38 pm, Tom Sharpless <TKSharpl...@gmail.com> wrote:
> You don't need a new stitcher to do that, just get the panini program
> and load your existing panos.
hmm, i think I do... the viewer is pc only, dunno when the mac version
comes... and I deal in the 200-1400 megapixel range, so a 8 megapixel
screen resolution doesn't help me other than show it to me... but I
will give it a try as soon as the mac version is out...

> > and not to forget this one:http://www.tawbaware.com/forum2/viewtopic.php?t=5290
> It is likely that Max's new projection is not the same as the Panini.
> Looks very nice, though.

no, max is using a different approach, but it looks very interesting.

Lets see what Joost has to say :-)

joergen
luminous-newyork.com

Keith Martin

unread,
Dec 31, 2008, 7:14:55 AM12/31/08
to pt...@googlegroups.com
Sometime around 30/12/08 (at 19:52 -0800) joergen said:

>8 megapixel screen resolution doesn't help me other than show it to
>me... but I will give it a try as soon as the mac version is out...

I will too. (I downloaded the Mac version and then realised it must
be a version behind.) I'm looking forward to trying this out.

However, I would also like to ask for a higher-resolution output
option. I know 2.5x the screen res is certainly much better than
nothing (and I thank you deeply for considering this) but if the
input's much larger (my equirects are in the 70+ MP range even before
I reach for non-fisheye lenses) it seems a shame not to be able to
use more of that data.

Users, eh? Give 'em a feature and they always want more! :-)

k

Tom Sharpless

unread,
Dec 31, 2008, 4:18:41 PM12/31/08
to PTGui Support
Hi Joergen and Keith

On Dec 31, 7:14 am, Keith Martin <ke...@vortex.co.uk> wrote:
> Sometime around 30/12/08 (at 19:52 -0800) joergen said:
>
> >8 megapixel screen resolution doesn't help me other than show it to
> >me... but I will give it a try as soon as the mac version is out...
>
> I will too. (I downloaded the Mac version and then realised it must
> be a version behind.) I'm looking forward to trying this out.
>

Yes, you got the pvQt 0.5 bundle, but the panini 0.6 bundle will be up
soon.


> However, I would also like to ask for a higher-resolution output
> option. I know 2.5x the screen res is certainly much better than
> nothing (and I thank you deeply for considering this) but if the
> input's much larger (my equirects are in the 70+ MP range even before
> I reach for non-fisheye lenses) it seems a shame not to be able to
> use more of that data.
>

That is something I want too, so it may happen -- but maybe only in
the "pro" version that you have to pay for :->. It will take a lot of
infrastructure to get 100 Mp images out of OpenGL, but it is probably
doable.

First I want to be able to make Panini views from cubic images (esp.
QTVRs) which is not possible with the present version. This also
needs considerable development work, but maybe not so much as huge
output.

However, I also want to spend more time making panoramas and less time
programming, so none of this will be immediate. I think panini as it
stands is perfectly good for the purpose of making 13 x 19 prints,
which will keep me happy for a while.

If you want big Paninis, you can already make them with the Gimp and
Mathmap, using Bruno's scripts, and I would guess hugin will "do the
Panini" before long. I'd suggest using panini to find the right view
parameters before a big batch transformation; and indeed when nona
knows how to do this projection I intend to make panini create control
scripts for that.

Cheers, Tom

Keith Martin

unread,
Jan 1, 2009, 3:21:21 PM1/1/09
to pt...@googlegroups.com
>maybe only in the "pro" version that you have to pay for :->.

Bring it on! This is something I'm definitely interested in trying. :-)


>I think panini as it
>stands is perfectly good for the purpose of making 13 x 19 prints,
>which will keep me happy for a while.

For professional print work the rule of thumb is 300 pixels per inch.
What actual pixel sizes are you getting from the software now? Is the
output of "2.5 times screen resolution" at all dependent on the
display size of the Panini image?


>If you want big Paninis, you can already make them with the Gimp and
>Mathmap, using Bruno's scripts

Hmm. Interesting. Where would I find Bruno's scripts?

k

joergen

unread,
Jan 1, 2009, 4:28:05 PM1/1/09
to PTGui Support
here are a couple more ideas for projections (max seems to do a lot of
interesting experiments):
http://www.tawbaware.com//forum2/viewtopic.php?t=5297

joergen
luminous-newyork.com

Tom Sharpless

unread,
Jan 1, 2009, 4:34:36 PM1/1/09
to PTGui Support
Hi Keith,

On Jan 1, 3:21 pm, Keith Martin <ke...@vortex.co.uk> wrote:
> >maybe only in the "pro" version that you have to pay for :->.
>
> Bring it on! This is something I'm definitely interested in trying. :-)
>

I'd like to, but the economics of setting up to sell software are
somewhat daunting. There is the little matter of a $5000 commercial
license for Qt right up front; and significant costs for sales,
marketing, maintaining a web site, incorporation, insurance... Plus I
am too old to work full time, and would like to do a lot more
photography before I croak.

> >I think panini as it
> >stands is perfectly good for the purpose of making 13 x 19 prints,
> >which will keep me happy for a while.
>
> For professional print work the rule of thumb is 300 pixels per inch.
> What actual pixel sizes are you getting from the software now? Is the
> output of "2.5 times screen resolution" at all dependent on the
> display size of the Panini image?

Yes, it is proportional; the jpeg file has 5.25 pixels for each screen
pixel. So if you make the screen window bigger you get a bigger
output image.

The 2.5x ratio is arbitrary, but reasonable. It could not be
increased much, because the resolution of the image rendered by OpenGL
is ultimately limited by the size of the "texture map" that represents
the source image, and by the fact that OpenGL does quick-and-dirty
pixel interpolation. On my OpenGL 2.1 system the texture maps have at
most 8 Mpixels; and a view will usually be based on only part of that.

To get "source" resolution out of OpenGL one would have to divide the
source image into tiles of the maximum texture map size, render them
separately and build a composite output image. At least that's how I
will do it, if I do.

>
> >If you want big Paninis, you can already make them with the Gimp and
> >Mathmap, using Bruno's scripts
>
> Hmm. Interesting. Where would I find Bruno's scripts?

I believe he has posted a couple in the hugin-ptx discussion group,
also on Google. Or you could ask him.

Regards, Tom

Tom Sharpless

unread,
Jan 2, 2009, 12:20:49 PM1/2/09
to PTGui Support
PS Bruno has also posted a Panini mathmap script on the Flickr
"Vedutismo" group page at
http://www.flickr.com/groups/vedutismo/ under "Discussion"

Cheers, Tom

Ken Warner

unread,
Jan 2, 2009, 3:15:47 PM1/2/09
to pt...@googlegroups.com
For some reason, the script Bruno posted doesn't show up
in the Mathmap menu.

Here's what I put in the Map folder as an .mm file.

Anybody see the problem?

# Vedutismo / Panini effect
# Bruno Postle December 2008
# input is any 360 cylindrical image
filter panini (image in, float FoV: 1-360 (230.07), float pan: -180-180 (0.0))
maxphi=atan(pi/2);
newphi=FoV*pi/360/2;
scale=tan(newphi)/tan(maxphi);
phi=atan(x*scale*pi/W);
yscale=cos(phi)*cos(phi);
in(xy:[phi/pi*W+(W*pan/360),y*scale*yscale])
end

michael crane

unread,
Jan 2, 2009, 3:33:34 PM1/2/09
to pt...@googlegroups.com
probably line endings or something

HNY

mick

2009/1/2 Ken Warner <kwarn...@verizon.net>:

Ken Warner

unread,
Jan 2, 2009, 5:06:24 PM1/2/09
to pt...@googlegroups.com
I tried editing some of the .mm files that comes with MathMap using
the same editor I used for panini and they still show up.

Is there an initialization file somewhere that needs to be updated?

Keith Martin

unread,
Jan 2, 2009, 5:08:05 PM1/2/09
to pt...@googlegroups.com
Sometime around 2/1/09 (at 12:15 -0800) Ken Warner said:

>Anybody see the problem?

Remove the hash-commented lines; Mathmap got fussed about those when
I pasted the text into the Filter window. It works fine for me when I
do that - although the actual image-mappng result is a trifle odd. I
need to try it with some more sample images.

k

Ken Warner

unread,
Jan 2, 2009, 5:31:44 PM1/2/09
to pt...@googlegroups.com
Ok, I made some progress. I started MathMap and from the examples tag,
I can execute the panini.mm filter. I also can just copy and paste
into the input window.

Either way it runs and modifies one of my cylindrical images but
the Panini filter menu item never shows in the MathMap menu.

And after the filter has run and MathMap closes, an error dialog pops
up saying -- gimp_plug_in_handle_proc_run: ERROR. So something is
wacky with the combination I specified earlier.

GIMP 2.6; MathMap 1.2.4; Windows 2000 SP3

Maybe this will clear up when the next version of MathMap is released.
Maybe not...

Here's the image I ran it on:

http://pancyl.com/images/LakeMary_3.jpg

And here's the result:

http://pancyl.com/images/LakeMaryPanini.jpg

In this particular application -- GIMP/MathMap -- I'd say that there
are image quality degradation issues. But the geometry of the projection
is interesting none the less.

Keith Martin

unread,
Jan 2, 2009, 5:48:08 PM1/2/09
to pt...@googlegroups.com
Sometime around 2/1/09 (at 14:31 -0800) Ken Warner said:

>the Panini filter menu item never shows in the MathMap menu.
>
>And after the filter has run and MathMap closes, an error dialog pops
>up

Strange.

I copied and pasted the code straight into the Mathmap 'Filter' code
field window. I removed the three commented lines as they seemes to
be causing problems. I then followed the sorta-instructions in the
Intro Movie - I made a new folder in the Library list and then
dragged the tiny Filter icon into the new folder.

If you can't see the icon then try clicking on the left just above
the code field itself. It seems to like hiding, but that's where it
can be found - grabbing it shows it temporarily.

I then saved the library. That's separate from what's in the Filter
code field - you don't need to save that.

However - this is all to do with the standalone Mathmap. I don't have
GIMP installed at all.

k

PTGui Support

unread,
Jan 3, 2009, 5:05:33 AM1/3/09
to pt...@googlegroups.com
Happy new year everyone!

Just to let you know, these new projections definately look very
interesting and I'll be looking into incorportating them in a next
version of PTGui.

Joost
Reply all
Reply to author
Forward
0 new messages