[ptx] Re: Enblend suggestion: focus score weighting

Rik Littlefield rj.littlefield at computer.org
Sat Jun 19 03:10:53 BST 2004


I have posted at http://www.janrik.net/ptools/ExtendedFocusPano12/
material that may be helpful in evaluating some of these issues about
extended focus masks.

Quoting from the web page...

"Posted here is an experimental version of  pano12.dll that determines 
visibility and computes masks from estimated focus instead of just image 
overlap.
...
The computed masks are present in "Photoshop with feather" (PSD_mask) 
and "Multi-image feathered TIFF" (TIFF_mask) outputs.
...
This code uses the classical variance method of estimating focus.  An 
array of "best source" image numbers is computed, recording at each 
pixel position the PTStitcher image number that has the largest variance 
of pixel values within a focus-estimation window.  Then masks are 
computed as follows.  For mask type m0, at each pixel, the mask value is 
255 for the best image and 0 for all others.  For mask type m1, at each 
pixel, the mask value is 255 for the best image and all lower-numbered 
images, and 0 for all higher-numbered images.  For mask type m2, the 
array of "best source" image numbers is smoothed by a simple averaging 
filter.  Then at each pixel position, the mask value is computed as 255 
if the image number is less than or equal to the average, 0 if the image 
number is greater than the average+1, and linearly interpolated between 
255 and 0 as the image number is between average and average+1.  I make 
no claim that this is a particularly good way to do the job, but it was 
quick to get working and generates perhaps surprisingly good results."

I will be on travel for the next couple of days, so may not be able to 
answer questions about this thing for a while.  But probably not needed 
anyway, unless I messed up the web page.  Source codes are provided, and 
the mods themselves are only about 250 lines.

Hope this is helpful,
--Rik





More information about the ptX mailing list