Wavefront optics toolbox

From Psych 221 Image Systems Engineering
Revision as of 07:54, 19 March 2012 by imported>Psych2012 (Diffraction-limited PSF and the eye)
Jump to navigation Jump to search

Back to Psych221-Projects-2012

We worked with the WavefrontOpticsToolbox, located in a SVN repository at https://platypus.psych.upenn.edu/repos/toolboxes/WavefrontOpticsToolbox/trunk. This toolbox models the optics of the human eye using scalar diffraction theory from Fourier optics. In particular, the aberrations of the human cornea, pupil, and lens, as well as the Stiles-Crawford effect from retinal cone cells, are modeled by the amplitude and phase of the eye's pupil function. This pupil function is then Fourier transformed to compute the eye's point spread function (PSF).

The project is split into two sections: 1) code clean-up and commenting and 2) the creation of a MATLAB tutorial to demonstrate some of the features of the toolbox.


Background

Ray optics, or geometric optics, is concerned with modeling how light rays travel through optical systems like that of our eyes. However, to fully consider the effects of small pupil size, as well as variations in the geometry and chromatic aberrations of the eye's lenses, wave optics and diffraction must be accounted for. Fourier optics, or scalar diffraction theory, cleanly handles effects such as wavefront aberrations, finite pupil size, and apodizing filtering, so we will first briefly give a background of Fourier optics. Next, we will discuss how wavefront aberrations are modeled, namely by the basis set of Zernike polynomials. Finally, we will describe the Stiles-Crawford effect, the physical cause of this effect, and how it is modeled.

Fourier optics

Huygens-Fresnel principle

Fourier optics is built upon the idea that the wave nature of light is modeled by the Huygens-Fresnel principle -- that every point on a wavefront of light is the source of new spherical waves. The summed interaction of these spherical waves at some observation plane determines what is observed at that plane. Here, it is assumed that the polarization of the electromagnetic field can be neglected, and instead, light can simply be modeled by a wavefunction that obeys the standard wave equation and represents electric or magnetic field. Hence, this is called scalar diffraction theory.

A direct result of this theory is that the diffraction effects of any imaging system can be modeled very cleanly by Fourier transforms. In fact the point spread function of an imaging system is given by [1]

h(u,v)=AλziP(x,y)exp{j2πλzi(ux+vy)}dxdy

where A is a constant amplitude, λ is the wavelength of monochromatic light, zi is the distance from the exit pupil to the image plane, P(x,y) is the pupil's complex transmittance function, (u,v) are image coordinates, and (x,y) are coordinates in the pupil plane. Thus, we can see that the PSF is just the Fraunhofer diffraction pattern, or Fourier transform, of the exit pupil. The intensity actually observed on the retina is |PSF|2.

The expression above has several consequences for modeling the PSF of the human eye. First, it handles monochromatic light, so in order to obtain the polychromatic PSF, the equation above must be computed for several (or many) wavelengths of light. Secondly, care must be taken to sample P(x,y) finely enough to avoid aliasing; the phase of this function must be slowly varying at the chosen sampling rate. In addition, care must be taken to pad P(x,y) with enough zero values to avoid "ringing" effects associated with the periodic boundary conditions of the discrete Fourier transform.

Diffraction-limited PSF and the eye

The pupil function P(x,y) of a diffraction-limited optical system is simply given by [1]

P(x,y)=circ(x2+y2w)

where circ(r) is 1 for r1 and 0 for r>1 and w is the radius of the pupil.

Airy disk

The Fourier transform of a circular pupil is the so-called Airy disk, given by [1]

U(r)=exp(jkz)exp(jkr22z)Ajλz[2J1(kwr/z)kwr/z]

where k=2π/λ, z is the distance from the pupil to the retina, and J1 is a Bessel function of the first kind.

Here, the diffraction-limited pupil function is a real function that has uniform amplitude. However, there are two effects in human eyes that make their PSFs non-ideal. The first is wavefront aberrations caused by distortions of the cornea, pupil, and lens of the eye. These are modeled by a complex phase function W(x,y) that modifies the pupil function. The second arises from the waveguide-like nature of the cone cells in the retina, which only capture light over a limited angular range. This is modeled by a amplitude variation A(x,y) in the pupil function. Thus, in general, we can model the complex pupil function as

