In search of automated focus blend software

Hi Mica,
In the Netherlands we have a “intelligent lock down”. People are not 100% prohibited to go outside for a walk, run or something like a " photoshoot" :)). We have social distancing. So minimum 1,5 meter distance is applicable. Yes now i can not travel to really good photo-locations. I’am not permitted to go into Belgium (the forests are beautiful in Belgium). The border is 1 kilometer from home:((. I normally go to shoot in Belgium. But now I do take images in my local forest in Eijsden Netherlands. So I have some possibilities.
Concerning the lua script in Darktable is more like a homerun in baseball for me. I do not shoot often focus stacked images (with my fuji XT-2). But when i do have those images it comes really in handy to have a functionality to make it easy to focus blend or exposure blend in my favorite Darktable. It is nice to edit everything in one editor. And I realy like Darktable. I use Gimp only for printing.
Last week I did shoot some images in my local forest that i now can blend together in Darktable. I do not do any macro but this is also good for blending macro images.

Hope everything is Ok at your place. Stay save.
Greetings from the Netherlands,
Ruud.

We have similar measures here in California, but unfortunately the federal goverenment is talking about UV and injecting disinfectant into people… So…

Yes I have seen it on the internet. Unbelievable what an idiot.
Hopefully we have a vaccine really soon.
I’am certain international trips are only save when we will be vaccinated. Perhaps It will we the only way to travel.
We still hope to see our family in Romania this Year.
I’am working now for 6 weeks in a row at home. Order of the principal.
I’am getting used to it:)). Its better then all the travelling.
Greetings,
Ruud

Enfuse didn’t work for me. I guess GIMP can work, if you don’t mind editing for a few hours.

Affinity isn’t free, but has a 3 month free trial and is now a modest around $30 lifetime price. It’s doing an amazing job in a Minute.

Obviously Picolay can’t do better, I thought. In affinity I had to do some minor editing of my 9 image stack (of not perfectly aligned images). But that takes just a few Seconds.

For Picolay I just d/l the picolay.exe and did run that on my 9-image stack without reading anything, just with the default settings. I am very impressed with the result!

What options did you pass to enfuse?

I tried quite a bit, at least 20 variations. I didn’t record all. Just one example:

“C:\Program Files\Hugin\bin\enfuse.exe” --exposure-weight=0 --saturation-weight=0 --contrast-weight=1 --hard-mask --gray-projector=l-star -–contrast-window-size=5 --output=have78.tif abd*.tif

That image is about as good as I managed to get it:

A link to the 9 images (JPG, ZIP) ~10Mb

Hello @st.raw

I own myself Affinity and I run it on Windows 10 (64 bit)
Actually, I even bought primarily it for its feature regarding the focust stacking. For the rest I prefer GIMP…
Most of the time, Affinity works fine but with the most “difficult” shots it fails big time…

BTW, in the past, I have also tested the stack-options of ON1 Photo Raw but it was much worse than Affinity IMHO…

At present, I don’t want to spend money for Zerene stacker which also works on Linux (another commercial alternative would be Helicon).
This is the reason why I have started using Picolay.
It sports a well-explained manual but, most of the time, it works great out-of-the box with the standard settings.
What I like the most, is that it is very fast (but I have got a beefy CPU and RAM…).

BTW, on Windows, I always download the ZIP version of Picolay which is “portable”, in that you can copy-paste its .exe and run it without “installing” anything for real on your system.

Personally speaking, I have never used Enfuse because of the need to run Hugin as well.
With Picolay I only need to run a single software. Plus, I do not need to fiddle with its setting to get a good result, as you already noticed.

1 Like

There is also GitHub - PetteriAimonen/focus-stack: Fast and easy focus stacking, it works, but for large stacks i got mixed results.

Hello @andabata

There is also GitHub - PetteriAimonen/focus-stack: Fast and easy focus stacking

Thanks a lot for letting us know!

