Improving vision by pupil masking

: We propose an alternative solution to improve visual quality by spatially modulating the amplitude of light passing into the eye (related to the eye's transmittance), in contrast to traditional correction of the wavefront phase (related to the local refractive power). Numerical simulations show that masking the aberrated areas at the pupil plane should enhance visual function, especially in highly aberrated eyes. This correction could be implemented in practice using customized contact or intraocular lenses.


Introduction
The famous physiologist Hermann von Helmholtz wrote in 1885 (Helmholtz): «For the eye has every possible defect that can be found in an optical instrument, and even some which are peculiar to itself» [1]. Helmholtz referred to all kinds of aberrations in the human eye, among which, low order monochromatic ones are corrected by using artificial systems (ophthalmic, contact or intraocular lenses) or modifying some optical element by refractive surgery. High order monochromatic aberrations can be also corrected. For example, aspheric intraocular lenses are able to correct the spherical aberration of pseudophakic eyes [2]. For distance objects viewed with an unaccommodated eye, a full phase aberration correction is equivalent to producing a full phase conjugation of the aberrated wavefront generated by the eye. Most methods used to improve the image quality of a certain optical system use the strategy of modifying the pupil function: ( , ) ( , ) ( , ) ikW x y P x y A x y e = by adding a conjugate phase of the form, -W(x,y) to make the final phase as low as possible. For example, adaptive optics is successfully applied in vision science under laboratory conditions, where a dynamic correction is needed because of temporal variations in phase distortions [3].
However, another strategy can be used to improve image quality in artificial optical systems, based on removing those areas of the wavefront that give rise to poor optical quality. This approach, which modifies the amplitude function A(x,y) in Eq. (1), is well known in astronomical science and is called the adaptive pupil masking technique. It uses a dynamic pupil mask in addition to a conventional adaptive optical system, so regions of the wavefront that contain large phase errors are masked, therefore removed [4]. It can be considered a spatial analogue of the Lucky Imaging-type techniques that consist in recording many shortexposure images, selecting the appropriate fraction of these images according to their quality and joining them to improve results [5,6].
Changes in human vision by modifying the amplitude function have been explored previously. It has been used in the form of pinhole contact lenses to improve vision in eyes with markedly irregular corneas [7]. Furthermore, the benefits on vision of the Stiles-Crawford effects [8][9][10][11][12] can be potentially simulated with an apodized pupil [13,14]. It has also been shown that the natural limitation of the eyelids caused by ptosis may itself modify the refractive state of the eye [10]. Moreover, apodized pupils have been studied to expand depth of field [15]. In particular, an intracorneal implant called «corneal inlay», consisting of a small-centered (stenopeic) aperture, has actually been implanted to expand depth of field of presbyopes [16].
In this paper we describe a novel method of improving the retinal image of aberrated human eyes, by blocking those areas of the wavefront which most degrade retinal image quality using a static binary pupil mask.

Algorithm to find the optimized binary pupil
We implemented a purpose designed wavefront analysis tool based in Fourier-optics methods and developed in MATLAB (MATLAB and Statistics Toolbox Release 2012b, The MathWorks, Inc., Natick, Massachusetts, United States). The software requires the ocular or corneal Zernike coefficients values (up to 6th order) [17] and the pupil size of a patient as input data. The output is the binary pupil shape that maximizes a certain image quality metric.
There are many metrics related to the quality of vision [18]. Some of them measure the quality of the optical system at the pupil plane but others compute a certain value in the retinal (Fourier) plane. In this work we chose one from the second type, in order to take into account the diffractive effects of the artificial pupil. This will avoid, for instance, arriving at solutions with large narrow pupils, whose diffractive effects will lower the contrast in the retinal images. In particular we selected a modified version of the visually modulated transfer function metric (VSMTF). This metric corresponds to the volume Modulation Transfer Function (MTF) weighted by the neural contrast sensitivity function (CSF N ) [19]. VSMTF metric is known from previous experiments to account well for changes in the visually relevant range of spatial frequencies [18][19][20][21]. VSMTF is thus based on the Strehl ratio definition which is normalized by the diffractive limited system. However, as we want to compare the values of the image quality metric obtained with pupils with different shapes, we removed the normalization factor of the original definition [19], so the mathematical definition of the metric to be used was: A low value of VSMTF_ABS means a loss of volume under MTF in the visually relevant range of spatial frequencies and so a degradation of the image quality, which is directly related with visual acuity [22]. In the MTF calculation, an apodized filter was also included in the amplitude function to simulate the Stiles-Crawford effect [12].
In the algorithm, as a previous step, primary astigmatism is removed and the subject's best spectacle correction is simulated by finding the defocus term which maximizes the image quality metric for the full pupil. In the present work, we are supposing that a patient can correct their low order aberrations with glasses or other methods like contact lenses or intraocular lenses, so we have removed those terms in the calculations. If the proposed method will be adapted for example in intraocular lenses or contact lenses, defocus and astigmatism could be compensated by simply adding such correction to the device which support the artificial pupil.
The original pupil is initially sampled into a square of 256x256 pixels and binary combinations of those pixels (values of 1 and 0 represent transparency of 100% and 0%, respectively) are evaluated. Due to the huge amount of computational work needed to evaluate all combinations of sub-apertures, a custom region-growing algorithm was designed. Examples of this type of algorithm can be found in the literature [23]. It examines the neighboring pixels of initial seed points and determines whether these neighbors should be added to the region. It therefore involves the selection of an initial seed point. To select the seed point, firstly the absolute value of the slope of the wavefront is calculated in every pixel. Second, the pixel with the wavefront slope value nearest to zero was selected as seed point. The region is then grown from this seed point to adjacent points, according to a region membership criterion based on the absolute value of the wavefront slope in every pixel. If the slope value of the wavefront of a certain pixel, adjacent to a pixel already member of the region, is below the threshold value, it is added to the pupil. Different threshold values are selected according to the distribution of slope values and each different threshold value leads to a different pupil shape. As the threshold value increases, the area of the obtained pupil also increases, tending to the original circular pupil shape. Algorithm stops when the original circular pupil shape is obtained.
Consecutively, the procedure is repeated changing the seed point considering all the pixels with a slope below the 5th percentile. In this manner, a variety of different pupil shapes are obtained according to different combinations of seed points and threshold values. The one with the maximum value of VSMTF_ABS metric is selected as the result. Only pupils that fulfill certain requirements are evaluated as possible outputs: 1) Single aperture (multilobular pupils are not considered in this study); 2) Continuous pupils that do not contain opaque inner isolated islands, which would be difficult to construct physically; 3) Pupils with a minimum area equivalent to the area of a circular pupil of 4 mm in diameter (around 12.6 mm 2 ). This selection is based in a retinal illumination criterium detailed in the discussion.
Furthermore, this region-growing method can result in shapes with sharp corners due to pixilation or with small invaginations or evaginations. These particular shapes will result in complicated diffraction patterns which may deteriorate the Point Spread Function (PSF), and are complicated to build. As a way to diminish this effect, a cubic smoothing spline algorithm was applied to every possible output in order to obtain smoothed shapes. In addition, as different pupil sizes could vary the best spherical refraction of an eye [24], the algorithm also re-adjusts the defocus value, simulating the best spectacle correction for every pupil shape.

