Wednesday, December 11, 2024

Getting to know a 'new' lens

In the last two posts I introduced the Poor Man's Optical Bench (PMOB) tool and showed how you can estimate the location of the on-axis entrance pupil of your lens using a cheap laser leveller.

Knowing: the position of the entrance pupil, but as previously mentioned, assuming it is at a single on axis location; the minimum focus distance and the focus distance of interest, both from the sensor plane; the pupil and optical magnifications; and the aperture number at infinity; allows you then to create your own 'thick lens spec sheet' at a given focus.

In this post, I'll illustrate how to do this, using my 645 Mamiya-Sekor 35mm C N lens, at infinity focus. I will also show how to 'calibrate' your lens depth of field scale.

From the lens manufacturer we know the minimum focus distance (MFD) is quoted as 450mm (on this occasion I used this, rather than measure this myself). We also know the infinity focal length is 35mm. Finally, we known the flange distance of the 645 Mamiya system is 63.3mm.

From taking a couple of snaps on a light box, and aligning the images in Photoshop, we can estimate the pupil magnification at infinity as 2.1:


The ‘entrance pupil’ location is found using the laser leveller technique, giving an estimate of 35mm from the lens rear flange surface. Which tells us the location of the entrance pupil, relative to the sensor, is at 35 + 63.3 = 98.3mm:


In the above Photoshop composite, ie I don’t have two laser levellers, we see the two laser lines clearly locating the entrance pupil, relative to the lens rear flange surface.

Having got all the input data, we then open up the Poor Man's Optical Bench (see link RHS) and input all the information:

In the screen grab above we see all the input data and that focus is at 'infinity', ie greater than 10 hyperfocal distances, ie magnification is 0. The other magnification, 0.104. is an estimate at the MFD, but assuming the focal length remains fixed. Once you adjust focus to, say, the MFD, you will need to tweak the focal length, after remeasuring the entrance pupil location and pupil magnification, and getting the optical magnification at that focus, eg as quoted by the manufacturer, ie 0.11 in this case, or measured by yourself.

We also see an estimate of the hiatus (44.9mm), and the hyperfocal distance from the sensor, here based on a circle of confusion of 20 microns.

Finally, we also see a dotted line showing where the flange distance sits relative to the sensor.

For the pano photographer, the above gives us the location of the no parallax point of the lens, ie the entrance pupil.

The next thing we can do is calibrate the depth of field scale.

The 645 Mamiya-Sekor 35mm, being a prime manual lens, has an unambiguous depth of field scale, unlike a zoom lens, but, of course, we don't know what CoC the manufacturer used.

Using the PMOB we can get an estimate by simply counting the number of DoF rotations to go from infinity, ie focused at the hyperfocal at a given aperture, say f/16, to, say, the MFD. This can be accomplished by putting some masking tape on the lens and marking the DoF rotations needed to get from the hyperfocal to the MFD.

Using the f/16 marks on the DoF scale, I estimated the number of lens rotations to get from the hyperfocal to the MFD at about 3.1:

Having set focus in the PMOB to the MFD, we first need to repeat the process of locating the entrance pupil with the laser leveller and measure the pupii magnification, and optical magnification if you wish or take the manufacturer’s value, and enter these values into the PMOB. Once entered, we need to adjust the focal length in the PMOB until the magnification matches the manufacturers 0.11, or your measured magnification. 

Which means, after adjusting the CoC slider in the PMOB, to match the number of brackets to about 3.1, tells me the manufacturer used a CoC of around 48 microns when laying out the scale, which compares well with taking a full frame CoC value of 30 microns and factoring it by the 645 crop of 0.62.

Knowing the DoF scale CoC, it is a simple matter to dial in any hyperfocal infinity blur you wish, or any overlap blur when focus bracketing. For instance, if you wanted to use a CoC of 24 microns, instead of 48, with an aperture set to f/16, you would use the f/8 DoF scale.

Finally, knowing the position of the flange and the overall length of the lens, we can overlay a pretty picture of the lens, say in Photoshop, to enhance the look of our 'lens data sheet':


