Thursday, March 15, 2018

Scene Agnostic Bracketing

If you are a Canon Magic Lantern user there are several bracketing strategies, such as Dual-ISO or ML’s Auto Advanced Bracketing, that you can use. 

I wrote the Hand Held Helper Script (H3S) for a specific use case: that is a time limited bracketing situation, further constrained through hand holding needs.

One dimension to the constraint field is the shutter speed, that is the lowest hand held you can get away with. As this will vary with FL and the individual’s skills, it has a wide scope, however, to illustrate things, let’s assume we are hand holding with a WA lens, and our lowest shutter is sensibly placed at, say, 1/30s.

For most scenes this means that if we wish to cover the highlights and the shadows, so we will likely be time bracketing between 1/30s and, say, 1/1000s, ie 5 stops.

If we were shooting with a fully ISO invariant camera, ie invariance down to ISO 100, then this time bracketing would likely be sufficient to cover us, ie we (hopefully) could ‘recover’ shadow exposure in post, and then post process the brackets, eg either through tone mapping, fusion blending or masking.

However, as we’re shooting with a Canon system, the ISO invariance advantage doesn’t really kick in until we are at, say, ISO 1600-3200. Thus we need to be a bit more respectful at managing our brackets, ie trying to maximise the signal (number of photons) and minimise the noise (made up of photon statistical noise and ‘electronic’ noise).

Therefore, the second bracketing dimension that we need to utilise is the ISO, say, 100 to (say) 3200 or 6400 (on a full frame camera with ‘large’ photo sensors, eg the 5D3).

Thus the full bracketing scope that we have when hand holding looks like this:
 


That is some 10 stops of coverage.

Of course, much of the time we don’t need access to the above Ev space, as we are intelligent enough as photographers to know when to limit our bracketing needs, eg through metering or simply our (visual) skill/experience.

Such Scene-Informed-Bracketing (SIB) allows us to then choose the bracketing scheme we wish to adopt, eg ML-Advanced-Bracketing, Dual-ISO or ‘simple’ Canon.

But what if you don’t have the luxury, or ability, to carry out a SIB capture? For example, you are time limited and/or hand holding: that is you are Scene-Agnostic-Bracketing (SAB). This is why I wrote the H3 Script; which will capture a full range of brackets, irrespective of the scene’s DR; thus allowing you to choose, in post, what brackets you take forward to final post processing, ie one through to six!

The following illustrates the coverage that H3S provides, shown relative to an illustrative Dual-ISO bracket at 100/800:
 


The above, however, is an apples and pears comparison, as the Dual-ISO requires some SIB awareness. That is the Dual-ISO needs to be positioned to maximise the chance of covering the scene of interest. The H3S backets are SAB based.

Note the above only illustrates one potential Dual-ISO capture, the two red squares can be positioned ‘anywhere’ in the exposure range. Of course, as we know, using a single Dual-ISO not only limits your Ev coverage, but it also slightly compromises your resolution. But Dual-ISO remains a very valid choice for a SIB capture.

To fully maximise the H3S value, I also included the user option of capturing ‘high ISO (noise) brackets’ if you can’t (sic) capture time brackets, eg you are limited from a shutter perspective. The following shows such an H3S bracket example – once again reference to the Dual-ISO example:
 

So what’s the bottom line?

With ML we always have choices. If you have the luxury of assessing the scene, ie its dynamic range, that is able to carry out a SIB capture, and able to fully use the shutter, eg be on a tripod, then ML Advanced Bracketing is likely to be the way to go.

If you are handholding and/or need to manage scene motion, then Dual-ISO will likely be your friend. But you will still need to approach the capture from a SIB perspective.

If, however, you don’t know what the scene’s DR is, or haven’t the time to spend assessing the scene and/or you are hand holding, then using the SAB-based H3 Script may be the best way to ensure you have ‘all’ the images you need for post processing, ie to choose from.

It's your choice.

Tuesday, March 13, 2018

Hand Held Helper Script

Just a simple post to say I’ve combined the hand held exposure and focus bracketing scripts into a unified script, called Hand Held Helper (on the right). 

Monday, March 5, 2018

Auto Hand Held Focus Stacking

If you have read my blog before you know I like exploring how to get more out of my Canon EOS through Lua scripting in Magic Lantern. 

In a recent post I introduced a hand held exposure bracketing script, which is especially suited to wide angle (hand held) photography. 

In this post I'm introducing a simple auto hand held focus bracketing script, once again, especially suited for wide angle photography where you need a 'little help' in the foreground.

