JDAIP  Vol.4 No.1 , February 2016
Medical Image Enhancement Using Morphological Transformation
ABSTRACT
Medical imaging includes different modalities and processes to visualize the interior of human body for diagnostic and treatment purpose. However, one of the most common degradations in medical images is their poor contrast quality and noise. The existence of several objects and the close proximity of adjacent pixels values make the diagnostic process a daunting task. The idea of image enhancement techniques is to improve the quality of an image. In this study, morphological transform operation is carried out on medical images to enhance the contrast and quality. A disk shaped mask is used in Top-Hat and Bottom-Hat transform and this mask plays a vital role in the operation. Different types and sizes of medical images need different masks so that they can be successfully enhanced. The method shown in this study takes a mask of an arbitrary size and keeps changing its size until an optimum enhanced image is obtained from the transformation operation. The enhancement is achieved via an iterative exfoliation process. The results indicate that this method improves the contrast of medical images and can help with better diagnosis.

Received 26 December 2015; accepted 28 January 2016; published 2 February 2016

1. Introduction

The field of digital image processing refers to processing digital images by means of a digital computer. In image processing operations, both the input and the output are images. Medical Image Processing and its applications in Computer Assisted Diagnoses (CAD) and therapy (e.g. Computer Assisted Surgery―CAS) are of increasing importance in modern medicine. Medical Image Enhancement is the art of examining images for identifying objects and judging their significance.

Most of the medical images (X-ray, CT, and MRI) have very low contrast and the challenge is to sharpen them. The effort on medical image enhancement has been focused mostly to improving visual perception of images that are unclear because of blur. Edges are the representations of the discontinuities of image intensity functions. For processing these discontinuities in an image, a good edge enhancement technique is essential.

Medical images enhancement is an important work for object recognition of the human organs such as lungs and ribs, and it is an essential pre-processing step in medical image segmentation [1] [2] . The work of contrast enhancement decides the result of the final processed image. Conventionally, edge is detected according to some early brought forward algorithms like Sobel algorithm, Prewitt algorithm and Laplacian of Gaussian operator [3] , but in theory they belong to the high pass filtering, which are not fit for noise medical image edge detection because noise and edge belong to the scope of high frequency. In real world applications, medical images contain object boundaries and object shadows and noise. Therefore, they may be difficult to distinguish the exact edge from noise or trivial geometric features. Mathematical morphology is a new mathematical theory which can be used to process and analyze the images [4] - [7] . It provides an alternative approach to image processing based on shape concept.

Medical image enhancement technologies have attracted much attention since advanced medical equipments were put into use in the medical field. Enhanced medical images are desired by a surgeon to assist diagnosis and interpretation because medical image qualities are often deteriorated by noise and other data acquisition devices, illumination conditions, etc. Also targets of medical image enhancement are mainly to solve problems of low contrast and the high level noise of a medical image. Medical image enhancement technologies have attracted many studies [8] . The basic color space (RGB) conversion to other color spaces is important mainly concentrated on the edges enhancement of medical color image.

In the mathematical morphology theory, images are treated as sets, and morphological transformations which derived from Minkowski addition and subtraction are defined to extract features in images [9] . As the performance of classic edge detectors degrades with noise, morphological edge detector has been studied [10] . In this paper, a novel mathematical morphology edge detection algorithm is proposed based on using multi shape approach whose information at various shapes is integrated to detect medical image edge. MATLAB was used here as the image processing tool like other research article [11] .

2. Medical Image Enhancement

Medical imaging is the technique and process of creating visual representations of the interior of a body for clinical analysis and medical intervention. Medical imaging seeks to reveal internal structures hidden by the skin and bones. It also makes possible the identification of abnormalities.

Medical imaging encompasses different imaging modalities and processes to image the human body for diagnostic and treatment purposes and therefore plays an important role in initiatives to improve public health for all population groups. It is crucial at all major levels of health care. In public health and preventive medicine as well as in both curative and palliative care, effective decisions depend on correct diagnoses.

