ENHANCING IMAGE CONTRAST OF
MAMMOGRAM & EQUALIZATION OF
HISTOGRAMS
TRIPTY SINGH
Department of Information Science and Engg,MVJCE,Bangalore [email protected]
M.NAGRAJA
Department of Medical Electronics MVJCE,Bangalore [email protected]
DR. SWARNALATA RAO
Professor ,PG-CSE,MVJCE Bangalore Chairperson, Div. V (E&R), Computer Society of India.
DR MAHUA BHATTACHARYA
Professor ,ABV-IIITM Gwalior [email protected]
SANTOSH BOMMANALLI
Department of Information Science and Engg,MVJCE,Bangalore [email protected]
Abstract:
An intelligent Image Processing Technique employed in an system can be very helpful for radiologist in detecting and diagnosing micro calcifications’ patterns earlier and faster than typical screening programs. In this paper, we present a system based on fuzzy-C Means clustering and feature extraction techniques using texture based segmentation and genetic algorithm for detecting and diagnosing micro calcifications’ patterns in digital mammograms. We have investigated and analyzed a number of feature extraction techniques and found that a combination of three features, such as entropy, standard deviation, and number of pixels, is the best combination to distinguish a benign micro calcification pattern from one that is malignant. By contrast enhancement and analyzing its corresponding histograms we conclude that theses techniques will surely be an aid to radiologist for diagnosing of breast cancer at an early stage. The results showed that the genetic algorithm described in the present study was able to produce accurate results in the classification of breast cancer data and the classification rule identified was more acceptable and comprehensible.
Keywords: Histogram, Mammograms, Contrast Enhancement. Intensity level, Decorrelation Stretching
1. Introduction
earliest possible stage. With an alarming increase in the rate of deaths every year, there is an obvious cause for concern.
The steps that have to be taken to control breast cancer are (i) Prevention,
(ii) Detection and (iii) Treatment
Prevention seems to be the most difficult line of defense. Moreover, the cause of the disease is not yet clearly understood. Considerable improvements in treatment have been observed. Even then, treatment is effective only when the disease is detected in its early phase. Therefore, the most sensible line of action to undertake would be in detection
II HISTOGRAM equalization (HE) is a very popular technique for enhancing the contrast of an image [1]. Its basic idea lies on mapping the gray levels based on the probability distribution of the input gray levels. It flattens and stretches the dynamics range of the image's histogram and resulting in overall contrast improvement. HE has been applied in various fields such as medical image processing and radar image processing [2].
Nevertheless, HE is not commonly used in consumer electronics such as TV because it may significantly change the brightness of an input image and cause undesirable artifacts. In theory, it can be shown that the mean brightness of the histogram-equalized image is always the middle gray level regardless of the input mean. This is not a desirable property in some applications where brightness preservation is necessary.
1. Histogram Equalization
This section covers the details regarding HE and BBHE as well as their mathematical analysis in brightness preservation. It is basically a reprint of [2] and [4]
1.1.Typical Histogram Equalization
For a given image X, the probability density function p(Xk) is defined as
n n X p
k
k)
(
(1)
For k = 0, 1, …, L – 1, where nk represents the number of times that the level Xk appears in the input image X
and n is the total number of samples in the input image. Note that p(Xk) is associated with the histogram of the input image which represents the number of pixels that have a specific intensity Xk. In fact, a plot of nk vs. Xk is known histogram of X. Based on the probability density function, the cumulative density function is defined as
k j j X p x c 0 ) ( ) ( (2)where Xk = x, for k = 0, 1, …, L – 1. Note that c(XL-1) = 1 by definition. HE is a scheme that maps the input image into the entire dynamic range, (X0, XL-1), by using the cumulative density function as a transform function. Let’s define a transform function f(x) based on the cumulative density function as
) ( ) (
)
(x X0 X 1 X0 cx
f L
(3)
Then the output image of the HE, Y = {Y(i, j)}, can be expressed as
The high performance of the HE in enhancing the contrast of an image as a consequence of the dynamic range expansion, Besides, HE also flattens a histogram. Base on information theory, entropy of message source will get the maximum value when the message has uniform distribution property [3].
As addressed previously, HE can introduce a significant change in brightness of an image, which hesitates the direct application of HE scheme in consumer electronics. For instance, Fig. 5(a) and Fig. 5(c) shows an original image arctic hare and the resultant image of the HE that are composed of 256 gray levels. Observe that here the equalized image is much darker than the input image. Observe also the unnatural enhancement in most part of the image. This is a direct consequence of the excessive change in brightness by HE when image has a high density over high gray levels. Note that the HE maps its input gray to a gray level, which is proportional to cumulative density up to the input gray level regardless of the input gray level. Fig. 4(a) is a given original image girl and the fig. 4(c) is the result of HE. Observe the annoying artifacts in the background and also the decrease in contrast of the hair and unnatural enhancement of the face and the cloth. The fundamental reason behind such limitation of the HE is that HE does not take the mean brightness of an image into account.
III Methodology and Material
In this paper we have used MATLAB version 7.10. In this paper we introduce some basic image processing concepts. We start by reading an image into the MATLAB workspace. We perform some contrast adjustment on the image. Finally, the writing the adjusted image to a file.
Step 1: Read and Display an Image
To read an image, use the imread command. The example reads one of the sample images included with the toolbox, image.bmp, and stores it in an array named I. I = imread('pout.tif');imread infers from the file that the graphics file format is BMP. For the list of supported graphics file formats, see the imread function reference documentation. Now display the image. The toolbox includes two image display functions: imshow
and imtool. imshow is the toolbox's fundamental image display function. imtool starts the Image Tool
which presents an integrated environment for displaying images and performing some common image processing tasks. The Image Tool provides all the image display capabilities of imshow but also provides access to several other tools for navigating and exploring images, such as scroll bars, the Pixel Region tool, Image Information tool, and the Contrast Adjustment tool. For more information, see Displaying and Exploring Images. You can use either function to display an image. This example uses imshow.
Step 2: Check How the Image Appears in the Workspace
To see how theimread function stores the image data in the workspace, check the Workspace browser in the MATLAB desktop. The Workspace browser displays information about all the variables you create during a MATLAB session. The imread function returned the image data in the variable I, which is a 291-by-240 element array of uint8 data. MATLAB can store images as uint8, uint16, or double arrays.
0 1000 2000 3000 4000 5000 6000 7000
Step 3: Improve Image Contrast
I= Image.bmp is a somewhat low contrast image. To see the distribution of intensities in Image.bmp, you can create a histogram by calling the imhist function. (Precede the call to imhist with the figure command so that the histogram does not overwrite the display of the image I in the current figure window.) figure, imhist(I)display the new equalized image, I2, in a new figure window. Figure, imshow(I2) We call imhist again to create a histogram of the equalized image I2. If we compare the two histograms, the histogram of I2 is more spread out than the histogram of I1.figure, imhist(I2).
0 200 400 600 800 1000 1200 1400
0 50 100 150 200 250
Step 4: Write the Image to a Disk File
To write the newly adjusted image I2 to a disk file, use the imwrite function. If we include the filename extension '.bmp', the imwrite function writes the image to a file in .bmp format, but you can specify other formats. imwrite (I2, 'I2.bmp');See the imwrite function reference page for a list of file formats it supports. See also Writing Image Data to a File for more information about writing image data to files.
0 500 1000 1500 2000 2500
0 50 100 150 200 250
Step 5: Check the Contents of the Newly Written File
To see what imwrite wrote to the disk file, use theimfinfo function. imfinfo('I2.bmp)
Step 6 Understanding Intensity Adjustment
0 1000 2000 3000 4000 5000 6000
0 50 100 150 200 250
Step 7 Adjusting Intensity Values to a Specified Range
We can adjust the intensity values in an image using the imadjust function, where you specify the range of intensity values in the output image.For example, this code increases the contrast in a low-contrast grayscale image by remapping the data values to fill the entire intensity range [0, 255].
I = imread('image.bmp'); J = imadjust(I);
imshow(J) figure, imhist(J,64)
This figure displays the adjusted image and its histogram. Notice the increased contrast in the image, and that the histogram now fills the entire range.For example, you can decrease the contrast of an image by narrowing the range of the data. In the example below, the man's coat is too dark to reveal any detail. imadjust maps the range [0,51] in the uint8 input image to [128,255] in the output image. This brightens the image considerably, and also widens the dynamic range of the dark portions of the original image, making it much easier to see the details in the coat. Note, however, that because all values above 51 in the original image are mapped to 255 (white) in the adjusted image, the adjusted image appears washed out.
I = imread('Image.bmp'); J = imadjust(I,[0 0.2],[0.5 1]); imshow(I)
figure, imshow(J)
0 2000 4000 6000 8000 10000 12000 14000
0 50 100 150 200 250
Step 8 :Setting the Adjustment Limits Automatically
To use imadjust, you must typically perform two steps:
2. Specify these limits as a fraction between 0.0 and 1.0 so that you can pass them to imadjust in the [low_in high_in] vector.
For a more convenient way to specify these limits, use the stretchlimfunction. (The imadjustfunction uses stretchlim for its simplest syntax, imadjust(I).)This function calculates the histogram of the image and determines the adjustment limits automatically. The stretchlim function returns these values as fractions in a vector that you can pass as the [low_in high_in] argument to imadjust; for example:
I = imread('Image.bmp'); J = imadjust(I,stretchlim(I),[0 1]);
By default, stretchlim uses the intensity values that represent the bottom 1% (0.01) and the top 1% (0.99) of the range as the adjustment limits. By trimming the extremes at both ends of the intensity range, stretchlim makes more room in the adjusted dynamic range for the remaining intensities. But you can specify other range limits as an argument to stretchlim.
0 500 1000 1500 2000 2500
0 50 100 150 200 250
Step 9 Gamma Correction
imadjust maps low to bottom, and high to top. By default, the values between low and high are mapped linearly to values between bottom and top. For example, the value halfway between low and high corresponds to the value halfway between bottom and top.
imadjust can accept an additional argument that specifies the gamma correction factor. Depending on the value of gamma, the mapping between values in the input and output images might be nonlinear. For example, the value halfway between low and high might map to a value either greater than or less than the value halfway between bottom and top.
Gamma can be any value between 0 and infinity. If gamma is 1 (the default), the mapping is linear. If gamma is less than 1, the mapping is weighted toward higher (brighter) output values. If gamma is greater than 1, the mapping is weighted toward lower (darker) output values.
The figure below illustrates this relationship. The three transformation curves show how values are mapped when gamma is less than, equal to, and greater than 1. (In each graph, the x-axis represents the intensity values in the input image, and the y-axis represents the intensity values in the output image.)
The example below illustrates gamma correction. Notice that in the call to imadjust, the data ranges of the input and output images are specified as empty matrices. When you specify an empty matrix, imadjust uses the default range of [0,1]. In the example, both ranges are left empty; this means that gamma correction is applied without any other adjustment of the data.
0 200 400 600 800 1000 1200 1400 1600
0 50 100 150 200 250
Step 10 Enhancing Color Separation Using Decorrelation Stretching
Decorrelation stretching enhances the color separation of an image with significant band-band correlation. The exaggerated colors improve visual interpretation and make feature discrimination easier. You apply decorrelation stretching with the decorrstretch function. The number of color bands, NBANDS, in the image is usually three. But you can apply decorrelation stretching regardless of the number of color bands.
The original color values of the image are mapped to a new set of color values with a wider range. The color intensities of each pixel are transformed into the color eigenspace of the NBANDS-by-NBANDS covariance or correlation matrix, stretched to equalize the band variances, then transformed back to the original color bands.
To define the bandwise statistics, you can use the entire original image or, with the subset option, any selected subset of it.
0 200 400 600 800 1000 1200
0 50 100 150 200 250
IV Plot Showing Three Different Gamma Correction Settings
We use the surf command to create a surface display of the background (the background approximation created in Step 2). The surf command creates colored parametric surfaces that enable you to view
mathematical functions over a rectangular region. However, the surf function requires data of class double, so you first need to convert background using the double command:
figure, surf(double(background(1:8:end,1:8:end))),zlim([0 255]); set(gca,'ydir','reverse');
0 10
20 30
40 0
20 40
60 0
50 100 150 200 250
V Conclusion
This paper, a new contrast enhancement algorithm referred as the enhancing contrast and Histogram equalization algorithm .Equalization with better brightness preservation is proposed. The algorithm is a novel extension of HE. The main idea lies on separating the histogram using the threshold level that would yield minimum Absolute Mean Brightness level. The ultimate goal behind the algorithm is to allows maximum level of brightness preservation in Bi-Histogram Equalization to avoid unpleasant artifacts and unnatural enhancement due to excessive equalization while enhancing the contrast of a given image as much as possible. We have done Simulation results using sample image which represent images with very low, very high and medium mean brightness have demonstrated that the cases which are not handled well by HE.
VI Acknowledgement
We would like to express our sincere appreciation to Dr. Sarita Bhadauria and Dr Gopal Krishnan Nair for guiding me through the project, for his thoughtful advice, insight and detailed suggestions. Many thanks and appreciation go to Dr, Swarnalata Rao, Dr. A.K.Wadhwani and Dr. Sulochana Wadhwani for serving as my graduate committee members and previewing the paper. I thank Dr. B.M.Girish for giving me the chance working at Desert Research Institute, we not only learned knowledge from working on the project but also learned a lot from his great personality. I thank Kavita R for helping me edit the paper.
VII References
[1] Scott E Umbaugh, Computer Vision and Image Processing, Prentice Hall: New Jersey, 1998, pp. 209.
[2] Yeong-Taeg Kim, “Contrast Enhancement Using Brightness Preserving Bi-Histogram Equalization,” IEEE Trans Consumer Electronics, vol. 43, no. 1, pp. 1-8, Feb. 1997.
[3] Yu Wan, Qian Chen and Bao-Min Zhang., “Image Enhancement Based On Equal Area Dualistic Sub-Image Histogram Equalization Method,” IEEE Trans Consumer Electronics, vol. 45, no. 1, pp. 68-75, Feb. 1999.
[4] Young-tack Kim and Yong-hun Cho, “Image Enhancing Method Using Men-Separate Histogram Equalization,” United States Patent, Patent No. 5,963,665, Oct 5, 1999.
[5] Yeong-Taeg Kim, “Method For Image Enhancing Using Quantized Men-Separate Histogram Equalization,” United States Petent, Patent No. 5,857,033, Jan 5, 1999.
[6] Yeong-taeg Kim “Image Enhancing Method And Circuit Using Men-Separate/Quantized Mean Separate Histogram Equalization And Color Compensation,” United States Patent, Patent No. 6,049,626, Apr 11, 2000.
[7] [7] ANALYSIS OF BREAST CANCER USING IMAGE PROCESSING TECHNIQUES, Tripty Singh , Dr. Sarita Singh
Bhadauoria, Ranjeet Singh Tomar , Dr AK Wadwani Deaprtment of Electronics and Electrical Engineering MITS Gwalior. India Published IEEE, IEEE Computer Society Washington, DC, USA. Bibliometrics. This paper appears in: Computer Modeling and Simulation, 2009. EMS'09. Third uksim European Symposium on,Issue Date: 25-27 Nov. 2009On page(s): 251 – 256,
[8] [8].IMAGE PROCESSING OF A MAMMOGRAM FOR MICRO CALCIFICATION”.Tripty Singh*, Dr. Sarita Bhadauoria, Dr Sulochana Wadhwani,Dr AK Wadwani Track number of your paper is_TC2-025. ICACCT 2010.IEEE 4th
[10][10] “DESIGN ISSUES OF EXPERT SYSTEM FOR BREAST CANCER DETECTION” Tripty Singh , Dr. Sarita Singh Bhadauoria, Dr S.Wadhwani , Dr AK Wadwani Deaprtment of Electronics and Electrical Engineering MITS Gwalior. India , International Journal of Information Studies, Volume 3 Number 1, January 20105.
[11][11]. IMAGE ANALYSIS AND INTERPRETATION OF A MAMMOGRAM FOR MICRO CALCIFICATION, Tripty Singh , Dr. Sarita Singh Bhadauoria, Dr S.Wadhwani , Dr AK Wadwani Deaprtment of Electronics and Electrical Engineering MITS Gwalior. India, International journal OF CSI, 'IJCSI-2011-8-1-62' has been accepted for publication in IJCSI Volume 8, Issue 1, January 2011 which is scheduled to be published on 31st January 2011
[12][12] CONTRAST ENHANCEMENT USING RECURSIVE MEAN-SEPARATE HISTOGRAM EQUALIZATION FOR
SCALABLE BRIGHTNESS PRESERVATION, Soong-Der Chen, Abd. Rahman Ramli, Member, IEEE, metalab.uniten.edu.my/~chensd/Recursi.
VIII Bibliography
Tripty Singh working as Asst Prof, Dept of ISE at MVJCE ,Bangalore .She is persuing her PhD research in Designing of Expert system for Breast cancer diagnosis from RGTU university Bhopal .Her M.Tech is in Advance Networking from ABV-IIITM Gwalior. Her areas of interest are AI & Computer Networks, She has 8 years of teaching experience and 3 years of research experience. She has published 6 International papers in various repute journals.
.
Dr. Swarnalatha Rao.PhD IISC Bangalore Chairperson, Div. V (E&R), Computer Society of India. Prof. & Head, Dept. of CSE (PG studies), MVJCE,Bangalore, Her area of specialization is based on Image Processing, Pattern Recognition, Computer Vision, Soft Computing