LCD-based method for evaluating modulation transfer function of optical lenses with poorly corrected distortion

Abstract. Modulation transfer function (MTF) evaluation in the imaging of the optical lenses with poorly corrected geometric distortion involves sampling region of interest (ROI) images that are affected by geometric distortion, reducing its accuracy. A based liquid-crystal-device MTF (LMTF) method is proposed for this purpose by evaluating MTF of the medical rigid endoscope. This method establishes a mathematical model of geometric distortion and analyzes two sampling ROI image manners in MTF evaluation. Compared with the distortion factor (DF) manner, the distortion correction manner relaxes the value of the DF to twice the maximum non-distortion value, extends the sampling ROI image to twice the size, reduces the average RRMSE value to 6%, and improves average accuracy on MTF by 1.2%. The experimental results provide good agreement with the theoretical prediction. Therefore, the proposed LMTF method can be referential for the other optical lenses with poorly corrected distortion.


Introduction
Medical rigid endoscopes (MREs) consist of three parts of optical lenses: the objective lens, the relay system, and the eyepiece. Great efforts for technological advancements in optical lenses and structural optimization have brought direct conveniences to their clinical applications. Therefore, the imaging quality directly affects the realization of more applications of MREs. As for an MRE, aimed to inspect as large an area as possible within the patient body under the least movement for routine testing, early cancer screening, and clinical surgery through small holes in a non-invasive or minimally invasive way, it is deliberately designed to have a wide field of view(FOV). The wider FOV makes the magnification no longer constant, so the output image loses the similarity with the input target and thus presents geometric distortion, reducing the accuracy of modulation transfer function (MTF) evaluation. In addition, the wide FOV presents images with non-uniform illumination distribution and field curvature. The non-uniform illumination distribution contributes to slight difference on the MTF evaluation before and after illumination compensation. 1 Field curvature can cause the image to be blurred, because field curvature cannot make the center and edges of the FOV clear at the same time. Therefore, by focusing on the center of the FOV, blurring can be avoided to be introduced into its MTF evaluation. Thus, the geometric distortion is a major problem in MTF evaluation for optical lenses with poorly corrected geometric distortion. Until recent years, some research work has been done. Masaoka et al. 2 used a modified slanted-edge method to evaluate the MTF for the fisheye lens by ISO Standard 12233. Williams and Burns 3 used a slanted edge gradient SFR method to measure the MTF of the distorted edge images. Yet, the study between the geometric distortion and the sampling region of interest (ROI) image is seldom involved. It may cause the MTF evaluation to be affected by the inappropriate sampling ROI images, reducing the accuracy. Thus in this paper, a based liquid-crystal-device MTF (LMTF) method is proposed for this purpose. This method utilizes two computer-generated targets to establish a mathematical model of geometric distortion and then analyzes two sampling ROI image manners in MTF evaluation. Under the limitation of the sampling ROI image based on the distortion factor (DF) manner, the sampling ROI image based on the distortion correction manner is presented for the MTF evaluation of the MRE. One target is characterized with a visual uniform structure, which is responsible for establishing a mathematical model of geometric distortion. A Hadamard target, created by a pseudorandom Hadamard generator, has a natural geometric center, which helps to save time for the experimental system in alignment adjustment. The Hadamard target is derived from a Hadamard matrix H n , which is a square matrix with the order n equaling to 2 k where k is a positive integer. The other target is characterized with a uniform spectral distribution for the MTF evaluation. The spectral distribution can be expressed as a uniform contrast, a uniform spatial frequency spectral density, or a uniform spatial power spectral density. Targets of such spectral distribution are also widely used for the MTF evaluation of the optical lenses with wellcorrected distortion. [4][5][6][7][8][9][10][11][12][13][14][15] Here, the target with a uniform power spectral density is mainly considered, and it can be created by a random number generator. 16 The generated random target is characterized with the random numerical distribution and verify the LMTF method.
The LMTF method presents a feasible solution for the MTF evaluation of the MRE. In addition, the LMTF method also presents advantages by utilizing the liquid crystal device (LCD) to present digital targets in equivalent pixels. First, it only needs to complete one alignment adjustment and optimization for the experimental system, thereby reducing the risk of errors caused by frequent alignment movement into the experimental results. Second, it can visually observe the clarity of the target image in the central FOV, avoiding the blur caused by field curvature into the central FOV, thereby inhibiting the error caused by field curvature from entering the experimental results. Third, it more flexibly displays targets at different quasi-monochromatic illumination by the LCD itself than printed targets, and the MTF can be evaluated at different wavelengths.

