## Abstract

We present a method for measuring the optical transfer function (OTF) of a camera lens using a tartan test pattern containing sinusoidal functions with multiple frequencies and orientations. The method is designed to optimize measurement accuracy for an adjustable set of sparse spatial frequencies and be reliable and fast in a wide range of measurement conditions. We describe the pattern design and the algorithm for estimating the OTF accurately from a captured image. Simulations show the tartan method is significantly more accurate than the International Organization for Standardization 12233 standard slanted-edge method. Experimental results from the tartan method were reproducible to 0.01 root mean square and in reasonable agreement with the slanted-edge method.

© 2011 Optical Society of America

## 1. Introduction

An important property of high-quality lenses is the ability to produce images with high resolution and strong contrast. The standard objective measurement of the resolution and contrast of a lens is the optical transfer function (OTF). The OTF is defined as the complex ratio between the image contrast and the object contrast for a series of sinusoidal waves with increasing frequency. The modulus of the OTF, which is called the modulation transfer function (MTF), is used more often than the full complex OTF. The MTF is considered a powerful tool for understanding camera lens performance, because it acts as a well-studied bridge between theoretical lens modeling, objective lens measurement, and human perception.

The OTF has found many applications in lens design, prototyping, and production testing. The OTF is very sensitive to the fine details of lens construction, so it is a useful tool for establishing that a lens has been built within tolerance [1, 2]. The OTF is also useful for image restoration and computational photography [3, 4]. However, the OTF is a function of many variables of the imaging geometry, including image position $(x,y)$, image focus *z*, transverse magnification ${M}_{T}$, spatial frequency $(u,v)$, lens focal length ${f}_{L}$, relative lens aperture ${A}_{V}$, and illumination wavelength *λ* (Fig. 1). In this nine-dimensional (9D) parameter space, the OTF varies smoothly but with complicated behavior, so efficient sampling of the OTF is a crucial issue.

One approach to sampling the OTF is to use the lens under test to image a high-contrast test object. The OTF can then be probed by precise mechanical scanning through the object or image space [5]. However, the test objects that are typically used, such as an illuminated pinhole or a slit, have relatively low signal strength at high spatial frequencies and poor overall optical efficiency. This inherently fragile design can only be made accurate with high illumination power and careful control of stray light. In addition, camera lenses are typically used at high magnifications, which simultaneously places tight constraints on instrument positioning at fine scales of the order of micrometers in the image space, and large scales on the order of meters in the object space (Fig. 1).

Digital sensors enable the second main method of OTF measurement. In this approach, a large test chart is imaged through the lens onto a digital sensor, and the captured image is compared with the ideal test chart image. The problems of positioning are reduced considerably by accurate chart fabrication and the precise layout of pixels across a digital sensor. However, the test patterns typically used for digital OTF measurement continue to have low signal strength at high spatial frequencies, which can be a significant source of noise in measurement results. For example, the International Organization for Standardization (ISO) 12233 spatial frequency response (SFR) method [6, 7] uses a slanted-edge test object (Fig. 2) for which the signal strength is inversely proportional to the spatial frequency.

The low efficiency of these test patterns imposes important constraints on the OTF measurement method. Restrictions may include inflexibility in the sampling of image space positions and spatial frequency orientations. The entire image needs to be well exposed to minimize the effect of sensor noise on the OTF measurement. For color OTF measurement, a convenient method is using a sensor Bayer pattern to filter the results into three color channels. However, this reduces the signal-to-noise ratio (SNR) by up to 50% compared to a monochrome measurement over the same image region. In many important situations the MTF value may be inherently low, for example when measuring lenses with significant aberrations, measuring the OTF in the image corners, or measuring the OTF as a function of defocus.

To improve the accuracy of OTF measurement using a digital camera, we propose a new test pattern that optimizes the signal strength in the spatial frequency domain. The pattern is the sum of multiple sinusoids at different frequencies and orientations. We call this the tartan pattern (Fig. 3). Although sinusoidal patterns have been used since the beginning of OTF measurement [8], including sums of sinusoids [9], we believe our tartan design is novel due to the combination of multiple orientations.

Two key problems in comparing the input test pattern with the captured output are alignment and compensation for the Fourier side lobes caused by the measurement window function. The multiple orientations in the tartan pattern allow accurate alignment, which in turn allows accurate measurement using a novel method we call side-lobe reduction [10].

In this article we introduce the tartan pattern design and the side-lobe reduction algorithm for precise OTF measurement from captured images of a tartan pattern. We use simulations and experiments to compare the accuracy of the tartan method with the ISO standard slanted-edge method. We conclude with an analysis of the trade-offs involved in selecting a particular MTF measurement technique.

## 2. Slanted-Edge Method

The test pattern for the slanted-edge method is a simple one-dimensional (1D) step function:

*ψ*with respect to the horizontal

*x*axis,

The slanted edge is often imaged at a slight angle, such as $\psi =5\xb0$, to improve the superresolution of the detection algorithm. In this paper we will focus on the image corners where the SNR of a test pattern is most critical. For the image corners of a digital single-lens reflex (DSLR) camera with a sensor aspect ratio of $3:2$, the meridional and sagittal angles are

