Next Article in Journal
Aurora Image Classification with Deep Metric Learning
Next Article in Special Issue
Machine-Learning-Inspired Workflow for Camera Calibration
Previous Article in Journal
LPV Control and Virtual-Sensor-Based Fault Tolerant Strategies for a Three-Axis Gimbal System
Previous Article in Special Issue
Analysis of AI-Based Single-View 3D Reconstruction Methods for an Industrial Application
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Refocusing Algorithm for Correlation Plenoptic Imaging

by
Gianlorenzo Massaro
1,2,
Francesco V. Pepe
1,2,* and
Milena D’Angelo
1,2
1
Dipartimento Interateneo di Fisica, Università degli Studi di Bari, 70125 Bari, Italy
2
Istituto Nazionale di Fisica Nucleare, Sezione di Bari, 70125 Bari, Italy
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(17), 6665; https://doi.org/10.3390/s22176665
Submission received: 5 August 2022 / Revised: 30 August 2022 / Accepted: 30 August 2022 / Published: 3 September 2022
(This article belongs to the Special Issue Camera Calibration and 3D Reconstruction)

Abstract

:
Correlation plenoptic imaging (CPI) is a technique capable of acquiring the light field emerging from a scene of interest, namely, the combined information of intensity and propagation direction of light. This is achieved by evaluating correlations between the photon numbers measured by two high-resolution detectors. Volumetric information about the object of interest is decoded, through data analysis, from the measured four-dimensional correlation function. In this paper, we investigate the relevant aspects of the refocusing algorithm, a post-processing method that isolates the image of a selected transverse plane within the 3D scene, once applied to the correlation function. In particular, we aim at bridging the gap between existing literature, which only deals with refocusing algorithms in case of continuous coordinates, and the experimental reality, in which the correlation function is available as a discrete quantity defined on the sensors pixels.

1. Introduction

A plenoptic (or light-field) device can measure, at the same time, both the light intensity distribution and the propagation direction of the light rays that come out of a scene of interest [1,2,3,4,5]. The latter kind of information, which is not available to conventional imaging, endows a plenoptic device with three-dimensional imaging capabilities, allowing one to “refocus“, in post-processing, details of the scene that were out of focus at the moment of the capture. The operation of refocusing, if applied repeatedly to retrieve a stack of many axial planes of the sample, allows one to reconstruct a three-dimensional “cube“ that is very similar to the one obtained by 3D techniques relying on z-scanning [6,7], without the obvious disadvantages stemming from having an experimental device with moving parts. Plenoptic imaging is currently used in a variety of different applications such as photography [2,3], microscopy [8], real-time imaging of neuronal activity [9], and wavefront sensing [10]. Conventionally, the directional information needed for refocusing is obtained by inserting an array of micro-lenses within the optical setup; the micro-lenses, however, impose a trade-off between the 3D capabilities of the device and the maximum resolution that is attained [11]. Such tradeoff can be overcome through a recent alternative approach, which entirely avoids the use of microlenses. This method, called correlation plenoptic imaging (CPI), retrieves plenoptic information by measuring correlations between the photon number (i.e., intensity) fluctuations measured by two separate high-resolution sensors [12,13,14]. Combined spatial and directional information is retrieved with the maximal optical resolution determined by wave-optics; the resolution on the focused plane is thus only limited by the lens aperture [13] and the DOF extension wider than in conventional plenoptic imaging [15,16]. Remarkably, the resolution limits of images refocused by CPI are practically independent of the numerical aperture of the imaging system; this provides an improvement with respect to both standard imaging and traditional plenoptic imaging, at arbitrarily large distances from the focused plane [16]. Though the main embodiment of CPI have so far been designed to exploit the correlations of chaotic light [16,17], the technique is versatile enough to enable working also with the purely quantum correlations of entangled photon pairs [18], provided the setup is adequately modified [19].
Despite the differences in both the setup architecture and in the performances of traditional plenoptic imaging and CPI, the working principle of refocusing is unchanged: a collection of sub-images, representing the scene as viewed from different points of view (or different angles), must be realigned and integrated in order to get the refocused image of a specific plane. In both cases, the finite size and the discrete structure of sensors entail deviations from the ideal case (formulated in a continuous space); summing images with different fields of view and pixel centering are further issues than needs to be addressed. These problems have already been taken on in the context of traditional plenoptic imaging (see, e.g., Refs. [20,21]). However, correlation imaging brings along peculiar issues: the interplay between light propagating along the two correlated beams, and the crucial role of coherence acquired during propagation. These specific aspects require a dedicated analysis, as they are not encompassed in the research conducted for traditional plenoptic devices. Moreover, the higher versatility of CPI makes it necessary to develop a comprehensive theory, in which the problem of refocusing is tackled in the most general case (encompassing even the intricate algorithms that arise in so called correlation plenoptic imaging between arbitrary planes [15]).
In this work, we shall address these points and analyze the steps needed to obtain the refocused image from the measured correlation function. Particular attention will be devoted to the algorithmic complications that arise from its discrete nature.

2. Materials and Methods