Image enhancement is a process principally focuses on processing an image in such a way that the processed image is more suitable than the original one for the specific application. The word “specific” has significance. It gives a clue that the results of such an operation are highly application dependent. In other words, an image enhancement technique that works well for X-ray topographic images may not work well for MR images.

Image enhancement approaches fall into two broad categories: spatial domain methods and frequency domain methods. The term spatial domain refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image. Frequency domain processing techniques are based on modifying the Fourier transform of an image. The process can be expressed as: g(x, y) = T[f (x, y)], where f(x, y) is the input image, g(x, y) is the processed image, and T is an operator on f defined over some neighborhood of (x, y). The principal approach in defining a neighborhood about a point (x, y) is to use a square or rectangular subimage area centered at (x, y). The center of the subimage is moved from pixel to pixel starting, say, at the top left corner. The operator T is applied at each location (x, y) to yield the output, g, at that location. The process utilizes only the pixels in the area of the image spanned by the neighborhood.

One method to enhance a medical image is wavelet transformation [12] . In this method, the high-frequency sub-images are decomposed using the Haar wavelet transform. Then, noise in the high-frequency sub-bands is reduced using soft-thresholding. Finally, the enhanced image is obtained using inverse wavelet transformation.

Another common method for medical image enhancement is histogram equalization [13] that enhances the contrast of image by increasing distribution of gray levels. This method does not necessarily obtain good results for all areas of an image because contrast enhancement may damage the image and the border areas. Because of this, there are different generalizations of this method to improve its performance [14] [15] . An algorithm for improving abdominal ultrasound images is proposed based on combination of histogram equalization and wavelet transformation in [16] . This algorithm improves edges and surroundings of abdominal walls and has real time performance in dynamic applications. Another method for medical image enhancement is Gamma correction [17] . In this method, Gamma values of individual pixels are locally optimized by minimizing the homogeneity of co-occurrence matrix of the original image. The Gamma correction method enhances dynamic range and improves the image.

Morphological filters [18] are used for sharpening medical images. In this method, after locating edges by gradient-based operators, a class of morphological filter is applied to sharpen the existing edges. In fact, morphology operators, through increasing and decreasing colors in different parts of an image, have an important role in processing and detecting various existing objects in the image. Locating edges in an image using morphology gradient is an example that has comparable performance with that of classic edge-detectors such as Canny and Sobel [19] .

3. Morphological Transform

Methods of mathematical morphology act based on the structural properties of objects. These methods use mathematical principles and relationships between categories to extract the components of an image, which are useful in describing the shape of zones. Morphological operators are nonlinear, and two sets of data are their input. The first set contains the original image and the second one describes the structural element (mask). The original image is binary or in gray level and the mask is a matrix containing zero and one values.

It is after applying the final image to the morphological operators that a new value for each pixel is obtained through sliding the mask on the original image. Value 1 in each mask indicates effectiveness and value 0 indicates ineffectiveness in the final image. Different formats can be selected to form a mask. Figure 1 shows a disk-shaped mask with radius of 4 (9 * 9 matrix).

3.1. Morphological Operators

If A (x, y) and B (u, v) describe the gray-level image matrix and the structural element matrix respectively, erosion and dilation operators are defined as (1) and (2):

(1)

(2)

The erosion operator reduces the size of objects. This operator increases the size of holes in an image and removes very small details of that image. Removing bright areas under the mask makes the final image looks darker than the original image. The dilation operator acts in reverse; in other words, it increases and decreases the size of objects and holes in the image respectively. The opening operator is equivalent to the application of

Figure 1. Disk-shaped structural element (mask) with radius of 4.

the erosion and dilation operations on the same image respectively (Equation (3)) while the closing operator acts in reverse (Equation (4)):

(3)

(4)

The opening operator removes weak connections between objects and small details while the closing operator removes small holes and fills cracks.

3.2. Selecting a Proper Mask

