062

Page 1

Imperial Journal of Interdisciplinary Research (IJIR) Vol-3, Issue-2, 2017 ISSN: 2454-1362, http://www.onlinejournal.in

Gray Scale and Color image Enhancing using Adaptive Bi- Histogram Equalization and Contrast Stretch Clitus Neil Dsouza1 & Shivaprasad2 1

Department of Electronics and Communication Engineering Srinivas institute of Technology, Valachil, Karnataka, India 2 Department of Electronics and Communication Engineering Vivekananda College of Engineering and Technology, Puttur, Karnataka, India Abstract: The aim of image enhancement is to process the image so that the processed image is more suitable than the original image for specific application.. In this paper different types of image enhancement algorithms in spatial domain are presented for gray scale as well as for color images. Quantitative analysis like AMBE (Absolute mean brightness error), MSE (Mean square error) and PSNR (Peak signal to noise ratio) for the different algorithms is evaluated. For gray scale image Weighted histogram equalization, Linear contrast stretching, Non linear contrast stretching logarithmic, Non linear contrast stretching exponential and Adaptive Bi Histogram equalization algorithms are discussed and compared. The proposed method Adaptive Bi- Histogram equalization algorithm is discussed in brief. For color image (RGB) Linear contrast stretching, Non linear contrast stretching logarithmic and Non linear contrast stretching exponential algorithms are discussed. By experimental analysis It has been observed that Adaptive Bi-histogram histogram equalization method gives better AMBE (should be less) values compared with other algorithms for gray scale images. For color images linear contrast stretching method gives better AMBE and PSNR.

Introduction We Image enhancement is one of the easiest and important sections in image processing. Image enhancement deals with highlighting the details of the input image so that the output image looks better compared to input image. An image enhancement technique doesn’t actually increase the size of the image but changes the pixel values in domain used. Enhancement can be performed either in spatial domain or frequency domain. In spatial domain, pixel values are accessed directly and altered according to some algorithm. In frequency domain first conversion from spatial to frequency domain is performed, and then the pixels in frequency domain is accessed and altered. The methods discussed in

Imperial Journal of Interdisciplinary Research (IJIR)

this paper is performed in spatial domain, the pixel values of image altered directly without converting it into another domain[1].

1. Image Enhancement Algorithms 1.1Linear Contrast Stretching Contrast stretching deals with increasing the dynamic range of gray levels in the image being processed. For a unsigned integer 8(uint8) image the pixel value ranges from 0 t0 255. Consider that the image under test is having pixel values in between 40 to 200. In this case range of this image can be extended from 0 to 255. This way contrast can be stretched. The algorithm for contrast stretching is given below

(1) Where e(x,y) is the pixel value of enhanced image, i(x,y) is the pixel value of original image, imin is the minimum value of the original image, imax is the maximum value of original image, omin is minimum value of uint8 class(0), omax is maximum value of uint8 class(255). If input pixel versus output pixel value is plotted, the graph will be linear. Hence the name [2].

1.2 Non Linear logarithmic contrast stretching In this method contrast stretching is non linear it amplifies the low pixel values, and attenuates the higher pixel values, if input pixel versus output pixel value is plotted, the graph is non linear. Hence the name. This enhancement technique is employed if original image is darker[2].The algorithm for non linear logarithmic contrast stretching is given below. Page 363


Imperial Journal of Interdisciplinary Research (IJIR) Vol-3, Issue-2, 2017 ISSN: 2454-1362, http://www.onlinejournal.in

(2)

1.3 Non Linear Exponential Contrast Stretching The contrast stretching method employed here is non linear again, in this method the low pixel values will be attenuated and higher pixel values will be amplified. The graph is non linear. This enhancement technique is employed if original image is brighter[3].The algorithm for the non linear contrast stretching is given below.

Histogram Equalization (HE) appropriates gray level S k to gray level r k of the input image using equation (2). So we have Sk =(L-1)*C(rk )

(6)

1.5 Weighted Histogram Equalization This algorithm is similar to that of histogram equalization, the only change is instead of using probability density functions for calculating cumulative distribution function, weighted probability density functions are calculated using the following equations

(3)

1.4Histogram Equalization Histogram equalization is technique used for adjusting image intensities to enhance contrast. Algorithm for histogram equalization is as follows (1)Find the histogram of image. Histogram is the frequency of occurrence of pixel values in an image. (2)Find the probability of occurrence of pixel in image. Obtained by dividing histogram by total number of pixel values in image.

(7) Where Pnew (k i) is the new weighted PDF, Pu is the upper threshold PDF, Pu = (v)(P max) 0<v<1, P max is the maximum value of PDF, Pl is the minimum value of PDF, P(k i) represents the probability density function of the ith pixel value, r is parameter related PDF if r<1 the small pixel value will have higher mapped value[4].

