NikonGear'23

Gear Talk => What the Nerds Do => Topic started by: Bernard Delley on March 24, 2023, 15:32:51

Title: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 15:32:51
A scientific way to describe imaging system sharpness, or imaging component, like lens, sharpness, is is by the optical transfer function. Usually it is more handy to present only its module, the modulation transfer function (MTF), and this is usually done as a function of the radius off the optical axis in meridional and sagittal direction to describe the spatial frequency response for tangential and radial lines.  Manufacturers provide such plots to set the right expectations for their lenses. Nikon shows, presumably calculated, MTF at 10, 20, and 30 cycles/mm for fully open lens aperture. Zeiss shows MTF, presumably emulated from measurements, at 10, 20 and 40 cycles/mm for open and a stopped down aperture. Other manufacturers often use presentations like Nikon and some more detailed like Zeiss.

I got fascinated by the idea of quantifying sharpness definitively by the contrast loss for fine image detail already as a young student and amateur photographer. Unfortunately, such measurements were way too challenging, and requiring high tech equipment, and thus out of reach.  This changed dramatically with the advent of the open source program mtf_mapper written by Frans van den Bergh starting about a decennia ago for slanted edge spatial frequency response (SFR) analysis of test images.  This started a long research process on my side culminating in a scientific paper together with Frans in 2021 describing all the details, how with this method lens MTF can be extracted with better than about 0.02 % accuracy across the image field.  The content of the publication is freely accessible via this link:
https://www.dora.lib4ri.ch/psi/islandora/object/psi%3A37151
there is also a link to the extensive supplementary material at the original publisher.

Attached below  is an image of my measurement station for normal to ultrawide lenses, with a special "tripod" with camera and a huge chart assembled from 4 DIN B0 size parts.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 15:55:48
For each of the black trapezoids, appearing in the raw image, one can extract a meridional and a sagittal MTF function. This is a mass of information 2 x 864 tabulated functions.
The figure, appearing also as fig 3 in the publication illustrates 3 ways of cutting it.  The points in 3a show all the sagittal MTF at their radial position to the left, while the meridional MTF is drawn to the right. The function values re taken at 10 cycles/mm (red), 30 (green) and 50 (blue).  The points show quite a spread, the lines show the average MTF at these three spatial frequencies as a function of radius from the image center. This averaging abstracts a bit from the individual properties of the lens sample and shows something that is hopefully not too far from the expectations posted by the manufacturer. The cloud of points does not give a good hint to the why of this spread of values. The maps Fig 3b chosen at MTF for 40 cycles/mm show how MTF for this lens sample varies across the image field, this is shown again separatly a map for the sagittal and one for the meridional direction.  This is near optimal focus for my lens sample of the AF-S 300mm f/2.8 lens at f/2.8 measured in the Bayer green channel, using the A0 sized target. This results in an imaging ratio of ~ 1:33  onto the FX sensor.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 16:24:38
My sample of the AF-S 105mm f/1.4  at f/1.4 appears to be close to the expectations. Fig 10 from the supplementary material shows a comparison of my measurement a) at imaging ratio 1:33 in the Bayer green channel at 10 (red) 20 (orange) 30(green) 40 (aqua blue) 50 cycles/mm (deep blue).  Meridional MTF are the full lines, sagittal MTF dashed lines.
b) is drawn from measurements at Lens Rentals. They use an optical bench nicknamed "Olaf" and probably do a single radial sampling at 10 or so points but for 10 samples in their store. The standard collimators in an optical bench are for infinity focus. The spectrum used for the measurement was not mentioned, be it white or weighted white, perhaps like eye sensitivity. I have dropped their 20 and 40 measurement to spare copying work.
c) MTF posted by Nikon, presumably calculated from lens design. It is not specified at what distance this is: portrait ? or just standard infinity. The spectrum is also not mentioned. The computational lens simulations are probably done neglecting diffraction, however this is about negligible for an f/1.4 lens fully open.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 16:45:45
Here is an example where I have assembled the MTF maps through focus and stopped down for my old AIS 20mm f/3.5 lens. The left part is starting at front focus going to back focus to the right. Fully open aperture are the bottom meridional and sagittal maps with maps from the increasingly stopped down lens towards the top. All mapes are at 40 cycle/mm for Bayer green at imaging ratio ~ 1:33. The camera D850 matters only marginally in that its directionally dependent pixel aperture MTF is divided out. Conveniently there is no AA to be corrected out. The directional chart (edge) MTF has also been divided out to obtain the MTF of just the lens sample. This is salvaged from my 2019 thread at dpreview.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 16:52:53
It is clear in the previous graphic that optimal focus for the little AI 20mm f/3.5 lens that wide open optimal focus appears around the bottom center of the figure. Meridional contrast gets low outside a not sol big inner circle. It takes stopping down to f/8 or  f/11 to improve this, and there optimal setting is towards the left of the figure.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 24, 2023, 18:18:49
MTF at 40 cycles/mm for the AF-S 105mm f/1.4, Bayer green, front to back focus and stopped down.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: MEPER on March 24, 2023, 23:46:19
With this you can get an "image" of the focus plane if plane is not flat field?
Many vintage lenses have a bit of field curvature?
As I remember a lens like the Nikkor-H 50/2 if you focus at center then the corners are sharp at a closer distance.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 25, 2023, 09:17:30
indeed, the AF-S 105mm f/1.4 is a nice example of filed curvature. The mild decenterings and higher order aberrations mask things somewhat at f/1.4. stopped down it is quite clear, with the most clear perhaps at f/2.8: maximum micro contrast happens at the center at about 32mm front focus. At about 32mm back focus you find maximum micro contrast far out in the image field. The achievement for this lens design is that meridional and sagittal maps track almost perfectly, thus there is negligible astigmatism ! As the field curvature in object space goes towards the back far out in the image field, it is interesting to realized that the curvature of field at the sensor side is opposite, concave towards the lens. Because of the imaging ratio ~ sqrt(1000) it is that the 32mm in the object side translate to 32 micrometers at the sensor side.

