Saturday, June 22, 2024

In-Camera Focus Bracketing Demystified: Part 3, telephoto bracketing

In part one of these posts, directed at demystifying in-camera focus bracketing, I introduced a hyperfocal based model that allows us to reinterpret the camera manufacturer’s focus bracketing 'quality' variable, from 1 to 10, in terms of the overlap circle of confusion (CoC) or optical blur.

In part two I extended the model to estimate the focus bracketing in the macro region, where one needs to account for optical and pupil magnifaction.

In this third part of the focus bracketing story, I'll have a look at telephoto lenses and show why one needs to be wary about focus bracketing at long focal lengths.

As a reminder, ignoring optical and pupil magnification, the basic equation to estimate the number of images to take, to non-macro focus bracket from a near point (x) to infinity, is given by:

Where C is the overlap blur criterion that you wish to use and pragmatically x is measured from the entrance pupil, ie the non parallax point.

An alternative way of looking at the above is to note that the first term is simply H/x, ie the hyperfocal distance divided by the near point of focus distance. Thus the number of brackets you need can be estimated from (H/x + 3)/2 or rounding up as H/(2x) + 2. Putting x = H/k, ie a fraction of the hyperfocal, we get the linear relation (k + 3)/2, ie the number of lens rotations you need to make between the nearest point of focus and infinity.

Using the above equation, let's look at a 150mm focal length lens (in fact my EFM 18-150mm) at an aperture of f/8 and a CoC of 19 microns, the maximum, ie worst, CoC one should consider for a Canon APS-C sensor.

In the above we see the number of brackets to be captured as we vary the near point of focus between a near focus distance of 0.45m and 5m. Clearly, once the near point of focus becomes much less than, say, 4m, the number of brackets increases rather sharply. In this case, at a near point of focus of 0.45m, the number of required brackets is over 160.

Of course, one could close down the aperture to, say, f/16, but many would not find that an acceptable thing to do because of diffraction, especially on a crop sensor.

The alternative would be to reduce the overlap blur criterion, but as it is already at 19 microns, this, once again, would not likely be an option that many would take, ie introducing 'focus gaps’.

The following graphically shows the impact of going much beyond, say, 50mm and taking a deep focus bracket set. The chart shows two focal lengths: 50mm, the lower, curve, and 150mm, the upper curve. As before we are plotting the number of brackets against the near point of focus, from 0.45m to 5m. Remember, the top curve is just over 160 images at 0.45m:

And the same curves as a log plot:

Plus a linear plot where I’ve extended the near point of focus out to 50m, to further illustrate the sharp increase in the number of focus brackets as you approach the minimum focus distance:

Finally, putting the near point of focus in terms of a fraction of the hyperfocal distance, from 2 to 100 or 20, the number of brackets, ie lens rotations, looks like this:



Thus, we arrive at the following general conclusions:

  • In-camera deep focus bracketing is ideally suited for wide angle lenses. In real world space, the focus position move varies at each focus step, but the lens rotation remains the same for each focus position;
  • Although macro in-camera bracketing is obviously achievable, you will need to take a large number of brackets if you wish to capture a quality stack, eg low diffraction impact, no focus gaps and over a reasonable total depth of field, ie x to y. Macro focus bracketing is different to deep focus bracketing, as the near and far depth of fields are essentially equal each focus step;
  • Deep focus bracketing telephoto lenses beyond, say, a 50mm focal length, will potentially result in large bracket sets, according to the aperture, the overlap blur selected and the position of the near point of focus: so think about settings carefully. As a rule of thumb, if you wish to keep the size of the bracket set low, keep the near point of focus longer than, say, a tenth of the hyperfocal, which will result in no more than, say, seven brackets. Remembering you can calculate the hyperfocal in your head using the Rule of Ten, see the link on the right. 

Finally, this link will allow you to explore your own non-macro lenses. The link will open the equation in Wolfram Alpha, where you can change the equations, ie it is set up to compare two use cases, and set the input variables, as you wish.

As usual I welcome any comments on this post or any of my posts.

­­

Wednesday, June 19, 2024

Virtual XPan simulation…maybe

According to the Hasselblad web site, “the XPan was an extremely unique camera, providing the advantages of the 35mm format but also the ability to swiftly change to full panorama format without having to change the film. The XPan utilized a dual-format, producing both full panorama 24x65mm format in addition to conventional 24x36mm format on the exact same film. It was the first dual-format 35mm camera on the market that expanded the format instead of masking it, making sure that every exposure utilised the full area of the film.”

Today an XPan (secondhand) kit will set you back over £6000.

In previous posts I discussed how one can digitally simulate an XPan 'sensor', ie create a virtual 65x24mm digital sensor capture, by various pano adapters, with full frame and crop sensor cameras.

The downside, of course, being the need to capture multiple images, then stitch them, risking frame to frame artifacts.

So, the obvious, alternative is to capture single image, in this test case, an IR capture from a converted Canon M10, that runs CHDK and thus one of my Lua scripts, to help with setting infinity focus in microns and an IR based ETTR exposure.

As for focal lengths, shooting at 11mm on the M10 has a similar field of view, within a few degrees, as shooting the XPan with its 30mm lens. Obviously the depth of field will be different, but as I was focusing beyond the hyperfocal this is not an issue.

However, just cropping an M10 single capture to a 617 format is far from emulating an XPan 'negative' of 65x24mm. For example, the digital image would be some 5184 pixels wide, and if we assume an M10 pixel pitch of 4.29 microns, we generate a 22.2mm wide, Canon APS-C, sensor image. Far from the XPan's 65mm film negative.

Of course these days we have technologies that simply didn't exist back in 1998 when the XPan first came out, namely 'software’‘ exploiting advanced ‘AI’ based algorithms.

