Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Experimental robustness of Fourier ptychography phase retrieval algorithms

Open Access Open Access

Abstract

Fourier ptychography is a new computational microscopy technique that provides gigapixel-scale intensity and phase images with both wide field-of-view and high resolution. By capturing a stack of low-resolution images under different illumination angles, an inverse algorithm can be used to computationally reconstruct the high-resolution complex field. Here, we compare and classify multiple proposed inverse algorithms in terms of experimental robustness. We find that the main sources of error are noise, aberrations and mis-calibration (i.e. model mis-match). Using simulations and experiments, we demonstrate that the choice of cost function plays a critical role, with amplitude-based cost functions performing better than intensity-based ones. The reason for this is that Fourier ptychography datasets consist of images from both brightfield and darkfield illumination, representing a large range of measured intensities. Both noise (e.g. Poisson noise) and model mis-match errors are shown to scale with intensity. Hence, algorithms that use an appropriate cost function will be more tolerant to both noise and model mis-match. Given these insights, we propose a global Newton’s method algorithm which is robust and accurate. Finally, we discuss the impact of procedures for algorithmic correction of aberrations and mis-calibration.

© 2015 Optical Society of America

1. Introduction

Fourier ptychographic microscopy (FPM) [1] circumvents optical space-bandwidth (SBP) limitations to achieve gigapixel-scale quantitative phase images, having both wide field-of-view (FOV) and high resolution. The method combines ideas from synthetic aperture and translational-diversity phase retrieval [2, 3], conveniently realized by replacing the light source of a microscope with an LED array, then capturing multiple images under different illumination angles. When LEDs illuminate the sample from angles smaller than that allowed by the objective’s numerical aperture (NAobj), brightfield images result. Conversely, when the illumination NA is larger than the objective NA, darkfield images result. Although darkfield images alone do not have higher resolution than the objective allows, they do contain information about sub-diffraction-limit sized features, which occupy a shifted area of the sample’s Fourier space (assuming a thin sample). By collecting many images that cover a wide region of Fourier space and stitching them together coherently, one can achieve spatial resolution beyond the objective’s diffraction limit, corresponding to the sum of illumination and objective NAs (NAeff = NAillu + NAobj). FPM’s scan-free high SBP imaging capability has great potential for revolutionizing biomedical imaging, with applications in digital pathology [1, 4–6] and in vivo live cell imaging [7]. The original FPM method only applies to 2D thin objects, however, new models and reconstruction algorithms also enable 3D reconstruction of thick samples [8].

Multiple algorithms have been proposed for solving the nonlinear inverse FPM problem, which amounts to phase retrieval. Amongst these, there are the usual trade-offs between accuracy, noise performance and computational complexity. In practice, however, we have found that a critical metric is an algorithm’s performance under model mis-match – when the experimental data is imperfect (e.g. due to misalignment). This is typical in computational imaging algorithms, which are often fragile and not robust enough to provide consistent high-quality results. Unfortunately, model mis-match is difficult to quantify, since it is systematic, yet unpredictable. Here, we aim to compare algorithms directly, in order to identify error mechanisms and determine the most accurate and robust algorithm for our experiments.

The original FPM algorithm used a Gerchberg-Saxton approach [9], which is a type of alternating projections [10–13], first developed for traditional ptychography [2, 3, 14–17] and later for FPM [1, 18, 19]. Shifted support constraints (finite pupil size) are enforced in the Fourier domain as the corresponding amplitude constraints (measured images) are applied in the image domain, while letting the phase evolve as each image is stepped through sequentially. The Gerchberg-Saxton method, which is a type of gradient descent, represents a natural way to solve phase retrieval problems by trying to directly minimize some cost function that describes the differences between actual and predicted measurements. Unfortunately, these formulations are often non-convex in nature and do not come with global convergence guarantees.

Recently, a class of gradient descent like updates, dubbed Wirtinger Flows [20], have been shown to have global convergence guarantees. This method has been successfully applied to FPM [21], though the actual implementation deviates from theory somewhat. In the Wirtinger Flow framework, the optimization procedure is similar to gradient descent, except that the step size and initial guess are carefully chosen for provable convergence.

Gradient descent and Wirtinger Flow are first-order methods, in the sense that they only use the first-order derivative of the cost function when updating the complex-field. It is also possible, and generally advantageous, to use higher-order derivatives in the updates. For example, second-order methods (e.g. Newton’s method) use both the first and second derivative of the cost function, and have been shown to provide faster convergence rates [22]. In our studies, we also observe improved performance when using second-order methods. For example, in the top row of Fig. 1, the Gerchberg-Saxton algorithm is a first-order method, whereas the other three methods are second-order (or approximate second-order) methods. All results achieve a similar resolution, but the first-order (Gerchberg-Saxton) result is corrupted by low-frequency artifacts. While computing second-order derivatives increases complexity, we find that it usually reduces the number of iterations needed, enabling fast overall run times.

 figure: Fig. 1

Fig. 1 Fourier ptychographic reconstruction (amplitude only) of a test object with the algorithms discussed here, all using the same experimental dataset. Algorithms derived from the same cost function (amplitude-based, intensity-based, and Poisson-likelihood) give similar performance, and first-order methods (Gerchberg-Saxton) suffer artifacts.

Download Full Size | PDF

The final class of algorithms that have been proposed are based on convex relaxations [23–27]. This class of phase retrieval algorithms, called PhaseLift, re-frames the problem in higher dimensions such that it becomes convex, then aims to minimize the cost function between actual and predicted intensity via semidefinite programming. These algorithms come with the significant advantage of rigorous mathematical guarantees [28] and were successfully applied to FPM data [27]. The actual implementations of these algorithms, however, deviate from the provable case due to computational limitations.

Algorithms can be further classified as sequential or global, depending on whether the update is done for each image, one at a time (sequentially), or all at once with the full set of images (globally) for each iteration. Global methods are expected to perform better, at a cost of additional computational requirements. In our studies, results show little difference between the sequential and global implementation of any particular algorithm (see Fig. 1), suggesting that sequential procedures may be sufficient, allowing reduced computational requirements.

One seemingly unimportant classification of algorithms is whether their cost function minimizes differences in intensity or amplitude. Throughout this paper, we refer to algorithms that minimize intensity differences as intensity-based algorithms, and algorithms that minimize amplitude differences as amplitude-based algorithms. Since intensity is amplitude squared, both drive the optimization in the correct direction; hence, one might expect that the choice between the two is of little consequence. Surprisingly, however, we find that the cost function is the key predictor of experimental performance for our experimental dataset. Intensity-based algorithms suffer from strong artifacts (see Fig. 1), which we show to be due to noise and model mis-match errors. Hence, amplitude-based algorithms perform better on imperfect data, so are more robust. Our goal is to explain why this happens.

We will show that in order for a phase retrieval scheme to be robust to experimental imperfections, the choice of cost function is of crucial importance. One source of error in our experimental data is measurement noise, including Gaussian noise or Poisson shot noise. Another main source of error is model mis-match, caused by experimental imperfections such as aberrations and LED misalignment. A particular problem of FPM datasets is that they contain both brightfield and darkfield images, which have drastically different intensity levels (see Fig. 2). Brightfield images can have several orders of magnitude higher intensity than darkfield images; thus, the amount of Poisson noise will also be significantly higher. If this difference in the noise levels is not properly accounted for, the brightfield noise may drown out the darkfield signal. We will further show that aberrations and LED mis-calibration - the two main model mis-match errors in our experiments - result also in intensity-dependent errors. Thus, by carefully designing the the cost function, we can develop algorithms that are significantly more robust to both noise and model mis-match.

 figure: Fig. 2

Fig. 2 (a) Experimental setup for Fourier ptychography with an LED array microscope. (b) The sample’s Fourier space is synthetically enlarged by capturing multiple images from different illumination angles. Each circle represents the spatial frequency coverage of the image captured by single-LED illumination. Brightfield images have orders of magnitude higher intensity than darkfield (see histograms), resulting in different noise levels.

Download Full Size | PDF

We develop a maximum likelihood theory which provides a flexible framework for formulating the FPM optimization problem with various noise models. In particular, we will focus on Gaussian and Poisson noise models. We find that amplitude-based algorithms effectively use a Poisson noise model, while intensity-based algorithms use a Gaussian noise model. To illustrate, we simulate four FPM datasets, three of which are contaminated with measurement errors (see Fig. 3): Poisson noise, aberrations, and LED misalignment. We compare the performance of various algorithms on these datasets to demonstrate that the imperfections in our experimental data are more consistent with a Poisson noise model. This explains our observations that amplitude-based algorithms are more experimentally robust than intensity-based algorithms.

 figure: Fig. 3

Fig. 3 To explain the artifacts in our experimental results, as well as evaluate the robustness of various algorithms under common types of errors, we simulate several FPM datasets with different types of known error: (1) Ideal data, (2) Poisson noise data, (3) aberrated data, (4) LED misaligned data (×: original position, ○: perturbed position).

Download Full Size | PDF

2. Algorithm Formulation

2.1. Forward problem for Fourier ptychography