It is also interesting to look again at the comparison of radial MTF traces, which I attached before.  The MTF from Nikon shows quite a dimple at the center. This means that the focus was chosen a bit to the backfocus side to even out MTF radially. MTF stays quite high nevertheless. Also the separation of meridional and sagittal in the Nikon MTF is symptomatic for minor residual astigmatism.

This and other things, like longitudinal color aberration, defocus control in MTF etc,  are discussed in the supplementary material linked in my opening post.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 26, 2023, 14:59:01
One can use such MTF measurements to compare lens choices. Below is an example how a selection of long F lenses compare when all are stopped down to f/5.6 for imaging ratio 1:32 .   The Lens Rentals Olaf style radial plots at 10, 20, 30, 40 and 50 cycles/mm generalise somewhat from the mild decentereing specifics of my lens samples. The plots may help to set the right expectations for the lens types. See how the AF-S 300mm f/2.8 with TC-2.0 at 600mm has slightly less micro-contrast than the zoom lenses at their long end. See also how uniform micro contrast across the image field is provided by the AF 135mm f/2 DC lens at F/5.6 .  Al;so the AF-S 80-400mm f/4.5-5.6 G lens shows impressive micro contrast across the image field at 80 mm.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Jack Dahlgren on March 27, 2023, 16:36:19
I’m a bit surprised by the 135DC. I guess I usually use it cranked way out of where it delivers peak sharpness. I’ll have to give it a try with middle settings
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: John Geerts on March 27, 2023, 20:03:27
One can use such MTF measurements to compare lens choices. Below is an example how a selection of long F lenses compare when all are stopped down to f/5.6 for imaging ratio 1:32 .   The Lens Rentals Olaf style radial plots at 10, 20, 30, 40 and 50 cycles/mm generalise somewhat from the mild decentereing specifics of my lens samples. The plots may help to set the right expectations for the lens types. See how the AF-S 300mm f/2.8 with TC-2.0 at 600mm has slightly less micro-contrast than the zoom lenses at their long end. See also how uniform micro contrast across the image field is provided by the AF 135mm f/2 DC lens at F/5.6 .  Al;so the AF-S 80-400mm f/4.5-5.6 G lens shows impressive micro contrast across the image field at 80 mm.
Thanks for the very interesting information with diagrams, Bernard. 

