Comparison of TuFuse focus stack with other methods

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Comparison of TuFuse focus stack with other methods

Post by rjlittlefield »

TuFuse is a new tool, coming from the stitched panorama community, that is capable of fusing pre-registered images for HDR (high dynamic range), focus stacking, or both. It uses a multi-resolution pyramid method that is well described on the tool's home page and in the papers linked from there. The method is implemented in a couple of different tools already, of which TuFuse is currently the most mature.

I've been experimenting with this method for the last several weeks, working to understand when it works, how it fails, and so on. Of course there are a bunch of interesting interactions, and I'm really not ready yet to write up what those are. But the bottom line is that the method looks very promising --- I'm excited.

Last night, I finally decided it was time to post out a first look and let you folks know about this new direction. (Or maybe it's an old direction. As the TuFuse page points out, what's being used are in some sense fairly minor enhancements to "a multi-resolution fusion technique first described 25 years ago". I guess sometimes it takes a while for things to click!)

What's shown below are side-by-side comparisons of TuFuse and each of the other four commonly used methods from Helicon Focus (HF) and CombineZM (CZM). Clicking on the "Animated comparison" links will get you animated gifs that alternate each pair of methods, overlaid on exactly the same screen space so that differences jump out at you. I strongly recommend to look at the animations -- you'll be shocked at how much more you see.

Note that TuFuse only works with pre-registered images. This stack was shot with a traditional macro setup, so there are scale differences between frames, and the stack is not suitable for direct input to TuFuse. To generate registered versions of all the frames, I first ran them through PTGui. This process does an extremely good job of registration (far better than either Helicon Focus or CombineZM, for difficult stacks). Unfortunately for this type of stack it also requires guru-level knowledge of control points, lens distortion parameters, etc. etc. I'm chagrined to admit that I messed it up several times myself, and I probably know that area as well as anybody else on the planet.

Not to worry, though. I'm quite confident that it's only a matter of time -- and probably not much -- before some variant of this method gets incorporated into one or more of the standard tools that already understand how to deal with deep fuzzy stacks. That'll be nice! :D

The images shown here are crops, resized in Photoshop to 40% of the actual pixel size coming from my 300D. No other post-processing except for minor level adjustment, applied uniformly to all images.

All tools were fed the same set of pre-registered images; I just turned off auto-alignment in HF and CZM. Version numbers were Helicon Focus 4.40 Pro; CombineZM February 3, 2008; TuFuse 1.34. Default parameters for all packages except as specified here for TuFuse.

--Rik

PS. Late-breaking news from email a few minutes ago is that there's an even more recent version of TuFuse ("latest beta version of TuFuse Pro (0.9.3)") that includes some other improvements for deep focus stacks. I haven't tried it yet...

Edit: I see I failed to remove the post-sharpening step in the two CZM macros, so those two images have actually been sharpened a bit compared to the TuFuse output. It's a minor difference, but it explains why a few details look more crisp in the CZM images.

Image
Animated comparison.

Image
Animated comparison.

Image
Animated comparison.

Image
Animated comparison.

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

Rik,

The result quality is, of course, the most important item.

How about a rough rough comparison of execution time to complete a stack?

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

"Very affordable"

On the test I just ran using these images, TuFuse took 218 seconds. Helicon Focus Method A, with alignment disabled, took 95.

--Rik

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

Looks really good and I intend to read the papers when I get the chance, I've been meaning to ask about the theory behind these algorithms. I'd love to have a go at inventing some new ones some time.

Would either of you have an aligned stack you might be able to donate to me for test purposes?

Graham

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

I sill have every stack I've ever posted. Any of them you want are available for research purposes.

Most of the stacks are not registered, but it seems that align and export using CombineZM version 1st of April 2008 does a pretty good job.

The spider pedipalp is already posted because I've been sharing it with software developers.

See http://www.janrik.net/MiscSubj/2008/Spi ... /457CANON/ . It is straight from the camera, but the DOF is so shallow that there's no problem to ignore scaling and just pretend that it's already properly aligned.

--Rik

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

Thanks, that's super.

Graham

augusthouse
Posts: 1195
Joined: Sat Sep 16, 2006 1:39 am
Location: New South Wales Australia

Post by augusthouse »

Rik,
You chosen a great image to work with in this project. The animated gifs are showing some diffusion. I'm going to put the jpegs in to a .swf and see how that displays the comparisons.

I downloaded TuFuse yesterday after you mentioned it in the other post. I haven't used it yet - there being no GUI.

So you are feeding TuFuse with individual images registered using CombineZM and/or Helicon Focus and then using TuFuse with PTAssembler as interface (GUI)?

This is exciting!

Craig
To use a classic quote from 'Antz' - "I almost know exactly what I'm doing!"

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

