Bart,
Was wondering if you can answer or point me to a reference for how to adjust the CoC to account for diffraction. While your tool is both fascinating and educational, there isn't any theory attached and it clearly wasn't designed for the purpose I have in mind.
Hi,
No problem. Diffraction as a CoC parameter is a bit tricky, because its effect is a gradual reduction of (micro-)contrast, no hard disk-like CoC cut-off like with defocus. That's why I've chosen to implement it as a warning that the MTF at Nyquist is reduced to a certain percentage. It's only when it reduces the contrast to zero, that I also let it increase the CoC.
The theory (or
here) is built into the functionality.
Diffraction reduces the MTF to zero at a spatial frequency of; cycle/mm = 1 / (wavelength x aperturenumber) or higher frequencies (e.g. 1/(0.000564 x 16) = 110.8 cy/mm or 4.512 micron pixel size , for 564nm luminance weighted data at f/16). Different wavelengths will have different zero MTF cut-offs.
For Focus stacking I adopt the strict rule that the CoC diameter, and/or the Diffraction diameter (of the first Airy disk zero, which accounts for about 83.8% of the diffracted signal), never exceeds the size of 1 sensel. That would mean that focus slices exactly join at their DoF boundaries, no need to use a multiplier for additional overlap.
The other thing missing in almost all the discussions are where diminishing returns and practical realities overwhelm the theoretical computations. Basically, when 3 slices are essentially the same as 5 slices?
Well, that's where the viewing distance of the result comes in ... One could also use the amount of downsampling or upsampling as a parameter for pixel perfect slice depth. When the differences in (observed/perceived) sharpness are smaller than some lower threshold (whether expressed in pixels or angular resolution), then that's where I'd draw the line of relevance.
We can technically calculate where the DOF zone of one slice starts and ends, which is where the next slice's DOF zone would have to start or end. But when we do not magnify our image to the level where we can visually discriminate between individual pixels then we're being too strict and will produce more/thinner slices than necessary.
Another element is, how accurately/consistently can we dial in those required focus distances? That's where tools like Helicon Remote and similar camera focus controllers can help a lot.
Cheers,
Bart