• Subscribe

    Subscribe to This Week In Panospace by eMail.
    Subscribe in a reader
  • License

    Creative Commons License
    This work is © 2008-2012
    by Yuval Levy
    and licensed under a
    Creative Commons License.
  • Entries

    April 2009
    M T W T F S S
    « Mar   May »
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Archives

Bend to Please


Equirect

equirectangular 360°

Earlier this year I used the above full spherical panorama to test the new projections as they were added to libpano. You can view it from the inside here.

Those new projections devised by Tom, Bruno and Daniel, were not all. In his quest to satisfy our sense of what the world really looks like without being limited by the narrow field of view of the traditional rectilinear perspective, Tom Sharpless asked for permission to modify and use the image. A few weeks later he came up with a real WOW! He is currently working on implementing this and more into his Panini Perspective Tool.

Tom was meant to discuss his work at LGM but prior commitments and the lack of a teleporting facility makes it impossible for him to attend. We agreed that I will present his slides, and host a discussion on Panoramic Perspective Control. The main idea: use of panoramic photography techniques, coupled with computing, to achieve new images that break out of the physical boundaries set by traditional optics and appeal to the human sense of aesthetics.

As part of the talk, I’ll show how I followed into Tom’s footsteps and produced the image below.

PVsqueezed to be optically pleasant.

Tools

You will need

  • Tom’s Panini Perspective Tool, or if you want to do this in high resolution a recent (2009) version of Hugin.
  • A recent version of the GIMP. I had to build 2.6.x on my own box until Ubuntu 9.04 came along. Building the GIMP from code is not trivial but relatively well documented around the web.
  • A recent version of MathMap. Unfortunately MathMap is not yet packaged with Ubuntu. The 1.3.4 tarball will do. To my knowledge, nobody has got MathMap to work on Windows yet.
  • Tom’s PVSqueeze.mm script. Put it in the appropriate MathMap folder or copy&paste it into the “Expression” tab.

Process240° x 150° equirectangular pannini

  1. As so often, we start from an equirectangular image, the universal panorama format.
  2. Load the equirectangular in Hugin and extract an Equirectangular Pannini view of the area of interest. The flexibility of extracting an Equirectangular Pannini view is higher in Panini, but Panini’s resolution is limited by the video card’s memory. Hugin can do higher resolutions but has the disadvantage that the eye distance (horizontal compression) in libpano is fixed (patch, anyone?)
  3. Load the perspective into the GIMP.
  4. From the GIMP menu, open the Filter MathMap.
  5. Load the PVSqueeze filter.
  6. Click Preview to see the low-resolution live image.
  7. In MathMap’s User Values tab, adjust the values and see the live image morph until you like it.

MathMapping

From MathMap’s homepage: “MathMap is a GIMP plug-in which allows distortion of images specified in a simple programming language. For each pixel in the generated image, a script is evaluated which returns a color value. The script can either refer to a pixel in the source image or can generate colors completely independent of the source.” MathMap’s is a project of Mark Probst.

PVSqueeze

Using Tom’s PVSqueeze filter:

  1. Set the horizontal field of view (hfov) and eye distance (eyeDist) sliders roughly right for your input image.
  2. Adjust the vanishing point (VP) position (VPX, VPY), and the slopes of the 4 perspective edges (XXangl) so they line up with the appropriate edges in your image. There aren’t any drawn lines, but the change of image shape is pretty easy to see. Note you have to set the projection center Y identical to the VP Y by hand, or you get a black triangle in the middle (bug; but misaligning them can help you see just where the VP is).
  3. Adjust the shift modifiers for the upper and lower Vees to suit.  Basically these swing the pixel shift direction between straight up and down — which preserves verticals like chair legs — and radial with regard to the VP — which makes most floor patterns look nicer but also creates the curved diverging lines. The shift direction varies with vertical position, from vertical at the VP to radial farther out.  XVlim controls the vertical level at which this transition starts, and XTwid the width of the transition zone.  You can set them for pure vertical or pure radial shift, or some blend.
  4. Hit OK, review the full size result in the Gimp window; save or go back and adjust some more.

Next

So we used some smart math and arbitrary parameters to bend a captured panoramic image to please our taste. In doing this, we connected back to the Renaissance tradition of perspective on a mathematical basis. The resulting high-resolution picture is currently being printed on canvas to be displayed at the Ultra Wide Views exhibition that opens May 6 in Montréal, Canada. At Libre Graphics Meeting I will show more detail and I hope we can discuss how to classify the different projection types and make them more accessible to graphic artists.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s