Thus, as an experiment, I took a handheld, single image, IR capture at 11mm, similar from a FoV perspective to a 30mm XPan capture. The subject being the National Trust's Vyne property.

The RAW capture looked like this:


After undertaking a 180 degree Hue shift in Lightroom, basic correction for exposure and white bslance in Lightroom, and a simple transform for the verticals, I ended up with the following image:

I followed this with a round trip to Photoshop, where I used generative fill to remove some distractions, eg people standing in the entrance area, and fill in the transformed edges. I could have likely accomplished this in Lightroom, but used Photoshop on this occasion.

Back in Lightroom I then cropped to a 617 format, resulting in this image, but still with ‘only’ a 5184 pixel width:


Although the above has the aspect ratio and FoV of a 30mm the Xpan capture, it still has a 'sensor width' of only some 22mm, ie not 65mm.

The last piece of the XPan simulation process is to throw this image at Topaz Photo AI and upscale it to the exact 65mm sensor equivalent, which resulted in this final ‘617 image’, at 15137x5342 pixels:


Of course, I'm kidding myself if I think I’ve created a digital XPan image, for a start I optically shot with an 11mm EF-M lens, and not an XPan 30mm lens. Also, IMHO, there is no way one can replace the feel, experience and image quality of a film based Xpan capture, by ‘playing around’ with some software. But, on the other hand, I've ‘saved’ myself well over £6000 ;-):-)

As usual I would welcome any feedback on this post or any of my posts.









Sunday, November 5, 2023

In-Camera Focus Bracketing Demystified: Part 2, macro bracketing

In the last post I introduced a hyperfocal-based model to 'calibrate' in-camera focus bracketing, to be able to set the manufacturers’ step size, from 1 to 10, according to the overlap blur we wish to use.

Using the model we can also estimate the number of brackets that will be captured for a given deep focus, ie near to infinity.

In this post we will extend the model to cover the macro use case, eg using a magnification of 1; where, unlike in non-macro photography, we need to account for a few other things, such as the (object) magnificatio, the pupil magnification and the fact we are not focusing to infinity, ie a camera hard/soft stop, but between two focus points.

The advantage of having a model to estimate the number of brackets to take is that the alternative is to guess a number and hope you have set enough to cover the required focus range, or simply set the number to a very large number, and then, in post processing, throw away all the images you don’t need.

As in the last post we will start with the simplified hyperfocal bracketing model, but adjust it to bracket between a near point in focus (x) and a far point (y), which is less than the hyperfocal:

From the above all we need to do, to estimate the number of brackets (B), is to solve the following:

Where n is the number of hyperfocal brackets at the nearest point of focus, and m the number at the furthest point of interest. Giving us:

Where H is the short form of the hyperfocal distance, giving us, after simplification:

Which in turn we can write as:

Finally, as we are now covering large magnification, we should recognise N, the aperture number, in its non-infinity form, ie respecting optical magnification and the pupil magnification. Giving us, via the bellows factor, our final estimate for the number of macro brackets:

Where f is the focal length, N is the infinity aperture number, ie as quoted on the lens, m is the magnification, ie reproduction ratio, p the pupil magnification, and C the overlap blur we wish to use.

To illustrate how to use the above, let’s look at a Canon EF-M 28mm f/3.5 Macro IS STM lens on my Canon M6 Mk II. 

Using the last post, and wishing to use an overlap blur (C) of 10 microns, I’ll select a step size of 4.

I’ll select an (infinity) N of f/8.

From the PhotonsToPhotos optical bench the lens details at a magnification of 1 are as follows:

From the above we can find x, the nearest focus we can achieve after focusing at a magnification 1, ie at the minimum focus distance. Unlike in the previous post, where we could get away with using a common zero at the entrance pupil, in macro photography we need to be slightly more selective; remembering that focus distance is measured from the front principal, blue H (which is not the hyperfocal H) in the above diagram, which gives us a minimum focus distance (x) of 36mm, ie the distance between O and H in the diagram.

The P2P lens information also tells us the pupil magnification (p), at this focus, is 1.9.

The final piece of data is to decide what y to use, once again measured from the front principal, which we will do by adding a delta distance to x, in this example 20mm, as the flower in this test image is small. We will also assume the same magnification and pupil magnification at x and y.

Plugging all the above in the equation for B gives us the following:

That is, we need to set the number of images to capture to at least 31.

It is then a simple matter to switch the macro lens to its minimum focus, switch on the inbuilt lens light, set the focus bracketing to on, the image count to 35 (adding a few images for insurance) and the step size to 4. Then move the camera so that the nearest part of the subject was in focus, set exposure, and press the shutter.

After ingesting 35 images into Lightroom, using LR’s denoise feature (although I did shoot at ISO 100), and a round trip to a focus stacking app and a little bit of LR tweaking, I ended up with the following test image:

As you can see, I missed placing the nearest focus, but, overall, I think the above model, the overall process and the experiment was worth it; as I now have a way of estimating the number of macro images to set.

Using the above equation we can also explore other lenses, for instance I have an EF 100mm f/2.8L IS USM macro. Keeping the aperture the same as above, but using the 100mm details from P2P, results in the required number of brackets to cover the same 20mm flower being 11, which can be compared to the 31 required with the 28mm macro at the same unity magnification. The model allowing us to see the advantages of using a telephoto 100mm lens, ie pupil magnification of 0.28, rather than a retrofocus 28mm lens with a pupil magnification of 1.9; and exploiting the larger working distance of the 100mm.

Bringing this post to a conclusion, I hope the above has been helpful to others trying to get the best out of their in-camera macro focus bracketing.

As usual I welcome any comments on this post or any of my posts.