The script can be downloaded on the right.

Surely I hear you say, why bother; as with a wide angle lens one can get a very large depth of field, from near to infinity. But sometimes you just need that additional foot of so in the near field.

The use case is where you are hand holding and have set your focus for the far field, say at 2-3 x the hyperfocal, to ensure a low infinity blur (see previous posts for an explanation why you should focus at the hyperfocal distance), but your near field just doesn't cover your needs.

Yes you could keep reducing the aperture, but, as we know, this brings in two negatives. First, diffraction blur increases and second dust jumps out of your images, especially in the sky.

Of course, if you were on a tripod, landscape focus bracketing would be easy through the use of my Focus Bar script. But what if you are hand holding and/or using a lens that doesn't report focus distance.

My Auto Hand Held Focus Stacking script might be worth trying out.

Once you have set up the menus for your needs, eg max ISO, min hand holding shutter and smallest aperture etc, all you need to do is set the base (open aperture) exposure and the script will attempt to take a second image at the smallest aperture. This is accomplished through shifting the shutter speed and ISO, ie to keep the 'same' exposure between the images.

Rather than explain things further, let's look at a test shot. The base (24mm) exposure was at F/3.5, 1/40s at ISO100. The focus was set past the hyperfocal distance to produce a sharp far field image.
But as we can see, the near field is rather out of focus.

The script decided in this case, because I set the smallest aperture at F/16, to take the second image at 1/40s (because this was close to my hand holding limit, no shutter advantage was possible with this image) and at an ISO of 2000:
Because we are at ISO 2000 the entire image exhibits poor SNR compared to the F/3.5 image; but the near field is now acceptably 'in focus'.

Once ingested into Lightroom it was a simple matter to use 'Match Total Exposure', if required, and do a round trip to Photoshop. Once the two images are stacked in Photoshop, they can be auto aligned and then it is a simple matter to mask in the near field detail that you need. Using this approach allows me to 'protect' such things as skies from small aperture effects (although, of course, there is no sky in this image). Here is the resultant blend:
Bottom line: Although I wrote the script as a 'bit of fun', I think it could be of value in some situations. As usual I welcome feedback on this post.

Tuesday, February 20, 2018

Another Hand Held Bracketing Example

A simple post of another image from my Winchester Cathedral trip. Once again showing the power of my new (auto) Hand Held Bracketing script.

In this capture the script decided to take the following bracket set with the Irix 11mm lens set at F/5.6:
  • ISO 100 @ 1/250s
  • ISO 800 @ 1/250s
  • ISO 6400 @ 1/250s
  • ISO 6400 @ 1/30s
  • ISO 6400 @ 1/125s
After ingesting into Lightroom, doing a lens correction on each image, followed by an HDR Merge, I used Auto Tone in the Basic Panel to establish a starting point for a few more tweaks.

I then did a round trip to Photoshop, where I used one of my favorite filters to bring out some local contrast detail, namely NEXT from www.knowhowtransfer.com

I must say, as I was hand holding, I'm personally pleased with the image. What do you think for a hand held capture?


Sunday, February 18, 2018

Auto Hand Held Bracketing

In the last post I spoke about a bracketing strategy when time is limited, eg when hand holding. In this situation, ISO bracketing is the way to go.

Although some cameras offer ISO bracketing, none offer ‘intelligent’ use of both; for example, if you expose for the highlights and that base exposure is, say, 1/100s at ISO 400; then if you can ISO bracket, two additional exposure would be indicated at 1/100s and at ISO 1600 and ISO 6400.

But if you are using a lens shorter than say, 100mm, on a full frame sensor, you could also take further exposures, say one at ISO 6400 and 1/25s, ie creating a four bracket set with a delta Ev between brackets of 2 stops.

Yes you could change settings to switch from ISO to time bracketing, but as you are hand holding this is likely not to work out, as you composition will change radically as you switch strategies.

This is why I wrote the Auto Hand Held Bracketing Script: downloadable from the link on the right.

The script runs under Magic Lantern’s Lua module.

