• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Projections - new tutorial article

Doug Kerr

Well-known member
Most modern panoramic image assembly programs offer us a number of "projections" under which the final image can be prepared. There is a lot of confusion afoot in this area.

Much of the difficulty comes from the fact that the topic of projections inhabits two worlds - the context of cartography (the making of maps representing things on the surface of the Earth) and the context of photography.

Notions that come from cartography are often transported mindlessly into the realm of photography, with baffling result.

For example, we are often shown a number of tidy graphics that show us how a particular hypothetical "test scene" would be rendered into an image under each of several projections. The problem is that the test scene is a hollow sphere with parallels of latitude and meridians of longitude "painted" inside it, photographed from its center.

How does this help us grasp the effect of choosing one projection or another on, for example, photography of a really wide building facade, with a lot of little windows, or an entire sector of a city, with a grid of streets and lots of buildings? Not at all.

Then we hear statements like this, describing the unique features of various projections:

• "Under the equirectangular projection, the vertical scale is constant regardless of elevation", and
• "Under the Mercator projection, for any elevation, the vertical scale is equal to the horizontal scale"

When we look at actual images prepared under these projections, we don't seem to see that at all. In fact, it looks as if the cylindrical projection, not the equirectangular, has unchanging vertical scale. And we don't see any evidence at all of horizontal scale ever changing with altitude, so just what is it that the Mercator projection does?

The fact is that here, the definitions of "scale" that are involved make sense in a certain cartographic context, but do not relate to any common photographic context. They imply things that are just not so in our context.