Consider a thin sample with transmission function o(r), where r =(x, y) represents the 2D spatial coordinates in the sample plane. Assuming that the LED array is sufficiently far from the sample, each LED will illuminate the sample by a plane wave from a different angle, defined by exp(i2πu · r), where u =(uℓ,x, uℓ,y) is the spatial frequency corresponding to the -th LED, = 1,...,Nimg. After passing through the sample, the exit wave is the product of the sample and illumination complex fields, o(r) exp(i2πu · r). The tilted plane wave illumination means that the Fourier transform of this exit wave is just a shifted version of the Fourier spectrum of the object, O(uu), where O(u) = {o(r)} and is the 2D Fourier transform. This exit wave then passes through the objective lens, where it is low-pass filtered by the pupil function, P(u), which is usually a circle with its size defined by NAobj. Finally, with −1 being the 2D inverse Fourier transform, we can write the intensity at the image plane as [19]

I(r)=|1{P(u)O(uu)}|2.

2.2. Possible noise and simulated dataset

Ideally, all algorithms based on the forward model above should give good reconstructions. However, noise and model mis-match errors cause deviations from our forward model. Thus, a noise model that accurately describes the error will be important for noise tolerance. Heuristically, we have identified three experimental non-idealities that cause error: Poisson noise, aberrations and LED mis-alignment. We aim to separate and analyze the artifacts caused by each through controlled simulations that incur only one type of error.

The simulated data (Fig. 3) uses the same parameters as our experimental setup, where a 32 × 32 green LED array (central wavelength λ = 514 nm) is placed 77 mm above the sample. LEDs are nominally 4 mm apart from each other and only the central 293 LEDs are used, giving a maximum NAillu = 0.45. Samples are imaged with a 4× objective lens having NAobj = 0.1.

Using our forward model, we simulate four datasets:

  1. Ideal data: no noise is added. The object and pupil follow exactly the FPM forward model that is assumed in the algorithm.
  2. Poisson noise data: the ideal data is corrupted by Poisson-distributed noise at each pixel. To emphasize the effect and to emulate experiments with lower-performance sensors, we simulate 20× more noise than is present in our experiments (details in Section 2.3).
  3. Aberrated data: simulated images are corrupted by imaging system aberrations, which are described by the aberrated complex pupil function shown in Fig. 3. The pupil function used in these simulations was obtained from experimental measurements.
  4. LED mis-aligned data: the illumination angle of each LED is perturbed slightly (following a normal distribution with standard deviation σθ = 0.2°). The black × and blue ○ in Fig. 3 show the original and perturbed LED positions, respectively.

To deal with these experimental errors, in the next section we will discuss different noise models for formulating the FPM optimization problem.

2.3. Optimization problem based on different noise models

Most algorithms solve the FPM problem by minimizing the difference between the measured and estimated amplitude (or intensity), without assuming a noise model. Hence, the FPM problem can be formulated as the following optimization

minO(u)fA(O(u))=minO(u)r|I(r)|1{P(u)O(uu)}||2.
Since the cost function here, fA(O(u)), aims to minimize the difference between the estimated amplitude and the measured amplitude, this is the amplitude-based cost function. By optimizing this cost function, the projection-based algorithms for Fourier ptychography can be obtained [1, 18, 19], which treat each measurement as an amplitude-based sub-optimization problem. The formulation is used in the traditional Gerchberg-Saxton phase retrieval approach.

If we have information about the statistics of the noise, we can use it in our optimization formulation via the maximum likelihood estimation framework [29]. If we assume that our measured images suffer only from white Gaussian noise, then the probability of capturing the measured intensity I(r) at each pixel, given the estimate of O(u), can be expressed as

p[I(r)|O(u)]=12πσw2exp[(I(r)I^(r))22σw2],
where Î(r) = |−1{P(u)O(uu)}|2 and σw is the standard deviation of the Gaussian noise. Î(r) and I(r) denote the estimated and measured intensity, respectively.

The likelihood function is the overall probability due to all the pixels in all the images and can be calculated as ΠΠr p[I(r)|O(u)], assuming measurements from all pixels are independent. In maximum likelihood estimation, the goal is to maximize the likelihood function. However, it is easier to solve this problem by turning the likelihood function into a negative log-likelihood function which can be minimized. The negative log-likelihood function associated with this probability distribution can be calculated as

Gaussian(O(u))=logrp[I(r)|O(u)]=r[12log(2πσw2)+(I(r)I^(r))22σw2].

The next step is to minimize this negative log-likelihood function by estimating O(u) so that the overall probability is maximized. For white Gaussian noise, it is assumed that σw2 are the same across all pixels for all images (i.e. all measurements have the same amount of noise), though this will not be the case for FPM datasets. By making a Gaussian noise assumption, the first term in (4) is a constant and can be ignored. The optimization problem then reduces to

minO(u)fI(O(u))=minO(u)r|I(r)|1{P(u)O(uu)}|2|2.
We call this cost function, fI(O(u)), the intensity-based cost function because it aims to minimize the difference between the estimated intensity and the measured intensity. It also implies that noise from each pixel is treated the same and independent of the measured intensity. It will be shown later that the previous implementations of PhaseLift [27] and Wirtinger flow algorithms [21] for FPM aimed to optimize this intensity-based cost function. However, both can be implemented instead with a Poisson likelihood cost function.

If we assume instead that our measured images suffer from Poisson shot noise, then the probability of the measured intensity, I(r), given the estimate of O(u) can be expressed as

p[I(r)|O(u)]=[I^(r)]I(r)exp[I^(r)]I(r)!12πσ,r2exp[(I(r)I^(r))22σ,r2].
Note that the Poisson distribution is used to describe the statistics of the incoming photons at each pixel, which is a discrete probability distribution. Here, we assume that the intensity is proportional to the photon count, so we can treat the distribution of the intensity as a Poisson distribution. When the expected value of the Poisson distribution is large, then this Poisson distribution will become more like a Gaussian distribution having a standard deviation proportional to the square root of the intensity, σ,rI(r), from the central limit theorem. This means that a large measured intensity at a particular pixel will imply large noise at that pixel. In the simulation, we impose Poisson noise on the measured intensity by distributing each pixel value with a Gaussian distribution and setting the standard deviation to 20I(r). The negative log-likelihood of the Poisson noise model can then be calculated; the optimization problem is formed by minimizing the negative log-likelihood function with estimation of O(u),
minO(u)Poisson(O(u))=minO(u)r(I(r)log[I^(r)]+I^(r)+log[I(r)!])minO(u)r(I(r)I^(r))22σ,r2.
This cost function comes from the likelihood function of the Poisson distribution, so we call it the Poisson-likelihood-based cost function. It implies that the pixels with larger measured intensity are weighted smaller because they suffer from more noise. Since the brightfield images have more large-value pixels, they are assumed to be more noisy and thus are weighted smaller in the cost function. It is shown in the Appendix that the gradient of this cost function (37) is very similar to that of the amplitude-based cost function (34), which suggests that the amplitude-based cost function deals well with Poisson-like noise or model mis-match.

2.4. Vectorization notation

For multivariate optimization problems such as (2) and (5), it is convenient to reformulate the problem using linear algebra. First, the functions need to be vectorized. Each of the captured images, I(r), having m × m pixels, are raster-scanned into vectors, I, with size m2 × 1. Since the estimated object transmission function will have higher space-bandwidth product than the raw images, the estimated object should have n × n pixels, where n > m. For convenience, we actually solve for the Fourier space of the object, O(u), which is vectorized into a vector O with size n2 × 1. Before multiplying the pupil function, the Fourier space of the object is downsampled by a m2 × n2 matrix Q. The matrix Q transforms a n2 × 1 vector into a m2 × 1 vector by selecting values out of the original vector, so the entries of this matrix are either 1 or 0 and each row contains at most one nonzero element. The pupil function P(u) is vectorized into a vector P with size m2 × 1. The 2D Fourier transform and inverse transform operator are m2 × m2 matrices defined as F and F−1. |·|, |·|2, , and ·/· are element-wise operators, and the diag(·) operator puts the entries of a vector into the diagonal of a matrix.

The second step is to rewrite the optimization in vector form using the new parameters. First, the forward model (1) can be vectorized as

I^=|g|2=|F1diag(P)QO|2.
The amplitude-based cost function (2) can be vectorized as
minOfA(O)=minO(I|g|)(I|g|),
where the hyperscript † denotes a Hermitian conjugate.

Likewise, the intensity-based cost function (5) can be vectorized as

minOfI(O)=minO(I|g|2)(I|g|2).

The Poisson likelihood cost function is more complicated to be expressed in vector form. First, we rewrite |g|2 as

|g|2=diag(g¯)F1diag(P)QO=AO=[a,1a,m2]O,
where A = diag()F−1diag(P)Q is a m2 × n2 matrix with m2 × 1 row vectors, a,j, j = 1,...,m2, and denotes the complex conjugate of vector g. Then the likelihood function can be rewritten as
minOPoisson(O)=j[I,jlog(a,jO)a,jO+log(I,j)!].

To minimize (9), (10) or (12) using an iterative optimization algorithm, the gradients (and possibly Hessians) of the cost functions need to be calculated, both of which are shown in the Appendix. Since (9), (10) and (12) are all real-valued functions of a complex vector O, that means that O and Ō should be treated independently in the derivative calculation, which is based on the CR-calculus discussed in [30] and the similar formulation for traditional ptychography discussed in [17].

3. Derivation of algorithms