Simulations
The algorithm described in the previous sub-section was applied to a sample of 20 eyes. Eight eyes were healthy with normal aberration values, 8 were keratoconic and 4 were eyes which underwent a previous keratoplasty procedure. Aberration data for 5 mm pupil diameter from 6 of those eyes were taken from a data set previously published (2 myopic healthy eyes, 2 keratoconic and 2 with previous keratoplasty) [25]. For the remaining eyes, aberration coefficients were measured for a 6 mm pupil diameter with a commercial Shack-Hartmann wavefront-based aberrometer (irx3, Imagine Eyes, France). All calculations were made in monochromatic light for 780 nm, corresponding to the wavelength used by the aberrometer. The VSMTF_ABS was obtained for the output (therefore the optimized pupil) and compared with the value obtained using the centered circular pupil which yields the best result in terms of VSMTF_ABS (therefore the best centered circular pupil) with the same size restrictions than in the case of the optimized pupil: only pupils with an area equal or above the area of a circular pupil of 4 mm in diameter are considered. The tolerance of the optimized pupil to rotations and decentrations was also checked. Each optimized pupil was rotated in z-axis clockwise and counterclockwise until a value of VSMTF_ABS equal to that obtained with the best centered circular pupil was reached. Each optimized pupil was also decentrated in x and y axis for eight equidistant directions (45, 90, 135, 180, 225, 270, 315 and 360°) until a value of VSMTF_ABS equal to that obtained with the best centered circular pupil was reached or the optimized pupil edge exceeded that of the original pupil.
As an example, we will show in detail the results of 2 of the 20 eyes, one healthy and one keratoconic, whose high order aberration Zernike values are shown in Table 1. The VSMTF_ABS, MTF, PSF and its convolution with an image were obtained for these two eyes. To verify the improvement of the optimized pupil found by the algorithm, the VSMTF_ABS, PSF and MTF were compared with the values obtained using the best centered circular pupil. Figure 1 shows the wavefront of a normal and a keratoconic eye for a 6 mm pupil diameter. These eyes correspond to eye 8 and 10 of Table 2, respectively. The residual root mean square error corresponding to the high order aberrations (HORMS) was 0.63 μm (0.81 λ) and 4.36 μm (5.59 λ) for the normal and the keratoconic eye, respectively. Figure 1 also shows the shapes of the binary optimized pupils that were computed using that wavefront. VSMTF_ABS improved 19.2% (from 11.54 to 14.28) in the healthy eye when using the optimized pupil of Fig. 1 than the best centered circular pupil. In the case of the keratoconic eye this improvement was 26.3% (from 1.23 to 1.67). The best centered circular pupil had a 4 mm pupil diameter in both examples (the smallest permitted) while the areas of the optimized pupils corresponded to the area of a circle of a diameter of 4.08 and 4.07 mm for the normal and keratoconic eyes, respectively. Figure 2 shows the logarithm radially averaged MTFs for the optimized pupil and the best centered circular pupil. The optimized pupil shows a higher contrast transfer for all spatial frequencies than the best centered circular pupil.    Figure 4 shows the result of convolving the PSFs of Fig. 3 with a Landolt C (visual acuity of 0.1 logMAR) for the normal and for the keratoconic eye. Again, although the optimized pupil gives the best image quality, differences of simulated retinal images between pupils are small in the normal eye, but not in the highly aberrated eye. In the case of the keratoconic eye, the convolved image improves the detection of the aperture of the Landolt C, which is related to the visual acuity. The improvement turns relatively small, probably because it is hided by the gusty images. However, the use of an irregular pupil by this keratoconic eye clearly may benefits by the increases in contrast of the retinal image.

