The Digital Microscope and Its Image Processing Utility

Many institutions, including high schools, own a large number of analog or ordinary microscopes. These microscopes are used to observe small objects. Unfortunately, object observations on the ordinary microscope require precision and visual acuity of the user. This paper discusses the development of a high-resolution digital microscope from an analog microscope, including the image processing utility, which allows the digital microscope users to capture, store and process the digital images of the object being observed. The proposed microscope is constructed from hardware components that can be easily found in Indonesia. The image processing software is capable of performing brightness adjustment, contrast enhancement, histogram equalization, scaling and cropping. The proposed digital microscope has a maximum magnification of 1600x, and image resolution can be varied from 320x240 pixels up to 2592x1944 pixels. The microscope was tested with various objects with a variety of magnification, and image processing was carried out on the image of the object. The results showed that the digital microscope and its image processing system were capable of enhancing the observed object and other operations in accordance with the user need. The digital microscope has eliminated the need for direct observation by human eye as with the traditional microscope.


Introduction
Microscope is an instrument to help observing very small objects due to its powerfull magnifying capability.Microscope can be used in science and education [1], evaluation of object's properties [2], medical domain [3], quality control [4], thin films investigation [5], and biomedical analysis [6].
Most microscopes used in Indonesia are non digital microscopes.The operation of an analog microscope requires the user to precisely determine the lens combination to get an appropriate level of magnification and focus settings for sharp and clear observation.This is not an easy task for the untrained user and low vision user.These microscopes are used in many ISSN: 1693-6930 TELKOMNIKA Vol. 9, No. 3, December 2011 : 565 -574 566 hospitals, health agencies and in educational institutions.These microscopes were acquired years ago before digital microscopes are in the market.
In order to enhance the value and the usefulness of an analog microscope, it is proposed to convert the analog microscope into a digital microscope.This is done by attaching an additional hardware to the existing manual microscope which also connects it to a computer.Computer software is written on a computer so that the microscope becomes a digital microscope.The software developed for the digital microscope is basically a digital image processing software.The software is capable of capturing image and carrying out basic image processing task.
The term digital image processing is normally used with respect to the transformation of images into digital forms and processes them using a digital computer.The digital image processing methods can be categorized into two basic categories: improving the quality of images as information for human interpretation, and image data processing for machine perception [7][8].Methods in the first category include digital image processing methods normally used for enhancing digital images.Methods in the second category include methods for image analysis and image recognition.The digital image analysis is associated with the description of the contents of the image [8].The digital image recognition is carried out by understanding the characteristics or features of the image.These features can be derived in the spatial domain or frequency domain [8].Spatial features include: color (such as mean, standard deviation, histogram), area, perimeter, compactness, circumference, edge (direction, strength and contours) [9][10] [11][12][13][14][15].A number of image enhancement methods in the frequency domain or in spatial domain have been studied, including contrast stretching [15] and fuzzy hyperbolization [16] [17].A comprehensive review of the image enhancement methods is reported in [18].
A number of digital microscopes have been developed and reported in literatures.Çatalyürek et. al.[19] developed a virtual microscope which enable person on a client computer to access images on the network's server.A portable digital microscope is developed and reported by .However, the resolution and magnification of this microscope is low.Anand et.al.[21] reported the development of a compact digital holographic microscope.An Integrated Auto-focusing System for Biomedical Digital Microscope is reported by Gang et.al.[22].In this paper, the development of a high resolution, high magnification digital microscope is reported.

The development of the digital microscope
The development of the digital microscope is carried out in two stages, the hardware and software system.The process is discussed in the following sections.

