Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis

This chapter focused on image restoration of both topographical and textural information of an observed surface from a registered image sequence acquired by optical sectioning through the common concepts of Shape-From-Focus (SFF) and Extended Depth-of-Field (EDF). More particularly, the essential step of these complementary processes of restoration: the focus measurement, is examined. After a brief specialized review, we introduced novel evolved focus measurements that push the limits of state-of-the-art ones in terms of sensitivity and robustness, in order to cope with various frequently encountered acquisition issues.


Introduction
Observing through any optical imaging device with traditional lens system is often "stained" by restricted depth-of-field. Such a simplified optical imaging system consisting of a convex lens (objective), a spherical diaphragm and a sensor plane (image plane) is depicted in Fig.  1. Let (O, x, y, z) denote a Cartesian coordinate system: O is the optical center and the z-axis is along the optical axis. Imaging with this optical system effectively presents a common characteristic: the limited depth-of-field δz around its so-called object focal plane 1 : moreover when the numerical aperture NA becomes larger: NA = n i sin(α) , ( 2 ) where λ is the wavelength of illumination, n i is the refractive index of the medium in front of the objective and α is the angular semi-aperture of the diaphragm (Born & Wolf, 1991;Horn, 2001). Consider a scene surface, either opaque and observed in reflected light or sufficiently transparent and observed in transmitted light, whose profile covers more than this attainable depth-of-field (then described as "thick"). Thus, only portions of the observed surface that lie within the depth-of-field appear in-focus and sharp on the acquired image, whereas the remaining out-of-focus parts are blurred 2 by the point spread function (PSF) of the system (Born & Wolf, 1991;Horn, 2001). The PSF results from the contribution of many blur factors, such as the defocusing, the optical diffraction and aberrations and the sampling, principally. Many theoretical models of PSF have been proposed, with 1 A Gaussian convex lens of focal length f theoretically focuses on a fixed image plane at z i only the light rays arising from a single object plane at z o , the so-called object focal plane, obeying the Snell's formula: 1/z i − 1/z o = 1/ f for the same medium refractive indexes in both front and back of the lens. 2 By regarding the illumination as incoherent, blurring can be modelled by a 2-D shift-variant linear convolution of the "ideal" sharp image of the object with the point spread function (i.e. with the response of the system to a purely impulsive point object that notably varies with the distance of defocus for x, y-shifting). Fig. 1. Illustration of the basic image formation geometry. The green light rays radiated by an in-focus point of the observed surface are well refracted by the convex lens onto the sensor plane contrary to red light rays arising from an out-of-focus point, which converge forward and whose energies are distributed over the "blur circle" patch.
accuracies that depend on considered factors and used approximations 3 (Mahajan, 1998;. Introduced by Pentland, a 2-D Gaussian function is often suggested as a PSF model with a widening standard deviation as the distance of defocus increases (Pentland, 1987). Ultimately, the PSF always behaves as a low-pass filter, whose cut-off spatial frequency falls when the degree of defocus raises. In order to fully observe such a "thick" scene surface, a common way then consists in scanning it with the object focal plane of the optical system, more formally by acquiring a large sequence of 2-D images by optical sectioning (Agard, 1984). The final sequence of 2-D images is thus collected by gradually moving the object focal plane along the z-direction throughout the surface. Each 2-D optical section joins out-of-focus blurred and in-focus sharp portions, respectively related to parts of the object surface outside and inside the depth-of-field. Less damaged by the low-pass PSF, the latter exhibit much more of high-spatial frequency components corresponding to surface textural details. From such an image sequence, this chapter then focuses on image restoration of both topographical and textural information of the observed surface through the common concepts of Shape-From-Focus (or Depth-From-focus) and Extended Depth-of-Field. Importantly, both concepts require an original sequence with image sections spatially registered, principally by considering magnification variations due to changes in focus setting through the perspective projection of most optical imaging system 4 (as in Fig. 1) (Willson & Shafer, 1991). These magnification changes can be corrected using optical approaches, such as zoom adjustments based on system calibration (Willson, 1994), or computational techniques, commonly referred to as image warping (Darrell & Wohn, 1988). Notice that acquiring the image sequence by displacing either the scene or the imaging system along the z-direction with respect to a fixed focus setting ensures at least a constant magnification γ for all successive object focal planes, but not for the out-of-focus object planes that always suffer different magnifications than the focal ones (Nayar & Nakagawa, 1994). Otherwise, an all-over constant magnification can be reached through orthographic projection of telecentric optics (Watanabe & Nayar, 1997).
After briefly describing both Shape-From-Focus (SFF) and Extended Depth-of-Field (EDF) concepts in section 2, their linchpin step consisting in a focus measurement will be particularly studied, reviewed and finally "morphed" in section 3. Indeed, this work especially strives to make changes to classical state-of-the-art focus measurements through different strategies into new evolved approaches that are custom-made to cope with frequently encountered issues, such as ill-illuminated/poor textured or noisy/disturbed acquisitions. An ill-illuminated/poor textured observed surface effectively exhibits few focus cues (high-spatial frequency components) on which the restoration process is based. On the contrary, noisy/disturbed data introducing during the acquisitions produce "false focus cues" that misleads the restoration process. Such issues thus require rather opposite focus measurement behaviours: a high sensitivity to focus cues and a strong robustness to noise, respectively. Thereafter, several tests will be conducted, illustrated and discussed in section 4 on both simulated data and real acquisitions from different application fields (metallography, granulometry, ophthalmology) in conventional optical microscopy. Through such optical imaging system, the inherent use of large magnifications γ ∼ NA significantly limits the offered depth-of-field and the performed projection tends towards an orthographic behaviour (and therefore an all-over constant magnification) since the working distance WD = |z o | is much larger than the profile thickness of the observed surface (Horn, 2001). Finally, the new introduced approaches (2-D LIP-based focus measurements and 3-D statistical focus measurements) will be compared to classical state-of-the-art ones and will clearly show their efficiency in presence of aforementioned acquisition issues.

Surface topography and texture restoration
The Shape-From-Focus (SFF) concept exploits the limited depth-of-field to infer the topography of the observed surface by maximizing a focus measurement throughout the z-direction of the image sequence. Likewise, the Extended depth-of-field (EDF) concept conversely tries to overcome the depth-of-field limitation by joining through a focus measurement the most in-focus information from the image sequence into a single image: the so-called "texture image". Both complementary approaches work similarly and foremost rely upon an essential preliminary focus measurement that mainly interests this work and will be more closely studied in the next section 3. They are graphically summarized in Fig. 2 and  4 Will-be-set-by-IN-TECH will be further described below. Notice that a 3-D reconstruction of the surface can finally be obtained by mapping the texture image onto the topography, as illustrated in Fig. 3. Before going on, let us introduce some notations. Let I (x, y, z) denotes the sequence of images acquired by optical sectioning, defined on the spatial support D = D x × D y × D z ⊂ R 3 and valued into a positive real range [0, M) of intensity values. Applying a focus measurement function (FM) on I (x, y, z) yields a 3-D focus degree measure F (x, y, z) as follows: wherein the profile at location (x, y) along the z-direction is designated as F | x,y : D z → R + .

Topographical information: Shape-From-Focus (SFF)
The z-coordinates (referred to as depths) of the voxels that exhibit the largest degrees of focus infer the topography (or the so-called depth map) D of the observed surface from its image sequence I (x, y, z) as follows: Because of the significant thickness δz of the depth-of-field, the recovered topography D shows inherent "staircase" effects and an interpolation approach must then be embedded in this basic process of reconstruction. Introduced by Nayar and Nakagawa, the traditional one consists in fitting a Gaussian distribution, whose mean finally constitutes the interpolated depth value, to the three degrees of focus lying on the largest mode (Nayar & Nakagawa, 1994). Similarly, a quadratic (or even more) polynomial model can be fitted, sometimes regarding more than three degrees of focus (Niederöst et al., 2003;Subbarao & Choi, 1995). A subsequent approach (referred to as Focused Image Surface) locally tries to refine the initial recovered topography D by optimizing both position and orientation of 2-D planar (then curved) windows throughout the 3-D measure F so as to maximize the covered degrees of focus (Ahmad & Choi, 2005;Asif & Choi, 2001;Subbarao & Choi, 1995;Yun & Choi, 1999). Finally, the topography is often smoothed through average, median or recently bilateral filters (Helmli & Scherer, 2001;Khan et al., 2010;Niederöst et al., 2003). Interpolation techniques lying beyond the scope of this paper, only the traditional one will be used herein, sometimes finalised by a median filter.

Textural information: Extended Depth-of-Field (EDF)
Throughout the image sequence I (x, y, z),t h et e x t u r ei m a g eT of the observed surface is restored by joining the intensity voxels with the largest degrees of focus: When the optical sectioning step is larger than the depth-of-field δz, some regions of the observed surface may never appear in-focus throughout the image sequence and therefore on the restored texture image. Pradeed and Ragajolan then proposed to perform a non-stationary Wiener filter to locally deconvolve the texture image T (Pradeep & Rajagopalan, 2007). Note that no deconvolution process will be used herein.

Focus measurements
Let us now focus on the essential step of focus measurement, firstly through a literature review that will yield the retention of some classical and recent methods making a representative 77 Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis www.intechopen.com sample group from a strategic as well as chronological point of view. Some of them will then be developed into novel evolved approaches designated as 2-D LIP-based focus measurements and 3-D statistical focus measurements.

State-of-the-art focus measurements
In view of the fact that the PSF of defocus acts as a low-pass filter, focus measurements thus try to locally emphasize and quantify high-spatial frequency components of the original image sequence I. They can be classified according to the dimensionality of the adopted strategy to do that.

One-dimensional (point-based) approaches
From the early 1980s, some methods using maximum or minimum selection rules throughout single-voxel stacks along the z-direction of the image sequence are first proposed I (Pieper & Korpel, 1983;Sugimoto & Ichioka, 1985), therefore not offering a large robustness.

Two-dimensional approaches
For the last 40 years, a lot of more reliable focus measurements independently acting (in 2-D) on each image section of the sequence I then arose, categorized below as either neighborhood-based or multiresolution-based methods.

Neighborhood-based methods
Neighborhood-based focus measurements work over local sectional fixed-size windows, described herein by the size value r corresponding to an operating window of (2r + 1) × (2r + 1) pixels. Given this local behaviour, a certain depth regularity of the observed surface is implicitly assumed. On the one hand, the considered neighborhood has to be as small as possible to guarantee an approximately constant depth within itself and therefore to avoid too much "smoothing" the restoration process around sharp depth slopes and even depth discontinuities (Malik & Choi, 2007). On the other hand, it has to be as large as possible both to always capture focus cues (i.e. high-spatial frequency components) within wide homogeneous textural contents of the surface and to average out noise. Consequently, the selection of the optimal window size r appears as a trade-off. These approaches classically include two successive steps aiming to emphasize and quantify focus cues, respectively. The second one is simply an energy measurement that is commonly the sum over the considered neighborhoods of the absolute values resulting from the first one, therefore improving the robustness to noise and/or to wide textural contents of the measurement. The first step differs in the specialized literature. Most are based on high-pass filtering (norms of derivatives), such as Laplacian energy (Subbarao et al., 1993), sum-modified-Laplacian (Nayar & Nakagawa, 1994), Brenner (Brenner et al., 1976) or Tenenbaum (Krotkov, 1987) gradients, among others... Others, usually more robust to noise, use statistical tools in the considered neighborhoods, such as (normalized) variance (Groen et al., 1985;Sugimoto & Ichioka, 1985), autocorrelation (Vollath, 1987), sum of eigenvalues (Wee & Paramesran, 2007) or various moments (Yap & Raveendran, 2004;Zhang et al., 2000). Remark that some of them directly combine the two aforementioned steps, e.g. the variance in the neighborhoods. The last ones work in different frequency domains through discrete cosine (Kristan et al., 2006) or Fourier (Boddeke et al., 1994;Malik & Choi, 2008) transforms. The latter exploit more robust band-pass filters but lack sensitivity in return. At first, note that neighborhood-based focus measurements was often employed to computationally autofocus imaging system.
Throughout these state-of-the-art section, some fundamental and recent methods will be retained; their designations, details and references will be summarized as follows: 2-D VAR VARiance in a 2-D window (Groen et al., 1985;Sugimoto & Ichioka, 1985).

2-D TEN
Sum over a 2-D window of the squared L 2 -norms of the first derivatives approximated by the horizontal and vertical Sobel operators (TENengrad) (Krotkov, 1987).

2-D SML
Sum over a 2-D window of the L 1 -norms of the second derivatives approximated by the Laplacian operator (Sum-Modified-Laplacian) (Nayar & Nakagawa, 1994).

2-D OPT
Sum over a 2-D window of the absolute values of the real part responses in the spatial domain to an "OPTical" band-pass filter applied in the Fourier domain and based on bipolar incoherent image processing (Malik & Choi, 2008).

Multiresolution-based methods
Other 2-D approaches rely on some form of multiresolution analysis: e.g. Laplacian (Burt & Adelson, 1983), ratio-of-low-pass (Toet, 1989), gradient (Burt & Kolczynski, 1993) and steerable pyramids (Liu et al., 2001), and wavelet (Forster et al., 2004;Pajares & de la Cruz, 2004;Valdecasas et al., 2001), shapelet (Meneses et al., 2008) and curvelet (Minhas et al., 2011) transforms, in order to perform high-pass filtering at different resolution level. Contrary to afore-described neighborhood-based methods, these ones thus avoid the choice of a fixed-size filter. They are regularly introduced in the practical context of image fusion that consists in combining information from some (generally between 2 and 5) multi-focus or 79 Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis www.intechopen.com multimodal images of the same scene into a single composite representation. An overview of multiresolution-based schemes for image fusion can be found in (Zhang & Blum, 1999). First, each image section of the original sequence is decomposed into a collection of sub-images at different scales, called a pyramid structure, through alternate combination of convolution and sub-sampling. Different types of details (focus cues) are thus put forward at different levels in the associated pyramid structure. Note that the original image section can be reconstructed by the reverse procedure. A (pixel-based, window-based or region-based (Piella, 2003)) salience measurement (absolute value, sum or variance of absolute values) then tries to quantify focus cues throughout every pyramid structures. The depth map is thus inferred from the largest salience measures. Besides, a composite pyramid structure is constructed by combining coefficients of the original pyramid structures in function of their exhibited salience measures (choose-max or weighted average). Next, a (window-based or region-based) consistency verification is performed on the composite pyramid structure (and on the recovered depth map) so as to check that best salience measures come from the same original image sections, which is equivalent to a smoothing post-processing step. Once the composite pyramid structure is fused, the final texture image is lastly restored by reverse decomposition.

2-D DWT
Use of the Discrete Wavelet Transform (DWT) based on complex Daubechies wavelets as multiresolution analysis, of the largest absolute value of the wavelet coefficients in the subbands (up to 10 levels) as (pixel-based) salience measurement and of both spatial (window of size r = 1) and typical subband consistency checks on the wavelet coefficients. (Forster et al., 2004).
By independently working on each individual image section of the sequence I,t h e s e2 -D methods are inevitably misled by a rather isolated sectional noisy/disturbance data that appears sharpest, in theory contrary to the following 3-D approaches.

Three-dimensional approaches
Recently, a 3-D focus measurement has been introduced by Mahmood & Choi (2008) takes fully advantage of the three spatial dimensions of the original image sequence I .I t is locally based on a Principal Component Analysis (PCA) within a stack of collected sectional neighborhoods along the z-direction. Consequently, it simultaneously exploits all focus cues along the axial (or cross-sectional) z-direction in order to estimate sectional degrees of focus. Contrary to 1-D/2-D ones, this novel 3-D strategy would allow to improve the robustness. However, it actually appears ineffective due to a severe loss of sensitivity. Indeed, it finally uses the largest principal component to discriminate in-focus information, which represents the global content of the data. Hence, the authors combine it with various previous transforms, such as discrete wavelet (Mahmood, Shim & Choi, 2009) or cosine  transforms, and lately kernel function (Khan et al., 2010). Alternatively, they perform pre-or post-processings through bilateral filtering (Mahmood, Khan & Choi, 2009) or kernel regression , respectively.

3-D DCT-PCA
Discrete cosine transformation (DCT) over sectional 2-D/3-D windows and discrimination of all axially-collected sectional AC 5 data by the first feature of a Principal Component Analysis (PCA) .

Two-dimensional LIP-based focus measurements
This first work aims at improving sensitivity to focus cues of usual measurements in order to well operate in difficult regions of the observed surface, such as its ill-illuminated/poor textured parts. Let us start with a brief introduction of the Logarithmic Image Processing (LIP) framework.

Logarithmic image processing (LIP) framework
An original mathematical framework, the LIP model, has been introduced in the middle of the 1980s for the processing of intensity images valued in a bounded range (Jourlin & Pinoli, 1987;. This model is mathematically well defined as well as physically consistent. The reader can refer to Pinoli (1997a;b) for a complete mathematical theory and many physical and/or psychophysical connections and justifications about the LIP framework.

Mathematical fundamentals
In the LIP model, the intensity of an image is completely represented by its associated gray tone function f . Such a function is defined on the spatial suppport D and valued in the real number range interval [0, M), called the gray tone range. Thereafter, this class of gray tone functions, extended to the real number interval (−∞, M) and structured with the after-specified vector addition + △, scalar multiplication × △ and scalar subtraction − △ defines a real vector space denoted S: This gray tone vector space S is algebraically and topologically isomorphic to the classical vector space defined on the spatial support D with values in the real number set R through the mapping ϕ (called the isomorphic transformation) defined as: which is the isomorphic transform of the gray tone f . The inverse isomorphic transformation ϕ −1 is then defined as: In addition to abstract linear algebra, this class of (extended) gray tone functions is an ordered real vector space with the classical order relation ≥ (Pinoli, 1997a).

Physical connections
The LIP framework has been proved to be consistent with the transmittance image formation model (Jourlin & Pinoli, 1988), the multiplicative reflectance and transmittance  Fig. 4. Basic diagram representing both theoritical and practical (in red) computation of the LIP-based focus measurements.
image formation models (Pinoli, 1997a) and with several laws and characteristics of human brightness perception (Pinoli, 1997b). In the LIP approach, the gray tone range is inverted contrary to the classical grayscale convention. The relationship between a gray tone function f (x, y) and its corresponding classical grayscale function, denotedf (x, y),isgivenby: Indeed, the limits of the gray tone range [0, M) are anticlassically defined: 0 designates the total whiteness, while the real number M represents the absolute blackness. This scale inversion has been justified on mathematical reasons (Pinoli, 1997a), and physical (in the setting of transmitted light imaging processes) (Jourlin & Pinoli, 1988; and psychophysical grounds (Pinoli, 1997b).

Two-dimensional LIP-based focus measurements
LIP-based focus measurements simply consist in reinterpretations of classical ones using the LIP fremawork (i.e. by popularizing, from usual operations +, ×, − to respective LIP ones + △, × △, − △ (Eq. 6)). For the sake of convenience, we only consider the three more widely used 2-D focus measurements: 2-D VAR, 2-D TEN and 2-D SML.A m o n ga l l retained methods, other 2-D ones work through various frequency transforms that make their reinterpretations less obvious and the selected 3-D strategy strongly damages the sensitivity. These reinterpretations, denoted 2-D VAR △ , 2-D TEN △ and 2-D SML △ ,c a nb ec l e a r l y simplified through the use of the LIP fundamental isomorphic ϕ (see Fig. 4). Nevertheless, they involve a practical subtlety to succeed from a computional point of view. Indeed, LIP-based focus measurements imply some costly operations (typically such as raising to the square) that are not enough distinguishable in the digitized case. The machine precision does not enable to well discriminate such arithmetics, notably in terms of the classical order relation ≥ for maximizing the resulted degrees of focus. In view of the strictly increasing behaviour of the inverse isomorphic transformation ϕ −1 (Eq. 8), the LIP-based focus measurements can thus be computationally reduced to the computation of the respective classical ones (with usual operations +, ×, −) on isomorphic transform ϕ of the gray tone function (see Fig. 4).
In the context of human brightness perception, a gray tone function f (x, y) corresponds to an incident light intensity function F(x, y) by the following relationship: where F max is the saturating light intensity level ("glare limit") (Pinoli, 1997b). First, Weber described the human visual detection between two light intensity values F and G with a "just noticeable difference". The LIP subtraction f − △ g is consistent with Weber's law (Pinoli, 1997b). In fact, the LIP model defines specific operations acting directly on the physical light intensity function (stimulus) through the gray tone function notion. A few years after Weber, Fechner established logarithmic relationship between the light intensity F (stimulus) and the subjectively perceived brightness B (light intensity sensation). It has been shown in Pinoli (1997b) that B is an affine map of the isomorphic transform ϕ( f ) of the gray tone f . Consequently, the fundamental isomorphism ϕ (Eq. 7) of the LIP model should enable to deal with brightness (via the usual operations). About human brightness perception, the aforegiven practical limitation accordingly results in revisited measurements attempting to estimate degree of focus in terms of brightness (intensity sensation from physical light stimuli). Further details about these 2-D LIP-based focus measurements can be found in Fernandes et al. (2011a).

Three-dimensional statistical focus measurements
This second work conversely aims at creating novel 3-D focus measurements offering a large robustness to noise, while preserving a sufficient sensitivity to focus cues (contrary to the 3-D DCT-PCA method), in order to well operate through noisy/disturbed acquisitions. In spite of a similar basic tool, the after-described multivariate statistical analyses are totally different than the state-of-the-art 3-D DCT-PCA method. Moreover, they do not require any previous transformations or processings.
From a stack of single-voxels along the z-direction of the original sequence I (x, y, z) of n image sections, 2-D sectional windows of m pixels are considered and a multivariate m-by-n data matrix X is formed as shown in Fig. 5(a). The rows of this data matrix X referred to as the cross-sectional responses are constituted by the same components of all considered sectional windows. Let (e i ) i∈ [1,n] denotes the canonical basis of these cross-sectional responses, whose each canonical vector e i thus abstracts a different depth z i throughout the image sequence. Alternatively, each of the columns referred to as the sectional observations fully corresponds to a different original window at depth z. Note that the variability in variance of these sectional observations along the z-direction matches with the degree of focus, which is 83 Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis www.intechopen.com the concept of the traditional 2-D VAR focus measurement. Each sectional observation is centered, and normalized or not by their means (that will finally yield a couple of different focus measurements denoted 3-D EIG and 3-D NEIG, respectively). The normalization enables to locally compensate for differences in intensity means between the image sections of the sequence. The covariance matrix C X of the sectional observations of X is then calculated as follows: where t denotes the transpose operation. Afterwards, C X is diagonalized such as: in order to obtain both its eigenvalues (λ i ) i∈ [1,n] in increasing order and its eigenvectors (g i ) i∈ [1,n] , diagonal components and columns of the matrixes Λ and G respectively. The eigenvectors form a novel orthornormal basis (EIGenbasis) for the cross-sectional responses of X. Each of them is associated with a particular eigenvalue that reveals its captured amount of variance among the total one ∑ i∈ [1,n] λ i exhibited by the sectional observations of X. During the decomposition process of the covariance matrix C X , the first eigenvector g 1 accounts for as much of this total variance as possible and the next ones then maximize the remaining total variance, in order and subject to the orthogonality condition. Furthermore, less influential noisy information is, to the greatest extent possible, pushed into least dominant (last) eigenvectors, whereas one of interest remains within the first eigenvectors. Finally, the degree of focus at the depth z i (with i ∈ [1, n]) is the norm of the orthogonal projection of the first eigenvector g 1 onto the corresponding canonical vector e i , that is simply equal to the absolute value of the i th component of g 1 . In the simple schematic example of Fig. 5(b), the largest degree of focus is clearly assigned to the depth z of index 3 that maximizes the orthogonal projection norm of the first eigenvector g 1 . Obviously, several first eigenvectors can be considered, e.g. the first K eigenvectors, hence the sum of their orthogonal projection norms respectively weighted by their eigenvalues is regarded. The 3-D EIG and 3-D NEIG focus analyses then become less robust to noise but relatively gain sensitivity to focus cues. Further details about these 3-D statistical focus measurements can be found in Fernandes et al. (2011b;n.d.).

Results
Both retained state-of-the-art and novel developed focus measurements will now be illustrated, tested and compared through various simulation and real experiments.

Performance comparison in simulation
A first serie of experiments using simulated data is conducted in order to dispose of ground truths for carrying out quantitative assessments of the results produced by all aforementioned methods.

Simulation process & performance assessment
By first mapping an arbitrary texture onto a simulated depth map (that constitutes the ground truth), an artificial 3-D surface is constructed. This virtual surface is then discretized along the Note that the multiresolution-based 2-D DWT method is put into the r = 1bin,asthesizeof the window used for the spatial consistency check. The 2-D psychophysical LIP-based focus measurements undoubtedly make fewer errors of restoration than their respective traditional ones as well as the other state-of-the-art 2-D approaches.
z-direction by constant steps as successive locations of the object focal plane. Afterwards, a sequence is collected by making an image for each of these locations through the 2-D shift-variant linear convolution of the "ideal" image of the surface (i.e. the texture image) with a modelled PSF function of the distance of defocus (i.e. the distance between the considered location and the depth map). The 2-D PSF is approximated by a 2-D Gaussian function (Pentland, 1987) normalized to account for an uniform illumination (e.g. aK ö h l e r illumination) (Forster et al., 2004), whose standard deviation is proportional to the distance of defocus. Two different simulated image sequences are generated with various textural and topographical properties: a first exhibiting some discontinuities to assess accuracy and sensitivity of the studied focus measurements (Fig. 6(a)), and a second one imaging a smoother surface but with additive Gaussian or impulse noises to theoretically test their robustness ( Fig. 7(a)). Finally, performances are measured in terms of the root-mean-square-error (RMSE) metric with respect to the ground truth (Gonzalez & Woods, 2008).

Results & discussion
The first simulated experiment in Fig. 6 puts most sensitive studied 2-D focus measurements to the test, as a function of the used neighborhood size r. It notably aims at evaluating the 2-D psychophysical LIP-based focus measurements (2-D VAR △ , 2-D TEN △ and 2-D SML △ ) versus their respective traditional ones (2-D VAR, 2-D TEN and 2-D SML). The LIP-based reinterpretations clearly outperform their traditional ones (for any of the intances of r). They are more sensivite, that is to say they offer a better capacity to distinguish focus cues of 85 Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis www.intechopen.com poor contrasted/textured or ill-illuminated regions, but at the expense of a sligh loss of robustess. Notice that the improvements are even more obvious for smaller neighborhood sizes. This enables to employ smaller operating windows that smooth less the restoration process, most notably around sharp depth slopes or even discontinuities of the observed surface. Incidentally, LIP-based focus measurements also make fewer restoration errors than the other 2-D retained methods. On account of its multiresolution analysis, the 2-D DWT approach avoids operating over fixed-size windows, but does not guarantee stability in return. As for the 2-D OPT focus measurement, its band-pass filter designed for offering robustess inevitably damages the sensitivity, a bit like 3-D approaches that favour robustness to sensitivity.
In Fig. 7, the second simulated test studies most robust aforementioned focus measurements under various artificial noisy conditions. In view of the fact that the synthetic depth map exhibits neither sharp depth slopes nor discontinuities, we opt for a rather large neighborhood size r (r = 8 pixels), moreover necessary to average out noise. In presence of noise, the proposed 3-D EIG and 3-D NEIG methods with K set to 1 clearly outperform the state-of-the-art other ones. The adopted 3-D statistical strategies make possible a better discrimination of focus cues "drowned" in noise. Notice that the 3-D EIG version offers a more robust behaviour than the normalized 3-D NEIG one. As for the other 3-D focus measurement (3-D DCT-PCA), it shows the weakest performances by lack of sensitivity, the previous transformation being not sufficient to improve it.

Results on experimental data
We now illustrate the potential of the suggested focus measurements on real image sequence acquisitions.

Experimental setup
The real test dataset is made up of three image sequences exclusively acquired in conventional optical microscopy by gradually shifting the samples along the optical axis direction with a  Fig. 9 (r = 4 pixels). In the details (b) and (f) resulting from our suggested methods, there are less bright artefacts and the grain borders appear darker and sharper. motorized stage, but through different configurations (using reflected or transmitted light) and magnifications. Related to various application fields, three samples with varying textural and topographical properties are regarded so as to rigorously test both selected and proposed methods. The first two ones are a Vickers hardness test 6 performed on a polished aluminium plate surface and a grain of sand; their reflected white-light acquisitions are illustrated and described in Fig. 8 and Fig. 9, respectively. These real image sequences exhibit some difficult regions: e.g. around the sharp borders of the sand grain and at the bottom of the Vickers pyramid-shaped indentation, thus requiring a good sensitivity from the focus measurements. Moreover, they are necessarly degraded by some noisy data introduced by the imaging system during the acquisition, but in much lesser extent than the third one. This latter, illustrated and described in Fig. 10, images using transmitted white-light an human ex-vivo corneal endothelium 7 folded after storage of the graft in a specific preservation medium (Pels & Schuchard, 1983). Effectively, it appears very disturbed by intense contrast reversals and some cell fragments present in the graft immersion solution. For these real image sequences, the assessment will be only qualitative, i.e. by visually examining and comparing the restored depth maps and/or textures; these latter will be highlighted in some crucial regions for a better visibility.

Results & discussion
The topography of the Vickers hardness test reconstructed by the major part of the aforementioned focus measurements are shown in Fig. 11. Those related to proposed methods clearly exhibit less artefacts (e.g. wrong sharp peaks), notably at the bottom and the edges of the pyramid-shaped indentation. Compared to classical 2-D VAR and 2-D SML methods, the respective psyschophysical LIP-based reinterpretations (2-D VAR △ and 2-D SML △ )a r e able to deal with more difficult regions, such as poorly textured and/or ill-illuminated ones. Moreover, they offer a relative robustness to noise sufficient for most real usual cases. In same cases, the more sensitive normalized 3-D NEIG method with K set to 1 will be preferred to 3-D EIG K=1 one, except for much noisier acquisitions as encountered in the last example below.
The normalization effectively provides some accuracy and stability to the analysis, up to a certain degree of noise in the image sequence. A 3-D reconstruction of the Vickers hardness test is shown in Fig. 13(a).
Concerning the grain of sand, the textures resulting from a more restricted set of aforementioned focus measurements are highlighted and compared in Fig. 12. First, the light-gray stains around the grain corner of the region A that designate false textural restorations are much less frequent with our suggested 2-D TEN △ and, even more so, 3-D NEIG K=1 methods. Second, the inspection of the grain borders within B clearly reveals marked improvements with the same 2-D TEN △ and 3-D NEIG K=1 methods. As previously, there are less bright artefacts in and around the borders, which moreover appear much darker and sharper. As previously, a 3-D reconstruction of the grain of sand is shown in Fig. 13(b), in which a binary mask is used so as to exclude the background from the reconstruction process (Niederöst et al., 2003).
In Fig. 14, we compare both depth map and texture obtained with the most robust studied focus measurements from the noisy and disturbed image sequence of the corneal endothelium. Contrary to above real examples, a larger neighborhood size (r = 10 pixels) is used, because of both wider textural content and noisier aspect of the image sequence. Moreover, this is here non-prejudicial in view of the complete absence of discontinuities and sharp slopes. First, the depth map recovered by the proposed 3-D EIG K=1 method clearly exhibits less artefacts, anatomically impossible as the endothelial surface is necessarily continuous. Indeed, it distinctly contains less underestimated (over-red) and overestimated (blue) regions caused by cell fragments and contrast reversals, respectively. As for the restored textures, their inspection corroborates the above appreciation (moreover knowing that each of them is intimately related to its respective depth map). The texture tagged with 3-D EIG K=1 Th e3-D EIG K=1 depth map in (d) distincly contains fewer blue spots and over-red regions respectively caused by moving cell fragments and cell border contrast reversals, moreover attested by the details of its respective texture in (d) that noticeably exhibit less artefacts attributed to both disturbances.
is not too much damaged by disturbances, like dark steaks and bright cell borders due to moving cell fragments and contrast reversals, respectively.

91
Surface Topography and Texture Restoration from Sectional Optical Imaging by Focus Analysis www.intechopen.com

Conclusions
This chapter has focused on image restoration of both topographical and textural information of an observed surface from a registered image sequence acquired by optical sectioning through the common concepts of Shape-From-Focus (SFF) and Extended Depth-of-Field (EDF). More particularly, the essential step of these complementary processes of restoration: the focus measurement, has been examined. After a brief specialized review, we have introduced novel evolved focus measurements that push the limits of state-of-the-art ones in terms of sensitivity and robustness, in order to cope with various frequently encountered acquisition issues.
On the one hand, reinterpretations with the LIP framework (2-D VAR △ , 2-D TEN △ and 2-D SML △ ) of three traditional 2-D focus measurements (2-D VAR, 2-D TEN and 2-D SML) have been suggested. From a computational point of view, they involve some subtleties to succeed that, about human brightness perception, accordingly result in revisited focus measurements attempting to work in terms of brightness (intensity sensation from physical light stimuli). Firstly designed to deal with difficult ill-illuminated and poor textured parts of the obserbed surface, the strategy of using the LIP model effectively confers higher sensitivity to focus cues, at the expense of a slight loss of noise robustness that nevertheless remains sufficient in most usual cases. On the other hand, novel 3-D statistical focus measurements (3-D EIG and 3-D NEIG) have been developed in order to conversely handle noisy and disturbed acquisitions. Contrary to 2-D sectional way adopted by the major part of the current methods, a 3-D strategy is originally achieved throughout the image sequence via multivariate statistical analyses within local stacks of collected 2-D sectional windows along the axial direction, thereby offering a strong robustness to noise while preserving a sufficient sensitivity (contrary to the state-of-the-art 3-D DCT-PCA one). The efficiency of all proposed focus measurements have been clearly demonstrated on simulated data and real experimental acquisitions.
The concept of reinterpreting traditional focus measurements through the LIP framework is obviously restricted to neither image processing frameworks nor to specific focus measurements. While the studied focus measurements are illustrated in the context of conventional optical microscopy, they are also applicable to the wider range of imaging systems offering a limited depth-of-field, provided the acquired image sequence is previously registered. Morever, they can be used for all application issues requiring focus degree information (obviously after considering the focus measurement strategy and dimensionality), such as autofocusing. Finally, we believe that the use of adaptive windows instead of fixed-size ones for measuring degrees of focus could improve the restoration process, with a view to always capturing focus cues (whatever the textural content of the observed surface) while reducing the inherent smoothing effect (around sharp depth slopes and discontinuities of the observed surface).

Acknowledgments
The authors would like to thank the different partners from the University Hospital Center of Saint-Etienne, and from the LPMG and PECM CNRS Units in France who have kindly supplied the different original images studied in this chapter.

92
Image Restoration -Recent Advances and Applications www.intechopen.com