The basic formulation of the optimization problem in FPM has been described in the last section and the derivative calculation has been done in the Appendix, so we now turn our attention to describing how each algorithm solves the optimization problem based on different cost functions. The key step will be in how each algorithm updates the estimate of the object at each iteration. We compare the existing algorithms for FPM and also implement a new second-order global Newton’s method under different cost functions, for comparison. The initialization for all algorithms is the same - the amplitude of the image from the on-axis LED illumination.

3.1. First-order methods

3.1.1. Sequential gradient descent (Gerchberg-Saxton) [1, 18]

For the implementation in [1, 18], the algorithm aims to optimize the amplitude-based cost function (9). It is the simplest to implement and, in this case, equivalent to the Gerchberg-Saxton approach of simply replacing known information in real and Fourier space. Since the sequential strategy treats a single image as an optimization problem, the cost function for each problem is just one component of Eq. (9) and is defined as

fA,(O)=(I|g|)(I|g|),
where denotes the index of each measurement.

The derivative of this cost function is thus a component of Eq. (34) and can be expressed as

OfA,(O)=Qdiag(P¯)[Fdiag(I|g|)gdiag(P)QO].

The update equation for this sequential amplitude-based algorithm is then a gradient descent with the descent direction given by Eq. (14) and step size 1/|P|max2:

O(i,+1)=O(i,)1|P|max2OfA,+1(O(i,)),
where i indicates the iteration number, which goes to i + 1 after running through all the measurements from = 1 to = Nimg. This algorithm adopts the alternating projection phase retrieval approach. The first projection in the real domain is the amplitude replacement operation diag(I|g|)g, and the second projection is to project the previous estimated Fourier region diag(P)QO onto the updated Fourier region Fdiag(I|g|)g.

It is worth noting that the algorithm in [1] directly replaces Fdiag(I|g|)g in the Fourier domain at each sub-iteration. A similar algorithm in [18], introduced for simultaneous aberration recovery, has the same form as Eq. (15) that implements gradient descent in the Fourier domain. However, when there is no pupil estimation, then P becomes a pure support function with one inside the support and zero outside. In this situation, these two algorithms become exactly the same, and thus we refer to both as sequential gradient descent or Gerchberg-Saxton algorithm.

3.1.2. Wirtinger flow algorithm [20, 21]

The Wirtinger flow optimization framework was originally proposed to iteratively solve the coded-mask phase retrieval problem using nonlinear optimization [20]. It is a gradient descent method implemented with a special initialization and special step sizes. For the FPM implementation described in [21], the intensity-based cost function is used. Thus, the update equation for the object transmission function O can be expressed as

O(i+1)=O(i)α(i)OfI(O(i)),
where the step size is calculated by
α(i)=min(1ei/i0,θmax)(O(0))O(0),
where ∇O fI(O(i)) is the gradient of the intensity-based cost function calculated in (36), and i0 and θmax are user-chosen parameters to calculate the step size.

In the previously proposed FPM implementation of Wirtinger flow [21], the algorithm deviates somewhat from the original theory proposed in [20]. First, there is an additional term in the cost function to deal with additive noise. Second, the initialization used in [21] is not the proposed one in [20], but rather a low-resolution captured image. So the algorithm in [21] is essentially a gradient descent method with the special step size based on the intensity-based cost function and is not guaranteed to converge to the global minimum.

The Wirtinger flow algorithm can be implemented with different cost functions simply by replacing the original intensity-based gradient with the other gradients derived in the Appendix. For comparison, we have implemented the Wirtinger flow algorithm using all three of the cost functions described here: amplitude-based, intensity-based and Poisson-likelihood-based. The results are compared in Fig. 1 with experimental data and Section 4 with simulated data.

3.2. Second-order methods

Beyond first-order, a second-order optimization method can improve the convergence speed and stability of the algorithm, especially for nonlinear and non-convex problems. Second-order methods (e.g. Newton’s method) use both the first and second derivatives (Hessian) of the cost function to create a better update at each iteration. As a result, they generally require fewer iterations and move more directly towards the solution. The difficulty of second-order implementations is in computing the Hessian matrix, whose size scales quadratically with the size of the image. As a result, approximations to the Hessian are often used (known as quasi-Newton methods) to trade performance for computational efficiency.

3.2.1. Sequential Gauss-Newton method [19]

First, we look at a Gauss-Newton method based on the amplitude-based cost function, which approximates the Hessian matrix as a multiplication of its Jacobian matrix:

Hcc,A(fAc)(fAc)=[12Qdiag(|P|2)QQdiag(P¯)Fdiag(g2|g|2)F¯1diag(P¯)Q¯QTdiag(P)F¯diag(g¯2|g|2)F1diag(P)Q12QTdiag(|P|2)Q¯],
where c =(OT, ŌT)T (See Appendix). Since the inversion of this Hessian matrix requires very high computational cost, we approximate the Hessian by dropping all the off-diagonal terms of the Hessian matrix. Further, the inversion of the Hessian matrix may be an ill-posed problem, so a constant regularizer is adopted. In the end, the approximated Hessian inversion becomes
(Hcc,A)1[2Qdiag(1|P|2+Δ)Q002QTdiag(1|P|2+Δ)Q¯],
where Δ is a constant vector with all the entries equal to a constant regularizer δ over all pixels.

By applying Newton’s update, Eq. (45), with this approximated Hessian inversion, the new estimate of O can be expressed as

[O(i,+1)O¯(i,+1)]=[O(i,)O¯(i,)][Qdiag(|P||P|max)Q00QTdiag(|P||P|max)Q](Hcc,A)1[OfA,+1(O(i,))O¯fA,+1(O¯(i,))],
where the diag(|P||P|max) part is the step size for this descent direction. Note that when P is a constant having either 0 or 1 values, this method is reduced to the sequential gradient descent method with a tunable regularizer δ. In practice, however, we also simultaneously update P (see Section 4.3), so the second-order optimization procedure becomes more crucial.

3.2.2. New algorithm implementing a global Newton’s method

Since we expect second-order methods to perform better than first-order, and also global methods to be more stable than sequential, we propose a new global second-order (Newton’s) method, and show the results compared against other methods. For completeness, we implement all three of amplitude, intensity, and Poisson-likelihood-based cost functions, showing that the amplitude and Poisson-likelihood-based cost functions indeed perform better. The difficult step in deriving a Newton’s method for this problem is in calculating the gradients and Hessians of the cost functions directly, without approximations. In the Appendix, we show our derivation, and in this section we use the results with a typical Newton’s update equation:

[O(i+1)O¯(i+1)]=[O(i)O¯(i)]α(i)(Hcc)1[Of(O(i))O¯f(O(i))].
The inverse of the Hessian matrix, (Hcc)−1, is solved efficiently by a conjugate gradient matrix inversion iterative solver as described in [31]. α(i) is determined by the backtracking line search algorithm at each iteration, as described in [22]. The exact form of the cost function and the Hessian depends on the algorithm used. For amplitude-based Newton’s algorithm, f(O) = fA(O) and Hcc=HccA; for intensity-based Newton’s algorithm, f(O) = fI(O) and Hcc=HccI; for Poisson-likelihood-based Newton’s algorithm, f(O) = Gaussian(O) and Hcc=HccP.

3.3. Convex-based methods

3.3.1. PhaseLift algorithm [23–27]

The PhaseLift formulation for phase retrieval is conceptually quite different than the previous methods described here. The idea is to lift the non-convex problem into a higher-dimensional space in which it is convex, thereby guaranteeing convergence to the global solution. To do this, the cost function of O is reformulated into that of a rank-1 matrix X = OO and the goal is to estimate X instead of O. The process of reformulation can be expressed as [27]

g=[g1gNimg]=[F100F1][diag(P)00diag(P)][Q1QNimg]O=DO=[d1dNimgm2]O,
where D is an Nimgm2 × Nimgm2 operator combining the inverse Fourier transform, pupil cropping, and the downsampling operation with row vectors denoted by dj.

Hence, the estimated intensity |g|2 as a function of X can be expressed

|g|2=[Od1d1OOdNimgm2dNimgm2O]=[Tr(d1d1OO)Tr(dNimgm2dNimgm2OO)]=[Tr(D1X)Tr(DNimgm2X)]=𝒜(X),
where 𝒜 is a linear operator transforming X into |g|2. In Section 2.3, we discussed three different cost functions. Only the intensity-based and Poisson-likelihood-based cost functions are convex on the estimated intensity, Î(r), which is a component of 𝒜(X). Thus, the intensity-based and Poisson-likelihood-based cost functions can be turned into a convex function on X through this transformation. For the implementation in [27], by defining I=[I1T,,INimgT]T, the intensity-based cost function can be expressed as
fI(X)=(I|g|2)(I|g|2)=(I𝒜(X))(I𝒜(X)).

Since X is a rank-1 matrix, we then minimize the rank of X subject to I = 𝒜(X). However, the rank minimization problem is NP-hard. Therefore, a convex relaxation [23–25] is used instead to transform the problem into a trace minimization problem. Under this relaxation, the optimization problem becomes

minXfI(X)=minX(I𝒜(X))(I𝒜(X))+αTr(X),
where α is a regularization variable that depends on the noise level.

The problem with this new approach is that by increasing the dimensionality of the problem, the size of the matrix X has become n2 × n2, which is too large to store and calculate eigenvalue decomposition on a normal computer. To avoid these computational problems, we do not directly solve (25), but rather apply a factorization to X = RR, where R is an n2 × k matrix. X is a rank-1 matrix so k is set to be 1 (R becomes O). This new problem is then solved effectively using the augmented Lagrangian multiplier, by modifying the original cost function [26, 27]

