Zernike polynomials

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Use American English Template:Use dmy dates

The first 21 Zernike polynomials Znl(ρ,φ), ordered vertically by radial degree n and horizontally by azimuthal degree l

In mathematics, the Zernike polynomials are a sequence of polynomials that are orthogonal on the unit disk. Named after optical physicist Frits Zernike, laureate of the 1953 Nobel Prize in Physics and the inventor of phase-contrast microscopy, they play important roles in various optics branches such as beam optics and imaging where they are used to describe optical aberrations.[1][2][3]

Definitions

There are even and odd Zernike polynomials. The even Zernike polynomials of radial degree n≥0 and azimuthal degree l=m with 0≤m≤n are defined as

Znm(ρ,φ)=Rnm(ρ)cos⁡(mφ)

and are even function over the azimuthal angle φ. The odd Zernike polynomials with (negative) azimuthal degree l=−m, where 0<m≤n, are defined as

Zn−m(ρ,φ)=Rnm(ρ)sin⁡(mφ)

and are odd function over the azimuthal angle φ. Here, ρ is the radial distance 0≤ρ≤1, and Rnm are the radial polynomials defined below.

The Zernike polynomials are sometimes represented in a way explicitly showing o (odd) and e (even):[4]eUnm(ρ,φ)=Znm(ρ,φ)=Rnm(ρ)cos⁡(mφ)oUnm(ρ,φ)=Zn−m(ρ,φ)=Rnm(ρ)sin⁡(mφ)Zernike polynomials have the property of being limited to a range of −1 to +1 in the unit disk, i.e. |Znm(ρ,φ)|≤1 if ρ≤1. The radial polynomials Rnm are defined as

Rnm(ρ)=∑k=0n−m2(−1)k(n−k)!k!(n+m2−k)!(n−m2−k)!ρn−2k

for even n−m, while it is 0 for odd n−m. A special value is

Rnm(1)=1.

Other representations

Rewriting the ratios of factorials in the radial part as products of binomials shows that the coefficients are integer numbers:

Rnm(ρ)=∑k=0n−m2(−1)k(n−kk)(n−2kn−m2−k)ρn−2k.

A notation as terminating Gaussian hypergeometric functions is useful to reveal recurrences, to demonstrate that they are special cases of Jacobi polynomials, to write down the differential equations, etc.:

Rnm(ρ)=(−1)(n−m)/2ρmP(n−m)/2(m,0)(1−2ρ2)=(nn+m2)ρn 2F1(−n+m2,−n−m2;−n;ρ−2)=(−1)n−m2(n+m2m)ρm 2F1(1+n+m2,−n−m2;1+m;ρ2)

for n−m even.

The inverse relation expands ρj for fixed m≤j into Rnm(ρ)

ρj=∑n≡m(mod2)jhj,n,mRnm(ρ)

with rational coefficients hj,n,m[5]

hj,n,m=n+11+j+n2((j−m)/2(n−m)/2)((j+n)/2(n−m)/2)

for even j−m=0,2,4,….

The factor ρn−2k in the radial polynomial Rnm(ρ) may be expanded in a Bernstein basis of bs,n/2(ρ2) for even n or ρ times a function of bs,(n−1)/2(ρ2) for odd n in the range ⌊n/2⌋−k≤s≤⌊n/2⌋. The radial polynomial may therefore be expressed by a finite number of Bernstein Polynomials with rational coefficients:

Rnm(ρ)=1(⌊n/2⌋⌊m/2⌋)ρnmod2∑s=⌊m/2⌋⌊n/2⌋(−1)⌊n/2⌋−s(s⌊m/2⌋)((n+m)/2s+⌈m/2⌉)bs,⌊n/2⌋(ρ2).

Rodrigues Formula

The radial polynomials satisfy the Rodrigues' formula

Rnm(x)=1(n−m2)!xm(dd(x2))n−m2[xn+m(x2−1)n−m2].

Properties

Orthogonality

The orthogonality in the radial part reads[6]

∫012n+2Rnm(ρ)2n′+2Rn′m(ρ)ρdρ=δn,n′

or

∫10Rnm(ρ)Rn′m(ρ)ρdρ=δn,n′2n+2.

Orthogonality in the angular part is represented by the elementary

∫02πcos⁡(mφ)cos⁡(m′φ)dφ=ϵmπδm,m′,
∫02πsin⁡(mφ)sin⁡(m′φ)dφ=πδm,m′;m≠0,
∫02πcos⁡(mφ)sin⁡(m′φ)dφ=0,

