Measurement of the optical transfer function using a white-dot pattern presented on a liquid-crystal display

The optical transfer function (OTF) and its modulus, the modulation transfer function (MTF), are widely accepted measurements of the quality of optical systems. There are different ways of estimating both OTF and MTF. Random-dot-pattern methods have some advantages when computing MTFs, especially those which present the pattern on a liquid crystal-display (LCD) screen because no additional light source is needed. Nevertheless spatial information is not usually available in the image plane because MTFs are computed for the whole image in a ﬁnite number of directions only. We propose a way of providing spatial information by measuring a number of point-spread functions (PSFs). Created by a white-dot pattern on a LCD screen, white pixels operate as point sources and PSFs are calculated to eventually result in the OTF of the system. MTFs in the main directions are computed to compare with reference values obtained by the random-dot method. Sensor and LCD resolutions deﬁne the achievable MTF range. Our proposed method is used to characterize a liquid-crystal tunable ﬁlter (LCTF) attached to a monochrome camera at different wavelengths. This method, which is both easy to install and to use, achieves results with errors of less than 3%, and has advantages over classical OTF estimation methods: spatial information provided in the image plane, all frequencies and directions covered in a single capture, no additional light source needed and derivative-dependent noise avoided. [DOI: http://dx.doi.org/10.2971/jeos.2013.13029]


INTRODUCTION
A widely accepted measurement of image quality, the optical transfer function (OTF) [1]- [3], and its modulus, the modulation transfer function (MTF), are used to characterize some optical systems [1]- [6].They can be determined either from scalar wave theory or from geometrical optics.These two approaches are generally referred to as the diffractive MTF and the geometric MTF respectively [4].Any MTF quantifies the system's capacity to spatially resolve a sinusoidal intensity pattern with discernible contrast [4,7].Previous studies have proposed several methods for measuring the MTF of optical systems based on detector arrays of charge-coupled devices (CCDs) [8] and most of them differ essentially in the type of target or pattern used as the object pattern [9].These techniques can be broadly classified into five categories: the sine-wave method, the bar-target method, the edge-gradient method, the series-expansion method and the random-pattern method [4].According to the sine-wave method a target object with a sine-wave variation in intensity is imaged and the MTF is taken to be the ratio of the image-to-object modulation depth.The sine-wave approach is the most direct means of measuring the MTF, but it requires a different target and a different set of measurements for each of the spatial frequencies sampled [1,7,10].The bar-target method calculates the MTF by imaging bar-target patterns and determining the reduction in amplitude of the fundamental frequency component [6,10,11].This approach also requires a different target and a different set of measurements for each of the spatial frequencies sampled.In the edge-gradient method, the object intensity has a knife-edge-like variation and the image data are described by an edge-spread function, whereby the MTF of the optical system is obtained as the Fourier transform of the derivative of the edge-spread function, which usually implies dealing with noise [2,7].The series-expansion method relies on a bar target but the analytic method resembles that of the edge-gradient technique [12].The fifth approach is based on the use of random noise patterns, such as laser speckles, and random-dot patterns as objects [3,5,10,13].The laserspeckle method has in the past been used to determine the modulation transfer function of CCDs [5].As the results are a function of wavelength [4] a complete characterization might be lengthy and complex [2,14].With random-dot methods, patterns are either printed on paper or transparencies or presented on a liquid-crystal-display (LCD) projector or screen.This technique has major advantages over printout patterns [3,15].First, there is no need to use an additional light source to illuminate the pattern, and second, using a laptop to present the random pattern is a versatile technique, as the control software is specifically developed for this application and installed on the computer itself.This enables the user to modify pattern characteristics quickly and easily, as opposed to techniques that involve printing.In any case, random patterns take advantage of the fact that system alignment is not critical because the pattern is randomly positioned with respect to the CCD matrix.Random-dot methods are shift invariant [3,16].None of these five methods gives spatial information at the image plane, however, either because an OTF is computed for the entire image or because MTFs are calculated in a finite number of directions only.No sensor-spatial information becomes available.
Thus we propose here a method to provide spatial information by measuring a number of point-spread functions (PSFs) from a dot pattern displayed on a LCD screen, which eventually results in the OTF of the system.The system is spatially characterized because each PSF calculated defines the optical transfer function (OTF) of a small area.This allows us to compute the system's performance in different image zones.This method is suitable when geometric aberrations are the main factors decreasing the quality of the optical image [9].It becomes easier to determine PSFs when using LCD screens because no additional light source is needed, although measurements are limited by the Nyquist frequency of the discretization in the acquisition system [2,5,17].The sensor and object resolutions define the final MTF range so the higher these resolutions are the wider (cycles/mm) the range of measurement achievable.Using a white-dot pattern on a high-resolution LCD screen and CCD sensor it is possible to measure and obtain spatial information about the OTF corresponding to an optical system.The proposed method has all the advantages of a random-pattern method, i.e. the use of a laptop LCD to present the pattern, plus the improvement of taking into account space variant information in the image plane, meaning that not only the main directions are analyzed [2,4,18].To assess our proposed method an optical system with a monochrome camera incorporating a liquidcrystal tunable filter (LCTF) and lens working at different wavelengths were used.
The remainder of this study is structured as follows: Section 2 introduces the material used and explains the details of the proposed method; In Section 3 we present our results and Section 4 contains our discussion on them together with our main conclusions.

Experimental set-up
The experimental set-up, shown in Figure 1 and described in more detail in the following paragraphs, consists of a LCD screen showing a dot pattern, a liquid-crystal tunable filter (LCTF) and a zoom lens coupled to a CCD sensor connected to its control and an acquisition card installed in a computer.
The LCD was a NEC LCD22WV, 1680 x 1050 pixels (horizontal x vertical) 46.7 x 29.1 cm in size, at its maximum brightness and contrast values.Its radiance spectrum, which was measured with a SVC GER 2600 spectroradiometer, is shown in Figure 2. It presented highest radiance values at 436.9, 488.1, 546, 611.8 and 709.1 nm.
The CCD sensor was that of a Retiga-SRV Fast-1394 camera from QImaging, with a digital output of 12-bits and a spatial resolution of 1392 x 1040 pixels (horizontal x vertical) and 6.45 µm x 6.45 µm pixel size.Its center-to-center horizontal inter-pixel spacing was 7.33 µm and vertical 7.98 µm.For a detector array with a center-to-center inter-pixel spacing in direction ∆X, the Nyquist frequency in this direction (E) is that given by Eq. ( 1) [19]: Consequently, the Nyquist frequency of our CCD detector was 68.23 cycles/mm in the horizontal direction and 62.65 cycles/mm in the vertical.A liquid-crystal tunable filter (LCTF) was employed prior to the lens to allow us to measure the OTF of the system with quasi-monochromatic illumination and to choose the wavelength of interest.The LCTF used was a VariSpec (cRi, Woburn, Massachusetts) tunable filter in the range of 400 to 700 nm, with a 20 mm aperture and a nominal 20 nm bandwidth.The zoom lens was 30 mm in diameter and had a focal length range of 7-28 mm.Two measuring distances, 1.8 and 4 m, were used to check the proposed method at different zoom-lens settings.

Proposed method
With a LCD screen resolution of 1680 x 1050 pixels, a 20pixel separation between white pixels resulted in a matrix of 84 x 52 white pixels on a black background (Figure 3).A space of 20 pixels was chosen to simplify segmentation of different pixel images at the image plane and also to obtain more than one thousand pixel images in the final chosen area.
If the image coordinates of an object point (x o ,y o ) are (x i ,y i ), an optical imaging system transforms the object coordinates to image coordinates according to Eq. (2): in which I represents the image plane, O the object in question and S an optical transformation.
Due to the linearity property of optical imaging systems, the impulse response, δ(x i − x o , y i − y o ), for the optical system lets us write Eq. ( 2) in the form of Eq. ( 3) [16].
If the symbol h(x i , y i ; x o , y o ) denotes the response of the system at point (x i y i ) of the output space to a δ function input at coordinates (x o y o ) of the input space, as in Eq. (4), then function h is the impulse response, or (in optical terminology) the point-spread function (PSF) of the system.This leads to Eq. (5): This fundamental expression, known as the superposition integral, demonstrates the very important fact that a linear system is wholly characterized by its responses to unit impulses.
To completely specify the output the responses must in general be known for impulses located at all possible points on the input plane.With a linear imaging system this result is open to the interesting physical interpretation that the effects of imaging elements (lenses, filters etc.) can be fully described by specifying the images (possibly with quite complex values) of the point sources located throughout the object field [16].Thus, Eq. ( 5) expressed with the convolution operator becomes Eq. ( 6): Convolution takes a simple form on Fourier transformation, to give Eq.( 7): in which G2, G1 and H are the Fourier transforms of I, O and h respectively and f x and f y are the various spatial frequencies.Function H, known as the OTF of the system, indicates the effects of the system in the frequency domain.The OTF is composed of complex values and thus for each frequency it is composed of a modulus part, or modulation transfer function (MTF), and a phase part, or phase transfer function (PTF).As long as transformations in the image plane are linear and little or no change occurs in the PTF between frequencies, the MTF becomes a good approximation of the OTF system [1,2].The MTF and the OTF are of interest because they are widely accepted measures of the quality of optical systems and because the relatively tedious convolution operation required to find the system output is replaced by the often simpler sequence of Fourier transformation, multiplication of transforms, and inverse Fourier transformation [16].
For our purpose each object pixel behaves as a point source, as long as its size in the image plane is smaller than a single sensor pixel, due to the fact that the resolution of the LCD projected into the image plane is higher than that of the sensor and the former is imaged entirely at the sensor.Thus the image of each object pixel is a discrete sample of the PSF of the brightest pixel on it and so a Fourier transform can be computed to obtain the OTF of that imaged area.Computing the average of the OTFs of all the imaged areas gives an average OTF, the main direction MTFs of which can be checked by comparing them to those calculated with a different method (used as reference).Reference values were computed from a random-dot pattern following the procedure described in [15] because of its simplicity and the accuracy of its results.
The method consists of two main steps: acquisition and computation, as depicted in the scheme in Figure 4. First, at the acquisition step, a white image is acquired.A white image is that acquired with all pixels set to maximum value on the LCD display.Acquisition time is set to such a value that the maximum number of image counts is 85% of the sensor maximum, which is necessary to ensure that we are working within the linear range of the sensor.Second, a white-dot pattern image is captured with the same exposure time as that of the white image.Finally, a dark image is acquired by blocking light inputs into the sensor.The dark image is related to the dark-current measurement of the CCD for that particular acquisition time [20].
The next step involves the following computations: 1) The dark image (I dark ) is subtracted from the white-dot pattern image (I white dots ).
2) The dark image is also subtracted from the white one (I white ). 3) A mean value (M) for the entire white image is calculated.4) Now, according to Eq. ( 8), a preprocessed image (I preprocessed ) can be calculated.Thus vignetting or nonuniformity is taken into account (flat-field correction) [5,19].
I preprocessed = M I white dots − I dark I white − I dark (8) We have lowered the influence of dark-current noise and spatial non-uniformity although temporal noise still remains.Temporal noise is reduced by averaging a number of images (23).Now a counts number (null-level) is computed to separate the background values from the data ones.To this end white-pixel areas in the preprocessed image (I preprocessed ) must be segmented, as can be seen in Figure 5. Segmentation is done by selecting four corner points in the image by hand and specifying the size of the enclosed point matrix.Point centers are then computed automatically by finding the highest values closer to the approximate coordinates.The pixel areas thus found were 14 x 14 in size.
A null level for each segmented area was computed as the mean plus 3.3 of the standard deviation of surrounding pixels (a total of 60 values).Values lower than the null level were considered to be background pixels and set to zero.Black images (LCD showing a black instead of a white image) were acquired to justify this step of the method.The mean and its standard deviation at each corresponding segmented area were computed.A new null level was calculated for each area and used for comparison.An example of this zero value is shown in Figure 6.
Then, before computing the OTF, we had to normalize the segmented data by dividing by the sum of the pixel values in each area.These segmented and preprocessed data represent a discrete sampling of the real PSF (DPSF) at each image area, as can be seen in Figure 7, and thus we had access to a spatial distribution of DPSF profiles for the different image zones.
Finally the OTFs were calculated as discrete Fourier transforms of the sampled PSFs (DPSFs).All computations were made with MATLAB software [21].
OTFs, like their PSFs, provide information about the system's behavior at different coordinates, thus allowing a spatial analysis of the system.The mean of all the OTFs leads to the OTF of the system.To check our results the MTFs in the main directions were computed and compared to reference results.For the vertical direction the OTF columns were averaged.Only half of the terms were valid because of the value of the Nyquist frequency for our capture system.For the horizontal direction the OTF rows were averaged and split in the same way.These values were represented against the previously calculated spatial frequency along each axis, leading to computed MTFs in both the vertical and horizontal directions.
Prior to these computations hot pixels, if there are any, must be identified in the image plane.If they exist they must be excluded from the computations.In our case there were no hot pixels to be taken into account.Mechanisms have been sought to facilitate rapid implementation of the method with a view to industrial application.The smaller number of images required and ease of calculation allow faster inline processes.A simplified version of this method consists of skipping the flat-field correction in such a way that no white image is acquired and computation becomes faster.The effects of no dark subtraction are also described in the following section.