minRfAL,I(R)=minRσ2(I𝒜(RR))(I𝒜(RR))+yT(I𝒜(RR))+Tr(RR),
where y, Nimgm2 × 1 vector, is the Lagrangian multiplier, and σ ≥ 0 is the augmented Lagrangian multiplier. Both are parameters that can be tuned to give a better reconstruction. By taking the derivative of this cost function with respect to R and updating R in each iteration, the optimization problem can then be solved [26]. Unfortunately, after these modifications, the problem becomes non-convex because of the minimization with respect to R instead of X, and thus is no longer provable.

In order to provide a more familiar form for comparing the PhaseLift algorithm to the others discussed in this paper, we define y=[y1T,,yNimgT]T, where yi is m2 × 1 vector, so that the minimization problem in Eq. (26) becomes

minOfAL,I(O)=minOσ2[(I|g|2+2σy)(I|g|2)]+OO.
Now, we see that the PhaseLift implementation is essentially an intensity-based cost function with an additional constraint that may deal better with noise.

The corresponding derivative of the cost function is calculated as in the previous section:

OfAL,I(O)=σQdiag(P¯)Fdiag(g)(I|g|2+1σy)+O.
When σ is large compared to the component of y and O, the factorized PhaseLift formulation with rank-1 X is equivalent to the intensity-based optimization problem discussed in the previous section. To solve this optimization problem, a quasi-Newton algorithm called L-BFGS (Limited-memory Broyden-Fletcher-Goldfarb-Shanno) method [22], which is a second-order method using an approximated Hessian inversion from previous gradients, is adopted.

We note that although the PhaseLift algorithm can also be implemented with the Poisson-likelihood-based cost function, the algorithm in the rank-1 case is equivalent to our global Newton’s method discussed in Section 3.2.2 for the same reason as in the above analysis.

4. Performance analysis of various algorithms

In this section, we compare the algorithms described in Section 3 using experimental data, as well as simulated data that mimics the experimental errors described in Section 2.2. We find that second-order optimization generally performs better than first-order, while global methods do not give significant improvement over sequential. Further, we explain why the cost function is a key consideration in choosing an algorithm by explaining the cause of the high-frequency artifacts that result from intensity-based algorithms. Interestingly, the two model mis-match errors (aberrations and LED mis-alignment) behave similarly to Poisson noise, in that they also give intensity-dependent errors. Hence, the amplitude and Poisson likelihood algorithms are more robust not only to Poisson noise, but also to model mis-match errors.

4.1. Reconstruction of the simulated and experimental data

Next, we use each of the algorithms described in Section 3 to reconstruct amplitude and phase from the datasets simulated in Section 2.2, in order to quantify performance under various experimental error types by comparing against the ground truth input. Figures 4 and 5 show the reconstructed amplitude and phase, respectively. On the top left corner of each image we give the relative error of the reconstruction, defined as

Error=OrecoverOtrue22Otrue22,
where Orecover and Otrue are the reconstructed and true images, respectively, in vector form. In order to ensure that all algorithms converge to their stable solutions, we use 200 iterations for each algorithm, except for Wirtinger flow, which requires 500 iterations. The tuning parameters for each algorithm are summarized in Table 1. We have attempted to optimize each parameter as fairly as possible; for example, we use a large σ in the PhaseLift algorithm to achieve a better reconstruction. Small σ trades resolution for flatter background artifacts.

 figure: Fig. 4

Fig. 4 Reconstructed amplitude from simulated datasets with three types of errors, using different algorithms. The intensity-based algorithms suffer from high frequency artifacts under both noise and model mis-match errors. The percentage on the top left corner of each image is the relative error of each reconstruction.

Download Full Size | PDF

 figure: Fig. 5

Fig. 5 Reconstructed phase from simulated datasets with three types of errors, using different algorithms. The intensity-based algorithms suffer from phase wrapping artifacts under both noise and model mis-match errors. The percentage on the top left corner of each image is the relative error of each reconstruction.

Download Full Size | PDF

Tables Icon

Table 1. Tuning Parameters

In analyzing results from the simulated datasets, we find that algorithms with the same cost function give similar reconstruction artifacts. For example, the intensity-based algorithms suffer from high-frequency artifacts and phase wrapping when the data is not perfect. Almost all algorithms give a satisfactory reconstruction when using the error-free ideal dataset, except for intensity-based Wirtinger flow, which suffers some phase-amplitude leakage and phase blurring (see Figs. 45). When the dataset contains noise or model mis-match, we observe a distinct trend that amplitude-based and Poisson-likelihood-based algorithms give a better result, compared with intensity-based algorithms. The exception to this trend is the Gerchberg-Saxton algorithm, which is somewhat unstable and gets stuck in local minima, so is not robust to any type of error.

The goal of our simulations was to determine the main error sources that cause artifacts in the experimental reconstructions of Fig. 1. Since the experiments contain combined errors from multiple sources, it is difficult to attribute artifacts to any particular type of error. We find, however, that all three of our main error sources cause similar artifacts, hence our experimental results may be corrupted by any of Poisson noise, aberration, or LED misalignment. For example, notice that our simulated error-corrupted data all results in high-frequency artifacts when using intensity-based algorithms, similar to the experimental results. The Gerchberg-Saxton result also displays low-frequency errors in simulation, as in experiment. The fact that both noise and model mis-match create similar artifacts is unexpected, since they are very different error mechanisms. We explain below why all three are intensity-dependent errors, which is the reason why the cost function choice is so important for robustness. The consequence is that algorithms which use a more accurate noise model (amplitude and Poisson likelihood-based) will not only be more robust to noise, but also to model mis-match errors.

To examine the convergence of each algorithm, Figure 6 plots the error for each iteration when using the aberrated dataset and LED misaligned dataset with different algorithms. The intensity-based algorithms (red curves) clearly do not converge to the correct solution and can incur large errors when the data is not perfect. Compared to PhaseLift and the intensity-based Newton’s method, the Wirtinger-flow algorithm seems to have lower error; however, this is only due to its slow divergence. If run for many iterations, it will eventually settle on a similarly error-corrupted result as the other two intensity-based algorithms (not shown). We also observe that amplitude-based (blue curves) and Poisson-likelihood-based (black curve) algorithms converge to points with lower errors in a similar fashion. This behavior is well explained by the similarity of the algorithms in their use of gradients and Hessians (as shown in the Appendix). Again, the exception to the trend is the first-order Gerchberg-Saxton algorithm, which recovers the object fairly well with aberrated data, but goes unstable in the case of LED misalignment. Note that, when there is no pupil estimation step, the only difference between the Gerchberg-Saxton and the sequential Gauss-Newton algorithm is the step size. Since the latter algorithm gives a good reconstruction, while the former diverges, we conclude that the Gerchberg-Saxton step size is too large for a stable update in this particular case.

 figure: Fig. 6

Fig. 6 Phase relative error as a function of iteration number for different algorithms with the (a) ideal data, (b) Poisson noise data, (c) aberrated data and (d) LED misaligned data. When the data is not perfect, some of the algorithms may not converge to a correct solution.

Download Full Size | PDF

The convergence speed of each algorithm can be determined from Figure 6 using two metrics: number of iterations required and total runtime. We choose the convergence curves from the cases of ideal data and LED misaligned data and compare their iteration numbers and runtimes in Table 2. All the algorithms were implemented in MATLAB on an Intel i7 2.8 GHz CPU computer with 16G DDR3 RAM under OS X operating system. We define convergence as the point when the relative phase error reaches its stable point. The comparison does not consider the divergent cases. In the ideal data case, we can see that the sequential methods outperform all the other algorithms in terms of runtime. The Gerchberg-Saxton algorithm is the fastest in terms of both iteration number and runtime for this perfect dataset. The global Newton’s method using intensity-based and amplitude-based cost functions also converge very fast in terms of iteration number. The Wirtinger flow algorithm takes much longer to reach convergence both in runtime and iteration number. For the case of the LED misaligned data, only five algorithms converge. In terms of iteration number, the amplitude-based Newton’s method converges much faster than the other four, as expected. However, the sequential Gauss-Newton algorithm converges much faster in terms of the runtime. Though the global Newton’s method is theoretically better than the others, it takes significant time to calculate the full Hessian matrix. Thus, the sequential Gauss-Newton method is our preferred algorithm in practice, because it provides excellent robustness while also enabling fast runtimes and reasonable computational complexity.

Tables Icon

Table 2. Convergence Speed

The main conclusions to be drawn from this section are that the FPM optimization algorithms which are formulated from amplitude-based and Poisson-likelihood-based cost functions are more tolerant to imperfect datasets with both Poisson noise and physical deviations like model mis-match, which were represented by aberrations and LED misalignment here. In the next section, we will explain more about the causes for this trend.

4.2. Noise model analysis