Detailed examples
Finally, Fig. 5 shows the variation in the VSMTF_ABS of the optimized pupil with rotation. The horizontal line represents the VSMTF_ABS value of the best centered circular pupil (11.54 and 1.23 for the normal and keratoconic eye, respectively). In the normal eye, the optimized pupil could be rotated approximatively from −38° to + 38° clockwise while maintaining a VSMTF_ABS value higher than the one obtained by the best centered circular pupil. The tolerance to rotations is higher in the case of the keratoconic eye from −55° to + 157° clockwise.   Table-2 shows, for each analyzed eye, the VSMTF_ABS values for the optimized pupil and for the best centered circular pupil, which was 4mm diameter in all cases (the smallest permitted). The optimized pupil improved the metric value in all cases (18.07% ± 9.47%). As the algorithm gives preference to the pupil with the largest area for equal metric values, in some cases the optimized pupil gives better value of VSMTF_ABS but with a significant increase of the area when compared with a circular pupil of 4 mm diameter. Table 2 also shows the minimum angle (clockwise or counterclockwise) that the pupil can be rotated until the value of VSMTF_ABS of the best centered circular pupil is reached. Likewise, the minimum decentration in any of the tested directions (45, 90, 135, 180, 225, 270, 315 and 360 °) until the value of VSMTF_ABS of the best centered circular pupil is reached is reported in the right most column.

