Friday, August 16, 2019

Thank You Adobe

For anyone processing brackets, you will know about 'the trick' of going into the Library module, repeatedly selecting your bracket sets and using (PC) Alt-G to place them in a stack. Once in a stack you could then run LR/EnFuse in batch mode: but Lightroom's HDR merge did not recognise the stacks!

Thus you had to individually send each stack to LR's HDR Merge...until now.

Lightroom's latest release now includes a batch mode functionality for its merge tool, so you can batch process exposure brackets.

As a simple test, I took an exposure and focus stack with my EOSM3, using my CHDK M3 script.

I set the camera to F/8 at 11mm and (inadvertently) left the camera on ISO1000. Using the CHDK histogram I set an ETTR base exposure, set up the script to focus stack from the lens minimum focus and to take an additional (Zero Noise) exposure, at each focus, at +4Ev. Finally I set the overlap to 20 microns (which established the hyperfocal in the script, H) and the infinity shot to 3 x H, ie an infinity shot at about 7 microns.

This resulted in 6 focus brackets, four from the lens focus minimum to about H/3, one at H and one at 3H.

After ingesting into LR I first put each of the 6 focus bracketed exposure sets into a stack. Then I selected the 6 stacks and selected the LR HDR merge, which, with its new functionality, created 6 HDR images, that is one for each focus point.

This was followed by a round trip to Helicon Focus and voila I ended up with the, non ISO100, test shot.



As I say, thank you Adobe.

Postscript: here is another test image, this time at ISO100 ;-). Only needed 8 images, ie 4 focus brackets, each with 2 exposures.


Postscript-Postscript: and what the 12mm Rokinon Fisheye sees from the same position, defished with FishEye-Hemi.




Sunday, August 11, 2019

Fisheye doesn't mean super distorted

As I mentioned the Rokinon (or Samyang) 12mm Fisheye in the last post, I thought I would say a few more words about this bargain of a lens, which looks like this:




As I previously said, its field of view is 180 degrees on a full frame, so what does that look like, out of the lens (BTW these are just handheld snaps that I just took to show the FOV):



The fisheye distortion can be clearly seem, but after using Fisheye-Hemi, which corrects for the verticals, you get this:




Note how well Fisheye-Hemi does in protecting the FOV.

As a further comparison, let's look at what a 12mm shot looks like from my 12-24mm WA Sigma lens: taken from the same sitting position.




Chalk and cheese.

Bottom line: if you haven't got a fisheye lens, I can certainly recommend the Rokinon option. It's fun and can produce some great looking images, especially in tight corners.

Saturday, August 10, 2019

It pays to remember what you have previously bought!

Recently I have spent a lot of time ensuring my various cameras (5D3, EoSMs, EoSM3, G1X and G7X) can run my auto exposure and focus bracketing scripts.
 

But what if you haven't got CHDK or Magic Lantern running on your camera, ie you're not a Canon shooter? What if you are a Canon shooter but have manual lenses?
 

Well, all is not lost as we will see in this post.

As we know, shooting wide allows us to shoot close, albeit with some distortion, unless you use quality lenses. For example, my Irix 11mm f/4 lens has a 126° full frame, diagonal field of view without any noticeable distortions. But can I go wider?

The answer is, of course, yes. But now we need to explore fisheye lenses.

Luckly, I remembered, as I haven't used it for nearly five years, I have a 12mm, full frame, Rokinon Fisheye; which has a 180 degree field of view.

So I thought I would do a quick experiment, using my EoSM3, with an EFM-EOS adapter.

I used my M3 CHDK script to capture two exposures (a base ETTR and a +4Ev one for the shadows). I set the lens aperture to F/8 and focused at the hyperfocal, using the depth of field scale (having confirmed it was calibrated OK).

Having taken one set of exposures at the hyperfocal, I then took two more sets so I had three, contiguous focus brackets. That is six images in all.

I ingested these into Lightroom and used the LR HDR merge to create three HDR focus brackets, which I defringed and corrected for exposure.

I then did a round trip to Helicon Focus and ended up with this image:



I then did a round trip to Photoshop, where I used Fisheye Hemi to correct for the verticals, giving me this final image, after tweaking a little more in LR


Bottom line: I don't think you can beat the Rokinon 12mm Fisheye for quality at a low price.

Friday, August 9, 2019