In CPI, the refocused images are obtained by applying a refocusing algorithm to the measured correlation function
Γ ( 2 ) ( r a , r b ) = I A ( r a ) I B ( r b ) κ I A ( r a ) I B ( r b ) ,
where I A and I B are the instantaneous light intensities measured by the two detectors, with 2D coordinates r a = ( x a , y a ) and r b = ( x b , y b ) , respectively, and X denotes the expectation value of the observable X; κ is a constant that can either be 1 or 0, depending on the statistical properties of the illumination source. A detailed discussion about how the correlation function is calculated from the experimental data is reported in Ref. [22]. In the same paper, is is also shown that, although the correlation function of Equation (1) is a four-dimensional quantity, most of its properties still emerge by considering a simplified two-dimensional scenario, in which the two detectors are one-dimensional. Throughout the rest of the paper, the correlation function will be considered as a 2D quantity, with the two coordinates x a and x b defined on 1D detectors that will be called D A and D B , respectively. Given the correlation function, the object detail at coordinate x on the transverse plane of the sample is reconstructed through the line integral
Σ z ( x ) = γ z ( x ) Γ ( 2 ) ( x a , x b ) d s .
The whole object is reconstructed by repeating this integral for all x coordinates within the field of view (FOV). The curve γ z ( x ) is a line in the ( x a , x b ) plane defined by the detectors, whose slope depends solely on the the longitudinal position z of the sample along the optical axis, while the intercept depends on the specific x coordinate [22]. The possibility to implement a refocusing algorithm can be easily recognized by considering the form Equation (1) assumes in the geometrical (ray-optics) approximation, that is
Γ ( 2 ) ( x a , x b ) A α ( z ) x a + β ( z ) x b 2 P p 1 x a + p 2 x b χ A ( x a ) χ B ( x b ) ,
where A ( x ) is the sample intensity profile (or field transmissivity, depending on whether the object is placed in both optical paths or in only one of them [22]), P ( x ) is the dominant limiting aperture within the optical setup, χ A ( x a ) and χ B ( x b ) are the characteristic functions of the detectors [22]. Both P and χ are vanishing outside of the transmissive area of the main iris, for P , and the photosensitive area of the detectors for χ A , B . The form in which the intensity profile of the sample A appears in Equation (3) makes it easy to understand refocusing: the sample detail at coordinate x is “spread” along a line of equation α ( z ) x a + β ( z ) x b = x in the ( x a , x b ) plane defined by the detectors, the value of A ( x ) 2 can thus be recovered by applying Equation (2). Figure 1 shows the simulation of the correlation function (Figure 1b) measured by a single-lens CPI configuration (Figure 1a). In this particular scheme, detectors imaging two planes that are slightly displaced from one another along the optical axis are correlated ( z a z b ). If the detectors and the optical paths leading to them are considered separately, the device behaves as two different single-lens imaging systems, each retrieving the image of a given plane, with the DOF and resolution defined by the lens; the object is placed out of the DOF of the two systems and thus cannot be resolved. However, if the light intensity impinging on the two detectors are measured, plenoptic information about the sample can be retrieved as from the equation reported in the left hand side of Figure 1b (see Equation (3)).
In the next section, we shall discuss how to apply the refocusing algorithm to the experimental correlation function, keeping into account the effect of the size of both the detectors and their pixels.

3. Results

As we have already mentioned, in order to obtain a complete reconstruction of the object, the line integral of Equation (2) must be performed for all coordinates x within the FOV. Since the intensity measurements are performed with photodetectors having a finite pixel size, the refocusing coordinate x spans the FOV in discrete steps that must depend on the pixel size and the other experimental parameters. Before dealing with such discretization, however, let us establish how the finite size of the detectors define the FOV of CPI.

3.1. Field of View

In conventional imaging, the FOV is given by the portion of the object that is imaged on the photosensor. If optical distortion and other artifacts such as vignetting are neglected, the FOV is essentially determined by the detector size alone, and does not depend on the size of the optical elements. As demonstrated in Ref. [22], the same is true in CPI, where the finite size of the optical components can alter other properties of the final images, but not the FOV. Still, since CPI is based on two detectors, the identification of the FOV is less trivial than in standard imaging. In fact, based on Equation (3), the combination of the two photosensitive surfaces of D A and D B is the rectangle of equation χ A ( x a ) · χ ( x b ) 0 in the ( x a , x b ) plane. The FOV of CPI can thus be defined as the set of the x coordinates for which the line α ( z ) x a + β ( z ) x b = x intersects the rectangle defined by the detectors (see Figure 1b and, for further details, Figure 4a of Ref. [22]), and can be obtained as the difference between the maximum and the minimum values of x that produces a line in the ( x a , x b ) plane having non-null intersection with the photosensitive area. By indicating with L i = N i · δ i the linear size of the detectors, with N i the number of pixels, δ i the pixel size, and i = a , b , the FOV of CPI is
FOV ( z ) = α ( z ) δ a · N A + β ( z ) δ b · N B .
A comparison with the FOV of conventional imaging is provided in Appendix A.

3.2. The Refocusing Transformation

When reconstructed from experimental data, the correlation function of Equation (1) is a N A × N B real matrix, whose rows correspond to pixels on D A and columns correspond to pixels on D B . For adapting the refocusing integral of Equation (2) to such discrete and finite case correlation function, two issues need to be addressed:
  • for any given integration line (i.e., for any fixed value of x), choosing the appropriate spacing between the points along the integration path to properly reconstruct the image;
  • for x varying in the FOV defined in Equation (4), choosing the adequate spacing between neighbouring integration lines, which physically translates into the granular resolution of the refocusing process.