Just cursory tested focus-stack on Windows-10 (64-bit)
It works through the CMD (command line) of Windows and not through a GUIs but yeah, it produces good results on the whole :slight_smile:

Compared to Picolay it does not support RAWs (e.g. NEF from Nikon) but this also occurs with Zerene stacker and it is not a big deal IMHO…

I can also confirm Picolay runs on Linux. Personally I added it to Lutris and it runs just fine.

Also many thanks for the tip, I could never get anything resembling decent results with enfuse, which is also a royal PITA to use afaic.

Hello everyone,

Just done another cursory testing.
To allow everyone to compare my results I have used the jpeg images kindly proposed by @st.raw in this same post [1]

Nothing serious (“scientific”) I mean: bear with me :slight_smile:
Only used the default-settings of every software!
Actually, Affinity only offers its default-setting and you can not personlize it in case you are not satisfied whereas Picolay is much more versatile on this domain :slight_smile:

I have compared Affinity vs Focus-stack vs Picolay
On Windows 10 (64 bit)
CPU Intel I7 - 8 gb RAM

To make it short, all of them produce decent results.
IMHO, the best focus-stacking is given by Picolay, followed, at a close range, by Affinity and the last one is Focus-stack.
I deem Picolay the best because it does not produces artifacts nor big haloes around the coin (yep, there are some, but no big deal IMHO…)
Affinity produces a little more haloes around the corner of the coin (but very close to Picolay…)
Focus-stack produces ugly artifacts on the surface of the coin (but i have used the standard setting, through the CMD, and I am not an expert of this software!).

Here are my results (they are compressed to post here and the result is worse than what I can see on my monitor…):

I didn’t test enfuse with these jpeg images since I don’t have it installed on my computer
Hopefully, @paperdigits can add his test on these same jepg images when he has got some spare time :slight_smile:

[1] In search of automated focus blend software - #26 by st.raw

1 Like

This is my first try result from Affinity. Again, I didn’t really RTFM. The only thing I did was using the brush to remove the halo at the end of the coin (actually it removing all images but the sharp one). The whole procedure took 2 Minutes or so.

Hello @st.raw

I agree that the results of Picolay and Affinity are very close.
On my monitor I notice less haloes around the coin wih Picolay but I am nitpicking here :slight_smile:
Let’s say that Picolay offers much more settings if you are willing the read the manual in order to adopt them :slight_smile:

Here is a better screenshot:

My results from enfuse were not much different from what is already posted here, but I wonder, and perhaps @andabata can shed some light, is it better to have some overlap in the sharpness from frame to frame?

When I look at each individual coin image in geeqie, it looks like there is some focus breathing going on. I had a rough time getting align_image_stack to work on these images, and I wonder if that played a part in the output.

1 Like

I have to add a warning here: if you really want to compare different apps to focus stack several images, you need to be fair with the them (the apps).

Focus stacking is a really difficult process that involves among many other things making decisions about which regions are focused and which not, and then usually resize (and sometimes rotate) images to align them with each other.

Currently there’s no program capable of stacking raw images. That’s a fact. The only claim they honestly can do is that they are able to take a raw image as an input and then process it before the stacking process. So, who is better to decide the best raw processing for an image? A program with a standard, canned pipeline, or the one who has shot the raw images?

And if you wish to have the closest possible to a raw image, then process it an export to tiff, as a bare minimum.

But among the most important things when shooting images to focus stack them is to overlap the focused strips between adjacent images:

Same as @paperdigits has remarked, I have pointed to one area (among a few others) that has never been focused in any image. That’s called «banding», and happens when you focus too far away from the last image shot, and then there’s an area (a band) that is never properly focused.

This is important because different algorithms (programs) deal with banding quite differently from one another, even leading them to really weird artifacts (I have compared quite a few programs). So again, to compare programs, you better make sure that your images do overlap.