When shooting your lenses only wide open, I presume this is not the best method as comparison only takes place at f/5.6?
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Erik Lund on March 28, 2023, 10:05:29
I’m a bit surprised by the 135DC. I guess I usually use it cranked way out of where it delivers peak sharpness. I’ll have to give it a try with middle settings

Yes it looks really good, most of the fixed focal length Nikkors are really good/peaking at around f/5.6 so not a huge surprise that this stellar vintage optic is close to the 105mm f/1.4
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 29, 2023, 09:59:12
When shooting your lenses only wide open, I presume this is not the best method as comparison only takes place at f/5.6?

I chose f/5.6, as this is a good setting for sharp images and all lenses in the comparison can take images at f/5.6. It is also true that reasonably well centered lens samples get also reasonably close to axial symmetry by f/5.6 : so radial plots of MTF represent reality closely, and can show how MTF changes with spatial frequency: 10 20 30 40 and 50 cycles/mm meridional and sagittal can be shown in the same plot frame.  At f/5.6 it is a story mainly of sharpness falloff radially out and of astigmatism, how well meridional and sagittal micro contrast comes to match around optimal focus.

The story is different wide open. More complex, higher order aberrations play a big role.
The maps at 40 c/mm shown above for the 300mm f/2.8 at f/2.8 suggest primarily uneven polishing  with a complicated angular behavior around the image circle. 
The maps for the 105mm f/1.4 show a progression from mildly decentered to well centered stopped down. The achievement for this lens is that astigmatism is so well controlled that meridional micro contrast matches maximum sagittal micro contrast closely.  I call this mildly decentered as optimal focus wide open stays all in the green+blue coloring. I would call frame 0318 optimally focused wide open. It is focused 16mm back of where the Z7II happened to put focus for this series of fixed lens takes.
The wide open maps for the AF 135 f/2 DC sample (not shown here) demonstrate impressive centering with some cameras. The decentering must come from the flange with some others. -- A skewness of 25 micro meters of image sensor to flange shows clearly with such MTF maps ! And after seeing the disassembly/reassembly for the shutter, it seems plausible that this may happen -- Another issue with the 135 DC is flare and longitudinal color aberratio, which causes purple (<==-->green) fringe at high contrast wider open. The longitudinal color aberration can be quantified from the full set MTF measurements. The published supplementary material discussed the Tamron 45mm f/1.8 as example.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Jack Dahlgren on March 29, 2023, 15:52:58
Yes, the color aberration on the135dc is strong. Can you post the wide open chart for it?
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: MEPER on March 30, 2023, 22:08:26
There are some talk about decentered lens elements and that it is quite visible shooting wide open in MTF charts.
Are most Nikkors decentered?
Or how can you be sure to get a "perfect" lens?
Probably a dealer will not give you 10 samples to select from?
Maybe some "famous" persons can make special agreements with Nikon to get "hand picked" lenses?

Here I can buy a lens and I can return it if I don't like it within.....I think 14 days if I deliver it back in original box etc.
But I would not be able to detect if a lens is decentered unless it is quite bad wide open. Else I would not know if the performance wide open is "normal" or it cold be better. Then I would need some samples to test and select from.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on March 31, 2023, 10:34:59
Yes, the color aberration on the135dc is strong. Can you post the wide open chart for it?

I am just about to take a plane. But the linked supplementary material has a some on DC 135 wide open , also figs S15 and S16.

There are some talk about decentered lens elements and that it is quite visible shooting wide open in MTF charts.
Are most Nikkors decentered?
Or how can you be sure to get a "perfect" lens?
Probably a dealer will not give you 10 samples to select from?
Maybe some "famous" persons can make special agreements with Nikon to get "hand picked" lenses?

Here I can buy a lens and I can return it if I don't like it within.....I think 14 days if I deliver it back in original box etc.
But I would not be able to detect if a lens is decentered unless it is quite bad wide open. Else I would not know if the performance wide open is "normal" or it cold be better. Then I would need some samples to test and select from.