Selecting a mask in proper shape and size to take morphological actions has a key role in achieving desired results and reducing calculation time. In general, the shape and size of a mask are arbitrarily selected; however, the selected mask should be in appropriate shape and size for various diagnosis purposes. Disk-shaped masks (Figure 1) are more commonly used for medical images than other masks. As stated before, since disk-shaped masks are independent of changes in rotation, they are chosen for medical images. Since big or small masks strengthen or weaken various parts of an image, it is impossible to gather detailed information on the contrast of different images using only one structural element. This is why one mask in a particular shape and size may not appropriate for other applications [9] . In the proposed method, the change in shape and size of the mask continues until an appropriate result obtained. It should be mentioned that past experiences have key roles in selecting proper masks to take morphological actions.

3.3. Top-Hat Transforms

These transforms are used to enhance the contrast of images through morphological methods and are in two general types: Top-Hat transform is obtained by subtracting the opening of the original image from the image itself (Equation (5)) and Bottom-Hat transform is obtained through subtracting the original image from its closing (Equation (6)) [20] :

(5)

(6)

Top-Hat and Bottom-Hat transforms are generally known as Open Top-Hat or White Top-Hat and Close Top- Hat or Black Top-Hat respectively. In many papers, Top-Hat is used to refer to both kinds of hat transforms. These transforms are named Top-Hat after Cylinder Hat shown in Figure 2. Figure 2(a) shows an image of the cross- section of the transform and Figure 2(b) describes defined parameters. In this figure, h indicates the difference in contrast and acts as a threshold, and d0 and di determine radius of the circles [21] .

According to Equation (5), since the opening operator leaves a background of the image, it is expected that Top- Hat transform removes the image background. This transform acts like a high-pass filter and extracts the bright areas of the image (with contrast not less than h) which are smaller than the mask. Bottom-Hat transform also removes the background of the image and leaves some dark areas of the image which are smaller than the mask

(a) (b)

Figure 2. General idea in Top-Hat transform. (a): Cross-section of the transform; (b): Parameters of the transform.

itself [22] . It is possible to add the bright areas (the results of the opening operator) to the image and subtract the dark areas (the results of the closing operator) from it. As a result, there will be an enhancement in the contrast between bright and dark areas:

(7)

4. Methodology

In the research Morphological Transform was implementing in MATLAB. At first we read the original image and calculate its CNR. We will require this CNR value to compare in the next steps.

In the next step, we set an arbitrary structural element. We transform the original image and calculate CNR and PSNR values and store them. We compare this CNR value with the original image CNR value and if latter is larger we increase the size of structural element. Then we transform and calculate CNR and PSNR again and compare the current CNR value with the previous one. If the current value is larger we increase the size of structural element again. This goes on like a loop until we reach a point where the last CNR value is smaller than the previous one. We then set a structural element that is smaller than the last one and also set new end value and step of the loop to find out the structural element for whom the image has largest CNR value, meaning the image enhancement is optimum. The value we get at last is the size of our structural element for whom the original image is getting enhanced most. The number of steps and time taken to complete the operation is dependent on a few factors like size of the image, image source, initial condition, amount of noise etc. Figure 3 shows the flowchart of the whole process.

5. Results and Discussion

From Figure 4(a) and Figure 4(b) we can see that optimum enhanced image is much clearer than the original image. This enhancement in contrast is the result of morphological transform carried out on the original image. We tried several masks and mask with a radius of 46 yielded the best result in this scenario. From Figure 4(c) and Figure 4(d) we can see that these have enhanced contrast than the original image but none of them are optimum. Optimum enhanced image is clearer than both of them. Also, image enhanced with mask radius 70 has more darker spots along the edges although it worked better than mask with radius 30.

From Figure 5 we can see that optimum enhanced image has more uniform intensity distribution than other images. It has its darker pixels optimized and distributed over the whole image as a result of morphological transform carried out on the original image. We also see that mask with a radius of 46 provided best results. Figure 6 represents the CNR values at different sizes of the structuring element. The highest CNR value is achieved when the structuring element has a radius of 46.

Figure 7 demonstrated IVU bilateral elongated nephrograms with minimal irregularity of the renal outline. There is complete bilateral duplication of the renal collecting system to include duplication of the renal pelvis and uterus. The bilaterally duplicated uterus independently enters the bladder, and thus 4 UVJs are demonstrated. A small ureterocele of the right lower pole uterus is demonstrated at the confluence with the bladder. From above two images we can see that optimum enhanced image is much clearer than the original image. This enhancement in contrast is the result of morphological transform carried out on the original image. We tried several masks and mask with a radius of 16 worked best for this particular image.