Flat-field correction applied
First, the random-dot-pattern method was used and MTFs for the horizontal and vertical directions were computed (Figure 8).These results are taken to be reference values for each axis.The 4 th degree polynomial fittings of the raw measurements are set out in the figure.The correlation coefficient corresponding to these fittings is higher than 0.997 for both directions (R 2 ≥ 0.997).A centered area of 563 x 416 pixels from the total 1392 x 1040 was studied because at different apertures and zoom values vignetting was not perceived in that area.The vignetting effect was exacerbated compared to the conventional digital camera by the LCTF, so this centered area was selected by visual inspection.It contained at least one thousand white points and maximum differences between values were 10%.
Second, when applying our method the same centered area of 563 x 416 pixels in the white-dot image plane was chosen and studied.The area chosen is shown in Figure 9.A total of 1, 408 points were segmented from the chosen area and their individual OTFs calculated from their discrete samples of real PSFs.
Third, the average OTF was computed as described in Section 2, and errors associated with the random-dot and whitedot patterns were examined.The results obtained with the random-dot pattern were less sensitive to image noise (almost negligible) compared to our proposed method.This is due to its random nature.Error bars were obtained according to the propagation of uncertainties so they represented the maximum and minimum total errors in Figure 10.References were always within the uncertainty range of the calculated values.The maximum error was lower than 2% on the horizontal axis (Table 1) and 3% on the vertical (Table 2).Mean errors were around 1% in both cases and the RMS error always lower than 0.0005.More than 20 measurements of each screen shot were The results obtained with the null-level calculated from surrounding pixels were compared to the results calculated from the black image.All the pixels in corresponding black areas were used to compute mean and standard deviation values, thus obtaining a new null level.Final mean error results differed by no more than 0.8% in the horizontal and 0.7% in the vertical.Nevertheless, the number of standard deviations added to the mean value to compute the zero level is a crucial component of the method.If three standard deviations were added the resulting mean error was about 0.2% whereas with two standard deviations it increased to 16%, and with only one the mean error difference increased to 54%.