Because imaging noise is typically white noise, evenly distributed over the spatial frequency spectrum, the signal level of a test pattern as a function of spatial frequency is a useful indicator of the SNR for OTF measurement. The Fourier transform of a 1D edge is

*ψ*. This shows that the signal strength of an edge is inversely proportional to the spatial frequency, as shown in Fig. 4a. While a binary edge is simple to fabricate, it has the disadvantage that it is impossible to adjust the signal strength in the spatial frequency domain. As the MTF drops at high frequencies, this exacerbates measurement problems at high frequencies.

## 3. Tartan Pattern Design

Most existing OTF measurement tools tend to cover a continuous range of spatial frequencies. This is the case for spatially discontinuous targets such as pinholes, slits, and edges. The benefit of continuous spatial frequency coverage is obtained through the joint sacrifices of sparse coverage of image positions and low SNR at high spatial frequencies.

Some OTF measurement tools use sine waves at discrete spatial frequencies. A sinusoidal wave in the image plane can be used to measure the OTF at a single spatial frequency. Because imaging noise is typically distributed throughout the spatial frequency domain while the entire input signal is concentrated at a single OTF coordinate, this single spatial frequency measurement achieves a high SNR. If multiple sinusoidal waves are used, then the SNR remains high compared with a spatially discontinuous target, and multiple spatial frequency measurements can be made at each image position. In practice, the OTF tends to vary slowly with spatial frequency, with extrema in the sagittal and meridional orientations. This suggests that a useful strategy is to sample a discrete set of spatial frequencies at two orientations. This is the strategy we followed in designing the tartan pattern (Fig. 3) [11].

The reflectivity of a general continuous tartan pattern ${t}_{C}$ can be described in the spatial domain using a sum of *M* cosines:

The two-dimensional (2D) Fourier transform of $t(x,y)$ is

An overview of tartan design is shown in Fig. 3. We start the design of an ideal tartan pattern ${t}_{C}$ by choosing an image region in the top-right image quadrant and selecting six meridional cosines and six sagittal cosines for measurement. The tartan is designed for a sensor pixel size of $5\text{\hspace{0.17em}}\mathrm{\mu m}$, giving a Nyquist frequency of 120 line pairs per millimeter (lppmm) in the meridional and sagittal orientations. The spatial frequencies are at 10, 30, 50, 70, 90, and $110\text{\hspace{0.17em}}\mathrm{lppmm}$ along each orientation axis. The positions $(u,v)$ for each peak are calculated by rotating frequencies in a meridional/sagittal coordinate system $({u}^{\prime},{v}^{\prime})$ using the relation $(u,v)=({u}^{\prime}\mathrm{cos}{\psi}_{M}+{v}^{\prime}\mathrm{sin}{\psi}_{M},{u}^{\prime}\mathrm{sin}{\psi}_{M}-{v}^{\prime}\mathrm{cos}{\psi}_{M})$.

This creates a tartan pattern that has 25 peaks in the Fourier domain, including a peak at the $(0,0)$ spatial frequency, which we call the direct current (DC) peak. The 24 non-DC peaks appear in pairs with Hermitian symmetry because the tartan pattern has only real values in the spatial domain. Disregarding the DC peak and the Hermitian peaks, we describe this tartan design as having 12 peaks, because it can be used to measure the OTF at 12 spatial frequencies.

The signal strength of the tartan design ${t}_{C}$ along the meridional axis in the spatial frequency domain is compared to the slanted-edge signal strength in Fig. 4a. The signal strength *G* for the slanted edge was calculated using Eq. (4). The signal strength ${T}_{C}$ for the tartan pattern was calculated using Eqs. (5, 6). In Fig. 4b the ratio ${T}_{C}/G$ of signal strength between the tartan and edge designs is plotted at the tartan cosine spatial frequencies. The tartan signal is significantly higher than the slanted-edge signal, with the amplitude ratio starting from 1.3 at $10\text{\hspace{0.17em}}\mathrm{lppmm}$ and climbing as high as 14.4 at $110\text{\hspace{0.17em}}\mathrm{lppmm}$. In addition, this tartan design is sampling both meridional and sagittal orientations, while the slanted edge is only sampling the meridional orientation. However, the slanted edge is sampling a continuous range of spatial frequencies, while the tartan design is only sampling 12 spatial frequencies.

The SNR of the tartan pattern can be further increased in several ways: by reducing the number of cosines *M*, by increasing the cosine weights ${W}_{j}$ for high-frequency peaks to compensate for low MTF values in the lens, or by randomizing the cosine phases ${\phi}_{j}^{(T)}$. The phase randomization method for increasing the SNR was first described by Edgar and Bopardikar [12].

When the ideal tartan design ${t}_{C}$ is rendered to a grayscale image for printing, the pattern will vary continuously across the entire chart. This means that global alignment is required between the image region being analyzed and the ideal test chart to precisely compare the output image region with the input image. To replace this global alignment with a simpler local alignment, we can force the tartan pattern to be tiled. This can be achieved for a specific tile size in sensor pixels by rounding the spatial frequencies to values with an integer number of cycles across the vertical and horizontal tile size.