augusthouse wrote:So you are feeding TuFuse with individual images registered using CombineZM and/or Helicon Focus and then using TuFuse with PTAssembler as interface (GUI).
No, I just launched TuFuse as a command line application. In fact the exact script that I used to help answer Charlie's question was
date
"c:/DistributionPackages/tufuse/tufuse" -o tufuse.tif -p 1 --wMode 1 --wExposure 0 --wContrast 1 --wSaturation 0 -e 10 pano*.jpg
date
executed in Cygwin. (The input files were "pano0000.jpg" etc, as produced by PTGui. If they had come from CombineZM, their names would have been different.)

There is a GUI for TuFuse that comes with the TuFuse Pro package. In addition to the GUI, TuFuse Pro adds a bunch of functionality. According to Max Lyons, author of the package, this includes
the ability to adjust the levels of the output image, much more control over the shape of the exposure weight curve (used for exposure blending), ability to save as JPG, ability to specify the number of levels relative to default, fast previews, much more control over RAW development parameters, etc...
But I didn't need any of that stuff, so I just did these tests with the freeware version.

--Rik

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

I've played around a little with Tofuse now as well. The results do look very good in regards to the dreaded "halo" and in areas where there are crossing hairs and appendages.

Laurie mentioned seeing an increase in noise in oof areas using Tufuse. I also see this. Here is a small piece (at about 300%) from a comparison (With Helicon) I did from an old stack.

Image


In addition to the increased noise I have also experienced a contrast increase as well. In some cases no big deal, but in others it pushes the highlights too far:

Image

All this is very preliminary, and I need to look at my source files and the program parameters that were used far more closely. (Perhaps this post is far too premature since I have not been able to spend too much time with the program yet... and these issues may be easily addressable with program settings). I mention this to see if others are experiencing the same things.

lauriek
Posts: 2402
Joined: Sun Nov 25, 2007 6:57 am
Location: South East UK
Contact:

Post by lauriek »

I've also noticed the increased contrast, although when I first spotted it I thought it was increased brightness (but you are right, it is contrast) - a couple of parts of my recent ant stack were suddenly completely blown highlights. (They were about at the limit previously - CZM did not seem to increase the contrast compared to the input images as far as I can tell)

I've redone that stack with the aligned images and the output is still noisy in the OOF areas, although there is a bit of noise in my input images, so I'll have a go at some point at processing the whole input stack in neat image then re-stacking, I suspect the output will be a lot better but will probably still require a little further NR (looking at how it seems to magnify up from the input files)

I'd also say I need to look at this a lot more, I haven't even tried Rik's command above, just the basic tufuse command given in the help text file, so all default settings so far, just wanted to prove it was working before I started mucking about with it!! :)

Tempted to register the pro package, I've not used the command line much of late, apart frmo some linux boxes at work, I don't like windows cli tools!! This and CZM is making HF look a little pricey now!!

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Charlie,

Thanks for the added images.

My spider pedipalp stack had significant trouble with increased contrast as well. I know that Max Lyons (author of TuFuse) has been working on that problem. As I understand the current status, some corrections for that have been installed in the TuFuse Pro version, but not yet in the freeware version. That's why I used the Pro version for the pedipalp images that I posted out. If you're not currently using the Pro version, I'd suggest to check it out. It comes packaged with a tufuse.exe that can be used as a command line app, just like the free one.

I am not aware of any cures for the increased noise problem at this time. There's more than a bit of tension between "find detail wherever it exists" and trying to keep the noise down. I suspect we're going to be fighting that one for a long time.

--Rik

lauriek
Posts: 2402
Joined: Sun Nov 25, 2007 6:57 am
Location: South East UK
Contact:

Post by lauriek »

Well I think the contrast issue is probably avoidable anyway - at the moment I know you use levels in early processing (raw?) and I do the same, to bring the contrast to something sensible, we're used to the stacking software not increasing the contrast. I suspect if we were to not push the contrast at all at the raw stage, and process these non contrasty originals in TF then I suspect the output may be okay.

ETA but it would be better if we didn't have to process the RAW files into two separate batches of TIFFs for the different stacking tools! My recent 750gb disk purchase is starting to look not big enough... ;)

The noise issue is not a major one either I feel, although the noise looked really bad in the OOF areas, it actually cleared up quite well with a bit of judicious NR in neat-image...
Last edited by lauriek on Mon Apr 14, 2008 12:43 pm, edited 1 time in total.

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

Laurie,

After I posted my last message I went back and played with the program parameters a little. I was able to improve the excessively bright highlights significantly (and suspect this will be controllable).

Haven't had time to look at the "noise" issue much yet.
Think I'll reserve any more comments until I've developed a better "feel" for the program. :wink:

acerola
Posts: 251
Joined: Wed Dec 13, 2006 2:28 pm
Location: Hungary
Contact:

Post by acerola »

I run a stack or two also, but did not have time to compare it in detail. First impression is very good. And I especially glad that tufuse appeared, because HF trial period is ended for me. Rik, thanks for the detailed test.
Péter

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

I posted out the source images for this stack too.

http://www.janrik.net/MiscSubj/2008/Joh ... /464CANON/

--Rik

Post Reply Previous topicNext topic