From Figure 7(c) and Figure 7(d) we can see that both images are clearer than the original and transformed image-2 shows better contrast than Transformed image-1 but has started growing darker pixels and hence it is not accepted as the final image. The morphological transform carried out on the original image increased the overall contrast and in the way also created some dark pixels which made portions of the second image opaque and hard to determine the actual structure.

From Figure 8 we can see that optimum enhanced image has uniform intensity distribution than other images. It has its darker pixels optimized and distributed over the whole image as a result of morphological transform carried out on the original image. We also see that mask with a radius of 46 provided best results. There are less number of peaks indicating that overall contrast is increased (Table 1).

We can see from Figure 9 that all three transformed images are clearer than the original but only one of them is optimum. Other two images have either less contrast than the optimum image or increased amount of dark

Figure 3. Flowchart.

(a) (b) (c) (d)

Figure 4. (a) Original image. This is an X-ray image of chest, abdomen and lower abdomen. Size = 2043 pixel by 2494 pixel CNR = 8.0996; (b) Optimum enhanced image where we used a structural element of radius 46. CNR = 16.2359, PSNR = 23.6968; (c) Transformed image-1. This image is not optimally enhanced. The structural element radius = 30, CNR = 15.5699, PSNR = 26.1075 and (d) Transformed image-2. This image is not optimally enhanced either when structural element radius = 70, CNR = 16.1918, PSNR = 22.6215.

(a) (b)(c) (d)

Figure 5. (a) Original image histogram; (b) Optimum enhanced image histogram. Structural element size = 46; (c) Transformed image-1 histogram. Structural element size = 30 and (d) Transformed image-2 histogram. Structural element size = 70.

(a) (b)

Figure 6. (a) CNR values at different sizes of the structuring element; (b) Highest CNR value is achieved when the structuring element has a radius of 46.

(a) (b) (c) (d)

Figure 7. (a) Original image (X-ray of renal system). Size = 800 pixel by 1089 pixel CNR = 47.8057; (b) Optimum enhanced image. This image is optimally enhanced when we used a structural element of radius 16 CNR = 51.2314, PSNR = 28.7180; (c) Transformed image-1. This image is not optimally enhanced. We used a structural element of radius 30. CNR = 48.3217, PSNR = 25.2594 and (d) Transformed image-2. This image is not optimally enhanced. Here structural element radius = 8, CNR = 48.5589, PSNR = 32.2399.

(a) (b)(c) (d)

Figure 8. (a) Original image histogram; (c) Transformed image-1 histogram. Structural element size = 30; (b) Optimum enhanced image histogram. Structural element size = 16; (d) Transformed image-2 histogram. Structural element size = 8.

Table 1. Showing CNR and PSNR values after transforming the image with various sized structural elements.

spots which make it harder to see the internal structure. This enhancement in contrast is the result of morphological transform carried out on the original image. We tried several masks and mask with a radius of 36 worked best.

From Figure 10 we can see that optimum enhanced image has uniform intensity distribution than other images. It has fewer amounts of dark pixels and increased number of bright pixels. This enhancement in contrast is the result of morphological transform carried out on the original image. We tried several masks and mask with a radius of 36 yielded the best result (Table 2).

From Figure 11 we can see that all three processed images better contrast than the original image but optimum enhanced image has its edges preserved which is important. Transformed image-2 is also enhanced but it has dark pixels along the edges of the left ear which has blurred its edge (Table 3 and Table 4).

From Figure 12 we can see that optimum enhanced image has uniform intensity distribution than other images. It has its darker pixels optimized and distributed over the whole image as a result of morphological transform carried out on the original image. There is less number of peaks indicating that overall contrast is increased. We tried several masks and mask with a radius of 154 worked best in this scenario.

(a) (b) (c) (d)