where ϵm (sometimes called the Neumann factor because it frequently appears in conjunction with Bessel functions) is defined as 2 if m=0 and 1 if m≠0. The product of the angular and radial parts establishes the orthogonality of the Zernike functions with respect to both indices if integrated over the unit disk,

∫Znl(ρ,φ)Zn′l′(ρ,φ)d2r=ϵlπ2n+2δn,n′δl,l′,

where d2r=ρdρdφ is an infinitesimal area element of the circular coordinate system (where ρ is the Jacobian of a formula converting this coordinate system to Cartesian coordinate system), and where n−l and n′−l′ are both even.

Zernike transform

Any sufficiently smooth real-valued phase field over the unit disk G(ρ,φ) can be represented in terms of its Zernike coefficients (odd and even), just as periodic functions find an orthogonal representation with the Fourier series. We have

G(ρ,φ)=∑m,n[am,nZnm(ρ,φ)+bm,nZn−m(ρ,φ)],

where the coefficients can be calculated using inner products. On the space of L2 functions on the unit disk, there is an inner product defined by

⟨F,G⟩:=∫F(ρ,φ)G(ρ,φ)ρdρdφ.

The Zernike coefficients can then be expressed as follows:

am,n=2n+2ϵmπ⟨G(ρ,φ),Znm(ρ,φ)⟩,bm,n=2n+2ϵmπ⟨G(ρ,φ),Zn−m(ρ,φ)⟩.

Alternatively, one can use the known values of phase function G on the circular grid to form a system of equations. The phase function is retrieved by the unknown-coefficient weighted product with (known values) of Zernike polynomial across the unit grid. Hence, coefficients can also be found by solving a linear system, for instance by matrix inversion. Fast algorithms to calculate the forward and inverse Zernike transform use symmetry properties of trigonometric functions, separability of radial and azimuthal parts of Zernike polynomials, and their rotational symmetries.

Symmetries

The reflections of trigonometric functions result that the parity with respect to reflection along the x axis is

Znl(ρ,φ)=Znl(ρ,−φ) for l ≥ 0,
Znl(ρ,φ)=−Znl(ρ,−φ) for l < 0.

The π shifts of trigonometric functions result that the parity with respect to point reflection at the center of coordinates is

Znl(ρ,φ)=(−1)lZnl(ρ,φ+π),

where (−1)l could as well be written (−1)n because n−l as even numbers are only cases to get non-vanishing Zernike polynomials. (If n is even then l is also even. If n is odd, then l is also odd.) This property is sometimes used to categorize Zernike polynomials into even and odd polynomials in terms of their angular dependence. (it is also possible to add another category with l = 0 since it has a special property of no angular dependence.)

  • Angularly even Zernike polynomials: Zernike polynomials with even l so that Znl(ρ,φ)=Znl(ρ,φ+π).
  • Angularly odd Zernike polynomials: Zernike polynomials with odd l so that Znl(ρ,φ)=−Znl(ρ,φ+π).

(This nomenclature is not used in practice because non-vanishing polynomials have even l only combined with even n and odd l combined with odd n, so angularly even polynomials are also radially even polynomials and angularly odd polynomials are also radially odd polynomials such that the attribute angularly is superflous.)

The radial polynomials are also either even or odd, depending on the order n or the azimuthal index m:

Rnm(ρ)=(−1)nRnm(−ρ)=(−1)mRnm(−ρ).

These equalities are easily seen since Rnm(ρ) with an odd (even) m contains only odd (even) powers to ρ (see examples of Rnm(ρ) below).

The periodicity of the trigonometric functions results in invariance if rotated by multiples of 2π/l radian around the center:

Znl(ρ,φ+2πkl)=Znl(ρ,φ),k=0,±1,±2,⋯.

As eigenfunctions of a differential operator

The Zernike polynomials are eigenfunctions of the Zernike differential operator, in modern formulation[7]

L[f]=∇2f−(𝐫⋅∇)2f−2𝐫⋅∇f

self-adjoint over the unit disk, with negative eigenvalues L[Znm]=−n(n+2)Znm. Other self-adjoint differential operators can be constructed for which the Zernike polynomials form a spectrum, for example ∇⋅(1−ρ2)∇Znm=(m2−n(n+2))Znm (relating to rough surface BRDFs[8]), which differs from the above by a factor ∂φφ.

Recurrence relations

The Zernike polynomials satisfy the following recurrence relation:[9]

Rnm(ρ)+Rn−2m(ρ)=ρ[Rn−1|m−1|(ρ)+Rn−1m+1(ρ)] .

From the definition of Rnm it can be seen that Rmm(ρ)=ρm and Rm+2m(ρ)=((m+2)ρ2−(m+1))ρm. The following three-term recurrence relation[10] [11] then allows to calculate all other Rnm(ρ):