2. Proposed Algorithm (3)Find the cumulative distribution function (CDF) for each pixel. If pixel value is 150, then add the probability of occurrence of pixel values from 0 to 150 this gives CDF. (4)Multiply CDF for each pixel by N, where N represents the maximum value of pixel for the defined class of image. For uint8 image N=255. The resultant image is histogram equalized image[1]. Let r k denote gray level in image, n k denote number of pixel with gray level r k, N denotes the product of number of rows and number of columns, then probability distribution function of the image can be computed as follows (4)

2.1. Adaptive Bi-Histogram Equalization: Adaptive Bi Histogram Equalization(ABHE) is considered as improved histogram equalization (HE) method for contrast enhancement. BHE first finds average point in histogram of the image and then divides histogram to two segments based on this point. After that histogram equalization operation is applied on each segment. There are two cumulative distribution functions for two segments[3]. Gray level ( r k ) under the average point are pointed to the new gray level (s k ) as it can be seen in equation. (8)

The cumulative distribution function can be calculated from the probability density function as follows

(5)

Imperial Journal of Interdisciplinary Research (IJIR)

(9) Where L1 is the average of gray levels of the histogram and it can be computed as in equation

Page 364


Imperial Journal of Interdisciplinary Research (IJIR) Vol-3, Issue-2, 2017 ISSN: 2454-1362, http://www.onlinejournal.in (3)PSNR: Peak signal to noise ratio is calculated (10)

(15)

as

Gray level (r k ) above the average point are pointed to the new gray level ( S k ) as it can be seen in

Table1: Depicts the AMBE, MSE and PSNR for different Enhancement Methods for given Gray Scale Image

(11)

Method

(12)

3. Enhancement for Color Images The algorithms so far discussed are applied only for gray scale images, for color images same algorithms can be made use of here the given input image is splitted into Red, Green and Blue component, each component is processed separately and processed images are concatenated together to get the resultant enhanced color image. The first three methods which were discussed for gray scale images are used here for color images as well linear contrast stretching, non linear logarithmic contrast stretching and non linear exponential contrast stretching methods are the methods worked on. The results obtained for gray scale as well color images are discussed in the next section [2].

AMBE

MSE

PSNR(dB) -2

LCS

4.356

3.12x10

83

NLLCS

79.52

0.1461

56.48

NLECS

79

0.1457

56.49

HE

2.6583

0.0037

72.411

WHE

0.8100

0.0036

72.515

0.7651 0.0023 74.5 Qualitative Analysis is carried out for given gray scale and is depicted below

ABHE

4. Experimental Results For simulation Mat lab version 7.6 is used. Here Lenna input image is considered for analysis; the size of the image is resized to 256x256. Quantitative analysis like AMBE, MSE and PSNR calculations are performed for different enhancement methods. (1) AMBE: Absolute mean brightness error is calculated using the following formula (13)

Where E(x) is expectation operator or mean of input image, E(e) is the mean value of enhanced image (2)MSE: Mean square error is calculated as Follows

(14)

Imperial Journal of Interdisciplinary Research (IJIR)

Page 365


Imperial Journal of Interdisciplinary Research (IJIR) Vol-3, Issue-2, 2017 ISSN: 2454-1362, http://www.onlinejournal.in

5. Conclusion and Future Scope Adaptive Bi-Histogram equalization image enhancement technique is found to be better than the existing enhancement methods, in terms of AMBE, MSE and PSNR for gray scale images. It provided a high PSNR Value 74.5 and low AMBE value of 0.7651 when compared with other algorithms. Image enhancement techniques comparison is carried out for color images and LCS provided a better result. This can also be applied for video enhancement as a future scope.

6. REFERENCES

Figure 1. (a)Original image (b)LCS image (c)NLLCS image (d)NLECS image (e)HE image (f)WHE image (g) Proposed ABHE image Table 2. Depicts the AMBE, MSE and PSNR for different enhancement methods for color image Method AMBE MSE PSNR(dB) LCS

13.64

918

20.35

NLLCS

81.049

7.95x103

9.52

NLECS

77.9

8.57x103

20.34

[1] Digital Image Processing by Rafael C. Gonzalez, Richard E. woods 2nd Edition 2002, ISBN -81-7758168-6. [2] Digital Image Processing and Image analysis by B. Chandra, D. Dutta Majumder 2008, ISBN-978-81203-16188. [3] Y. T. Kim, “Contrast enhancement using brightness preserving bihistogram equalization,” IEEE Trans. Consumer Electron., vol. 43, pp. 1–8, Feb. 1997. [4] R. Sharmila “Image contrast enhancement using weighted histogram equalization with improved switching median filter” IJAEST vol. no. 7 issue no.2, 206-211

.

Qualitative analysis is carried out for given color image and is depicted below

Figure 2. (a)Original image (b)LCS image (c)NLLCS image (d)NLECS image

Imperial Journal of Interdisciplinary Research (IJIR)

Page 366


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.