The intuitive idea that smaller steps along both the integration lines and the distance between lines lead to finer results is not really correct. In fact, the integration lines employed for image reconstruction run through points, in the ( x a , x b ) plane, which do not coincide with the discrete coordinates on which the correlation function is defined, but can rather assume any value, obtained through four-dimensional interpolation of the experimental dataset. During this interpolation stage, the correlation function should not be oversampled to avoid needlessly long computation time. On the other hand, also undersampling aimed at shortening the computation time must be avoided. One intuitive reason is that undersampling along the x direction would entail a loss of resolution, but also undersampling along the integration direction has less intuitive side-effects on the signal-to-noise ratio of the refocused image. In fact, although the integration lines contain, in principle, “copies” of the same object detail located at coordinate x, the availability of a large number of copies and the choice of using all of them for refocusing offers the possibility to maximize the signal-to-noise ratio of the final image [16].
In addition, due to the finite size of the detectors, integration along the lines γ z ( x ) in Equation (2) can only occur on the segments intercepted by the lines on the photosensitive rectangle in the x a , x b plane (Figure 1b). The length of these segments, the integration extremes, and the number of resampling steps, depend on both z, through the line slope, and on the refocusing coordinate x. By choosing the following t-parametrization for the integration segment,
γ z ( x , t ) : x a = x a ( x , t ) y a = y a ( x , t ) t a z ( x ) , b z ( x ) ,
Equation (2) can be rewritten as a Riemann integral
Σ z ( x ) = a z ( x ) b z ( x ) Γ ( 2 ) x a ( x , t ) , x b ( x , t ) x a t 2 + x b t 2 d t ,
whose extremes depend on both z and the particular refocusing point x.
It is worth noticing that, although Equation (5) parametrizes γ z ( x ) through the single parameter t, it still carries an implicit dependence on the variable x. Therefore, Equation (5) can be regarded as a coordinate transformation from the ( x a , x b ) plane to a new ( x , t ) plane, in which the first coordinate is the “refocusing” coordinate and the second one is an integration coordinate. In the transformed plane, all the contributions in the correlation function related to the same object point are lined up along the vertical. In fact, if we consider the transformed function Γ trans ( 2 ) ( x , t ) = Γ ( 2 ) x a ( x , t ) , x b ( x , t ) ( t x a ) 2 + ( t x b ) 2 , we see that Equation (6) is just an integration on vertical segments of the function Γ trans ( 2 ) . The coordinate transformation in Equation (5) shall thus be called a refocusing transformation. Since it stems from the parametrization of a line, which can be obtained in infinite equivalent ways, many equivalent refocusing transformations can also be chosen. For simplicity, let us consider a transformation that is linear in both x and t, so that the square root term in Equation (6) becomes a constant, common to all refocusing points x, and can be disregarded. In this case Equation (5) can be conveniently written in the matrix form
x a x b = A x t ,
where A is a 2 × 2 matrix, whose coefficients of B are determined by imposing that it is a refocusing transformation. This implies, first of all, that the transformation parametrizes the line x = α ( z ) x a + β ( z ) x b ; this line represents a constraint on the first row of a matrix B, involved in the inverse transformation
x t = B x a x b ,
where B 11 = α ( z ) and B 12 = β ( z ) . In addition, since the refocusing matrix is the inverse of B ( A = B 1 ), as can be clearly seen by comparing Equations (7) and (8), the second row of B must be chosen so as to guarantee that the matrix is non-singular and A is well-defined.

3.2.1. Integration Extremes

With the considerations above, when a linear refocusing transformation is chosen, the refocusing algorithm in Equation (6) can be expressed as
Σ z ( x ) = a z ( x ) b z ( x ) Γ ( 2 ) A x t d t .
We are now interested in finding an expression for the integration extremes a z ( x ) and b z ( x ) , that are expected to depend on the refocusing transformation as well. In the x a , x b plane, the boundary to the integration region is the rectangle enclosed by the four lines x a = ± N A / 2 · δ a and x b = ± N B / 2 · δ b ; the equations of these lines in the transformed ( x , t ) plane will set the vertical boundaries to the Riemann integral in Equation (9). Thus, the boundaries to the integration region are determined by the four lines
r 1 ( x , t ) : A 11 x + A 12 t = + N A / 2 · δ a r 2 ( x , t ) : A 11 x + A 12 t = N A / 2 · δ a s 1 ( x , t ) : A 21 x + A 22 t = + N B / 2 · δ b s 2 ( x , t ) : A 21 x + A 22 t = N B / 2 · δ b ,
where A i j are the coefficients of the 2 × 2 matrix A. In fact, the four lines are those that define the boundaries of the detection area in Figure 2. Since r 1 r 2 and s 1 s 2 , it is always possible to determine which one of the two lines in the pairs is greater than the other at any given x, so that one can define the two lines defining the lower boundary of the integration area as r ( x , t ) = min r 1 , r 2 and s ( x , t ) = min s 1 , s 2 , and the same for the upper boundary, namely, r ( x , t ) = max r 1 , r 2 and s ( x , t ) = max s 1 , s 2 . Once the upper and lower lines are identified, the integration extremes are easily defined. In fact, the lower extreme is the greatest between the two values that the lines r and s assume at the given x of interest, namely,
a z ( x ) = max t | r ( x , t ) = 0 or s ( x , t ) = 0
and, analogously,
b z ( x ) = min t | r ( x , t ) = 0 or s ( x , t ) = 0 .
For a better understanding of this reasoning, the left plot of Figure 2 shows how, for the given transformation, the integration extremes change with the considered coordinate x. For the sake of completeness, we should point out that this procedure for finding the integration extremes does not work when either A 12 = 0 or A 22 = 0 (lines parallel to the t axis). This two cases are actually trivial, both because the integration domain is completely defined by the other two lines, and because these two scenarios correspond to the object being at focus on either one of the two planes imaged by D A and D B , so that the “refocused” image can be obtained by simply integrating on the other detector.
Figure 2 shows the equivalence of three different refocusing transformations, applied to the correlation function of Figure 1b. The corresponding matrices are, from left to right,
A rot = cos θ sin θ sin θ cos θ A D B = 3.64 2.45 0 1 A D A = 0 1 1.48 0.41 ,
where θ = arctan 0.41 is the slope of the integration paths; the coefficients are obtained for the experimental parameters in Figure 1b. All the transformations line up the details along the vertical direction; however, the first one does it through a simple rotation of the ( x a , x b ) plane, the second one by applying a shear parallel to D A , and the third one through a shear along D B . The transformations are equivalent in refocusing the object, but the three boundaries defined by the lines in Equation (10) are rather different, implying a significant difference between the integration extremes in Equation (9).
We have thus shown that, due to the finite size of the detectors and the transformation of the boundaries when the refocusing transformation is applied, the integration extremes are a function of the particular x coordinate that is chosen. However, there are cases in which keeping track of the x dependence is inconvenient: in fact, one can typically solve the integral of Equation (9) by
  • either generating, for each x, the list of integration points that will contribute to that point, in which case it is not an issue to have a number of sampled points that varies with x
  • or by applying the transformation to the correlation function and resampling it on a regular grid in the ( x , t ) plane, so that the refocused image is obtained by simply collapsing the columns of the refocused matrix (i.e., the t coordinate).
