Leveraging Blur Information for Plenoptic Camera Calibration

This paper presents a novel calibration algorithm for plenoptic cameras, especially the multi-focus configuration, where several types of micro-lenses are used, using raw images only. Current calibration methods rely on simplified projection models, use features from reconstructed images, or require separated calibrations for each type of micro-lens. In the multi-focus configuration, the same part of a scene will demonstrate different amounts of blur according to the micro-lens focal length. Usually, only micro-images with the smallest amount of blur are used. In order to exploit all available data, we propose to explicitly model the defocus blur in a new camera model with the help of our newly introduced Blur Aware Plenoptic (BAP) feature. First, it is used in a pre-calibration step that retrieves initial camera parameters, and second, to express a new cost function to be minimized in our single optimization process. Third, it is exploited to calibrate the relative blur between micro-images. It links the geometric blur, i.e., the blur circle, to the physical blur, i.e., the point spread function. Finally, we use the resulting blur profile to characterize the camera’s depth of field. Quantitative evaluations in controlled environment on real-world data demonstrate the effectiveness of our calibrations.

Fig. 1: The Raytrix R12 multi-focus plenoptic camera used in our experimental setup (a), along with a raw image of a checkerboard calibration target (b).The image is composed of several micro-images with different amounts of blur, arranged in a hexagonal grid.In each micro-image, our Blur Aware Plenoptic (BAP) feature is illustrated by its center and its blur circle (c).

Introduction
From Lumigraph (Lippmann, 1911) to commercial plenoptic cameras (Ng et al., 2005;Perwaß et al., 2012), several designs have been proposed to capture information that cannot be captured by conventional cameras.Said cameras capture only one point of view of a scene, whereas a plenoptic camera is a device that allows to retrieve spatial as well as angular information.A same point from a scene is projected into multiple observations on the sensor.For instance, this redundant information can be used for digitally refocusing and rendering (Bishop et al., 2012) or for depth estimation (Johannsen et al., 2017).
This paper focuses on plenoptic cameras based on a micro-lenses array (MLA) placed between a main lens and a sensor as illustrated in Figure 3.The specific design of such a camera allows to multiplex both types of information onto the sensor in the form of a micro-images array (MIA), as shown in Figure 1, but implies a trade-off between the angular and spatial resolutions (Georgiev et al., 2006;Levin et al., 2008;Georgiev et al., 2009b).It is balanced according to the MLA position with respect to the main lens focal plane and the sensor plane, corresponding to unfocused (Ng et al., 2005) or focused (Perwaß et al., 2012;Georgiev et al., 2012) configurations.
To further extend the depth of field (DoF) of the plenoptic camera, a multi-focus configuration has been proposed by Perwaß et al. (2012) and Georgiev et al. (2012).In this setup, the MLA is composed of several micro-lenses with different focal lengths.The same part of a scene will be more or less focused according to the micro-lens' type.Usually, only micro-images with the smallest amount of blur are used.Alternatively, specific patterns are used to exploit the information (Palmieri et al., 2017).If one were able to relate the camera parameters to the amount of blur in the image, all information could be used simultaneously, without distinction between types of micro-lenses.As a first step in that direction, we propose a calibration method that takes advantage of blur information.
Calibration is an initial step for applications using plenoptic imaging.Conventional cameras are usually modeled as pinhole or thin lens.Due to the complexity of plenoptic cameras' design, the developed models are generally high dimensional.Specific calibration methods have to be proposed to retrieve the intrinsic parameters of these models.

Related work
Unfocused plenoptic camera calibration.In the unfocused configuration, the main lens is focused at the MLA plane and the sensor plane is placed at the MLA focal plane.The MLA is therefore focused at infinity, thus calling this configuration unfocused.The calibration of such plenoptic cameras (Ng et al., 2005) has been widely studied in the literature.Most approaches rely on a thin-lens model for the main lens and an array of pinholes for the micro-lenses.Dansereau et al. (2013) introduced a model to decode the pixels into rays, drawing inspiration from Grossberg et al. (2005), for the Lytro plenoptic camera (Ng et al., 2005).Their model is not directly associated with physical parameters and is based on corner detection in reconstructed sub-aperture images (SAIs).Zhou et al. (2019) proposed a practical two-step calibration method for unfocused plenoptic cameras.Their model describes the camera physical parameters but still requires feature points extracted in reconstructed SAIs.Bok et al. (2014) formulated a geometric projection model to estimate intrinsic and extrinsic parameters by utilizing raw images directly to avoid errors from reconstruction steps.Their method includes analytical solution and non-linear optimization of the reprojection error of a novel line feature to overcome the difficulties in finding checkerboard corners.Shi et al. (2016) proposed a detailed model of a plenoptic camera in the context of particle image velocimetry (PIV).Based on linear optics, they derived a model based on ray-tracing: contrarily to previous methods, they modeled the main lens and each micro-lens as thin-lenses.Hahne et al. (2018) developed a ray model by ray-tracing from the sensor side to the object space.They consider only the chief ray, connecting microimage centers (MICs) to the exit pupil center.O'Brien et al. (2018) introduced a projection model used for their calibration method suited both for unfocused and focused plenoptic cameras.They present a new feature called plenoptic disc, similar in nature to the circle of confusion (CoC) and defined by its center and its radius.Their feature parametrization is in 3D and is in one-to-one correspondence with point positions in the camera frame, as it is detected in reconstructed image.Zhao et al. (2020) recently presented a metric calibration method for unfocused plenoptic camera only also based on the plenoptic disc but directly from raw image.
In summary, most of the above methods require reconstructed images (SAIs) to extract features, and limit their model to the unfocused configuration, i.e., setting the sensor plane at the micro-lens focal plane.Therefore those models cannot be directly extended to the focused or multi-focus plenoptic camera.
Focused plenoptic camera calibration.With the arrival of commercial focused plenoptic cameras (Lumsdaine et al., 2009;Perwaß et al., 2012), new calibration methods have been proposed.In this configuration, the micro-lenses focus on an intermediate image plane.Johannsen et al. (2013) formulated a general reprojection model in terms of the physical parameters of a Raytrix camera (Perwaß et al., 2012).They proposed a metric calibration and distortions correction using a grid of circular patterns.This work considered a relatively simple model of lens distortion and required careful initialization of the optimization to converge due to high sensibility to local minima.Heinze et al. (2016) improved the previous model by considering more sophisticated models of the main lens distortions.They introduced new parameters including the tilt and shift for the main lens.They are able to distinguish each micro-lens type, calibrating then the distance between the MLA and the sensor for each one but in separated calibration processes.The projection model and the metric calibration procedure are incorporated in the RxLive software of Raytrix GmbH.Strobl et al. (2016) presented a step-wise calibration approach to overcome the fragility of the initialization which hinders the final optimization.They first determined main lens parameters, then estimated MLA parameters.However, their calibration framework relied on reconstructed total focus images.Zeller et al. (2014) introduced two new methods to calibrate a focused plenoptic camera and depth images obtained from it.In further works (Zeller et al., 2016a;Zeller et al., 2016b), they improved the camera projection model by modeling the main lens as a thin lens instead of a pinhole.The calibration process uses the reconstructed total focus image and virtual depth map to compute 3D observations.All previous methods rely on reconstructed images (SAIs), which can lead to the introduction of errors in the reconstruction step as well as in the calibration process.Usually, computation of reconstructed images requires camera parameters and/or depth information to avoid artifacts and reconstruction error.To overcome this chicken and egg problem, several calibration methods focus on using only raw plenoptic images.Zhang et al. (2016) proposed a calibration method based directly on observations from raw images.They used a parallel bi-planar checkerboard to have a depth-scale prior.They considered a detailed model of the MLA geometry that accounts for non-planarity of the array.Zhang et al. (2018) presented a multi-projection-center model based on the two planes parametrization (Levoy et al., 1996).They derived a calibration algorithm based on this model and projective transformation, suitable for both unfocused and focused plenoptic cameras.Noury et al. (2017) presented a more complete geometrical model than the previous works.This model relates 3D points to their corresponding image projections, working directly with raw images.They developed a new detector to find checkerboard corners with sub-pixel accuracy in each micro-image.They introduced a new cost function based on reprojection errors of both checkerboard corners and microlens centers in raw image space.This enforces projected micro-lens centers to get closer to their corresponding MICs, and makes their method robust to wrong parameters initialization especially concerning those of the MLA.However, their method does not consider different types of micro-lenses and forces them to act as pinholes.
Several methods can account for the multi-focus setting.Bok et al. (2017) extended their previous model (Bok et al., 2014) to work with the focused plenoptic camera.They did not explicitly model the micro-lens focal lengths but introduced two additional intrinsic parameters that account for the MLA setting.Each setting -one for each type of microlenses -, models a different distance between the MLA and the sensor.Their method can retrieve different intrinsics by running the optimization for each type separately.Nousias et al. (2017) considered the geometric calibration of multifocus plenoptic cameras.Their method allows to identify the micro-lens types and their spatial arrangement.It operates on checkerboard corners retrieved by a custom micro-image corner detector.Then, they applied their method on each type of micro-lens independently to retrieve specific intrinsic and extrinsic parameters for each configuration.Latter researches (Bok et al., 2017;Nousias et al., 2017;Noury et al., 2017) have achieved improved performance through automation and accurate identification of feature correspondences in raw images.More recently, Wang et al. (2018) proposed a geometric calibration method for focused plenoptic cameras based on virtual image points, establishing the mapping from object points behind the main lens and the MLA to image points on the sensor.Their method can be extended to calibrate multi-focus cameras by considering each type of micro-lenses individually.
In conclusion, most of these methods rely on simplified models for optic elements: the MLA misalignment is not considered, and the micro-lenses are modeled as pinholes thus not modeling their apertures.Some do not consider distortions of the main lens or restrict themselves to the focused case.Finally, few have considered the multi-focus case (Heinze et al., 2016;Bok et al., 2017;Nousias et al., 2017;Wang et al., 2018) but dealt with it in separate processes, leading to intrinsic and extrinsic parameters that vary depending on the type of micro-lens.