For example, with a sensor pixel size of $5\text{\hspace{0.17em}}\mathrm{\mu m}$ and a tile size of $100\times 100$ in sensor pixels, the meridional spatial frequency (${u}^{\prime}=10\text{\hspace{0.17em}}\mathrm{lppmm}$, ${v}^{\prime}=0\text{\hspace{0.17em}}\mathrm{lppmm}$, $\psi ={\psi}_{M}$) has pixel axis coordinates of ($u=4.16$, $v=2.77$) in the discrete Fourier transform of a $100\times 100$ pixel tartan window. To create a tiled tartan pattern, the spatial frequency of this peak would be rounded to ($u=4$, $v=3$). The same rounding operation should be applied to all 12 peaks to create a tiled tartan pattern ${t}_{T}$, as shown in Fig. 3. This quantization creates a slight change in the spatial frequency and orientation being measured. However, the effect is deterministic, and it is largest for low spatial frequencies where the OTF has the slowest variation with spatial frequency, so there is no significant impact on OTF measurement accuracy.

The tartan tile ${t}_{T}$ needs to be scaled for printing. For example, the tile should be scaled 30 times for testing a camera lens at magnification ${M}_{T}=1/30$. The scaling should be performed in Fourier space after rounding to maintain the tiling in sensor pixels. The pattern can then be inverse Fourier transformed, tiled over a test chart, and printed. The pattern must be printed with a gamma of 1.0 to maintain the linearity of the cosines sent to the printer. With careful tracking of scaled coordinates, the same printed chart can be used for lens OTF measurements at multiple magnifications and with cameras with different pixel sizes.

When fabricating a test chart with the tartan pattern, it is important to confirm that the printing method is able to accurately reproduce the spatial frequency sampling of the tartan pattern. Also, some fabrication methods, particularly inexpensive ones such as inkjet printing, may result in significant reductions in the cosine amplitudes of the tartan pattern. For this reason, calibration of the printed test chart is necessary to maintain lens MTF measurement accuracy. If a small region of the chart is imaged with a macro lens operating at $1\times $ magnification, then the tartan frequencies are scaled down by 30 times relative to an image of the test chart taken with a standard camera lens. Even the maximum frequency of $110\text{\hspace{0.17em}}\mathrm{lppmm}$ in the tartan design ${t}_{T}$ scales down to $3.7\text{\hspace{0.17em}}\mathrm{lppmm}$, for which the OTF of a high- quality macro lens is effectively 1.0. This means that printer OTF measurements made with such a macro lens using our algorithm can be used as a chart calibration.

## 4. OTF Measurement Using the Tartan Pattern

The spatial frequency spectrum of the tartan pattern ${t}_{T}$ after being imaged through a lens is

where*c*is the image gain and $H(u,v)$ is the lens OTF we wish to measure. We define the tartan DC as ${T}_{0}=2\sum _{j=1}^{M}{T}_{j}$ and the values of the lens OTF at each tartan peak as $H({u}_{j},{v}_{j})={H}_{j}\mathrm{exp}(i{\phi}_{j}^{(H)})$, and note that $H(0,0)=1$ by the definition of the OTF. Applying these definitions to Eqs. (6, 7) allows us to write

*F*at each peak location with $F({u}_{j},{v}_{j})={F}_{j}\mathrm{exp}(i{\phi}_{j}^{(F)})$ and ${F}_{0}=F(0,0)$, then we can solve for the OTF modulus and phase values at each peak:

*c*.

While Eq. (9) provides a straightforward recipe for OTF measurement in the continuous imaging case, in practice the image is captured by discrete sampling with a digital sensor, and we wish to measure the OTF over a small region of the image. If the phys ical alignment is not perfect between the tartan pattern in the test chart and the tartan pattern on the image sensor, then the peaks in the captured tartan spectrum *P* will lie at subsample positions in the Fourier transform of the captured sensor image. In addition, the window function used to extract an image region will affect the shape of the tartan peaks in the Fourier transform of the captured sensor image.

A window operation in the spatial domain corresponds to a convolution with the Fourier transform of the window function in the spatial frequency domain. A simple 1D window function is a square function,

*a*is the width of the window. The Fourier transform of a square window is a sinc function, The sinc function is oscillatory with a central peak surrounded by significant side lobes.

To understand how this affects our OTF measurement method, we study the convolution of a 2D sinc function with the peaks in the imaged tartan spectrum *F*. For perfect alignment, samples in the discrete Fourier transform (DFT) coincide exactly with the zeros of the sinc function, which means that each peak appears as a single pixel with the value ${F}_{j}$ surrounded by zeros. But in practical situations, the alignment of a captured image *p* is not perfect, so the peak positions in its Fourier transform *P* no longer coincide with the samples of the DFT. As a result, the sinc function will not be sampled at its zeros, producing DFT samples with rapid oscillations in the neighborhood of each peak as shown in Fig. 5. To avoid significant errors in the OTF measurement, the tartan measurement method needs to be refined to account for the interference effects of the sinc function side lobes.

## 5. Side-Lobe Reduction

We have developed an algorithm called side-lobe reduction for accurate measurement of the peak heights in the Fourier transform of a windowed tartan pattern [10]. The algorithm is a 2D extension of a 1D spectral peak measurement method by Levin [13]. Our 2D algorithm has the following outline:

- Capture an image of a tartan pattern using the lens under test, extract a small image region
*p*using a square window, and Fourier transform to obtain a captured tartan spectrum*P*. - Detect an affine alignment transform between the ideal tiled tartan spectrum ${T}_{T}$ and the measured tartan spectrum
*P*, neglecting translation, - Calculate the aligned subpixel peak positions $({u}_{Aj},{v}_{Aj})$ within the measured tartan spectrum
*P*using the affine transform, - Estimate the amplitude and phase of
*P*at each peak position $({u}_{Aj},{v}_{Aj})$ by interpolation. - Solve for the interaction of the sinc functions associated with each peak to estimate the imaged tartan peak heights ${F}_{j}$ and phases ${\phi}_{j}^{(F)}$.
- Estimate the OTF using Eq. (9).

*P*. The subpixel peak positions are then matched with the ideal tartan peak positions to find an affine transform. Because the interaction of multiple sinc convolutions will perturb the apparent peak positions, it is important to use a combination of peaks to fit the affine transform. This significantly increases the accuracy of the alignment. To achieve a stable affine fit, it is important that there is significant 2D diversity of peak positions [14]. Satisfying this diversity criterion is an important advantage of using a tartan pattern with multiple orientations.

Globally, the test chart alignment is changed by the position and orientation of the camera relative to the test chart, together with lens barrel distortion. However, for a small image region, an affine transform is an acceptable local approximation to the global alignment. Because of the Fourier shift theorem, in the Fourier domain this affine transform has no translation factor. Instead, the tartan peak phases are modified by the addition of a phase ramp.

We then calculate the aligned subpixel positions $({u}_{Aj},{v}_{Aj})$ of the tartan peaks in *P* in step 3 by applying the fitted affine transform to the ideal peak positions in ${T}_{T}$. Using high-quality interpolation in step 4 provides an estimate of the amplitude and phase of these subpixel positions in *P*.

Step 5 relies on an accurate model of the effect of a square window in the spatial domain on the tartan pattern in the Fourier domain. To construct this model, we convolve a 2D version of the sinc function in Eq. (11) with the measured tartan spectrum from Eq. (8), giving

*P*. The side-lobe interactions between each aligned peak $({u}_{Hj},{v}_{Hj})$ and all other aligned peaks $({u}_{Hk},{v}_{Hk})$ are calculated using Equation (13) can be solved for

*K*values of ${B}_{k}$, and these values can be used to solve for the lens OTF

*H*at

*K*discrete positions $({u}_{Hk},{v}_{Hk})$ using Eq. (9) in step 6. Only $M+1$ discrete samples of the OTF are unique, as the others are Hermitian copies.

The matrix **W** has small off-diagonal values for well-separated peaks. This means that the solution is likely to be stable and is therefore straightforward. The computation time of steps 1 to 6 of the side-lobe reduction algorithm is about $100\text{\hspace{0.17em}}\mathrm{ms}$ for a $100\times 100$ image region *p*, using a C code implementation running on a $2.5\text{\hspace{0.17em}}\mathrm{GHz}$ Intel Core 2 Duo processor.

We have compared the results with a Levenberg–Marquardt least-squares fit of $p(x,y)$ in the spatial domain. The results and computation time were broadly similar; however, our Levenberg–Marquardt results were not robust to alignment and noise, which we believe was due to the complexity of joint estimation of cosine frequency and amplitude.

An alternative to a square window function is a Gaussian window. This would broaden the peaks in the spatial frequency domain while attenuating the side lobes. Although we have not tried this method, we believe that broader spectral peaks would complicate peak interpolation and amplitude estimation.

## 6. Simulation Method

We evaluated the accuracy of lens measurement with the tartan method using a simulation. The previously described tiled tartan pattern ${t}_{T}$ designed for the top-right image quadrant was used.

We also simulated the slanted-edge method for comparison. The slanted edge had a meridional orientation. The simulation included alignment perturbations, a simulated lens OTF, and multiplicative Gaussian imaging noise. For both our tartan implementation and the slanted-edge implementation that we used, the phase of the OTF was not measured. The following comparison is therefore restricted to the MTF.

The alignment perturbations were chosen from uniform random distributions with the following ranges: $\pm 1\xb0$ rotation of the image around the optical axis, $\pm 2.5\%$ scale, and $\pm 5\%$ translation relative to the image size. These alignment perturbations were applied to the tartan peak positions and phases to avoid image transformation artifacts.

A finite contrast ratio was applied to each pattern: 10 for the slanted edge [15] and 100 for the tartan pattern. The slanted edge was generated with 8 times oversampling using an edge equation, perturbed by the random alignment, to switch pixels on and off. The edge was reflected fourfold in *x* and *y* to reduce Fourier boundary artifacts. We then Fourier transformed both patterns and applied the simulated lens OTF. The edge pattern was scaled down by 16 times by cropping the image in Fourier space after applying the lens OTF.