Rnm(ρ)=2(n−1)(2n(n−2)ρ2−m2−n(n−2))Rn−2m(ρ)−n(n+m−2)(n−m−2)Rn−4m(ρ)(n+m)(n−m)(n−2) .

The main use of these recurrences is to avoid cancellation of digits that occurs for large n in the accumulation of the oscillatory binomial terms in the power series notation [12] .[13]

The above relation is also useful since the derivative of Rnm can be calculated from two radial Zernike polynomials of adjacent degree:[10]

dd⁡ρRnm(ρ)=(2nm(ρ2−1)+(n−m)(m+n(2ρ2−1)))Rnm(ρ)−(n+m)(n−m)Rn−2m(ρ)2nρ(ρ2−1) .

The differential equation of the Gaussian Hypergeometric Function is equivalent to

ρ2(ρ2−1)d2dρ2Rnm(ρ)=[n(n+2)ρ2−m2]Rnm(ρ)+ρ(1−3ρ2)ddρRnm(ρ).

Nomenclature

Noll's sequential indices

Applications often involve linear algebra, where an integral over a product of Zernike polynomials and some other factor builds matrix elements. To enumerate the rows and columns of these matrices by a single index, a conventional mapping of the two indices n and m to a single index j has been introduced by Noll.[14]

(In this section the m is the signed upper index of Z which may be positive or negative or zero.) The table of this association Znm→Zj starts as follows Template:OEIS.