Contributions
We present a new calibration method for plenoptic cameras.To the best of our knowledge, it is the first to allow to calibrate the multi-focus plenoptic camera within a single process taking into account all types of micro-lenses simultaneously.To exploit all available information, we propose to explicitly include the defocus blur in a new camera model.Thus, we introduce a new Blur Aware Plenoptic (BAP) feature defined in raw image space that enables us to handle the multi-focus case.We present a new pre-calibration step using BAP features from white images to provide a robust initial estimation of camera parameters.We use our BAP features in a single optimization process that retrieves intrinsic and extrinsic parameters of a multi-focus plenoptic camera directly from raw plenoptic images of a checkerboard target.
This paper extends our previous work (Labussière et al., 2020).In addition to our former contributions, we present

Checkerboard raw images
Initial camera parameters BAP

Features Detection
Relative blur

Optimized camera parameters
Depth Estim.
Fig. 2: Overview of our proposed method: first, the pre-calibration step retrieves initial camera parameters from white raw images at different apertures; then followed by the detection of BAP features that are used by the camera calibration process and calibration ot the relative blur; finally, once the camera is calibrated, it can be used, as addressed here, for profiling the camera, i.e., to characterize the working range of the camera.Other applications can be considered, such as metric depth estimation.
here an ablation study of the camera parameters and add further comparisons with state-of-the-art calibration methods.A new camera setup has also been tested to validate the generalization of our method, and a simulation setup is proposed to evaluate our method on Lytro-like configuration.Moreover, we take advantage of our BAP features to develop a new relative blur calibration process to link the geometric blur to the physical blur, i.e., the circle of confusion (CoC) to the point-spread function (PSF).This enables us to fully take advantage of blur in image space.Finally, we propose to use the blur to profile the plenoptic camera in terms of depth of field (DoF).

Paper organization
An overview of our method is given in Figure 2. The remainder of this paper is organized as follows.First, we present the camera model and how we model blur with our BAP feature in section 2. Second, we explain in section 3 how we leverage raw white images in the proposed pre-calibration step to initialize camera parameters.Then, we detail the feature detection in section 4 and the calibration processes in section 5, i.e., the camera calibration and the relative blur calibration.
Our experimental setup is presented in section 6.Finally, our results are given and discussed in section 7. The notations used in this paper are shown in Figure 3. Pixel counterparts of metric values are denoted in lower-case Greek letters.Bold font denotes vectors and matrices.
2 Camera and blur models

The (multi-focus) plenoptic camera
We consider the focused plenoptic camera, especially the multi-focus case as described by Georgiev et al. (2012) and Perwaß et al. (2012).The camera is composed of a main lens and photosensitive sensor with a micro-lenses array (MLA) in between, as illustrated in Figure 3.The multi-focus configuration implies that the micro-lenses array consists of I different types of lenses.The setup corresponds to the multi-focus system described by Perwaß et al. (2012) with I = 3.Note that our model can be applied to the single-focus plenoptic camera as well, corresponding then to the case where I = 1.Finally, the unfocused configuration is a special case of our model where the micro-lens focal length is equal to the distance between the MLA and the sensor, i.e., f = d.

Main Lens
The main lens is modeled as a thin-lens and maps an object point to a virtual point in an intermediate space called the virtual space.An object at distance a is then projected at a distance b given the focal length F according to the thin-lens equation 1 The main lens principal point is expressed as u 0 v 0 in image space.We model the main lens as parallel to the sensor plane.Deviations from this hypothesis will be compensated for by tangential distortion parameters.Furthermore, we define our camera reference frame as the main lens frame, with O O O being the origin, the z-axis coinciding with the optical axis and pointing outside the camera, and the y-axis pointing downwards.Distances are signed according to the following convention: F is positive when the lens is convergent; distances are positive when the point is real, and negative when virtual.

Distortions
We consider distortions of the main lens.Distortions represent deviations from the theoretical thin lens projection model.To correct those errors, we model the radial and tangential components of the lateral distortions using the model of Brown-Conrady (Brown, 1966;Conrady, 1919).Depth distortions have also been studied by Heinze et al. (2016) and Zeller et al. (2016a), but Zeller et al. (2017) and Noury (2019) both empirically observed that the effects of depth distortions, for large focal length and for large object distance, can be neglected compared to stochastic noise of the depth estimation process.Therefore, we do not include depth distortion in our model.A distorted point p p p = x y z 1 expressed in the main lens frame after projection (i.e., in the virtual intermediate space) is thus transformed into p p p u = ϕ(p p p) = x u y u z 1 and is computed as where ς 2 = x 2 + y 2 .The three coefficients for the radial component are given by {Q 1 , Q 2 , Q 3 }, and the two coefficients for the tangential by {P 1 , P 2 }.