So, there you have it, using the PMOB and a laser leveller, you can characterise any lens at a specified focus, eg infinity or at maximum magnification.

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

Friday, December 6, 2024

A simple method to estimate the Entrance Pupil position of any lens

Caveat Emptor: As lasers are involved, you need to be aware of the risk to your camera's sensor. So only use a laser if you are prepared to experiment and potentially damage your camera sensor. 

Addendum: An alternative approach to that presented in the original post below, is to only use the lens and project the image on a surface behind the lens. Using this surface image then allows you to locate the entrance pupil rays.

The following snaps, showing my 24-105mm F4L at 24mm, illustrates only using the lens, where we see the projected image, and recorded rays providing an estimate of the entrance pupil location, relative to the physical edge of the front of the lens, the pencil line, or some other lens reference location, eg the rear of the lens, at the flange surface, which is a known distance from the sensor for a given camera system.

Note in the test below I didn't level the lens, which I could have done by placing the lens on a bean bag; also it’s not critical to place the lens so that it projects an in focus image, which would project a small dot, as long as you can locate the entrance pupil with the laser line. In fact, placing the lens at an out of focus position, as shown below, aids finding the point where the line, or lines if the cross lines are visible as below, are centralised, ie when you are shinning the laser line through the pupil on the optical axis:


To further illustrate the work flow, I used my Canon 100mm F4L IS, with focus set to infinity. Having positioned the lens as above, I used a plastic set square to mark the lens rear flange surface. I then recorded two laser lines, either side of the lens axis at the edge of the field of view, ie to be as far from the axis as possible, simply looking to see when the projected image was central, ie by rotating the laser leveller.

Having marked the two lines, I measured where these crossed, realtive to the lens flange position; which gave me a measurement of 43mm.

Knowing this, I then added the Canon EF flange distance (44mm) to this, giving an entrance pupil location of 87mm from the sensor plane.

As a comparison, the PhotonToPhotos Optic Bench Hub gives an infinity entrance pupil location of 87mm ;-)

As a final comment, because the accuracy of the technique pivots around how accurate you are on aligning the angle of the laser line at the on-axis entrance pupil. If creating two lines, one either side of the lens axis, it is recommended that you keep the laser leveller near 45 degrees to the lens axis on a wide angle lens, and at the edge of the angle of view of a lens with a half angle of view of less than 45 degrees.

Once you have located the entrance pupil, you can use the Poor Man’s Optical Bench tool to reverse engineer your lens.

——————————————

The following is the original post that shines the laser onto the sensor, which I don’t recommend, ie use the lens only technique above

In the last post I introduced the Poor Man's Optical Bench, that I wrote to help visualise the principals and pupils of any lens, based on the following readily available inputs:

  • The location of the entrance pupil, which is the no parallax point of a lens when taking panos, is also the location from where the hyperfocal distance is measured. However, this is a bit of a simplification, as in reality the pupils (entrance and exit) trace out a locus, which for the off axis rays will not be on the axis. However,, we will ignore this and assume the pupil location is the same for all rays. 
  • The optical magnification
  • Focal length at non infinity focus. Note the lens focal length can/will change during focusing, especially when using a macro lens
  • Pupil magnification, which becomes important when carrying out macro photography

Of the above, the most fiddly to estimate, without access to a proper optical bench, is the position of the entrance pupil.

Assuming you don't have access to a physical optical bench, various techniques have been suggested to estimate the location of the entrance pupil, eg using pins, poles, through to using a laser pointer.

In this post, I'm introducing yet another technique, that I believe is superior to the laser pointer technique: that is use a laser leveler.

In my case I am using a cheap laser leveller that I had.

My logic for using a laser leveler, is that it gives you a clear line to record and you don't need to align it to the optical axis, as you do with the laser pointer, which is a dot, not a line. Also it is usually self levering, well mine is.

