• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

focus Stacking

StuartRae

New member
Not sure if this in the right forum. If not please move it.

I've been having a look at a bit of free focus-stacking software, CombineZM.

I took three shots of a clover flower with my 60mm macro set at f2.8, each one focusing on a different part of the flower, and then combined them.

The following example isn't perfect, for a variety of reasons, but it demonstrates the general idea.

1. I used manual focusing, and my eyes aren't really good enough for that, especially with a 350D viewfinder.
2. I could have taken a lot more 'slices', which would have improved the resulting image.
3. I was in a hurry - the whole thing took no more than 10 minutes, including taking the shots, converting to JPEG, down-loading the software, installing it and stacking the images.

Has anyone else tried CombineZM?

Slice 1

slice-1.jpg


Slice 2

slice-2.jpg


Slice 3

slice-3.jpg


Stacked image

stacked.jpg


Regards,

Stuart
 

Cem_Usakligil

Well-known member
Nice example Stuart, thanks for sharing this info with us. I am aware of focus stacking possibilities offered by the likes of tufuse but haven't tried it myself yet. Maybe I should have a go at it soon.

Does it offer masking possibilities for certain areas of the picture (such as the background) which should not be stacked/sharpened?

Cheers,
 

Alan Cole

New member
Thanks for the pointer to this program Stuart. I have downloaded it together with the Help file. Its most useful purpose for photographers seems to be in "doing" Focus stacks, but it can be used to make Constant exposure stacks (to reduce noise) and Variable exposure stacks (to increase detail in the darkest and lightest areas of a pic.)

It doesn't seem to have any real masking function, but it is possible to make overall colour brightness and contrast changes to the finished image.

I haven't used the program itself yet as there is quite an amount of pre-reading to do if you want to understand what is happening. However, as Stuart has found a Focus Stack operation only needs a click on a menu item or two.

http://hadleyweb.pwp.blueyonder.co.uk/CZM/News.htm is a good starting point to get into it. And its a free program!

Alan Cole
 

Chris Lilley

New member
Nice example.

I have briefly tried two focus stacking programs - Helicon Focus (not free, but has a trial version) and ImageJ (which is free).

I notice that some fiddling is needed if the stack of images has changes in position or in scale (eg from focussing) although ImageJ has an alignment function which helps with that. Also, picking thed wrong settings can result in hours of computation for no increase in quality ...

Here is a test I did in Helicon Focus. The subject is an Iron Age coin, and the setup was a Nikon D40 plus a Micro-Nikkor 55mm f/2.8 on a tripod facing downwards. Available sunlight.

 
Very interesting coin, Chris

I notice you say it took you four hours to combine 14 images in Helicon focus. I'm surprised it took that long. I've been doing some of these recently manually in Photoshop CS3. I've had some practice now but this one took me an hour or so and also involved combining 14 images:

_DSC1101_Composite.jpg


I'd heard of CombineZM (and Helicon) but haven't tried them. It may well be worthwhile if they're quick enough and I can't say I understand how powerful they are. My presumed reservations for staying with a manual method are (1) I prefer to stay in 16-bit as long as possible, (2) I can adjust exposure (or colour balance) between layers as precisely as required and (3) there is a lot of adjustment required, especially in areas where there is high colour contrast because an out of focus element is always larger than it's in-focus equivalent on a different layer and (4) I'm familiar with otimising images in Photoshop.

Regards,
Murray
 

StuartRae

New member
Hi Murray,

I posted a picture of a stacked rose in the Macro forum.

It was done using Helicon to stack 16 full-size 16-bit TIFFs (47Mb each) and it took about 15 minutes (enough time to make a cup of coffee and have a smoke). My PC's nothing special - a fairly old Pentium 4 with lots of fast memory.

As I mentioned at the top of this thread, I've tried CombineZM, but Helicon produces better results without having to fiddle with parameters.

Regards,

Stuart

======================
Edit:
Just ran the rose again and it took 4 minutes.
 
Last edited:

StuartRae

New member
Hi Ben,

I don't know about earlier versions, but the one I'm using has two sliders, Smoothness and Radius, which allow you to adjust the compromise between sharpness and ghosting artifacts.

In my post in mondayifunfotoday the main elements are all focus-stacked.