The two operations above are, of course, completely equivalent from a mathematical point of view. However, working on regular grids is typically much more convenient computationally. This would entail choosing a fixed range [ a z , b z ] for the integration extremes, which, to avoid information loss, is determined by
a z = min x FOV { a z ( x ) } b z = max x FOV { b z ( x ) }
(see Figure 2). By doing so, the measured correlation function, that is intrinsically defined on a rectangle with sides N A · δ a and N B · δ b , is transformed into a new rectangle having sides of length FOV ( z ) along x, and b z a z along t, as in Figure 3. Notice that, although the choice of working with a rectangular area might be convenient from a computational point of view, it is surely inconvenient from the point of view of memory management, since substantial zero-padding is required to fill-up points on which the correlation function is not natively defined (Figure 2). As demonstrated in Appendix B, the maximum integration range is given by
b z a z = c N A δ a + d N B δ b ,
where c and d are the coefficients of the second row of the inverse refocusing matrix B = A 1 , that can be chosen arbitrarily. From the Equation (14), we see that c and d play the same role on the t axis that the coefficients α and β do in determining the FOV of the x axis. This property can be exploited by taking advantage of their arbitrariness to “cut-off” uninteresting regions of the measured correlation function and speed up the refocusing process, as displayed in Figure 3.

3.2.2. Optimized Integration Area

Depending on the particular CPI scheme and the features of the involved optical components, the area defined by the aperture P in the x a , x b plane (see Equation (3)) can be smaller than the one defined by the photosensitive area of the detectors χ A · χ B . In those cases, the experimental correlation function contains many points that should be disregarded upon refocusing, since they only contribute to noise [22]. Let us suppose the aperture function P ( x p ) is an iris with radius , centered on the optical axis of the system. In this case, the only relevant portion of the correlation function is the one in which p 1 x a + p 2 x b + . As long as the experimental parameters are known, this is easily taken into account by exploiting the degree of freedom on the second line of the A 1 matrix and by choosing c = p 1 and d = p 2 . In these conditions, the refocusing formula reads
Σ z ( x ) a z ( x ) b z ( x ) A x 2 P ( t ) d t ,
with the integrand being non-vanishing only for t . Hence, for all the object coordinates x for which the integration extremes defined by the detectors are larger than the limiting aperture, the integration path can be cut at ± , and the refocusing algorithm reduces to:
Σ z , opt ( x ) = a z ( x ) b z ( x ) Γ ( 2 ) A x t d t ,
with a z ( x ) = min { a z ( x ) , l } and b z ( x ) = max { b z ( x ) , + l } . Still, if one is interested in resampling the transformed correlation function in a rectangular domain, the integration extremes needs to be replaced with ± l , resulting in an integration length: 2 l < c N A δ a + d N B δ b , which enables sparing computation time.

3.3. Resampling of the Correlation Function