Discussion
Our simulations showed it is possible to improve human visual quality by implementation of non-circular customized pupils, masking those areas of the pupil with poor optical quality. It could provide more practical solutions than those in use previously. In a previous work, Cheng X et al. [26] have introduced the term "pupil fraction" defined as the proportion of the pupillary area for which the optical quality of the eye meets a certain criterion representing good optical quality but not necessarily diffraction-limited. However, they did not explore the possibility of using such a technique to identify a pupil shape which improves image quality beyond that achievable with a circular pupil taking into account that diffraction effects may also deteriorate the retinal image quality. Another similar approach was made by Chao et al. [14], who optimized a two-dimensional Gaussian pupil function in order to maximize the energy under the main lobe of the PSF. There exists some differences between both approaches. Optimization of a two-dimensional Gaussian function implies some degree of symmetry which does not occur with our technique where any pupil shape is possible. Additionally, there exist important differences in the surgical approach of both techniques. For example, if they are used for the treatment of aniridia, although both techniques involve complex surgeries, implantation of an artificial pupil with a true aperture will be less likely to interfere with aqueous flow than an implant with a Gaussian transmission profile.
Except in case of aniridia, subjet's natural pupil will still be usefull to control retinal illumination under this type of correction, although we are just imposing a maximum value for pupil area. In addition to the anticipated night-time reduction in retinal illuminance caused by optimized pupils (when natural pupils can be >7mm in diameter), retinal illuminance may also be reduced at high photopic light levels if the optimized pupil is highly decentered and thus partially vignetted by the constricted iris pupil. A critical point in this technique is to set a minimum value for the area of the optimized pupil. Image quality for a typical human eye is optimized with a 2-3 mm diameter pupil [27], as is photopic visual acuity [28]. However, as light levels fall, the pupil size that produces best acuity [29], and best visually weighted image quality [30] increases. Therefore, although current surgical pupil implants employ very small pupils (e.g. 1.6 mm diameter, KAMRA), we chose to identify the optimum pupil that had an area at least equivalent to that of a 4mm circular pupil. If we had allowed much smaller pupils, peak image quality would have been higher, but retinal illuminance would have been lower leading to reduced contrast sensitivity at low light levels [31]. In addition to the visual effects of very small pupils at low light levels, retinal examination or retinal surgery could be compromised [32] by a small pupil generated with either corneal tattoos or an IOL. The current algorithm can be adjusted to identify optimum pupils of any size, and the VSMTF metric can be modified to include low light level neural contrast thresholds.
The algorithm improved the metric using a non-circular pupil in all tested cases. However, the amount of improvement depends of the wavefront configuration of each eye and while in some cases there was an important improvement in the metric, in other cases the improvement was small. Clearly, the value of this technique will be greatest in eyes that have spatially separate regions with good and with poor optical quality. If poor optical quality is distributed uniformly across the natural pupil, there will be little benefit of such optimized pupils.This indicates that the success of this technique depends of the appropriated selection of the subjects. In highly aberrated eyes it was obtained an improvement of 19.8% in the VSMTF_ABS metric with respect the centered circular pupil, in contrast with the 15.4% improvement found in normal eyes, indicating that, in mean, the larger the HOA presented in the eye, the higher benefits is obtained using this technique. Nevertheless, the sample analyzed did not present a statistical difference between groups (p = 0.16, Student's t Test). Regarding the whole sample of eyes, the total improvement obtained was 18%. It is interesting to note that in some cases the highest value of VSMTF_ABS was found in a pupil with effective area significantly larger than the minimum area allowed, allowing improvement of the metric with higher retinal illuminance. Due to the fact that these parameters were different for each tested eye, if this technique would be used in a real case, a previous analysis should be performed for knowing if the expected result justifies the manufacture of a customized pupil.
In the detailed examples, a customized pupil shape was calculated for a healthy eye. The MTF curve was found to be just above the MTF of a circular pupil as can be seen in Fig. 2. In terms of VSMTF_ABS, the improvement with respect the best centered circular pupil was not negligible (around 19.2%). We also obtained (not shown in the Results section) the 4-mm circular pupil centered in the centroid of the optimized pupil and the best fit of the customized pupil to an ellipse, obtaining improvements in the metric of 4% and 11%, respectively, which are below the result obtained with the optimized pupil. As expected, Fig. 4(A) indicates that a centered circular pupil seems to be a relatively good pupil shape for the healthy eye of the example. However, we should take into account that PSF, and particularly MTF, are very sensitive for very high quality optical systems (near diffraction limited), but quite insensitive for aberrated systems like that of the human eye [33]. So, applying the algorithm to the healthy and keratoconic eye of the detailed examples shows that the room for visual improvement in the almost non aberrated eye is small in comparison with a highly aberrated one.
Tolerance to rotation and decentration of the optimized pupil was large in all cases. Although it depended on the specific aberration configuration of each eye, tolerance to rotation was greater than the rotation in the typical phase correction systems, such as intraocular lenses, typically about 4° [2], or contact lenses, up to 6° [34]. The main reason is that the rotation of a classical correction does not just cancel the original phase of the eye, but generates an extra phase which may increase the RMS of the whole system: "eye+correction" [25,35,36]. This idea can be easily understood when the astigmatism is "corrected" with a cylindrical lens rotated 90°, generating twice the astigmatism instead of canceling it. Figure 5 shows the curve of tolerance to rotations in the two detailed examples. The relative insensitivity and the asymmetries found in Figs. 5(A) and 5(B) reveal that it is important to block the most aberrated areas of the pupil. Decentration tolerance was explored by decentering the optimized pupil in 8 directions. Table 2 also shows the minimum decentration in any direction which reached the VSMTF_ABS value of the best centered circular pupil. Results showed a moderate tolerance to decentration which is near the decentration in intraocular lenses, typically about 0.4 mm [35].
This technique would be useful in the case of damaged eyes where modification of the aperture stop of the eye is already needed. For example, it has been demonstrated that limiting the amount of light that enters the eye using circular artificial irises is highly recommended to improve visual quality in cases such as aniridia or iris defects [37,38]. A straightforward application of this technique would be the implantation of an artificial pupil in eyes with aniridia, or the design of corneal tattoos or pupilloplasty. It has shown that implantation of artificial circular pupils in eyes with aniridia could provide good visual outcomes and a positive impact on patient quality of life [38]. It has been shown that decimal visual acuity can increase 0.3-0.4 after using a binary artificial circular pupil [38]. However, ophthalmologists do not have any tools to calculate the most suitable size for the pupil to be implanted and usually the decision is taken by using a similar pupil diameter to the contralateral eye. The use of such a pupil is usually for aesthetic reasons, however an irregular pupil can be used on a circular opaque black edge (see Fig. 1), that mimics a circular pupil. If the masking is performed in the corneal plane (i.e. by using CLs or corneal tattoos), it may limit the patient's field of view in an asymmetric way [39], such a field loss will not occur if optimized pupils are implemented close to iris plane. Also, in patients with active keratoconus, the aberrations may not be stable, and perhaps not well suited to any permanent surgical implantation. However, it has yet to be shown if the optimized pupil shifts during the emergence of keratoconus.
The main goal of the present study was to examine the theoretical improvements of the retinal image quality in monochromatic light with special interest in highly aberrated eyes. However, further analysis has to be carried out in polychromatic light, to evaluate the potential impact (deterioration or improvement) of polychromatic image quality through irregular pupils due to traverse chromatic aberration [40,41]. The algorithm used has some limitations and did not take into account multilobular pupils, pupils with internal opacities, or apodized pupils. If considered, the time of computation was greatly expanded and they did not provide better solutions than those presented in either of the analyzed eyes. However, such pupils may be useful in some cases, for example, in corneas with central scars. Nevertheless, they can be included in the algorithm if a customized pupil needs to be calculated in a special case. Also, this technique should not be used by mean of a surgery (i.e. IOL implantation) in patients with conditions such an active keratoconus, where the aberrations may not be stable. Furthermore, digital micro-mirror device technology is now reaching a highly developed stage and could easily handle the update rates and chip sizes required for the pupil mask [42]. This method could be used as well in the pupil plane of many devices which explore the fundus of the eye, to improve the resulting digital image.