The reason why amplitude-based and Poisson-likelihood-based algorithms have superior tolerance to experimental errors is due to their Poisson noise model. Each of these algorithms makes an implicit or explicit assumption that the magnitude of the errors in the data scale with the measured intensity. This is obviously a good model for Poisson noise errors, which are defined as noise which scales with intensity. It is not as obvious that the model mis-match errors (aberrations and LED misalignment) scale with intensity as well. To demonstrate this, Fig. 7 shows the histogram of the difference between the deviated dataset and the ideal dataset, for the cases of both brightfield and darkfield images. The histograms show a similar trend - all of the brightfield errors are much larger than the darkfield errors, with a similar statistical variation. Thus, the errors from Poisson noise, aberrations and LED misalignment all scale with the measured intensity. In our experimental data, there are always aberrations in the objective lens, LED misalignment, and Poisson shot noise. Since the noise model for the amplitude-based and Poisson-likelihood-based algorithms match the actual noise properties, these algorithms perform better than the intensity-based algorithms. And since the images captured by FPM have drastically different intensity values, this effect dominates the reconstruction artifacts. Note that these large variations in intensity values are specific to FPM and likely do not play a major role in other phase imaging schemes (e.g. phase from defocus or traditional ptychography), where images do not have such a wide range of intensity values. In our experiments, the Poisson noise is fairly low (due to use of a high-performance sCMOS sensor), but the model mismatch in the experimental data can cause effects similar to strong Poisson noise.

 figure: Fig. 7

Fig. 7 Both Poisson noise and model mis-match (aberrations, LED misalignment) cause errors that scale with mean intensity. Here, histograms show the intensity deviations under Poisson noise, aberration, and misalignment for a brightfield and darkfield image.

Download Full Size | PDF

For further understanding, we look closer at the relationship between the noise model and the cost function. Our optimization algorithms are derived from three cost functions. Each of the cost functions makes a noise model assumption. The intensity-based cost function assumes that noise in the data follows a white Gaussian noise model, which means that the standard deviation of the noise is assumed to be the same across the brightfield and darkfield images. Recall that the standard deviation of a Gaussian noise probability model is related to the weight in the cost function for each pixel, as shown in Eq. 4. The larger the standard deviation (amount of noise) at any pixel in Fourier space, the smaller the weighting, since noisy pixels should be trusted less. In the Gaussian noise model, the weights in the cost function for large-valued pixels and small-value pixels are the same. However, the deviation for brightfield images is much larger than that for darkfield images, as shown in Fig. 7. Hence, the brightfield images will contribute more to the total cost function value if the weights are all the same, due to their high intensity.

The result is that the intensity-based (Gaussian noise model) algorithms focus mostly on the brightfield images, which correspond to low spatial frequency information, and the darkfield images do not contribute much. The result is a failure in the high-frequency reconstruction, as we saw in Figs. 1, 4, 5, and loss of effective resolution since the darkfield images contain all the sub-diffraction-limit information. To illustrate the dramatic difference in weights, Fig. 8 shows the gradient of the different cost functions. Obviously, the intensity cost function gives much higher weighting to low spatial frequencies, which causes the high-frequency artifacts.

 figure: Fig. 8

Fig. 8 The intensity-based cost function gives higher weighting to images in the low spatial frequency region of the Fourier domain, resulting in high-frequency artifacts. Here, we show the gradient of the amplitude-based, Poisson-likelihood-based and intensity-based cost functions at the tenth iteration, using experimental data.

Download Full Size | PDF

Since the amplitude-based cost function shares a similar gradient and Hessian with the Poisson likelihood function, as shown in the Appendix and Fig. 8, it is not surprising that they both produce a similar quality reconstruction. Both of these cost functions assume the noise in the data follow a Poisson distribution, with the standard deviation scaling with the measured intensity. This assumption matches the actual error better than the white Gaussian assumption. The actual noise or deviations in the experiments for brightfield images have larger standard deviation, while that for darkfield images have smaller standard deviation. Under the Poisson noise model, the weight in the cost function is smaller for the noisy brightfield images and larger for the darkfield images. At the end, algorithms based on the Poisson noise model put more emphasis on the darkfield images and thus get a better reconstruction compared to the intensity-based algorithms. Figure 8 shows that the gradients for the amplitude-based and Poisson-likelihood-based cost function are similar and are more uniform throughout the whole Fourier space.

4.3. Pupil estimation

There are already more sophisticated FPM extensions to correct for some model mis-match errors [18,19], similar to the probe correction algorithms in traditional ptychography [16]. Both of the methods previously developed for Fourier ptychography are derived from the amplitude-based formulation. By taking the derivative of the cost function with respect to P, the decent direction to estimate the pupil function can be calculated as

PfA,(O,P)=diag(Q¯O¯)[Fdiag(I|g|)gdiag(P)QO].

By applying the pupil estimation step after each object estimation using this gradient or approximated Hessian, the sequential gradient descent [18] and the sequential Gauss-Newton method [19] including pupil estimation can be derived. Here we only consider the amplitude-based cost function, for simplicity.

We wish to investigate the improvements obtained by adding a pupil estimation step to both first and second-order optimization algorithms. Figure 9 shows the reconstruction result from the sequential gradient descent (first-order) and sequential Gauss-Newton (second-order) algorithms, using the aberrated dataset from the previous simulations. The numbers at the top left corner are the relative error compared to the ground truth simulated image. As can be seen, adding the pupil estimation step gives a better complex-field reconstruction, and the second-order (Gauss-Newton) method with pupil estimation provides the best result.

 figure: Fig. 9

Fig. 9 Object and pupil reconstruction results using different algorithms, with and without pupil estimation. The second-order method (sequential Gauss-Newton) with pupil estimation gives the best result, as expected. In this case, we find that the second-order method without pupil estimation is already better than first-order method (sequential gradient descent) with pupil estimation.

Download Full Size | PDF

Surprisingly, however, the second-order reconstruction without pupil estimation is better than the first-order reconstruction with pupil estimation, for this case. This highlights the robustness to aberrations that a second-order optimization scheme enables. The second-order nature of the algorithm makes it faster in convergence, and also more stable. In terms of runtime, the pupil estimation step takes about the same time as the object reconstruction part, so the algorithm is two times slower when the pupil function step is incorporated.

4.4. Misalignment correction

Another possible correction scheme for model mis-match is that for LED misalignment. Since each LED position corresponds to a certain shift of the pupil function in the Fourier domain, this is similar to the shift of the probe function in traditional ptychography. There, iterative algorithms have been proposed to correct for the positioning error of the probe function [14,32–34].

In [14,34], a gradient of the cost function with respect to the shift of the probe function has been calculated and the conjugate gradient method has been applied to correct for the positioning error. In [32], a simulated annealing method is adopted to estimate the shift of the probe function. The simulated annealing method is also adopted to correct for the misalignment of the spatial light modulator in a overlapped Fourier coding system [35], analogous to FPM. In our experiments, we observe that the simulated annealing method can locate the LED positions more accurately than other methods. Thus, we only compare with the simulated annealing method.

Simulated annealing is a method of searching unknown variables over a finite space to minimize or maximize the function of merit - the cost function in our case. Instead of exhaustively testing all the possible states, simulated annealing iteratively approaches the optimal state. At the first iteration, the algorithm randomly searches several states in the space and selects the one with the smallest cost function value. The algorithm then starts at this state for the next iteration, slowly reducing the search range in the following iterations until convergence.

In our sequential algorithm, the whole optimization problem is divided into many suboptimization problems for different collected images. At each sub-optimization problem, a gradient descent or Gauss-Newton method is applied to update that corresponding region in Fourier domain. To add a LED mis-alignment correction step, the simulated annealing algorithm can be incorporated into each sub-iteration to find an optimal shift of the pupil function. In each sub-iteration, the down-sampling matrix, Q, which contains the information of the pupil shift, is tested according to the annealing process for several possible states corresponding to different shifts of the pupil. The state with the smallest cost function value is selected to update the old down-sampling matrix. Then, the new down-sampling matrix is used to update the corresponding region in the Fourier domain.

The simulated annealing method estimates the LED positions with good accuracy. Figure 10 shows the reconstruction result from the simulated LED misaligned dataset, both with and without the LED correction step. The result using the LED correction clearly shows better quality and smaller error, as seen in Fig. 10(a). Since the LED correction scheme also estimates the actual LED positions, which we intentionally perturbed in order to impose a known error, we can also compare the actual and recovered LED positions, shown in Fig. 10(b).

 figure: Fig. 10

Fig. 10 (a) Adding LED misalignment correction improves the reconstruction results (sequential Gauss-Newton method). (b) The original, perturbed, and corrected LED positions in angular coordinates. LED correction accurately retrieves the actual LED positions.

Download Full Size | PDF

To complete the picture, we now show experimental reconstructions with and without the two correction schemes: pupil correction and LED mis-alignment corrections (see Fig. 11). Since we do not know ground truth for our experiments, we can only make qualitative observations. An incremental improvement is observed when adding the pupil estimation and then the LED correction steps - the background variation becomes flatter. Figure 11(b) shows the corrected LED positions compared to the original ones, in angular coordinates. Corrected positions of LEDs in different regions share similar offset because the fabrication process of the LED array can cause unexpected position misalignment for each LED. Notice that the LEDs at the edges (corresponding to higher angles of illumination) incur more variation, since these are more sensitive to calibration. Also, many of the large deviations occur at the edges that are not along the horizontal and vertical axes. In these areas, the LED position recovery is poor because the object has very little information there (the resolution test target contains only square features) and so the data contains little information about these areas. However, any errors in LED positions in this area will also not significantly affect the reconstruction if they do not contribute much energy to the object spectrum. If the goal was not to correct the image results, but rather to find the LED positions accurately, then one should choose an object that contains uniformly distributed spatial frequencies (e.g. a random diffuser or speckle field). Although the simulated annealing further improves our reconstruction, we note that it is more than ten times slower to process the data because of the local search performed at each sub-iteration.

 figure: Fig. 11

