Compensating Light Intensity Attenuation in Confocal Scanning Laser Microscopy by Histogram Modeling Methods

The scientific discipline of microscopy aims to make possible the visualization of objects that cannot be observed by the unassisted human vision system, allowing researchers to enhance their understanding on the morphology and processes which characterize such objects. All microscopy techniques by themselves represent crucial tools for scientists working in various fields of research, and furthermore, when combined with image processing and computer vision algorithms the level of information and the speed at which it can be extracted from microscopy images can be greatly increased.


Introduction
The scientific discipline of microscopy aims to make possible the visualization of objects that cannot be observed by the unassisted human vision system, allowing researchers to enhance their understanding on the morphology and processes which characterize such objects.All microscopy techniques by themselves represent crucial tools for scientists working in various fields of research, and furthermore, when combined with image processing and computer vision algorithms the level of information and the speed at which it can be extracted from microscopy images can be greatly increased.
Confocal Scanning Laser Microscopy (CSLM) is generally considered to be one of the most important microscopy techniques at this time because of the optical sectioning possibilities offered.It is widely accepted that the confocal microscope was invented by Marvin Minsky, who filed a patent in 1957 (Minsky, 1957).However, at that time such a system was very difficult, if not impossible, to implement, due to the unavailability of the required laser sources, sensitive photomultipliers or computer image storage possibilities.The first CSLM system, functioning by using mechanical object scanning, was developed in Oxford in 1975, and a review of this work was later published (Sheppard, 1990).As mentioned above, the architecture of a CSLM system provides the possibility to acquire images representing optical sections on a sample's volume.In order to achieve this, in a CSLM system an excitation source (laser) emits coherent light which is scanned across the sample surface.In reflection mode the light reaching the sample is reflected backwards to the objective, towards a detector.In fluorescence mode the same optical path is used, with the difference being that the reflected light is discarded and the detector collects only the light rays corresponding to the fluorescence emission from the sample.While in conventional microscopy, the detector is subjected to light which is reflected by out of focus planes, resulting in out-of-focus blur being contained in the final image, the architecture of a CSLM system avoids this situation.In order to acquire images corresponding to a certain optical section, a confocal aperture (usually known as pinhole) is situated in front of the detector.More precisely, the pinhole is placed in a plane conjugate to the intermediate image plane and, thus, to the object plane of the microscope.As a result, only light reflected from the focal plane reaches the detector, out-of-focus light being blocked by the pinhole (Fig. 1).The dimension of the pinhole is variable and together with the wavelength which is being used and the numerical aperture of the objective, determines the thickness of the focal plane (Shepard et. al., 1997;Wilson, 2002).The architecture of a CSLM offers specific advantages such as increased resolution and better contrast than conventional microscopy.Meantime, by providing access to images corresponding to optical sections it offers as well significant advantages for people working in fields such as biology, medicine, material science or microelectronics mainly because the CSLM image stacks can be used for 3D reconstructions of the material surfaces (surface topological studies) or of the internal structure of semi-transparent specimens (sub-surface bulk studies) (Rigaut et al., 1991;Sugawara et al. 2005;Liu et al. 1997;Rodriguez et al, 2003;Pironon, 1998).The limits of a CSLM system's performance are essentially determined by the working depth of the high numerical aperture (NA) objective lens which is used in a particular investigation session but also by the properties of other components such as the laser source, the photomultiplier sensitivity or others.
One of the causes that lead to problematic scenarios which can occur during the CSLM investigations sessions is light intensity attenuation.This problem is mainly caused by light