Figure 9. (a) Original image (MRI image of brain) showing Langerhans cell histiocytosis. Size = 512 pixel by 512 pixel CNR = 57.391; (b) Optimum enhanced image. This image is optimally enhanced. Structural element radius = 36, CNR = 79.232, PSNR = 25.5522; (c) Transformed image-1. This image is not optimally enhanced. Structural element radius = 10, CNR = 76.9586, PSNR = 28.6038 and (d) Transformed image-2. This image is not optimally enhanced. Structural element radius = 70, CNR = 77.555, PSNR = 23.6408.

(a) (b)(c) (d)

Figure 10. (a) Original image histogram; (b) Optimum enhanced image histogram. Structural element size = 36; (c) Transformed image-1 histogram. Structural element size = 10 and (d) Transformed image-2 histogram. Structural element size = 70.

(a) (b) (c) (d)

Figure 11. (a) Original image (X-ray) showing Langerhans cell histiocytosis. The bones are well-mineralized. No radiographic evidence of rickets is seen. No classic metaphyseal lesion is seen. Size = 1566 pixel by 1602 pixel CNR = 20.4178; (b) Optimum enhanced image. This image is optimally enhanced. Structural element radius = 154, CNR = 41.2622, PSNR = 20.0363; (c) Transformed image-1. This image is not optimally enhanced. Structural element radius = 120, CNR = 41.1028, PSNR = 21.0572 and (d)-Transformed image-2. This image is not optimally enhanced. Structural element radius = 190, CNR = 41.056, PSNR = 18.5121.

(a) (b)(c) (d)

Figure 12. (a) Original image histogram; (b) Optimum enhanced image histogram. Structural element size = 154; (c) Transformed image-1 histogram. Structural element size = 120 and (d) Transformed image-2 histogram. Structural element size = 190.

Table 2. Showing CNR and PSNR values after transforming the image with various sized structural elements.

Table 3. CNR and PSNR values after transforming the image with various sized structural elements (10 to 100).

Table 4. CNR and PSNR values after transforming the image with various sized structural elements (110 to 170).

6. Conclusion

We observed the application of morphological transform in image manipulation. Contrast of various medical images can be enhanced using this method. We implemented this technique using Image Processing Toolbox in MATLAB. The processed images are created by adding the Top-Hat transformation of the original image to the original image and then subtracting the Bottom-Hat transformation from it. For both these transforms, we used a structural element of arbitrary size at first and then increased it stepwise to achieve a value that gave optimum contrast enhancement for the image that we were working with. We also calculated contrast-to-noise ratio to compare two processed images. The newly created images show better contrast as we see than the original images. This is due to the morphological operations carried out on the pixels. This technique can be used to enhance various medical images that can help medical practitioners with better diagnosis and treatment which are invaluable to improve public health.

Acknowledgements

We would like to thank all concerned with the APECE department for their all-out effort to support us for completing this research.

Cite this paper
Firoz, R., Ali, M.S., Khan, M.N.U., Hossain, M.K., Islam, M.K. and Shahinuzzaman, M. (2016) Medical Image Enhancement Using Morphological Transformation. Journal of Data Analysis and Information Processing, 4, 1-12. doi: 10.4236/jdaip.2016.41001.
References
[1]   Rajab, M.I., Woolfson, M.S. and Morgan, S.P. (2004) Application of Region-Based Segmentation and Neural Network Edge Detection in Lesions. Computerized Medical Imaging and Graphics, 28, 61-68.
http://dx.doi.org/10.1016/S0895-6111(03)00054-5

[2]   Tang, H., Wu, E.X., Ma, Q.Y., Gallagher, D., Perera, G.M. and Zhuang, T. (2000) MRI Brain Image Segmentation by Multi-Resolution Edge Detection and Region Selection. Computerized Medical Imaging and Graphics, 24, 349-357. http://dx.doi.org/10.1016/S0895-6111(00)00037-9

[3]   Huertas, A. and Medioni, G. (1986) Detection of Intensity Changes with Sub Pixel Accuracy Using Laplacian-Gaussian Masks. IEEE Transaction on Pattern Analysis and Machine Intelligence, 8, 651-664.

[4]   Maragos, P. (1996) Differential Morphology and Image Processing. IEEE Transactions on Image Processing, 5, 922- 937.