The method to as follows:

  • Tape a sheet of paper to a flat surface
  • Layout your camera at the focal length (if a zoom) and focus of interest, eg infinity focus
  • Locate the sensor plane symbol on the camera and align the laser leveller to this so the laser line goes through the symbol and is parallel to the end of the sheet of paper. Mark the laser line's position with a couple of pencil marks as this will be your zero
  • Move the laser lever in front of the lens and off axis, and rotate it until you see the screen image create its maximum blooming. At this point record the laser line on the paper, ie with a couple of marks
  • Repeat the above as many times as you like, moving the laser leveller either side of the lens and creating as many 'rays' as you like. Note beams close to the axis will not likely be as accurately located compared to beams away from the axis, hence the technique is best used with wide angle lenses
  • Once you have enough information, simply join up the marks to create the sensor baseline and where the rays converge, which is the estimated location of the entrance pupil on the axis of the lens. 
The more careful you are with establishing each ray, the more chance you will have that the rays will come together in a tight cluster. Also, this technique is more suited to wide angle lenses, as attempting to locate the entrance pupil with rays close to the axis is likely to create positioning errors.

As an example I just quickly analysed my Canon 24-105mm F4 at 24mm, focused at infinity, and estimated the entrance pupil at about 117mm from the camera's sensor mark.

If I look at the PhotoToPhotos Optical Bench Hub, the entrance pupil is located at 119mm, when focused at infinity, that is my simple laser leveller technique is different by some 2.5%.

One caveat that is worth mentioning is that fisheye lenses do not have a single, on axis, entrance pupil location. The laser leveller technique, however, will still allow you to carry out ray tracing to get an appreciation of your fisheye lens entrance pupil characteristics.

So, there you have it, a simple method to estimate the location of the entrance pupil, for those that wish to know the non parallax point of a lens, or as input into my Poor Man's Optical Bench.

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

Saturday, November 30, 2024

Poor Man’s Optical Bench

There are two types of photographer: those that like/need to understand their lens and its characteristics; and those that treat the camera+lens as a simple system, with the sensor as the zero or reference point. 

For a lot of photography, for example single image landscape capture, where objects are greater than, say, half the hyperfocal distance or more, treating the sensor plane as your reference point is not unreasonable.

However, for macro photography, pano photography, or, say, deep focus landscape photography, when you need to focus bracket from or near the minimum focus distance, knowing a few things about your lens is helpful/necessary. For example: 

  • The location of the entrance pupil, which is the no parallax point of a lens when taking panos. It is also the location from where the hyperfocal distance is measured
  • Position of the front principal, from where depths of field are estimated
  • Focal length at non infinity focus, that is lens focal length can/will change during focusing, especially when using a macro lens
  • Pupil magnification, which becomes important when carrying out macro photography
There is only one source of lens information that is ‘right’, namely that which the manufacturer holds, but that is not knowable by the lens user. 

The next best source of information/insight is provided by PhotonsToPhotos Optical Bench

However, even the PTPOB doesn’t cover all situations, for example, not all primes have the ability to be focused in the hub; and none of the zoom lenses have a focusing feature. Plus, not all lenses are listed. Having said that, the PTPOB, is an incredible resource and the photography community should be thankful that Bill Claff maintains the resource as freely accessible. 

As many photographers know, one can get some insight into a lens by using the so-called thin lens model:

Its attractiveness to many is its simplicity, and, for non macro work, it helps photographers begin to understand their lenses, eg in terms of the lens focal length and magnification. However, the thin lens model places pupils and principals at a single location, and breaks down as you approach the macro regime. It’s also not helpful for the pano photographer.  

For this reason, many, like myself, prefer to use the so-called thick lens model, that accounts for lens pupils and principals, where they cross the axis of the lens:
 

As can be seen, the thick lens model allows us to identify all the important characteristics of a lens at a given focus, identifying the focal points, the front and rear principals, and the entrance and exit pupils. 
 
 
In order to speed up using the thick lens model, I’ve written a graphical calculator that is useable by all. I’ve written the calculator in the Desmos environment, and called the calculator, The Poor Man’s Optical Bench (PMOB), in homage to the PTPOB. 

You can access the PMOB by clicking on its link on the RHS of this page or this link. You don’t need an account and only need to enter a name of some kind. 

The calculator has two pages with page one showing some information on the calculator and where you type in the lens name, or leave the text field at the bottom of the page blank. 
 