Once enabled, the script’s menu looks like this:


  • ‘Turn Script on and off’ does what it says and simply allows you to control whether the script is active or not. If ON the script is run by doing a 3+ second half shutter press.
  • ‘Min Shutter options’ are either Auto or Manual. In Auto the script chooses a suitable min hand held shutter speed based on the lens’s focal length (which it must report) and the lowest (1/30 or 1/60) shutter speed, which is also set in the menu. This ‘over ride’ covers the situation where you are using an extremely wide lens (see images below).
  • ‘Sensor Type’ is simply there to explicitly tell the script if it needs to adjust for a crop sensor.
  • ‘Delay?’ injects a 0, 2 or 5 second delay after the script initiates. Thus giving you a chance to compose yourself. You should switch off Canon delays.
  • ‘Max ISO’ should match the maximum auto ISO in the Canon menu. For a ‘good’ camera, like my 5D3, I would set this to 6400. For my EOSM I would reduce this to, say, 3200 and possibly 1600.
  • ‘Your min hand holding limit’ is used when you select Auto above. The script is written to provide you two options: 1/30s and 1/60s, but feel free to recode these to suit your needs.
  • ‘User feedback’ has four options: no user feedback, audio feedback, led feedback and audio+led feedback. When using the script in non-LV mode, ie looking through the eyepiece, having audio feedback is most helpful as it signifies when the 3+ second condition has been achieved, thus allowing you to release the half shutter state and initiate the script.
  • ‘Time shifting’ is either on or off. If on the script will try and take two time brackets at the max ISO, as well as the ISO brackets.

As for workflow, here is mine:

  • Ensure ML ETTR in on and set to double press to initiate;
  • Ensure Advanced bracketing is off;
  • Set the script’s menu as required (note the menu state is remembered and will be reset at camera start);
  • Set aperture and focus;
  • Assuming I’m composing through the optical viewfinder eye piece, I will compose, then do a double half press to grab an ETTR Tv;
  • I will then press the shutter half way and hold until I hear a beep, when I will let go;
  • As I have selected a 2 second delay I know I have a buffer time to stabilise myself;
  • The script will then take 3 or 5 images according to the menu settings and the base (highlight) exposure, ie the scene.
To test out the script, I could think of no better a high dynamic range environment than inside a church, and there is no better church near me than Winchester Cathedral, as it is one of the largest cathedrals in Europe, with the longest nave and greatest overall length of any Gothic cathedral in Europe.

I also decided to use my 5D3 with my new Irix 11mm Blackstone lens. To give me a better chance with hand holding, I used an F/5.6 aperture and locked the lens to the appropriate hyperfocal, which I know with this lens, would give me an infinity defocus blur around 9 microns, with a near field, at 9 microns, of just over a metre.

As for post processing: it’s your choice, ie tone map, fusion blending or blending with masks. In the examples below, taken inside Winchester Cathedral, I ingested the images into Lightroom, HDR merged the brackets and processed them entirely in LR.

As usual I welcome feedback on this post.

The following images have been variously processed to explore 'their look'. However, due to the mixed lighting environment, I haven't spent any time in Photoshop 'correcting' the white balance across the images.

























Tuesday, February 6, 2018

Optimised Strategy for hand held Exposure Bracketing

As photographers we are very aware that, although our digital camera-systems are impressive, they still need to be managed intelligently: technology has yet to reach the state where we can ignore, say, dynamic range (DR) or (shadow) noise.

Although we can recover many of the inherent weaknesses in our camera-systems, eg through exposure bracketing, these techniques are not always usable; for example: shooting in an area that prohibits tripods; trying to shoot on a pitching ship; or trying to bracket on a very windy day. Thus, there is still a need try and get the best out of a single image and/or use a more optimised approach to handheld bracketing.

As Canon Magic Lantern users know, the Dual-ISO feature is a handy way of ‘boosting’ a single image’s DR by up to about 3Ev. But this DR-boost only brings the Canon DR more in line with other camera manufacturers, who offer higher DR cameras than Canon at low ISO. The chart below illustrates where Canon’s DR lies relative to Nikon’s and Sony’s cameras.


Also, as we know, Dual-ISO comes at a cost, ie resolution.

Thus, for some time I have been looking for a ‘better’ High DR bracketing approach when forced to handhold, especially in very high DR environments, ie beyond the ML Dual-ISO capability.

Although I have used information from many sources, eg clarkvision.com and photonstophotos.net, the defining work that I have used to inform this post comes from MIT and the work presented by Hasinoff et al: https://people.csail.mit.edu/hasinoff/hdrnoise/

Also, usually hidden from simple users like me, I have also looked at the International Standards that camera manufacturers use, eg ISO 12232:2006 – Photography – digital still cameras – Determination of exposure index, ISO speed ratings, standard output sensitivity and recommended exposure index. I have found reading these to be educational.