With no flat-field correction
We conducted further research into the effects of data preprocessing.The results obtained with no flat-field correction in the white-dot image are set out in Figure 11.Maximum errors were 1.8 and 2.7% in the horizontal and vertical respectively whatever the wavelength.Mean errors were again around 1%.More than 20 measurements of each screen shot were analyzed to establish the effect of shot-to-shot variations on accuracy.Mean-error values showed a 5 • 10 −4 maximum standard deviation in the vertical direction and 4 • 10 −4 in the horizontal.
If the dark image was not subtracted from the white-dotpattern image and flat-field correction was not done, maximum errors were about 30% in both the horizontal and vertical directions, with mean errors of approximately 14%.In this case the results differed considerably from the reference ones (Figure 12).

Spatial results
A spatial analysis of sensor areas was conducted and lines representing deviations from the average MTFs (horizontal and vertical) were drawn at the centered pixel of each area analyzed (Figure 13).It is clear that performance deviated from the average values of the system, creating a regular beat pattern which is a possible residual Moiré effect.
Apart from MTF issues, the white-dot-pattern image can also be used to assess distortion because it contains spatial information.Point distortion is shown in Figure 14.The brightest points in each segmented area are taken to be the best estimation of real point locations.

Vignetted areas
A spatial analysis of the area outside the 563 x 416 matrix was carried out.A 992 x 618 matrix was studied.MTFs were computed for vignetted areas of the image field.Drawn lines in Figure 15 represent the calculated deviations from the total MTF in both the vertical and horizontal axes for unvignetted and vignetted areas.

