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) magnification and the pupil magnification.

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 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.