For example, clarkvision.com summarises the ISO characteristics of my 5D3 as follows:


I have estimated the approximate (max) total noise as SQRT[Max Signal + RN*RN]. Note that the DR vs ISO curve shows the 5D3, like all other Canon EOS cameras, is not ISO invariant over the full ISO range, but, in the case of my 5D3, is above about ISO 3200. Thus, shooting above this is not likely to be of any real advantage (unless I needed to use such a high ISO to control subject motion).

The hand holding bracketing ‘use case’, I’m talking about in this post, is a form of ‘time limited photography’, ie where the total exposure is limited in some way: in this case because we are hand holding.

For example, let’s assume we are shooting wide, ie focal length less than, say, 50mm on a full frame, and I haven’t had a drink [:-)], and thus I set a single image hand holding limit of, say, 1/30 sec: this could be lower or higher, but 1/30s is a reasonable number to use.

Normally, when exposure bracketing, ie we are ignoring Dual-ISO for now, we seek to find a bracketing scheme that covers the dynamic range of interest, ie the shadows that are of interest with sufficient detail, to the highlights of interest that are not clipped.

If we have the luxury of time, we would seek to intelligently survey the scene, eg with an exposure meter, and work out an optimum bracketing strategy. Or, if we were on a tripod, we could make use of the Magic Lantern Auto Bracketing.

But we are hand holding, thus our slowest shutter speed needs to meet our hand holding limit, ie 1/30s in this example.

If we follow a typical bracketing model, knowing our slowest shutter speed is 1/30s, we would use our lowest ISO, ie ISO 100, and take three brackets at, say, 1/30s, 1/120s, 1/480s, ie at differences of 2Ev and 4Ev from the base. But, of course, these shutter speeds ignore the needs of the scene DR, eg daylight vs dusk; external vs internal. They only illustrate the hand holding problem.
 

In general a reasonable (scene-informed) bracketing strategy is to meter for the highlights and bracket for the shadows. In this post we won’t worry about how the highlight exposure is obtained, eg through Canon or ML (ETTR or Raw Spot) metering. We’ll assume a good base (highlight) exposure is set.

As we are trying to derive a robust strategy, let’s assume that our aperture is also fixed, eg for artistic reasons or depth of field control; thus our base (slowest) shutter is not going to be slower than 1/30s.
 

So where can we go to get our shadow-biased brackets?

The only place is, of course, to use ISO, ie higher ISOs than our base (highlight) exposure.

But I hear people saying that will not work: as high ISOs mean more noise.

But noise is complex and made up of many components, eg photon or shot noise, thermal or dark current noise and electronic or read noise etc. Plus noise is not the only metric we need to worry about in photography, there is also signal and signal to noise ratio (SNR).

For example, at low ISOs, (electron) read noise is higher (sic) than at high ISOs. Also, (electron) shot noise is a function of the SQRT(number of captured photons). Noting, for the same apparent exposure, eg the histogram reading, the number of photons at ISO 1600 is lower, by a factor 16. For example the 'full well' value for my 5D3 at ISO 100 is some 68900 electrons, and at ISO 1600 it is 4050.

Also, at least for my 5D3, and it will vary from camera to camera, the full well SNR at ISO 1600, compared to that at ISO 100, is less than a stop, eg 10.9 to 10.1 stops; as we are not in the camera’s ISO invariant zone.

To help ‘make the case’ for ISO bracketing here is a plot taken from the MIT work.


The key take away from the chart, for time critical bracketing, is that there is a change in bracketing strategy indicated when the total exposure time of the brackets, ie the sum of the shutter times in the bracket sequence, is, say, below a second or so: as it will be in our hand held use case.

For long total exposure times, say greater than a second or so, low ISOs are a better approach; but for short total exposure times then high ISOs are better.

For example, if we are hand holding, 3 brackets at 1/30s, the total exposure time will be about 0.1s; and we will typically not be seeking to bracket handheld much above, say, 6 brackets. That is we can consider a sensible (maximum) total exposure limit of, say, 0.2s for a hand held bracketing sequence.

If we look at the MIT results at, say, 0.2s and faster, we see a clear hint at an optimum bracketing strategy, ie use high ISO over low ISO when the total exposure time is low.

Thus ISO is not to be feared, especially if you are fighting other limits, as we are in the hand held bracketing use case. We need to embrace ISO and exploit it.

But how should we use it?


