Wednesday, November 06, 2013

How focus stacking software works: image alignment

This is the fourth of a series of posts about taking focus stacked images of insect specimens to illustrate identification guides. The first part was a general overview, the second a description of the setup I use to acquire the stack and the third concerned lighting the specimen. In this post I will start to consider the focus stacking software.

The job of the software is to find the image in the stack where any given point is best focussed and then to combine them into a single, composite image which is as focussed as possible throughout. Obviously, it is not magic - if some feature is not in focus in any of the images in the stack, then it will not be in focus in the final, composite image! The process has the following steps:
  1. Align the images in the stack so that any given feature is in exactly the same position in each image,
  2. Find the image in which any given point is best focussed,
  3. Combine the best focussed parts into a single, composite image.
In this post, I will consider the first step: image alignment.


Why is image alignment necessary?

Since the final, composite image will be built from pixels selected from different images up and down the stack, if features are not in the same place in each of these images, the result will be a confused mess!

Result of combining an unaligned stack

 

If the camera was mounted on a focus rail when the stack was acquired, why aren't the images already aligned?

Well they probably are - reasonably, but inevitable not exactly.

Firstly, the magnification of the subject inevitably changes as the focal point is changed. This is true whether you move the camera towards or away from the specimen, or fix the camera and change the focus point of the lens. The amount the magnification changes is small, but will noticeably degrade the finished image if not corrected (for example, the multiple rims of the eye in the image above).

Secondly, it is very difficult to fix the camera on a focus rail so that its axis is exactly aligned with that of the rail. If their axes are not exactly aligned, as you move the camera backwards and forwards, the image will shift slightly across the field of view. Given the magnification involved, especially if you are working at large reproduction ratios, even the tiniest deviation from true will be magnified to a noticeable shift.

Finally, if you take the stack hand held in the field, for example by using the continuous shooting mode of your camera to take a series of images as you rock backwards and forwards, then you may also rotate the camera slightly in the process. Rotation should not be an issue if the camera is fixed on a tripod and/or focus rail.


How does alignment work?

There are a number of possible approaches, but the software I wrote tackled this task as follows:
  1. Extract the luminance data from each image,
  2. Extract edges from each image (for example, Laplacian convolution),
  3. For each pair of images down the stack (A:B, B:C, C:D, etc.) calculate a cross-correlation between (a sample of) pixels luminances and vary the x and y shift, magnification and optionally, rotation, of one of the images to maximise this cross correlation (for example, using the simplex algorithm).
  4. This results in a series of estimates of x,y shift, magnification and potentially rotation changes between successive pairs of images.
  5. A new set of images can then be written to temporary storage consisting of a straight copy of the first image and then a re-interpolation of each subsequent image with the estimated x,y shift, magnification and rotation changes applied.
An original image (left), luminosity (centre) and edge extraction (right - colour inverted for clarity)
This can be very nicely visualised by making the images in the stack into the frames of an animation. This is a useful way of checking that the stack has been successfully aligned. If it has, the resulting animation, after alignment, should show no shifts in the image - just the focal point moving through it.

Here is a before and after animation of a rather extreme case. This stack shows a much large lateral shift between images than is typical because it was taken using a camera mounted on one eyepiece of a binocular microscope. Focusing up and down causes quite a bit of lateral shift in the image in this case, because of the bent image path inherent in the design of a binocular microscope:

Before alignment - this stack shows a rather extreme degree of lateral shift because the images were taken using a camera mounted on one eyepiece of a binocular microscope.
After alignment (using align_image_stack.exe).

In a previous post,  I noted that align_image_stack.exe from the Hugin package does a very good job in this respect. Most focus stacking software aligns the images as part of its processing.It may offer the option of turning correction for rotation on or off. If you know that rotation is not a factor (the camera was fixed on a tripod and/or focussing rail) then it is worth turning rotation correction off because that simplifies and speeds up the necessary calculations.