There is no perfect realization of a designed lens. It is a gradual matter. The map assembly for the 105mm f/1.4 shows an example of a very good lens sample. The full field MTF analysis is awfully sensitive to the slightest departures (say on the order of 100 nm = 0.1 micro meter) from the ideal. There may also be minor striations in the glass, same in principle as with bad sighting conditions in warm, damp air. Usually there are some small departures affecting the axial symmetry, and these are the obviously showing in the maps as not due to limitations of the lens design.

The maps in my article underline this story. In the case of an Irix 15mm f/2.5 (shown in supplementary) after my routine MTF test  for a incoming lens, I returned it at the predefined financial loss of 20%. I found it so bad across the board, that I did not trust that another example might have all the tolerances right. In the case of the Sigma 40mm f/1.4, I had the special opportunity to take 2 extra samples from the distributor for the purpose of the publication. And I was allowed to return whichever two I chose. So I kept the one with the least perturbation of high micro-contrast showing in the image center. After calibration, it became the best reference lens with the smallest deviation from the diffraction limit, see article for detail.

The trouble is, once you have seen a problem in the maps, you look out for it in the images. In the end I have tossed several lenses that were not satisfactory.

If you have the nerve to look at  the maps for your lenses, you might set up such measurements with some perseverance. It is not that difficult to do as you have mtfmapper to start with, and my article going into most of the fine points.  If you have a particularly interesting lens, we might discuss the options, and we could plan a measurement session on your next stop in Zurich.

A more accessible method for stronger decenterings is to take an  images of a printed Siemens star  at shooting distance say 30-50 x FL, in the center and near the 4 corners. If decentering strikes obviously in eyeball inspection you can take consequences. You may judge the lenses in your possession first, to gain experience.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: John Geerts on March 31, 2023, 11:04:44
In the case of an Irix 15mm f/2.5 (shown in supplementary) after my routine MTF test  for a incoming lens, I returned it at the predefined financial loss of 20%. I found it so bad across the board, that I did not trust that another example might have all the tolerances right.
It is a very strange lens-design.  You had to enter manually the infinity point of the specific lens.  I had the feeling this was not a very solid construction.  After a while I also sold the lens.
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: MEPER on March 31, 2023, 21:46:12
There is no perfect realization of a designed lens. It is a gradual matter. The map assembly for the 105mm f/1.4 shows an example of a very good lens sample. The full field MTF analysis is awfully sensitive to the slightest departures (say on the order of 100 nm = 0.1 micro meter) from the ideal. There may also be minor striations in the glass, same in principle as with bad sighting conditions in warm, damp air. Usually there are some small departures affecting the axial symmetry, and these are the obviously showing in the maps as not due to limitations of the lens design.

The maps in my article underline this story. In the case of an Irix 15mm f/2.5 (shown in supplementary) after my routine MTF test  for a incoming lens, I returned it at the predefined financial loss of 20%. I found it so bad across the board, that I did not trust that another example might have all the tolerances right. In the case of the Sigma 40mm f/1.4, I had the special opportunity to take 2 extra samples from the distributor for the purpose of the publication. And I was allowed to return whichever two I chose. So I kept the one with the least perturbation of high micro-contrast showing in the image center. After calibration, it became the best reference lens with the smallest deviation from the diffraction limit, see article for detail.

The trouble is, once you have seen a problem in the maps, you look out for it in the images. In the end I have tossed several lenses that were not satisfactory.

If you have the nerve to look at  the maps for your lenses, you might set up such measurements with some perseverance. It is not that difficult to do as you have mtfmapper to start with, and my article going into most of the fine points.  If you have a particularly interesting lens, we might discuss the options, and we could plan a measurement session on your next stop in Zurich.

A more accessible method for stronger decenterings is to take an  images of a printed Siemens star  at shooting distance say 30-50 x FL, in the center and near the 4 corners. If decentering strikes obviously in eyeball inspection you can take consequences. You may judge the lenses in your possession first, to gain experience.