Micro-lenses array
We also model the micro-lenses as thin-lenses allowing to take into account blur in the micro-image.The MLA consists then of I different lens types with focal lengths f (i) where i ∈ [1 . .I] which are focused on I different planes.We make the hypothesis that all micro-lenses lie on the same plane.
The MLA is approximately centered around the optic axis.
We define the farthest micro-lens along the (−x)-axis and the (−y)-axis as the origin of the MLA frame, i.e., the center of the upper-left micro-lens.The coordinates axes are orientated the same way as the ones of the main lens.The structural organization of the lenses can be an orthogonal or hexagonal arrangement.The MLA origin is at a distance D from the main lens and at a distance d from the sensor.Furthermore, a detected micro-image center (MIC) usually does not coincide with the optical center of the considered micro-lens.We take into account this deviation in opposition to orthographic projection of MICs which causes inaccuracy in decoded light field.Therefore, the principal point c c c k,l 0 of the micro-lens indexed by (k, l) is given by where c c c k,l is the center of the micro-image (k, l) expressed in pixel, as illustrated in Figure 3.

Micro-images array
Finally, each micro-lens produces a micro-image (MI) onto the sensor.The set of these micro-images has the same structural organization as the MLA.The data can therefore be interpreted as an array of micro-images, called by analogy the micro-images array (MIA).The MIA coordinates are expressed in image space.Let δ i be the pixel distance between two arbitrary consecutive micro-images centers c c c k,l .With s the metric size of a pixel, let ∆ i = sδ i be its metric value, and ∆ µ be the metric distance between the two corresponding micro-lens centers C C C k,l .From similar triangles, the ratio λ between them is given by We make the hypothesis that ∆ µ is equal to the micro-lens aperture.

Camera configuration
When the camera is in the unfocused configuration, the distance separating the sensor and the MLA is equal to the focal length of the micro-lenses, i.e., d = f .Dealing with the focused plenoptic camera, we usually consider two possible configurations as presented by Georgiev et al. (2009a): 1) Galilean, when objects are projected behind the image sensor; and 2) Keplerian, when objects are projected in front of the image sensor.When considering micro-lenses as thin-lenses, we have to take into account their focal lengths to configure the camera.In practice, considering an object projected at distance b by the main lens, four cases are possible but only two are able to produce an exploitable image, i.We introduce then the definition of the internal configuration according to the micro-lens focal length as

Modeling blur within the plenoptic camera
From optics geometry, the image of a point from a circular lens not focused on the sensor can be modeled by the circle of confusion (CoC).Using a camera with a circular aperture, the blurred image is also circular in shape and is called the blur circle.From similar triangles and from the thin-lens equation (Eq.( 1)), the signed blur radius of the image of a point at a distance a from the lens is expressed as with s being the size of a pixel, and A the aperture of this lens.
In continuous domain, the response of an imaging system to a not in-focus point, i.e., the blur, can be expressed by the point-spread function (PSF).Let I (x, y) be the observed blurred image of an object at a constant distance.The image can be computed as the convolution of the PSF noted h(x, y), with the in-focus image, I * (x, y), such as where * denotes the convolution operator.If the lens aperture is circular and the level of blur low, the PSF h(x, y) can be efficiently modeled by a two-dimensional Gaussian given by h where the spread parameter σ is proportional to the blur circle radius ρ.Therefore, we can write where κ is a camera constant that should be determined by calibration (Pentland, 1987;Subbarao, 1989).Note that the spatially-variant spread parameter σ thus depends on the object distance a.
The blur radius ρ appears at several levels within the camera projection: in the blur introduced by the thin-lens model of the micro-lenses and in the formation of the microimages while taking a white image.Each micro-lens (k, l) projects virtual points onto the sensor at a position (u, v), with a blur radius ρ depending on the distance to the point and the micro-lens type.

BAP features and projection model
To leverage this blur information, we introduce a new Blur Aware Plenoptic (BAP) feature characterized by its center and its radius, noted p p p = u v ρ 1 .The BAP feature are visualized in Figure 1.Therefore, our complete plenoptic camera model allows us to link a scene point p p p w = x y z 1 to our new BAP feature p p p in homogeneous coordinates through each micro-lens (k, l) such as where P(i, k, l) is the blur aware plenoptic projection matrix through the micro-lens (k, l) of type i, and computed as P P P (k, l) is a matrix that projects the 3D virtual point onto the sensor and taking into account the blur radius.K K K( f ) is the thin-lens projection matrix for the given focal length.T T T c is the pose of the main lens with respect to the world frame and T T T µ (k, l) is the pose of the micro-lens (k, l) expressed in the camera frame.The function ϕ(•) models the lateral distortions.
Finally, the projection model from Eq. (10) consists of a set Ξ of (16 + I) intrinsic parameters to be optimized, including: the main lens focal length F, expressed in K K K(F), and its five lateral distortion coefficients Q 1 , Q 2 , Q 3 , P 1 , and P 2 , expressed in ϕ(•); the sensor translations, encoded in d and (u 0 , v 0 ) through Eq. ( 3), from P P P (k, l); the MLA pose, including its three rotations (θ x , θ y , θ z ) and three translations (t x ,t y , D), and the micro-lens pitch ∆ µ , expressed in T T T µ (k, l); and, the I micro-lens focal lengths f (i) , in K K K( f (i) ).

Profiling the depth of field of the plenoptic camera
From calibrated camera parameters, we can compute the depth of field (DoF) of each micro-lens type and the blur profile -the blur radii as function of the object distance -, in order to profile the plenoptic camera.The analysis can be done with respect to the MLA pose, and then extended to object space by back-projection.A point at a distance a from MLA is projected back into object space at a distance a according to the thin-lens equation through the main lens, such as Let r 0 be the minimal acceptable radius of the CoC.The smallest diffraction-limited spot resolved by a lens in wave optics, i.e., the radius of the first null of the Airy disc, is , where ν is the considered light wavelength, and N * = d/A is the working f -number of the lens.The minimal acceptable radius is the maximum between this limit and half the size of a pixel, such as r 0 = max (r * , s/2).
For a a micro-lens of type (i), the focus plane distance is given by Let A be the micro-lens aperture, we derive then the far a + and near a − focus planes distances: The DoF of a micro-lens of type (i) is computed as the distance between the near and far focus planes, such as Note that to fully exploit the combined extended DoFs without gaps, the micro-lenses DoFs should either just touch or slightly overlap (Perwaß et al., 2012).Finally, under this consideration, the total DoF of the plenoptic camera in MLA space is computed using the micro-lenses DoFs as We can finally plot the blur profile of the camera, along with the focal planes and the total DoF as illustrated by the Figure 10.
3 Pre-calibration using raw white images The goal of the pre-calibration step is to provide a strong initial estimate of the camera parameters.Inspired from depth from defocus theory (Subbarao et al., 1994), we leverage blur information to estimate our blur radius by varying the main lens aperture and using the different micro-lenses focal lengths, in combination with parameters from the image space.This is achieved by using raw white images acquired with a light diffuser mounted on the main objective, and taken at different apertures.We then show how the blur radii are linked to camera parameters, thus enabling their initialization.

Micro-images array calibration
First, the micro-images array (MIA) is calibrated using raw white images.We compute the micro-image centers c c c k,l by the intensity centroid method with sub-pixel accuracy (Thomason et al., 2014;Noury et al., 2017;Suliga et al., 2018).The distance between two micro-image centers δ i is then computed as the optimized edge-length of a fitted 2D regular grid mesh.The optimization is conducted by nonlinear minimization of the distances between the grid vertices and the corresponding detected MICs.The pixel translation offset in image coordinates, (τ x , τ y ), and the rotation around the (−z)-axis, ϑ z , are also determined during the optimization process.

