Intensity Transformation and Spatial Filtering for Image Enhancement using Fuzzy Rule-Based Logic

DOI : 10.17577/IJERTV3IS080690

Download Full-Text PDF Cite this Publication

Text Only Version

Intensity Transformation and Spatial Filtering for Image Enhancement using Fuzzy Rule-Based Logic

Chandni Bansal (Computer Science & Engineering)

Guru Jambheshwar University of Science & Technology, Hisar, Haryana, India.

Abstract An improved intensity transformation and spatial filtering techniques for image enhancement using the fuzzy rule-based logic is proposed. An enhancement technique that uses the various combinations of compound propositions for the fuzzy IF-THEN rules, considering features like image brightness and histogram, that improves the quality of degraded, and provides a real world approach to image enhancement. The image preprocessing extracts the fuzzy properties corresponding to image pixels. Spatial filtering performed using fuzzy logic showed improved results compared to the various filters. A visible improvement of visual perception is done by this technique compared to the outputs produced by the existing techniques .The considerable increment in the PSNR values shows the effectiveness of proposed technique.

Keywords-Image Enhancement, Fuzzy Logic, Intensity transformation, Spatial Filtering., Fuzzy Histogram


Images with good contrast and whose details are preserved are vital for many real time applications like machine vision, aerial imaging, digital camera applications, medical image analysis, satellite imaging and remote sensing etc. But, most of the saved images suffer from degraded contrasts which generally occur because of poor lighting conditions while capturing images, wrong setting of the camera aperture etc. The degradation in the image quality takes place as image goes through the processes like scanning, copying, editing, converting image extension from one form to another. Sometimes the blurring and the noise in the image are caused due to the cameras, the motion of the objects, the environmental changes or the random outer disturbance.Lacking capabilities in managing the lighting conditions while capturing images have resulted in unevenness in the image illumination.

Thus, we implement image enhancement to improve the quality of image. Image enhancement is done using the data present in the image to make it more understandable, interpretable and more clear for the human visual perception. It provides improved input image for advance image processing task. The primary goal of image enhancement is to alter attributes of an image to make it more pertinent for a given job and a particular application.

Image enhancement works in three different domains namely: (i) Frequency domain, where enhancement is done by altering the frequency transform of the given image using Fourier methods or so. (ii) Spatial domain, where the enhancement is done by directly altering the pixels of the image. (iii)Fuzzy domain, where enhancement is done using the fuzzy techniques which are capable of handling the ambiguity and vagueness in the image using knowledge base systems. However, using the frequency transform methods are complex and time consuming hence made these methods less likely to be used in real time application domain.[4] Various methods under spatial domain like thresholding, filtering, level transformation, histogram equalization exists. Despite of their advantages of being simple to implement in real world and less complexity, they did not produce satisfactorily results because they are not much robust and does not provide imperceptibility required.

Due to the poor and low contrast nature of the image, impreciseness and ambiguity are introduced and have led to the increment of uncertainty in the image information. This impreciseness in the image appears in the form of imprecise boundaries and intensities during image digitization. Thus, to solve the problem between the precision of classical mathematics and the intrinsic vagueness of the real world, fuzzy set theory has been proposed. The vagueness possessed by the image can be professed qualitatively by human interpretation. But, there is no definite quantification to describe the vagueness and thus machine may not recognize them. Realizing this constraint to a great degree, fuzzy logic tools give power to a machine to mimic human interpretation.[1]

The basic principle of fuzzy enhancement scheme is:

Membership function

Expert knowledge

Fuzzy logic for fuzzy set

Image Fuzzification

Input Image


Enhanced Image

Figure 1: Fuzzy Enhancement Scheme [3]

