From the very beginning of photography the idea of getting more depth of field in images has been a matter concern. When someone wanted to get in the same picture the foreground and the background both in focus by normal means (small f nº, short focal length, long focus distance etc..)
he would find it is not possible, then photographer's had the idea of taking two pictures, one of the background and one of the foreground, either in the same frame, or in two different pictures; the concept of focus stacking was then born.
In my early days, I did some studio work myself, where three pictures would get the whole focus of a scene with great depth. Here I began to learn what it is to align pictures, because as we got closer, the image size was also increased, so I had to keep changing the enlarger height so that the three images would fit. The amount of work involved in this kind of work with film is something that can not be understood so easily nowadays, since most of the processes in the analog lab sound like methods of torture to punish the soul and something reserved for highly specialized experts.
Since the advent of digital photography, we can say that this technique has become more popular and thus the level and variety of techniques that can be used in different fields with certain simplicity.
Already in the 80's scientific techniques were developed to get focus stacked images that otherwise would have been impossible to attain, but that equipement was very expensive.
It was not until 2005-2006 with the boom in digital photography when focus stacking software appeared, these new techniques minimized the amount of work and equipment necessary and that is when many amateur photographers began to enjoy the benefits of focus stacking.
But what is focus stacking?. Well, it consists of taking pictures of the different depth planes that form the scene; then, either by hand (serious work) or via software, keep only the focused part of each image. As we move through different focus planes, we record detailed information of all areas; the end result will be a picture with a depth of field not possible in a single shot.
There are basically two methods of focus stacking.
-1 / Via the focus ring to get different photographs by increasing the focus distance between shots (usually start with the foreground)
-2 / By moving the complete set of camera/lens with special precision equipment.
The choice between one method or the other will depend on the magnification we are working at. Say we are working at 1:1 or below; it could be done by moving the focus ring (this limit is somewhat arbitrary based on my experience), but from this magnification up, it is essential to do so by moving the complete camera set or by moving the sample parallel to the optical axis.
For the first method there are applications that can base the movement of the focus ring depending on the focal length, the number f and the points chosen as the beginning and theend of the stack. We can also do it by eye and take more shots than necessary to ensure focus throughout the depth of the scene.
For the second method ( the one we will use and improve on this website) we will use precision focus rails with micrometer actuators whose precision will depend on the magnification we are working at.
There are also automated systems that coordinate the movement of the rail and the triggering of the camera; in these systems you have different stacking methods to choose from and you just have to program the number of steps or travelled distance needed.
The "stackshot" is one of such systems and can work with magnifications up to 20X (more or less). Once we pass this magnification, the stackshot rail lacks the precision needed and we are better off working with a high precision linear stage with a digital micrometer actuator (0,001mm steps) or even better with a differential micrometer actuator (Different brands available like Mitutoyo and Newport). These differential actuators give very high resolution in short travel distances (0,0005mm with 0,25mm travel, easy to get 0,00025mm half steps). When you work at high magnification in the 20-100X range we do not work with very deep subjects, as we would need to take too many pictures. With a 40/0.50 microscope lens we need 0,002mm steps; if we wanted 1mm depth of field we would need to take 500 pictures, so when working at high magnification we will look for not very deep subject features.
The high precision automated version requires coupling the stackshot motor to a industrial linear stage with an actuator with higher resolution than that on the stackshot rail. (some micrometer actuators trave 0,33mm/rev while the stackshot rail travels 1,59mm/rev; so they are 5 times more precise). This modification is not difficult to make for anyone good at handy work or DIY projects.
Also for someone good at electronics it may be quite simple to build his own controller, custom programed to his needs under the Arduino platform
To sum up:
In the extreme macro stacking process, from 1:1 on and taking the f nº/magnification range into account we will get the number of steps needed via some formulas or tables.
Eg: a 5X image with the MP-E 65 mm at f4 will need 0.06 mm cuts; so if the depth needed is 1mm we have to take 17 pictures approx (1/0,06).
We will move the camera/subject to the beginning of the stack ( it is good to start a little bit before the starting point) and we will start to take pictures with 0,06mm steps, until we have the DOF needed. If we need 2mm of DOF instead of 1mm we will just take 34 pictures.
Once we have the pictures we will put them in the computer and the stacking software will align and form the final image. There are few options like combine ZP (free), Helicon focus and Zerene Stacker (our own favorite).
Apart from a whole bunch of different microscope objectives, what you see above is a test image shot at 45:1 magnification and showing a small portion of a butterfly's wing. It was shot while trying out a new solution for high magnification stacking. Butterfly wings are well suited for tests like this since they provide fine detail across the entire frame without requiring very deep stacks.
60 exposures focus stacked in Zerene Stacker (PMAX).
Objectiv: Nikon CF Plan 50x 0.55 ∞/- EPI ELWD
Tube lens: $9 surplus lens
Camera: Canon 5D mkII
Lighting: One Nikon SB-24 diffused through a strip of white semitransparent plastic wrapping around the end of the objective.
Background: I'm writing this summary to have something to point to when people ask for advice regarding microscope objectives for photograpy. Consider it a living document – I have a feeling it will be subject to many changes and updates.
There are basically two types of microscope objectives: those that are infinity corrected and those designed for a finite tube length (referred to as infinity objectives and finite objectives respectively).
Finite objectives form an image at a certain distance from the objective mount. In a finite microscope setup you typically use an eyepiece (or two of them in a stereo microscope) to focus on this image. You could also place an imaging device (film or camera sensor) at this distance in order to capture the image through the objective. The distance between the objective mount and the eyepiece is referred to as the tube length of the system. A couple of standard tube lengths exist depending on which era and which manufacturer the microscope is from. The most common tube lengths are 160 or 210 mm but others exist as well (170, 250 etc).
To capture an image from a finite objective using a DSLR all you need to do is to position the camera sensor at the image plane of the objective. Mounted on a bellows or a set of extension tubes a finite objective will behave like any regular camera lens – increased extension will result in proportionally increased magnification, and vice versa. An objective marked "10X" will give a 10X image when used in accordance with the specified tube length. Objectives designed for a 160mm tube length should be used at 150mm extension from the sensor and objectives designed for 210mm tube lengths should be used at 200mm extension from the sensor. The reason for this 10mm discrepancy is that eyepieces are designed to focus on an image formed at a distance of 10mm "down the tube".
Not surprisingly finite objectives tend to perform best when used close to the magnification/extension for which they were designed. However, a common problem with many objectives is that the good image circle isn't large enough to cover the camera sensor so in order to get better performance across the frame you sometimes need to increase extension/magnification slightly.
Worth mentioning is that many (probably most) finite objectives are specifically made to produce a good image in combination with certain eyepieces. The series of objectives with best reputation when it comes to forming a nice image on a DSLR sensor is the Nikon CF line (CF supposedly being an abbreviation for Chromatic aberration Free). Unfortunately these are not always easy to identify since only a few of them are actually marked "CF" on the barrel. The ones marked "Nikon M Plan", "Nikon BD Plan" or "Nikon N Plan" in particular are worth a closer look since these are likely to be of the elusive CF type.
It's worth mentioning that if you're not sure of what you're doing (or prepared to deal with some really poor results) it's advisable to check with someone more experienced before spending a lot of money on microscope objectives! Even expensive objectives from highly regarded manufacturers such as Olympus, Nikon, Zeiss or Leitz have been known to be quite poorly suited for use on a camera/bellows setup
Most modern microscopy systems are infinity-corrected. This means that the light rays coming out of the objective are parallel rather than converging as in a finite system. Of course, in order to form an actual image the light rays need to converge eventually. Therefore, in an infinity corrected system, you need an additional lens – most often referred to as a tube lens with the sole purpose of converging the light rays onto an image plane. The most common focal length of this tube lens is 200mm. The combination of an infinity corrected objective plus a tube lens becomes equivalent to a finite microscope objective.
There are a couple of different benefits to this arguably more complex approach to forming an image. The most important one is that the system becomes more flexible with regards to the physical tube length. Since the light rays between the objective and the tube lens are parallel the distance between the objective and tube lens can be varied to some degree without affecting the performance (magnification, focus, image quality etc). This makes it possible to add and remove different accessories commonly used in microscopy (for instance polarizers, and vertical illuminators). Also, compared to converging light rays, parallel rays are much less likely to "misbehave" when passed through filters, prisms and other optical devices. Hence an infinity corrected system is less likely to produce ghosting and/or chromatic aberrations when such accessories are added. In order to get the most out of the infinity design the manufacturers often increase the "parfocal distance". The parfocal distance is the distance from the objective mount to the focal plane in front of the objective – in other words the physical length of the objective (minus mounting thread) plus the working distance.
Traditionally the parfocal distance was 45mm but with the more recent infinity systems Nikon has increased this to 60mm (you often see this series of objectives referred to as CFI60) and Mitutoyo has taken this a step further with a parfocal distance of 95mm. A longer parfocal distance allows for longer focal length objectives and consequently longer working distances.
Which is better for micro photography?
I have played around with both the finite and the infinity corrected approach but at this point I think it's difficult to announce a "winner". The finite approach is simpler in that it's one less component (the tube lens) to worry about. You can have a setup where you use objectives interchangeably with regular camera lenses or lenses designed for enlargers. I've seen very nice results from finite Nikon CF objectives as well as some metallurgical Reichert objectives. The really good finite objectives are sought after and becoming increasingly expensive on the used market since most of them are no longer in production. With a little bit of patience and persistence you can still make a finite bargain!
There are good arguments for going the infinity route as well. The tube lens requirement doesn't have to be a large obstacle since a variety of different easily accessible solutions have proved to work well in this regard. (read more about it in this thread by Rik Littlefield on photomacrography.net). For instance, a cheap zoom lens, focused to infinity and set to 200mm can give very nice results (). After all, an inexpensive tele zoom is probably more commonly available than a bellows unit, for the average photographer. Regular tele primes can also work nicely (ref 1, ref 2, ref 3) and even close up lenses can do the job(ref).Some infinity objectives such as the ones from Mitutoyo offer superior working distances. For instance, their 10x/0.28 M Plan Apo has a working distance of no less than 33.5mm at 10:1 magnification. This is roughly three times longer than the typical working distance from a finite 10x objective with similar numerical aperture. From an image quality standpoint, some infinity objective + tube lens combinations appear to be able to give a more consistent corner to corner performance on a DSLR sensor (particularly FF) than most finite solutions I've tried.
Nowadays, there are adapters readily available for mounting pretty much any objective you can find. The objectives themselves have threaded mounts and, as usual, a couple of different standards exists. One of the most common is "RMS" (Royal Microscope Society). RMS is 0.8" x 36tpi (≈ ø20,3mm) and a search on eBay or elsewhere will return several different hits with different affordable adapters. These adapters will typically take you to some thread size common in photography, such as M42 or T2 and then you're just one more adapter away from a bayonet mount of your choice.
Another relatively common thread size found in objectives is 26mm x 0.75. This was used in Nikon's finite "BD Plan" series and is now found in Mitutoyo's infinity corrected series of objectives. Nikon's current infinity corrected objectives are 25mm x 0.75 (CFI60) or 27mm x0.75 (BD CFI60).
A more comprehensive list of thread sizes can be found here
Different thread sizes: 26mm (left) and RMS (right).Also note the black flocking applied to the rear of the objectives to avoid unwanted internal reflections which can cause serious image degradation
How to interpret the abbreviations on objective barrels
See below for a small "dictionary" – suggestions for additions and/or modifications are most welcome!
Achromat – Achromatic The objective is corrected against color aberrations. According to the definition an achromatic objective should be able to bring two wavelenghths into focus at the plane. See Apo.
Apo – Apochromatic The objective is highly corrected against color aberrations. According to the definition an achromatic objective should be able to bring three wavelenghths into focus at the plane. See PlanApo.
BD Brightfield / Darkfield. Sometimes called HD (German: Hell / Dunkel). Objectives designed to work with an illumination system where the subject is lit by light through the barrel of the objective. These objectives have a special hollow chamber surrounding the optical elements through which subject illumination can be provided using specialized illumination equipment. For regular use this hollow compartment needs to be covered/stuffed with something in order to prevent light from leaking in but otherwise they are just like their non-BD counterparts. Nikon's highly regarded series of objectives marked "M Plan" have optically identical BD versions marked "BD Plan" which work just as well for photography. At least provided that the outer barrel is unscrewed and removed (otherwise the working distance can be compromised), that no light is allowed to pass through the hollow chamber and that the (often larger than normal) mounting thread isn't a problem.
CF – Chromatic aberration Free. Nikon has used this abbreviation to describe their finest objectives. The CF-objectives make most necessary corrections in the objectives themselves which sets them apart from most other objectives that typically need to be used with designated eyepieces in order to deliver a well corrected image. Because of this feature the Nikon CF objectives has a well deserved reputation for being among the best objectives for photography. Note that only some CF objectives are marked as such which makes identification a task for the experienced users.
DIC – Differential Interference Contrast. An illumination technique for enhancing contrast in transparent specimens. Sometimes called NIC (Nomarski Interference Contrast). The glass elements of DIC objectives are made of "strain free" glass. For regular photography this does not matter and they behave just like their non-DIC counterparts. More info: en.wikipedia.org/wiki/Differential_interferen ce_contrast_...
EPI – The objective is designed to work well with a certain type of lighting system where the subject is lit by light rays coming through the objective itself (via a special epi-illumination accessory containing prisms and/or half reflecting mirrors inserted into the optical path of the system). When an epi-illumination system is not used these objectives behave just like regular objectives. Also see BD.
ELWD – Extra Long Working Distance. Also see LWD and SLWD.
Flour – Flourescence. The objective is designed to work well in a flourescence imaging system. Flourescence is a technique where the electrons in the subject are excited using high intensity illumination. When they relax back into their normal state they send out a photon and this light is captured by the Flourescence imaging system. By separating the excitation light from the light transmitted from the subject the result is an image where the light is coming from the subject itself rather than from a separate source of light. Flour objectives are highly corrected against aberrations (almost on par with Plan Apo). Alternative meaning: Flourite The objective has elements made from flourite glass – more expensive than regular glass but with some desirable properties in terms of aberration resistance. objectives with flourite elements often have shorter than usual working distance.
HD Hell/Dunkel. See BD. In some cases it stands for High Definition but I've only seen this in optics other than microscope objectives.
HMC – Hoffman Modulation Contrast A microscopy technique intended to increase contrast in low contrast areas using modulation filters inserted at the rear end of the objective. I'm not sure how HMC objectives behave when for regular photography when the HMC modulation filter is removed but I'm guessing they then become very similar to a non-HMC objective (please correct me if I'm wrong!). More info
LWD – Long working distance. The objective is constructed in a way that allows more room between the front element and the subject. Also see ELWD and SLWD.
NA – Numerical Aperture. The number following this states the brightness of the objective (much in the same way as the F-number of a camera lens). The higher the NA, the higher the potential resolution which the objective can deliver is. The equivalent F-number on a standard camera lens (the widest aperture) is approximately F=1/(2*NA)*M/(M+1) where F is the widest aperture (for instance 1.8 for a "50mm f/1.8" lens), NA is the numerical aperture on the objective (for instance 0.25 for a "10x NA=0.25" objective) and M is the rated magnification of the objective.
NIC – Nomarski Interference Contrast. See DIC.
M – Metallurgical. The objective is intended for use in metallurgical applications. This generally means that it's corrected for use without a cover glass.
Oil - Oil immersion, sometimes Oel (german). Objectives intended to be used with a drop of immersion oil between the front element and the cover slip. These objectives usually have higher NA than usual and often very high magnification. They don't work well without the oil and their working distance is very short so they are not very useful for regular photography.
Plan – The objective offers a flatter field than a semiplan or non-plan objective.
Planachromat – A chromatically corrected objecitive with a flat field. Also see Plan and Achromat.
Planapo – Sometimes Plan Apo. A highly color corrected objective with a flat field. Generally an indication of a high end objective. Also see Plan and Apo.
Ph – Phase contrast. A microscopy technique used to reveal certain structures/details. This abbreviation is i often followed by a number (i.e. Ph 5.) indicating the size of the contrast ring to make it easier to match with the appropriate condenser. Looking through one of these objectives you can clearly make out what looks like a darker ring shaped area somewhere in the light path. For regular use this Phase Contrast feature is not desirable. Phase contrast objectives are far from useless but given a choice it's probably better to avoid them for regular use. Charles Krebs has made a nice comparison revealing the effect of phase contrast objectives in regular use.
Semiplan – Indicates flatter field than regular objectives but less flat than Plan. See also Plan.
SLWD – Super Long Working Distance Used by Nikon to identify objectives designed to give maximum working distance. More often than not, the extra working distance comes at the cost of a somewhat lower NA. Also see LWD, ELWD, ULWD
ULWD – Ultra Long Working Distance Used by Olympus to identify objectives designed to give maximum working distance. More often than not, the extra working distance comes at the cost of a somewhat lower NA. Also see LWD, ELWD, SLWD
WI – Water Immersion The objective is designed to be partially immersed in water. Since water have different optical properties than air it's likely that they perform better when used with water between the front element and the subject. However, in at least some WI objectives the front cone-shaped piece can be screwed off, leaving an objective well suited for regular photography (as shown by David Millard here).
This article was originaly published in John Hallmen's flickr on the 22nd of January 2011, click here to visit the original article with additional info and comments
The day I realized it was when I took this picture
It was taken with a EOS 40D, a EF 100/2.8 macro USM and a raynox MSN-202; apart from that a full set of extension tubes (65mm) and a 1.4X Kenko teleconverter; 10X magnification on sensor with no detail at all
This is the day I discovered what "effective aperture" meant and how it affects final image quality. The shot was taken at f32 but effective aperture was around f100 (correct me if I am wrong); if you have read the article about diffraction you then know that this is quite insane.
A few days later I sold the 1.4X TC and started to take my first focus stacks
Some people still think that the aperture shown in the camera is the real one (nikon bodies correct effective aperture, at least on automatic macro lenses)
There is a very simple formula: fe=fn(Mag+1) which means effective aperture=nominal aperture * (Magnification +1)
If we take as an example a Canon MP-E 65 with aperture closed to f8 the real effective aperture values would be as follows
at 1X would become f16 8(1+1)
at 2X would become f24 8(2+1)
at 3X would become f32 8(3+1)
at 4X would become f40 8(4+1)
at 5X would become f48 8(5+1)
By using the focus stacking technique we can avoid diffraction effects (to some extent); for example: If we take a single shot with the MPE at 5X and at f3.5 we would get a very thin depth of field (most of the image would be a colourful soup)
By stacking we can get a huge depth of field (in macro terms) only limited by the number of shots and still be working with and effective aperture of f21, quite reasonable for macro work (at least on a full frame cameras)
Most extreme macro photographers try to work with the widest aperture possible (some lenses benefit from closing 1-2 stops); with microscope lenses that is wide open (no Iris)
As an example, I try to keep effective aperture around a maximum of f21 up to 20X work (in the studio), f32 for up to 40X getting a maximum of effective aperture of f60 at 100X (with a f0.6 lens)
Diffraction, something most photographers have heard about but not many know what it really means.
To most people it is a phenomenon they do not have to worry about but macro photographers know that it is one of the main aspects affecting final image quality.
In traditional photography and/or whe using wide apertures diffraction does not affect us at all, in fact what limits quality at wide apertures is the quality of the lens it self
However as we start to close the aperture ring diffraction starts to play with us. On a APS-C camera at f32 it does not really matter if we use a 2000€ prime or a crappy kit zoom lens; both images will have the same quality.
Some owner's of Canon's MP-E 65mm that do high magnification work may say " my MP-E at 4X and f11 is a lemon" and this is because effective aperture goes up to f55. Effective aperture is diffraction's closest friend.
But small apertures are not responsible for diffraction on their own (medium format users use small apertures without worries) but also has to do with pixel density.
Normally small sensors have smaller pixels and higher pixel density ( have you ever heard about the mpx race?) I am positive some 12mpx compact cameras would have better image quality with optimized 3/5 mpx sensors.
I am not going to go too deep into difraction theory as there are already excellent articles online.
In a few words: Diffraction is a phenomenon of physics that consists in the deviation of the light when it meets an obstacle (the aperture ring). When the lens is wide open light rays get into the camera freely but as you close the iris these light rays distort and bend lowering the resolution of the sensor.
Theoretical resolution limits are measured in line pairs per mm and are:
Because of the moire effect, cameras have an Anti Alias filter; because bayer sensors use a pixel per primary colour, light can fill 2-3 pixels before diffraction starts to affect the image.
There is a company that removes those AA filters, here you can see some examples: HOTROD
Each line pair needs two pixels (dark and bright), theoretical limits for some cameras are:
We can see that even in high end compacts, diffraction starts to affect image quality as soon as you turn them on; 4/3 cameras have been catched by Canon in Pixel density and new Sony sensors have gone a way further, reaching 24mpx
We can also see that the EOS 5D classic sensor's good reputation has something to do with its low pixel count. First time I saw a 5D shot at 100% on the screen I was astonished. In my opinion the pixel density of the EOS 5D mkII is already to high, at least for extreme macro work. I find myself using SRaw1 and 2 quite often; as the normal RAW on high magnification work (over 20X) has no advantages over these SRAW modes.
You also have to bear in mind that these numbers are theoretical maximums and our results will be bellow these numbers most of the time. Technology of sensor is always improving and elements like gapless microlenses can improve final resolution whereas things like bayer array and AA filters can lower it.
No matter how much sensors evolve these numbers give the maximum resolution possible, there is no human technology capable of avoiding diffraction (however, it is true that there is some loss of detail due to flaws in actual sensor technology).
Here at The digital picture: you can see how diffraction starts to affect image quality on a EOS 7D at f5.6, at f8 there is some resolution loss.
So, when you start focus stacking try to keep within values were diffracion will not affect your results too much, this starts to be difficult as magnification goes up.