Moving to page two we see two areas. On the left is where you put your input data, ie:
  • Focal length, as printed on the lens, or estimated or reported on a zoom
  • The f-number at infinity, ie as set by your camera or set on a manual lens. This is used when estimating the hyperfocal and the number of focus brackets from the minimum focus distance to infinity
  • The minimum focus distance, measured or taken from the manufacturer’s data; as measured from the sensor plane
  • The pupil magnification
  • The entrance pupil location, ie the no parallax point
  • The focus distance, as measured from the sensor plane
  • The sensor size, which is used to estimate the field of view or acceptance. Use 36, 24 or 43.3mm on a full frame camera, ie width, height or diagonal
  • The circle of confusion in microns
  • The final input field is used to change the line spacing on the output text, which is useful as you zoom in and out of the calculator's image
For a prime lens the infinity focal length and infinity f-number are those printed on the lens or as reported by the camera or on the lens for a zoom. The pupil magnification, exit pupil diameter divided by the entrance pupil diameter, measured or estimated, needs to be entered (see here). With the lens mounted on the camera, and on a nodal rail, one can use the pano no parallax method, or a laser leveller with the lens on a table, to estimate the location of the entrance pupil (see here).
The graphic on the right of the page then will provide you a visual of the lens field of view, and the layout of the pupils and principals on the axis. it will also tabulate the inputs and some calculated outputs, that can be used to refine the model, ie to ensure magnication matches. A printed out screen grab of this page will serve as a reference sheet.

In the above we see the end result of the following workflow:
  1. Capture and enter all the input information, ie measured or taken from the manufacturers lens specifications or the PTPOB.
  2. Once entered, check that the magnification is as expected or measured. If not adjust the focal length until the magnification is as expected.
In the above example, for a Canon 100mm macro lens, where, for convenience, I took the entrance pupil location from the PTPOB, we see that at a magnification of unity, ie at the minimum focus distance, the focal length is in fact (around) 74mm, ie where the calculator's magnification becomes unity, this focal length compares well with the PTPOB.
 
The calculator also provides an estimate of the maximum number of focus brackets needed to go from the MFD to infinity. The hyperfocal distance from the sensor is also estimated.

One final thing to note is that the PMOB is a spot model, meaning that it is only suitable for assessing a lens at a single point of focus. The model doesn’t allow you to explore focusing, as it doesn’t model how the principals and pupils change during focusing.
 
Also the Poor Man's Optical Bench is no replacement for the PTPOB, nor will it ever. It is also based on the accuracy of estimating the location of the entrance pupil, the pupil magnification and the optical magnification.
 
As this has been a long post, I'll stop here, as my intention in this post was to introduce the calculator. I'll be writing other posts illustrating the calculator’s potential value to photographers.

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


Friday, November 22, 2024

Magnification: one quick and simple method

As we have seen in my recent posts, knowing the magnification, at say the minimum focus distance (MFD), can be useful, eg for estimating the number of focus brackets we need to take between the MFD and infinity.

Assuming your lens is registered on the PhotonsToPhotos Optical Bench Hub, one can use this resource to get a pretty good idea of lens attributes: at least for a prime lens and where the Optical Bench Hub has a focusing model.

In this post I'll assume the lens you are interested in is not in the optical bench hub, or that you can't focus it on the hub. Also I assume you can’t simply measure the magnification by taking an image of a focused object of known size, at the MFD; for example when using an ultra wide lens with a large depth of field, even at the widest aperture.

In other words, we need to derive magnification experimentally, by estimating the location of the front principal.

Some may be attracted to using a thin lens model, that is magnification (m) is given by f/(u-f), where u is the distance from the front principal, which is also the rear principal in the case of a thin lens, to the object in focus at the MFD.

But we can do better than this by using a thick lens model,  my version looking like this:

From the above it is clear to see why the thin lens model is too simplistic for our needs. But how can we find the location of the front principal, if we don’t know the lens hiatus, ie the position of the rear principal?

There are two lens attributes that can be reasonably well estimated, without complicated equipment: the position of the entrance pupil and the pupil magnification.