As there is not any general standard of image quality, the evaluation of different image enhancement schemes becomes difficult. Hence, most of image enhancement algorithms are application-dependent, subjective and mostly adhoc. Therefore, more often subjective criterion is used in evaluating image enhancement algorithms.


    The method proposed and implemented in this paper to enhance images using fuzzy IF-THEN rules over the intensity and histogram of the image. The algorithm is proposed to avoid the problems that are not effectively dealt by the existing techniques.

    1. Working Structure

      The proposed methodology has following procedure:

      • Read the Image: Input the original image to the system.

      • Resize: Resize the given image to a fix value, 232*400.

      • If it is a RGB image convert it to Gray Scale image.

      • Apply existing image enhancement techniques i.e. Thresholding, Spatial low pass filters, Spatial Avg. Filters, Gaussian Filters.

      • Apply existing Fuzzy Logic technique, and Fuzzy Adaptive Filter technique.

      • Apply proposed method, Fuzzy IF-THEN Rules with compound propositions considering intensity levels and Histogram of the image.

      • Apply fuzzy rule based spatial filtering method.

      • Compare results for spatial 3*3 and 5*5 filter masks.

    2. Image representation in fuzzy set notation

      Fuzzy image enhancement is based on pixel property such as gray tone intensity, where it is mapped into fuzzy plane

      using a membership transformation function. An image I of size M x N and L gray levels can be considered as an array of fuzzy singletons, having a membership value denoting its degree of brightness relative to some brightness levels. In the fuzzy set notation[7], we can write

      X = U {µ (mi,j)} (1)

      = {µi,j/mi,j i=1,2,.,M ,

      j=1,2,, N}

      where µ(mi,j) denotes the degree of brightness possessed by the gray level intensity mi,j of the (i,j)th pixel.

    3. Intensity Transformation using fuzzy logic

    Intensity Transformations using fuzzy rules with atomic input work as follows[16]:

      • If input pixel is dark, then make it darker.

      • If input pixel is gray, then make it more gray.

      • If input pixel is bright, then make it brighter.

    In our algorithm, we will use compound propositions in fuzzy rules using Logical AND,OR fuzzy operations. We first fuzzify the input image into two fuzzy inputs, Ix and Iy. Then the fuzzified image is passed into the designed FIS system. After passing fuzzified image into the FIS system following rules is applied:

    r1 = 'If Ix is zero and Iy is zero then Iout is white';

    r2 = 'If Ix is not zero or Iy is not zero then Iout is black'; r3='If hist1 is hist_dull and hist2 is hist_bright then Iout is white';

    r4='If hist1 is not hist_dull or hist1 is hist_dull then Iout is black';

    where, Ix and Iy are the fuzzy inputs, Iout is the otput image, hist_1, hist_2 are the histogram inputs to fuzzy rules.

    This is done for every pixel of the image to produce the corresponding output pixels in Iout.

    Spatial filter masks of the window size 1*1 and then (2M+1)*(2N+1) rangeas we increase the mask, we are able to view the larger parts of the image. But that increase the blur in the image. 3*3 is the best window size.


    The proposed method has been implemented on Intel Core i3 CPU 2GHz using Matlab R2011a. Many standard Images were tested for all the techniques and the proposed method.

    The processed image is analyzed in terms of its output quality and quantitative analysis using peak signal to noise ratio (PSNR).

    In addition, the performance of the proposed algorithm is compared qualitatively and quantitatively with other state of the art methods namely Thresholding, application of

    simple Fuzzy IF-THEN Rules, spatial Lowpass filters, spatial average filters and fuzzy adaptive filters, are widely used in image enhancement. The techniques in those literatures are selected since they involved in enhancing image contrast in fuzzy domain. Each of method has been discussed in first section of paper.

    Moreover, the applied enhancement technique should not notably increase the noise level and hence a high value of PSNR is required.

    PSNR is calculated using following equation [1]:

    PSNR =10log10 (L- 1)2 /MSE (2)


    The enhanced images resulted from the proposed and other existing methods are shown in figures 2-5. For the subjective qualitative analysis of the processed images appearance, the test images namely Flowers, Lenna,

    Girl, Friends_group, Fortuner are shown in these figures

    The Threshold (figures 2(c), 3(c), 4(c), 5(c), 6(c)) and

    Gaussian filter (figures 2(d), 3(d), 4(d), 5(d), 6(d)) produced less likely images after processing than the original images. Thresholding is useful only when we

    Table 1. Quantitative Image Enhancement Analysis using PSNR (db)

    Enhancement Method














    Spatial Lowpass filter







    Spatial Average filter







    Gaussian filter







    Fuzzy logic







    Fuzzy spatial 3*3 filter







    Proposed Fuzzy Technique







    Fig 2: Flowers.jpg (a)original image, (b)grayscale image, enhanced image with (c)Thresholding, (d)Gaussian filter, (e)Spatial Lowpass filter,(f) spatial avg filter, (g) Fuzzy Adaptive filter (h) Proposed fuzzy technique.

    Fig 3:

    Lenna.jpg (a)original image, (b)grayscale image, enhanced image with (c)Thresholding, (d)Gaussian filter, (e)Spatial Lowpass filter,(f) spatial avg filter, (g) Fuzzy Adaptive filter (h) Proposed fuzzy technique.

    have to separate image object from the image background[2]

    Spatial filters produced enhanced results but spatial filters are powerful tools in dealing with random noise only. Figures 2(e), 3(e), 4(e), 5(e), 6(e) and figures 2 (f), 3(f), 4(f), 5(f), 6(f) shows images processed with spatial Lowpass filters and spatial average filters. Compared to Gaussian filters, spatial filters have higher PSNR value, visibly also images are more enhanced through spatial filters.

    Fuzzy adaptive method (2(g), 3(g), 4(g), 5(g), 6(g)) produced good quality results but the brightness is

    increased more than required because this method takes complete image into consideration at once.

    And finally the proposed method, in which fuzzy IF-THEN rules are used to work upon the pixel intensity and image histogram to enhance the overall image, produced really good results both qualitatively and quantitatively. Figures 2(h), 3(h), 4(h), 5(h), 6(h) shows the improved appearance of images with balanced brightness. Also the PSNR values, as we can see from Table 1, are highest for the proposed image enhancement method.

    Fig 4: Girl.jpg (a)original image, (b)grayscale image, enhanced image with (c)Thresholding, (d)Gaussian filter, (e)Spatial Lowpass filter,(f) spatial avg filter, (g) Fuzzy Adaptive filter (h) Proposed fuzzy technique.

    Fig 5: Friends.jpg (a)original image, (b)grayscale image, enhanced image with (c)Thresholding, (d)Gaussian filter, (e)Spatial Lowpass filter,(f) spatial avg filter,

    (g) Fuzzy Adaptive filter (h) Proposed fuzzy technique.

    Fig 6: Fortuner.jpg (a)original image, (b)grayscale image, enhanced image with (c)Thresholding, (d)Gaussian filter, (e)Spatial Lowpass filter,(f) spatial avg filter, (g) Fuzzy Adaptive filter (h) Proposed fuzzy technique.

  4. . CONCLUSION AND FUTURE SCOPE The new enhancement technique has been developed for image enhancement through intensity transformations and spatial filtering using enhanced Fuzzy IF-THEN Rules. Results signified that the proposed technique produced enhanced image quality and overpowered other methods. Moreover, using fuzzy logic is simple to implement and design then other domains. Thus, reduced complexity also favors working with the proposed technique.

