Image Processing in the Optical Microscopy: Decoding, Photometry Correction and Compression

— This article presents an application of the digital imaging in the reading of a slide in optical microscopy, by applying a photometric correction of images issued out of the microscope, an interpolation of images captured by a CDD sensor (decoding) and the implementation of a mosa-icking in order to obtain a virtual slide of big size. This study is particularly decisive in a context of telediagnosis applications in optical microscopy, using this type of sensor and manipulating images of large dimensions. We also pro-pose some solutions which improve the efficiency of the telediagnosis chain, and the quality of the visualized images.


I. INTERPOLATION AND DECODING
The microscope is equipped with a CCD sensor based camera. To acquire a coloured image, these sensors use a network of filters, introduced by BAYER in 1976 [1] [2].
The pixels partition of the camera issued image is given at figure 9.
This format is called 'BAYER' (see table 1). As we can see, the green channel is sampled on the half of the total number of the image pixels, but every one of the blue and the red channels occupies the quarter of the number of pixels. We denote this format by Y8.  FORMAT. In order to go from 'BAYER' format to 'RGB' format, the camera makes an interpolation to retrieve the two missing colours in every image pixel, (See Fig. 1 and Fig  3).
This problem is the object of several recent publications [3] [4].
To improve the efficiency of the telediagnosis chain, we will use the adjusted interpolation method of correlation of the linear interpolation version proposed in [5], which is fast and easy to implement (see table 2 and table  3).
The two colours R and B are linearly interpolated with the nearest neighbours of the same colour.
There are four possible cases: • When we are in a green pixel 'G' (See  (1) Crystallization effect.

II. LARGE SLIDE AND PHOTOMETRY DEFAULT:
The observation of the large field image, obtained by the mosaicking process which is used in the telediagnosis chain, shows a grid effect visible at the levels of join borders of the microscope issued images (see Fig.5). This effect is due to the inhomogeneous illumination of the slide scene. This technique consists on applying a linear transformation on the image of empty scene (See Fig. 6). This transformation is called « histogram stretching » (see Fig.6 and Fig.7).
Let g min and g max be the minimum and the maximum grey levels of the image pixels. The stretching consists on the application of a linear function f to the image grey levels, such that : f(g min ) = 0 and f(g max ) = 255.
We The illumination default, well visible now (see Fig. 7), introduces the grid effect on the final mosaicked image.

III. PHOTOMETRY CORRECTION:
To correct this default, we propose: • The application of an approximation of the illumination function on each image, each image to mosaick will be divided by this function (see Fig.7). • The point by point correction. (Divide each image on its shading image).
Nevertheless, the scene black marks which represent the dust on the camera objective are complex to model analytically. Then we have chosen to make a point per point correction: Figure 8. Original image to mosaic before and after shading correction (5) A redness appears at the image borders due to non homogenous illumination of the slide scene (6) Disappearance of the redness after photometry correction The shading correction can be applied on the camera issued images, this reduces the execution time of three times (division over one channel instead of three channels for colour images). Then, a decoding will be applied on the correction results in order to obtain the colour images.

IV. IMAGES MOSAICKING:
The images obtained by microscopy are naturally very local. It is though necessary to replace them in a more global context, which is generally done using a diminution of the magnification. The proposed project suggests to develop an alternative method which consists, on the contrary, to take several shifted images at a unique resolution. In order to obtain one image, you have to align all these images the most finely possible. Of course, this alignment has to be done automatically.

A. Determination of the joins borders :
After the photometric correction, the elementary images are readjusted: For two images we look for the superposition and the correspondence of each pixel of the recovering zone.
To obtain an image of large field, the fact to piece elementary images together creates artefacts due to the apparition of an artificial border at the level of the joins. That's why we are looking for an optimal join border, following certain criteria: • The join border must follow the common edges of the two images, so that the possible visible transition already exists and therefore be natural. • We must not create new contours in the mosaic.
• The residual geometric disparity must be minimal.
The correlation method is used to put in correspondence pixels in a recovering zone. The idea is to define a similarity measurement between the pixels of two images [6].
Looking for the correspondence between two images f and g is looking for maximum of the correlation coefficient C fg .
We obtain, then, a sequence of correlation values, and the pixel corresponding to the best score will be chosen as matching the pixel of the centre of the fixed window in the other image [7].
The correspondence per correlation is a very efficient method in the case where the couple of images presents regions allowing to ease the matching [8] [9].

B. Mosaicking of two images :
The microscope issued images whose recovering zone is 85% wide, meaning a recovering zone of 15% (see Fig.9) Making the mosaicking using the mosaicking package 'Panavue' [10][11] (see Fig. 10a ), then using the developed program (see Fig.10b), with a binary weighing of (0,1) and (1,0) of the photometry in the recovering zone, and finally a progressive weighing from 0 to1 always in the recovering zone, we note that the mosaicking time of two images by 'PANAVUE' takes 39 s whereas the mosaicking by the developed program is about only 13s. A. Transmission with progressive resolution: First bits are used to build a part of the picture, as one goes along that bits comes, the resolution (dimension) grows from a factor of two in each direction.
Example: the image has been compressed with three levels of resolution (see Fig. 11).  This amount to put only blocks from the sub-band LL2 in the Stream-code To obtain such a resolution we add to the sub-band LL2, sub-bands HL2, LH2, and HH2, every blocks code from these sub-bands must be included in the stream-code. Every block codes must figure in the streamcode. The grouping of contributions of block-codes in a same package shape a layer and match to a certain quality of a resolution level and of a component. The definition of several layers in a picture allows to rebuild it at different level of quality.
Low resolution, high quality.
Medium resolution, high quality.
High resolution, high quality i: is the block-code number. D: the distortion brang by each block-code. When a rate of compression is indicated as an argument of the codec, an intern heuristic determine a lower limit and spaced logarithmically rates of layers in the range.
Example: the original picture ( Fig. 11.a) was compressed with twenty layers. To reconstruct the picture in different levels of quality, simply we add each time a layer in a code-stream (See Fig. 13) Image with one layer ( layer1 ): 7.36% from the initial image Image with 5 layer ( layers 1,2..,5 ): 9,14% from the initial image Image with 15 layers ( layers 1,2..,15 ): 16,54% from the initial image

B. Progressivity by spatial Region (Spatial Location: Precinct)
With this type of progression, the image can be received as a database from left to right and from bottom to top.

C. Progressivity by Component:
JPEG2000 supports images with 6384 components, this type of progression control decoding order data corresponding to different component, with this type of progression, the image of grey level from a color image will be decoded at first followed by the color information.
JP2K norm defines at all five types of progression by combination of the above methods [12] 1) Layer-resolution-Component-Position Progression (LRCP) [13].
For each layer, for each resolution, for each component, for each position, include the data's packets.
This progression is mainly «by quality», packages of layer 0 appear in the code-stream for each resolution, component and precinct before the packages of layer1, the quality is getting better in the entire image at each index layer's increment.