The position of the entrance pupil is simply the location of the lens no parallax point, for example as discussed in this post, which can be estimated experimentally, eg using the so-called ‘pole method’ or, say, a laser pointer.

The pupil magnification can be estimated by looking at the lens from the front (entrance) and rear (exit), and either guessing the ratio of the pupil sizes (exit/entrance), or by taking a picture and measuring the ratio.

To illustrate how simple it is, I used my new BrightinStar 9mm, mounted to my Canon R:

By simply rotating the lens on a nodal rail, and using a couple of door posts in the house, I estimated the no parallax point to be about 60mm from the sensor plane. This was a pretty quick estimate and I’m sure I could have been more precise. 

I then put the lens on a light table and took a picture of the lens from the front and back; with a ruler in the frame so I could ensure the same scale when looking at the two images in Photoshop:


From the above we can see the pupil magnification is about 5.

Having estimated the location of the entrance pupil, and the pupil magnification, it is a simple matter to estimate the magnification at the MFD, by simply measuring, the distance from the sensor plane to the nearest object that you can focus on.

In this post I'll make it simpler, by accepting the manufacturer's specification for this distance, ie 200mm, which gives an estimate of the object distance from the front principal of (200-60+9(1-1/5)) = 147.2mm.

Thus magnification at the MFD is 9/(147.2-9) = 0.065

The above also gives us an estimate for where the front principal is located from the sensor, ie at  60 - 9(1-1/5)) = 52.8mm.

So how does ths compare with the marketing blurb?

Well BrightinStar state the lens maximum magnification as 1:13.5, or 0.074.

OK, the two magnifications aren't the same, but they are pretty close; and I’m sure if I had measured the estimated location of the entrance pupil better, I would have got a better magnification estimate.

If I had used the MFD from the sensor (200mm), and the thin lens model for magnification, we would get and estimate of  9/(200-9-9) = 0.049, which is clearly not a good match.

In conclusion, I think the above pragmatic approach is a reasonable one to try, and certainly better than assuming a thin lens model.

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

Addendum

As mentioned above I thought I’d rushed estimating the entrance pupil location, by using the pole technique, so I redid it and got a distance of 75mm from the image plane. Plugging this into the above equations gives a magnification at the MFD of 0.073. Which is very close to that quoted by the manufacturer, ie 0.074.


Sunday, November 17, 2024

Focus Bracketing: An Integrated Perspective

In previous posts I've discussed focus bracketing models from both the object and image side of the lens. In this post I'll bring together both perspectives and show they are essentially the same.

Before going into the details, I have to admit an error crept into my first post in this series, about focus bracketing, that I've now corrected.

Also, up until now I've constructed my object side model by assuming focus bracketing takes place from the hyperfocal, thus requiring an additional bracket to be added to account for a focus bracket at infinity. In this post, I'll assume the object side focus, hyperfocal bracketing model, starts at infinity:

In the above we see that the first focus bracket is at H/0, ie infinity, and the last bracket, ie the nearest to the camera, is placed at H/(2(n-1)). Thus if the last bracket was, say, the 5th, that bracket would be taken at H/8. Noting that x, the nearest focus distance, is measured from the front principal which, in this model, is also the entrance pupil, as we are ignoring pupil magnification.

To estimate the number of brackets, all we need to do is solve x = H/(2(n-1)), for n.

We thus end up with the simple insight that the number of brackets, ie images to be taken, can be estimated from (H/(2x) + 1).

If we now substitute the approximation for H, (f*f)/(N*C), ie dropping the single focal length term, we end up with the number of brackets (n) being given by:

To appreciate the image and objective side perspectives, we can now layout the two models, side by side:

As previously discussed, from the image side perspective, the number of brackets can be estimated by dividing the total depth of focus at infinity (2NC) into the lens extension at the nearest focus of interest and adding one, to account for the fact we are starting at infinity or at the minimum focus distance (MFD). If we take the extreme focus to be the MFD, the lens extension is simply the focal length (f) times the magnification (M) at the MFD. Which gives us an estimate of the maximum number of brackets, from the image side perspective, of:

These two models are virtually the same for lenses, when the focal length is small relative to the focus distance, where we can approximate magnification as f/x, rather than use f/(x-f). 

Clearly, the simplest model to use to explore auto focus bracketing, is that from the image side, eg the overlap circle of confusion being estimated from:

As an example, let's say we wish to estimate the circle of confusion (C) for an auto bracketing step size of 4. All we need to do is set the camera to the focal length of interest (if it is a zoom), set the aperture, and either measure or accept the manufacturer's stated magnification at the MFD; and then focus at the MFD and take a bracket set, even with the lens cap on.

Let's say the focal length was 22mm, the aperture was set to f/11, that the magnification at the MFD was 0.3 and that 16 images were captured.

Plugging these numbers into (f.M)/(2.N.(n-1)) gives us an estimated overlap circle of confusion of 20 microns.

It’s as simple as that.

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







Saturday, November 9, 2024

Another look at focus bracketing

In recent posts I've explored deep focus bracketing, for example for landscapes, where we wish to capture focus brackets from the minimum focus distance to infinity, using a simple object side hyperfocal based model:


In this post I'll shift my attention to the image side, where things get a lot simpler:

The focal length at distances less than infinity is given by (1+m).F, which is measured from the rear principal. BTW the illustration above is not to scale, it is just to show the concept of using the depth of focus, ie 2.D.

The above image side illustration showing that the lens extension is given by the magnification (m) times the focal length (F). Thus at infinity, where m is approaching zero, we see that the active focal length is simply the manufactuer's quoted focal length, ie as printed on the lens, but at the minimum focus distance (MFD) the active focal length is (1+M).F, where M is the maximum magnification, ie at the MFD.

Using the above, and similar triangles, and noting that C is very much smaller than the aperture, it is easy to show that the ‘near and far’, or front and rear, depth of focus (D)ie not the near and far depth of field which is quoted on the object side, is approximated  by (1+m).C.N, where C is the overlap circle of confusion we wish to use and N is the manufacturer's (infinity) aperture number, ie as quoted on the lens.

From the above we can see that the depth of focus, either side of the point of focus, varies according to the magnification but is independent of the focal length, and that the smallest total depth of focus, ie at infinity, is simply 2.C.N

We can therefore estimate the maximum number of equal lens rotations we need to make, to go from the MFD to infinity, by simply dividing the lens extension (M.F) by 2.C.N, which gives us a very linear appreciation of the maximum number of brackets that could get taken, ie as we have ignored changes in magnification as we focus. Or, put another way, we have introduced some 'focus overlap insurance' by not ‘worrying’ about the depth of focus varying as we adjust focus; which is not a bad assumption when doing non-macro focus bracketing, where the maximum magnification will be low.

To illustrate how we may use the above, let's assume we are using a Nikon 18mm f/2.8 lens, and we wish to manually focus bracket from the MFD to infinity.

The only thing we need to know is the magnification at the MFD, which, as this is a prime lens, we can take from the manufacturer's data sheet, or from PhotonsToPhotos or capture an image of known size, in focus, at the MFD and measure M in Photoshop. The reproduction ratio being quoted as 1:9.1, ie at the MFD, gives an M of 0.11:

We now have all the information we need to estimate the number of brackets to take at, say, an overlap circle of confusion of 20 microns and an aperture of f/10: (M.F)/(2.C.N) = (0.11*18)/(2*0.02*10), which is say 5. It is a simple matter to then use the manual focus bracketing hack that is discussed in the previous post.

To illustrate the advantage of 'going wide', let's look at another lens: an Irix 11mm lens.


Here we see the magnification at the MFD is given as 1:7.68, ie M = 0.13. 

Keeping the CoC at 20 microns and the aperture at f/10, we now arrive at (M.F)/(2.C.N) = (0.13*11)/(2*0.02*10), ie say 4.

Finally, to show why manually focus bracketing a telephoto lens is a bad idea, let’s take a Canon 200mm f/2.8, with a maximum magnification at the MFD of 0.155. In this case, the number of brackets, keeping everything else the same as before, is some 77. Well, good luck with that ;-)