P(x,y)=A(x,y)exp[jkW(x,y)]circ(x2+y2w)

Wavefront aberrations and Zernike polynomials

Zernike polynomials in pyramid arrangement

As stated above, wavefront aberrations are modeled by phase variations in the pupil function. In order to conveniently describe the different types of aberrations that occur, the Optical Society has developed a standard convention [2] based upon the orthogonal set of Zernike polynomials. These polynomials are orthogonal over the unit circle. They are indexed either by a pair of numbers (n,m) or by their overall mode number j. The radial order n specifies the power of the radial portion of the polynomial, while the angular frequency m specifies the number of angular nodes. For each radial order n, there are n+1 polynomials forming a pyramid structure. To make indexing more convenient, especially when computing these functions in software, the single index j=[n(n+2)+m]/2 is widely used and adopted here.

Notable polynomials and their aberration names are given below.

Zernike polynomial Aberration name
Z0(ρ,θ)=1 Piston
Z1(ρ,θ)=2ρsinθ y tilt
Z2(ρ,θ)=2ρcosθ x tilt
Z3(ρ,θ)=6ρ2sin2θ Primary astigmatism at 45
Z4(ρ,θ)=3(2ρ21) Defocus
Z5(ρ,θ)=6ρ2cos2θ Primary astigmatism at 0
Z7(ρ,θ)=8(3ρ32ρ)sinθ Primary y coma
Z8(ρ,θ)=8(3ρ32ρ)cosθ Primary x coma
Z12(ρ,θ)=5(6ρ46ρ2+1) Primary spherical

Stiles-Crawford effect

The Stiles-Crawford effect arises from the tall waveguide-like nature of cone cells. Reported in 1933 by W.S. Stiles and B.H. Crawford [3], light impinging on the retina invokes different responses in cone cells based upon the incident angle. In the pupil plane, this suggests that rays entering the center of the pupil more efficiently excite photoreceptors compared to rays entering the edges of the pupil. Although this effect is strictly retinal in nature, it is modeled by an attenuating filter on the pupil function. It is hypothesized that this effect improves vision by decreasing the cone's response to aberrated or scattered light, especially since phase aberrations are worse near the edges of the pupil.

The model of the Stiles-Crawford effect is an exponentially decaying amplitude function [4]

A(x,y)=exp(α[(xx0)2+(yy0)2])

where α0.116 is an apodization factor and the peak location of transmission is given by (x0,y0)(0.47,0.20)mm.


Toolbox code clean-up

text text text

Subheading

text text text

Subsubheading

text text text


Tutorial

text text text

Zernike polynomials

text text text

Stiles-Crawford effect

text text text

Human eye aberrations and correction using eyeglasses

text text text


Conclusions and future directions

text text text


References

  1. Goodman, J. W. (2005). Introduction to Fourier optics. 3rd ed. Englewood, Colo.: Roberts & Co.
  2. Porter, J. (2006). Adaptive optics for vision science: principles, practices, design, and applications (Appendix A: Optical Society of America's Standards for Reporting Optical Aberrations). Hoboken, NJ: Wiley-Interscience.
  3. Walter Stanley Stiles and Brian Hewson Crawford (1933). "The luminous efficiency of rays entering the eye pupil at different points," Proc. R. Soc. Lond B 112:428-450.
  4. Schwiegerling, J. (2004). Field guide to visual and ophthalmic optics. Bellingham, Wash. (1000 20th St. Bellingham WA 98225-6705 USA): SPIE.


Appendix I - Code and Data

Code

File:T Zernike.m

Data

Wavefront measurements of human eyes are part of the SVN repository. Wavefront optics toolbox


Appendix II - Work partition

Matthew Lew - Heavily edited wvfComputePupilFunction.m to remove unnecessary nested loops; removed sizeOfFieldPixels field of the wvf struct so that all parameters are defined in terms of physical dimensions, not pixels; constructed sections of tutorial dealing with SCE and vision correction with eyeglasses

Kevin Phuong - Constructed core of t_Zernike.m to demonstrate Zernike polynomials and their effect on PSFs; updated various functions of the toolbox to use wvfGet() and wvfSet().