The images were then inverse Fourier transformed, noise was applied by multiplying the image by a pseudorandom noise image where the noise had a Gaussian distribution with a mean of $1.0+\epsilon $ and a standard deviation of *ε*, where *ε* was either 0.01 or 0.05, and finally each image was windowed using a square function to $100\times 100$ pixels. The windowed images were used as simulated captured image regions for input into the measurement algorithms.

The slanted-edge measurements were performed using the SFR module of Imatest Master 3.6 [16]. This module implements the ISO 12233 SFR standard. The SFR is an estimate of the MTF. The Imatest algorithm includes enhancements to increase the edge alignment accuracy, including fitting a curved edge to images distorted by lens barrel distortion.

For the simulated lens OTF, we chose a geometrical optics approximation to the defocus OTF by Stokseth [17]. In this model, the normalized focus parameter is

*z*is the physical defocus distance, ${A}_{V}$ is the relative aperture,

*n*is the refractive index of the vol ume between the lens and the image plane, and ${f}_{L}$ is the focal length of the lens. The radially symmetric lens OTF is then where $q=({u}^{2}+{v}^{2}{)}^{1/2}$ is the radial spatial frequency in cycles per length and ${J}_{1}$ is the first-order Bessel function of the first kind. A real camera lens at open aperture will generally have additional aberrations and a lower MTF. However, for medium focus distances and lenses with strong field curvature, defocus is the dominant aberration, so it is useful to explore the accuracy of a lens MTF measurement system for this type of OTF.

For the simulation we used the following param eters: ${A}_{V}=1.4$, $n=1$, ${f}_{L}=50\text{\hspace{0.17em}}\mathrm{mm}$, and a pixel width of $5\text{\hspace{0.17em}}\mathrm{\mu m}$. Because this is a geometrical optics approximation, it does not depend on the illumination wavelength. A significant feature of Eq. (22) is that the function has multiple zero crossings, as shown in Fig. 6. These zero crossings appear as bounces in the MTF.

## 7. Simulation Results

We tested the MTF measurement performance of the slanted-edge and tartan patterns at defocus distances *z* of 5, 15, 25, 35, and $45\text{\hspace{0.17em}}\mathrm{\mu m}$. This large defocus range was used to test the accuracy for measurement of the defocus MTF. The simulated imaging noise standard deviation levels were 1% and 5%. A well-exposed image on a DSLR will have a noise of about 1%; however, if a measurement method remains accurate with 5% noise, then it provides significant tolerance to vignetting and variations in lighting conditions.

For each defocus position and noise level, we repeated the simulation for 100 cases, with different random seeds in each case for the alignment perturbation and noise. We discarded the $z=5\text{\hspace{0.17em}}\mathrm{\mu m}$ defocus cases due to a major artifact in the Imatest results that we do not understand. We also discarded 10% of the random seeds due to “zero bin” errors in Imatest. We believe these errors may have been caused by a vulnerability in the slanted-edge algorithm to edge angles with rational slopes.

Simulation results for focus positions of $z=15$ and $25\text{\hspace{0.17em}}\mathrm{\mu m}$ with 5% noise are compared with the ideal MTF in Fig. 7. The modulus of the mean error of the 90 tartan measurements was less than 0.002. Significant uncertainty is clearly visible in the slanted-edge results. The modulus of the mean error was as high as 0.02. This error might be caused by scaling factor differences between the SFR and the MTF. One scaling factor that could cause variations between implementations of the SFR is the difference in the SFR of a discrete derivative compared with a Fourier derivative.

The root mean square (RMS) error of the tartan measurements and edge measurements are compared for the meridional tartan frequencies in Fig. 8. We would consider an MTF error of 0.01 to be significant [18]. The RMS error was often above 0.01 for the slanted-edge measurements and always below 0.01 for the tartan measurements.

The RMS error results in Fig. 8 show a similar trend to the ratios shown in Fig. 4b between the tartan pattern signal strength and the edge pattern signal strength. The RMS error of the tartan measurement does not vary significantly with spatial frequency, while the RMS error of the edge measurement increases approximately linearly with spatial frequency. The average ratio between the tartan and edge errors was 5.0 for 1% imaging noise and 3.0 for 5% imaging noise. The maximum ratio in the simulation results in Fig. 8 was 7.2 at 1% imaging noise, which is half the ratio predicted by the signal strength. This discrepancy could be caused by the effect of the imaging noise on the alignment accuracy in step 2 of the tartan measurement algorithm.

The value of the MTF did not appear to change the nature of the differences between the two measurement methods. For example, the simulated MTF at $70\text{\hspace{0.17em}}\mathrm{lppmm}$ dropped from 0.42 to 0.05 when the defocus distance *z* was increased from 15 to $25\text{\hspace{0.17em}}\mathrm{\mu m}$. However, the RMS error of the tartan method with 5% noise was 0.01 for both values of defocus, and the RMS error of the edge method with 5% noise was 0.03 for both values of defocus. This indicates that the uncertainty in both measurement methods was not significantly affected by the value of the simulated MTF. We analyzed the results for the other focus values, and we found the behavior was similar.