Of course, looking at focus bracketing from the image side is not a new idea, for example see here for an insight into auto focus bracketing, looked at from the image side. However, the above is how I have rationalised manual focus bracketing wide angle lenses from an image side perspective.

The bottom line being: estimating the number of focus brackets, or more correctly the most you need to take, is greatly simplified by considering the image side of the lens and ignoring focus to focus changes in magnification. The final caveat being that, like looking at focus bracketing from the object side, the above image side view is just a model, but one that, hopefully, gives the reader greater appreciation of how focus bracketing works.

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


 

Friday, November 1, 2024

Focus by wire warning: not for manual focus bracketing

In previous posts I've shown how you can 'calibrate' your in-camera focus bracketing, such that you can set the focus step in terms of the overlap optical blur that you wish to use: Part 1.

But what if you don't have a camera with an in-built focus bracketing feature, for example my EOS M3. Can you still focus bracket?

The answer is clearly yes, but we need to be aware of a lens limitation: namely, the lens can't be a pure focus by wire type.

To understand why this is the case, we first need to appreciate how a 'normal' lens works. 

As we know, a modern lens is composed of many lens elements and some of these need to move relative to each other as we focus, say with a prime lens. Things get more complicated if we consider a zoom lens, ie more lens elements need to move relative to each other.

Since the early days of complex lenses, manufacturers have made use of a so-called helicoid mechanism:

In the above, taken from this lens rental post, we see the helicoid component, converts lens barrel rotation (focus or zoom) into axial lens movements. The key take away here is that there is a mechanical, which can be manually or electrically driven when using AF, relationship between lens rotation and axial lens element movement. 

In addition, such a design will exhibit hard stops at the minimum focus distance and at infinity, although on some lenses they may 'focus beyond infinity', ie going out of focus beyond the optical infinity, until the helicoid infinity hard stop is reached.

In a previous post I showed how one can add a depth of field scale to any lens.

An alternative way of looking at this is to use the simple expression (k+3)/2. Where k is the ratio of the short hyperfocal distance, ie (f*f)/(NC), divided by, say, the minimum focus distance, as measured from the front/entrance pupil, ie the no parallax point of the lens; as shown here (from Photons to Photos) for an EFM 11-22mm lens, at 11mm, ie in blue:

The (k+3)/2 expression then gives the number of brackets to take to cover from the (minimum) focus distance to infinity. Once we have k, we can then simply put some gaffers or masking tape around the lens, mark the minimum focus distance and infinity focus points, then divide that distance up, to create k tick marks, eg using Thales Theorem. The tick marks giving you the perfect locations for focus bracketing, using the overlap circle of confusion that you decide to use, ie not the one the manufacturer engraved on the lens:

The downside of the above is that it is only good for one focus length, which is not a problem with a prime, or with a zoom, when you focus bracket at, say, the short end. It is also limited to a single aperture value and one circle of confusion value. Once again not a problem if you are shooting landscapes, eg, say, at f/10 and with a CoC of 15 microns on a full frame camera.

But what about if you have a focus by wire lens, such as the EFM 11-22mm (shown above).

Will our gaffers tape hack work?

The answer is no: as such lenses decouple the focus rotation from the lens movement. That is, the lens senses the focus ring being rotated and then electronically instructs the lens mechanism to move.

The issue is not that there are no hard stops, as you can work around this; the issue is that the lens will move focus in a variable way, according to the focus ring rotation speed. Although some focus by wire lenses allow you to switch the lens into, so-called, linear mode, where the lens behaves more like a helicoid lens, where rotation of the focus barrel is speed invariant in moving focus.

Although I don't like to say, never; in this case, from my experience, I can never guarantee to rotate the lens at the same speed each time, thus you may find that rotating the lens barrel does not move the lens elements in the controlled way it does with a helicoid mechanism lens.

So, the bottom line is: forget manual focus bracketing with a pure focus by wire lens, although a focus by wire lens that can be switched to so-called linear mode, to make focusing rotation speed invariant, could still use the masking tape hack.

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