As the experimental correlation function is available in discrete “steps” ( δ a , δ b ), defined by the pixel pitch of the sensors, the refocusing process must also involve discrete steps in the process of image reconstruction. In this section, we deal with the aspects of the refocusing process related with discretization. We shall suppose that refocusing is performed in steps of δ x along the refocusing direction, and of δ t along the integration direction. The integral of Equation (9) thus entails resampling the correlation function in steps of δ x , along the horizontal direction, and δ t , along the vertical. The refocusing process for a given object coordinate x thus becomes
Σ z , disc ( x ) = i = 0 N z ( x ) 1 Γ trans ( 2 ) ( x , a z ( x ) + i · δ t ) ,
where N ( x ) is the closest integer to ( b z ( x ) a z ( x ) ) / δ t . This operation must be repeated by sweeping the whole FOV in steps of δ x , namely, assuming x 0 is the lower bound of the FOV, for x = x 0 + j · δ x with j = 0 , , M z 1 , where M z is the closest integer to FOV ( z ) / δ x .
The choice of the sampling steps must at least take into account that the transformed correlation function can only be resampled in its non-zero area, and that both undersampling and oversampling should be avoided. The most simple solution is to choose δ x and δ t such that the number of points for refocusing is approximately equal to the initial points within the relevant area, namely j = 0 M z 1 N z · ( x 0 + j · δ x ) N A · N B . However, a more rigorous and effective solution consists in imposing a requirement on the point density rather than on the total number of points; this is performed by transforming each “unit” cell of area δ a · δ b , in the original plane, into a unit cell of area δ x · δ t , in the transformed plane, that contains the same number of experimental points (one). Unlike the condition on the total number of points, this condition has the advantage of holding also when the number of points is modified by either zero-padding or by cutting uninteresting parts of the function.
We shall now determine the δ x and δ t that are obtained by choosing that a single point in the measured space is mapped into a single point in the transformed space. To do so, rather than considering the transformations A and B that transform coordinates from the detector and the refocused planes and vice versa, we consider the matrices A and B , mapping pixels indices, in place of the coordinates, on the refocused plane, and vice versa. The matrix B is obtained by simply including the pixel size inside of the coefficients
B = δ a α ( z ) δ b β ( z ) δ a c δ b d ;
A is given by its inverse. By doing this, B maps the integer coordinates n A and n B in the discrete space of pixel indices onto the x , t plane, with n I = 1 , , N I , I = A , B . This is aimed at normalizing the cell area in the detector plane to unity, and making sure that the “weight” of pixels is kept into account when applying the transformation to and from the refocused plane. To understand how this is useful, let us start by calculating δ t . To do so, we consider that a refocusing transformation satisfies a condition on the integration direction, that is given by the coefficients α ( z ) and β ( z ) . This implies that the B matrix transforms a vector oriented along the integration direction into a vector having only the t component in the ( x , t ) plane. This property can be used to impose a condition on δ t . In fact, since we want an integration step in the transformed plane to have the same “weight” as in the original plane, we must impose that a vector having norm δ t and oriented along the vertical be transformed into a unit-vector in the n A , n B plane. That means requiring
A 0 δ t = 1 .
This condition is an equation in δ t and binds it to the coefficients of the refocusing matrix A in Equation (7), or, alternatively, to the coefficients of its inverse B. The solution of this equation is
δ t = 1 a 2 δ a 2 + a 4 δ b 2 = det B β ( z ) δ a 2 + α ( z ) δ b 2 .
Now, to determine δ x we impose the condition that the point density is conserved by the transformation B . To do this, we must impose that B transforms the unit cell of the n A , n B plane into a cell having area δ x · δ t in the transformed space. This is performed by transforming the canonical basis of ( n A , n B ) , evaluating the area of the cell it defines in the transformed space, and imposing that the point density is conserved, namely,
B 1 0 × B 0 1 = det B = δ a · δ b det B = δ x · δ t .
In this equation, the transformed unit cell area is evaluated by calculating the norm of the cross product between the transformed vectors. This defines an equation for δ x , that, upon plugging-in the value of δ t obtained from Equation (20), has solution
δ x = α ( z ) δ a 2 + β ( z ) δ b 2 .
As one might expect, the step on the refocusing axis depends only on the coefficients α and β , and not on the particular refocusing transformation that has been chosen (the coefficients c and d). Figure 3 shows the resampling of the correlation function in Figure 1b on a rectangular grid. The refocusing transformation and its inverse have been chosen as
A = 0.98 0.069 1.08 0.028 A 1 = 0.275 0.675 10.45 9.45 .
The parameters of the inverse matrix are exactly the four experimental parameters reported in Figure 1a. The first line of the inverse matrix is the one responsible for refocusing, while the second line becomes the vertical direction in the transformed plane. Thus, if the parameters of the second row are matched to those appearing in the limiting aperture, the aperture coordinates “line up” along the horizontal in the same fashion as the object features line up along the vertical because of the choice of the first line. Furthermore, the resampled function shown in Figure 3 has been adapted to fit a rectangle in the transformed plane, spanning the whole FOV along the x axis, and, the maximum integration range given by Equation (14) along t. The operation requires substantial zero-padding to extend the refocused function outside of the domain defined by Equation (10); however, as highlighted by the red rectangle, the same refocusing would be obtained by limiting the integration range to the lens size ( [ 50 mm , + 50 mm ] ). Also, because of the particular transformation that has been chosen, limiting the resampling to the lens extension would also result in a convenient rectangular shape in the transformed plane.

4. Discussion