The effect of the side-lobe reduction algorithm on the tartan measurement method was measured by comparing side-lobe reduction measurements with direct tartan spectrum peak-finding measurements. The maximum error of these two methods over 90 random cases at $z=25\text{\hspace{0.17em}}\mathrm{\mu m}$ with 1% imaging noise is shown in Fig. 9. The maximum error is significantly lower for the side-lobe reduction results, especially at low spatial frequencies. However, when the imaging noise was increased to 5%, applying side-lobe reduction reduced the maximum error by a much smaller amount.

## 8. Experimental Results

We tested our tartan algorithm in practice by printing a scaled version of the example tartan pattern [19]. The scaling was designed to measure the frequencies 11, 33, 55, 78, 100, and $122\text{\hspace{0.17em}}\mathrm{lppmm}$ at a magnification ${M}_{T}=1/48$ with a Canon EOS 40D DSLR camera with an advanced photo system type-C (APS-C) size sensor with $5.8\text{\hspace{0.17em}}\mathrm{\mu m}$ pixels. The scaled tartan frequencies on the printed chart were 0.23, 0.69, 1.15, 1.63, 2.08, and $2.54\text{\hspace{0.17em}}\mathrm{lppmm}$. The tartan was tiled to form an A0-sized test chart in order to fill the APS-C sensor at ${M}_{T}=1/48$.

The $122\text{\hspace{0.17em}}\mathrm{lppmm}$ frequency is above the Nyquist frequency of the 40D sensor in the ${\psi}_{M}$ orientation (${q}_{N}=104\text{\hspace{0.17em}}\mathrm{lppmm}$). However, at this orientation the aliased spatial frequency does not overlap with any other spatial frequency points in the tartan pattern, so we were able to ignore the $122\text{\hspace{0.17em}}\mathrm{lppmm}$ frequency during the tartan measurement step.

We used a Canon W8400 wide-format inkjet printer, calibrated to provide a linear output space. The grayscale reproduction of the resulting output was checked and found to be linear to within 1% RMS. The spatial frequency reproduction was checked by printing patterns of specific size and measuring them with an etched glass rule; the scaling was found to be accurate to within 0.2% in both the *x* and *y* directions.

The printer MTF was measured from the printed chart using a Canon MP-E $65\text{\hspace{0.17em}}\mathrm{mm}$ macro lens at $1\times $ magnification with the relative aperture set to $\mathrm{f}/8$. At this magnification the highest measured frequency in this tartan design is $2.08\text{\hspace{0.17em}}\mathrm{lppmm}$. Assuming this lens has an MTF close to 1.0 at such low spatial frequencies allows us to estimate the mean effective printer MTF at the tartan frequencies. Our results are shown in Table 1.

When measuring the MTF of a lens, the signal strengths measured using our tartan measurement algorithm are divided by the appropriate effective printer MTF to determine the MTF of the lens independent of the printer. The lowest effective MTF for this chart was 0.517. In Fig. 4b the ratio ${T}_{C}/G$ of signal strength at $100\text{\hspace{0.17em}}\mathrm{lppmm}$ is 13 times, so even with a 50% drop in signal strength caused during chart printing, the tartan pattern still has a 6 times stronger signal than a slanted edge at $100\text{\hspace{0.17em}}\mathrm{lppmm}$. In previous experiments we have measured printer MTFs in multiple locations across a printed chart and shown that they are stable, with an RMS variation of 1%.

The test chart was mounted on a wall and illuminated with tungsten lamps. We captured images with a Canon EF-S $18\u201355\text{\hspace{0.17em}}\mathrm{mm}$ IS lens mounted on the EOS 40D camera and set to $18\text{\hspace{0.17em}}\mathrm{mm}$ focal length and relative aperture $\mathrm{f}/3.5$. The camera was first aligned using a different chart printed with alignment patterns so that the camera sensor was parallel to the chart plane to within $0.1\xb0$ pan and tilt, using methods reported by us elsewhere [20]. We focused the lens by capturing a focus series and selecting the peak MTF at $33\text{\hspace{0.17em}}\mathrm{lppmm}$.

Repeat measurements of best focus images from eight different lenses of the same model with 10 series of photos each, measured at five frequencies each and at 21 image locations distributed across the sensor, showed that our MTF results for each lens were stable to within an RMS of 0.01, with a maximum MTF measurement variation of 0.08.

The tiled nature of the tartan design gives us the opportunity to measure the MTF of a lens across the camera sensor’s entire field of view. We measured the MTF on a set of tiles evenly spaced across the sensor plane. The results at $55\text{\hspace{0.17em}}\mathrm{lppmm}$ and two orientations at $90\xb0$ to one another, corrected for the effective printer MTF, are shown as surface plots in Fig. 10.

We compared a subset of our tartan MTF results against MTFs measured by the ISO standard slanted-edge method using Imatest 3.6 Master software. We printed the Imatest “SFRplus” test chart on a Canon W8400 printer at A0 size for measurement at a magnification of ${M}_{T}=1/48$. We rotated the chart so that we could measure the same orientation angles ${\psi}_{M}$ and ${\psi}_{S}$ as the tartan pattern.