The digital microscope hardware
The hardware of the digital microscope consists of an analog microscope, a light source, a camera and the camera housing.The camera replaces the position of the user's eye.The image of the observed object is focused on the camera.The image of the observed object is continuously displayed on the user's computer screen.The user captures the image of the observed object by selecting the appropriate menu on the computer screen.Once the image is captured, it can be stored or process depending on the user need.
In this research, the analog biological microscope has been selected as the case study due to its widespread use, low cost and flexibility.The micsocope has a magnification range from 20x up to 1600x.In order to obtain the best digital camera to be embedded to the manual microscope, a number of digital cameras were evaluated.From the evaluation it was decided to use a Prolink digital camera.This camera supports image resolution of 320x240, 640x480, 800x600, 1024x768, 1280x1024, 1600x1200, 2000x1600, and 2592x1944 pixels.A camera housing was designed and made for the Prolink camera so that the camera can be mounted on the eyepiece tube of the analog microscope, see Figure 1a.The connection between the camera and the computer is through the USB port of the computer.To illuminate the observed object a LED is mounted under the microscope base.The illumination of the LED is adjustable to obtain the best illumination intensity.
The proposed digital microscope is designed to have two modes of operations, simple mode and normal mode.In the simple mode the digital microscope acts as a plug and play ISSN: 1693-6930 The Digital Microscope and Its Image Processing Utility (Sri Hartati) 567 device with default resolution setting.The user may capture image from the microscope by pressing a button mounted on the camera house.In this mode, the captured image is stored in a file and the image processing software will read the image captured by the microscope from the file.
In the normal mode, the support software needs to be installed.The support software enables user to set image resolution, capture image from the microscope through the software and performing digital image processing tasks on the captured image.The overall digital microscope developed in this research is shown in Figure 1b.The setup of the digital microscope is shown in Figure 1c.

The digital microscope software
The digital microscope software consists of camera driver and image processing software.The image processing methods developed for the digital microscope is limited to basic image processing methods and is organized in six units.The image processing units are viewer unit, brightness adjustment unit, image contrast enhancement unit, histogram equalization unit, image scaling unit and image cropping unit.
The image viewing unit was designed to continuously displaying the observed object and captures image from the microscope.The captured image may be kept in memory for further processing or stored in a file for later use.
The image brightness adjustment unit is intended to enhance the brightness of an image due to over or under exposure during the image acquisition.Under exposure image can be enhanced by increasing intensity values of each pixel of an image.Over exposure image, on the hand, can be enhanced by decreasing values of each pixel of an image.Image brightness adjustment can be carried out using gray scale transformation as in equation ( 1) where J o is the output image, J i is the input image, and C is the brightness adjustment constant.C is set to a positive value for increasing the brightness or set to a negative value to reduce the brightness of the image.For true color image, the image brightness modifications are carried out for each color element (R, G, B components for RGB image).The values for each color element can be different from the others.
The image contrast enhancement unit is intended to adjust the contrast of an image.The low contrast image is indicated by its narrow histogram.A high contrast image is indicated by its wide histogram.A number of contrast enhancement algorithms are available in the literature [7][8].Two contrast enhancement algorithms are implemented in this unit.One of the contrast enhancement algorithm selected in this research is where P is the gray scale value which is used as the center of contrast enhancement, and G is the contrast amplification coefficient.G is set to larger than 1 to enhance the contrast and set to smaller than 1 to reduce the contrast of the image.
The other contrast enhancement implemented in this research is histogram equalization [7].The histogram equalization implemented in this research was based on fuzzy histogram hyperbolization developed in our previous research [16].This algorithm modifies the membership values of gray levels by a logarithmic function to accommodate the nonlinear human brightness perception.
The image scaling unit is designed to enlarge or reduce image size.This process is carried out by applying scale parameters for the horizontal and vertical dimensions, i.e., S h and S v respectively.A scale value greater than 1 will enlarge the image and a scale value less than 1 will reduce the image size.If image aspect ratio is to be maintained, then S h and S v are set to equal values.There are two interpolation methods to calculate the result of the new pixel value, the nearest neighbor interpolation and the bilinear interpolation.In the nearest neighbor interpolation, the gray level value of the result is taken from the gray level value of the point closest to the coordinates of the calculated coordinates.In the bilinear interpolation method, the resulting pixel value is calculated from the four neighbors with a wighting scheme.In this research the weight is taken proporsional to the distance.The gray leval value is calculated by summing the weighted gray level neighbours as in equation ( 3) The image cropping unit was designed for cropping an image.Cropping is cutting one part of the image in order to obtain a smaller image.This operation is essentially a translation operation on the resulted image which shifts the image point coordinates.

Results and Analysis
In order to evaluate the usefulness of the proposed digital microscope, a series of test is conducted.The test was designed to cover all aspects of the digital microscope.