Experimental Setup
The LCD is mounted on a mobile platform operated in multiple directions, and its distance from the entrance pupil of the MRE is L 0 . The black and white CMOS camera has 1280 × 1024 image pixels with equal pixel pitch d CMOS of 5.2 μm. The optical interface (OI) connecting the MRE and the CMOS camera is used for converting the virtual image into the real image. The experimental setup is shown in Fig. 1.
The MTF of the OI is high enough to prevent its MTF from affecting the evaluated MRE. The Nyquist spatial frequency f N of the CMOS camera is determined by its pixel pitch and is equal to 1∕ð2 × d CMOS Þ. The highest spatial frequency f H of the target image onto the CMOS camera is equal to 1∕ð2 × d LCD × MÞ, where d LCD is the pixel pitch of the LCD and M is the magnification of the experimental system. To avoid frequency aliasing, that is, to prevent the spatial frequencies higher than the Nyquist spatial frequency from being mapped to the lower spatial frequencies of the image to affect the experimental results, f H ≤ f N is established. Further, it can be derived as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 1 1 6 ; 6 9 9 M ≥ d CMOS ∕d LCD ; (1) where d LCD is an important parameter to ensure successful experimental implementation, that is, different LCDs with the same d LCD achieve the same experimental measurement. As described in Eq. (1), an oversampling mode is often used to extract the true law contained in the raw data. However, as M moves away from the ratio of d CMOS ∕d LCD , more duplicate data, rather than more valid data, are sampled. Overemphasizing the amount of data can lead to overfitting of experimental results. Therefore, M close to the ratio of d CMOS ∕d LCD is a more preferred choice. Here, the LCD has a 5.1-in. screen with 1920 × 1080 image pixels, and then its d LCD is equal to 58.
Therefore, by calculation, the matrix size of the Hadamard target is not less than 512 × 512 pixels.

MTF Analysis
MTF is a widely used indicator for evaluating the imaging quality of an optical lens with its spatial frequency content. As for an evaluated MRE, its theoretical MTF 17 can be written as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 1 1 6 ; 3 8 4 MTFðfÞ where f stands for the spatial frequency in cycles/mm, whose maximum frequency f max , that is the diffraction cutoff frequency, is equal to D e ∕ð1.22 × λ × L 0 Þ. 18 Here, λ represents the central wavelength of the target on the LCD screen and is 650 nm, L 0 is the working distance of 20 mm, and D e stands for the round entrance pupil diameter of the evaluated MRE, which is 0.26 mm. It is worth noting that the MTF evaluation is meaningful when f max ≤ f H is established. Therefore, f max determines the upper cutoff frequency of the experimental system and is 16.4 cycles∕mm.
To facilitate the experimental MTF evaluation, the random target has a uniform spectral distribution. Thus for such a random target, the MTF of the experimental system can be described as follows: where MTF total describes the relationship between the output and input power spectral densities (PSDs) of the experimental system. For a linear optical imaging system, its uniform magnification is an important characteristic parameter. Therefore, for a sampling ROI image with uniform magnification, its imaging process can be regarded as a linear procedure. For such a sampling ROI image, the MTF total can be written as the product of the MTF MRE of the evaluated MRE and the MTF sys of the remaining optical setup, 19 E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 1 1 6 ; 1 1 9 MTF total ðfÞ ¼ MTF MRE ðfÞMTF sys ðfÞ: In Eq. (5), MTF sys represents the systemic MTF inherent in the experimental system, which can be obtained by measuring the MTF of the optical system without MRE. Thus, the MTF MRE is the ratio of MTF total ∕MTF sys . Furthermore, to reduce the influence of dark noise of the experimental system on the experimental measurement, 20 PSD output can be further written as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 1 1 6 ; 7 1 0 PSD output ðfÞ ¼ PSD captured ðfÞ − PSD sys ðfÞ; (6) where PSD captured is the PSD of the captured image on the CMOS camera, whereas PSD sys is the PSD of the captured dark image. Thus, the LMTF method is processed in the following way. The experimental system is adjusted for alignment and focusing optimization by the Hadamard target. The target image is used to establish the mathematical model of geometric distortion and determine the valid sampling ROI image from the output image or the corrected output image for the MTF evaluation. Subsequent data analysis is performed within the ROI image. As an axis-symmetrical optical system, the MTF can be measured for the meridional or sagittal direction in a similar manner; to avoid repetitions in calculation, only the meridional MTF is measured. The squared magnitude of the one-dimensional Fourier transform of each meridional row of the ROI random image is calculated by the Fourier transform algorithm. To improve signal-to-noise ratio, the total rows are averaged to yield the meridional PSD output . To reduce random error on the experimental measurement, the average is taken for 10 output images. After taking the square rooting of the PSD output and normalizing it, a fitting polynomial curve yields the meridional MTF total . After removing the MRE from the experimental system and maintaining a constant distance relationship between the OI and the CMOS camera, the meridional MTF sys is obtained. Finally, the meridional MTF MRE is obtained by dividing the MTF sys from the MTF total .

