[ptx] Band Blending [was: Hugin wishlist, RFC]

Terje Mathisen terje.mathisen at hda.hydro.com
Mon Feb 23 13:10:43 GMT 2004


Andrew C Mihal wrote:
> http://www.cs.utah.edu/gdc/projects/urt/help/man1/pyrmask.html
> 
> I had to do some hacking to get this tool to run because there seems to 
> be a malloc/free bug. I didn't fully fix it - I'm just letting it leak 
> memory, it's good enough to test it out. I had to do some ridiculous 
> tiff->pnm->rle conversions to try it but the results were promising.
> I stitched two images with autopano-sift and hugin and ran the result
> through pyrmask. There is no noticable seam in the sky and no noticable
> ghosting in the foreground. I think it's better than what I can do by hand 
> in gimp.

Sounds impressive!

My manual approach has been to set blending mode to Difference, then 
look for a contineous black path from top to bottom of the overlap region.

I then draw this line with the Lasso tool, and make a closed path around 
the end of the image.

I then apply a small amount of feathering (maybe 3-5 pixels) to this 
selection, before erasing the mask inside the selection. This gives good 
results for detailed areas.

Next I'll go back to any low-frequency parts, i.e. blue sky and/or a 
smooth water surface, and use the Gradient tool to make the overlap as 
wide as possible here.

It is also possible to do the first, select + gradient + erase, part 
multiple times with varying feather, once for each main part of the 
joining line.
> 
> One downside is that you have to give the pyramid blender a mask to 
> identify the transition zone. This paper talks about calculating the mask 
> automatically:

To me it would seem (perhaps naively?) that you could use the frequency 
spectrum to determine how wide the feather should be?

The SIFT papers talks about splitting the source images into high and 
low-frequency parts and joining them separately, I guess this is similar 
to the pyrmask approach?

> Also, has anyone thought of doing some wavelet processing to improve 
> sharpness in the overlap region? This is usually on the edge of a frame 
> where the focus is not so good.

With 50% overlap, no stitching line would be further than about 60% of 
the center-edge distance, so both vignetting and focus problems are less 
serious for panos than for regular photos.

Terje

-- 
- <Terje.Mathisen at hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"


More information about the ptX mailing list