Deriving the micro-image radius
In white images taken with a light diffuser and a controlled aperture, each type of micro-lens produces a micro-image (MI) with a specific size and intensity.This provides a mean to distinguish between them (Figure 5).The process of capturing a white image is equivalent for the micro-lenses to imaging a white uniform object of diameter A at a distance D.
The imaging process is schematized in Figure 4. Using optics geometry, the image of this object, i.e., the resulting MI, corresponds to the image of an imaginary point V constructed as the vertex of the cone passing through the main lens and the considered micro-lens.Let a be the signed distance of this point from the MLA plane, expressed from similar triangles and Eq. ( 4) as Fig. 4: Formation of a micro-image with its radius R through a micro-lens while taking a white image using a light diffuser, at an aperture A, in Keplerian internal configuration.The point V is the vertex of the cone passing by the main lens and the considered micro-lens.V is the image of V by the micro-lens and R is the radius of its blur circle.
with A being the main lens aperture.Note the minus sign is added because the vertex is always formed behind the MLA plane, and thus considered as a virtual object for the microlenses.Geometrically, the MI formed is the blur circle of this imaginary point V .Therefore, injecting the latter expression in Eq. ( 6), the metric MI radius R is given by From the above equation, the MI radius R depends linearly on the aperture of the main lens.However, the main lens aperture cannot be measured directly whereas we have access to the fnumber value.Recall that the f -number of an optical system is the ratio of the system's focal length F to the aperture, A, given by N = F/A.Finally, we can express the MI radius for each micro-lens focal length type i as We thus relate the MI radius to the plenoptic camera parameters.It is a function of fixed parameters (d, D, F), measured parameters (∆ i = s • δ i ) and variable parameters (N and Let Ω be the set of parameters {m, q 1 , . . ., q I }, where q i is the value obtained by They are used to compute the radius part of the BAP feature and to initialize the camera parameters.
Micro-image radii estimation.From raw white images, we measure each MI radius ρ = |R| /s in pixel based on image moments fitting.We use the second order central moments of the micro-image to construct a covariance matrix.The radius ρ is proportional to the computed standard deviation σ .Recall that raw moments and centroid are given by x,y x i y j I (x, y) and and the central moments by The covariance matrix is then computed as We define σ as the square root of the greatest eigenvalue of the covariance matrix, i.e., The estimation is robust to noise, works under asymmetrical distribution and is easy to use, but requires a parameter α to convert the standard deviation σ into a pixel radius ρ = α • σ .The parameter α is determined so that at least 98% of the distribution is taken into account.According to the standard normal distribution Z-score table, α is picked up in [2.33, 2.37].In our experiments, we set α = 2.357 as it best fits our measurements.
Recall that the pixel MI radius is given by ρ = |R| /s.The metric radius is either positive if formed after the rays inversion, as in Figure 4, or negative if before, and thus depends on the internal configuration such as Coefficients estimation.Given several raw white images taken at different apertures, we estimate the parameters Ω , i.e., the coefficients of Eq. ( 19), for each type of micro-image.
Note that the standard full-stop f -number conventionally indicated on the lens differs from the real f -number.We use then the f -number calculated from the aperture value AV by N = √ 2 AV .The coefficient m is a function of fixed physical parameters independent of the micro-lens focal lengths and the main lens aperture.Therefore, we obtain a set of linear equations, sharing the same slope, but with different y-intercepts.With X X X = m q 1 . . .q I , the set of equations can be linearly rewritten as where the matrix A A A, containing the f -numbers and a selector of the corresponding y-intercept coefficient, and the vector B B B, containing the radii measurements, are constructed by arranging the terms given the focal length at which they have been calculated.Finally, we compute X X X with a least-square estimation.Figure 5 shows an example of radii distributions from our experiments computed from white images taken at several f -numbers, and the estimated linear functions.In practice, at least two aperture configurations are required.
More can be used to improve the estimation but at the condition that radii measurement distributions are distinguishable from each others, with small overlap.

Camera parameters initialization
First, the pixel size s is set according to the manufacturer values.The main lens focal length F is also initialized from them.Given the parameters Ω and the focus distance h, the parameters d and D are initialized as with ξ = 1 (resp., ξ = −1) in Galilean (resp., Keplerian) internal configuration, and where H is given by Eq. ( 17) of Perwaß et al. (2012), For completeness, note that the unfocused configuration can be initialized with d ← 2m and D ← F.
In a second step, all distortions coefficients are set to zero.The principal point is set as the center of the image.The sensor plane is thus set parallel to the main lens plane, with no rotation, at a distance − (D + d).Seemingly, the MLA plane is initially set parallel to the main lens plane at a distance −D.From the pre-computed MIA parameters, the MLA translation takes into account the (x, y)-offsets (−sτ x , −sτ y ) and the rotation around the z-axis is initialized with −ϑ z .The microlenses pitch ∆ µ is set according to Eq. ( 4), where the ratio λ is computed using Eq. ( 26) such as Finally, the initial micro-lenses' focal lengths are also computed from the parameters Ω as follows Experiments will show that the initial model is close to the optimized model.

BAP features detection in raw images
At this point, the MIA is calibrated and micro-images centers are extracted.The raw images are devignetted by dividing them by a white raw image taken with the same aperture.We based our method on a checkerboard calibration pattern.The detection process is divided into two steps: 1) checkerboard images are processed to extract corners at position (u, v); and 2) with the set of parameters Ω and the associated virtual depth estimate for each corner, the corresponding BAP feature is computed in image space.

Computing blur radius through micro-lens
To respect the f -number matching principle (Perwaß et al., 2012), we configure the main lens f -number such that the micro-images fully tile the sensor without overlap.In this configuration the working f -number of the main imaging system and the micro-lens imaging system should match.
We consider the general case of measuring an object p p p at a distance a from the main lens.First, p p p is projected through the main lens according to the thin lens equation, 1/F = 1/a + 1/b, resulting in a point p p p at a distance b behind the main lens, i.e., at a distance a = D − b from the MLA.From Eq. ( 6), the metric radius of the blur circle r of a point p p p at distance a through a micro-lens of type (i) is expressed as In practice, a and d cannot be measured in raw image space, but the virtual depth can, as it will be shown in the next subsection.Virtual depth refers to relative depth value obtained from disparity.It is defined as the ratio between the signed object distance a and the sensor distance d: The sign convention is reversed for virtual depth computation.Distances are negative in front of the MLA plane.If we reinject the virtual depth in Eq. ( 30), taking caution of the sign, and using Eq. ( 4), we can derive the radius of the blur circle of a point p p p at a distance a from the MLA by This equation allows to express the pixel radius of the blur circle ρ = r/s associated to each point having a virtual depth without explicitly evaluating the physical parameters A, D, d, F and f (i) of the camera, directly in image space.

Features extraction
First, we detect corners in raw images using the detector introduced by Noury et al. ( 2017) with sub-pixel accuracy in each micro-image.With a plenoptic camera, contrarily to a classic camera, a same point in object space is projected into multiple observations onto the sensor.The checkerboard is designed and positioned so that the sets of observations are sufficiently far from each others to be clustered.We use the DBSCAN algorithm (Ester et al., 1996) to identify the clusters.We then associate each point with its cluster of observations.Secondly, once each cluster is identified, we compute the virtual depth υ from the disparity.Let ∆C C C 1−2 be the distance between the centers of the micro-lenses C C C 1 and C C C 2 , i.e., the baseline.Let ∆p p p = |p p p 1 − p p p 2 | be the Euclidean distance between images of the same point in corresponding micro-images.The virtual depth υ is calculated with the intercept theorem: If we consider two adjacent micro-lenses, the baseline ∆C C C 1−2 is just the diameter of a micro-lens, i.e., ∆ µ = λ ∆ i and η = 1.For further apart micro-lenses the baseline is a multiple of that diameter, where η is not necessarily an integer.To handle noise in corner detection, we use a median estimator to compute the virtual depth of the cluster, taking into account all combinations of point pairs in the disparity estimation.Finally, we compute the BAP features from Eq. (32), using the set of parameters Ω and the available virtual depth υ.In each frame n, for each micro-image (k, l) of type (i) containing a corner at position (u, v) in the image, the feature p p p n k,l is given by In the end, our observations are composed of a set of microimages centers c c c k,l and a set of BAP features p p p n k,l allowing us to introduce two reprojection error functions corresponding to each set of features as explains in the next section.