Sampling ROI Image Determined by the Distortion Factor Manner
In Fig. 2, a mapping relationship between the object and image planes is established, where both center points are marked in green. A coordinate system is used, where r 0 means the pixel distance from the center to the other points of the image plane and r means the pixel distance from the center to the corresponding mapped points of the object plane. The furthest pixel distances for r 0 and r are both normalized to 1. The Hadamard image is axisymmetric; r 0 can be measured from the center to any direction, for example, from the center to the right or upper direction. Thus, the coordinates of the selected six points (in pink or blue) are read, and the pixel distances from the center to them are calculated and normalized. As for r, the mapped points in the Hadamard target are adjacently equally spaced. After taking the data of r 0 and r, and performing a nonlinear least-squares method, a fitting polynomial is written to describe the relationship between r 0 and r, 21 where g 0 ðrÞ also stands for the magnification function since r 0 and r represent dimensionless length information. For an ideal distortion-free imaging system, g 0 ðrÞ is equal to 1 [black line in Fig. 3(a)], which means that the output image is proportional to the target. Then for an actual imaging system such as the MRE, the output image is distorted to magnify the target [pink and blue curves in Fig. 3(a)]. The closer to the edge, the more pronounced the distortion. Therefore, the subtraction of the non-distorted gðrÞ and the distorted g 0 ðrÞ is E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 9 ; 1 1 6 ; 2 3 0 where Δg 0 ðrÞ indicates how the magnification with distortion deviates from that without distortion. Since the distortion is distributed along the radial direction, the Δg 0 ðrÞ can be used to quantify the degree of distortion, and the value of r can be used to describe the DF value. Therefore, the DF value can be directly related to the size of the sampling ROI image, and the maximum size of the valid sampling ROI image is 1, where DF value is equal to α. Here, α is the maximum non-distorted factor, that is, the geometric distortion of the relevant sampling ROI image is negligible, and it corresponds to 0.05 for both directions based on the slope of the local magnification in Fig. 3(b) where the local magnification has a slope close to zero. The horizontal pixel length and vertical pixel width for the valid ROI image are equal to α × L and α × W, respectively, where L and W are both equal to 891. Then the matrix size for the valid sampling ROI ranges from 2f max × 2f max to α 2 × L × W, where α 2 × L × W represents the maximum matrix size of the valid sampling ROI image, that is, the matrix range for the valid sampling ROI image is from 33 × 33 to 44 × 44. Then the valid sampling ROI image can be approximated as an imaging region with uniform magnification, and its data process can refer to a linear procedure. As for the magnification function of the experimental system shown in Fig. 3(c), it is written as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 0 ; 1 1 6 ; 6 7 5 where c is the magnification value of the valid sampling ROI image, and its value of 0.19 is greater than M min so as to avoid the frequency aliasing for the experimental results.

Extended Sampling ROI Image by Distortion Correction Manner
As mentioned above, geometric distortion directly leads to non-uniform magnification, compromising the uniformity of the sampling ROI image. So to increase accuracy of the MTF evaluation, the size of the valid sampling ROI image is limited within the size determined by the maximum non-distorted factor α. To obtain an extended uniform sampling ROI image, the geometric distortion correction manner is performed on the target image to compensate for the attenuation of magnification. Therefore, by dividing the function g 0 ðrÞ, the corrected image can be written as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 1 1 ; 1 1 6 ; 5 0 0 where ij stands for the meridional and sagittal coordinates in the original image, and i 0 j 0 represents the coordinates in the corrected image. It is worth noting that a pixel coordinate point of the corrected image may correspond to the position among several coordinate points on the target image. Therefore, grayscale interpolation is required to calculate the grayscale value of the corrected pixel coordinate points. To keep the frequency content of the corrected image as much as possible, the nearest neighbor interpolation algorithm is used in the distortion correction manner to resample the grayscale values of the coordinate points in the corrected image shown in Fig. 4. Then base on Eq. (11), the size of the valid sampling ROI image can be extended for the MTF evaluation.

