A software simmulation of Hartmann-Schack patterns for real corneas L. A. Carvalho*, Jarbas C. Castro*, P. Schor, W. Chamon *Instituto de Física de São Carlos (IFSC - USP), Brazil lavcf@ifsc.sc.usp.br Escola Paulista de Medicina (EPM), Universidade Federal de São Paulo, Brazil We have implemented a computer simulation of Hartmann-Shack (HS) patterns for real corneas. Placido images were captured for 10 eyes (right and left eyes of 5 mails and 5 females) on a standard corneal topographer. Placido disc data was then processed for calculation of 6000 corneal elevation points. The corneal data points were attached to a Gullstrand standard model eye globe (12 mm in radius) and used to simulate HS patterns. Ray tracing starts at a CCD array towards a 15x15 array of micro-lenses and then hits the cornea, cristaline and fovea. Patterns were compared with actual HS images, and cases of high astigmatic and keratoconic eyes were analyzed. 1. Introduction Wave-front aberration measurement using the HS sensor [1] has become quite popular in the past few years [2, 3, 4, 5, 6, 7]. We believe this has happened because this technology represents the next step in eye refraction measurements. Present commercially available methods of refraction measure only a few points over the entrance pupil and therefore can calculate only the best sphere-cylinder correction [8, 9]. With the recent advances in true corneal elevation calculations [10, 11, 12, 13] and refractive surgery lasers (the eye tracking system and the Flying Spot technology), the need for a higher resolution refractor became obvious. One of the major problems in these measurements is that, for some eyes with high corneal aberrations, there is an overlapping of the small spots at the HS image plane [14]. In this work we simulate HS patterns for real and simulated corneas, based on corneal topography elevation maps. We show HS patterns for real corneas with smooth surfaces and astigmatism and a simulated keratoconic cornea. We believe that further work should be done in order to evaluate the best relation between the HS components. There should be and optimized setup for micro-lens focal distance/diameter, CCD size and distance, optical quality and material, and the irregularities of real pre and post surgical corneas, in order to minimize spot overlapping and improve precision of instruments that use the HS principle. 2. Methods
We have used a high precision algorithm that calculates corneal elevation from Placido images [13]. For each meridian we have corneal elevation information as a function of radial distance ( h ( ρ,θ ), see figure 1 for coordinate system). Elevation data may be expressed as a polynomial expansion. We have used Zernike polynomials [14, 15] since these have been shown to be a convenient mathematical representation for corneal elevation and aberrations [16, 17]. The corneal surface is expressed as a linear combination of N Zernike terms: N 1 i= 0 (, θ ) = ( h ρ C i Z i ρ, θ ) (1) Figure 1. Cylindrical coordinate system used to describe coorneal elevation and aberrations. Where the Zernike coefficients were calculated by the classical least-squares method, consisting of minimizing the expression
j i C Z i i ( ρ, θ ) h j 2 (2) Figure 2. Parameters of the Le Grand Model eye. Our model eye is a sphere of radius 12 mm with refractive the following parameters: distance between posterior surface of cornea and anterior surface of crystalline (3.05 mm), crystalline thickness (4.00 mm), distance between posterior surface of crystalline and fovea (16.53 mm), anterior radius of curvature of crystalline ( 10.2 mm), posterior radius of curvature of crystalline ( n = n = r p = 6.0 mm), index off refraction of crystalline ( c 1.42 mm), index of refraction of vitreous humor ( vh 1.336), diameter of fovea (0.01 mm). Crystalline here is considered to be accommodated and to have a constant shape. Our real corneas are positioned such that the distance between corneal posterior surface and fovea is always 24.13 mm, and posterior surface of cornea is considered to have constant radius of curvature of 6.5 mm. Pupil size is 4 mm in diameter in all cases. r a =
since the cornea contributes to approximately 75% of all refraction of the eye, we have used a standard model eye with a crystalline of anterior radius of curvature of 10.2 mm and posterior of 6 mm with constant index of refraction of 1.42 (see other eye parameters in figure 2). Ten different adult eyes with pathologies that ranged from almost spherical, astigmatism and high astigmatism, were measured and elevation data was processed and saved. This data was then plugged into the model eye and a backward ray tracing was implemented (see figure 3 for details of the ray tracing path). Several thousand light rays for each micro-lens were ray traced paraxial from HS lenslet into the eye. From the expression for the corneal surface (equation 1) we calculated the normal vectors at each ray intersection h h nˆ ( θ, ρ ) = ˆ ρ + ˆ θ kˆ (3) ρ θ where kˆ is the unit vector pointing towards the elevation axis ( h ). The refraction at all interfaces was calculated using Snell s Law, where the angles of incidence are given by ( ˆ. v) θ = arccos n r (4) where v r are the normalized vectors of ray direction. Those rays that hit the fovea (a 10 µ m spot) were considered good rays and those that didn t were considered bad rays (see figure 3). In this way a simulated HS pattern was obtained. Our HS sensor has 15x15 micro-lenses (each lens 1 mm in diameter) with 170 mm focal distance.
Figure 3. Ray-tracing diagram for generating the HS image pattern. We start by sampling pixels at the CCD array (480x640) and back-word ray trace from CCD plane towards the cornea. V1, V2 and V3 represent vectors at each refraction stage. Rays refract at micro-lens then at cornea and finally hits the retina. If it falls inside the fovea (a 10 µ m disc) it is said to be a good ray, otherwise it is a bad ray. When a ray falls inside the retina we save the Cartesian coordinates ( x, y ) of it s original starting pixel. The closer it falls to center of the fovea the brighter it is painted in a 255 gray-scale. If it falls off the fovea it is a black pixel. The corneal elevation data is attached to the model eye such that the apex is always 24.13 mm away from the fovea. 3. Results Illustration of simulated HS patterns obtained for three interesting cases are shown in figure 4. In general we notice that for eyes with little corneal irregularities ( smooth corneas) the spots have a quite well behaved distribution; on the other hand for eyes with high astigmatism, keratocone or other severe corneal irregularities (such as post RK), there is a superposition of the HS spots. Our HS patterns are in agreement with the corneal elevation data and for most cases of regular ( smooth ) corneas, small and medium astigmatisms, there was no spot overlap (see figure 4). But for cases of severe keratocone (simulated), we observed overlapping (see figure 5). Other types of irregularities should be investigated, such as post-cataract, post-rk, and post-keratoplasty. We believe there will be overlapping for these types of irregular corneas.
Figure 4. Examples of HS simulations for a regular (top) and astigmatic (bottom) corneas. (Top-Left) Hartmann Shack pattern simulation for regular cornea; notice uniform distribution of spots; (top-middle) semi-meridian cut of regular cornea elevation; notice that curve is smooth and there is no local irregularities; (bottom-left) HS pattern for astigmatic eye; notice that spots are closer where corneal curvature is more intense and are further away for less curved region; (bottom-middle) Blue curve represents flatter meridian and red curve represents meridian with higher curvature; (bottomright) curvature map of astigmatic eye, showing the hour glass shape in agreement with HS pattern and meridian cuts; On figure 5 we may see examples of HS patterns obtained for artificial corneas generated using ellipsoids and spheres of different sizes and parameters. It is important to notice how the HS pattern varies with small changes in parameters such as radius of curvature, entrance pupil, HS image plane distance, number and size of micro-lenses, CCD resolution and scaling, and so on. Our objective here is to show a qualitative view of how these parameters affect the HS patterns. Further work should be done in order to quantify these factors, and possibly suggest HS sensor setups that will generate less superposition in cases of highly distorted corneas.
Figure 5. HS patterns generated for simulated corneas. (a) Sphere of radius 8.0 mm, (c) Discentered Keratocone (to the left) with 5 mm local radius over a highly astigmatic ellipsoid (a:=7 mm, b:=5 mm, c:=8 mm), showing the superposition (to the left) case when the surface is off axis; (c) Highly astigmatic ellipsoid (a:=8 mm, b:=5 mm, c:=7.5 mm), showing high distortion of HS patterns. 4. Discussion We have found that the actual HS sensor systems used for ocular aberration measurements may generate spot superposition in certain cases of high corneal irregularities. This happens because the corneal slopes at some points vary rapidly, causing refraction at certain regions to differ considerably from neighbor regions. Once this happens the image processing technique for recovering centroide information becomes challenging. Our finding suggests that further research is necessary in the HS apparatus, it s optical components, associated distances and dimensions, in order to obtain the best optical design for such a device. This study should simulate different optical materials and optical diagrams in order to account for very irregular corneas. The results of such a study will allow manufactures and laboratories to build better wave-front measuring devices for the eye. This in turn will certainly contribute to more accurate refractive surgeries, since corneal ablation algorithms use data from such measurements [18, 19]. Acknowledgements We would like to thank Professor Stanley Klein, Ph.D, from the Vision Science Department of the University of California at Berkeley, for his help and explanations of the algorithm used in this work; we would also like to thank the following institution for financial support: FAPESP (Fundação de Amparo à Pesquisa do Estado de São Paulo Brazil.
References 1. Shack RV, Platt BC, Production and use of a lenticular Hartmann screen, Optical Sciences Center, University of Arizona, Tucson, Spring Meeting, Optical Society of America, 1971: 656. 2. Liang, J., Grimm, B., Goelz, S., Bille, J. F., (1994). Objective measurement of wave aberrations of the human eye with the use of a Hartmann-Shack wave-front sensor. J. Opt. Soc. Am., Vol. 14, No. 11/ July, pp. 1949-1957. 3. Liang, J., Williams, D. R., (1997b). Aberrations and retinal image quality of the normal human eye. J. Opt. Soc. Am., Vol. 14, No. 11/ November, 2873-2883. 4. Liang, J., Williams, D. R., Miller, D. T., (1997a). Supernormal vision and highresolution retinal imaging through adaptive optics, J. Opt. Soc. Am., Vol. 14, No. 11/ November, 2884-2892. 5. Liang, J., Williams, D. R., (1997b). Aberrations and retinal image quality of the normal human eye. J. Opt. Soc. Am., Vol. 14, No. 11/ November, 2873-2883. 6. Moreno-Barriuso, E., Navarro, R., Laser ray tracing versus Hartmann-Shack sensor for measuring optical aberrations in the human eye, J. Opt. Soc. Am., Vol. 17, No. 6/ June 2000, 974-985. 7. Salmon, T. O., Thibos, L. N., Bradley, A., Comparison of the eye s wave-front aberration measured psychophysically and with the Shack-Hartmann wave-front sensor, J. Opt. Soc. Am. Vol. 15, No. 9/ September 1998, 2457-2465. 8. Shikawa Y.Y., Eye refractive power measuring apparatus, US Pattent 4755041. 9. Ventura, L., Souza, S. J. F., Castro, J. C., Detection system for ocular refractive error measurement, Phys. Med. Biol. Vol. 43, 1998: 1303-1316. 10. Mandell, R. B., The Enigma of the Corneal Contour, CLAO J, 1992;18:267-273. 11. Halstead, M. A.,Barsky, Brian A., Klein, Stanley A., Mandell, R. B.,Geometric Modeling of the Cornea Using Videokeratography, Mathematical Methods for Curves and Surfaces,1995;213-223.
12. Halstead, Mark A.,Barsky, Brian A., Klein, Stanley A., Mandell, R. B. A Spline Surface Algorithm for Reconstruction of Corneal Topography from a Videokeratographic Reflection Pattern. Optometry and Vision Science. 1995;72:821-827. 13. Klein, S. A., (1997). Corneal topography algorithm that avoids the skew ray ambiguity and the skew ray error, Optometry and Vision Science, vol. 74, 11: 945-962. 14. Born, M., Principles of Optics, Pergamon Press,1975: 464-466. 15. Williams, C. S., Becklund, O. A., Introduction to the optical transfer function, Wiley- Interscience Publication, New York, 1989. 16. Haman, H., A direct technique for calculating the profile of aberration of the eye measured by a modified Hartamann-Shack apparatus, Optics Communications, Vol. 173, 2000: 23-36. 17. Guirrao A., Artal P., Corneal wave aberration from videokeratography: accuracy and limitations of the procedure, J. Opt. Soc. Am. A/ Vol. 17, No. 6, June 2000, 955-965. 18. Klein, S. A., (1998). Optimal corneal ablation for eyes with arbitrary Hartmann-Shack aberrations, J. Opt. Soc. Am. Vol. 15, No. 9/ September, 2580-2588. 19. Schwiegerling J., Snyder R. W., Custom photorefractive keratectomy ablations for the correction of spherical and cylindrical refractive error and higher-order aberration, J. Opt. Soc. Am. A/ Vol. 15, No. 9, September 1998, 2572-2579.