Camera and relative blur calibration
To retrieve the parameters of our camera model (Eq.( 10)), we use a calibration process based on non-linear minimization of reprojection errors.The camera calibration process is divided into three phases: 1) the initial intrinsics are provided by the pre-calibration step; 2) the initial extrinsics are estimated from the raw checkerboard images; and 3) the parameters are refined with a non-linear optimization leveraging our new BAP features.In parallel, using our BAP features, the blur proportionality coefficient of Eq. ( 9) is calibrated, by minimizing the relative blur in a new reprojection error with a non-linear optimization.

Camera model initialization
Iterative optimization of non-linear cost functions are sensitive to initial parameters setting.To ensure convergence and to avoid falling into local minima during the process, the parameters must be carefully initialized close to the solution.Our pre-calibration step provides a strong initial solution for the optimization.Intrinsic parameters are initialized as explained in subsection 3.3 using only raw white images.
The camera poses {T T T n c }, i.e., the extrinsic parameters, are initialized using the same method as by Noury et al. (2017).For each cluster of observations, the barycenter is computed, as illustrated by Figure 6.Those barycenters can been seen as the projections of the checkerboard corners through the main lens using a standard pinhole model.For each frame, the pose is then estimated using the Perspective-n-Point (PnP) algorithm (Kneip et al., 2011), like in classic pinhole imaging system.To associate 3D-2D correspondences, we reproject checkerboard corners based on the estimated pose in image space and link them to their nearest cluster of observations.

Optimizing the camera parameters
By introducing blur in our model, we can optimize all parameters within one single optimization process.We propose a new cost function Θ taking into account the blur information of our new BAP feature.The cost is composed of two main terms both expressing errors in the image space: 1) the blur aware plenoptic reprojection error and 2) the main lens center reprojection error.
In the first term, for each frame n, each checkerboard corner p p p n w is reprojected into the image space through each micro-lens (k, l) of type (i) according to the projection model of Eq. ( 10) and compared to its observations p p p n k,l .In the second term, the main lens center O O O is reprojected according to a pinhole model in the image space through each microlens (k, l) and compared to its detected micro-image center c c c k,l .Let S = {Ξ , {T T T n c }} be the set of intrinsic Ξ and extrinsic {T T T n c } parameters to be optimized.The cost function Θ (S) is expressed as The optimization is conducted using the Levenberg-Marquardt algorithm.

Relative blur calibration using BAP features
Relative blur estimation has been studied by Ens et al. (1993) and Mannan et al. (2016a).Up to our knowledge, it has never been studied in context of plenoptic camera.As a new contribution, we leverage the relative blur between different micro-images and our BAP features to calibrate the blur proportionality coefficient κ of Eq. ( 9).
Relative blur model.A point imaged by two different microlenses of type (i) and ( j) will have different blur amount, i.e., the resulting images will have different spread parameters for the PSF model, such as where I * (x, y) is the latent in-focus image.We approximate the PSF with a 2D Gaussian as in Eq. ( 8), where the diameter of the blur kernel h (i) is σ (i) .To compare two views with different amount of blur, we use the relative blur model in spatial domain (Pentland, 1987;Subbarao, 1988;Subbarao et al., 1994;Ens et al., 1993).As stated by Mannan et al. (2016b), the Gaussian relative blur approximation works well mainly for small relative blurs (up to ρ ≈ 5 pixels) and when the aperture has a simple shape, which is the case with the plenoptic camera.We then use the equally-defocused representation by applying additional blur to the relatively in-focus micro-image, hence, Note that h r is the relative blur kernel applied to either one of the views such that both views are equally-defocused.The diameter of the relative blur kernel h r is approximated as This approximation is exact when the PSF is a Gaussian.Since the radius of the relative blur kernel σ r cannot indicate whether the (i) or the ( j) view is more in-focus than the other, we define the relative blur similarly to Chen et al. (2015), as where ∆σ 2 (i, j) > 0 indicates that a pixel in the ( j)-microimage is more in-focus than its corresponding pixel in the (i)-micro-image.Symmetrically, ∆σ 2 (i, j) < 0 indicates that the (i)-micro-image is more in-focus.In a similar fashion, we define the relative blur radius as with σ r = κ • ρ r , and where ρ (i) , ρ ( j) are the blur radii of the BAP features through a micro-lens of type (i) and ( j).
Blur proportionality coefficient calibration.To calibrate κ, we use our BAP features and the relative blur model applied on micro-images of different types.BAP features {p p p i } from a same cluster C represent the same point in object space p p p w .We extract two windows W around the BAP features p p p i , p p p j ∈ C(p p p w ) of different types, and express them using the equally-defocused representation (Eq.( 37)).As the relative blur radius does not exceed 2.5 pix, windows W of size 9 × 9 are extracted at (u, v) with sub-pixel precision, and represent therefore the same part of the scene in both micro-images.Additional blur is applied using a Gaussian kernel of spread parameter σ r .The spread parameter is computed from the ρ part of the BAP features and the parameter κ to be optimized, with initial value κ = 1.Let Θ (κ) be the cost function to be minimized.It is expressed as given ρ (i) < ρ ( j) and where h r is the PSF with spread The optimization is conducted using the Levenberg-Marquardt algorithm.

Experimental setup
To validate our camera model, we evaluate our method on real-world data obtained with a multi-focus plenoptic camera in a controlled environment.Our experimental setup is illustrated in Figure 1.The camera is mounted on a linear motion table with micro-metric precision.The target plane is orthogonal to the translation axis, and the camera optical axis is aligned with this axis.The approximate absolute distances at which the images have been taken with the corresponding step lengths are reported in Table 1.

Hardware environment
For our experiments we used a Raytrix R12 color 3Dlight-field-camera, with a MLA of F/2.4 aperture.The camera is in Galilean internal configuration.We used two different mounted lens, a Nikon AF Nikkor F/1.8D with a 50 mm focal length for comparison with state-of-the-art, and a Nikon AF DC-Nikkor F/2D with a 135 mm focal length to validate the generalization of our model.The MLA organization is hexagonal row-aligned, and composed of 176 × 152 (width × height) micro-lenses with I = 3 different types.The sensor is a Basler beA4000-62KC with a pixel size of s = 0.0055 mm.The raw image resolution is 4080 × 3068 pixel.We calibrate our camera for four focus distance configurations, with h ∈ {450, 1000, ∞} mm for the 50 mm lens, and with h = 1500 mm for the 135 mm lens.Note that when changing the focus setting, the main lens moves with respect to the block MLA-sensor.

Software environment
All images have been acquired using the MultiCamStudio free software (v6.15.1.3573) of the Euresys company.We set the shutter speed to 5 ms.While taking white images for the pre-calibration step, we set the gain to its maximum value.For Raytrix data, we use their proprietary software RxLive (v4.0.50.2) to calibrate the camera, and compute the depth maps used in the evaluation.Our source code has been made publicly available: https://github.com/comsee-research/libpleno, and https:// github.com/comsee-research/compote.