MTF Results
The difference between the evaluated MTF and the theoretical MTF is used as an evaluating index. This index describes the relative root mean square error (RMSE) of the MTF evaluation, where n represents the total number of measured frequencies, i ¼ 1: : : n; MTF i;evaluated ðfÞ stands for the evaluated result of MTF i;theoretical ðfÞ at the i'th frequency; and MTF i;theoretical ðfÞ stands for the theoretical result at the i'th frequency. Thus, smaller R RMSE values indicate higher measurement accuracy.
As presented in Fig. 5, the analysis between the DF and the size of the sampling ROI image shows the relationship between geometric distortion and MTF evaluation. As DF value is no more than α, that is, the size of the valid sampling ROI images within the range of 33 × 33 and 44 × 44 such as 36 × 36, 40 × 40, and 44 × 44, their MTF curves are close to each other. Then the MTF curves are compared with that of the theoretical prediction, their R RMSE values are 6.5%, 7.3%, and 7.6% (7.2% on average), respectively. As DF value is between α and 2 × α, that is, the matrix size of the sampling ROI image within the range of 44 × 44 and 90 × 90, their MTF curves obviously drop at lower frequencies, and their R RMSE values rise to 8.2% to 11.7% (10.1% on average). Thus as the DF value continues to increase, the R RMSE value also continues to rise. For example, as DF value exceeds 2.5 × α, the R RMSE value is more than 14.7%. As the DF value reaches 10 × α, the corresponding MTF curve deteriorates drastically. This shows that DF value has a significant impact on the accuracy of the MTF evaluation. Therefore, the size of the valid sampling ROI image based on the DF manner is limited to the size, where DF value is equal to α.
As the distortion correction manner is applied to the target image, the results of the MTF evaluation based on the corrected ROI images are shown in Fig. 6. As DF value is no more than α, the sampling ROI images such as 36 × 36, 40 × 40, and 44 × 44, their R RMSE values drop to 3.8%, 3.9%, and 4.2% (4% on average), respectively. The results indicate that the MTF curves are further optimized compared with the DF manner. As DF value is between α and 2 × α, the MTF curves are improved at low frequencies compared with those corresponding curves based on the DF manner. The average R RMSE value drops to 6%, which means an average 40% reduction occurs. The results indicate that the distortion correction manner is superior to the DF manner in which the average R RMSE value is reduced from 10.1% to 6%, which is an obvious improvement compared with 7.2% based on the maximum non-DF α. Therefore, a 1.2% improvement of accuracy reflects that the distortion correction manner relaxes the DF value to 2 × α, extends the sampling ROI image to twice that of the DF manner, and reduces the average R RMSE value to 6%. Therefore, the size of the valid sampling ROI image based on the distortion correction manner can extend to twice the size of the valid sampling ROI image based on the DF manner. Even as DF value increases to 2.5 × α, the R RMSE value drops to 11.4%, thus optimized by 22%. However, as the DF value exceeds 3 × α, that is, the size of the sampling ROI image extends outward from the central FOV, the blur caused by field curvature begins to be included in the sampling ROI image. Due to field curvature, the sharpness of the image to gradually change from the central FOV to the edges, and the distortion correction manner helps the blur distribution caused by the field curvature to be more uniform. This leads to a more prominent influence of field curvature on the results of the MTF evaluation, thereby weakening the frequencies. This indicates that the distortion correction manner can better distinguish the influence of field curvature on the results of the MTF evaluation.

Conclusions
An LMTF method is successfully demonstrated for imaging evaluation of the MRE. This method establishes a mathematical model of geometric distortion and analyzes two sampling ROI image manners in MTF evaluation. Compared with the distorted factor manner, the geometric distortion correction manner relaxes the DF value to 2 × α, extends the sampling ROI image to twice that of the DF manner, reduces the average R RMSE value to 6%, and improves average accuracy on MTF by 1.2%. The experimental results provide good agreement with the theoretical prediction. The SMTF method provides a feasible solution for the optical lenses with poorly corrected geometric distortion.