Experimenting extended DOF images with Enfuse

160 views
Skip to first unread message

michel thoby

unread,
Feb 5, 2008, 11:36:35 AM2/5/08
to hugin and other free panoramic software
http://michel.thoby.free.fr/CuttySark/Essai_Helicon-Focus.html

I have suplemented this article (that probably may be understood from
French, thanks to lot of illustration) with a paragraph to show what
Enfuse may yield in comparison with a specialized commercial software.

http://michel.thoby.free.fr/CuttySark/composite-trois-matsPSCS_web.jpg
was the output by Helicon Focus.

http://michel.thoby.free.fr/CuttySark/result.jpg
is what I have got after a very short learning period with Enfuse for
this function. Couldn't it better?

Regards,

Michel

Erik Krause

unread,
Feb 5, 2008, 12:47:26 PM2/5/08
to hugi...@googlegroups.com

michel thoby wrote:
>
> http://michel.thoby.free.fr/CuttySark/result.jpg
> is what I have got after a very short learning period with Enfuse for
> this function. Couldn't it better?
>

Now this is really interesting. I got a focus stack from Rik Littlefield
(the one which he used for
http://www.photomacrography2.net/forum/viewtopic.php?t=4051 ) consisting of
61 images with very narrow DOF and the result was almost perfect (according
to Rik).

I tried on with different values for --ContrastWindowSize and got a slightly
better result with --ContrastWindowSize=7

I used --wExposure=0 --wSaturation=0 --wContrast=1 --HardMask
The images where perfectly aligned without alpha mask (alpha mask seems to
cause a problem similar to the one you described - see
http://tinyurl.com/ywwb2t for details)

best regards


-----
Erik Krause
http://www.erik-krause.de
--
View this message in context: http://www.nabble.com/Experimenting-extended-DOF-images-with-Enfuse-tp15294081p15294809.html
Sent from the hugin ptx mailing list archive at Nabble.com.

Pablo d'Angelo

unread,
Feb 5, 2008, 1:05:55 PM2/5/08
to hugi...@googlegroups.com
Hi Michel,

michel thoby wrote:
> http://michel.thoby.free.fr/CuttySark/Essai_Helicon-Focus.html


>
> http://michel.thoby.free.fr/CuttySark/composite-trois-matsPSCS_web.jpg
> was the output by Helicon Focus.
>
> http://michel.thoby.free.fr/CuttySark/result.jpg
> is what I have got after a very short learning period with Enfuse for
> this function. Couldn't it better?

It looks like the source images are not aligned very well. Enfuse does not
align the images prior to focus stacking, it only does image blending. I
think Helicon Focus probably does alignment before stacking the images.

When aligning the image stack and then blending it with enfuse, I get
the following, much nicer result:

http://hugin.panotools.org/testing/enblend/CuttySark_aligned_fused.jpg

This seems comparable to the Helicon Focus result with respect to sharpness.
The main difference are now the dust-spots in the enfused image. Helicon
Focus seems to have an algorithm that avoids including dust-spots from out
of focus images.

I used align_image_stack (included in recent hugin snapshots, not sure about
the OSX ones, though) for the alignment, but any other tool (hugin etc.) can
be used for it as well, as long as it can also compensate for the slight
difference in magnification (optimize HFOV for each individual image, except
the first).

Note that currently, there is a bug in enfuse when using --wContrast with
images with alpha channel, so I stripped the alpha channel before feeding
the aligned images into enblend.

ciao
Pablo


Rik Littlefield

unread,
Feb 6, 2008, 12:30:15 PM2/6/08
to hugi...@googlegroups.com
Pablo d'Angelo wrote:

>When aligning the image stack and then blending it with enfuse, I get
>the following, much nicer result:
>
>http://hugin.panotools.org/testing/enblend/CuttySark_aligned_fused.jpg
>
>This seems comparable to the Helicon Focus result with respect to sharpness.
> The main difference are now the dust-spots in the enfused image. Helicon
>Focus seems to have an algorithm that avoids including dust-spots from out
>of focus images.
>

Helicon Focus provides a "dust map" feature that works from a "white
frame" provided separately.

I am not aware of any algorithm that can reliably identify dust spots
from a single stack. It seems an ill-conditioned problem if the stack
is short and well aligned. With deep stacks and/or alignment shifts
between frames, perhaps something could be done.

--Rik


Erik Krause

unread,
Feb 7, 2008, 8:48:53 AM2/7/08
to hugin-ptx
On Wednesday, February 06, 2008 at 9:30, Rik Littlefield wrote:

> I am not aware of any algorithm that can reliably identify dust spots
> from a single stack. It seems an ill-conditioned problem if the stack
> is short and well aligned. With deep stacks and/or alignment shifts
> between frames, perhaps something could be done.

I don't understand completely. Do you speak about dust on the sensor?
This should be relatively easy to identify from a focus stack: A dust
spot stays sharp in all images...

best regards
Erik Krause
http://www.erik-krause.de

Klaus

unread,
Feb 13, 2008, 10:21:49 AM2/13/08
to hugin and other free panoramic software
Hi,

On 7 Feb, 13:48, "Erik Krause" <erik.kra...@gmx.de> wrote:
> I don't understand completely. Do you speak about dust on the sensor?
> This should be relatively easy to identify from a focus stack: A dust
> spot stays sharp in all images...

It need not be dust on the sensor, but can also be a dust speck
on one of the lense surfaces. Then there is some darkening
maybe 50-100 pixel in size. And it is aperture-dependent,
incresing aperture number means smaller size but darker.

Call it dust map, or white frame, or flatfield, and you probably
need some time to process one from a photo of a white surface,
possibly clear sky, but I can tell you it is a useful thing indeed.

Cheers

Klaus

Rik Littlefield

unread,
Feb 13, 2008, 4:03:41 PM2/13/08
to hugi...@googlegroups.com
Sorry, I missed Erik's question -- there is lots of traffic on this list!

As Klaus writes, dust can be anywhere. 

Even dust "on the sensor" often is not sharp because in fact it's not really on the sensing surface but rather on a piece of glass in front of the sensing surface.  Shoot a blank subject at a full range of f-stops using a dirty sensor, and you'll quickly see that there's a big difference between wide open and full closed. 

So, what is special about a dust spot is not that it stays "sharp" in all images, but rather that it stays "equally blurred" in all images.

With a deep stack at high magnification, such spots can be easily recognized.  But with a shallow stack at low magnification, they cannot. 

Suppose that you shoot a short stack of a white fabric napkin that has some spots of tea on it.  It is very difficult to tell the difference between a dust spot that has exactly the same blur in all images, and a spot of tea that is blurred on the napkin and thus has only a tiny difference in blur between "in focus" and "out of focus" frames. 

This is what I meant when I wrote "It seems an ill-conditioned problem if the stack is short and well aligned."  Dust in the optics and blurred spots on the subject are both almost equally good explanations for the pixels in the stack.  But one you want to get rid of, and the other you don't.

Hope this helps,
--Rik
Reply all
Reply to author
Forward
0 new messages