Fig. 11 Experimental reconstructions with and without LED misalignment correction (sequential Gauss-Newton method). (a) The reconstructed object and pupil. (b) The original and corrected LED positions, in angular coordinates.

Download Full Size | PDF

5. Conclusion

We formulated the Fourier ptychographic phase retrieval problem using maximum likelihood optimization theory. Under this framework, we reviewed the existing FPM algorithms and classified them based on their cost functions: amplitude-based algorithms (akin to a Poisson noise model) and intensity-based algorithms (akin to a white Gaussian noise model). We also derived a new algorithm based on the Poisson likelihood function, which is better suited for dealing with measurement imperfections. We compared the tolerance of these algorithms under errors due to experimental noise and model mis-match (aberrations and LED mis-alignment) using both simulated data and experimental data. Because the noise and model mis-match error for brightfield and darkfield images depend on the measured intensity, the amplitude-based and Poisson-likelihood-based algorithms from the Poisson noise model are more robust than the intensity-based algorithms. This can be explained by the standard deviation of the noise model determining the weight of each image in the optimization. Hence, intensity-based algorithms over-weight the brightfield images, resulting in poor high-frequency reconstruction.

We used existing pupil estimation algorithms and proposed a simulated-annealing-based LED correction algorithm to algorithmically fix the experimental deviations. We compared the performance of the pupil estimation algorithms and found that second-order methods give the best results. We also showed the capability of the simulated annealing method to correct for misaligned LEDs and find their actual positions.

Based on our studies, we conclude that the global Newton’s method gives the best reconstruction, but may have high computational cost. Considering both robustness and computational efficiency, we find that sequential Gauss-Newton method provides the best trade-offs for large-scale applications. Its experimental robustness is verified in our recent time-series in vitro experiments [7]. Our open source code for this algorithm can be downloaded at [36].

Appendix A: Gradient and Hessian calculation

Gradient:

Consider that equations (9) and (10) can be expressed as

fA(O)=fAfAfI(O)=fIfI,
where fAI|g|, and fIℓI − |g|2.

Then, calculate the derivative of fA with respect to O, and it can then be expressed as

OfA(O)=[(fAfA)O]=[fAfAfAfAO].
Using |g|2 = diag()g and |g| = (|g|2)1/2, two chain rule parts in (32) are calculated as
(fAfA)fA=2fAfAO=(|g|2)1/2(|g|2)(diag(g¯)g)O=12diag(g¯|g|)F1diag(P)Q,
if g does not contain any zero entries for = 1,...,Nimg.

By plugging these two terms into (32), the gradient of fA with respect to O becomes

OfA(O)=Qdiag(P¯)Fdiag(g|g|)(I|g|)=Qdiag(P¯)(Fdiag(I|g|)gdiag(P)QO).

The gradient for fI can be calculated in the similar way, and the chain rule part of fIℓ can be calculated as

fIO=(diag(g¯)g)O=diag(g¯)F1diag(P)Q.

With (35), it is clear to express the gradient of fI as

OfI(O)=[(fIfI)fIfIO]=2Qdiag(P¯)Fdiag(g)(I|g|2).

The calculation of gradient of Poisson(O) with respect to O is different from the other two.

With the expression (12), the gradient of Poisson likelihood function can be calculated as

OPoisson(O)=(PoissonO)=(j[I,ja,ja,j+a,j])=(j[I,ja,jO]1a,jOa,j)=((I|g|2)diag(1|g|2)diag(g¯)F1diag(P)Q)=Qdiag(P¯)Fdiag(g|g|2)(I|g|2).
This is equivalent to the gradient of the intensity-based cost function with added weight 1/|g|2 to the component from each image. In addition, this gradient is very similar to that from the amplitude-based cost function.

Since we have gradients for all cost functions, the updating equation for the gradient descent method can then be expressed as

O(i+1)=O(i)α(i)Of(O(i)),
where i denotes the iteration number, α is the step size chosen by the line search algorithm, and f(O) can be either intensity-based or amplitude-based cost function.

Looking at ∇OfA(O), ∇OfI(O) and ∇OPoisson(O), they all contain the term Qdiag(P¯) following by a residual term. The residual term basically finds the difference between the estimation and the measurement. This difference carries the information to update the previous estimation. Since each measurement carries the information for a specific region in the Fourier space, the Qdiag(P¯) term brings this updating information back to the right place corresponding to some spatial frequency. For ∇OfA(O), the first term in the residual shows the replacement of the amplitude in the real domain, which is the projection from the estimation to the modulus space. Thus, the gradient descent method using the amplitude-based cost function is similar to the projection-based phase retrieval solver.

Hessian:

The second-order Taylor expansion on an arbitrary real function f(c) with a complex vector c = (OT, ŌT)T at certain point c0=(O0T,O¯0T)T can be written as [30]

f(c)f(c0)+f(c0)(cc0)+12(cc0)Hcc(c0)(cc0),
where the matrix Hcc is the Hessian of f(c). For the case of a single-value function, the second-order term in the Taylor expansion denotes the curvature of the function at that expansion point. Thus, this Hessian matrix similarly contains the curvature information of the original multivariate function.

If the Hessian is a diagonal matrix, each diagonal entry denotes the curvature in each corresponding dimension. If the Hessian is not diagonal, a coordinate transformation can be found to make the Hessian diagonal by using eigenvalue decomposition. For a convex problem, the Hessian is positive semidefinite. The curvatures of the cost function in different dimensions are always nonnegative. A standard optimization process can lead to a global minimum. However, if the problem is non-convex, a standard optimization process will probably lead to a local minimum. Calculating the Hessian of a cost function is useful either to examine the optimization process or to speed up the convergence rate by using Newton’s method.

From [17, 30], the definition for the Hessian of a real-value function with multiple complex variables is a 2n2 × 2n2 matrix and can be expressed as

Hcc=[HOOHO¯OHOO¯HO¯O¯],
where each component n2 × n2 matrices can be further calculated as
HOO=O(fO¯),HO¯O=O¯(fO)HOO¯=O(fO),HO¯O¯=O¯(fO¯).
Similar to the calculation of the gradient, the components of the Hessians for amplitude-based, intensity-based, and Poisson-likelihood-based cost functions can be calculated by taking an additional derivative on the gradient of the cost functions. The components of the Hessian for the amplitude-based cost function are
HOOA=Qdiag(P¯)F[112diag(I|g|)]F1diag(P)QHO¯OA=12Qdiag(P¯)Fdiag[(Ig2|g|3)]F¯1diag(P¯)Q¯HOO¯A=12QTdiag(P)F¯diag[(Ig¯2|g|3)]F1diag(P)QHO¯O¯A=QTdiag(P)F¯[112diag(I|g|)]F¯1diag(P¯)Q¯,
where 1 is the m2 × m2 identity matrix.

Likewise, the Hessian of the intensity-based cost function is

HOOI=2Qdiag(P¯)Fdiag(2|g|2I)F1diag(P)QHO¯OI=2Qdiag(P¯)Fdiag(g2)F¯1diag(P¯)Q¯HOO¯I=2QTdiag(P)F¯diag(g¯2)F1diag(P)QHO¯O¯I=2QTdiag(P)F¯diag(2|g|2I)F¯1diag(P¯)Q¯.

Finally, the Hessian of the Poisson likelihood cost function is

HOOP=Qdiag(|P|2)QHO¯OP=Qdiag(P¯)Fdiag(Ig2|g|4)F¯1diag(P¯)Q¯HOO¯P=QTdiag(P)F¯diag(Ig¯2|g|4)F1diag(P)QHO¯O¯P=QTdiag(|P|2)Q¯.

In general, Newton’s method, which is the second-order method using the inversion of Hessian matrix, is preferred in solving nonlinear least square problems because of its fast convergence and stability compared to the first-order methods such as gradient descent. The updating equation for Newton’s method can be expressed as

[O(i+1)O¯(i+1)]=[O(i)O¯(i)]α(i)Hcc1[Of(O(i))O¯f(O(i))].

Acknowledgments

Funding was provided by the Gordon and Betty Moore Foundation’s Data-Driven Discovery Initiative through Grant GBMF4562 to Laura Waller (UC Berkeley).

References and links

1. G. Zheng, R. Horstmeyer, and C. Yang, “Wide-field, high-resolution Fourier ptychographic microscopy,” Nature Photonics 7, 739–745 (2013). [CrossRef]  

2. J. M. Rodenburg and H. M. Faulkner, “A phase retrieval algorithm for shifting illumination,” Applied Physics Letters 85, 4795–4797 (2004). [CrossRef]  

3. G. R. Brady, M. Guizar-Sicairos, and J. R. Fienup, “Optical wavefront measurement using phase retrieval with transverse translation diversity,” Optics express 17, 624–639 (2009). [CrossRef]   [PubMed]  

4. A. Williams, J. Chung, X. Ou, G. Zheng, S. Rawal, Z. Ao, R. Datar, C. Yang, and R. Cote, “Fourier ptychographic microscopy for filtration-based circulating tumor cell enumeration and analysis,” Journal of biomedical optics 19, 066007(2014). [CrossRef]   [PubMed]  