j=n(n+1)2+|m|+{0,m>0∧n≡{0,1}(mod4);0,m<0∧n≡{2,3}(mod4);1,m≥0∧n≡{2,3}(mod4);1,m≤0∧n≡{0,1}(mod4).

n,m

Template:!! 0,0Template:!!1,1Template:!! 1,−1 Template:!! 2,0Template:!! 2,−2 Template:!! 2,2Template:!!3,−1Template:!! 3,1 Template:!! 3,−3 Template:!! 3,3

j 1Template:!!2Template:!! 3 Template:!! 4 Template:!! 5 Template:!! 6 Template:!! 7 Template:!!8 Template:!! 9Template:!! 10
n,m

Template:!!4,0 Template:!!4,2 Template:!!4,−2Template:!!4,4Template:!!4,−4Template:!!5,1Template:!!5,−1Template:!!5,3 Template:!!5,−3Template:!!5,5

j

Template:!!11 Template:!!12 Template:!!13 Template:!!14Template:!!15Template:!!16Template:!! 17 Template:!! 18 Template:!!19 Template:!!20

The rule is the following.

  • The even Zernike polynomials Z with m>0 obtain even indices j.
  • The odd Z where m<0 obtain odd indices j.
  • Within a given n, a lower |m| results in a lower j.

OSA/ANSI standard indices

OSA [15] and ANSI single-index Zernike polynomials using:

j=n(n+2)+m2
n,m

Template:!! 0,0Template:!!1,−1Template:!! 1,1 Template:!! 2,−2Template:!! 2,0 Template:!! 2,2Template:!!3,−3Template:!! 3,−1 Template:!! 3,1 Template:!! 3,3

j 0 Template:!! 1 Template:!! 2 Template:!! 3 Template:!! 4 Template:!! 5 Template:!! 6 Template:!! 7 Template:!! 8 Template:!! 9
n,m

Template:!!4,−4 Template:!!4,−2 Template:!!4,0Template:!!4,2Template:!!4,4Template:!!5,−5Template:!!5,−3Template:!!5,−1 Template:!!5,1Template:!!5,3

j

Template:!! 10 Template:!! 11 Template:!! 12 Template:!! 13 Template:!! 14 Template:!! 15 Template:!! 16 Template:!! 17 Template:!! 18 Template:!! 19

OSA/ANSI indices can be converted back to standard indices as follows (where ⌊…⌋ is the floor function):

n=⌊8j+1−12⌋,m=2j−n(n+2).

Fringe/University of Arizona indices

The Fringe indexing scheme is used in commercial optical design software and optical testing in, e.g., photolithography.[16][17]

j=(1+n+|m|2)2−2|m|+⌊1−sgn⁡m2⌋

where sgn⁡m is the sign or signum function. The first 20 fringe numbers are listed below.

n,m

Template:!! 0,0Template:!!1,1Template:!! 1,−1 Template:!! 2,0Template:!! 2,2 Template:!! 2,−2Template:!!3,1Template:!! 3,−1 Template:!! 4,0 Template:!! 3,3

j 1Template:!!2Template:!! 3 Template:!! 4 Template:!! 5 Template:!! 6 Template:!! 7 Template:!!8 Template:!! 9Template:!! 10
n,m

Template:!!3,−3 Template:!!4,2 Template:!!4,−2Template:!!5,1Template:!!5,−1Template:!!6,0Template:!!4,4Template:!!4,−4 Template:!!5,3Template:!!5,−3

j

Template:!!11 Template:!!12 Template:!!13 Template:!!14Template:!!15Template:!!16Template:!! 17 Template:!! 18 Template:!!19 Template:!!20

Wyant indices

James C. Wyant uses the "Fringe" indexing scheme except it starts at 0 instead of 1 (subtract 1).[18] This method is commonly used including interferogram analysis software in Zygo interferometers and the open source software DFTFringe.

Examples

Radial polynomials

The first few radial polynomials are:

R00(ρ)=1
R11(ρ)=ρ
R20(ρ)=2ρ2−1
R22(ρ)=ρ2
R31(ρ)=3ρ3−2ρ
R33(ρ)=ρ3
R40(ρ)=6ρ4−6ρ2+1
R42(ρ)=4ρ4−3ρ2
R44(ρ)=ρ4
R51(ρ)=10ρ5−12ρ3+3ρ
R53(ρ)=5ρ5−4ρ3
R55(ρ)=ρ5
R60(ρ)=20ρ6−30ρ4+12ρ2−1
R62(ρ)=15ρ6−20ρ4+6ρ2
R64(ρ)=6ρ6−5ρ4
R66(ρ)=ρ6.

Zernike polynomials

Three-dimensional representations of the first few Zernike modes

The first few Zernike modes, at various indices,[6][19][20] are shown below. In this table they are normalized differently than in the remaining sections: ∫02π∫01[Zj(ρ,ϕ)]2⋅ρdρdϕ=π, which is equivalent to Var⁡(Z)unit circle=1.

Znl OSA/ANSI
index
(j)
Noll
index
(j)
Wyant
index
(j)
Fringe/UA
index
(j)
Radial
degree
(n)
Azimuthal
degree
(l)
Zj Classical name
Z00 Template:00 Template:01 Template:00 Template:01 0 Template:00 1 Piston (see, Wigner semicircle distribution)
Z1−1 Template:01 Template:03 Template:02 Template:03 1 −1 2ρsin⁡ϕ Tilt (Y-Tilt, vertical tilt)
Z11 Template:02 Template:02 Template:01 Template:02 1 +1 2ρcos⁡ϕ Tilt (X-Tilt, horizontal tilt)
Z2−2 Template:03 Template:05 Template:05 Template:06 2 −2 6ρ2sin⁡2ϕ Oblique astigmatism
Z20 Template:04 Template:04 Template:03 Template:04 2 Template:00 3(2ρ2−1) Defocus (longitudinal position)
Z22 Template:05 Template:06 Template:04 Template:05 2 +2 6ρ2cos⁡2ϕ Vertical astigmatism
Z3−3 Template:06 Template:09 10 11 3 −3 8ρ3sin⁡3ϕ Vertical trefoil
Z3−1 Template:07 Template:07 Template:07 Template:08 3 −1 8(3ρ3−2ρ)sin⁡ϕ Vertical coma
Z31 Template:08 Template:08 Template:06 Template:07 3 +1 8(3ρ3−2ρ)cos⁡ϕ Horizontal coma
Z33 Template:09 10 Template:09 10 3 +3 8ρ3cos⁡3ϕ Oblique trefoil
Z4−4 10 15 17 18 4 −4 10ρ4sin⁡4ϕ Oblique quadrafoil
Z4−2 11 13 12 13 4 −2 10(4ρ4−3ρ2)sin⁡2ϕ Oblique secondary astigmatism
Z40 12 11 Template:08 Template:09 4 Template:00 5(6ρ4−6ρ2+1) Primary spherical
Z42 13 12 11 12 4 +2 10(4ρ4−3ρ2)cos⁡2ϕ Vertical secondary astigmatism
Z44 14 14 16 17 4 +4 10ρ4cos⁡4ϕ Vertical quadrafoil

Applications

Template:Further

Result of the first 21 Zernike polynomials (as above) introduced as aberrations on a flat-top beam. The beam is imaged by a lens, effecting a Fourier transform, whose intensity is represented in this picture

The functions are a basis defined over the circular support area, typically the pupil planes in classical optical imaging at visible and infrared wavelengths through systems of lenses and mirrors of finite diameter. Their advantages are the simple analytical properties inherited from the simplicity of the radial functions and the factorization in radial and azimuthal functions; this leads, for example, to closed-form expressions of the two-dimensional Fourier transform in terms of Bessel functions.[21][22] Their disadvantage, in particular if high n are involved, is the unequal distribution of nodal lines over the unit disk, which introduces ringing effects near the perimeter ρ≈1, which often leads attempts to define other orthogonal functions over the circular disk.[23][24][25]

In precision optical manufacturing, Zernike polynomials are used to characterize higher-order errors observed in interferometric analyses. In wavefront slope sensors like the Shack-Hartmann, Zernike coefficients of the wavefront can be obtained by fitting measured slopes with Zernike polynomial derivatives averaged over the sampling subapertures.[26] In optometry and ophthalmology, Zernike polynomials are used to describe wavefront aberrations of the cornea or lens from an ideal spherical shape, which result in refraction errors. They are also commonly used in adaptive optics, where they can be used to characterize atmospheric distortion. Obvious applications for this are IR or visual astronomy and satellite imagery.

Another application of the Zernike polynomials is found in the Extended Nijboer–Zernike theory of diffraction and aberrations.

Zernike polynomials are widely used as basis functions of image moments. Since Zernike polynomials are orthogonal to each other, Zernike moments can represent properties of an image with no redundancy or overlap of information between the moments. Although Zernike moments are significantly dependent on the scaling and the translation of the object in a region of interest (ROI), their magnitudes are independent of the rotation angle of the object.[27] Thus, they can be utilized to extract features from images that describe the shape characteristics of an object. For instance, Zernike moments are utilized as shape descriptors to classify benign and malignant breast masses[28] or the surface of vibrating disks.[29] Zernike Moments also have been used to quantify shape of osteosarcoma cancer cell lines in single cell level.[30] Moreover, Zernike moments have been used for early detection of Alzheimer's disease by extracting discriminative information from the MR images of Alzheimer's disease, mild cognitive impairment, and healthy groups.[31]

Higher dimensions

The concept translates to higher dimensions D if multinomials x1ix2j⋯xDk in Cartesian coordinates are converted to hyperspherical coordinates, ρs,s≤D, multiplied by a product of Jacobi polynomials of the angular variables. In D=3 dimensions, the angular variables are spherical harmonics, for example. Linear combinations of the powers ρs define an orthogonal basis Rn(l)(ρ) satisfying

∫01ρD−1Rn(l)(ρ)Rn′(l)(ρ)dρ=δn,n′.

(Note that a factor 2n+D is absorbed in the definition of R here, whereas in D=2 the normalization is chosen slightly differently. This is largely a matter of taste, depending on whether one wishes to maintain an integer set of coefficients or prefers tighter formulas if the orthogonalization is involved.) The explicit representation is[5][32]

Rn(l)(ρ)=2n+D∑s=0n−l2(−1)s(n−l2s)(n−s−1+D2n−l2)ρn−2s=(−1)n−l22n+D∑s=0n−l2(−1)s(n−l2s)(s−1+n+l+D2n−l2)ρ2s+l=(−1)n−l22n+D(n+l+D2−1n−l2)ρl 2F1(−n−l2,n+l+D2;l+D2;ρ2)

for even n−l≥0, else identical to zero, with special case Rn(n)(ρ)=2n+Dρn.

Its differential equation for the Gaussian Hypergeometric Function is equivalent to

ρ2(ρ2−1)d2dρ2Rn(l)(ρ)=[nρ2(n+D)−l(D−2+l)]Rn(l)(ρ)+ρ[D−1−(D+1)ρ2]ddρRn(l)(ρ).

Kintner's recurrence for fixed l and variable n±2 quoted for D=2 above is in the general form[33]

−(1+n−l2)(1−n−D2)n+l+D2Rn+2(l)(ρ)2(n+2)+D=n−l2(1+n+D2)(1−n+l+D2)Rn−2(l)(ρ)2(n−2)+D+(n+D2)[(1+n+D2)(1−n−D2)(1−ρ2)+12(n−l)(D+n+l)+l+D2−1]Rn(l)(ρ)2n+D.

For D=3 this was proposed by Deng and Gwo.[34]

For fixed n and variable l±2 the recurrence is [35]

(l+D2−1)[(l+D2)(l−2+D2)−12(l2+lD+Dn+D2/2+n2−2l−D)r2]Rn(l)(r)=−(l+D2)(n+l+D2−1)(1+n−l2)r2Rn(l−2)(r)−(n−l2)(n+l+D2)(l−2+D2)r2Rn(l+2)(r).

The case for D=2 was published by Chong et al.[13]

See also

References

Template:Reflist

Template:Commons category