- Ed Dozier
MTF Mapper Cliffs Notes
This document was created to explain in simpler terms how the mtf_mapper_gui.exe program works. The program has two main purposes, (1) to aid camera focus calibration (2) lens resolution measurement. This program and other programs offered at the link below actually do a lot more, but this is what most photographers are interested in.
The MTF Mapper program author is Frans van den Bergh. His software and printable test charts are available here:
Frans comes across as a scientist-type guy, and his documents can sort of take your breath away. They’re worth a read, though, even if you can’t grok 100% of their contents. More of his writings about image analysis topics can be found here
If you like his stuff as much as I do, please let him know!
MTF Mapper uses a program called “dcraw” (included in download) that knows most “raw” formats, and is regularly updated for new cameras.
The "MTF" refers to Modulation Transfer Function, which refers to how light/dark transitions happen. "MTF50" refers to the highest line frequency (line pairs per millimeter) you can have before 50% of the contrast is lost. Values above about 30 lp/mm are considered pretty good, and anything above 50 lp/mm is outstanding.
To start out, here’s some typical “Profile” output from his program:
Resolution profile plot. Lens MTF50 is about 50 lp/mm
To make a profile plot, there are a couple of things that need to be done first:
Print out a test chart; print it big, mount it flat, use good heavyweight glossy paper. A0 (about 33” X 47”) is great. "Satin" finish papers work well, too. You may need to change the MTF site test chart file formats from ".svg" (scalable vector graphics) into something your program likes better, such as ".pdf". There is freeware that can do this.
Make sure you stick with “raw” mode with your camera, and don’t sharpen the pictures.
Photograph the chart (‘contrast detect’, live view mode is recommended) in diffused light. I find that a "+1.0" exposure compensation works best to keep the white background light.
File | Open… then pick the picture(s) to analyze
Click on “profile” on the right-hand side after the picture analysis finishes. You don’t have to wait for the other pictures to get analyzed.
Resolution chart with ‘slanted squares’ provided by Frans
The resolution chart has little slanted squares that mostly look like spokes branching out from the chart center. The measurement algorithms work best with edges that have a slant around 5 degrees. The “spoke” structure is ideal to get measurements that can be separated into the sagittal and meridional directions, like most MTF plots are.
Unfortunately, the spokes nearest a 45-degree “X” pattern get slightly higher measurements than they should (a few percent higher). For most people, this is a “don’t care”. See below for more information on this, if you’re the “care” type.
“MTF50” is a pretty stringent measurement. Most manufacturers give you MTF10 (contrast measure) and MTF30 (sharpness measure).
Annotated picture up close
The ‘annotated’ picture above shows a zoomed-in view of the measurements for each whole square the program could locate. Good measurements are in green. Marginal measurements are in blue (typically within a degree of 0, 26.565, or 90 degrees). Bad measurements are in yellow. If squares are too small (less than 25 pixels per edge) you get a bad measurement.
You don’t have to photograph the whole chart; it finds and measures only whole squares. The chart doesn’t have to fill the viewfinder, but don’t let the chart squares get too small (less than 25 pixels). You’ll probably want to add more exposure than your camera meter indicates; you want a light background with the black squares.
If the meridional measurement on a square is different from the sagittal measurement, you have astigmatism. You’ll probably notice that the sides of the squares parallel to each other have measurements that nearly match each other.
Don’t get too sloppy here. Bad chart rotation can spoil readings. Diffuse light works better than ‘hard’ light. Use a tripod, remote shutter release or self-timer, and mirror-lockup to avoid vibrations. Bump up ISO if you need to for higher shutter speeds, since higher ISO speeds doesn’t mess up the results nearly as much as blur does.
I equate the direction “sagittal” to “spoke”, like spokes on a wheel. The term “meridional” is sometimes called “tangent”, and it’s perpendicular to the “sagittal” direction.
Note that different resolution camera sensors will give different MTF50 results; this is normal. Remember to set the "pixel size" in the program 'Preferences' to the correct pixel size!
How to convert “cycles per pixel” into other measurements
Assume the camera sensor is 3264 X 4928 pixels, or about 15.7mm X 23.6mm. Assume an edge measures 0.27 cycles per pixel.
MTF50 lp/mm = cycles_per_pixel * height_pixels / height_mm
MTF50 lp/mm = 0.27 * 3264 / 15.7 = 56 lp/mm
Line pairs per picture height = Lp/ph = lp/mm * height_mm
Lp/ph = 56 * 15.7 = 879
Customize the way mtf_mapper_gui works
In Settings | Preferences check the “Line pairs/mm units” if you want these units in the “profile” plot.
Verify your camera’s pixel size (microns) in the same Preferences dialog. The Nikon D7000, for instance, has a pixel size of 4.78 microns. A D7100 camera is 3.92 micron pixel size.
2-D Grid Plot of Entire Resolution Chart (D7000)
Select the “grid2d” to see the resolution measurements throughout the sensor. The pair of plots separate out Meridional and Sagittal readings. This shows that meridional results are better than sagittal results at this f-stop. I like this chart the best of all the available outputs, since it gives a complete picture of the sensor performance, and it separates the readings to get the best understanding of astigmatism (when sagittal/meridional values are different).
There’s a “grid3d” plot if you want it, which is basically taking a 2D plot and viewing it at an angle to get the third dimension.
Weird “X” Pattern
If you ever notice a sort of “X” pattern that fills most of the 2D plot, but only has a difference range of a few percent, it’s an artifact of the square shape of the camera sensor photo sites (its pixels). Frans has an article about this at the download website. Don’t freak out; your lens doesn’t have some kind of cloverleaf inside it. The “green” sagittal cloverleaf readings above are reading slightly better than they really are; the ’52’ scores are probably nearer to ‘50’.
If the chart squares were all locked at a 5-degree tilt, the effect would go away, but then you don’t get to see the sagittal/meridional separation. This is the tradeoff being made. The “Imatest” guys opted for the “only 5-degree squares” and sacrificed providing sagittal/meridional data. Frans says he might someday provide both kinds of charts, so you get to choose which you like better.
Focus Chart provided by Frans showing where to focus
For focus tests, print out the focus chart and mount it flat. Photograph it while it’s slanted 45 degrees from your camera, with the left-edge (above) of the chart farthest away from you. There are a few charts to choose from; choose the chart that best matches your lens focal length so that the picture looks most like a rectangle instead of a trapezoid.
Only use your “phase detect” autofocus setting (not contrast detect live view) to focus the chart, since the point of this test is to test the phase detect system. Use fairly bright light (typically EV10 or better) to make sure your camera doesn’t have to hunt for focus. Use your center focus sensor, and aim it as shown above in red.
Plot of focus chart photo
The above results show a slight focus error. The camera focus fine-tune (or the lens fine-tune if it’s a new Sigma lens) will need a (-) adjustment to pull the focus nearer to the camera. You might find it easier to determine the focus error by looking at the "annotated" picture values instead of relying upon the "profile" image.
Take several shots before you decide how much to change the focus calibration. Each test will probably be a little different.
Photo of Chart. Notice the annotated squares added by mtf_mapper_gui.exe
The focus sensor was trained on the center of the big rectangle (trapezoid, actually) vertical right edge. Chart was mounted at 45 degrees, with the left side of the chart farther from the camera.