DISCUSSION AND CONCLUSIONS
By analyzing the results of both white-dot and random-dot patterns we have found that there is a difference between MTFs in the main directions.The MTFs calculated with our proposed method, in both the horizontal and vertical directions, show an error of less than 2% and 3% respectively when compared to the random-dot method.The errors were very similar at all four wavelengths tested.Wrong results emerge when hot pixels, if any, are not discarded, because these directly influence the discrete sample of the point-spread function.Vignetted areas actually perform reasonably well if compared with centered areas.Thus, (a) accuracy between unvignetted and vignetted regions is similar, and (b) it is possible to measure accurate MTFs towards the edges of the field.This is of great interest and demonstrates very well one of the advantages of this method in covering a wide area of the field in a single test shot.
A key issue is the apodization step.A suitable segmentation of the zero level in the discrete sampling of the real PSF in each image area avoids an exaggerated estimation of the OTF.
To get more accurate results it should be possible to apply sub-sampling techniques to pixel images (according to [2]) to close the gap between discrete samples and real PSF values.Although we did not attempt this in our study we intend to address the matter in future work.
If the white-dot image is not preprocessed the results differ considerably from the reference ones.Nevertheless, of the two preprocessing steps (dark-image subtraction and flat-field correction) the former exerts a much more decisive influence on the quality of the results.Depending on the characteristics of the system only the white-dot pattern image (no flat-field correction) with dark-image subtraction would be accurate enough.
The method may easily be automated to study almost every area in the image plane because if the white-dot matrix is moved across the LCD, the corresponding areas in the image plane change accordingly.It is also possible to alter the gaps between pixels in the white-dot pattern to make it denser and to ensure a higher number of analyzed areas in the image plane, provided that segmentation becomes feasible and the PSFs do not overlap.If a high resolution (cycles/mm) measurement is needed this can be achieved by using highresolution sensors and LCDs.The method is limited in practice by the maximum spatial frequencies of the CCD sensor and LCD screen, which are usually considerably smaller than the lens capability.
A regular beat pattern was perceived when a spatial analysis of sensor areas was conducted and lines representing deviations from the average MTFs (horizontal and vertical) were drawn at the centered pixel of each area analyzed (Figure 13).
We know now that there is no difference between results with and without flat-field correction so this effect was not enhanced when non-uniformity correction was applied.Thus, the explanation for this result is based on the fact that deviations with regard to the mean values of the image are more related to a residual Moiré effect than significant changes in PSF at each area.As already computed, however, deviations were less than 3% for this LCTF implementation.Our hypothesis is that there is a superposition of the white-dot pattern and the CCD sensor matrix.The two gratings interfere with each other creating the Moiré.The MTF is distorted by the compression of spatial frequencies arising from the tilt of the grid of white dots with respect to the detector array.The effects of ascending and descending values of the Moiré effect are probably hidden within the average MTF but these differences are highlighted when analyzing individual areas at specific spatial locations which may be useful when correcting the effect in raw images or detecting it when it is not obvious by visual inspection.
We propose a method for obtaining not only the average OTF of an optical system but also information about its spatial distribution, thus helping to characterize specific image areas and analyze distortion.Compared with the random-pattern method [15], our proposed method shares the benefits of being shift-invariant and the fact that the entire frequency range is measured with a single capture, but it has clear added advantages, such as the fact that the MTFs in different directions (not only the main ones) are easily computed from the OTF and also that the entire resolution of the LCD is used.With random-dot-pattern methods that use LCD screens, a ratio of 1:1 resolution or higher is needed because of the Nyquist frequency limit, so the pattern is partially focused on the sensor and LCD resolution is not maximized.Our proposed method benefits from the use of an LCD screen as a pattern displayer and light source all in one.Furthermore, our method involves no derivative computing, a clear advantage over those methods such as knife-edge or step-edge methods [2,7], in which a derivative is needed, presenting an additional source of error.Our method needs only one pattern capture so it does not require different test images, unlike bar-target or sine-wave methods [1,11].Compared with the sine-wave method, the bar-target method, the edge-gradient method and the series-expansion method, there is an improvement in the speed of up to (n − 1) times in the acquisition step, being n the number different directions to be analyzed with those.Lastly, our proposed method is simple and only uses off-the-shelf components.
The method has been used to characterize a hyperspectral capture system composed of an LCTF and a monochrome CCD camera at different wavelengths.We obtained results very similar to those of the MTF computed by the randomdot-pattern method.
The proposed method would be of particular interest for deblurring applications in which the PSF is used, and also for studying different kinds of aberrations such as in spotdiagram techniques.