Future scope

In the future the existing systems can be modified by fuzzy set theory application. Variation of fuzzy rules can bring out better outcomes. Neuro-Fuzzy methods can be used to enhance the images. Fuzzy histogram equalization can also be used.


  1. Khairunnisa Hasikin and Nor Ashidi Mat Isa, Enhancement of the low contrast image using fuzzy set theory14th International Conference on Modeling and Simulation, IEEE,2012.pp. 371-376

  2. S.S. Bedi1, Rati Khandelwal2,Various Image Enhancement Techniques-A Critical Review International Journal of Advanced Research in Computer and Communication Engineering Vol. 2,

    Issue 3, March 2013, pp.1605-1609

  3. Nutan Y. Suple and Sudhir M. Kharad, Design of Fuzzy Inference System for Contrast Enhancement of Color Images, International Journal of Advanced Computer Research, vol.3 Issue 3, September- 2013,427-431

  4. M. Hanmandlu and D. Jha, "An Optimal Fuzzy System for Color Image Enhancement," Image Processing, IEEE Transactions on, vol. 15, pp. 2956-2966, 2006.

  5. Manpreet Kaur, Jasdeep Kaur, Jappreet Kaur, Survey of Contrast Enhancement Techniques based on Histogram Equalization (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 2, No. 7, 2011.

  6. L. A. Zadeh, "Outline of a New Approach to the Analysis of Complex Systems and Decision Processes," Systems, Man and Cybernetics, IEEE Transactions on, vol. SMC-3, pp. 28-44, 1973.

  7. H.D. Cheng, Huijuan Xu, A novel fuzzy logic approach to contrast enhancement, Pattern Recognition , 33 , 2000, 809-819.

  8. S.K. Naik, C.A. Murthy, Hue-preserving color image enhancement without gamut problem, IEEE Trans Image Process.,12, 2003, 15911598.

  9. M. Hanmandlu, D. Jha and R. Sharma, Color Image Enhancement by Fuzzy Intensification, in Pattern recognition,2000.

    Proceedings.15th International Conference on,2000,pp. 310-313, vol 3

  10. E.E. Karre and M. Nachtegael, Fuzzy Techniques in Image Processing :Physics-Verlag,2000

  11. ]R. Vorobel, O. Berehulyak, L. Rutkowski, R. Tadeusiewicz, L. Zadeh, and J. Zurada, "Gray Image Contrast Enhancement by Optimal Fuzzy Transformation Artificial Intelligence and Soft Computing ICAISC 2006." vol. 4029: Springer Berlin / Heidelberg, 2006, pp. 860-869.

  12. C. Florea, A. Vlaicu, M. Gordan, and B. Orza, "Adaptive Implementation of Nonlinear Fuzzy Image Enhancement Algorithms in the Compressed JPEG Images" in Advances in Computer Science and IT: InTech,2009.

  13. Debashis Sen, Sankar K. Pal, Automatic Exact Histogram Specification for Contrast Enhancement and Visual System Based Quantitative Evaluation, Member, IEEE, Fellow, IEEE Transactions on Image Processing, Vol. 20, No. 5, May 2011.

  14. Xiangtao Chen, Yujuan Chen , An Improved Edge Detection in Noisy Image Using Fuzzy Enhancement in Biomedical Engineering and Computer Science (ICBECS)-2010 International Conference, 23-25 April 2010, pp 1-4.

  15. S.K.Pal, R.A.King,Image enhancement using fuzzy set.

    Electronics letters, vol.16, no.10, pp.376- 378, 1980.

  16. R. C. Gonzalez and R. E. Woods, Digital Image Processing, Second Edition, Pearson Education, 2003.

  17. P. Melin, O. Mendoza, and O. Castillo, "An improved method for edge detection based on interval type-2 fuzzy logic," Expert Systems with Applications, vol. 37, pp. 8527-8535, 2010.

  18. X.-Y. Wang, T. Wang, and J. Bu, "Color image segmentation using pixel wise support vector machine classification," Pattern Recognition, vol. 44, pp. 777-787, 2011.


Leave a Reply