Datasets
We build four datasets with different focus distance h: for the 50 mm lens, R12-A for h = 450 mm, R12-B for h = 1000 mm, and R12-C for h = ∞; for the 135 mm lens, R12-D for h = 1500 mm.Each dataset is composed of: white raw plenoptic images acquired at different apertures (N ∈ {4, 5.66, 8, 11.31, 16}) using a light diffuser mounted on the main objective for pre-calibration, free-hand calibration target images acquired at various poses (in distance and orientation), separated into two  Examples of calibration targets acquired for the R12-B dataset are given in Figure 7 along with their 3D poses.A summary for each dataset is given in Table 1, indicating checkerboard information and the distances at which the targets have been acquired for calibration and for the controlled evaluation.Our datasets have been made publicly available, and can be downloaded from our public repository at https://github.com/comsee-research/plenoptic-datasets.

Simulation environment
In order to validate our model on Lytro-like plenoptic camera configuration, i.e., unfocused plenoptic camera (UPC), we propose to evaluate our model in a simulation environment.We built our own simulator based on raytracing to generate images.Similar to the real-world dataset, we generated a dataset, named UPC-S, composed of several white images taken at different apertures (with N ∈ {2, 4, 5.6}), various checkerboard poses for calibration and validation, and for evaluation, checkerboard images with known translation along the z-axis.Details are also given in Table 1.We used the Lytro Illum intrinsic parameters reported in Table 4 of Bok et al. (2017) as baseline for the simulation.They have been converted into our parameters and reported in Table 3.The MLA organization is hexagonal row-aligned, and composed of 541 × 434 (width × height) micro-lenses of the same type (I = 1).The raw image resolution is 7728 × 5368 pixel, with a pixel size of s = 0.0014 mm and with micro-image of radius 7.172 pixel.

Results and Discussions
Our evaluation process follows the steps given in the overview (Figure 2).First, we present the pre-calibration results, where white raw plenoptic images are used for computing microimage centers, and for estimating initial camera parameters.Second, from the set of devignetted calibration target images, BAP features are extracted, and camera intrinsic and extrinsic parameters are then computed using our non-linear optimization process.In parallel, the same BAP features are also used to calibrate the relative blur proportionality coefficient.Third, we evaluate our model quantitatively, firstly, using the reprojection error as a metric, and secondly, using the relative translation error in a controlled environment.Then, we propose an ablation study of the camera parameters.Finally, we illustrate how to characterize the plenoptic camera extended DoF using the blur profile.

Pre-calibration
To estimate the parameters Ω , we set α = 2.357, and since the camera is in Galilean internal configuration, we use R = −ρ • s, following Eq.( 25). Figure 5 shows the microimage radii as function of the inverse f -number with the The corresponding coefficients for all datasets are summarized in Table 2.As expected, the parameter m is different for each dataset, since D and ∆ i vary with the focus distance h, whereas the q i values are close for all datasets, even for different camera setup (R12-D).

Free-hand camera calibration
Comparison with state-of-the-art.Since our model is close to the one of Noury et al. (2017), we compare our intrinsics with the ones obtained under their pinhole assumption using only corner reprojection error and with the same initial parameters.In addition, we evaluate against the method of Nousias et al. ( 2017), which provides a set of intrinsics and extrinsics for each micro-lens type.The equivalence of our parameters and their parameters is given by where K 1 and K 2 are the two additional intrinsic parameters that account for the MLA setting in their model.The equivalence also stands for the parameters of Bok et al. (2017).The provided detector from Nousias et al. (2017) was not able to detect corner observations on our datasets.Therefore, we used the same observations for our method (noted BAP in Table 3), Noury et al. ( 2017) method (NOUR), and Nousias et al.
(2017) method for each type (NOUS1, NOUS2, and NOUS3), which allowed us to focus the comparison on the camera model only.Finally, we provide the calibration parameters obtained from the RxLive software (RTRX) corresponding to the model of Heinze et al. (2016), and compare our depth measurements to their depth maps.
Initialization.We initialize λ from Eq. ( 28).Its value for each dataset is reported in Table 2.The difference between the initial value of λ and its value computed from optimized camera parameter is less than 0.024 %, which validates the use of the initial value from Eq. ( 28) when computing our BAP features.The initial camera parameters reported in Table 3 are computed using the methodology presented in subsection 3.3.They are used for the BAP and NOUR methods.
The camera internal configuration is set to Galilean.When h decreases, D increases.Yet when the main lens focus distance is at infinity, the main lens should focus on the plane υ = 2, which implies that D tends to F − 2d as lower bound, as H tends to F. In most cases (here, for R12-A,B,D), we will still have F < D, which usually can describe the camera in Keplerian configuration.In Keplerian internal configuration, the condition F < D stands regardless of the focus distance, as D lower bound is F + 2d.When using the linear initialization from NOUS, the initial parameters of some configurations corresponded to impossible physical setup or were too far from the solution, hindering the convergence of the optimization.Therefore, in order to continue comparison, we manually set the initial parameters close enough to a solution.In contrast, we can see that the optimized parameters for BAP and NOUR are close to initial values, which shows that our pre-calibration step provides a strong initial solution for the optimization process.
Intrinsic camera parameters.Optimized intrinsic parameters are reported for each dataset and for all the evaluated methods in Table 3. First, BAP, NOUR and NOUS all verify the condition F ≈ D + 2d when the focus is set at infinity (R12-C).Second, the focal lengths obtained from NOUR, NOUS and RTRX change significantly given the focus distance, and the ones obtained from NOUS even vary according to the micro-lens types.In contrast, only BAP shows stable parameters across all three R12-A,B,C datasets.Shared parameters across datasets (i.e., the focal lengths and the distance between the MLA and the sensor) are close enough to indicate that our model successfully generalizes to different focus configurations.Furthermore, the parameters obtained by our method with an other main lens, i.e., R12-D, are coherent with the previously obtained parameters, stressing out that our model can be applied to a different camera setting.Finally, our method is the only one providing the micro-lenses focal lengths in a single unified model.The other methods calibrate either several MLA-sensor distances (RTRX), or several models, one for each type (NOUS).
Table 3: Initial intrinsic parameters for each dataset along with the optimized parameters obtained by our method (BAP) and with the methods of Noury et al. (2017) (NOUR), of Nousias et al. (2017) for each micro-lens type (NOUS1, NOUS2, NOUS3) and the parameters obtained from RxLive software (RTRX).Reference and initial intrinsic parameters for the simulated Lytro dataset UPC-S along with the optimized parameters obtained by our method (BAP).Note that distortion coefficients and MLA rotations are close to zero.The influence of these parameters will be analyzed in the proposed ablation study of the camera model in subsection 7.4.
On simulated data.First, pre-calibration has been performed using the white raw images.The resulting parameters Ω are coherent with the simulation parameters.With parameters m = −23.639µm and q = −0.146µm, we have d ≈ f , which describes the unfocused configuration.Reference and initial intrinsic parameters are reported in Table 3, along with the optimized parameters.Second, calibration has been performed.The obtained intrinsic parameters are close enough to the references parameters, indicating that our method is able to generalize to the unfocused plenoptic camera.For completeness, we also quantitatively evaluated the optimized parameters, by estimating the relative displacement between checkerboard with known motion along the z-axis.It results a translation error ε z = 1.64 %, which validates the model.