Based on some experimentation, as well as ‘intuition’, I suggest there are four possible schema:
  • we could see if we can find a fixed (higher) ISO, to ensure the slowest bracket remains above our hand holding limit, eg 1/30s here, and continue to vary shutter speed, but in dark scenes we will likely fail with this approach;
  • we could vary (ie bracket) ISO at a fixed shutter speed – but not all cameras allow ISO bracketing so you may need some addition technology, eg CAMRANGER or REMOTE PROMOTE;
  • we could optimally vary both shutter speed and ISO to maximise the SNR. This is the approach used in the MIT work, but this requires access to computer-based integer programming solutions;
  • Finally, if shooting Canon, we can exploit Magic Lantern’s auto bracketing with ISO shifting capability, which will ISO bracket to a maximum ISO, eg the start of the ISO invariant zone, then continue bracketing using shutter speed. But one ‘weakness’ of the current ML auto bracketing is that you can’t specify a minimum shutter speed, eg to cover the hand holding use case.
This conclusion, ie use high ISOs, may appear to some to be heresy. But let’s not fight the MIT data, let’s do a practical (Magic Lantern based) test: using the ML schema above as an illustration.

That is use ML ETTR to set the base exposure, ie to ensure we capture the highlights, using the slowest shutter speed you can get away with (1/30 in this example) at the lowest ISO you can. Note the faster your base shutter speed the more headroom you will have for (Tv) bracketing the shadows beyond the max ISO limit you set. Thus set the ML Auto Bracketing to Tv and switch ISO shifting on; having set the Canon AUTO ISO setting to, say, 3200 (in the case of my 5D3).

Here is the result of a test I just carried: Hand held indoors in the evening at 12mm and at F/5. Shot with a base exposure, for the highlights, of 1/80s at ISO 100. The other three images, calculated by the ML auto backeting, with a 3Ev delta and a four bracket request, were taken at: {ISO 800, 1/80}, {ISO 3200, 1/40s},{ISO 3200, 1/5s}. I recognise the 1/5s is marginal, but I have no way of limiting the minimum shutter speed.


Here are the four brackets as seen in Lightroom.


After some (non-optimised) LR processing, following HDR merge, this is what the final hand held capture looks like:


If you have got to this point, and are still reading: well done.

This hasn’t been an easy post to write, as I didn’t wish to regurgitate all the hard work that Hasinoff et al at MIT have done: 'just' use the insight it has created. I have thus only guessed at an optimum approach for hand held bracketing, ie without proof. However, I hope others explore the approach, ie use ISO bracketing, with or without combining it with shutter bracketing, eg using ML’s Auto Bracketing feature.

As usual I welcome feedback, including alternative views and corrections ;-)

Sunday, January 21, 2018

What would we do without Live View?

[Note I've updated this post to be clearer about the Magic Lantern advantage]

As part of the process of (re)acquainting myself with my 24mm TSE (tilt/shift) lens I decided to remind myself how to use the tilt function: thanks to Austrian army Captain Theodor Scheimpflug, who used it in devising a systematic method for correcting perspective distortion in aerial photographs. Plus is was an indoor day as it was cold, wet and sleety outside.


As we know a lens that tilts allows us to control the plane of focus and move it away from being orthogonal to the axis of the lens. Although there are ways of setting the tilt, based on calculations, a far easier approach is to use the live View screen.

The test scene was a row of our cat’s toys, which she then decided to take an interest in: so I had a live model as well.

The objective was to get everything tack sharp from the near to the far: something that would be near impossible with a normal 24mm lens.

After I had angled the lens axis down by about 30 degrees, thanks to my geared head, I set about the (Magic Lantern enhanced) focusing process, namely:
  • Set the aperture to as wide as possible, ie F/3.5 for me;
  • Zoom in (x10) on the LV screen and set focus on the nearest object you wish to see in focus;
  • Still zoomed in, move to farthest object and use tilt to bring that into focus;
  • Go back and forth until you are satisfied that focus is not changing;
  • Set the aperture to about two stops lower than the minimum, ie F/7.1 in my case;
  • Use ML ETTR to set the shutter speed, ie 2.5s at ISO 100 for this indoor shot. Note this is the ML advantage, i.e. metering after you have tilted directly off the sensor's LV.  Without ML you should meter before you tilt as the camera metering will likely be thrown out. 
In the end I needed about 3 degrees of tilt, but because I was using the LV process to set focus, the angle became irrelevant. As for focus, I was at about 1.3m according to my lens reporting, thanks to Magic Lantern.

Here’s the final proof, ie that the TSE lens is an incredible tool: thanks Polly :-)