* panorama.h, math.c, adjust.c, queryfeature.c, filter.h, parser.c: Added panini projection. the credit goes to Thomas Sharpless who rediscovered it, and to Bruno Postle, who did the original math.
I'll try to add the "architectural" in the next few days.
I'll let Bruno and Tom provide the background and math, both are fascinating.
I have only tested it going from equirectangular to panini, but it should work like any other. We might need some more changes to the library before hugin can use it, though.
On Mon 29-Dec-2008 at 04:10 -0800, Daniel M. German wrote:
>I'll let Bruno and Tom provide the background and math, both are >fascinating.
There was a long thread on hugin-ptx where Tom and myself picked apart a Panini painting of St Peter's with some strange perspective effects. It turns out that hardly any of these great 'vedutismo' paintings have a standard 'rectilinear' photographic perspective.
There is a very simple projection that does the same kind of thing, vertical lines are preserved as vertical, radial lines (i.e. the lines that radiate from the vanishing point) are preserved as straight, and objects near the horizon have no local distortion.
Using this projection it is possible to create images with extreme wide angles (over 200°) that look like normal perspectives, I've uploaded a few here:
> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h, > parser.c: Added panini projection. the credit goes to Thomas > Sharpless who rediscovered it, and to Bruno Postle, who did the > original math.
THANKS A LOT!
> I have only tested it going from equirectangular to panini, but it > should work like any other. We might need some more changes to the > library before hugin can use it, though.
I found a small bug in the library (even before the introduction of Panini) that would enumerate one projection too many in the hugin drop down of available projections. And Panini was missing in there, so I added it. I don't think I have commit rights to panotools, and I'm anyway on very limited infrastructure for another ten days. Find my patch to libpano attached. The hugin stuff will come in a subsequent mail, with a blog article on how to do that (I hope to entice newbie contributors to put their hands under the hood of hugin, and maybe you will help me with something similar for the projections in panotools?).
>> I have only tested it going from equirectangular to panini, but it >> should work like any other. We might need some more changes to the >> library before hugin can use it, though.
Yuval> I found a small bug in the library (even before the introduction of Yuval> Panini) that would enumerate one projection too many in the hugin drop
Mmm, I just checked and I think libpano code is ok. It might be the code in hugin. panoProjectionFormatCount returns exactly the enumber of projections available (currently 13, including panini), numbered from 0 to 12.
Panini is #12 in panotools.
Anybody wants to try it?
Yuval> down of available projections. And Panini was missing in there, so I added Yuval> it. I don't think I have commit rights to panotools, and I'm anyway on Yuval> very limited infrastructure for another ten days. Find my patch to libpano Yuval> attached. The hugin stuff will come in a subsequent mail, with a blog Yuval> article on how to do that (I hope to entice newbie contributors to put Yuval> their hands under the hood of hugin, and maybe you will help me with Yuval> something similar for the projections in panotools?).
I had done the changes last night already, and I committed them few minutes ago. your code was good, except that it was missing the maximum vFOV and hFOV values that libpano should return to hugin.
By the way, I have hardcoded 220 degrees as the maximum hFOV. Anything bigger is just, well, unusable ;) vFOV is set to 180, but 90 is a more practical one.
--dmg
-- Daniel M. German "We die. That may be the meaning of life. But we do language. That may be Toni Morrison -> the measure of our lives." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
Bruno> On Mon 29-Dec-2008 at 04:10 -0800, Daniel M. German wrote: >> >> I'll let Bruno and Tom provide the background and math, both are >> fascinating.
Bruno> There was a long thread on hugin-ptx where Tom and myself picked Bruno> apart a Panini painting of St Peter's with some strange perspective Bruno> effects. It turns out that hardly any of these great 'vedutismo' Bruno> paintings have a standard 'rectilinear' photographic perspective.
Bruno> There is a very simple projection that does the same kind of thing, Bruno> vertical lines are preserved as vertical, radial lines (i.e. the Bruno> lines that radiate from the vanishing point) are preserved as Bruno> straight, and objects near the horizon have no local distortion.
Bruno> Using this projection it is possible to create images with extreme Bruno> wide angles (over 200°) that look like normal perspectives, I've Bruno> uploaded a few here:
As a clarification, we are using equirectangular as the intermediary projection. It will be interesting to see the effect that other cylindrical projections have on the final result.
--dmg
-- Daniel M. German "Beware of bugs in the above code; I have only proved it Donald Knuth -> correct, not tried it." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
>> I have only tested it going from equirectangular to panini, but it >> should work like any other. We might need some more changes to the >> library before hugin can use it, though.
Yuval> I found a small bug in the library (even before the introduction of Yuval> Panini) that would enumerate one projection too many in the hugin drop
Mmm, I just checked and I think libpano code is ok. It might be the code in hugin. panoProjectionFormatCount returns exactly the enumber of projections available (currently 13, including panini), numbered from 0 to 12.
Panini is #12 in panotools.
Anybody wants to try it?
Yuval> down of available projections. And Panini was missing in there, so I added Yuval> it. I don't think I have commit rights to panotools, and I'm anyway on Yuval> very limited infrastructure for another ten days. Find my patch to libpano Yuval> attached. The hugin stuff will come in a subsequent mail, with a blog Yuval> article on how to do that (I hope to entice newbie contributors to put Yuval> their hands under the hood of hugin, and maybe you will help me with Yuval> something similar for the projections in panotools?).
I had done the changes last night already, and I committed them few minutes ago. your code was good, except that it was missing the maximum vFOV and hFOV values that libpano should return to hugin.
By the way, I have hardcoded 220 degrees as the maximum hFOV. Anything bigger is just, well, unusable ;) vFOV is set to 180, but 90 is a more practical one.
--dmg
-- Daniel M. German "We die. That may be the meaning of life. But we do language. That may be Toni Morrison -> the measure of our lives." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
> * panorama.h, math.c, adjust.c, queryfeature.c, filter.h,
> parser.c: Added panini projection. the credit goes to Thomas
> Sharpless who rediscovered it, and to Bruno Postle, who did the
> original math.
I won't take credit for rediscovering anything, only for bugging Bruno
about vedute perspective until he did it.
Since first seeing Piranesi's work about 10 years ago, I have wondered
how he and other Baroque masters could draw those impossibly wide
perspective views. When I got into panoramic photography, and found
the available projections rather disappointing for wide angle prints,
I became really keen to know their secrets, which I felt might help us
render similar views photographically. But I had no idea how to
discover them,and did nothing. Then my wife bought a picture puzzle
of one of Panini's views of St Peters, and the pressure became
intolerable. So I moaned to Bruno until he took a few looks and
thought a bit, and voila! the Panini projection was rediscovered.
I will take credit for programming the first interactive tool that can
convert panos to Paninis, a program I first called the pvQt pano
viewer and now call panini. It is a kind of software view camera for
panographers, but the Panini projection is its most valuable trick.
The initial version of panini will be released before New Years.
> On Mon 29-Dec-2008 at 04:10 -0800, Daniel M. German wrote:
> >I'll let Bruno and Tom provide the background and math, both are
> >fascinating.
> There was a long thread on hugin-ptx where Tom and myself picked
> apart a Panini painting of St Peter's with some strange perspective
> effects. It turns out that hardly any of these great 'vedutismo'
> paintings have a standard 'rectilinear' photographic perspective.
> There is a very simple projection that does the same kind of thing,
> vertical lines are preserved as vertical, radial lines (i.e. the
> lines that radiate from the vanishing point) are preserved as
> straight, and objects near the horizon have no local distortion.
> Using this projection it is possible to create images with extreme
> wide angles (over 200°) that look like normal perspectives, I've
> uploaded a few here:
just created my first panorama using the panini projection - compared to equirectangular - which would have been my first choice - it somehow added more depth to the scene. (a small cemetery with winterly trees in the background)
anyway, since there are so many projections now, maybe we should think about ordering them? something like "keeps straight lines", "keeps angles", "keeps areas equal" or "mixed", as the architectural projection. or are the projections too different to be classified like that?
thx to all developers :) can't imagine working without hugin/panotools anymore....
On Sun 11-Jan-2009 at 22:15 +0100, Benjamin Schnieders wrote:
>anyway, since there are so many projections now, maybe we should think >about ordering them? something like "keeps straight lines", "keeps >angles", "keeps areas equal" or "mixed", as the architectural >projection. or are the projections too different to be classified like that?
The projections form two neat series of 'cylindrical' and 'azimuthal' types, all other projections are not so easy to categorise. I've updated the wiki page on projections, so this may make a bit more sense there:
Bruno Postle wrote: > The projections form two neat series of 'cylindrical' and > 'azimuthal' types, all other projections are not so easy to > categorise. I've updated the wiki page on projections, so this may > make a bit more sense there:
Many thanks! I'v added the (approximate) field of view for each example image. There are some, where I probably didn't get it right from counting the squares, so please correct if you have the exact values.
On Jan 19, 7:04 pm, Bruno Postle <br...@postle.net> wrote:
> On Sun 11-Jan-2009 at 22:15 +0100, Benjamin Schnieders wrote:
> >anyway, since there are so many projections now, maybe we should think
> >about ordering them? something like "keeps straight lines", "keeps
> >angles", "keeps areas equal" or "mixed", as the architectural
> >projection. or are the projections too different to be classified like that?
> The projections form two neat series of 'cylindrical' and
> 'azimuthal' types, all other projections are not so easy to
> categorise. I've updated the wiki page on projections, so this may
> make a bit more sense there:
Tom> Thanks for this helpful page. Tom> Since the Pannini projections are just compressed cylindrical ones, Tom> why not put them in the cylindrical category?
Hi Tom,
Pannini is not a cylindrical in the pure sense. It is a hybrid. It is an azimuthal projection of a cylindrical one.
> Tom> Thanks for this helpful page. > Tom> Since the Pannini projections are just compressed cylindrical ones, > Tom> why not put them in the cylindrical category?
> Hi Tom,
> Pannini is not a cylindrical in the pure sense. It is a hybrid. It is > an azimuthal projection of a cylindrical one.
One might (pedantically) call that a composite, not a hybrid :-)
paul> Daniel M German wrote: >> >> Tom> Thanks for this helpful page. Tom> Since the Pannini projections are just compressed cylindrical ones, Tom> why not put them in the cylindrical category? >> >> Hi Tom, >> >> Pannini is not a cylindrical in the pure sense. It is a hybrid. It is >> an azimuthal projection of a cylindrical one.
paul> One might (pedantically) call that a composite, paul> not a hybrid :-)
I like that term: compositional projections. Those created by the composition of 2 or more projections.
Hybrids: those created by mixing 2 or more projections, each covering part of the field of view.
>Since the Pannini projections are just compressed cylindrical ones, >why not put them in the cylindrical category?
..except that the pannini projection is as similar to stereographic as it is to cylindrical.
The interesting thing about organising them like this is that it shows that hugin/panotools now has a comprehensive range of cylindrical and azimuthal output projections. The others are a bit random: some composite/hybrid projections, one transverse.
On Jan 20, 11:44 am, Daniel M German <d...@uvic.ca> wrote:
> I like that term: compositional projections. Those created by the
> composition of 2 or more projections.
> Hybrids: those created by mixing 2 or more projections, each covering
> part of the field of view.
I agree on this terminology. And I think we will see more hybrids
soon.
That makes the Pannini a composition of the gnomonic and cylindrical
projections. But when I think "azimuthal" I think "curved
verticals". And in fact the gnomonic projection is no more azimuthal
than cylindrical or conic or anything else: it is the limit of all of
them as the eye point approaches the center of the panosphere, from
which point of view all proper projections of the sphere look the
same.
So by me, the Pannini really is a compressed cylindrical projection.
A stereographic view of the cylinder would not be, because the
stereographic is truly azimuthal.