Quantitative evaluations of the camera model
Reprojection error.In the absence of ground truth, we first evaluated the intrinsic parameters by estimating the reprojection error using the previously computed intrinsics.We consider only free-hand calibration target images which are not used in the calibration process.We use the root-mean-square error (RMSE) as a metric to evaluate the reprojection error on the corner part of the features, for each dataset.For the BAP method, the corner reprojection part is reported in Table 4, as well as the radius reprojection part within parentheses.Regarding the NOUS methods, the original error is expressed using the mean reprojection error (MRE).We converted the final error to the RMSE metric for comparison.Note that the latter method operates separately on each type of microlens, meaning that the number of features is not the same as with NOUR and BAP.First, the reprojection error is less than 1 pixel for all methods, for each dataset, demonstrating that the computed intrinsics lead to an accurate reprojection model and can be generalized to images which are not from the calibration set.Second, even though the NOUS method provides the lowest RMSE, it shows a significant discrepancy according to the considered type.The error obtained by our method is sightly higher than the error from NOUR, but this can be explained by the fact that our optimization does not aim at minimizing only the corner reprojection error, but the radius reprojection as well.Note that the positional error ε u,v predominates in the total cost by two orders of magnitude compared to the blur radius error ε ρ , but the latter still helps to constrain our model as shown by the relatively close intrinsics between the datasets.Controlled environment poses evaluation.With our experimental setup, we acquired several images with known relative translation between each frame.We compare the estimated displacements along the z-axis from the extrinsic parameters to the ground truth.The extrinsics are computed with the models estimated from the free-hand calibration.In the case of the RTRX method, we use the filtered depth maps obtained with the proprietary software RxLive to estimate the displacements.The translation errors along the z-axis with respect to the ground truth displacement from the closest frame are reported in Figure 8 for datasets R12-A (a), R12-B (b) and R12-C (c).The relative error ε z for a known displacement δ z is computed as the mean absolute relative difference between the estimated displacement δz and the ground truth, for each pair of frames (T T T i , T T T j ) separated by a distance δ z , i.e., where δz = ẑi − ẑ j , and η is a normalization constant corresponding to the number of frames pair.The mean error with its standard deviation across all datasets for BAP, NOUR, NOUS, and RTRX are reported in (d).
Firstly, the mean error across R12-A,B,C datasets are of the same order for the evaluated methods around 3 %: for BAP, ε z = 2.92 ± 0.73 %; for NOUR, ε z = 3.50 ± 3.08 %; for NOUS1, ε z = 1.68 ± 1.53 %; for NOUS2, ε z = 3.40 ± 2.19 %; for NOUS3, ε z = 3.30 ± 3.35 %; and, for RTRX, ε z = 4.96 ± 4.44 %.This is also the case for the dataset R12-D where our model has a mean translation error of ε z = 3.37 %.Note that all evaluated methods outperform RTRX as the depth maps computation might not be as precise as the optimization of extrinsic parameters.Our method ranks second in terms of relative mean error.Even though lowest error is obtained by the method NOUS for type (1), it presents a large standard deviation and the errors for the other two types are significantly higher.In real application context, there is no way to know in advance which type will produce the smallest error.Nousias et al. (2017) suggest that when extrinsics are sufficiently close, we can use representative The error ε z is expressed in percentage of the estimated distances, and truncated to 7 % to ease the readability and the comparison.The mean error with its confidence interval across all datasets for our method (BAP), Noury et al. ( 2017) method (NOUR), Nousias et al. (2017) method for each type (NOUS1, NOUS2, NOUS3), and for the proprietary software RxLive (RTRX) are reported in (d).Please refer to the color version for better visualization.extrinsics that are calculated by averaging the extrinsics from the individual types.Our results do not match this observation as the estimated extrinsics are significantly different for each type.As shown, only the first type gives satisfactory results whereas the other two present a larger error with a significant standard deviation.Averaging the extrinsics from all types will therefore minimize the difference between poses but will not provide the best possible estimation.
Secondly, the standard deviation can be seen as an indicator of the estimation precision across the datasets, and thus indicates whether the model can generalize to several configurations or not.Our model presents the lowest standard deviation as illustrated in Figure 8 (d).This indicates a low discrepancy between datasets and thus that the model is precise and consistent for all configurations.
Thirdly, we analyze the behavior of each method for each dataset across different distances.None of the methods suffered from a constant bias, as we do not observe a decreasing relative error as the distance increases.BAP and NOUR present a stable relative error for all distances, i.e., with approximately 0.3 % of standard deviation.This indicates that the estimation suffered only from a scale error.One could thus re-scale the poses to provide a precise and accurate esti-mation.We cannot draw any conclusion for the other methods since the variations do not follow any obvious pattern.
Finally, our model differs from the model of Noury et al. (2017) by modeling the micro-lens focal lengths.Comparing those two models, the mean error as well as the standard deviation is smaller with our method.The inclusion of the micro-lens focal lengths in the camera model improves the estimation precision and accuracy, and enables to generalize to several configurations.Dealing with different intrinsics which produce different extrinsics is not satisfactory when using the multi-focus plenoptic camera.In contrast, our model is able to manage all micro-lens types simultaneously, and proves to be stable across various configurations and working distances.

Ablation study of camera parameters
To evaluate the influence of each parameter of the camera model, we present an ablation study of some of them.We focus the analysis on distortion coefficients (Q 1 , Q 2 , Q 3 , P 1 , and P 2 ), on some degrees of freedom of the MLA, especially its tilt with respect to the sensor (θ x , θ y ), and the pitch be-Table 5: Ablation study of some camera parameters.For each dataset, the reprojection error ε all , computed using the RMSE along with the relative translation error ε z , expressed in %, are reported.The symbol (resp., ×) indicates if we keep (resp., remove) the considered parameters.
tween micro-lenses (∆ µ ).All combinations of the parameters have been tested, resulting in eight configurations.For each configuration and on each dataset of R12-A,B,C: first, we calibrate the camera intrinsic parameters; second, we evaluate the model using the RMSE of the reprojection error; and finally, we quantitatively estimate the relative translation error on the evaluation dataset.Each configuration has been initialized with the same intrinsic parameters, and used the same observations for all processes.Results are reported in Table 5.The first column is the configuration number.The Tilt column indicates if we keep ( ) or remove (×) the parameters θ x and θ y .The Pitch column stands for the parameter ∆ µ , and the column Dist for the distortion parameters Q 1 , Q 2 , Q 3 , P 1 , and P 2 .The reprojection error ε all is given by its RMSE, and the relative translation error ε z is expressed in percent with respect to the ground truth displacement.The configuration 1 is our reference, corresponding to the complete model.The optimized parameters are close to the ones from Table 3, i.e., with less than 1 % of variation, for all converging configurations and for all datasets.First, the distortions do not impact the reprojection error of the model.Considering the pairs of configurations (1, 2), (3, 4), and (5, 6), the errors are similar with or without distortions, indicating that our camera does not suffer from lateral distortions.This is due to the relatively large main lens focal length.Nevertheless, distortions may have a role to play in case of shorter focal length.
Second, removing the rotations of the MLA does not improve nor worsen the reprojection error and the pose estimation.When keeping the tilt but freezing the pitch, the model is able to converge.The tilt, in combination with other factors (such as a slight decrease of the main lens focal length), compensates for the error introduced by the approximate value of the pitch.In contrast, configurations 7 and 8 do not converge to a solution, showing that when removing both the tilt and the pitch of the MLA, the model is not constrained enough, and the reprojection error cannot be minimized, resulting in a failure.Finally, when freezing the pitch to its initial value, the positional part of the reprojection error increases.It is especially the case for dataset R12-A, where the reported errors in Table 5 are the highest of all configurations.This confirms our previous observation that the deviation of the micro-image centers and their optical centers does not satisfy an orthographic projection between the MIA and the MLA.The pitch should be taken into account, on one hand to improve the precision of the model, and on the other hand not to hinder the optimization process.