FIG. 3 A
FIG.3A portion of the pattern presented (object) on the LCD.

FIG. 4
FIG. 4 Schematic diagram of the main steps of the proposed method: Acquisition and computation.First we acquire 3 images and then make computations following the schedule shown.Spatial information is available (estimated PSFs) as soon as normalization is finished.OTF is calculated not only to present classical vertical and horizontal MTFs but for comparing spatial results with the performance of the system.

FIG. 6 FIG. 7
FIG.6Values of a row of the segmented area.Null level is indicated as a dashed line.The null level must be higher than any background-noise value.

FIG. 11
FIG. 11 Results obtained without flat-field correction on the white-dot image at 612 nm.The dark image has been subtracted.Reference values are also as dotted and solid lines.

FIG. 12
FIG. 12 References (dotted and solid lines) and calculated MTFs.Results obtained without flat-field correction and no dark image subtracted from the white-dot image at 612 nm.

FIG. 15
FIG. 15 Each line represents, as a vector, calculated deviations from the total MTF in both the vertical horizontal axes in each area for the chosen wavelength of 546 nm.Vignetted areas of the image field have been included now.

TABLE 1
Maximum, minimum and standard deviation of errors at different wavelengths of MTFs values in the horizontal direction.

TABLE 2 Maximum
, minimum and standard deviation of errors and signal-to-noise ratios at different wavelengths of MTFs values in the vertical direction.