The imaging alignment, focus, and illumination methods were identical to those for the tartan test chart. Regions of interest $128\times 128$ pixels in size were selected along the lower-left diagonal of the image. The meridional MTF results produced by the Imatest software are shown plotted in Fig. 11 for two regions of interest. Also shown on the same plots are the MTF results obtained from our tartan method at the same image locations. Camera sensor MTF compensation was not applied to the Imatest results or the tartan results. The MTF values compared between the ISO method and the tartan pattern were in reasonably good agreement. The maximum difference over six image locations was 0.11 and the RMS difference was 0.06.

## 9. Discussion

Maintaining lens OTF measurement accuracy over the 9D geometry of the problem is an ongoing challenge. The diversity of OTF measurement methods reflects different goals for accuracy and 9D sampling.

The advantage of the tartan pattern is in the high signal strength, especially at high spatial frequencies. As shown in the simulation results, this allows accurate measurement over a wide range of sampling conditions. The simulation results show that the tartan measurement method is robust to imaging noise, alignment changes, and low MTF values. This robustness implies that the tartan method will also be robust to large changes in lighting and defocus.

The robustness of the tartan method is important because there are significant sources of measurement error that do not depend on the measurement pattern and detection algorithm. These sources include parallel alignment between the chart and the image sensor [21], focus finding, and chart calibration. Improving the measurement accuracy using the tartan method allows for additional tolerance to variation in the overall measurement conditions.

A significant advantage of the edge method is fine sampling in a single orientation in the spatial frequency domain. However, it is not easy to tune the spatial frequency sampling of an edge pattern without fundamental changes to the algorithm.

In contrast, the tartan pattern is highly tunable. The signal strength, spatial frequency sampling positions, and orientations can all be changed and then measured with the same algorithm [10]. The tartan pattern can also be tiled continuously over the test chart, as demonstrated in Fig. 10 from our experimental results, allowing flexible sampling of image positions and passive alignment tolerance. The main restriction on the tartan design is that the spatial frequency samples should exceed a certain minimum separation to ensure the side-lobe reduction algorithm is stable.

A major difference between the slanted-edge and tartan patterns is chart fabrication. The slanted edge relies on a high-resolution binary print, while the tartan pattern relies on linear grayscale reproduction at high resolution. In both cases, it is desirable to create a large physical test chart, such as A0 poster size for DSLR camera lens tests at $30\times \u201350\times $ magnification. A binary chart is significantly easier to fabricate than a grayscale chart; however, gray scale reproduction has improved over the past decade with accessible tools such as wide-format inkjet printing and large electronic displays.

While the signal strength of the tartan pattern may be reduced during fabrication, this reduction can be calibrated so that the measurements can be compensated for the reduction. The high initial signal strength of the tartan pattern means that the overall SNR can remain sufficient for accurate measurements, even when the signal strength has been significantly reduced by the printer or display. Our experimental results showed that it is possible to print a tartan chart that has a 6 times higher signal at $100\text{\hspace{0.17em}}\mathrm{lppmm}$ compared with a slanted-edge chart. An additional chart fabrication factor is that the printer or display may introduce a variation in signal strength across the chart or between different copies of the same chart. This is an additional source of measurement noise for the tartan pattern method compared with the slanted-edge method. In our experiments, this variation in signal strength increased our measurement noise by 1% RMS.

When the OTF is measured using a digital camera, the OTF is affected by the lens, the sensor, and the image processing. This means that digital OTF measurements are actually measuring the system OTF, rather than just the lens OTF. For modern digital cameras, the lens OTF has the most significant contribution to the system OTF. Small pixel sizes mean that the impacts of the pixel fill factor and low-pass filtering are limited and the dominant effects of the sensor on the OTF are predictable. Image processing can be bypassed using raw image files. In contrast, lens design and fabrication constraints typically lead to wavefront aberration limits on camera performance at open aperture, while at narrower apertures the performance is diffraction limited. In addition, the lens OTF is sensitive to the internal alignment achieved during fabrication and to multiple optical parameters at capture time. The relative OTF between two lenses can be compared using a digital camera if the rest of the system remains constant. Measuring the absolute value of the lens OTF requires calibration of the camera OTF. This could be done using a reference lens for which the OTF values have been independently verified.

For our experimental comparison between the tartan and the slanted edge, many important conditions were held constant between the two measurements, including the camera body used for capture and the camera alignment. We also found that repeat lens measurements using the tartan pattern were stable to within an RMS of 0.01. However, we still found an RMS difference of 0.06 between the tartan and slanted-edge measurements. It is possible that a measurement bias was introduced by the tartan method or the slanted-edge method. While differences are not unusual when comparing MTF results between different measurement systems [21], we predict that these differences could be further reduced by calibrating both systems against lens measurements using a stable reference lens.

In this article we have concentrated on measurement of high-quality lenses using DSLR cameras where image processing steps can be disabled. However, the tartan pattern has potential advantages for the measurement of low-cost cameras. Such cameras have strong adaptive processing to reduce noise and sharpen the image. A slanted-edge pattern is more likely to trigger this type of nonlinear processing, which will significantly alter the OTF measurement. A potential disadvantage of the tartan pattern is that strong JPEG compression may filter out the high frequencies.

## 10. Conclusion

We have proposed a tartan pattern for lens OTF measurement, together with an efficient and robust algorithm for accurate detection of the MTF from captured images of a tartan pattern. The tartan pattern is highly tunable and takes advantage of the flexibility in chart design and detection provided by digital production tools.