Image alignment can benefit greatly from parallel processing if you computer has multiple CPUs. As described above, the necessary changes are typically calculated for successive pairs of images through the stack and each of these calculations can be carried out by one of the computers processors quite independently. Consequently, two processors will take almost exactly half as long as one, and four processors almost exactly a quarter as long - it scales linearly. Several of the dedicated focus stacking packages take advantage of this to speed up processing if you have a computer with more than one CPU. (Hugin's align_image_stack.exe does not support parallel processing at the time of writing).

In the next post, we will look at finding the most focussed image.

Monday, November 04, 2013

Stag Rock; Willow Tit in Gateshead

We have been away over half term. Visited one of my favourite spots - Stag Rock on the north Northumberland coast. We got there for high tide for the wader roost. Lovely day with low autumnal sunshine, but quite heavy clouds with occasional bursts of rain. It turned out a Bonaparte's Gull had been seen (and photographed) earlier that morning so there were lots of birders about busy examining the flocks of Black-headed Gulls.

Bamburgh Castle from Stag Rock
Flock of Black-headed Gulls takes off in front of a breaking wave
We didn't find the Bonaparte's (it later transpired that it was seen on the sea between Seahouses and Inner Farne in the early afternoon), but lots of stuff around including many Purple Sandpipers.

Purple Sandpiper
An unusual feature was Rook feeding on the beach, along the tide line. This is not a bird I associate with the beach!

Rook feeding on the beach

On Sunday we had a rather wet walk around old haunts in the Derwent Valley (Gateshead). A very welcome sight was a Willow Tit visiting the feeders at Thornley Woodlands Centre. Here they have lost the Marsh Tit, but Willows are still present - the opposite situation to the Peterborough area where Willow Tits are now very rare. This is the first one I have seen in years. Unfortunately, they have lots of problems with Grey Squirrels, so the food is put out for the birds under wire cages - and that is not ideal for photography!

Willow Tit at feeders
When I was based in Newcastle (1975-85) it was Red Squirrels in the Derwent Valley (and the Lower Tyne Valley) and there were no Greys. The Greys invaded around 2000 and, despite an enormous effort to try and stop the invaders, there are now no Reds left in the area. Now, you have to go much further north to see Red Squirrels.

Monday, October 21, 2013

Lighting specimens for focus stacking

This is the third of a series of posts about taking focus stacked images of insect specimens to illustrate identification guides. The first part was a general overview, and the second a description of the setup I use to acquire the stack. In this post I will cover lighting the specimen. The stacks that were shot for Britain's Hoverflies were lit using flash but, more recently, I have been using continuous lighting produced by three Yongnuo YN1410 LED panels. I will compare the results and discuss the pros and cons.

Yongnuo YN1410 LED video light with plain diffuser
Yongnuo produce quite a range of LED panels with anything up to 300 bright white LEDs. The more recent models have tended to be a bit thinner and lighter and to have rather more sophisticated brightness controls. Part of the reason I went for the YN1410 (which is an older, and probably superceded, model by now) is that it has a DC power socket. Many of the more recent units don't have this. They can be powered using 6 AA batteries or battery packs made by Pansonic or Sony for video cameras. The battery packs are expensive (quite a lot more than an LED panel!) and I didn't want to have to keep 18 AA batteries recharged! Instead, I bought a 60W, variable voltage DC power supply (panels need 7.2 - 9V) from Maplin and a 4-way splitter cable (I could only find 2-way or 4-way splitters!). This happily powers all three units for however long a session I want and means I don't need to cope with all that extra weight of batteries - which makes attaching and positioning them easier.

The LED panels have very simple controls: an on/off switch and a pair of buttons to increase or decrease the light output over 16 steps. They are quite well daylight balanced, but tends to be a little towards the blue side at max output (5800-6000K). I find that, with the camera set to auto white balance, I get very acceptable colour reproduction.The max light output of each panel is rated at 960 lumens. What is probably a more useful way to describe it is that, for the MP-E 65 macro at 1:1 reproduction ratio and f8, the exposure is around 1/60-1/80 second at ISO100.

Specimen lit with 3 x Yongnuo YN1410 panels
Hilara matrona (Empididae, Diptera) male. LED lighting.
100% crop

In the past I have used three flash guns: the two heads of my Canon MT-24 EX and the Yongnuo YN565EX as the third. These require some diffusion, so in the picture below, the MT-24 heads are fitted with plastic diffusers which roughly double the effective area whilst the 565 is fitted with a large, home made soft box. The flash exposure is manual and with the 565 set up as a slave controlled by the MT-24. For this particular shot, the MT-24 heads were both set to 1/16 power and the 565 to 1/64 power. This is best judged by taking test shots and assessing the image and histogram on the camera's rear LCD panel. (The articulated LCD screen of the Canon 60D really scores here. It makes it easy to view the screen without having to go through contortions to get down and directly behind the camera! Being young and bendy would probably be equally effective ...) For this sort of shot in the 1.5-2:1 range, the flash power require  is generally low. This has the advantage that the flashes recharge very quickly. At higher reproduction ratios, say 4-5:1 for shots parts of the animal, more flash power may be required. For things like tarsi details at 5:1 you may even need full power. In these cases the StackShot's programming will need adjusting to allow a longer pause between shots to allow the flashes time to recharge.

Three flash heads with diffusers. The YN565 has a large, home made diffuser head fitted.
Stronger specular highlights. Note those on the hind femur.
100% crop
Comparing the two images, the greater contrast and more pronounced specular highlights in the flash lit shot are obvious differences. More diffuse flash can be obtained by building a soft box around the specimen. This is especially necessary for more shiny and metallic specimens with strong specular highlights. One way I have often done this is to use plastazote sheets (ideally 6mm thick - the ones shown are thicker than I usually use!) to build a soft box around the specimen (note that, in this case, I didn't also use diffusers on the flash heads):

Plastazote softbox built around the specimen
Another idea is to use an expanded polystyrene vending machine cup (the sort of thing soup is sometimes sold in). Cut the bottom off, so you get a cone, narrowing outwards, and pin that to the backing sheet so that it surrounds the specimen.

Note that the MT-24 head is mounted on a small ball & socket head. I find these extremely useful for mounting lights and flashes. They can be bought quite cheaply off eBay.

Small ball & socket head, metal flash "cold-shoe" mount and standard 1/4 inch photo screw, all bought off eBay, are very useful for mounting lights.

Whilst all the stacks for Britain's Hoverflies were shot using flash, I have more recently almost entirely switched to using continuous lighting provided by the Yongnuo LED panels. I find that this approach solves a few niggles I had with using flash:
  • With flash, you need another light, such as desktop halogen lamp or an anglepoise lamp, to provide the light to to view the specimen for focussing and setting the start and end points. You then need to move that out of the way and move the flash heads into the correct position before you shoot.
  • You generally need several test shots to get the right flash exposure and to adjust the diffusion and flash head positions to manage specular highlights.
  • The exposure of successive flash shots can sometimes be a bit variable (probably an indication that the flashes did not have sufficient time to fully recharge between shots). This can impact on the quality of the finished image.
With continuous lighting, these are avoided. The main lighting for the shot is also used to focus and setup and, whilst you are focussing and setting up, you see shadows, highlights, etc. So everything is done in one operation and it is unusual to need more than one test shot to confirm the exposure. I have not found any detectable exposure variation between shots using the LED panels. All in all, faster and more convenient!

In the next post I will talk about software for processing the stacks.


Wednesday, October 16, 2013

Setup for focus stacking

This is the second of a series of posts about using focus stacking to photograph insect specimens to illustrate identification works. The first part is here and provides a general overview. In this post I want to describe the setup I use to acquire the stack of images:


Setup for taking focus stacks ofa specimen
The photo shows my Canon EOS 60D with the MP-E 65 macro lens mounted on a Stackshot motorised focussing rail. This is mounted on a homemade jig which allows me to position the specimen vertically on the back wall of the jig and slide it sideways and up and down to center it in the field of view. The specimen is lit using three Yongnuo YN1410 LED video lights which give a bright, daylight balanced white light (I will write a separate post about lighting).

 

The jig


The jig. The insets show the vertical slider without the specimen carrier in place (bottom left) and the way in which the three flash brackets, used  for mounting the lights, are attached (top right).

My home made jig is built mainly from MDF. The base consists of a 32x14cm piece of 18mm MDF and the back wall is 25cm high, also 18mm MDF. They are joined by a couple of right angled steel brackets. The vertical and horizontal sliders on the back wall and the tracks they run in are all built from 3mm MDF. Three "Kood straight flash brackets" (bought off eBay) are attached to the back wall. These are used to mount the lights. The flash shoe has been removed from each of these brackets and an 8mm diameter hole drilled through the bracket where the shoe was located. These fit over three captive bolts glued into a piece of 2x1 which is then screwed to the top of the back wall. The brackets are fixed to the bolts using a butterfly nut so that they can be angled as required and held in place simply by tightening the nut.
Underside of base
The base has a 6x14cm slot cut in it and a 3mm Aluminum plate (14x20cm) attached over the slot. The plate has a series of 6mm holes drilled along its centre line. The focussing rail is mounted using a standard 3/8 inch photographic screw (also purchased off eBay). The black strip down the middle is a piece of cycle inner tube glued on with contact adhesive and helps prevent the focus rail from rotating out of alignment too easily.

Specimen carrier

Specimen carrierMounting pin
The specimen carrier consists of a 20x8cm piece of 3mm MDF which acts as the horizontal slider on the back wall. A 7x12 sheet of 12mm plastazote is stuck to it using double sided carpet tape (I usually get plastazote sheets from Anglian Lepidopterists Supplies). The background consists of a piece of paper pinned to the plastazote. A mid-grey background was used for specimen photos in Britain's Hoverflies, but a plain white background is shown here. I often see backgrounds with a coloured gradient on photos online - this could easily be achieved by printing the desired gradient using an ink jet printer and then cutting out a suitable sized piece to pin to the specimen carrier.

The actual specimen is mounted on a plastazote stage on a long pin to get it well in front of the background so that stays completely out of focus. The plastazote stage into which the specimen's micro pin is mounted has been coloured blue using a standard highlighter pen. This makes the mount easy to mask out of the finished image because this florescent blue is not a colour that is likely to occur naturally! (I will talk about post processing the stacked images in a later post.)

The second sheet of 6mm plastazote pinned to the bottom of the specimen carrier simply acts as a reflector. It throws some light upwards and tends to fill in any shadows underneath the specimen arising from the fact that there is no light below the specimen in my setup (although there is no real reason why you could not mount a fourth light on the base of the jig, below the specimen, if required, to get really flat, all round illumination).

Stackshot

Stackshot focussing rail
Stackshot controller
The StackShot "focus stacking macro rail" is a wonderful piece of kit, but is not cheap! As far as I know, it is only available directly from Cognisys in the USA ($525 + carriage at the time of writing). Remember that you will also have to pay import duty and VAT to HM Revenue & Customs when you import it!

The focussing rail is driven by a stepping motor which is controlled by the programmable controller. There are many options, but I use the one where you set the start and end point (by driving the rail forward and backwards using the "Fwd" and "Back" buttons on the controller) and step size. I set the step size using a Depth of Field table for the MP-E 65mm macro lens. I choose a step size that is 30% less than the Depth of Field for the F-stop and reproduction ratio I have set on the lens. This gives some overlap of the parts that are in focus between shots which helps the stacking software to merge the shots successfully. So, if the chart says that the Depth of Field is 0.5mm for my chosen lens settings, I would set a step size of 0.35mm (0.7 * 0.5). The controller works out how many steps of that size are needed to travel from the selected start to end points. When you tell it to start shooting the stack, the controller moves the rail to the preset start position, fires the shutter, moves by one step of the selected size, fires the shutter, etc. until it arives at the preset end position.

There are many options to control how fast the rail moves and the length of time between operations. For example, you can set how long to pause between the rail arriving at the next position for a photo and the shutter being triggered (i.e. how long to allow for vibrations caused by the rail's movement to damp down). It can be very useful to modify these settings, for example, to make the time between shots longer to allow a flash to recharge (if you are using flash to expose the shots). It also has an option to trigger the shutter twice for each shot so that you can use mirror lock up (as I normally do).

In the next post I will consider the lighting and compare flash and continuous LED lights.

Tuesday, October 15, 2013

Photographing of insect specimens using focus stacking techniques

This is the first of a series of posts describing the methods I have used to photograph specimens of flies to illustrate "Britain's Hoverflies" and various identification keys using focus stacking.

Ceratinostoma ostiorum (Diptera, Scathophagidae), male. Focus stack of 25 shots taken in July 2013 at approx. 1.5x life size using Canon 60D with MP65 macro lens, processed using Zerene Stacker.

Why is focus stacking necessary?


When you look at an insect specimen through a microscope, you focus up and down and move the specimen around and what you "see" is a 3D model formed by your visual system - the combination of eye and brain. If you take a photograph of the same specimen at the same sort of magnification the resulting image is often rather disappointing! It fails to match your perceptions because, due to the limited depth of field, it is not all in focus. It is possible to increase the depth of field of a photo by decreasing the aperture of the lens (selecting a higher F-number) but, as the magnification you are trying to achieve increases, the depth of field available is simply not sufficient. It is not possible to decrease the aperture, and hence gain more depth of field, beyond certain limits because diffraction leads to unacceptable image degradation.

The way out is "focus stacking" - taking a series of photos (the "stack") at different focal points and merging the most focussed parts into a single, composite image that is in focus throughout. The result, like the one shown above, satisfyingly matches our perceptions of what the specimen ought to look like!

Whilst this technique has been known for a long time, the availability of computer hardware and image processing software that will do a good job in a reasonable amount of time and at a cost affordable to an amateur enthusiast is relatively recent development. Sufficiently powerful home-computers with enough memory have only become available and affordable over the past decade or so (say, since 2000).

My experiences of focus stacking


I have been interested in the technique for a long time. I first encountered it when I was a PhD student at Newcastle University (1975-78). At that time, the camera microscope and image capture setup cost something in the high tens to low hundreds of thousands of pounds and the processing software needed the resources of a university mainframe computer! In Dec 2002 I bought a Nikon Coolpix 4500 and used that, mounted on a binocular microscope, to capture focus stacks which were processed using software I wrote myself (called "DeepFocus") written with Delphi 7.

Sphaerophoria scripta (Diptera, Syrphidae). Focus stack of 14 images taken in April 2004 with Coolpix 4500 mounted on binocular microscope and processed using self-written "DeepFocus" software.

More recently, Roger Morris and I produced about 180 images of  hoverflies for the WildGuide "Britain's Hoverflies". Producing this number of images at the sort of quality required for publication in a book, was only really possible because I had developed better and faster techniques.

Melanostoma scalare (Diptera, Syrphidae), female head. Focus stack of 15 shots taken in April 2011 at approx 3x life size using Canon 60D with MP65 macro lens. Processed using Helicon Focus.
My latest projects are an update my key to the British Scathophagidae and a Field Studies Council fold-out identification card on Garden Hoverflies (still in preparation). For these, I have been shooting a series of whole-animal images.

In the next post I will describe the setup I have developed to acquire the stack of images.

Friday, October 04, 2013

Which SD card?

I have seen a number of forum posts recently along the lines of "Which SD card should I buy to go in my new camera?". In trying to write a reply to one of these, I quickly found myself confused by the plethora of acronyms and options out there!

The problem is that, as Secure Digital (SD) cards have evolved, they have picked up:
  • a series of different capacity ratings - the original SD (max 1Gb), followed by SDHC (High Capacity - max 32Gb) and now SDXC (eXtended Capacity - max 1Tb),
  • three different physical sizes - the original "standard" size (32x24mm), mini- (21.5x20mm) and micro- (15x11mm),
  • and a series of different write speeds. They were originally described as "xn" indicating how much faster they were than a CD drive e.g. "x24". This was replaced by "class" ratings (class 2, class 4, class 6 and class 10) which indicate their write speeds in Mega-bytes/second (so a "class 10" card can writes 10Mb/s) and now we have a new UHS (Ultra High Speed) rating system. UHS-1 writes up to 50Mb/s.
All of this makes for a very confusing array of options when you are trying to buy the right one for your camera!

For my Canon EOS 60D, the specification on Canon's web site states (under STORAGE):

  • Type: SD card, SDHC card or SDXC card

which is not tremendously helpful since it does not even state which physical size card is needed, let alone the speed to go for! I suppose we can assume (rightly as it turns out) that a standard sized card (32x24mm) is expected unless it says otherwise. If you search the support site, you can find "FAQ: What are the Compatible Memory Cards? (EOS 60D" (dated 4 Oct 2010), which says the following:
  • The camera does not come with a memory card for recording images. Please purchase it separately.
  • When shooting movies, use a large-capacity SD card rated SD Speed Class 6 "" or higher.
OK, I think I had already grasped the first point, but now we know it probably should be at least class 6. Searching through other reviews and comments, I gleaned that the current line up of DSLRs (at least from Canon) will support UHS-1 cards, but don't take advantage of the extra write speed they offer. So there is no point buying anything above a class 10 card (and generally, the faster the card the more expensive). The reason for going for a fast card is that you don't want to create a bottle neck if you are using the continuous shooting mode or recording HD video. You want the card to take whatever the camera's processors can throw at it! Class 10, it seems, fulfills this goal for the current generation of cameras.

The capacity you need comes down to the image size and quality you select (RAW and/or JPEG) and how many shots you think you may need to store before you get back to base and can download the images. I bought Sandisk extreme 16Gb cards which are rated class 10. I normally shoot RAW files and get around 540 photos on one of these card. I have very rarely filled up a card in a single day! These cards have met my needs admirably so far.

Postscript

Now I come to write about it, these numbers don't really add up! With an empty, formatted card, the camera shows a capacity of 539 shots. If I put the card in the card reader in my computer, go to Explorer, right-click on the card's drive letter and check its properties, it shows 15,911,354,386 bytes of frees space.

Here is the first, and well known rip off! In a computer's memory and filing system, a Kb is 1024 bytes. A Mb is 1024 Kb (1,048,576 bytes) and a Gb is 1024 Mb (1,073,741,824 bytes). But people who sell us storage, hard disks, storage cards, etc., use 1Mb = 1,000,000 bytes and 1Gb = 1,000,000,000 bytes. So a 16Gb card is offers 16,000,000,000 bytes of storage (not 16 x 1024 x 1024 x 1024 as you might hope!).

But I seem to be missing 16,000,000,000 - 15,911,354,386 bytes on the empty card - very close to 84Mb. This is presumably taken up the directory structures that formatting the card created. I am not too surprised by this, though it is perhaps a bit more than I would have anticipated.

I can easily see how big I expect a RAW file to be. I have a photo archive with several thousand of these stashed away in it (files with a .CR2 extension). If I shift-right click on my PhotoArchive directory and choose "Open command window here" (I am using Windows 8), I get a command prompt where I can enter the command:

dir *.cr2 /s

This will show me the RAW files it finds in that directory and all its subdirectories (the /S switch) and, at the end, a summary including the number of files and their total size in bytes. Dividing one by the other, I get the average size of a .CR2 file across this very large sample - which comes out at 24,209,182 bytes = 23Mb.

If I divide the free space on the SD card by the average size of a .CR2 file, I get an answer of 657. This is the approx number of files I would expect to be able to store. So why does the camera report only 539? That is rather a big difference. And I know from experience, when that displayed total decrements to zero it will say "Card full". Next time that happens, I must remember to check whether the computer still sees lots of free space.

Wednesday, October 02, 2013

Depth of field does not depend on the focal length of the lens

Many photographer believe that a wide angle (= short focal length) lens give more depth of field (DOF) than longer lenses. This is a misconception! For a given magnification the focal length of the lens does not effect the depth of field which is (almost) entirely determined by the aperture. The Wickipedia article on DOF gives the following formula to (approximately) calculate the DOF in close-up situations (i.e. where the distance to the subject is very much less that the hyperfocal distance):

\mathrm {DOF} \approx 2 N c \, \frac {m + 1} {m^2} \ where m is the magnification, N is the f-number and c is the circle of confusion.

For more information on circles of confusion see this Wickipedia article which gives a value of c = 0.018mm for the Canon APS-C sensor.

The following table and chart show the DOF in millimetres at various f-stops for reproduction ratios from quarter life size to twice life size calculated using this formula for the APS-C sensor:

I wanted to try and demonstrate this for talks I give on macro photography. What I came up with was to take a series of photos of a relatively small subject (an 18cm tall figure of an Uruk-hai from Lord of the Rings) using a series of different focal lengths, but moviing the camera so that the subject was kept at the same size in the viewfinder (hence maintaining the same reproduction ratio). Here is the setup:


The Uruk was placed, standing on a ruler, in the garden and a piece of string stretched from his middle across the garden. At each focal length, the camera was positioned with the lens aligned along the string to keep the same angle of view and then moved backwards and forwards until the Uruk was positioned in the same way in the viewfinder with his feet on the bottom of the frame and the top (active) focus point on his chest armour:

All the pictures were taken at f6.3. I used my Sigma 150-500mm to take pictures at 200, 300, 400 and 500mm, my 100mm macro and my 17-85mm zoom for 80, 50 and 35mm (I could not get close enough to achieve the same magnification and still focus at focal lengths below 35mm!).
400mm (at 5.8m)

200mm (at 3.2m)

100mm (at 1.7m)

50mm (at 90cm)

35mm (at 74cm)
Examining these images closely, focus extends from about the 34/34.5 to the 37cm mark on the ruler. The part of the ruler that is in sharp focus does not change as far as I can tell when examining the originals at 100%. The block of wood used to angle the ruler is clearly out of focus in all the shots. However, what is very clearly shown is the effect of focal length in changing the working distance and perspective. The same subject magnification was achieved at 5.8m away using the 400mm as at 74cm with the 35mm focal length. But, using the 400mm, there is very little of the background in shot, whilst at the other extreme there is a wide sweep of the background wall.

The effect of the focal length of the lens on the working distance for macro shots can be seen in the following shots. Here is the Uruk's lovely face at a reproduction ratio of 1:1:

1:1 shot of the Uruk-hai's face
And here are the 100mm macro and 65mm macro focused on his face at 1:1. Note the difference in working distance, how much closer you have to be using the 65mm (front of the lens just about touching his crossbow):
100mm macro focused on the face at 1:1

65mm macro focused on the face at 1:1




Tuesday, October 01, 2013

Yongnuo YN565EX flash

I have had a Yongnuo YN565 EX flashgun for over two years (purchase Aug 2011) and found it an excellent piece of kit. It is a Chinese-made copy of the Canon 580EX, its biggest advantage being that it is only a fraction of the cost (today on Amazon: YN565 EX - £80; 590EX - £375).

It closely resembles the Canon 580EX both physically and in the range of functions it offers, It makes you wonder how they get away with it! It lacks only two significant features of the Canon:
  • It can only act as a slave in a multiple flash wireless setup (the 580EX can be the master),
  • It lacks the high speed sync feature of the Canon. This allows the 580EX to be used as a fill-in flash at shutter speeds above the maximum flash sync speed offered by the camera (1/250 on Canon EOS 60D). This is done by producing a rapid sequence of lower powered flashes.
(The Yongnuo YN565EX II has been announced with both of these features added, but does not yet seem to be available - so I could not find a price.)

I have used it mainly in two situations: Firstly, as a background light when using the Canon MT-24 macro flash and secondly as a fill-in flash for bird photos from a hide.

Background light for macro-flash

One of the main criticisms of macro photos lit by flash is that they often have a very black background where the lighting from the flash does not reach. This can be tackled by using another flash to light the vegetation or whatever is immediately behind the main subject. The YN565EX, mounted on a tripod, and set up to be controlled wirelessly as a slave does this job nicely. I find that the infrared communication between master (Canon MT-24 twin macro-flash mounted on the camera) and the slave (the YN565EX) works well over the sort of range I normally work at - providing I  make sure that the red window on the front of the YN565EX faces towards the camera. Since the flash head tilts and swivels, this is not hard to achieve. The the ratio of power from the MT-24's two heads and the YN565EX can each be controlled from the camera's menu - so no fiddling abut with the Yongnuo's control panel is required once it is set up in slave mode (which is quite fiddly!). Generally, the power of the fill-in needs to be turned down (it can go down to 1/32 of full power) relative to the main light from the MT-24 heads, but this is best judged by taking some tests shots and checking them on the camera's LCD screen.

Fill-in for bird photos

I have used a hide in the garden both to photograph nesting birds coming in with food and, in winter, stuff coming to my feeders. Obviously, I tend to go for bright daylight conditions to get a fast shutter speed, but that often leads to quite harsh shadows. This can be tackled using an off camera fill-in flash to put a bit of light into the shadow areas. I use the YN565EX for this, mounted on a clamp on the ouside of the hide via a hot shoe extension cable. Again, I bought a Yongnuo made extension equivalent to the Canon OC-E3 (Yongnuo - £10; Canon OC-E3 - £60 - how does Canon justify these sort of prices for accessories!). Again, a bit of experimentation may be necessary, but a flash exposure compensation of -1 to -3EV is usually needed and this is simply dialled in on the back of the camera. So no need to be able to reach the flash once you are set up in the hide.

Robin at one of its favoured perches on the way in to feed young in nest. Sigma 150-500mm at 267mm, F5.6, 1/250, ISO400. Somewhat back-lit with fill-in flash from below-right. Camera in Tv mode with -3EV flash compensation.


Monday, September 30, 2013

Time for spiders

This is the time of year when orb web spiders are very noticeable. My garden is festooned with the large webs of the Common garden orb spider (Araneus diadematus). There has been one just outside the kitchen window for some time and the spider tends to sit in the middle of it, especially in the evening towards dusk.


These spiders have a retreat at the end of one of the main strands supporting their web, somewhere like a curled over leaf, where they take what they have caught once they have wrapped it up and subdued it. This one has got a bee I think:



This picture shows the cross shaped pale marking on the abdomen which is characteristic of this large and very variably coloured spider.

I went to Woodwalton Fen yesterday (lovely, sunny Sunday) mainly to try and photograph dragonflies, especially the Ruddy darter (Sympetrum sanguineum). But I also came across a very striking black and yellow orb spider which I don't think I have seen before. A bit of searching through the books suggested that it was Araneus marmoreus var pyramidatus. The "Country Life book of spiders" (Dick Jones) says that this is "very local in Eastern England".



The map from the NBN Gateway shows  the bias towards eastern England quite well. The 10km square in which Woodwalton Fen is located (TL28) is already marked!

Grid map for Araneus marmoreus from NBN Gateway retrieved 30/09/2013

Friday, September 27, 2013

Remote shutter release

For macro work, or indeed for shots taken through a long lens, a tripod and some way of releasing the shutter remotely are often necessary. Jabbing at the shutter release button with your finger is asking for camera shake!

Three possibilities are open to me:
  1. The camera's self timer
  2. A wireless infrared remote such as the Canon RC-6
  3. A wired remote such as the Canon RS-60
Newer models, the 6D and 7D, also have the possibility of a WiFi link to a smartphone running a suitable app, but I don't have either of those cameras.

Using the camera's self timer is not really feasible when you are photographing animals. The time it takes to select either a 2 or 10 second delay via the drive mode settings and then wait out the delay, probably means you have missed the shot. I do sometimes use this method for stationary subjects such as flowers and fungi. I normally select the 2 second delay.

Infrared wireless remotes don't usually work from behind the camera when you are out of doors. The problem is that the little window that receives the infrared signal from the controller is located on the front of the camera, so you really need to be in front of the camera, directing the remote towards it. Presumably this is intended for self portraits. The RC-6 has a stated range of 4m, so it will often work from behind the camera when you are shooting indoors because the beam will be reflected by walls and other nearby surfaces. Out of doors however, there is rarely a suitable surface in range for it to bounce off.

So that leaves us with wired remotes such as the RS-60. I use mine frequently and find it an ideal replacement for the cable release I was used to in the days of mechanical shutters. It simply plugs into the 2.5mm jack socket on the side of the camera (under a rubber flap). The button works just like the camera's shutter release: Half pressure causes the camera to wake up, meter and focus; full pressure fires the shutter.


A nice touch is the notches on the sides to facilitate wrapping the cable round it when not in use, and the hole in the end to insert the 2.5mm jack so that the wire is held nicely in place whilst it is in the camera bag.


I have two small criticisms:
  • The release button is in a sort of slider which allows you to lock it down for "Bulb" mode long exposures (night shots, astro-photography, etc). But it is a bit too easy to operate by accident! It needs some sort of click mechanism or something so that you have to definitely want it before it operates.
  • The shutter release button is at the wrong end! It is at the end where the wire comes out. It seems natural to me, for some reason, that this button should be at the other end, furthest from the wire. Because it seems wrong to me, I am forever losing the button and having to think about where it is - which just occasionally loses me a shot! Perhaps it is because the first one of these gadgets I owned was the Olympus equivalent for the OM2 - and that had the button "the right end"! 
The shutter release button with sliding lock
The electronics are very straight forward. It is simply a pair of instant contact switches which complete a circuit. One switch triggers the focus, the other triggers the shutter. The wiring of the 2.5mm jack plug is described here from which this diagram is taken.

2.5mm stereo jack plugs are readily available, from Maplin for example, so it is easy enough to make your own devices. For example, I have wired up a security pressure pad to trigger the shutter (actually, it was for the autodrive of my old Olympus OM2N - but same principle). In this case the switch (pressure pad) would just be wired between the sleeve and the tip of the jack plug. The camera is pre-focussed, so the focus switch is not needed. It is then possible to set up a camera trap, e.g. bury the pressure pad across the entrance to a badger sett, so that an animal emerging steps on the pad, completes the circuit and fires the shutter.

Badger emerging from a drain taken using a camera trap based on a pressure pad wired as a remote shutter release. Scanned from a slide taken in 1982!