More cameras!!

As some are aware, I love technology; and I like it better when it is cheap!

Today's camera manufacturers are doing a great service to those, like me, that love playing with cheap technology. As they keep pushing out new camera versions, their previous releases end up on eBay or one of the secondhand camera resellers.

In the last six months I've picked up a secondhand G1X and G7X, so that I can play around with CHDK scripting. A month ago I extended my collection with a second hand EOS-M3 body, as I already have EF-M lenses. Plus I added in an electronic viewfinder: a version 2.

Once I loaded CHDK, and got a little help from some CHDK experts, I started scripting and now have a focus and exposure bracketing script that seems to run pretty well.

As usual the script is accessible from the download page on the right.

The script is simple to use, but you will need to understand a few things:
  • The script scales everything from the overlap blur (in microns)
  • For the EOSM format, an overlap between 15-20 should be OK, but you can go less or more than this. Just note that the smaller the overlap, the more images will be taken.
  • You can specify an infinity shot that will generate an infinity blur of the overlap blur divided by your setting. Thus if the overlap was, say, 20 microns, and you stated the infinity shot should be 2, the infinity blur will be 10 microns.
  • You have three focus options. None, obviously will do what it says. X2INF focus brackets from the currently set focus to the infinity focus. M2INF first moves the lens to the minimum focus distance of the lens, then brackets to the infinity point.
  • At each focus you can additionally grab exposure brackets. The script assumes your base exposure is an ETTR one, thus use the CHDK histogram to set the exposure, eg so that the overexposure (red) dot just disappears. The exposure options are: base + 1 @ +2Ev, or base + 1 @ +3Ev, or base + 1 @ +4Ev, or base + 2 @ +2Ev and +4Ev, or 2 @ ISO100 and ISO1600
  • I've added in a 'nudge' factor. This may be useful when at the macro end, where the depth of field is very small. The fact is that lens position control is not that fine, so don't expect to be mm accurate. I would suggest a nudge of between 10-20mm.
  • You can turn the screen off when bracketing.
  • You can ask for a dark frame, bookend, image to be added at the beginning and end of the bracketing sequence.
  • You can add a delay in seconds.
  • Finally, the script uses the split lens approach I have previously posted about. Thus if you have registered a lens, the script will calculate the 'pseudo lens thickness'. Remember that all the depth of field calculations are made from the lens front principal plane, which the manufacturers don't tell us. Where as the lens distances that CHDK uses are taken from the sensor plane. To register a lens, just amend the script with your lens minimum focus distance, the maximum magnification (measured or taken from the spec), and the minimum and maximum focal length (which will be the same for a prime). If you don't register your lens the script allows you to run in simple thin lens mode (thickness = 0) or you can 'guess' a lens thickness in mm.
As for post processing: as usual that's down to you. As an illustration, the attached test image was captured at F/8, with an M2INF and ZN3 option (ZN = Zero Noise, ie the shot for the shadows). That is, 14 images, 7 focus points plus 2 exposures at each. 

I post processed in Lightroom. First by enfusing the exposures with LR/Enfuse, having adjusted the RAWs first. BTW, go to the library mode and manually select each pair of exposures, then use Ctrl G to stack them, once you have then stacked you can use LR/Enfuse in batch mode. I then did a round trip to Helicon Focus.



Thursday, June 6, 2019

What do you think?

As we create and store our images we derive personal pleasure: but what about sharing?

I know photographers who smother their images with watermarks, so that others may not 'steal' their work.

I must say, I feel a little more relaxed than most and so I've decided to publish my images in  a digitally presentable form.

Here are a few images from our Cornwall trip this week and I would welcome feedback on what you think about the presentation style.





Wednesday, May 29, 2019

Script Update

Just a quick post to say I've updated the Get Focus Bracketing script to better handle zoom lenses.

Simply take an image at the two focal length ends of your zoom lens, calculate the magnifications and register the lens in the script.

Monday, May 27, 2019

Splitting Things Apart

As those that have been following my recent posts know, I’ve been trying to ‘solve’ the problem of focusing with Magic Lantern (ML), be it in an automatic focus bracketing script or in a script that provides manual focus information.

The issue can be ignored if one is focusing away from the ‘macro’ end of a lens, ie towards the hyperfocal and beyond; but as you focus at the near end of a lens, we have a problem between ML and the real world.