We have used simulations to demonstrate that the tartan method has significantly better accuracy than the slanted-edge method for a sparse set of spatial frequencies. With 1% simulated imaging noise, the standard deviation of the tartan method was on average five times smaller than the standard deviation of the slanted-edge method. The strongest improvements in accuracy were at high spatial frequencies.

Our experimental results showed that the tartan method is reproducible to $0.01\text{\hspace{0.17em}}\mathrm{RMS}$. We demonstrated the sampling flexibility of the tartan pattern by measuring the MTF on a fine grid of image positions. The tartan method and the slanted-edge method were in reasonable agreement, with an RMS difference of 0.06 for measurements of the same lens.

The authors would like to acknowledge our collaboration with Masatake Kato, Shingo Hayakawa, Hiroshi Saito, and Keiji Ikemori at Canon, Inc. The slanted-edge MTF measurements were performed using Imatest Master 3.6 software (http://www.imatest.com).

**1. **F. J. P. Consitt and W. Mandler, “OTF techniques in the routine testing of production lenses,” J. Mod. Opt. **18**, 123–131 (1971). [CrossRef]

**2. **H. Kondo, T. Watanabe, and H. Yamaoka, “Criteria for the evaluation of photographic lenses,” J. Mod. Opt. **22**, 353–363 (1975). [CrossRef]

**3. **N. Joshi, R. Szeliski, and D. Kriegman, “PSF estimation using sharp edge prediction,” in Proceedings of IEEE Conference on Computer Vision and Pattern Recognition 2008 (Institute of Electrical and Electronics Engineers, 2008), pp. 1–8. [CrossRef]

**4. **A. Levin, S. Hasinoff, P. Green, F. Durand, and W. Freeman, “4D frequency analysis of computational cameras for depth of field extension,” in Proceedings of ACM SIGGRAPH 2009 (ACM, 2009), article 97.

**5. **P. Lindberg, “Measurement of contrast transmission characteristics in optical image formation,” J. Mod. Opt. **1**, 80–89 (1954). [CrossRef]

**6. **S. E. Reichenbach, S. K. Park, and R. Narayanswarmy, “Characterizing digital image acquisition devices,” Opt. Eng. **30**, 170–177 (1991). [CrossRef]

**7. **International Organization for Standardization, ISO 12233:2000 standard: photography—electronic still-picture cameras—resolution measurements (2000).

**8. **H. Frieser, “Le Pouvier résolvant des Couches photographiques (The resolving power of photographic coatings),” in IX Congrès International de Photographic Scientifique et Appliquée (Masson SA, 1936), pp. 207–218.

**9. **Sine Patterns, “Composite Design,” http://web.archive.org/web/20080327091116/www.sinepatterns.com/S_Comp2.htm (2006, accessed June 2010).

**10. **K. G. Larkin and P. A. Fletcher, “Frequency estimation under affine distortion,” Australian patent application 2008211991 (4 September 2008).

**11. **M. R. Arnison, S. J. Hardy, and K. G. Larkin, “Optical transfer function measurement system,” Australian patent application 2005203031 (12 July 2005).

**12. **A. D. Edgar and A. S. Bopardikar, “System and method of testing imaging equipment using transformed patterns,” U.S. patent application 20070230776 (13 June 2006).

**13. **H. J. Levin, “Discrete Fourier transform (DFT) leakage removal,” U.S. patent 6,882,947 (19 April 2005).

**14. **D. J. Fleet, D. J. Heeger, T. A. Cass, and D. L. Hecht, “Automatic geometric image transformations using embedded signals,” U.S. patent 5,949,055 (7 September 1999).

**15. **D. Williams and P. D. Burns, “Applying and extending ISO/TC42 digital camera resolution standards to mobile imaging products,” Proc. SPIE **6494**, 64940H (2007). [CrossRef]

**16. **N. Koren, “Sharpness: what is it and how is it measured?” http://www.imatest.com/docs/sharpness.html (Imatest, 2010, accessed June 2010).

**17. **P. A. Stokseth, “Properties of a defocused optical system,” J. Opt. Soc. Am. **59**, 1314–1321 (1969). [CrossRef]

**18. **G. C. Brock, A. C. Marchant, and T. L. Williams, “OTF standards for aerial mapping lenses,” J. Mod. Opt. **19**, 953–972 (1972). [CrossRef]

**19. **D. P. Morgan-Mar, M. R. Arnison, C. A. Deller, P. A. Fletcher, and K. G. Larkin, “Two-dimensional measurement of the lens optical transfer function from a digital image,” Proc. SPIE **7876**, 78760H (2011). [CrossRef]

**20. **D. P. Morgan-Mar, M. R. Arnison, C. A. Deller, S. J. Hardy, and K. G. Larkin, “Geometric parameter measurement of an imaging device,” U.S. patent application 20090161945 (21 November 2008).

**21. **A. C. Marchant, E. A. Ironside, J. F. Attryde, and T. L. Williams, “The reproducibility of MTF measurements,” J. Mod Opt. **22**, 249–264 (1975). [CrossRef]