189
scattering and adsorption, light-aberrations or photo bleaching in the case of fluorescence labeled samples.Also, due to the fact that staining thick samples by fluorophores evenly is a difficult task, the intensity attenuation with depth is commonly encountered in CSLM investigations on such samples.The intensity attenuation can be caused also by chromatic or spherical aberrations which may occur due to various properties of the optical elements present in a CSLM system.These aberrations can lead to a distortion of focus, which can further on lead to decrease in the excitation intensity.The attenuation of light can increase with the depth of the imaged focal planes also because of physical phenomena such as scattering and absorption, more precisely due to the fact that the light rays are significantly scattered and absorbed by the atoms and molecules contained in the medium encountered by the light on the path to the targeted focal plane (and on the return path as well).When a dense medium that significantly scatters and absorbs light is present above the region of focus, the image that corresponds to the focal plane will have a lower contrast than the images that are collected from the upper planes.As a consequence, the images within the image stacks captured using confocal optical microscopy will have different intensities depending on the depth at which they have been collected.
Besides absorption and scattering, another phenomenon which can lead to light attenuation and thus affect the CSLM image acquisition is the reflection of the incident laser beam towards a different direction rather than the direction of the objective.When the laser beam encounters a plain surface, it will reflect backwards, in the direction of the objective.When the laser beam encounters an inclined surface instead of reflecting backwards towards the objective, it will reflect in a direction normal to the plane of that surface as illustrated in Fig 2 .The light that reaches the detector in the case of the interaction between the laser beam and regions with morphology of this type will have a low intensity.An example on such a scenario can be found in (Stanciu et al. 2010), where CSLM images collected on Photonic Quantum Ring Laser devices that have a deficient aspect due to this situation are presented.Fig. 2. Scenario in laser scanning microscopy when in certain regions the laser beam is not reflected backwards, towards the objective, due to the sample's geometry.
The intensity attenuation and structural blurring in the image stacks can be the cause of serious problems in the analysis of CSLM images.Problematic situations occur also when trying to use computer vision algorithms designed for tasks such as object & scene recognition or object tracking along with image stacks collected by CSLM.These types of techniques can provide awkward results when the contrast parameters, which are directly dependant to the light intensity, have very different values throughout the series.For example the results that may be achieved by using various thresholding algorithms directly depend on the separability and stationarity of the intensity distributions corresponding to the two classes in the 1D intensity space.In the case of light intensity attenuation, the intensity distributions are non-stationary and non-stationarity reduces the effective separability between the classes, which is likely to lead to segmentation errors (Semechko et al, 2011).In (Sun et al., 2004) is shown that intensity compensation can also enhance the visualization of CSLM data when 3D reconstruction techniques are employed for volume rendering.
In this chapter we overview several recently reported digital image processing techniques that can be used to compensate the effects of light attenuation in CSLM imaging.The techniques that we present in this chapter can be regarded as histogram modeling methods.In order compensate light attenuation, Capek et al. (2006) considered the specification for each frame in the stack of a standard histogram.The standard histogram was computed according to a normalization procedure proposed by Nyul et al. (2000) which consists on matching landmarks in histograms.Stanciu et al. (2010), propose in the same purpose a method based on exact histogram specification.In their method to each of the images in the CSLM stack is exactly specified the histogram of a reference frame.The reference frame is elected by using an estimator which takes into account aspects such as brightness, contrast and sharpness.Semechko et al (2011), propose an intensity attenuation correction method which combines the ones of Capek et al. (2006) and Stanciu et al. (2010).In this method, the authors use as reference the standard histogram proposed in Capek (2006), specify it in its exact shape to the other images of the stack by using the algorithm of Coltuc (2006) and finally nonlinear diffusion filtering is used aiming to suppress noise and homogenize locally over-enhanced image regions.Each of these methods will be presented in detail in the following sections.