The purpose of this work is to offer a thorough understanding of the refocusing process, used to reconstruct an out-of-focus object from the correlation function measured by CPI. In particular, the aspects of refocusing related with the discrete nature of the measurement have been analyzed to bridge the gap between the theoretical refocusing algorithm in Equation (2), formulated in a continuous space, and the practical steps required to retrieve the final image from experimental data, captured by a pixel structure. To summarize the results of this work, we report below the procedure for extracting the refocused image from the measured data, which, interestingly, works in general for any CPI implementation.
  • The two parameters α and β of Equation (3) are estimated, as in Figure 1, through the knowledge of the experimental setup and the position z of the plane one wishes to refocus. If the lens aperture plays a significant role in limiting the non-zero area of the correlation function, also the parameters p 1 , 2 will be of interest, albeit independent of z.
  • The coefficients α and β , the number of pixels N A and N B , and the pixels sizes δ a and δ b , determine the FOV of the refocused image through Equation (4). Typically, the pixel size is the same for D A and D B , but sometimes binning is applied to either one of the two detectors; such binning must be taken into account when determining δ a and δ b .
  • An inverse refocusing matrix is chosen
    A 1 = α β c d ,
    where α and β are the object parameters of Equation (3), and c and d are arbitrary numbers, whose value determine the amount of zero-padding needed to obtain a rectangular refocused function. When the limiting aperture is relevant in determining the non-zero area of the correlation function, the most convenient choice is: p 1 = c , p 2 = d .
  • To obtain a rectangular refocused function without loss of information, the resampling range along the vertical axis must be the one given in Equation (14). This operation, however, requires zero-padding. When integrating on the aperture ( p 1 = c , p 2 = d ), the range is given by the diameter of the aperture.
  • The resampling step along the horizontal direction of the refocused function is independent of the refocusing transformation and is given by Equation (22). The step along the vertical direction is transformation-dependent and is calculated through Equation (20).
  • The rectangular grid on which the refocused function must be resampled is obtained by spanning the FOV in discrete steps of δ x and the integration range in discrete steps of δ t .
  • The value of the resampled correlation function is obtained through interpolation of the experimental correlation function. In particular, to obtain the value of the transformed function in the point ( x , t ) , the experimental function must be interpolated in the point A 1 x t .
  • A rectangular refocused function is obtained when interpolation is applied to the whole rectangular domain in the transformed plane. The final image is obtained by summing together all the values within a column.
  • Often, to fully recover the object features with the correct relative intensity, the correction algorithm described in Equation (16) of Ref. [22] should be applied.

Author Contributions

Conceptualization, formal analysis, software, G.M.; writing—original draft preparation, G.M.; writing—review and editing, M.D.; supervision, F.V.P. and M.D.; project administration and funding acquisition, M.D. All authors have read and agreed to the published version of the manuscript.

Funding

Project Qu3D is supported by the Italian Istituto Nazionale di Fisica Nucleare, the Swiss National Science Foundation (grant 20QT21 187716 “Quantum 3D Imaging at high speed and high resolution”), the Greek General Secretariat for Research and Technology, the Czech Ministry of Education, Youth and Sports, under the QuantERA program, which has received funding from the European Union’s Horizon 2020 research and innovation program.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors thank F. Di Lena, whose advice has vastly contributed to the outcome of this work.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CPICorrelation plenoptic imaging
FOVField of view

Appendix A. Field of View Comparison between CPI and Standard Imaging

We report the expression for the FOV of CPI as in Equation (4):
FOV ( z ) = α ( z ) δ a · N A + β ( z ) δ b · N B
and compare it with the FOV of standard imaging in the case of two specific CPI architectures.

Appendix A.1. Correlation Light-Field Microscopy

Correlation light-field microscopy (CLM) is a CPI architecture oriented to microscopy, as in Ref. [16]. For this experimental realization,
α ( z ) = z f x a M A β ( z ) = 1 z f x b M B ,
where z and f are the distance of the sample from the objective lens and the focal length of the objective, respectively, and M A and M B are the microscope magnification and the imaging magnification on D B , respectively. Assuming detectors D A and D B are approximately the same size ( δ a N A δ b N B = L ), the FOV is
FOV CLM ( z ) = L z f 1 M A + 1 z f 1 M B ,
whereas the FOV of a conventional microscope built with the same optical specifications is
FOV MIC = L M A .
Thus, the FOV of CLM is the same as a conventional microscope when the object is at focus ( z = f ), and becomes increasingly larger as the object is moved out of focus. If the FOV is expressed in the canonical form of the detector size over an equivalent magnification FOV CLM ( z ) = L / M ( z ) , then the equivalent magnification of CPI is
M ( z ) = f z 1 M A + 1 f z 1 M B 1 ,
which is always smaller than the native microscope magnification.

Appendix A.2. CPI between Arbitrary Planes

In the single-lens configuration of CPI between arbitrary planes (Ref. [15]), the coefficients α and β are
α ( z ) = z z b z a z b 1 M A = c ( z ) M A β ( z ) = z z a z a z b 1 M B = 1 c ( z ) M B ,
where z is the distance of the object from the lens, z a and z b are the distances from the lens of the two planes that are imaged onto D A and D B , and
M i = f z i f ,
i = a , b are the two magnifications of the planes that are imaged on the detectors if the lens has focal length equal to f. Thus, in the approximation of same detector size,
FOV CLM ( z ) = L c ( z ) M A + 1 c ( z ) M B ,
whereas the FOV of a single-lens focused imaging system would be
FOV STD ( z ) = L M 0 ( z ) ,
where M 0 ( z ) = f / ( z f ) . As in the previous case, when the object is at focus on either one of the two focused planes ( z = z a , z b ), the FOV of CPI is the same as in standard imaging, while, for z a < z < z b (if z a < z b ) the FOV interpolates linearly the two FOVs at focus. For z < z a and z > z b , the FOV increases linearly with the distance from the focused plane.

Appendix B. Maximum Integration Range