Simple mode testing
This test is to evaluate the performance of the digital microscope running in simple mode.In simple mode, or plug and play mode, the software utility is not installed.In this mode, the digital microscope appeared as a digital image/video source.The image was displayed on a black box in the middle of the screen continuously (live) as in Figure 2a.In this mode, the image resolution is 640x480 pixels.The microscope can be used to capture object observed under the microscope.Sample image, image of the Arachis hypogaea Caulis, captured using the digital microscope in simple mode is shown in Figure 2b.

Normal mode testing
This test is to evaluate the performance of the digital microscope running in normal mode.In normal mode, the software utility is installed.As in the simple mode, the image of the observed object is continuously displayed on the computer screen.Note that in the normal mode the image can be displayed with a resolution of 320x240, 640x480, 800x600, 1024x768, 1280x1024, 1600x1200, 2000x1600, or 2592x1944 pixels.

Camera quality testing
Figure 3 shows sample images taken for the camera quality testing.In the figures, the image resolution is set to 640x480 pixels.Figure 3 shows three sample objects at the magnification of 500 times.The figure shows that the objects images quality is excellent.The edges of the image are clear and sharp.

Testing on Effect of Image Magnification
The effect of microscope magnification level is evaluated in this test.A hibiscus species pollen preparate is selected for this test.In this test, the magnification level of the digital microscope is varied from 50x, 70x, 125x, 200x, 400x and 500x.The image resolution was set at 640x480 pixels.Figure 4 clearly shows that clear images are obtained at all level of magnifications.

Image processing unit testing
The first image processing test is to show the capability of the image processing for displaying the histogram of an image.Figure 5a shows the image of Arachis hypogaea Caulis PL and its histogram.Figure 5b shows the result of applying brightness adjustment of Figure 5a in the form of image and histogram.This test shows that the image processing software developed for the digital microscope is capable of adjusting image brightness.Figure 9 shows the result of scaling an image into half of its original size, which mwans that the scaling unit works properly.This is carried out by selecting a scaling factor of 0.5 in the scaling unit.The image scaling algorithm adopted in this research is the nearest neighbour binary interpolation method.Window on the right shows the results of scaling.
The cropping unit was designed and built to cut a part of an image.Image cutting may be required to select the region of interest or other reasons.An example of cropping operation is shown in Figure 10.The result of cropping image in Figure 10a is shown in Figure 10b.

Comparison of Digital Microscopes
Digital microscope is a proven inspection tool for research or product line.Most portable digital microscope device only have objective lens and CCD module and computer to construct whole system [20].Some digital microscope does not belong to portable inspecting tool while others do.DG-X, developed by Scalar in Japan [20], and ITRC-001 [23] are examples of portable digital microscopes.The DG-X microscope is based on all in one CCD module and 3.5 inch LCD panel [20].The comparison among DG-X, ITRC and our digital microscope is shown in Table 1.Table 1 shows that the optic performance of our microscope is far beyond the DG-X and ITRC-001.Our microscope and ITRC-001 have build-in dimmable illumination lamp while DG-X does not.However, our microscope is not as portable as the other two.

Figure 1 .
Figure 1.From left to right (a) Camera housing for the digital microscope, (b) The digital Microscope and (c) the setup of the digital microscope.

Figure 2 .Figure 3 .Figure 4 .
Figure 2. Digital microscope in simple mode.(a) Object image appears on the screen monitor, (b) Image of the Arachis hypogaea Caulis captured using the digital microscope in simple mode

Figure 5 .
Figure 5. (a) Arachis hypogaea Caulis PL and its histogram, (b) Arachis hypogaea Caulis PL and its histogram after the image brightness adjustment

Figure 7 .
Figure 7. (a) A too high contrast image, (b) results of contrast enhancement

Figure 8 .
Figure 8.(a) The original image, (b) result of histogram equalization

ISSNFigure 9 .
Figure 9.The original image and the result of scaling the image into half of its original size.

Figure 10 .
Figure 10.Cropping operation (a) input image, (b) result of cropping operation

Table 1 .
The comparison between ITRC-001, SCALAR DG-X and our microscope.