Intensity attenuation based on histogram normalization & histogram warping
In Capek et al., (2006) a method for the compensation of intensity attenuation based on the warping of the histograms of the individual images in the CSLM stack to a standard histogram is introduced.The standard histogram is constructed such that warping the histograms of the individual images onto it will both preserve the high contrast of the optimally captured sections while in the same time will improve the contrast and the brightness of the low quality images in the stack.The high quality images are most likely to correspond to the topmost layers in the specimen, while the low quality images are most likely to correspond to the deep ones.The computation of the standard histogram is inspired by a procedure for histogram normalization proposed by Nyul et al. (2000) which consists in directly matching landmarks in histograms.Unlike the original approach by Nyul et al.(2000), the method proposed by Capek et al. (2006) searches for the longest distance between two adjacent landmarks in one histogram.The considered landmarks correspond to the minimum intensity, maximum intensity and the n-th percentiles of the image histogram, for n= {10, 20,…, 90}.This approach is chosen by the authors as maximal distances between landmarks are likely to preserve maximum image contrast.These maximal distances (M 0 , M 1 , M 2 , . . ., M 10 ) are searched in the histograms of all images in the stack and once found are counted up and stretched to cover a grayscale of 256 levels.The breaks between the rescaled maximal distances (L 0 , L 1 , L 2 , . . ., L 10 ) represent the new landmarks of the standard scale (Fig. 3).The landmarks of the standard scale are matched to the landmarks of individual image histograms in order to compute the new intensities of the image pixels and further on the image intensities between the landmarks (L 0 , L 1 , L 2 , . . ., L 10 ) are piece-wise linearly interpolated, as illustrated in Fig. 4. In other words, the normalized histogram is determined by taking for each pair of landmarks the maximal distance and by stretching these distances to cover the graylevel range.Finally, the normalized histogram is specified to each image in the stack by histogram warping.Histogram warping, originally proposed by Cox (1995), is closely related to histogram specification.Instead of transforming a given image to match a given histogram, for histogram warping one should transform two given images in order to achieve the same somehow "intermediate" histogram.In fact, the histogram warping problem consists in deriving the intermediate histogram which can be exactly specified to both images.The complete details of the algorithm presented above can be found in the original publication (Capek et. al, 2006).In Fig. 5 we present a subset of a a stack of images collected by CSLM on a sol-gel matrice sample doped with a photosensitizer, in original aspect and in the aspect resulted after processing by using the algorithm described in this section.The number in the top left corner depicts the numerical order of optical sections in the full series.The distance between sections in the subset is of 1 μm.The image series were collected by using a Leica TCS SP CLSM system, working in reflection workmode (HeNe 633nm).A HC PL FLUOTAR 20.0x objective was used, having a numerical aperture of 0.50.

Intensity attenuation based on reference frame detection & exact histogram specification
The drawback of the method presented above is a certain over-enhancement which may occur, as in the case of the basic histogram equalization method presented in (Stanciu and Friedman, 2009).If the contrast is increased too match, false contours may appear along with an enhancement of the noise.In order to eliminate these drawbacks, Stanciu et al. (2010) have introduced a different technique based on histogram modeling aiming to compensate the light attenuation in the case of CSLM images.In the proposed method instead of a uniform or a normalized histogram, the histogram of the best visual quality image of the stack is specified to the other images in the stack.This image of best visual quality was entitled the 'reference frame'.The reference frame was elected from among the images that make up the stack based on a procedure that offers automated selection.In order to specify the histogram of the reference frame to the others, the exact histogram specification algorithm introduced by Coltuc et al., (2006) was used instead of the classical histogram specification algorithms.It should be stressed that the approach of Coltuc et al., (2006) provides exact results, while the classical histogram specification as well as the histogram warping method proposed by Cox et al. (1995)