There are other artifacts here, like chromatic aberrations, and halos, that should be avoided when comparing programs. And about the halos, if you’re talking about the dark halo above the coin, maybe the problem lies in the lossy image compression (they are jpegs) and the fact that the top of the coin has never been shot focused, so the algorithms do their best guessing that part.

If you are a casual focus stacker, then any all automated stacking software is good, but on the other hand, if you really are into focus stacking and want the best results, then you absolutely have to visit www.photomacrography.net - Index page

4 Likes

Hello @XavAL

Thanks for your input!

Actually, Zerene stacker is my preferred sotware for stacking.
Over the years, I have tested several times this software, as a trial version (30 days), but, in the end, I have never bought it (maybe in the future…)
It doesn’t work on RAW files and Its programmer has always explained this is due to good reasons. From what I have gathered from his explanations most softwares (Helicon?) convert internally the RAWs into Tiffs and this is the reason why they are able to “use” them without prior conversion from the users.

BTW, I know the web-site you suggested :slight_smile:
If i remember correctly, in the past, the programmer of Zerene has posted many posts on that forum.

And yep, I DO agree that every software has its pros and cons: Darktable vs RawTherapee, does it ring a bell :slight_smile: :slight_smile:
This is a link to a comparison among some softwares for focus-stacking:

In these past months Picolay has improved quite a lot and it is a likely a bit outaded now…

I have no experience in this except for a few experiments with enfuse. The key is preparation. The standard rules of macro and product photography apply. Are you getting the most out of your equipment, are you preparing the scene properly and dressing your star appropriately?

In the case of your camera:

Do you know the ins and outs of your particular lens?
Which aperture ranges and zooms minimize artifacts?
Do you have the appropriate filter or maybe you should remove them?
Do you have the lens hood on or not?
Is your sensor as still as can be?
What is the breathing of your lens like?
Does the lens hood cast a vignette at some point or let in rays of light at an odd angle?
Are you leaving any gaps as you are taking the set for focus stacking?
Is your lens too wide and therefore the barrel distortion changes too much between successive apertures?
Should you invest in a rail?

You can repeat this questioning for the lighting, framing and subject preparation. E.g., is the coin clean and polished? If you look up coin polishing, it is quite the process!

In short, your imaging processing is only as good as its inputs, unless you are doing machine learning type stuff, in which case a lot of the image gets simulated / interpolated to look pretty.

Yes, Zerene is my preferred software too. And I’ve bought a license because I have like a thousand stacks to be done ahead…

The programmer of Zerene is still one of the main posters there, but never tries to sell his program. I has a lot of knowledge, and likes to share it with the forum users. He is a focus stacker, too.

I was talking in my previous post about comparing software, but once you have chosen your preferred one, you must know it to get good results. You could RTFM, but the best path always includes a lot of practice. That way you start to know what your software is requiring in the images: less contrast, highlights far from clipped, not too deep shadows (to avoid excessive noise), correctly fixed chromatic aberrations, … And there’s where the good reasons come into play: there’s no program capable of judging better than yourself the correct processing of a raw image. And with correct comes processing them to meet the demands of the stacking program.

If you’re a casual user, just forget all of this and enjoy your images. But if you’re serious about it, then you will find that stacking is as demanding as is addictive :smiley:

And that comparison is a nice starting point, by the way :wink:

2 Likes

Is it better to edit/develop the photos before or after stacking with enbend/enfuse?
I would think that it’s best first to convert the raws to tiffs without adjusting exposure, contrast, staturation (of course convert them with the same settings such as white balance, demosaicing etc.), then combine them, and then edit the result (also remove artifacts with retouch/clone brush).
But I still have very little experience with this. I just bought a camera that can focus stack.

You will have to test for yourself which approach is better for your images.

I perform a basic processing of the raw images (white balance, exposure, capture sharpening, some wavelets, and sometimes lab adjustments on the luminance component). No changes on colors.

After stacking comes the final processing.

1 Like