The problem being that ML (and Canon) provide us with focus information relative to the sensor plane of the camera. Whereas all the depth of field and hyperfocal equations that we use are referenced from the front principal plane of the lens, which we don’t know and can vary greatly according to the lens design and focal length: even being positioned outside the lens in some cases.

There are techniques to estimate the principal planes, but these are complex and hardly worth doing for ‘normal’ (non-scientific) photography. However, if we limit our attention to landscape-style photography, where we are seeking large depths of field, near to far, with wide angle lenses; then we can make a few pragmatic assumptions and try and ‘resolve’ the ML/Canon focus distance problem.

What we are seeking is a way to convert from the ML sensor-2-object distance to the lens-2-object distance.

To understand the problem, let’s first remind ourselves what the thin lens model looks like; that virtually all depth of field equations are based on. The model looks simple, compared, say, to a modern complex lens, but it is nevertheless powerful. 




The thin lens model, which assumes a symmetric lens with unity pupillary magnification, has a single principal plane and all depth of field equations can be derived from the standard, so-called, conjugate equation (after correcting for image inversions, ie using the convention that real is positive), namely:


With a little geometry we can easily show that the distances u and v may be derived as follows:

That is, u and v are derived just from the focal length (f) and the magnification (m).

In the thin lens model, the sensor to object distance x = u + v, and, recognising that the magnification is simply the image size divided by the object size, with a little bit more math, we can show that the magnification (m) is:


It certainly looks like we are on to a winner with the thin lens model, so let’s test it against a real-world lens. In this instance my Sigma 12-24mm DG HSM lens.

Like all manufacturers, Sigma does not provide information on the location of the principal planes, but they do provide the maximum magnification and the minimum focus distance. So let’s use this information to test the thin lens model.

As the Sigma 12-24mm is a zoom, the maximum magnification occurs at the longest focal length of 24mm. Sigma quotes a minimum focus distance of 280mm and the maximum magnification is stated as 0.17.

BTW it is very easy to test the above numbers, or derive your own reference numbers, by focusing at a suitable distance and taking an image of an object of known size, eg a ruler. Then in post you can estimate the magnification.

From the thin lens model we can easily show that x is:



Thus, using the Sigma lens quoted information for its maximum magnitude (0.17) and at its maximum focal length (24), we can calculate what the thin lens model thinks the focus distance is, which should be the minimum focus distance of 280mm.

In fact the thin lens model says we should be focused at 193mm, which clearly is not 280mm.

This flags up the first problem we have, namely the thin lens model is not universally useful over the entire focus range and becomes ‘challenged’ towards the macro end. So we need a better model, which is where the split thin lens model comes in.

In the split thin lens model we create two principal planes by splitting apart the standard thin lens model:


We can then solve for t, the split lens thickness, giving us:


Where M is the magnification at focal length (F) and minimum focus distance (X): either taken from the manufacturer’s specifications or measured yourself.

For a zoom lens we simply measure the magnification at the two focal length extremes and scale in between. For WA zoom lenses a reasonable assumption is to linearly scale.


The final part of the model is to carry out a focus distance adjustment for m, by simply using the thin lens equation, but now corrected by the split lens thickness. This magnification is 'only' used on the image side when bracketing, ie to estimate the lens to object distance.

We now have everything we need. 


In the case of a zoom lens, knowing the magnification at the minimum focus distance and focal length extremes, allows us to estimate the split thin lens thickness at any focal length in between.

Once we know this, we can convert from ML sensor-2-object distances (x) to lens-2-object distances, via a simple mapping:



Where t is our lens thickness at focal length f and m is the magnification at that focal length and at focus distance x.

Final reflections: clearly the above approach is only one way of bridging the gap in our lens understanding. Without knowing the details of a lens design, we could guesstimate the relationship between the ML/Canon distances and the lens to object distances; or we could make an assumption that the ML/Canon distance is the same as the lens to object distance.


Assuming that the lens to object distance is the same as the sensor to object distance is OK when you are focusing around and beyond the hyperfocal; however, as your focus moves more towards the macro, then you shouldn’t make that assumption: at least when focus bracketing.

The split thin lens model is clearly not perfect, eg we ignore pupillary magnification; it also likely misses out on many nuances associated with optics, but it is most likely a better approach than ignoring the problem: at least when scripting.