In this appendix, we demonstrate Equation (14). As from the discussion preceding this formula in the text, the maximum integration range is given by the difference between maximum upper extreme b z and minimum lower extreme a z . However, if one is only interested in the minimum (maximum) possible t coordinate on which the transformed correlation function is defined, an easier path can be followed instead of minimizing a z (and maximizing b z ). In fact, the extremal points of the transformed domain of the correlation function must be defined by the four vertices of the parallelogram defined by the lines r 1 , 2 and s 1 , 2 . Since A is non-singular by definition, both s-lines intersect both r-lines, and viceversa, so that the four points are always well defined. Their coordinates are:
P 11 : α ( z ) N A 2 δ a + β ( z ) N B 2 δ b , c N A 2 δ a + d N B 2 δ b P 12 : α ( z ) N A 2 δ a β ( z ) N B 2 δ b , c N A 2 δ a d N B 2 δ b P 21 : α ( z ) N A 2 δ a + β ( z ) N B 2 δ b , c N A 2 δ a + d N B 2 δ b P 22 : α ( z ) N A 2 δ a β ( z ) N B 2 δ b , c N A 2 δ a d N B 2 δ b ,
where c and d are the coefficients of the second line of the matrix B = A 1 , that are arbitrary for refocusing. Thus, by defining a z and b z as the minimum and maximum of the t coordinates, one gets
b z = max ± c N A 2 δ a ± d N B 2 δ b = c N A 2 δ a + d N B 2 δ b
and
a z = min ± c N A 2 δ a ± d N B 2 δ b = c N A 2 δ a d N B 2 δ b ,
which demonstrates that the maximum integration range is the one reported in Equation (14). Interestingly, the FOV of Equation (4) can be obtained by applying the same reasoning on the x coordinates.

References

  1. Adelson, E.H.; Wang, J.Y.A. Single lens stereo with a plenoptic camera. IEEE Trans. Pattern Anal. Mach. Intell. 1992, 14, 99–106. [Google Scholar] [CrossRef]
  2. Ng, R.; Levoy, M.; Brédif, M.; Duval, G.; Horowitz, M.; Hanrahan, P. Light Field Photography with a Hand-Held Plenoptic Camera. In Stanford University Computer Science Tech Report CSTR 2005-02; Stanford University: Stanford CA, USA, 2005. [Google Scholar]
  3. Ng, R. Fourier Slice Photography. ACM Trans. Graph. 2005, 24, 735–744. [Google Scholar] [CrossRef]
  4. Georgiev, T.; Lumsdaine, A. The multifocus plenoptic camera. In Proceedings of the Digital Photography VIII, Burlingame, CA, USA, 23–24 January 2012; Battiato, S., Rodricks, B.G., Sampat, N., Imai, F.H., Xiao, F., Eds.; International Society for Optics and Photonics: Bellingham, WA, USA, 2012; Volume 8299, pp. 69–79. [Google Scholar] [CrossRef]
  5. Goldluecke, B.; Klehm, O.; Wanner, S.; Eisemann, E. Plenoptic Cameras. In Digital Representations of the Real World: How to Capture, Model, and Render Visual Reality; CRC Press: Boca Raton, FL, USA, 2015; pp. 65–77. [Google Scholar]
  6. Pawley, J. Handbook of Biological Confocal Microscopy; Springer Science & Business Media: New York, NY, USA, 2006; Volume 236. [Google Scholar]
  7. Olarte, O.E.; Andilla, J.; Gualda, E.J.; Loza-Alvarez, P. Light-sheet microscopy: A tutorial. Adv. Opt. Photon. 2018, 10, 111–179. [Google Scholar] [CrossRef]
  8. Broxton, M.; Grosenick, L.; Yang, S.; Cohen, N.; Andalman, A.; Deisseroth, K.; Levoy, M. Wave optics theory and 3-D deconvolution for the light field microscope. Opt. Express 2013, 21, 25418–25439. [Google Scholar] [CrossRef] [PubMed]
  9. Prevedel, R.; Yoon, Y.G.; Hoffmann, M.; Pak, N.; Wetzstein, G.; Kato, S.; Schrödel, T.; Raskar, R.; Zimmer, M.; Boyden, E.S.; et al. Simultaneous whole-animal 3D imaging of neuronal activity using light-field microscopy. Nat. Methods 2014, 11, 727–730. [Google Scholar] [PubMed]
  10. Ko, J.; Davis, C.C. Comparison of the plenoptic sensor and the Shack–Hartmann sensor. Appl. Opt. 2017, 56, 3689–3698. [Google Scholar] [CrossRef] [PubMed]
  11. Georgiev, T.; Lumsdaine, A. Resolution in Plenoptic Cameras. In Proceedings of the Frontiers in Optics 2009/Laser Science XXV/Fall 2009 OSA Optics & Photonics Technical Digest, San Jose, CA, USA, 13–15 October 2009; p. CTuB3. [Google Scholar] [CrossRef]
  12. D’Angelo, M.; Pepe, F.V.; Garuccio, A.; Scarcelli, G. Correlation Plenoptic Imaging. Phys. Rev. Lett. 2016, 116, 223602. [Google Scholar] [CrossRef] [PubMed]
  13. Pepe, F.V.; Di Lena, F.; Mazzilli, A.; Edrei, E.; Garuccio, A.; Scarcelli, G.; D’Angelo, M. Diffraction-Limited Plenoptic Imaging with Correlated Light. Phys. Rev. Lett. 2017, 119, 243602. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  14. Di Lena, F.; Pepe, F.; Garuccio, A.; D’Angelo, M. Correlation Plenoptic Imaging: An Overview. Appl. Sci. 2018, 8, 1958. [Google Scholar] [CrossRef]
  15. Lena, F.D.; Massaro, G.; Lupo, A.; Garuccio, A.; Pepe, F.V.; D’Angelo, M. Correlation plenoptic imaging between arbitrary planes. Opt. Express 2020, 28, 35857–35868. [Google Scholar] [CrossRef] [PubMed]
  16. Massaro, G.; Giannella, D.; Scagliola, A.; Lena, F.D.; Scarcelli, G.; Garuccio, A.; Pepe, F.V.; D’Angelo, M. Light-field microscopy with correlated beams for extended volumetric imaging at the diffraction limit. arXiv 2021, arXiv:2110.00807. [Google Scholar]
  17. Scagliola, A.; Di Lena, F.; Garuccio, A.; D’Angelo, M.; Pepe, F.V. Correlation plenoptic imaging for microscopy applications. Phys. Lett. A 2020, 384, 126472. [Google Scholar] [CrossRef]
  18. Rubin, M.; Klyshko, D.N.; Shih, Y.; Sergienko, A. Theory of Two-Photon Entanglement in Type-II Optical Parametric Down-Conversion. Phys. Rev. A 1995, 50, 5122–5133. [Google Scholar] [CrossRef] [PubMed]
  19. Pepe, F.; Di Lena, F.; Garuccio, A.; Scarcelli, G.; D’Angelo, M. Correlation Plenoptic Imaging with Entangled Photons. Technologies 2016, 4, 17. [Google Scholar] [CrossRef]
  20. Lam, E.Y. Computational photography with plenoptic camera and light field capture: Tutorial. J. Opt. Soc. Am. A 2015, 32, 2021–2032. [Google Scholar] [CrossRef] [PubMed]
  21. Martínez-Corral, M.; Javidi, B. Fundamentals of 3D imaging and displays: A tutorial on integral imaging, light-field, and plenoptic systems. Adv. Opt. Photon. 2018, 10, 512–566. [Google Scholar] [CrossRef]
  22. Massaro, G.; Di Lena, F.; D’Angelo, M.; Pepe, F.V. Effect of Finite-Sized Optical Components and Pixels on Light-Field Imaging through Correlated Light. Sensors 2022, 22, 2778. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Simulation of a correlation function in the experimental setup shown in panel (a). The object is composed of a set of equally spaced 200 μ m-wide gaussian slits, centered 1 mm apart from each other. Panel (b) shows the two-dimensional quantity that is reconstructed by measuring intensity correlations in the setup shown in panel (a). Since the detectors D A and D B are identical strips of 50 pixels each, the result of the measurement is a square matrix of 50 × 50 pixels. However, the optical distances involved and the finite radius of the lens (here fixed at 50 mm), prohibits information to be contained in the pixels outside of the two dashed green lines [22]. The red segment, spanning the whole photosensitive area identified by the two detectors, represents the integration path for recovering the information at coordinate x in the object plane. The simulated correlation function is obtained by applying Equation (4) of Ref. [22] to the known object shape A; the function Φ is defined by the optical distances and components involved. Discretization is then imposed by integrating over the pixel size.
