A Novel Approach for Image Enhancement Preserving Brightness Level using Adaptive Gamma Correction

DOI : 10.17577/IJERTV4IS070696

Download Full-Text PDF Cite this Publication

Text Only Version

A Novel Approach for Image Enhancement Preserving Brightness Level using Adaptive Gamma Correction

Anitta K Varghese

PG Scholar

Department of Electronics and Communication Engineering St. Josephs College of Engineering and Technology

Palai, Kerala, India

Nisha J S

Assistant Professor

Department of Electronics and Communication Engineering St. Josephs College of Engineering and Technology

Palai, Kerala, India

AbstractImage enhancement plays a role in image processing. The objective of image enhancement is to process the input image and provide a better output image. In this paper the weighted average of original image, histogram equalized and gamma corrected is taken for image enhancement. Using this algorithm contrast enhancement and at the same time brightness level of the image is preserved. Experimental study based on absolute mean brightness error, peak signal to noise ratio, entropy and structure similarity index matrix shows that the proposed algorithm provides better performance on image enhancement.

KeywordsImage enhancement,Histogram equalization

I.INTRODUCTION

Image enhancement is the subtype of image processing and used in computer graphics. In image enhancement technique the input image is processed and provides a better output image than the original one [1]. For human and computer vision, contrast enhancement is performed. Contrast enhancement is used in medical images and pre-processing steps in image/video processing application [2]. Different methods are developed for image contrast enhancement.

The difference in the luminance, reflectance from two adjacent surfaces helps in creating image contrast. In visual perception, variation in the brightness and color of an object with other objects determines the contrast enhancement. Contrast enhancement can be divided into two groups: indirect methods and direct methods. Due to simplicity and explicitness, among the indirect methods histogram modification techniques have been used widely.

To overcome this disadvantage brightness preserving bi- histogram equalization technique is proposed. BBHE divides the input image histogram into two based on the mean value. Then HE is applied on both separated parts with the new intensity range, i.e. from lower gray level to the mean value and mean value to higher gray level value. The techniques discussed above can increase the contrast of the image but causes some undesirable effects. The traditional global histogram equalization will cause excessive enhancement and the local histogram equalization causes block effect [5]. To overcome this weighted average of original image, histogram equalization and gamma corrected image is taken in which the level of contrast enhancement can be controlled by adjusting the weighting coefficient.

Rest of the paper is organized as follows: Section II summarizes theory of histogram equalization and brightness preserving bi-histogram equalization. Section III describes the proposed methodology. Results are discussed in section IV and paper is concluded in section V.

  1. HISTOGRAM EQUALIZATION Histogram equalization is a technique in spatial domain. It

    is used in images which are bright or dark. It generates a gray map that changes the histogram and redistributing all pixels values to a user specified desired histogram. A transformation function is automatically determined to produce an output image with a uniform histogram.

    1. Histogram equalization algorithm

      Let n k denotes the total number of pixels with gray level

      Histogram equalization is a popular method for contrast enhancement [1]. It uses linear cumulative histogram of the image and distributes its pixel value over its dynamic intensity

      of X k

      be:

      in the image, then the probability density of

      X k will

      range. Histogram represents the frequency of occurrence of all gray levels in the image. HE helps to enhance the contrast of

      p(X k

      ) n k

      N

      (1)

      image by decreasing the number of gray levels.

      In equalization the gap between neighbor two gray levels with heavy probabilistic density is enlarged while light probabilistic density of neighboring gray level are combined into one gray level. Therefore the processed image can have a

      uniform gray level distribution property [3]. HE has mean shift

      where k=0,1L-1. The relationship between p(Xk ) and Xk is defined as the pdf and the graphical appearance of pdf which is known as the histogram. Based on the image pdf, its cumulative distribution function is defined as:

      k

      problem [4], it shifts the mean intensity value to the middle gray level of intensity range. Therefore this technique is not useful where brightness preservation is required.

      c(X k ) p(X k )

      i0

      (2)

      The transform function of histogram equalization can be defined as :

      and

      L1

      f (Xk ) X0 (XL1 X0 )c(Xk )

      (3)

      cdf U (Xi )

      p U (Xi )

      im1

      (12)

      Let Y (i, j) is defined as the equalized image, then

      Y f (X) f (X(i, j))X(i, j) X

      (4)

      The transformation function in histogram equalization for each sub images are defined as :

    2. Brightness Preserving Bi-histogram equalizaion

    In BBHE the input image is decomposed into two sub image based on the mean. One sub image is a set of samples less than or equal to mean whereas other is a set of samples greater than mean value.

    Let input image X is decomposed into two sub images

    and

    f L (XL ) X0 (Xm X0 )cdf L (Xi )

    f U (XU ) Xm1 (XL1 Xm1 )cdf U (Xi )

    The output of BBHE Y is defined as:

    Y= Y (i,j)= f L (X(i, j)) | X(i, j) XL

    (13)

    (14)

    (15)

    X L and X u

    defined as

    based on the mean value X m . Therefore X is

    where

    where,

    X= XL XU

    XL X(i, j) |X(i,j) XmX(i, j) X

    (5)

    (6)

    and

    fL (XL ) fL (X(i, j)) | X(i, j) XL

    f U (XU ) f U (X(i, j)) | X(i, j) XU

    (16)

    (17)

    and

    fL (XL )

    equalizes the sub image X L over the range

    X X(i, j) | X(i, j) X

    X(i, j) X

    (7)

    X 0 X m

    while fU (XU ) equalizes the sub image X U

    U

    Thus the sub image

    m

    X L is composed of X0, X1…..Xm and

    over the range [ X

    m1

    , XL1 ] .

    sub image X U

    contains Xm1 , Xm2 …..XL1.

  2. PROPOSED METHODOLOGY

    The BBHE equalizes the sub images independently i.e. one of the sub images is equalized over the range up to mean and other sub image is equalized over the values greater than mean. The mean of input image is calculated as:

    L1

    ip(X i )

    The proposed methodology consist of image acquisition, the acquired image is converted into gray scale image. Histogram equalized, adaptive gamma corrected image is obtained from gray scale image. Then original image, histogram equalized image and gamma corrected image is fused using weighted average algorithm. Absolute mean brightness error, entropy, peak signal to noise ratio and

    L1

    X m i0

    p(X i )

    i0

    The pdf of sub image X L and X U are

    N

    L

    p n k L

    (8)

    (9)

    structural similarity index matrix is measured from fused image. The block diagram of proposed methodology is shown in Fig: 1.

    1. Image Acquisition and Preprocessing

      Images are acquired using digital camera. This image is converted into grayscale image and is displayed as two dimenional matrices having pixels as its elements in MATLAB. Pixel values of gray scale image are ranging from

      Where k=0,1…..m and pixels in XL .

      p n k

      NL represents the total number or

      (10)

      0 to 255, where 0 represents black and 255 represents white color. Pixel values between this range vary in intensity from black to white.

    2. Histogram Equalization

      N

      U

      U Histogram equalization is a method for contrast

      Where k=m+1, m+2….L-1 and N U

      number or pixels in X U .

      represents the total

      adjustment. This allows for area of lower contrast to gain

      higher contrast. Spreading the frequent intensity value helps to accomplish histogram equalization.

      The cumulative distribution function is defined as:

      m

      cdf L (Xi ) p L (Xi )

      i0

      (11)

      Image acquisition

      h ~ hi k * heq * hlog

      1 k

      (20)

      Where hi is the original image, heq is the histogram equalized

      Gray Scale Conversion

      image,

      hlog is the gamma corrected image and

      k,

      are

      weight coefficient.

      Histogram equalization

      E. Measure the enhancement through Absolute mean brightness error, Entropy, Peak signal to noise ratio and

      Structuural similarity index matrix

      Adaptive Gamma Correction

      The parameter used to measure the image quality after enhancement are Absolute Mean Brightness Error(AMBE), Entropy, Peak Signal to Noise Ratio(PSNR) and Structural similarity index matrix(SSIM).

      Absolute Mean Brightness Error

      Fusion of original image, histogram equalized and gamma corrected image

      Absolute Mean Brightness Error is defined as absolute

      difference between the mean input and output image. It is defined as:

      Measurement of AMBE, PSNR, Entropy and SSIM

      Fig: 1 Block diagram of proposed methodology

    3. Adaptive Gamma Correction

      Gamma correction is a histogram modification technique

      AMBE=|E(X)-E(Y)| (21)

      where X and Y are input and output image. E(X) represents mean of input image and E(Y) represents the mean of output image. Small AMBE value indicates that brightness is preserved.

      • Entropy

      Entropy is used to measure the richness of details in the output images. It is defined as:

      L1

      which is obtained by varying the adaptive parameter . The transform based gamma correction is obtained by

      Entropy[p] p(X k ) log2 p(X k )

      k0

      (22)

      T (l) lmax ( l

      l ) max

      (18)

      Higher entropy value indicates richness of details.

      • Peak Signal to noise ratio

      where

      lmax

      is the maximum intensity of the input. The

      The mean square error of the image is defined as:

      intensity l of each pixel in the image is transformed as T (l) .

      M N [X(i, j) Y(i, j)]2

      When =1, the gamma correction reduces to 1.

      A hybrid HM method is proposed to create a balance

      MSE=

      i1 j1

      M * N

      (23)

      between high levels of visual quality. It is accomplished by combining TGC and THE methods. To modify histogram with multi equalization and brightness preservation a normalized gamma function is used. The cdf and normalized gamma

      The PSNR is defined as:

      (L 1) 2

      PSNR=10log 10 MSE

      (24)

      function is used to modify the transformation curve. The proposed adaptive gamma correction is defined as:

      Higher value of PSNR represent better contrast enhancement.

      T (l) l

      max

      ( 1

      lmax

      ) l

      max

      ( 1

      lmax

      )1cdf (l)

      (19)

      • Structural Similarity Index Matrix

      The structural similarity index matrix is defined as:

      This method helps to increase the lower intensity and avoid decrement of high intensity.

      SSIM(X, Y) =

      2 x y C1 (2 xy C2 )

      ( 2 2 C )( 2 2 C )

    4. Fusion of original,histogram equalized and gamma corrected image

      Histogram equalized image, Gamma corrected image and original image is combined for better enhancement technique. It is achieved by using weighted average algorithm. The enhanced image is obtained by:

      x y 1 x y 2

      where X and Y are the reference and the output images.

      x is the mean of the reference image X, y is the mean of output image, x is the standard deviation of the reference image X, y is the standard deviation of the output image Y,

      xy

      is the square root of covariance of images X and Y, and

      C1 , C 2 are constants.

  3. RESULTS AND DISCUSSIONS

    This section gives the result of comparison of various contrast enhancement techniques. The enhancement method used for comparison is histogram equalization, brightness preserving bi-histogram equalization and the proposed system. These techniques are compared with various images using image quality measurement tools such as Absolute Mean Brightness Error, Peak Signal-to-Noise Ratio, Entropy and Structural similarity index matrix. The results of test images are shown in Fig: 2 and Fig: 3. The image quality assessment measures such as AMBE, PSNR, Entropy and Structural similarity index matrix values are tabulated in Table 1 and Table 2.

    Fig 2: Test image 1

    TABLE I. COMARISON OF AMBE, PSNR, ENTROPY AND SSIM OF

    TEST IMAGE 1

    Methods

    Image quality measurement tool

    AMBE

    Entropy

    PSNR

    SSIM

    HE

    20.06

    5.98

    18.92

    0.91

    BBHE

    9.18

    7.59

    21.87

    0.92

    Proposed method

    5.99

    7.78

    31.41

    0.99

    Fig 3: Test image 2

    TABLE II. COMARISON OF AMBE, PSNR, ENTROPY AND SSIM

    OF TEST IMAGE 2

    Methods

    Image quality measurement tool

    AMBE

    Entropy

    PSNR

    SSIM

    HE

    30.09

    5.99

    14.94

    0.85

    BBHE

    9.18

    7.59

    21.88

    0.92

    Proposed method

    5.99

    7.76

    31.41

    0.99

    From the table we can infer that the AMBE of the proposed method is lower and entropy, PSNR and SSIM of the proposed method is higher. Thus the images are enhanced and the mean brightness is preserved.

  4. CONCLUSION

The present paper gives the comparison of various image enhancement techniques. Histogram equalization, Brightness preserving bi histogram equalization and proposed method are compared with Image Quality Measurement tools such as absolute mean brightness error, peak signal-to-noise ratio, Entropy and Structural similarity index matrix. Using this Image Quality Measurement tool it is concluded that the proposed system provide better brightness preserving and contrast enhancement than other techniques.

REFERENCES

  1. R.C. Gonzalez and R. E. Woods, Digital Image Processing, Prentice Hall, vol. 2nd edition, 2002.

  2. Torre A, Peinado AM, Segura JC, Perez-Cordoba JL, Benitez MC, and Rubio AJ, Histogram Equalization of Speech Representation for Robust Speech Recognition, IEEE Trans. Speech Audio Processing, vol. 13, 2005, pp. 355-366.

  3. R. J. Jing et al, Computer Image Processing, Zhejiang University Press, Hangzhou, 1992.

  4. Kim YT, Contrast Enhancement Using Brightness Preserving Bi-Histogram Equalization, Consumer Electronics, IEEE Transactions on, 1997, vol. 43, no.1, pp.1-8.

  5. T. Kim and J. Paik, Adaptive contrast enhancement using gain- controllable clipped histogram equalization, IEEE Trans. Consum. Electron. vol. 54, no.4, Nov. 2008, pp. 18031810.

Leave a Reply