In an effect to lead us out of this morass, I have just completed a new tutorial article, "Projections in Photography". It explains the concepts of projection, and how the topic has moved from the world of cartography to that of photography. I then use a basic geometric model, involving a pinhole camera, no less, to demonstrate the definition of two important projections (the other two I will discuss can't be explained by any such geometric model).

Then I use charts that show how an understandable "test object" - a building facade with a uniform grid of decorative lines, vertical and horizontal - will be rendered into an image under four different projections.

Two appendixes give technical details related to the topic (including a discussion about the different meanings of "scale" in the two contexts, one of the troublesome points).

The article is extensively illustrated with drawings and charts.

The article is available here:

http://doug.kerr.home.att.net/pumpkin/index.htm#Projections
 

Asher Kelman

OPF Owner/Editor-in-Chief
Hi Doug,

This is an interesting article and a lot of work in making the diagrams. dDd you have to calculate lots of points to get the curves or did you have a formula and graphic function which draws the curves for you? This looks like something one might get with Mathematica.

One thing I might suggest would be to repeat the projections with a scene overlayed on the diagrams so one could appreciate better the "distortions", (allow me to use that word), from one to the other.

Asher
 

Doug Kerr

Well-known member
Hi, Asher,

Hi Doug,

This is an interesting article and a lot of work in making the diagrams. Did you have to calculate lots of points to get the curves or did you have a formula and graphic function which draws the curves for you?

Well, after doing all the derivations to determine the functions involved, I used a spreadsheet to calculate all the coordinates of the defining points of the curves in each of the charts, 11 points per curve, 10 curves (the one at 0 is trivial) per chart, three charts (the one for the rectilinear projection is trivial).

Then I needed to decide how to present the curves, and develop a template for the series of drawings in my technical illustration program.

Then in the next step, I initially equipped each of the charts with a family of dummy curves with the right number of points defining them, but with trivial values (defining for the moment 9 identical straight lines - cloned from one as a model).

Then, in my technical illustration program, I manually numerically adjusted the coordinates of the points. The program of course then redrew the curves through the relocated points using a spline function.

This last step took perhaps 15 minutes per chart. There were 110 points to be adjusted each, but the situation was that the y coordinates were already in place on the dummy curves (every curve had points at the same set of y coordinates), so there were only the 110 x coordinates to enter per chart.

I would rather have had something plot the curves automatically. I probably could have had Excel do it and them import the curves onto the display format I wanted, but there would have been a lot of workflow preparation to that so I decided to do it in a more agricultural fashion. (The curves are easy - its putting them into context that is often the biggest problem! One problem is that most plotting programs will not deliver the curves in vector form, which I really need to be able to massage them in situ.)

This looks like something one might get with Mathematica.

Yes, I suspect so. I have in fact never gotten into the use of Mathematica. A colleague in D.C. is a big fan. I probably need to look into it as a tool.

One thing I might suggest would be to repeat the projections with a scene overlayed on the diagrams so one could appreciate better the "distortions", (allow me to use that word), from one to the other.

Well, actually, the "base" grid is in fact identical to the source scene (perhaps I should have drawn better attention to that). I contrived the "scene" with that aim, in fact.

You can see the "scene" in bold in the figure for the rectilinear projection since that result is in fact "distortion free" (and yes, that is a perfectly good term in this context).

Of course, on a "live" document one could use a mouse rollover to allow the user to switch between a bold representation of the scene and the transformed result. But so far I have done these articles as "static" documents (not that anybody is ever going to read them in paper!). So I have to look into ways to do that. It will of course be an entirely different publication paradigm.

Many of my findings were very enlightening to me. I am especially proud of the forensic work that finally led me to understand the apparent paradox in the "common wisdom" statements about the vertical scales of the various projections. There is almost no help there in the literature - just endless repetition of the "facts".

All this happened as my effectivity hovered in the 50-70% range as I am overtaken by a bad case of "the flu" (whatever that really means). Still, the whole thing from conception to release probably took less than 20 hours.

Thanks for your comments.

Best regards,

Doug
 

Doug Kerr

Well-known member
Tutorial article on projections - Revised issue

I have just released to The Pumpkin a revised issue of my article, "Projections in Photography". It is available over the same link as for the initial issue:

http://doug.kerr.home.att.net/pumpkin/index.htm#Projections

The principal change is the addition of a note reminding the reader that on the "building image" charts, the grid of light lines, in addition to showing the coordinate system for the film, is also a verbatim transcription of the lines on the building itself. Thus, comparison of the image (the heavy lines) with this light-line grid will allow direct grasp of the geometric distortion afforded by the projection.

This addition was made in response to a suggestion by Asher Kelman.

Best regards,

Doug
 

Asher Kelman

OPF Owner/Editor-in-Chief
I have just released to The Pumpkin a revised issue of my article, "Projections in Photography". It is available over the same link as for the initial issue:

http://doug.kerr.home.att.net/pumpkin/index.htm#Projections

The principal change is the addition of a note reminding the reader that on the "building image" charts, the grid of light lines, in addition to showing the coordinate system for the film, is also a verbatim transcription of the lines on the building itself. Thus, comparison of the image (the heavy lines) with this light-line grid will allow direct grasp of the geometric distortion afforded by the projection.

This addition was made in response to a suggestion by Asher Kelman.

Best regards,

Doug
Thanks indeed for the changes. It's now approachable without the need for ant-anxiety medication! good work!

For those who don't have any idea what a sine or cosine might mean, Doug's diagrams make this approachable. One can give attention to the diagrams and the related text alone to obtain a good idea of the properties of each projection presented. Just keep in mind that the light lines represent the sensor plane and the bold lines represent the image of the building façade, then one gets the meaning without the math!

Asher
 

Doug Kerr

Well-known member
Tutorial article revised again

I have just released to The Pumpkin another revised issue (Issue 3) of my article, "Projections in Photography". It is available over the same link as for the earlier issues:

http://doug.kerr.home.att.net/pumpkin/index.htm#Projections

The principal change is to make clear that the plane on which the image is actually developed under a particular projection is not necessarily (and for some projections, cannot be) the film (or sensor) plane of the camera. The new issue uses "image plane" to denote that plane.

Best regards,

Doug
 

Mike Shimwell

New member
Hi Doug

A topic I thoroughly enjoy. I still have a copy of 'Map Projections are Easy' sitting on the bookshelf. I will read through the article at some point to try to get to grips with the use of projections in panoramic photography as well.

Thanks

Mike
 

Doug Kerr

Well-known member
Hi, Mike,

Hi Doug

A topic I thoroughly enjoy. I still have a copy of 'Map Projections are Easy' sitting on the bookshelf. I will read through the article at some point to try to get to grips with the use of projections in panoramic photography as well.

I look forward to your comments when you get a chance.

Thanks.

Best regards,

Doug
 
Hi Doug,

I just came across this webpage as a prelude to the upcoming new version of PT Assembler.

In addition to the huge control over the end result, especially for wide angle views, PTAssembler can use the 'Sinc1024' resampling method for creating distortions with relatively little loss of quality.

Bart
 

Jack_Flesher

New member
Hi Doug,

I just came across this webpage as a prelude to the upcoming new version of PT Assembler.

In addition to the huge control over the end result, especially for wide angle views, PTAssembler can use the 'Sinc1024' resampling method for creating distortions with relatively little loss of quality.

Bart

Bart,

Great link, thanks for posting it! It clarifies several projections and adds a few I had never heard of.

Best,
 

Doug Kerr

Well-known member
Hi, guys,

I haven't had a chance to digest it, but it seems to be an extraordinary resource. Thanks for the link.
Well, I've had a little chance to look it over. It is truly wondrous, a tour de force, and very easy to follow, with marvelous illustrations.

Are we to conclude from the clues that this is the work of Max Lyons?

In any case, bravo!

Best regards,

Doug
 

Michael Fontana

pro member
Yes Max Lyons builds PT Assembler.
He's got even a forum for panos.

The newest version of PTGui has a projection called Vedutsimo:
that preserves all diagonal straight, just through the center. Any straight lines not through the center will become curved.

It has another new possibility of horizontal and vertical compression with some projections:
See this MPEG-4-movie:

PTGui_Compression

As you see, straight lines are becoming curved as well, so that is a challenge, to have rectilinear, but without these side-distortions.
 

Asher Kelman

OPF Owner/Editor-in-Chief
Hi Michael and Doug,

That technology is similar to and might in fact be the Israeli technology now added to Photoshop CS4 which allows width or height to be increased and lower ranked intermediate space is removed (or created) seamlessly.

I presume that Alan Lyons is working in PCs only! If so, what would it require more than Parallels to have it work in PC emulation on a MacBookPro?

Asher
 
Hi Michael and Doug,

That technology is similar to and might in fact be the Israeli technology now added to Photoshop CS4 which allows width or height to be increased and lower ranked intermediate space is removed (or created) seamlessly.

I don't think it is similar to "Seam Carving". It would be extremely computationally intensive to apply it to stitching. It is more likely one of many variations of normal geometrical projection methods, now also accessible with PTAssembler (and documented in the link I gave above).

I presume that Alan Lyons is working in PCs only! If so, what would it require more than Parallels to have it work in PC emulation on a MacBookPro?

I don't know Parallels good enough to be able and predict compatibility, but PTAssembler by Max Lyons is programmed in Visual Basic, so should run as well as other software from that environment. I'm currently trying the beta version of PTAssembler on a Windows machine, and I have not encountered any problems yet (despite a major recoding of the stitching and optimizing core program, called PTAStitcher, that runs on multiple cores if the computer has them).

Bart
 
Top