5. R. Horstmeyer, X. Ou, G. Zheng, P. Willems, and C. Yang, “Digital pathology with fourier ptychography,” Computerized Medical Imaging and Graphics 42, 38–43 (2015). [CrossRef]  

6. J. Chung, X. Ou, R. P. Kulkarni, and C. Yang, “Counting White Blood Cells from a Blood Smear Using Fourier Ptychographic Microscopy,” PloS one10 (2015).

7. L. Tian, Z. Liu, L.-H. Yeh, M. Chen, J. Zhong, and L. Waller, “Computational illumination for high-speed in vitro Fourier ptychographic microscopy,” Optica 2, 904–911 (2015). [CrossRef]  

8. L. Tian and L. Waller, “3D intensity and phase imaging from light field measurements in an LED array microscope,” Optica 2, 104–111 (2015). [CrossRef]  

9. R. Gerchberg and W. Saxton, “Phase determination for image and diffraction plane pictures in the electron microscope,” Optik 34, 275–284 (1971).

10. J. Fienup, “Reconstruction of an object from the modulus of its Fourier transform,” Optics Letters 327–29 (1978). [CrossRef]   [PubMed]  

11. J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt. 21, 2758–2769 (1982). [CrossRef]   [PubMed]  

12. V. Elser, “Phase retrieval by iterated projections,” J. Opt. Soc. Am. A 20, 40–55 (2003). [CrossRef]  

13. S. Marchesini, “A unified evaluation of iterative projection algorithms for phase retrieval,” Rev. Sci. Instrum. 78, 011301 (2007). [CrossRef]  

14. M. Guizar-Sicairos and J. R. Fienup, “Phase retrieval with transverse translation diversity: a nonlinear optimization approach,” Optics Express 16, 7264–7278 (2008). [CrossRef]   [PubMed]  

15. A. M. Maiden and J. M. Rodenburg, “An improved ptychographical phase retrieval algorithm for diffractive imaging,” Ultramicroscopy 109, 1256–1262 (2009). [CrossRef]   [PubMed]  

16. P. Thibault, M. Dierolf, O. Bunk, A. Menzel, and F. Pfeiffer, “Probe retrieval in ptychographic coherent diffractive imaging,” Ultramicroscopy 109, 338–343 (2009). [CrossRef]   [PubMed]  

17. C. Yang, J. Qian, A. Schirotzek, F. Maia, and S. Marchesini, “Iterative Algorithms for Ptychographic Phase Retrieval,” arXiv:1105.5628v1 (2011).

18. X. Ou, G. Zheng, and C. Yang, “Embedded pupil function recovery for Fourier ptychographic microscopy,” Opt. Express 22, 4960–4972 (2014). [CrossRef]   [PubMed]  

19. L. Tian, X. Li, K. Ramchandran, and L. Waller, “Multiplexed coded illumination for Fourier ptychography with an LED array microscope,” Biomed. Opt. Express 5, 2376–2389 (2014). [CrossRef]   [PubMed]  

20. E. J. Candès, X. Li, and M. Soltanolkotabi, “Phase retrieval via Wirtinger flow: Theory and algorithms,” arXiv:1407.1065 (2014).

21. L. Bian, J. Suo, G. Zheng, K. Guo, F. Chen, and Q. Dai, “Fourier ptychographic reconstruction using Wirtinger flow optimization,” Optics Express 23, 4856–4866 (2015). [CrossRef]   [PubMed]  

22. J. Nocedal and S. Wright, “Numerical Optimization,” Springer Science & Business Media (2006).

23. B. Recht, M. Fazel, and P. A. Parrilo, “Guaranteed Minimum-Rank Solutions of Linear Matrix Equations via Nuclear Norm Minimization,” SIAM Review 52, 471–501 (2010). [CrossRef]  

24. E. J. Candès, Y. C. Eldar, T. Strohmer, and V. Voroninski, “Phase Retrieval via Matrix Completion,” SIAM Journal on Imaging Sciences 6, 199–225 (2013). [CrossRef]  

25. E. J. Candès, T. Strohmer, and V. Voroninski, “PhaseLift: Exact and stable signal recovery from magnitude measurements via convex programming,” Communications on Pure and Applied Math 66, 1241–1274 (2013). [CrossRef]  

26. S. Burer and R. Monteiro, “A Nonlinear Programming Algorithm for Solving Semidefinite Programs via Low-Rank Factorization,” Mathematical Programming 95, 329–357 (2003). [CrossRef]  

27. R. Horstmeyer, R. Y. Chen, X. Ou, B. Ames, J. A. Tropp, and C. Yang, “Solving ptychography with a convex relaxation,” New J. Phys. 17, 053044 (2015). [CrossRef]   [PubMed]  

28. E. J. Candès, X. Li, and M. Soltanolkotabi, “Phase retrieval from coded diffraction patterns,” arXiv:1310.3240 (2013).

29. P. Thibault and M. Guizar-Sicairos, “Maximum-likelihood refinement for coherent diffractive imaging,” New Journal of Physics 14, 063004 (2012). [CrossRef]  

30. K. Kreutz-Delgado, “The Complex Gradient Operator and the CR-Calculus,” arXiv:0906.4835v1 (2009).

31. J. Nocedal and S. J. Wright, “Conjugate gradient methods,” Springer (2006).

32. A. M. Maiden, M. J. Humphry, M. C. Sarahan, B. Kraus, and J. M. Rodenburg, “An annealing algorithm to correct positioning errors in ptychography,” Ultramicroscopy 120, 64–72 (2012). [CrossRef]   [PubMed]  

33. F. Zhang, I. Peterson, J. Vila-Comamala, A. Diaz, F. Berenguer, R. Bean, B. Chen, A. Menzel, I. K. Robinson, and J. M. Rodenburg, “Translation position determination in ptychographic coherent diffraction imaging,” Opt. Express 21, 13592–13606 (2013). [CrossRef]   [PubMed]  

34. A. Tripathi, I. McNulty, and O. G. Shpyrko, “Ptychographic overlap constraint errors and the limits of their numerical recovery using conjugate gradient descent methods,” Opt. Express 22, 1452–1466 (2014). [CrossRef]   [PubMed]  

35. R. Horstmeyer, X. Ou, J. Chung, G. Zheng, and C. Yang, “Overlapped Fourier coding for optical aberration removal,” Optics Express 22, 24062–24080 (2014). [CrossRef]   [PubMed]  

36. http://www.laurawaller.com/opensource/

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (11)

Fig. 1
Fig. 1 Fourier ptychographic reconstruction (amplitude only) of a test object with the algorithms discussed here, all using the same experimental dataset. Algorithms derived from the same cost function (amplitude-based, intensity-based, and Poisson-likelihood) give similar performance, and first-order methods (Gerchberg-Saxton) suffer artifacts.
Fig. 2
Fig. 2 (a) Experimental setup for Fourier ptychography with an LED array microscope. (b) The sample’s Fourier space is synthetically enlarged by capturing multiple images from different illumination angles. Each circle represents the spatial frequency coverage of the image captured by single-LED illumination. Brightfield images have orders of magnitude higher intensity than darkfield (see histograms), resulting in different noise levels.
Fig. 3
Fig. 3 To explain the artifacts in our experimental results, as well as evaluate the robustness of various algorithms under common types of errors, we simulate several FPM datasets with different types of known error: (1) Ideal data, (2) Poisson noise data, (3) aberrated data, (4) LED misaligned data (×: original position, ○: perturbed position).
Fig. 4
Fig. 4 Reconstructed amplitude from simulated datasets with three types of errors, using different algorithms. The intensity-based algorithms suffer from high frequency artifacts under both noise and model mis-match errors. The percentage on the top left corner of each image is the relative error of each reconstruction.
Fig. 5
Fig. 5 Reconstructed phase from simulated datasets with three types of errors, using different algorithms. The intensity-based algorithms suffer from phase wrapping artifacts under both noise and model mis-match errors. The percentage on the top left corner of each image is the relative error of each reconstruction.
Fig. 6
Fig. 6 Phase relative error as a function of iteration number for different algorithms with the (a) ideal data, (b) Poisson noise data, (c) aberrated data and (d) LED misaligned data. When the data is not perfect, some of the algorithms may not converge to a correct solution.
Fig. 7
Fig. 7 Both Poisson noise and model mis-match (aberrations, LED misalignment) cause errors that scale with mean intensity. Here, histograms show the intensity deviations under Poisson noise, aberration, and misalignment for a brightfield and darkfield image.
Fig. 8
Fig. 8 The intensity-based cost function gives higher weighting to images in the low spatial frequency region of the Fourier domain, resulting in high-frequency artifacts. Here, we show the gradient of the amplitude-based, Poisson-likelihood-based and intensity-based cost functions at the tenth iteration, using experimental data.
Fig. 9
Fig. 9 Object and pupil reconstruction results using different algorithms, with and without pupil estimation. The second-order method (sequential Gauss-Newton) with pupil estimation gives the best result, as expected. In this case, we find that the second-order method without pupil estimation is already better than first-order method (sequential gradient descent) with pupil estimation.
Fig. 10
Fig. 10 (a) Adding LED misalignment correction improves the reconstruction results (sequential Gauss-Newton method). (b) The original, perturbed, and corrected LED positions in angular coordinates. LED correction accurately retrieves the actual LED positions.
Fig. 11
Fig. 11 Experimental reconstructions with and without LED misalignment correction (sequential Gauss-Newton method). (a) The reconstructed object and pupil. (b) The original and corrected LED positions, in angular coordinates.