I have a number of Nikkor-H 50/2 lenses. Could be fun to check them out and see if there are significant differences between them. I was told if I got a good one it could resolve 400 lp/mm. Maybe a bit optimistic?
I used them on a film called "Gigabitfilm" many years ago and was amazed how much detail this film could resolve (and the lens also). In their marketing material they showed an analog x1000 enlargement from a 24x36 negative. I was told that the 24x36 was shot using a hand picked Vivitar Series 1 90/2.5. So a Tokina lens.   
Now I also learned something new.......a Siemens star......I had to look it up :-)
https://en.wikipedia.org/wiki/Siemens_star (https://en.wikipedia.org/wiki/Siemens_star)

Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on April 10, 2023, 17:25:07
A fun application of MTF measurements is in conjunction with AF fine tuning, it allows not only to set the fine tune value, but also to quantify AF consistency.

You set AF-fine-tune values from -20 to +20 in increments of 4 for example and perform auto-focus via optical viewfinder once coming from the a little defocus on the far and once coming from a little defocus from the close side. And you take record to where the focus fell on the ruler. This setup is sensitive enough that you can really know. From the results you learn the optimal AF fine tune setting. For a blur circle less than 20 micrometers at the sensor, you need to hit focus to better than 28 microns at f/1.4 with f/2.8 it would be to better than 2.8*20 = 56 microns.
The defocus can also be inferred from the MTF data from the planar target without eyeballing optimum sharpness on a ruler.
Such measurements can be summarized in a figure like this typical example for an AF-S 105mm lens at f/1.4 on a D850 :
[AF-S 105mm f/1.4 E ED at f/1.4 on D850, blue dot measurements are coming in from a little back focus, red dot measurements are coming in from a little front defocus. The scatter away from the regression lines is due minor focus inconsistencies because of residual mechanical friction and photon+electronic noise. The combo profits from an AF fine tune value of +10. This value is confirmed within +-1 tune units even years later, provided no damage occurred to camera or lens.]

Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on April 29, 2023, 15:00:26
I have a number of Nikkor-H 50/2 lenses. Could be fun to check them out and see if there are significant differences between them. I was told if I got a good one it could resolve 400 lp/mm. Maybe a bit optimistic?
https://en.wikipedia.org/wiki/Siemens_star (https://en.wikipedia.org/wiki/Siemens_star)

Bjørn Rørslett certainly rated this lens very high and mentioned excellent center sharpness. How the result of 400c/mm was obtained and details of procedure and results would be more interesting to me than just impressively high numbers. I think this 50mm f/2 lens was also shown in use on a bellows. perhaps it remains quite sharp for closeup use.  If so you could set up a test to compare your 50mm f/2 lenses: You image a razor blade fixed at an angle in a slide holder and analyze the raw image using the free open source program mtf mapper, which can give you an accurate result for MTF performance in a slanted edge test. I attach such results, posted at dpreview 2years ago for two closeup lenses at imaging ratio 1:1   : AI Micro Nikkor 55mm f/3.5    and AF-S Micro Nikkor60mm f/2.8
Title: Re: Measuring Lens "Sharpness" across the image field: MTF
Post by: Bernard Delley on April 29, 2023, 15:26:21
MEPER's mention of old lenses reminded me of my old pre AI Nikkor 85mm f/1.8 (K) which I bought 1976 or 77 and which was along on my kayak trip on the Euphrates river in 1977.  As a manual lens it hangs on as retired lens in the cabinet. It came up again in digital age for my first attempts at 35mm slide digitalization with a camera, where I needed a slightly longer focal length for use on the bellows. It turned out as a not so good choice for the purpose and went back to the cabinet.  Bjørn Rørslett rated it a 4 in his famous lens ratings. I realized that this non AI-modified lens can now be used on the FTZ adapter without problem and can be put through my MTF test.  It turns out to be a well centered lens with moderate focus shift and moderate field curvature at the imaging ratio of 32:1.  It has quite a bit of astigmatism, and a relatively fast falloff of meridional sharpness, typical for older lenses. The set of through focus (left front - right back) MTF maps also stopped down shown some further interesting features.