193
As mentioned above, the proposed method relies on specifying the histogram that corresponds to the image of the best visual quality in the series onto the rest of the images in the stack.The reference frame can be selected by visual inspection, with a human operator examining the entire image stack and choosing the best quality frame.Obviously, such an approach is both subjective and time consuming.Therefore, the authors have proposed a procedure that offers the automated detection of the reference frame.In order to automate the reference frame detection, a quality assessment metric is defined, and the reference frame is selected as the one with the best score with respect to the considered metric.The metric that the authors have proposed is based on the evaluation of three attributes which are generally considered as responsible for the quality of a graylevel images.These are: brightness, contrast and contour sharpness.
A good measure of image brightness is the average graylevel of the image.Considering the discrete image f:[0,M-1] x [0,N-1]->[0,L-1] and H={h(0), h(1),… h(L-1)} its histogram.The average graylevel, μ f , can be defined as follows: (1) As the standard deviation measures how widely spread the values in a data set are, it can be regarded as a measure of contrast.If many data points are close to the mean, then the standard deviation is small.By the contrary, if many data points are far from the mean, then the standard deviation is large.Finally, if all data values are equal, then the standard deviation is zero.Obviously the variance is a measure of the contrast, too.The standard deviation has the advantage that, unlike variance, it is expressed in the same units as the data.An unbiased estimate of the standard deviation can be defined as follows: (2) The third factor that we have taken into consideration when designing the reference image estimator is related to the sharpness of the edges contained in the image.An image is generally considered to be of good quality if the objects contained in it can be discerned very clearly.Edges characterize boundaries and represent therefore a problem of fundamental importance in image processing.Edges can be regarded as discontinuities between image regions of rather uniform graylevel or color.Since detecting edges means detecting discontinuities, one can use derivative operators as the gradient or Laplacian.Derivative operators are commonly used as well for focus assessment in microscopy imaging (Osibote et al., 2010) and can be employed in image fusion methods (Stanciu, 2011).We have employed the Sobel edge detector (Gonzales and Woods, 2002) in the design of the automatic reference frame estimator.The Sobel operator uses a pair of 3x3 convolution masks S x & S y , with S x estimating the gradient in the x-direction (columns), while S y estimating the gradient in the y-direction (rows): With g x & g y being the gradients in x and y direction computed by convolution with S x , and S y , respectively, the magnitude of the gradient can be defined as: (4) As an estimate on the sharpness of contours (edges) contained in image f, the mean intensity of its gradient image g, namely μ g is used.
The three measures discussed above, μ f , σ f , and μ g are normalized in order to take values in [0,1].Thus, μ f and μ g are divided by L-1, the graylevel range, and σ f is divided by (L-1) 2 /12, i.e., by the standard deviation of a uniform random variable defined on [0,L-1].Finally, the quality measure for automated detection of the reference frame, q f is computed as the simple product: (5) After computing q f for all the images in the stack, the image that outputs the highest response to q f is selected as reference frame.Further on, its histogram is specified to the other images by using the exact histogram specification algorithm of Coltuc et al. (2006).This algorithm is presented in the next part.
Considering H={h(0), h(1),… h(L-1)} the histogram to be specified, the exact histogram specification proceeds as follows: 1.The image pixels are ordered in increasing order by using a special strict ordering relation; 2. The ordered string is split from left to right in groups of h(j) pixels; 3.For all the pixels in a group j the j th gray level is assigned, where j=0,…,L-1.
The definition of the strict order relation is the essential stage of histogram specification.Since image informational content should be preserved, the induced ordering must be consistent with the normal ordering.This means that, if a pixel graylevel is greater than another one with the normal ordering on integers set, it should be greater with the new ordering as well.The new ordering should refine the normal ordering on the set of integers, i.e., equal pixels according to the normal order will be differentiated by the induced ordering.Meantime, in order to avoid noise, the induced ordering should correspond, in a certain way, to the human perception of brightness.Coltuc et al. (2006) have transferred the problem of ordering on a scalar image to a Kdimensional space by associating a vector to each pixel.The image pixels are ordered by lexicographically ordering the vectors and inducing the same ordering among them.The approach considers a bank of K filters, Φ={φ1, φ2,…, φK} whose supports W i , i=1,…,K, are symmetric and obey an inclusion relation: . The support of φ1, W 1 , is one pixel size.The size of each Wi is kept to a minimum.Each filter extracts some local information about graylevels around the current pixel f(x,y).Furthermore, to each pixel f(x,y) is associated the K-tuple Φ(f)(x,y)={φ1(f)(x,y), φ2(f)(x,y),…, φK(f)(x,y)}.Finally, the new ordering between image pixels is defined by ordering in lexicographic order on the corresponding K-tuple set.A higher value for K is equivalent to a finer ordering.If K is large enough, for natural images a strict ordering is induced.Furthermore, it clearly appears that the inclusion among the filter supports orders the amount of information extracted by each filter.Thus, when i is small, the information extracted is strongly connected to the current pixel.As index i increases, support Wi increases as well and the weight of the current pixel decreases in the filter response.This is a reason for ranking pixels using the lexicographic order starting with the first index.In case of using moving average filters, it appears that an almost strict ordering is obtained for a rather small value of K, i.e., K=6.Other linear or nonlinear filters can be used as well (Gaussian filters, median, etc.).Wan and Shi (2007) applied the same idea of ordering, but on the coefficients of the non-decimated wavelet decomposition of the image.A discussion on exact histogram specification can be found also in Bevilacqua and Azzari (2007) while a solution for exact global histogram specification optimized for structural similarity is proposed by Avanki (2009).
In Fig. 6 we present a subset from the stack of images collected by CSLM on a sol-gel matrice sample doped with a photosensitizer (presented in Fig. 5, as well), in original aspect and in the aspect resulted after processing by using the algorithm described in this section.The reference histogram is computed by using the method proposed by Capek et al. (2006), taking into account the intensity information of the entire CLSM stack.As detailed in section 2, the first step in computing the normalized histogram involves remapping of intensities of individual CLSM frames so that they cover the same intensity range.The authors regard the resulted reference histogram as a global representation of intensity distribution of the entire volumetric image, without being targeted towards any specific cross section.As the authors experiment on biofilm samples, they consider this approach more appropriate than the one presented in Stanciu et al. (2010), because the proportions of biofilm and fluid may be different in the top and bottom CLSM cross sections that they experiment with.This situation can result in different aspect of the images in the stack depending on the fluid ratio corresponding to a particular optical section.
In the next step, the reference histogram is specified in its exact form to the images that make up the CLSM stack.The algorithm used for the exact histogram specification is the one used also by Stanciu et al. (2010), presented in section 3 of this chapter.The authors justify their choice as regardless of the difference in intensity representation of the materials in lower and upper CLSM cross sections, the pixels that are likely to represent the biofilm will be mapped to higher intensities and pixels corresponding to fluid will be mapped to lower intensities, thus preserving separability of intensity-based representation and enforcing stationarity (Semechko et al, 2011).
In the last step of this method, a diffusion filter is applied to the processed CLSM images in order to suppress any local overenhancement that may occur after the exact specification of the reference frame.In the same time, the diffusion filter can attenuate the noise the CSLM images may contain.The authors justify their choice to use diffusion filtering after the intensity attenuation stage and not before, as in the second case it will cause unequal noise filtering throughout the CLSM stack and will potentially blur structural boundaries in the cross sections most affected by intensity attenuation.With the diffusion being modulated by the magnitude of the intensity gradient (which is related to contrast and hence, to intensity attenuation) between the neighboring voxels, the amount of diffusion will be greater in the bottom cross sections than in the upper cross sections.The authors claim that the gradient magnitude at the biofilm and fluid interface is also likely to be smaller in comparison to the upper cross sections, due to the reduced contrast in the lower cross sections.This approach is meant to avoid changes of structural appearance, which could occur if the gradient magnitude is smaller than the contrast threshold parameter in the diffusion equation used in the nonlinear diffusion filter.
Considering Ω as the image domain and I(x,0): Ω → the original image.The filtered image, I(x,t), was obtained as a transient solution of the diffusion equation : In case of inhomogeneous isotropic diffusion, ∇ is a spatially dependent scalar quantity commonly referred to as diffusivity.The authors of this method chose to compute diffusivity using Tukey's biweight ( Black et al, 1998).The complete details of the algorithm presented in this section can be found in the original publication (Semechko et al, 2011)

