Enblend Seam Placement


This web page supports PanoTools postings http://groups.yahoo.com/group/PanoTools/message/9497 and http://groups.yahoo.com/group/PanoTools/message/10384 .

The points of this page are

Part 1: PTStitcher versus enblend seam positions

I got attracted to these issues by assembling an actual pano that required quite a bit of hand work and thus gave me lots of opportunity to be bothered by strange masks. 

To start at the end, here's the final pano, after contrast blending and various other touchups.  6100 x 4880 pixels, prints great at 305 dpi.


Now, let's go back to the beginning and look at the mask issues.

Here is my original scene as shown by PTGui.  It is a 2 x 4 array of images, shot handheld with a small auto-everything film camera.  I have not cropped the film scan edges here, so you can see some of the frame boundaries.


Now for demonstration I replace the original images with color- and texture-coded images, to make it easier to see the visible regions computed by PTStitcher and Enblend.

First, the images in the same order as in the original scene.  (These are still as shown by PTGui, so the moire effects from the texture are different from what is shown later.)


Here with the order reversed.  You can see that the layout is almost symmetric, top-to-bottom, and that the images are spread out fairly evenly side-to-side.


Now to make the PTStitcher vs Enblend comparison... 

I render with PTStitcher and Enblend, and mark the edges of visible regions with white lines so that you can see them better.

Here are the visible regions computed by PTStitcher.  They have strange shapes and are very far from optimal.  Many of the seams are near the edge of a source image instead of being in the middle of the overlap between two images.  There are strange 45-degree bevels near the image edges.  I do not know how these shapes are computed, but they are typical in my experience.


The ones computed by Enblend are much better.  The seams are much closer to the center of overlap regions.



Even the Enblend regions do not seem quite optimal in the sense of using pixels as far away from an edge as possible.  The boundary is too low (not centered top-to-bottom) and seems more jagged than it ought to be.

Here are region boundaries drawn by hand using a farthest-from-edge criterion, on top of a picture with transparent layers.


If you want to play with these issues, here is a .zip file containing the PTGui project and test images: PTStitcherRegionsDemo.ZIP

Part 2: Editing alpha masks input to enblend.

Here is one of the input masks shown as transparent overlay on the enblend output.



If I paint a black rectangular hole in the mask, then the new output (with overlaid mask) looks like this:



Notice that a significant additional border is provided by enblend, around the hole in the mask.  I presume this is a result of enblend computing its seam positions as (roughly speaking) the midline of the overlap region. 


In any case, it is not immediately clear to me how to place a seam by editing the mask. 

By painting the mask, I can definitely make enblend not use specified pixels from some source image.  But that has the side effect of changing which image lots of other details come from.  It would be nice to have direct control over where enblend puts seams.


For more information, reply to the PanoTools posting or contact me by email.

Rik Littlefield