mtf tutorial

12
DigitUnderstanding image sharpness part 1: Introduction to resolution and MTF curves by Norman Koren Site map/guide to tutorials Contact | News Making fine prints in your digital darkroom Understanding image sharpness and MTF Image galleries / How to purchase prints Photographic technique Image editing with Picture Window Pro A simplified zone system Canon FS4000US 4000 dpi scanner Epson 2450 flatbed scanner Digital vs. film | Canon EOS-10D Building simple web pages updated February 26, 2007 Help support this site by linking to these merchants or for books & merchandise for all your photographic needs View image galleries Search WWW Search www.normankoren.com Table of contents for the image sharpness series Part 1: Introduction Introduction to modulation transfer function (MTF) Definition | Virtual chart | MTF data and other links Human visual acuity Part 1A: Film and Lenses Part 2: Scanners and sharpening 4000 vs. 8000 dpi scans Part 3: Printers and prints Part 4: Epson 1270 results Part 5: Lens testing Part 6: Depth of field and diffraction Digital cameras vs. film, part 1 | part 2 Part 8: Grain and sharpness: comparisons Image sharpness and detail A photograph's detail is an integral part of its appeal. Many photographers spend a great deal of time, energy and money acquiring equipment to make sharp images. Back in the film era, if 35mm didn't satisfy them, they invested in medium format, 4x 5, 8x10, or larger. (I know Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html 1 of 12 11/3/2010 1:05 PM

Upload: jamali5274

Post on 17-Aug-2015

50 views

Category:

Documents


2 download

DESCRIPTION

Tutorial on how to measure Modulation transfer function

TRANSCRIPT

DigitUnderstanding image sharpness part 1:Introduction to resolution and MTF curvesby Norman KorenSite map/guide to tutorialsContact | NewsMaking fine prints in your digitaldarkroomUnderstanding image sharpness andMTFImage galleries / How to purchaseprintsPhotographic techniqueImage editing with Picture Window ProA simplified zone systemCanon FS4000US 4000 dpiscannerEpson 2450 flatbed scannerDigital vs. film | Canon EOS-10DBuilding simple web pagesupdated February 26, 2007 Help support this site by linking tothese merchantsorfor books & merchandise for all your photographic needsView image galleriesSearch WWWSearch www.normankoren.comTable ofcontentsfor theimagesharpnessseriesPart 1: IntroductionIntroduction to modulation transferfunction (MTF)Definition | Virtual chart | MTF dataand other linksHuman visual acuityPart 1A: Film and LensesPart 2: Scanners and sharpening4000 vs. 8000 dpi scansPart 3: Printers and printsPart 4: Epson 1270 resultsPart 5: Lens testingPart 6: Depth of field anddiffractionDigital cameras vs. film, part 1 |part 2Part 8: Grain and sharpness:comparisonsImage sharpness and detailA photograph's detail is an integralpart of its appeal. Manyphotographers spend a great deal oftime, energy and money acquiringequipment to make sharp images.Back in the film era, if 35mm didn'tsatisfy them, they invested in mediumformat, 4x5, 8x10, or larger. (I knowUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html1 of 12 11/3/2010 1:05 PMtwo who use 8x20 inch cameras.) Thedigital versus film debate is nowmostly settled (2007), but there is stillsome debate over the relationshipbetween the number of megapixelsand image quality. I love sharpnessand detail, but I take my camera gearon long hikes, so I prefer to carrylightweight equipment. I need toknow what it can achieve, how to getthe most out of it and what I'm tradingoff by not going to a larger format,apart from saving my back. That'swhat motivated this study.The sharpness of a photographic imaging system or of a component of the system (lens, film, image sensor,scanner, enlarging lens, etc.) is characterized by a parameter called Modulation Transfer Function(MTF), also known as spatial frequency response. We present a unique visual explanation of MTF and how itrelates to image quality. A sample is shown on the right. The top is a target composed of bands of increasingspatial frequency, representing 2 to 200 line pairs per mm (lp/mm) on the image plane. Below you can see thecumulative effects of the lens, film, lens+film, scanner and sharpening algorithm, based on accurate computermodels derived from published data. If this interests you, read on. It gets a little technical, but I try hard tokeep it readable.This page introduces MTF and relates it to traditional resolution measurements.Part 1A illustrates its effect on film and lenses.Part 2 continues with scanners (image sensors) and sharpening algorithms.Part 3 discusses printers and prints, and how to characterize their sharpness and resolution.Part 4 presents detailed printer test results.Part 5 discusses lens testing using a new downloadable target with continuously varying spatialfrequency.Part 6 discusses depth of field (DOF), emphasizing sharpness at the DOF scale limits.Part 7 compares digital cameras with film, and addresses the question, "How many pixels does it takefor a digital sensor to outperform 35mm film?"Part 8 compares grain and sharpness for three scanners with a well-crafted enlarger print, and we lookat grain aliasing and software solutions.The companion website,Imatest.com, describes asoftware tool you can use tomeasure MTF and otherfactors that contribute toimage quality in digitalcameras and digitized filmimages.Green is for geeks. Do you get excited by a good equation? Were you passionateabout your college math classes? Then you're probably a math geek a member of amaligned and misunderstood but highly elite fellowship. The text in green is for you. Ifyou're normal or mathematically challenged, you may skip these sections. You'll neverknow what you missed.Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html2 of 12 11/3/2010 1:05 PMIntroduction to modulation transfer function (MTF)Back in my youth, lens and film resolving power was measured in lines (or line pairs) per millimeter(lp/mm) easy to understand, but poorly standardized. It was obtained by photographing a chart (typicallythe USAF 1951 lens test chart) and looking for the highest resolution pattern where detail was visible.Because perception and judgment were involved, measurements of the same film or lens were highlyinconsistent. Lines per mm would have been more useful if it were measured at a well established contrastlevel, but that was not so easy; it would have required expensive instrumentation. The problem of specifyingresolution and perceived sharpness was solved with the introduction of the Modulation transfer function(MTF), a precise measurement made in frequency domain. This made optical engineers happy, but confusesmany photographers. The goal of this series is to shed light on the subject (literally as well as figuratively). Iinclude software you can run yourself if you have Matlab, a popular program with engineers and scientists. MTF is the spatial frequency response of an imaging system or a component; it is the contrast ata given spatial frequency relative to low frequencies.Spatial frequency is typically measured in cycles or line pairs per millimeter (lp/mm), which isanalogous to cycles per second(Hertz) in audio systems. Lp/mm is most appropriate for filmcameras, where formats are relatively fixed (i.e., 35mm full frame = 24x36mm), but cycles/pixel(c/p) or line widths per picture height (LW/PH) may be more appropriate for digital cameras, whichhave a wide variety of sensor sizes.High spatial frequencies correspond to fine image detail. The more extended the response, thefiner the detail the sharper the image.Most of us are familiar with the frequency of sound, which is perceived as pitch and measured in cycles persecond, now called Hertz. Audio components amplifiers, loudspeakers, etc. are characterized byfrequency response curves. MTF is also a frequency response, except that it involves spatial frequencycycles (line pairs) per distance (millimeters or inches) instead of time. The mathematics is the same. The plotson these pages have spatial frequencies that increase continuously from left to right. High spatial frequenciescorrespond to fine image detail. The response of photographic components (film, lenses, scanners, etc.) tendsto roll off at high spatial frequencies. These components can be thought of as lowpass filters filters that passlow frequencies and attenuate high frequencies.Line pairs or lines?All MTF charts and most resolution charts display spatial frequency in cycles or line pairs perunit length (mm or inch). But there are exceptions. An old standard for measuring TV resolutionuses line widths instead of pairs, where there are two line widths per pair, over the total heightof the display. When dpreview.com recommends multiplying the chart values in its lens tests by100 to get the total vertical lines in the image, they refer to line widths, not pairs. Confusing, butI try to keep it straight. Imatest SFR displays MTF in cycles (line pairs) per pixel, line widths perpicture height (LW/PH; derived from TV measurements), and line pairs per distance (mm or in).The essential meaning of MTF is rather simple.Suppose you have a pattern consisting of apure tone (a sine wave). At frequencies wherethe MTF of an imaging system or a component(film, lens, etc.) is 100%, the pattern isunattenuated it retains full contrast. At thefrequency where MTF is 50%, the contrastUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html3 of 12 11/3/2010 1:05 PMhalf its original value, and so on. MTF isusually normalized to 100% at very lowfrequencies. But it can go above 100% withinteresting results.Contrast levels from 100% to 2% areillustrated on the right for a variable frequencysine pattern. Contrast is moderately attenuatedfor MTF = 50% and severely attenuated forMTF = 10%. The 2% pattern is visible onlybecause viewing conditions are favorable: it issurrounded by neutral gray, it is noiseless (grainless), and the display contrast for CRTs and most LCDdisplays is relatively high. It could easily become invisible under less favorable conditions.How is MTF related to lines per millimeter resolution? The old resolution measurementdistinguishable lp/mm corresponds roughly to spatial frequencies where MTF is between 5% and 2% (0.05to 0.02). This number varies with the observer, most of whom stretch it as far as they can. An MTF of 9% isimplied in the definition of the Rayleigh diffraction limit.Perceived image sharpness (as distinguished from traditional lp/mm resolution)is closely related to the spatial frequency where MTF is 50% (0.5) wherecontrast has dropped by half.One important detail: MTF is not the same as grain. Grain increases with film speed: MTF is less sensitive tofilm speed. MTF corresponds to the bandwidth of a communications system; grain corresponds to its noise. Graincan be characterized by a frequency spectrum (higher frequencies correspond to finer grain patterns) as wellas amplitude (intensity or contrast). Because there is no simple formula that determines how spectrum,amplitude and print magnification affect our perception of grain, Kodak has devised a subjective measurecalled "Print Grain Index." Later in this series I hypothesize that the Shannon information capacity of animaging system a function of bandwidth and noise correlates with perceived image quality. The MTF curve on the right is for Fuji's highly regardedProvia 100F slide film. It's typical except for one detail: MTFisn't 100% at low spatial frequencies. This is an errorperhaps the work of an overly creative marketing department.The 50% MTF frequency ( f50 ) is about 42 lp/mm. MTF isonly shown as far as 60 lp/mm. The resolution of this film israted as 60 lp/mm for 1.6:1 chart contrast and 140 lp/mm for1000:1 chart contrast. The latter number may be of interest toastronomers, but it has little to do with the perceived imagesharpness of any realistic scenes.The figure below represents a sine pattern (pure frequencies)with spatial frequencies from 2 to 200 cycles (line pairs) permm on a 0.5 mm strip of film. The top half of the sine patternhas uniform contrast. The bottom half illustrates the effects ofProvia 100F on the MTF. Pattern contrast drios ub half at 42cycles/mm.Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html4 of 12 11/3/2010 1:05 PMA more precise definition of MTFbased on sine patterns: MTF is the contrast at a given spatialfrequency ( f ) relative to contrast at low frequencies. These equations are used in the page on Lenstesting to calculate MTF from an image of a chart consisting of sine patterns of various frequencies,where the sine pattern contrast in the original chart is assumed to be constant with frequency. (Thisseries uses charts of continuously varying frequency.) Definitions:. VBThe minimum luminance (or pixel value) for black areas at low spatial frequencies.The frequency should be low enough so that contrast doesn't change if it is reduced.VW The maximum luminance for white areas at low spatial frequencies.VminThe minimum luminance for a pattern near spatial frequencyf(a "valley" or"negative peak").Vmax The maximum luminance for a pattern near spatial frequencyf(a "peak").C(0) = (VW-VB)/(VW+VB) is the low frequency (black-white) contrast.C( f ) = (Vmax-Vmin)/(Vmax+Vmin) is the contrast at spatial frequencyf . Normalizingcontrast in this way dividing by Vmax+Vmin (VW+VB at low spatial frequencies)minimizes errors due to gamma-related nonlinearities in acquiring the pattern.MTF( f ) = 100%*C( f )/C(0).MTF can also be defined as is the magnitude of the Fourier transform of the point or line spreadfunction the response of an imaging system to an infinitesimal point or line of light. This definitionis technically accurate and equivalent to the sine pattern contrast definition, but can't be visualized aseasily unless you're an engineer or physicist. View image galleriesHow to purchase prints...An excellent opportunity to collect high qualityphotographic prints and support this website.Imaging systemsSystems for reproducing information, images, or sound typically consist of a chain of components. ForUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html5 of 12 11/3/2010 1:05 PMexample, audio reproduction systems consist of a microphone, mike preamp, digitizer or cutting stylus, CDplayer or phono cartridge, amplifier, and loudspeaker.Film imaging systems consist of a lens, film, developer, scanner, image editor, and printer (for digital prints) orlens, film, developer, enlarging lens, and paper (for traditional darkroom prints). Digital camera-based imagingsystems consist of a lens, digital image sensor, de-mosaicing program, image editor, and printer. Each of thesecomponents has a characteristic frequency response; MTF is merely its name in photography. The beauty ofworking in frequency domain is that the response of the entire system (or group of components)can be calculated by multiplying the responses of each component.Typical 50% MTF frequencies are in the vicinity of 40 to 80 lp/mm for individual components (lenses, film,scanners) and often as low as 30 lp/mm for entire imaging systems much lower than the 80-160 lines/mmnumbers typical of the old resolution measurements. It takes some getting used to if you grew up with the oldmeasurements.The response of a component or system to a signal in time or space can be calculated by the followingprocedure.Convert the signal into frequency domain using a mathematical operation known as the Fouriertransform, which is fast and easy to perform on modern computers using the FFT ( Fast FourierTransform) algorithm. The result of the transform is called the frequency components or FFT of thesignal. Images differ from time functions like sound in that they are two dimensional. Film has the sameMTF in any direction, but not lenses.1.Multiply the frequency components of the signal by the frequency response (or MTF) of the componentor system.2.Inverse transform the signal back into time or spatial domain. 3.Doing this in time or spatial domain requires a cumbersome mathematical operation called convolution. If youtry it, you'll know how the word "convoluted" originated. And you'll know for sure why frequency domain iswidely appreciated.Resolution of an imaging system (old definition) Using the assumption that resolution is a frequency where MTF is 10% or less, the resolution r of a system consisting of ncomponents, each of which has an MTF curve similar to those shown below, can beapproximated by the equation, 1/r = 1/r1 + 1/r2 + ... + 1/rn (equivalently, r = 1/(1/r1 + 1/r2 + ...+ 1/rn )). This equation is adequate as a first order estimate, but not as accurate as multiplyingMTF's. [I verified it with a bit of mathematics, assuming a second order MTF rolloff typical ofthe curves below. It's not sensitive to the MTF percentage that defines r. The approximation,1/r2 = 1/r12 + 1/r22 + ..., is not accurate.]A virtual chart for visualizing MTFUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html6 of 12 11/3/2010 1:05 PMTo visualize the effects ofMTF, we have created avirtual target 0.5 mm inlength, shown greatly enlargedon the right. The targetconsists of a sine pattern and abar pattern, both of whichstart at a low spatialfrequency, 2 line pairs permillimeter (lp/mm) on the left,and increase logarithmically to200 lp/mm on the right.The mathematicsfor generating thisfunction is rathertricky. It isdiscussed at theend of part 2.The red curve below theimage represents the tonaldensities (0 and 1) of the barpattern. The vertical scale100 through 102is for theMTF curves to come, not forthe tonal density plot.Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html7 of 12 11/3/2010 1:05 PM The plot on the left illustratesthe response of the virtualtarget to the combined effectsof an excellent lens (asimulation of the highly-regarded Canon 28-70mmf/2.8L) and film (a simulationof Velvia). Both the sine andbar patterns (original andresponse) are shown. You'llfind these plots throughoutthis series as we simulatelenses, film, scanners,sharpening, and finally,digital cameras.The red curve is the spatialresponse of the bar pattern tothe film + lens. The bluecurve is the combined MTF,i.e., the spatial frequencyresponse of the film + lens,expressed in percentage oflow frequency response,indicated on the scale on theleft. (It goes over 100%(102).) The thin blue dashedcurve is the MTF of the lensonly.The edges in the bar patternhave been broadened, andthere are small peaks oneither side of the edges. Theshape of the edge is inverselyrelated to the MTF response:the more extended the MTFresponse, the sharper (ornarrower) the edge. Themid-frequency boost of theMTF response is related tothe small peaks on either sideof the edges.The leftmost edge in the plot is a portion of the step response of the system (film + lens). A muchlower spatial frequency is required to represent it properly. The impulse response the responseof the system to a narrow line (or impulse) is also of interest. The impulse response is thederivative of the step response (d(step response)/dx).The MTF curve is related to the impulse response by a mathematical operation known as theUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html8 of 12 11/3/2010 1:05 PMFourier transform ( F ), which is well-known to engineers and physicists.MTF response = F(impulse response)impulse response = F-1(MTF response)F-1 is the inverse Fourier transform. We'll spare the gentle reader from further equations thetopic is quite understandable without them.The image above represents only 0.5 mm of film, but takes up around 5 inches (13 cm) on my monitor. At thismagnification (260x), a full frame 35mm image (24x36mm) would be 240 inches (6.2 meters) high and 360inches (9.2 meters) wide. A bit excessive, but if you stand back from the screen you'll get an feeling for theeffects of the lens, film, scanner (or digital camera), and sharpening on real images.The companion website,Imatest.com, describes asoftware tool you can use tomeasure MTF and otherfactors that contribute toimage quality in digitalcameras and digitized filmimages.Links to general articles on MTFUnderstanding MTF: The Modulation Transfer Function Explained by Michael Reichmann of Luminous-landscape.com.Excellent introduction.What is an MTF ...and Why Should You Care? by Don Williams of Eastman Kodak.How to interpret MTF graphsby Klaus Schroiff. Another useful explanation.Photodo has several excellent articles on MTF and image quality. Recommended.MTF Engineering Notesfrom Sine Patterns LLC, a purveyor of lens test charts. Lots of equations.Image Processing page from efg (Earl F. Glynn)Serious links to (mostly) serious academic literature.Fascinating for geeks. Click here if the link doesn't work.R. N. Clark's scanner detail page is required reading for anyone interested in image sharpness. It presentsmuch of the material covered here from a different viewpoint: real images.An Evaluation of the Current State of Digital Photography by Charles Dickinson. RIT bachelor's thesis, 1999.Uses MTF analysis.Introduction to Electronic Imaging SystemsClass notes from ECE 102, Center for Electronic ImagingSystems, University of Rochester. Taught by Dr. Michael Kriss. Connected with the U of R Image ProcessingLab.RIT Center for Imaging Science class material is a serious resource well worth exploring. Basic Principlesof Imaging Science 1. Lectures 17 and 18 on MTF and imaging microstructure are particularly interresting.Help support this site. Link to Adoramafor your photographic purchases.Human visual acuityThe ability of the eye to resolve detail is known as "visual acuity." The normal human eye can distinguishpatterns of alternating black and white lines with a feature size as small as one minute of an arc (1/60 degreeUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html9 of 12 11/3/2010 1:05 PMor /(60*180) = 0.000291 radians). That, incidentally, is the definition of 20-20 vision. A few exceptionaleyes may be able to distinguish features half this size. But for most of us, a pattern of higher spatial frequencywill appear nearly pure gray. Low contrast patterns at the maximum spatial frequency will also appear gray.At a distance d from the eye(which has a nominal focallength of 16.5 mm), thiscorresponds to objects oflength = (angle in radians)*d= 0.000291*d. For example,for an object viewed at adistance of 25 cm (about 10inches), the distance youmight use for close scrutinyof an 8x10 inch photographicprint, this would correspondto 0.0727 mm = 0.0029inches. Since a line paircorresponds to two lines ofthis size, the correspondingspatial frequency is 6.88lp/mm or 175 lp/inch.Assume now that the imagewas printed from a 35mmframe enlarged 8x. Thecorresponding spatial frequency on the film would be 55 lp/mm.This means that for an 8x10 inch print, the MTF of a 35mm camera (lens + film, etc.) above 55 lp/mm, or theMTF of a digital camera above 2800 LW/PH (Line Widths per Picture Height) measured by Imatest SFR, hasno effect on the appearance of the print. That's why the highest spatial frequencies used in manufacturer'sMTF charts is typically 40 lp/mm, which provides an excellent indication of a lens's perceived sharpness in an8x10 inch print enlarged 8x. Of course higher spatial frequencies are of interest for larger prints.Standard Depth of Field (DOF) scales on lenses are based on the assumption, made in the 1930s, that thesmallest feature of importance, viewed at 25 cm, is 0.01 inches 3 times larger. It shouldn't be a surprise thatfocus isn't terribly sharp at the DOF limits. See the DOF page for more details.The statement that the eye cannot distinguish features smaller than one minute of an arc is, of course,oversimplified. The eye has an MTF response, just like any other optical component. It is illustrated on theright from the Handout #9: Human Visual Perception from Stanford University course EE368B - Image andVideo Compression by Professor Bernd Girod. The horizontal axis is angular frequency in cycles per degree(CPD). MTF is shown for pupil sizes from 2 mm (bright lighting; f/8), to 5.8 mm (dim lighting; f/2.8). At 30CPD, corresponding to a one minute of an arc feature size, MTF drops from 0.4 for the 2 mm pupil to 0.16 forthe 5.8 mm pupil. (Now you know your eye's f-stop range. It's similar to compact digital cameras.) AnotherStanford page has Matlab computer models of the eye's MTF.Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html10 of 12 11/3/2010 1:05 PMThe human eye's MTF, which is limited athigh angular frequencies by the eye'soptical system and cone density, does nottell the whole story of the eye's response.Neuronal interactions such as lateralinhibition limit the eye's response at lowangular frequencies, i.e., the eye isinsensitive to very gradual changes indensity. The eye's overall response is calledits contrast sensitivity function (CSF).Various studies place the peak CSF forbright light levels (typical of print viewingconditions) between 6 and 8 cycles perdegree. The graph on the left uses anapproximation (equations below) thatpeaks just below 8 cycles/degree.CSF is used in a measure of perceptualimage sharpness called Subjective QualityFactor (SQF), which includes MTF, CSF,print size, and typical viewing distance.SQF has been used since the 1970s insideKodak and Polaroid, but it was difficult tocalculate, and hence remained obscure,until it was incorporated into Imatest SFRin 2006.The following formula for CSF is relatively simple, recent, and fits the data well. The source is J. L. Mannos, D. J.Sakrison, ``The Effects of a Visual Fidelity Criterion on the Encoding of Images'', IEEE Transactions onInformation Theory, pp. 525-535, Vol. 20, No 4, (1974), cited on this page of Kresimir Matkovic's 1998 PhDthesis.CSF( f ) = 2.6 (0.0192 + 0.114 f ) exp(-0.114 f )1.1The 2.6 multiplier can be removed and the equation can be simplified somewhat. The dc term (0.0192) can bedropped with very little effect.CSF( f ) = (0.0192 + 0.114 f ) exp(-0.1254 f )Additional explanations of human visual acuity can be found on pages from the Nondestructive testingresource center and Stanford University. Page 3 from Stanford has a plot of the MTF of the human eye. Ibelieve the x-axis units (CPD) are Cycles per Degree, where a pair of 1/60 degree features corresponds to 30CPD.Next: Part 1A: MTF in film and lenses | Part 2: Scanners and sharpeningUnderstanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html11 of 12 11/3/2010 1:05 PMImages and text copyright 2000-2010 by Norman Koren.Norman Koren lives in Boulder, Colorado, founded Imatest LLC in 2004,previously worked on magnetic recording technology. He has been involved withphotography since 1964.Understanding resolution and MTF http://www.normankoren.com/Tutorials/MTF.html12 of 12 11/3/2010 1:05 PM