Conclusions
In this chapter three recent methods for the compensation of intensity attenuation in CSLM imaging have been overviewed.The method based on histogram warping requires no interaction with the user and can be performed automatically, but the resulted image stack can be subject to contrast over enhancement.The method based on histogram specification that we have previously reported, can be performed either automatically, providing an algorithm that has the ability to automatically select the reference image is employed, or manually, assuming a human operator can nominate the image of best quality in the stack.
A very important feature offered by the exact histogram specification and equalization is that all the images in the processed sequence have normalized histograms.This can lead to very effective results in the case of segmentation tasks, as the algorithms for thresholding and segmentation are based on mixtures of Gaussian probability density functions and optimal coding schemes are expected to be obtained if the image within the processed stack will have similar histograms.In the case when all images in the stack are considerably affected by the light attenuation, the methods based on histogram warping will provide better results than the method relying on histogram specification.However, these two methods may provide a result which can be radically different in aspect than the initial aspect of the images due to the possible over-enhancement.In the case of the method based on the exact specification of the reference frame's histogram, the histogram of one of the images in the stack (noted throughout the chapter as the reference image) is specified onto the other images in order to preserve an aspect close to original one.The reference image can be determined automatically taking into consideration the brightness, the standard deviation and the sharpness of the contours (edges) contained in the image.The proposed algorithm can provide the premises for the fast processing of the image sequence.However, when choosing to use this method one must limit to image stacks which contain images that represent optical sections of the same object; otherwise the contrast of the resulted images will be influenced not only by the light attenuation but also by the morphological structure of the objects contained in the image.In this case it would be useless specifying the histogram of an image that represents one object of a certain shape onto another image depicting an object with a completely different shape.The results in that case would be quite unpredictable.The proposed method based on the exact specification of the reference frame's histogram improves the contrast of the image in the case when images of good contrast are present in the stack, and in the same time preserves the initial aspect of the images.When the image content is not uniform throughout the stack the methods based on histogram warping may be regarded as better alternatives.
The techniques presented in this chapter do not restorate any high frequency degradation and, in the same time, cannot compensate the drawbacks that are related to the pinhole size that was used during image acquisition.These methods are simply meant to enhance the visual appearance of collected images that have a deficient aspect due to intensity attenuation, and to assist in segmentation tasks.Besides enhancement, histogram specification yields image normalization in respect to the average gray level, energy, entropy, etc.
www.intechopen.comCompensating Light Intensity Attenuation in Confocal Scanning Laser Microscopy by Histogram Modeling Methods 191

Fig. 3 .
Fig. 3. Mapping of the maximal distances to a standard 256 levels grayscale.

Fig. 4 .
Fig. 4. Piece-wise linear interpolation of new intensity values based on landmark matching.

Fig. 5 .
Fig. 5. Subset from CSLM stack collected on sol-gel matrice sample a) in original aspect; b) in an aspect resulted after histogram warping to a normalized histogram .com Compensating Light Intensity Attenuation in Confocal Scanning Laser Microscopy by Histogram Modeling Methods 195

Fig. 6 .
Fig. 6.Subset from CSLM stack collected on sol-gel matrice sample a) in original aspect; b) in an aspect resulted after exact specification of the reference frame's histogram In Fig. 7, an example of how the histogram of an image is modified upon exact histogram specification and histogram warping is presented.The initial histograms of the 2 nd , 9 th , 14 th , 20 th images in the stack; the specified histogram, which is actually the histogram of the 9 th image in the stack; and the modality in which histogram warping influences the histogram shape in the case of a particular example (i.e., frame 20) are illustrated.Both the warping model histogram and the histogram resulted after histogram warping are presented.The provide only approximate results.