Multiview Attenuation Estimation and Correction Valentin Debarnot∗, Jonas Kahn and Pierre Weiss † January 11, 2017 7 1 0 2 Abstract n a Measuringattenuationcoefficientsisafundamentalproblemthatcan J be solved with diverse techniques such as X-ray or optical tomography 0 and lidar. We propose a novel approach based on the observation of a 1 samplefromafewdifferentangles. Thisprinciplecanbeusedinexisting devices such as lidar or various types of fluorescence microscopes. It is ] based on the resolution of a nonlinear inverse problem. We propose a C specificcomputationalapproachtosolveitandshowthewell-foundedness O of the approach on simulated data. Some of the tools developed are of . independent interest. In particular we propose an efficient method to h t correct attenuation defects, new robust solvers for the lidar equation as a well as new efficient algorithms to compute the Lambert W function and m the proximal operator of the logsumexp function in dimension 2. [ 1 1 Introduction v 5 The ability to analyze the composition of gases in the atmosphere, the orga- 1 6 nization of a biological tissue, or the state of organs in the human body has 2 invaluable scientific and societal repercussions. These seemingly unrelated is- 0 sues can be solved thanks to a common principle: rays traveling through the . 1 sample are attenuated and this attenuation provides an indirect measurement 0 ofabsorptioncoefficients. Thisisthebasis ofvariousdevicessuchasX-rayand 7 optical projection tomography [1–3] or lidar [4]. The aim of this paper is to 1 provide an alternative approach based on the observation of the sample from a : v few different angles. i X r 1.1 The basic principle a Let us provide a flavor of the proposed idea in an idealized 1D system. Assume that two measured signals u and u are formed according to the following 1 2 model: (cid:18) (cid:90) x (cid:19) u (x)=β(x)exp − α(t)dt for x∈[0,1] (1) 1 0 ∗V.DebarnotisastudentatINSA,Universit´edeToulouse,France †J.Kahn&P.WeissarewithIMTandITAV,CNRSandUniversit´edeToulouse,France 1 and (cid:18) (cid:90) 1 (cid:19) u (x)=β(x)exp − α(t)dt for x∈[0,1]. (2) 2 x The function β : [0,1] → R will be referred to as a density throughout + the paper. It may represent different physical quantities such as backscat- ter coefficients in lidar or fluorophore densities in microscopy. The function α : [0,1] → R will be referred to as the attenuation and may represent ab- + sorption or extinction coefficients. The signals u and u can be interpreted 1 2 as measurements of the same scene under opposite directions. Equations (1) and (2) coincide with the Beer-Lambert law that is a simple model to describe attenuation of light in absorbing media. The question tackled in this paper is: can we recover both α and β from the knowledge of u and u ? 1 2 Under a positivity assumption β(x) > 0 for all x ∈ [0,1], the answer is (cid:16) (cid:17) straightforwardly positive. Setting v(x) = log u2(x) , equations (1) and (2) u1(x) yield: (cid:90) x (cid:90) 1 v(x)= α(t)dt− α(t)dt. (3) 0 x Therefore 1 ∂ α(x)= v(x) (4) 2∂ x and u (x) β(x)= 1 . (5) (cid:0) (cid:82)x (cid:1) exp − α(t)dt 0 Unfortunately, formulas (4) and (5) only have a theoretical interest: they can- not be used in practice since computing the derivative of a log of a ratio is extremely unstable from a numerical point of view. We will therefore design a numerical procedure based on a Bayesian estimator to retrieve the density α and attenuation coefficient β in a stable and efficient manner. It is particularly relevant when the data suffer from Poisson noise. 1.2 Contributions This paper contains various contributions listed below. • We show that it is possible to retrieve attenuation coefficients from mul- tiview measurements in different systems such as lidar, confocal or SPIM microscopes. To the best of our knowledge, this fact was only known in lidar until now [5–7]1. Fig. 1 summarizes the proposed idea. The attenuation, which is usually considered as a nuisance in confocal microscopy is exploited to measure attenuation. The algorithm successfully retrieves estimates of the density and attenuation from two attenuated and noisy images. Let us mention that some researchers already proposed to measure absorption and cor- rect attenuation by combining optical projection tomography and SPIM imaging [8]. The principle outlined here shows that much simpler optical setups (a traditional confocal microscope) theoretically allows estimating the same quantities. 1Webecameawareoftheseworkswhilefinishingthiswork. 2 • We propose novel Bayesian estimators for the density α and the attenua- tion β. To the best of our knowledge, this is the first attempt to provide a clear statistical framework to recover these quantities. • The proposed estimators are solutions of a nonconvex problem. We de- velop aspecific nonlinear programming solver based ona warm-start con- vex initialization. This leads us to develop an efficient algorithm to com- pute the proximal operator of the logsumexp function in dimension 2 as well as a new algorithm to compute the Lambert W function. • The proposed estimators also seem to be novel for the standard mono- viewinverseprobleminlidarandforcorrectingattenuationdefectsunder a Poisson noise assumption. • We perform a numerical validation of the proposed ideas on synthetic data,showingthewell-foundednessoftheapproach. Thevalidationofthe method on specific devices is left as an outlook for future works. 2 Applications Inthissection,weshowvariousapplicationswherethemethodologyproposedin this paper can be applied. We finish by describing precisely the discrete model considered in our numerical experiments. 2.1 Lidar In lidar, an object (atmosphere, gas,...) is illuminated with a laser beam. Par- ticles within the object reflect light. The time to return of the reflected light is then measured with a scanner. The received signal u (x) is the backscattered 1 mean power at altitude x for a specific wavelength. The density β corresponds to the backscattered coefficient, while α is called extinction coefficient. The equation relating u to α and β is: 1 (cid:18)C (cid:18) (cid:90) x (cid:19)(cid:19) u (x)=P β(x)exp −2 α(t)dt , (6) 1 x2 0 whereC isindependentofx. ThenotationP(z)standsforaPoissondistributed randomvariableofparameterz. ThePoissondistributionisarathergoodnoise modelinlidar,sincemeasurementsdescribeanumberofdetectedphotons. The term Cβ(x)appearsinthelidarequation(6)insteadofsimplyβ. Thealgorithm x2 developed later will allow retrieving Cβ(x) instead of β. This is not a problem x2 since there is a direct known relationship between both. Remark 1. InRamanlidar, thecoefficientβ correspondstothemolecularden- sity of the atmosphere, while α is the sum of extinction coefficients at different wavelengths. The theory developed herein also applied to this setting. When the backscatter coefficient β has a known analytical relationship with the extinction coefficient α, direct inversion is possible. A popular method is Klett’s formula [9] for instance. Alternative formula exist [10] when the backscatter coefficient is known. The recent trend consists in using iterative 3 (a) Density β (b) Attenuation α (c) Image u (d) Image u 1 2 (e) Estimated density (f) Estimated attenuation SNR=22.4dB SNR=9.4dB Figure 1: Illustration of the contribution. A sample (here an insect) has a fluorophore density α shown in Fig. 1a and an attenuation map β shown in Fig.1b. The two measured images u and u are displayed in Fig. 1c and 1d. 1 2 As can be seen, they are attenuated differently (top to bottom and bottom to top) since the optical path is reversed. From these two images, our algorithm providesareliableestimateofeachmapinFig. 1eand1fdespitePoissonnoise. 4 Figure 2: Scheme of a confocal microscope methods coming from the field of inverse problems [11–13], leading to improved robustness. All these approaches crucially depend on a precise knowledge of the backscatter coefficient. This is a strong hypothesis that is often rough or unreasonable in practice. To overcome this issue, a few authors proposed to use two opposite lidars andtoretrievetheattenuationcoefficientusingequation(4)[5–7]. Thestability to noise was ensured by linear filtering of the input and output data. The algorithmsproposedlaterwillprovideamorerobustandstatisticallymotivated approach. 2.2 Confocal microscopy Theprincipleproposedhereincanalsobeappliedtofluorescencemicroscopy,in particular confocal and multi-SPIM microscopy. To the best of our knowledge, this idea is novel. We expect it to be relevant when absorption dominates scatteringanddiffusion. Aparticularcaseofinterestshouldbeopticallycleared samples that are commonly used in optical projection tomography [2]. In confocal microscopy, a laser beam is focused at a specific point in 3D spaceandexcitesfluorophores. Theemittedlightisthencollectedonacamera. A3Dimagecanbecreatedbyscanningthewholesamplevolumewiththefocal spot, see Fig. 2. In order to apply the proposed principle, two images from opposite sides have to be taken. This can be done by either rotating the sample or using 4π microscopes[14,15]. Theimageformationmodelcanthenbewrittenasfollows: u (x,y,z)=P(cid:0)Cβ(x,y,z)exp(cid:0)−(A+α +A+α )(x,y,z)(cid:1)(cid:1) (7) 1 t t e e and u (x,y,z)=P(cid:0)Cβ(x,y,z)exp(cid:0)−(A−α +A−α )(x,y,z)(cid:1)(cid:1). (8) 2 t t e e The coefficients α and α refer to the attenuation coefficients for the transmit- t e ted and emitted light respectively. They may differ since the excitation light is typicallyred,whiletheemittedlightisusuallygreen. Inordertoretrievethem, we will assume a linear relationship of type α = α = cα between both for a e t certain constant c. The symbols A+, A+, A− and A+ are integral operators t e t t describing the optical path for the transmitted and emitted light respectively. In the numerical experiments of this paper, we will simply use the following 5 model: (cid:90) z (Atα )(x,y,z)= α (x,y,t)dt (9) 1 t t 0 (cid:90) z (Atα )(x,y,z)= α (x,y,t)dt (10) 2 t t 1 (cid:90) z (Aeα )(x,y,z)= α (x,y,t)dt (11) 1 e e 0 (cid:90) z (Aeα )(x,y,z)= α (x,y,t)dt. (12) 2 e e 1 Theproposedalgorithmalsoappliestomoregenerallinearoperatorsintegrating the attenuation coefficients along cones. With the mentioned hypotheses and setting C =1, equations (7) and (8) simplify to: u (x,y,z)=P(β(x,y,z)exp(−(A α)(x,y,z))) (13) 1 1 and u (x,y,z)=P(β(x,y,z)exp(−(A α)(x,y,z))), (14) 2 2 where A =At +cAe and A2 =At +cAe. 1 1 1 2 2 2.3 Multiview SPIM SPIM is an acronym for Selective Plane Illumination Microscopy [16]. An al- ternative name isLight Sheet Fluorescence Microscopy(LSFM). Its principle is explainedinFig. 3,left: alaserbeampassingthroughacylindricallensfocuses in only one direction, getting the shape of a light sheet. This light sheet excites fluorophores in a sample. The light sheet coincides with the focal plane of a microscope, allowing imaging 2D sections of the object. A 3D image can be re- constructed by shifting the sample or the light sheet and stacking the obtained images. Many different variants of this microscope exist. Here, we are interested in themultiviewSPIM[17–20],whichsimultaneouslyproduces4imagesgenerated withdifferentopticalpaths,seeFig. 3,rightandFig. 4. Similarlytotheconfo- cal microscope, let α and α denote the attenuation maps for the transmitted t e and emitted light respectively. The four images can be written as: (cid:0) (cid:1) u =P Cβexp(−A α −A α ) (15) 1,+ (1,t,+) t (1,e,+) e (cid:0) (cid:1) u =P Cβexp(−A α −A α ) (16) 1,− (1,t,−) t (1,e,−) e (cid:0) (cid:1) u =P Cβexp(−A α −A α ) (17) 2,+ (2,t,+) t (2,e,+) e (cid:0) (cid:1) u =P Cβexp(−A α −A α ) . (18) 2,− (2,t,−) t (2,e,−) e TheeightoperatorsA describeintegralsalongthedifferentdirectionsforthe ·,·,· emitted and transmitted waves. It is relatively easy to show, using a reasoning similar to that of paragraph 1.1, that the four images allow retrieving the at- tenuation coefficients α and α , without assuming linear relationships between e t them. This is an advantage over the simpler confocal microscope. 6 Figure 3: Left: Scheme of a light sheet or SPIM microscope. Right: Scheme of a multiview SPIM. The sample is illuminated from two opposite sides and images are formed in two opposite planes parallel to the light sheet. u u 1,+ 1,− u u 2,+ 2,− Figure 4: Light propagation for the 4 multiview SPIM images. In red, the excitation path (laser). In green, the emission path (fluorophores). 7 2.4 Summary We showed three different applications where measuring attenuation could be attacked with a similar methodology. In all mentioned applications, we have access to a set of m signals (u ) with the following expression: i 1≤i≤m u =P(βexp(−A α)), (19) i i where α is a concatenation of attenuation coefficients at different wavelengths and A is a concatenation of integral operators. In this paper, we will focus on the simplest setting where only two views are available. We developed the algorithms in such a way that their extension to an arbitrary number of views be rather straightforward. In addition, we will assume that the two views are opposite in the numerical experiments. This is a requirement in 1D, but not when dealing with 2D or 3D images. 3 MAP estimator and numerical evaluation 3.1 The discretized model The discrete model considered in this paper reads: (cid:26) u =P(βexp(−A α)) 1 1 (20) u =P(βexp(−A α)). 2 2 Thesignalsu ,u ,βandαareassumedtobenonnegativeandbelongRn,where 1 2 n=n ...n denotes the number of observations and d is the space dimension. 1 d The value of a vector u at location i=(i ,...,i ) will be denoted either u [i] 1 1 d 1 or u [i ,...,i ]. The matrices A and A in Rn×n are discretization of linear 1 1 d 1 2 integral operators. In our numerical experiments, the product A u represents 1 1 the cumulative sum of u along one direction and the product A u represents 1 2 2 thecumulativesumofu intheoppositedirection. Forinstance,fora1Dsignal, 2 we set: i (cid:88) (A u)[i]= u [j]. (21) 1 1 j=1 Therefore, matrix A has the following lower triangular shape: 1 1 0 0 0 ... 0 1 1 0 0 ... 0 A = 1 1 1 0 ... 0 (22) 1 ... ... ... ... ... 0 1 1 1 1 ... 1 We are now ready to design a Bayesian estimator of α and β from model (20). 3.2 A Bayesian estimator The Maximum A Posteriori (MAP) estimators αˆ and βˆ of α and β are defined as the maximizers of the conditional probability density: max p(α,β|u ,u ). (23) 1 2 α∈Rn,β∈Rn 8 ByusingtheBayesruleandanegativelog-likelihood,thisisequivalenttofinding the minimizers of: min −log(p(u ,u |α,β))−log(p(α,β)). (24) 1 2 α∈Rn,β∈Rn Let us evaluate p(u ,u |α,β). To this end, set 1 2 λ =βexp(−(A α)) and λ =βexp(−(A α)). (25) 1 1 2 2 Since the distribution of a Poisson distributed random variable with parameter λ has the following probability mass function: λke−λ P(X =k)= , (26) k! we get: n (cid:88) p(u ,u |α,β)= λ [i]+λ [i]−u [i]log(λ [i])−u [i]log(λ [i])+C, (27) 1 2 1 2 1 1 2 2 i=1 where C is a value that does not depend on α and β. Next, we assume that α and β are independent random vectors with probability distribution functions of type: p(α)∝exp(−R (α)) and p(β)∝exp(−R (β)), (28) α β where R : Rn → R ∪ {+∞} and R : Rn → R ∪ {+∞} are regularizers α β describing properties of the density and attenuation maps. In particular, we choose them so as to impose nonnegativity of the estimators: R (α)=+∞ if ∃i∈{1,...,n},α[i]<0 (29) α and R (β)=+∞ if ∃i∈{1,...,n},β[i]<0. (30) β Overall, the optimization problem characterizing the MAP estimates reads: min F(α,β) (31) α∈Rn,β∈Rn where n 2 (cid:88)(cid:88) F(α,β)= [exp(−(A α)[i])β[i]+u [i]((A α)[i]−log(β[i]))]+R (α)+R (β). j j j α β i=1j=1 (32) Remark2. Withanarbitrarynumbermofviews,itsufficestoreplace(cid:80)2 by j=1 (cid:80)m intheaboveexpression. Form=1view,theproblemmin F(α,β)allows j=1 α recovering the attenuation knowing the density: this is an inverse problem met in lidar. To the best of our knowledge, the proposed formulation is novel for this problem. Theproblemmin F(α,β)correspondstocorrectingtheattenuationon β the density map. This is also a frequently met problem [21–24] and the proposed approach also seems novel. Remark 3. The hypothesis of independence between α and β can probably be improved in some applications. For instance, in lidar, it is well known that extinction and backscatter coefficients are strongly related. Similarly, strongly absorbing parts of biological specimens are likely to have a specific density of fluorophores. We prefer stating this independence property, since our aim is to derive a generic algorithm. 9 3.3 The overall optimization algorithm IfR andR areconvexfunctions,thenF isconvexineachvariableseparately. α β Unfortunately, F is usually nonconvex on the product space Rn × Rn since + + the 2D function f(x,y) = exp(−x)y+x−log(y) is nonconvex. Finding global minimizers in reasonable times therefore seems complicated, except for specific regularizersR andR thatcouldcompensateforthenonconvexityofthedata α β term. The main observation in this paragraph is that it is possible to find a global minimizer of F when R is a standard convex regularizer and R is just α β the indicator function of the positive orthant. Set (cid:26) 0 if β[i]≥0,∀i∈{1,...,n}, Rβ(β)=ιRn+(β)= +∞ otherwise. (33) Withthisspecificchoice,theoptimalityconditionsofproblem(31)withrespect to variable β read: u +u β = 1 2 . (34) exp(−A α)+exp(−A α) 1 2 Thisexpressioncanbeseenasasimpleestimatorofβ knowingu ,u andα. By 1 2 replacingthisexpressionin(32), weobtainanoptimizationprobleminvariable α only: n 2 2 (cid:88)(cid:88) (cid:88) min uj[i](Ajα)[i]+log exp(−(Ajα)[i])+Rα(α). (35) α∈Rn i=1j=1 j=1 Proposition 1. Problem (35) is convex for a convex regularizer R . α (cid:16) (cid:17) Proof. Thetermu [i](A α)[i]islinear,henceconvex. Thetermlog (cid:80)2 exp(−(A α)[i]) j j j=1 j is the composition of the convex logsumexp function with a linear operator, hence it is convex. The above observation motivates using the minimizer of (35) as an initial guess. Then, it is possible to use an arbitrary convex regularizer R and to β minimize (31) using an alternate minimization between α and β. This idea is captured in Algorithm 1, it ensures a monotonic decay of the cost function: F(α ,β ) ≤ F(α ,β ). However the algorithm does not necessarily con- k+1 k+1 k k verge to a stationary point. This is not a critical issue since we will see later that only 1 iteration is usually preferable. 3.4 Minimizing the initial convex program: warm start Wenowdelveintothenumericalresolutionofthewarmstartinitialization(35). First, we need to choose a convex regularizer R . In this paper, we propose to α simplyusethetotalvariation[25], whichiswellknowntopreservesharpedges. Its expression is given by: n (cid:88) R (α)=λ (cid:107)(∇α)[i](cid:107) , (36) α α 2 i=1 where ∇:Rn →Rdn is a discretization of the gradient and λ ≥0 is a regular- α ization parameter. We will use the standard discretization proposed in [26] in our numerical experiments. 10