Relative blur calibration
We calibrate the blur proportionality coefficient κ for the three datasets using our BAP features.Figure 9 presents two windows extracted around BAP features of different types from the same cluster, showing different amount of blur.The target image to be equally-defocused according to our model is shown before, (b), and after, (c), blur addition.The estimated PSF of the relative blur is given in (d).The optimized blur proportionality coefficients κ are reported in Table 3. Theoretically, the parameter should be the same for all three datasets.Empirically this observation is validated for R12-A and R12-B.Estimated κ for R12-C is lower.This is because the micro-lenses focal lengths in R12-C are slightly shorter than in R12-A and R12-B.Analytically, this difference generates a higher amount of relative blur, and thus a shorter estimate of κ to match the observed blur in image space.In other words, κ compensates for the slight differences in f (i)  estimates.Therefore, κ should be calibrated for each dataset.

Profiling the plenoptic camera
Using the parameters from our calibration process, we plot the blur profile of the camera, i.e., the evolution of the blur radius with respect to depth for each micro-lens type along with its corresponding DoF. Figure 10 shows the blur profiles obtained for our three focus distance configurations, with their DoFs expressed in mm.The blur radius is expressed in pixel and is given for each type, in red for type (1), in green Corresponding virtual depth is reported on the secondary x-axis.
for type (2) and in blue for type (3).Distances are given in object space in mm with their corresponding virtual depth on a secondary x-axis, spanning from υ = 1 to 15, except for the configuration h = ∞ where we cropped just after the farthest focal plane.In MLA space, the profiles have the same behavior for all focus distances, as it only depends on the MLA parameters.
First, the horizontal dashed line represents the radius of the minimal acceptable circle of confusion r 0 .In our case, at a wavelength of 750 nm, the radius of the smallest diffractionlimited spot is r * = 2.4 µm which is less than half the pixel size.We then choose r 0 = s/2.Despite not illustrated in the figure, the blur radius grows exponentially when getting closer to the plane υ = 0. Once this limit is exceeded, the blur decreases and converges to a constant value of approximately 6 pixel.This happens for more distant objects when points are projected in front of MLA implying a negative virtual depth.This is the case for h = 450 and h = 1000 mm, but not for h = ∞, as the points were never projected closer than υ = 2.In the working distance range, the blur does not exceed 5 pixel and grows when points are closer to the camera.
Secondly, we can use the DoF to select the range of working distances where the blur is not noticeable.The DoF increases in object space as the focus distance increases.As reported on the figures: for R12-A, the DoF is of 14.44 mm; for R12-B of 120 mm; and finally, for R12-C, the total DoF is of 223 m.In MLA space the total DoF is constant and spans from υ = 2.15 to 3.45.As expected, the DoFs overlap.In particular, the DoF of the type (3) micro-lens is entirely included in the other two, whereas the DoFs of the type (1) and (2) just touch.Within the total DoF, a point can then be seen focused in two micro-images of different types simultaneously, which eases the matching problem between views.
Finally, we can easily identify the distance limits at which the point will not be in the DoF anymore nor be projected on multiple micro-images, i.e., corresponding to virtual distances |υ| < 2. At these distances, disparity cannot be computed in image space, and no depth estimation can be performed.Such estimation can also be hindered by the resolution in virtual space compared to the resolution in object space as disparity is inversely proportional to virtual depth.For instance, for close objects, points will be projected on more micro-images but with a low disparity.So the profiles can be used to efficiently characterize the range of distances according to the desired application.Furthermore, once the MLA parameters are available, we can simulate an approximate blur profile for the desired focus distance h with the desired main lens focal length F by updating the value of D using Eq. ( 26) and Eq. ( 27).

Conclusion
To calibrate a plenoptic camera, state-of-the-art methods rely on simplifying hypotheses, on reconstructed data or require separate calibration processes to take into account the multifocus configuration.Taking advantage of blur information we propose: 1) a more complete plenoptic camera model with the introduction of a new BAP feature that explicitly models the defocus blur; this new feature is exploited in our calibration process based on non-linear optimization of reprojection errors; 2) a new relative blur calibration to fill the gap between the physical and geometric blur, which enables us to fully exploit blur in image space; and 3) a way to profile the plenoptic camera and its extended depth of field (DoF).
Our camera model is applicable to the multi-focus plenoptic camera (both in Galilean and Keplerian configuration), as well as to the single-focus and unfocused plenoptic camera.In case of the Raytrix multi-focus camera, our ablation study shows that main lens distortions and MLA tilt can be omitted without hindering the calibration process nor the pose estimation.The study also indicates that explicitly including the pitch of the micro-lenses in the model improves the results.In addition, our calibration methods are validated by quantitative evaluations in controlled environment on realworld data.Our method provides strong initial intrinsics during the pre-calibration step, and coherent optimized camera parameters for all evaluated configurations.It shows a low and stable relative translation error across all the datasets.
In the future, we plan to use blur information in complement to disparity to improve metric depth estimation.
e., with acceptable amount of blur, onto the sensor: b < D and f < d in Keplerian; and, b > D and f > d in Galilean.The condition b > D can be achieved both when F > D and F < D. The mode of operation is then constrained by the focal length of the micro-lenses, as suggested by Mignard-Debise et al. (2017).

Fig. 5 :
Fig. 5: (a) Micro-image radii as function of the inverse f -number (in magenta), with their distributions represented by the violin-boxes, for our camera consisting of I = 3 different types.(b) Each type of micro-lens is identified by its color (type (1) in red, type (2) in green, and type (3) in blue) with its computed radius.

Fig. 7 :
Fig. 7: Example of calibration targets acquired for distances between 775 and 400 mm from the checkerboard used in the dataset R12-B, and their respective poses in 3D.
Fig.8: Translation error along the z-axis with respect to the ground truth displacement from the closest frame, for datasets R12-A (a), R12-B (b) and R12-C (c).The error ε z is expressed in percentage of the estimated distances, and truncated to 7 % to ease the readability and the comparison.The mean error with its confidence interval across all datasets for our method (BAP),Noury et al. (2017) method (NOUR),Nousias et al. (2017) method for each type (NOUS1, NOUS2, NOUS3), and for the proprietary software RxLive (RTRX) are reported in (d).Please refer to the color version for better visualization.

Fig. 10 :
Fig. 10: Blur profile, including each micro-lens type, in object space, at different focus distances: (a) h = 450 mm; (b) h = 1000 mm; and (c) h = ∞ mm.Focal planes and depth of fields are illustrated for each type.The blur radius is expressed in pixel as function of the object distance to the camera in mm.Corresponding virtual depth is reported on the secondary x-axis.

Table 1 :
Summary of R12-A,B,C,D, and UPC-S datasets contents.All distances are given in mm.Scale refers to checkerboard square size.Evaluation distances refer to the linear motion table setup.

Table 2 :
Set of parameters Ω (in µm) computed during the pre-calibration step for each dataset, along with the calibrated relative blur proportionality coefficient.Their distributions are represented by the violin-boxes.For N = 5.66, we can see that radii distributions overlap, and that radii values are slightly overestimated as they do not fit exactly the borders of the micro-images.In practice, we only use white images that present distinguishable radii distributions in the estimation process, usually corresponding to small apertures.In case of R12-B, only white images at N = 11.31 and N = 8 are used.

Table 4 :
Corner reprojection error for each evaluation dataset (i.e., free-hand calibration target images not part of the calibration dataset) using the RMSE metric.For the BAP method, reprojection error of the radius part is indicated within parentheses.