2) Resolution-Layer-Component-Position Progression (RLCP)
For each resolution, for each layer, for each component, for each position, include the data's packets.
This progression in mainly «by resolution», packets of the resolution 0 appear in the code-stream in full quality, including all layers in each component and precinct, before the introduction of resolution 1. This progression in mainly «by resolution», the progression inside a data resolution and by position.

4) Position-Component-Resolution-Layer Progression (PCRL)
For each position, for each component, for each resolution, for each layer, include the data's packets.
This progression in mainly «by position», the codestream progresses from top to bottom of the image.

5) Component-Position-Resolution-Layer Progression (CPRL)
For each resolution, for each position, for each component, for each layer, include the data's packets.
This progression is mainly «by component», until all packets of component 0 above all packets of component 1 etc. These different modes are presented in the table IV. The decoding at the output of the camera allows to improve the efficiency of the telediagnosis chain and to correct the crystallization defaults.

Camera interpolation
Interpolation by linear correlation The implemented mosaicking allows us to optimize the computation time and to improve then the efficiency of the telediagnosis chain.
We remind that the photometry correction is very efficient when using the 'shading' images of each elementary image of the slide.

Before photometry correction
After photometry correction The Table 1 shows the evolution of display with different modes, progressivity in the LRCP mode shows an advantage over the other in this way we approach the quality of the final image faster than other types of progressivity.

VII. CONCLUSION:
In this article, we have solved the problem of the grid which appears in the mosaicked images.
We have discussed the different processings of the camera issued image before and after interpolation.
The 'Bayer' image processing is very competitive, allowing to reduce the computation time.
The shading correction can be applied on the camera issued images; this speeds up the execution time three times, (division over one channel instead of three channels in the coloured images).
After that, a decoding will be applied on the correction results to obtain the coloured images.
The mosaicking allows the reading of a big size and strong magnification slide in network, in the frame of a diagnosis protocol which develops, among others, a remote consultation system of a big size virtual slide for the medical diagnosis in haematology.
Finally we have study the mechanisms of progressivity offered by JPEG2000, the possibility to see the progressive display of an image and the virtual slide this standard.