Tables (2)

Tables Icon

Table 1 Tuning Parameters

Tables Icon

Table 2 Convergence Speed

Equations (45)

Equations on this page are rendered with MathJax. Learn more.

I ( r ) = | 1 { P ( u ) O ( u u ) } | 2 .
min O ( u ) f A ( O ( u ) ) = min O ( u ) r | I ( r ) | 1 { P ( u ) O ( u u ) } | | 2 .
p [ I ( r ) | O ( u ) ] = 1 2 π σ w 2 exp [ ( I ( r ) I ^ ( r ) ) 2 2 σ w 2 ] ,
Gaussian ( O ( u ) ) = log r p [ I ( r ) | O ( u ) ] = r [ 1 2 log ( 2 π σ w 2 ) + ( I ( r ) I ^ ( r ) ) 2 2 σ w 2 ] .
min O ( u ) f I ( O ( u ) ) = min O ( u ) r | I ( r ) | 1 { P ( u ) O ( u u ) } | 2 | 2 .
p [ I ( r ) | O ( u ) ] = [ I ^ ( r ) ] I ( r ) exp [ I ^ ( r ) ] I ( r ) ! 1 2 π σ , r 2 exp [ ( I ( r ) I ^ ( r ) ) 2 2 σ , r 2 ] .
min O ( u ) Poisson ( O ( u ) ) = min O ( u ) r ( I ( r ) log [ I ^ ( r ) ] + I ^ ( r ) + log [ I ( r ) ! ] ) min O ( u ) r ( I ( r ) I ^ ( r ) ) 2 2 σ , r 2 .
I ^ = | g | 2 = | F 1 diag ( P ) Q O | 2 .
min O f A ( O ) = min O ( I | g | ) ( I | g | ) ,
min O f I ( O ) = min O ( I | g | 2 ) ( I | g | 2 ) .
| g | 2 = diag ( g ¯ ) F 1 diag ( P ) Q O = A O = [ a , 1 a , m 2 ] O ,
min O Poisson ( O ) = j [ I , j log ( a , j O ) a , j O + log ( I , j ) ! ] .
f A , ( O ) = ( I | g | ) ( I | g | ) ,
O f A , ( O ) = Q diag ( P ¯ ) [ F diag ( I | g | ) g diag ( P ) Q O ] .
O ( i , + 1 ) = O ( i , ) 1 | P | max 2 O f A , + 1 ( O ( i , ) ) ,
O ( i + 1 ) = O ( i ) α ( i ) O f I ( O ( i ) ) ,
α ( i ) = min ( 1 e i / i 0 , θ max ) ( O ( 0 ) ) O ( 0 ) ,
H cc , A ( f A c ) ( f A c ) = [ 1 2 Q diag ( | P | 2 ) Q Q diag ( P ¯ ) F diag ( g 2 | g | 2 ) F ¯ 1 diag ( P ¯ ) Q ¯ Q T diag ( P ) F ¯ diag ( g ¯ 2 | g | 2 ) F 1 diag ( P ) Q 1 2 Q T diag ( | P | 2 ) Q ¯ ] ,
( H cc , A ) 1 [ 2 Q diag ( 1 | P | 2 + Δ ) Q 0 0 2 Q T diag ( 1 | P | 2 + Δ ) Q ¯ ] ,
[ O ( i , + 1 ) O ¯ ( i , + 1 ) ] = [ O ( i , ) O ¯ ( i , ) ] [ Q diag ( | P | | P | max ) Q 0 0 Q T diag ( | P | | P | max ) Q ] ( H cc , A ) 1 [ O f A , + 1 ( O ( i , ) ) O ¯ f A , + 1 ( O ¯ ( i , ) ) ] ,
[ O ( i + 1 ) O ¯ ( i + 1 ) ] = [ O ( i ) O ¯ ( i ) ] α ( i ) ( H cc ) 1 [ O f ( O ( i ) ) O ¯ f ( O ( i ) ) ] .
g = [ g 1 g N img ] = [ F 1 0 0 F 1 ] [ diag ( P ) 0 0 diag ( P ) ] [ Q 1 Q N img ] O = DO = [ d 1 d N img m 2 ] O ,
| g | 2 = [ O d 1 d 1 O O d N img m 2 d N img m 2 O ] = [ Tr ( d 1 d 1 OO ) Tr ( d N img m 2 d N img m 2 OO ) ] = [ Tr ( D 1 X ) Tr ( D N img m 2 X ) ] = 𝒜 ( X ) ,
f I ( X ) = ( I | g | 2 ) ( I | g | 2 ) = ( I 𝒜 ( X ) ) ( I 𝒜 ( X ) ) .
min X f I ( X ) = min X ( I 𝒜 ( X ) ) ( I 𝒜 ( X ) ) + α Tr ( X ) ,
min R f AL , I ( R ) = min R σ 2 ( I 𝒜 ( RR ) ) ( I 𝒜 ( RR ) ) + y T ( I 𝒜 ( RR ) ) + Tr ( RR ) ,
min O f AL , I ( O ) = min O σ 2 [ ( I | g | 2 + 2 σ y ) ( I | g | 2 ) ] + O O .
O f AL , I ( O ) = σ Q diag ( P ¯ ) F diag ( g ) ( I | g | 2 + 1 σ y ) + O .
Error = O recover O true 2 2 O true 2 2 ,
P f A , ( O , P ) = diag ( Q ¯ O ¯ ) [ F diag ( I | g | ) g diag ( P ) Q O ] .
f A ( O ) = f A f A f I ( O ) = f I f I ,
O f A ( O ) = [ ( f A f A ) O ] = [ f A f A f A f A O ] .
( f A f A ) f A = 2 f A f A O = ( | g | 2 ) 1 / 2 ( | g | 2 ) ( diag ( g ¯ ) g ) O = 1 2 diag ( g ¯ | g | ) F 1 diag ( P ) Q ,
O f A ( O ) = Q diag ( P ¯ ) F diag ( g | g | ) ( I | g | ) = Q diag ( P ¯ ) ( F diag ( I | g | ) g diag ( P ) Q O ) .
f I O = ( diag ( g ¯ ) g ) O = diag ( g ¯ ) F 1 diag ( P ) Q .
O f I ( O ) = [ ( f I f I ) f I f I O ] = 2 Q diag ( P ¯ ) F diag ( g ) ( I | g | 2 ) .
O Poisson ( O ) = ( Poisson O ) = ( j [ I , j a , j a , j + a , j ] ) = ( j [ I , j a , j O ] 1 a , j O a , j ) = ( ( I | g | 2 ) diag ( 1 | g | 2 ) diag ( g ¯ ) F 1 diag ( P ) Q ) = Q diag ( P ¯ ) F diag ( g | g | 2 ) ( I | g | 2 ) .
O ( i + 1 ) = O ( i ) α ( i ) O f ( O ( i ) ) ,
f ( c ) f ( c 0 ) + f ( c 0 ) ( c c 0 ) + 1 2 ( c c 0 ) H cc ( c 0 ) ( c c 0 ) ,
H cc = [ H OO H O ¯ O H O O ¯ H O ¯ O ¯ ] ,
H OO = O ( f O ¯ ) , H O ¯ O = O ¯ ( f O ) H O O ¯ = O ( f O ) , H O ¯ O ¯ = O ¯ ( f O ¯ ) .
H OO A = Q diag ( P ¯ ) F [ 1 1 2 diag ( I | g | ) ] F 1 diag ( P ) Q H O ¯ O A = 1 2 Q diag ( P ¯ ) F diag [ ( I g 2 | g | 3 ) ] F ¯ 1 diag ( P ¯ ) Q ¯ H O O ¯ A = 1 2 Q T diag ( P ) F ¯ diag [ ( I g ¯ 2 | g | 3 ) ] F 1 diag ( P ) Q H O ¯ O ¯ A = Q T diag ( P ) F ¯ [ 1 1 2 diag ( I | g | ) ] F ¯ 1 diag ( P ¯ ) Q ¯ ,
H OO I = 2 Q diag ( P ¯ ) F diag ( 2 | g | 2 I ) F 1 diag ( P ) Q H O ¯ O I = 2 Q diag ( P ¯ ) F diag ( g 2 ) F ¯ 1 diag ( P ¯ ) Q ¯ H O O ¯ I = 2 Q T diag ( P ) F ¯ diag ( g ¯ 2 ) F 1 diag ( P ) Q H O ¯ O ¯ I = 2 Q T diag ( P ) F ¯ diag ( 2 | g | 2 I ) F ¯ 1 diag ( P ¯ ) Q ¯ .
H OO P = Q diag ( | P | 2 ) Q H O ¯ O P = Q diag ( P ¯ ) F diag ( I g 2 | g | 4 ) F ¯ 1 diag ( P ¯ ) Q ¯ H O O ¯ P = Q T diag ( P ) F ¯ diag ( I g ¯ 2 | g | 4 ) F 1 diag ( P ) Q H O ¯ O ¯ P = Q T diag ( | P | 2 ) Q ¯ .
[ O ( i + 1 ) O ¯ ( i + 1 ) ] = [ O ( i ) O ¯ ( i ) ] α ( i ) H cc 1 [ O f ( O ( i ) ) O ¯ f ( O ( i ) ) ] .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.