[5]   Ortiz, F. and Torres, F. (2004) Vectorial Morphological Reconstruction for Brightness Elimination in Colour Images. Real-Time Imaging, 10, 379-387. http://dx.doi.org/10.1016/j.rti.2004.10.002

[6]   Jing X.-J., Yu, N. and Shang, Y. (2004) Image Filtering Based on Mathematical Morphology and Visual Perception Principle. Chinese Journal of Electronics, 13, 612-616.

[7]   Richard, A.P. (1995) A New Algorithm for Image Noise Reduction Using Mathematical Morphology. IEEE Transaction on Image Processing, 4, 554-568.

[8]   Mallat, S.G. (1989) Multifrequency Channel Decompositions of Image and Wavelet Models. IEEE Transactions on Acoustics Speech and Signal Processing, 37, 2091-2110.

[9]   Serra, J. (1982) Image Analysis and Mathematical Morphology. Academic Press, New York.

[10]   Lee, J.S.J., Haralick, R.M. and Shapiro, L.G. (1987) Morphological Edge Detection. IEEE Robotics & Automation Magazine, 3, 142-156.

[11]   Rahman, M.A., Alam, M.M., Hossain, M.K., Islam, M.K., Uddin, K.M.N. and Shahinuzzaman, M. (2016) Performance Evaluation of a DS-CDMA System in a Rayleigh Fading Environment. World Journal of Engineering and Technology, 4, 1-9. http://dx.doi.org/10.4236/wjet.2016.41001

[12]   Yang, Y., Su, Z. and Sun, L. (2010) Medical Image Enhancement Algorithm Based on Wavelet Transform. IEEE Electronics Letters, 46, 120-121.

[13]   Moore, C.J. (1986) Medical Image Processing: The Characterization of Display Changes Using Histogram Entropy. Image and Vision Computing, 4, 197-202. http://dx.doi.org/10.1016/0262-8856(86)90046-6

[14]   Qian, W., Liya, C. and Dinggang, S. (2008) Fast Histogram Equalization for Medical Image Enhancement. Proceedings of the 30th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Vancouver, Canada, 20-25 August 2008, 2217-2220.

[15]   Sengee, N., Bazarragchaa, B., Tae Yun, K. and Heung Kook, C. (2009) Weight Clustering Histogram Equalization for Medical Image Enhancement. Proceedings of the IEEE International Conference on Communications Workshops, Honolulu, Hawaii, USA, 14-18 June 2009, 1-5.

[16]   Fu, J.C., Lien, H.C. and Wong, S.T.C. (2000) Wavelet Based Histogram Equalization Enhancement of Gastric Sonogram Images. Computerized Medical Imaging and Graphics, 24, 59-68.
http://dx.doi.org/10.1016/S0895-6111(00)00007-0

[17]   Asadi Amiri, S. and Hassanpour H. (2012) A Preprocessing Approach for Image Analysis Using Gamma Correction. International Journal of Computer Applications, 38, 38-46.

[18]   Mahmoud, T.A. and Marshall, S. (2008) Medical Image Enhancement Using Threshold Decomposition Driven Adaptive Morphological Filter. Proceedings of the 16th European Signal Processing Conference, Lausanne, Switzerland, 25-29 August 2008, 1-5.

[19]   Chen, T., Wu, Q.H., Rahmani-Torkaman, R. and Hughes, J. (2002) A Pseudo Top-Hat Mathematical Morphological Approach to Edge Detection in Dark Regions. Pattern Recognition, 35, 199-210.
http://dx.doi.org/10.1016/S0031-3203(01)00024-3

[20]   Bai, X.Z. and Zhou, F.G. (2010) Multi Structuring Element Top-Hat Transform to Detect Linear Features. 10th International Conference on Signal Processing, 2010, 877-880.

[21]   Jackway, P.T. (2000) Improved Morphological Top-Hat. Electron Lett, 36, 1194-1195.

[22]   Bai, X., Zhou, F. and Xue, B. (2012) Image Enhancement Using Multi Scale Image Features Extracted by Top-Hat Transform. Optics & Laser Technology, 44, 328-336.

 
 
Top