Here is the big onion planet which was composed from, IIRC, about 12 frames, plus a 100% crop. It doesn't look too soft to me, but then my eyes aren't what they used to be :-(

onion-stacked.jpg


onion-stacked-crop.jpg



Regards,

Stuart
 

Chris Lilley

New member
Very interesting coin, Chris

I notice you say it took you four hours to combine 14 images in Helicon focus. I'm surprised it took that long.

You are correct that it was far too long. My first attempt had odd haloing as each image in the stack was slightly larger than the one before, due to the way I had taken the photos. My next attempt produced a good result but with hours of wasted computation as i went into advanced settings and slid all the sliders up too high.

Thats why I said "Also, picking the wrong settings can result in hours of computation for no increase in quality ..."

So the result was fine but the same result could have been obtained more rapidly with a bit more thought on my part. Will know better next time, if I end up getting the software.
 
Stuart

You say in the other thread that focusing was a problem on your 350D. Live view (zoomed in) makes that much easier.

Regards,
Murray
 

Ben Rubinstein

pro member
The reason I asked about sharpness is that if there was a loss in sharpness then for specific images (not macro of course) the resulting loss from diffraction shooting stopped down may be a viable alternative. If however the overall sharpness is as good as the original frames at the focal point then the advantage would be huge.

I've read a lot about problems with halo-ing, etc as a result of OOF specular highlights, is combining more frames to ensure that there is far less elements which were ever not photographed at the correct plane of focus going to reduce the possibility of this problem? How about shooting 3 frames at f11 rather than 10 frames at f5.6?
 

StuartRae

New member
Hi Ben,

halo-ing,............. is combining more frames ...........going to reduce the possibility of this problem? How about shooting 3 frames at f11 rather than 10 frames at f5.6?

I don't think that too few frames will produce ghosting, just areas of the final image which aren't sharp. The only ghosting I've had is when individual frames vary too much in size. $$

Helicon suggest that the 'distance' between frames should be at least as small as the DOF, and preferably overlapping slightly.
This would suggest that at typical macro distances, you would need 14 frames at f5.6 or 7 frames at f11 to produce a good result for an object wich is 1.5 inches deep.

(Figures provided by the on-line DOF calculator which I usually use, and based on a 350D and 60mm macro used at a distance of 10 inches).

Regards,

Stuart

====================
$$
I wondered if focusing frames by moving the object slightly would allow more control.

I made a simple table which allowed me to move the object 1mm at a time by turning a 6mm metric screw. The ghosting artefacts were very obvious and the sharpness seemed to be reduced, so I abandoned the experiment.

Here's and example:

pink-stacked.jpg
 
If however the overall sharpness is as good as the original frames at the focal point then the advantage would be huge.

When the correct method is used, the overall sharpness will be close to identical to the individual focused images. Whatever softness is introduced, is due to e.g. mistaking noise for detail. Of course the result is only going to be as good as the ability to detect real detail in the individual images.

I've read a lot about problems with halo-ing, etc as a result of OOF specular highlights, is combining more frames to ensure that there is far less elements which were ever not photographed at the correct plane of focus going to reduce the possibility of this problem? How about shooting 3 frames at f11 rather than 10 frames at f5.6?

As Stuart said, one should attempt to let the DOF regions connect, or slightly overlap. The trick with determining that is to recognize the fact that traditional DOF formulae use a much too liberal definition of the COC parameter. In my experience, on a Bayer CFA sensor array, one should use a COC of approx. 1.5 times the sensel pitch, and an aperture that produces a matching diffraction spot diameter.

Also, the stacking method used makes a difference in the sensitivity to producing halos. Helicon Focus has added a "Method B" some upgrades ago that seems to be modeled after an improvement suggestion I made to the programmer. It first builds a simulated 'depth-map' based on the in-focus areas of the different images, blurs it, and then uses that to select the different regions in the images. This tends to reduce the halo tendency.

It remains to be important to first align the images, which includes scaling them to correct for perspective magnification. The only way to avoid that scaling need is by keeping the entry pupil of the lens in the exact same position and change the position of the sensor plane, thus changing the magnification (and exposure level) at capture time. Fortunately, scaling after the fact also works good enough.

Bart
 
I made a simple table which allowed me to move the object 1mm at a time by turning a 6mm metric screw. The ghosting artefacts were very obvious and the sharpness seemed to be reduced, so I abandoned the experiment.

Such a positioning stage usually works fine, as long as the images are scaled to compensate for the differences in magnification. The benefit of a positioning stage is that there is less risk of camera movement, and the amount of movement can be controled to very accurately match the DOF.

Bart
 
Does Helicon not scale and align the images automatically?

Yes, that's why it is used so often. It's very convenient.

The preferences allow to switch the various changes on/off and limit the amount of adjustment, so if it doesn't work as intended, one might need to tune the constrants.

Bart
 
Last edited:

StuartRae

New member
Hi Bart,

Helicon Focus has added a "Method B" some upgrades ago.........

Having tried both methods, I find that Method B, although a bit slower, gives superior results.


....as long as the images are scaled to compensate for the differences in magnification

Is it OK to crop to fixed coordinates and then use, e.g., PS to scale all frames to the same size? Does the re-sampling introduce artefacts which might confuse the focus-detection algorithm? I had the feeling that stacking JPEGs was less successful than stacking TIFFs, and assumed the compression artefacts were at fault.

Stuart
 
Having tried both methods, I find that Method B, although a bit slower, gives superior results.

Hi Stuart,

Sofar, I also like method B better.

Is it OK to crop to fixed coordinates and then use, e.g., PS to scale all frames to the same size? Does the re-sampling introduce artefacts which might confuse the focus-detection algorithm?

There should be little difference in which application is used for the alignment, as long as translation, rotation, and scaling are done. Photoshop might have some difficulty aligning Focus Stacks though, I'm not sure. I think PS is more intended to align equal-focus images, whereas Helicon Focus obviously tries to align defocused areas. The rate of success will depend on the method used. I could imagine that HF uses something like a Gaussian pyramid to get a better grip on the defocused areas.

I had the feeling that stacking JPEGs was less successful than stacking TIFFs, and assumed the compression artefacts were at fault.

It would be as confusing as random noise. It's best to avoid those types of artifacts, although max quality JPEGs shouldn't cause too much of a problem.

Bart
 
Last edited:
It is not necessarily going to be possible to avoid ghosting, either using a utility or combining the images manually. Whether this is an issue will depend on the colour contrast, how far away parts of the image are that you want to have in focus and the aperture of the exposure. For example, in my image on the first page, where a leaf was in focus, the yellow ends of the flower (whatever they may be called) would be large and out of focus while when the yellow bits were in focus they would be much smaller and surrounded by an out of focus background. No way around that without custom adjustment, no matter how many shots you take or how much you close down.

On the other hand, with the shot of the onion there would be no such problem.

Regards,
Murray
 

Chris Lilley

New member
Does Helicon not scale and align the images automatically?

Yes to an extent. The radius within which it considers the same point to have moved is adjustable. The default is fairly small.

Image-J has an option to take a stack of images, look for scales and transforms, and output a corrected stack of images. It does this fairly quickly.

I would be interested to do that, and then use Helicon to do the combining (but giving it less work to do)
 
Top