Figure 1. Simulation of a correlation function in the experimental setup shown in panel (a). The object is composed of a set of equally spaced 200 μ m-wide gaussian slits, centered 1 mm apart from each other. Panel (b) shows the two-dimensional quantity that is reconstructed by measuring intensity correlations in the setup shown in panel (a). Since the detectors D A and D B are identical strips of 50 pixels each, the result of the measurement is a square matrix of 50 × 50 pixels. However, the optical distances involved and the finite radius of the lens (here fixed at 50 mm), prohibits information to be contained in the pixels outside of the two dashed green lines [22]. The red segment, spanning the whole photosensitive area identified by the two detectors, represents the integration path for recovering the information at coordinate x in the object plane. The simulated correlation function is obtained by applying Equation (4) of Ref. [22] to the known object shape A; the function Φ is defined by the optical distances and components involved. Discretization is then imposed by integrating over the pixel size.
Sensors 22 06665 g001
Figure 2. Three possible refocusing transformations applied to the correlation function of Figure 1b.
Figure 2. Three possible refocusing transformations applied to the correlation function of Figure 1b.
Sensors 22 06665 g002
Figure 3. Resampling of the correlation function of Figure 1b on a regular grid in the ( x , t ) plane. The spacing between neighboring pixels is given by Equation (22) along the horizontal direction and (20) along the vertical.
Figure 3. Resampling of the correlation function of Figure 1b on a regular grid in the ( x , t ) plane. The spacing between neighboring pixels is given by Equation (22) along the horizontal direction and (20) along the vertical.
Sensors 22 06665 g003
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Massaro, G.; Pepe, F.V.; D’Angelo, M. Refocusing Algorithm for Correlation Plenoptic Imaging. Sensors 2022, 22, 6665. https://doi.org/10.3390/s22176665

AMA Style

Massaro G, Pepe FV, D’Angelo M. Refocusing Algorithm for Correlation Plenoptic Imaging. Sensors. 2022; 22(17):6665. https://doi.org/10.3390/s22176665

Chicago/Turabian Style

Massaro, Gianlorenzo, Francesco V. Pepe, and Milena D’Angelo. 2022. "Refocusing Algorithm for Correlation Plenoptic Imaging" Sensors 22, no. 17: 6665. https://doi.org/10.3390/s22176665

APA Style

Massaro, G., Pepe, F. V., & D’Angelo, M. (2022). Refocusing Algorithm for Correlation Plenoptic Imaging. Sensors, 22(17), 6665. https://doi.org/10.3390/s22176665

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop