6
NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society Applications of fuzzy morphology to contrast enhancement M.A. Wirth, D. Nikitenko Department of Computing & Information Science University of Guelph Guelph, Ontario, NJG 2WI, Canada [email protected] Abstract - Classical methods for contrast enhancement often radically alter the appearance of an image. This paper presents a method of image enhancement based on the subtext of image sharpening, i.e. improving the visual acuity of an image. We propose a contrast enhancement algorithm which is a blend of morphological analysis and fuzzy reasoning, which unlike established methods of sharpening such as unsharp maskdng, does not excessively accentuate noise. I. INTRODUCTION Image sharpening is a form of contrast enhancement which involves improving the acuity of details within the image. This is often achieved by accentuating the high- frequency components of an image to reduce blur. A classic filter for sharpening is "unsharp marking". The effect here is not to grossly change the contrast of the image, but rather to have a "sharpening" effect. This may concur well with studies that show algorithms that change the image appearance significantly are the least preferred by radiologists, whereas algorithms that attempt to preserve the appearance of the original images are preferred by radiologists [1]. The goal of image sharpening is to increase the acuity of the image without unduly amplifying noise or significantly altering the contrast. Fuzzy reasoning seems to be an ideal fit for contrast enhancement due to the uncertainty and imprecision associated with many medical and biological images, such as diatoms, mammograms and fingerprints. Fuzzy sets were introduced by Zadeh in 1965, and used in the context of morphological analysis for the past two decades. In 1980, Goetcherian [2] introduced elementary morphological operations applied to images interpreted as fuzzy sets. The first attempt to combine fuzzy reasoning and morphology, as alluded to by Bloch and Maitre [3], was made by Kaufmann [4] in 1988. Since then there have been several approaches to defining grayscale morphology on images interpreted as fuzzy sets, however there is little literature relating to the application of such algorithms. Exceptions include Maccarone et al. [5] who use fuzzy morphology to restore and retrieve structural properties of astronomical images. This paper relates the concept of fuzzy morphology to image sharpening, an algorithm termed fuzzy morphological sharpening (FMS). II. IMAGE FUZZIFICATION Image fuzzifcation is the process of characterizing a grayscale image in fuzzy terms. Grayscale images can be modeled as fuizzy sets, such that a grayscale value represents the degree to which a pixel belongs to an image. Two basic methods of fuzzification, are the S-function, and norma- function. A norma-function is achieved by scaling the intensities (e.g. 0..255) to lie in the range [0,1], such that the gray level of a pixel is representative of its degree of membership in the high-intensity pixels. Hence the fuzzifier is a simple N-function which performs only normalization. The norma-function is defined as: 11(g ) =(g --min) (max-min) (1) where max and min are the maximum and minimum values of the original image, and g, and u (g,) are the intensity value and fuzzified value of the image at the pixel (i,j) in the original and fuzzified images respectively. The S-function is defined as: ,a (g) )= I~~~ 0 2[(gy _a)l(_ a) 2 -2 (gij _r/ a) 2 if g. <a if a<gu <./ if/f< g. < r if gJ >y (2) where ,B is the crossover point, y is the point at which the height of the S-function is 1, and a = 2,i- y. The use of the norma-fimction does not change global intensity characteristics of the image, whilst the use of fuzzifiers such as the S-function pre-enhance certain intensity ranges, based on parameters chosen using the parameters a, /3 and y. After the fuzzified image has been modified, it is defuzzified, by applying the inverse of the image fuzzification algorithm previously used to map the original image to the fuzzy plane. This work is supported by a Discovery Grant from the Canadian National Science and Engineering Research Council (NSERC) 0-7803-9187-X/05/$20.00 ©2005 IEEE. 355

[IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

  • Upload
    d

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society

Applications of fuzzy morphology to contrastenhancementM.A. Wirth, D. Nikitenko

Department ofComputing & Information ScienceUniversity ofGuelph

Guelph, Ontario, NJG 2WI, [email protected]

Abstract - Classical methods for contrast enhancement oftenradically alter the appearance of an image. This paper presents amethod of image enhancement based on the subtext of imagesharpening, i.e. improving the visual acuity of an image. Wepropose a contrast enhancement algorithm which is a blend ofmorphological analysis and fuzzy reasoning, which unlikeestablished methods of sharpening such as unsharp maskdng,does not excessively accentuate noise.

I. INTRODUCTION

Image sharpening is a form of contrast enhancementwhich involves improving the acuity of details within theimage. This is often achieved by accentuating the high-frequency components of an image to reduce blur. A classicfilter for sharpening is "unsharp marking". The effect here isnot to grossly change the contrast of the image, but rather tohave a "sharpening" effect. This may concur well with studiesthat show algorithms that change the image appearancesignificantly are the least preferred by radiologists, whereasalgorithms that attempt to preserve the appearance of theoriginal images are preferred by radiologists [1]. The goal ofimage sharpening is to increase the acuity of the imagewithout unduly amplifying noise or significantly altering thecontrast.

Fuzzy reasoning seems to be an ideal fit for contrastenhancement due to the uncertainty and imprecisionassociated with many medical and biological images, such asdiatoms, mammograms and fingerprints. Fuzzy sets wereintroduced by Zadeh in 1965, and used in the context ofmorphological analysis for the past two decades. In 1980,Goetcherian [2] introduced elementary morphologicaloperations applied to images interpreted as fuzzy sets. Thefirst attempt to combine fuzzy reasoning and morphology, asalluded to by Bloch and Maitre [3], was made by Kaufmann[4] in 1988. Since then there have been several approaches todefining grayscale morphology on images interpreted as fuzzysets, however there is little literature relating to the applicationof such algorithms. Exceptions include Maccarone et al. [5]who use fuzzy morphology to restore and retrieve structuralproperties of astronomical images. This paper relates theconcept of fuzzy morphology to image sharpening, analgorithm termed fuzzy morphological sharpening (FMS).

II. IMAGE FUZZIFICATION

Image fuzzifcation is the process of characterizing agrayscale image in fuzzy terms. Grayscale images can bemodeled as fuizzy sets, such that a grayscale value representsthe degree to which a pixel belongs to an image. Two basicmethods of fuzzification, are the S-function, and norma-function. A norma-function is achieved by scaling theintensities (e.g. 0..255) to lie in the range [0,1], such that thegray level of a pixel is representative of its degree ofmembership in the high-intensity pixels. Hence the fuzzifier isa simple N-function which performs only normalization. Thenorma-function is defined as:

11(g ) =(g --min)(max-min)

(1)

where max and min are the maximum and minimum values ofthe original image, and g, and u (g,) are the intensity valueand fuzzified value of the image at the pixel (i,j) in theoriginal and fuzzified images respectively. The S-function isdefined as:

,a(g))=

I~~~ 0

2[(gy _a)l(_ a) 2

-2 (gij _r/ a)2

if g. <a

ifa<gu <./

if/f< g. < rif gJ >y

(2)

where ,B is the crossover point, y is the point at which theheight of the S-function is 1, and a = 2,i- y. The use of thenorma-fimction does not change global intensitycharacteristics of the image, whilst the use of fuzzifiers suchas the S-function pre-enhance certain intensity ranges, basedon parameters chosen using the parameters a, /3 and y.After the fuzzified image has been modified, it is defuzzified,by applying the inverse of the image fuzzification algorithmpreviously used to map the original image to the fuzzy plane.

This work is supported by a Discovery Grant from the Canadian National Science and Engineering Research Council (NSERC)

0-7803-9187-X/05/$20.00 ©2005 IEEE.355

Page 2: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

III. FuzzY MORPHOLOGY

A. Classical morphological operators

Morphological analysis is an expression used to collectivelygroup operations for analyzing the shape and form of spatialstructures which stems from the study of the geometry ofporous media in the mid-sixties in France [6]. The basic notionof classical morphology is founded on two basic operations:dilation and erosion.

B. Fuzzy structuring elements

Classical morphology is based on the concept of a structuringelement (SE) a template shape used to investigate an image.The net effect of a SE is dependent on its size and shape.Fuzzy morphology uses a similar structuring element,however the elements if the fuzzy structuring element (fSE)have been fuzzified. A fSE is normally 2-dimensional,isotropic, and in effect non-flat. An example of a fSE is shownin Fig. 1.

0

0.1

0.1

0.1

0

0.1O.I.0.2

0.5

0.2

0.1

0.1

0.5

1.0

0.5

0.1

0.1

0.2

0.5

0.2

0.1

0

0.1

0.1

0.1

0

Fig 1. An example of a fuzzy structuring element

C. Fuzzy morphological operators

One of the benefits of using fuzzy morphologies may be thatthey are more sensitive towards small image details, orimprove the contrast between foreground-background [7]. Allfour primitives can be re-defined using a fuzzy framework. If,u is a "fuzzy" image and 5 is a fuzzy structuring element,then fuzzy dilation as defined by Bloch and Maitre [3], isgiven by:

S (,) (x) = sup min [,u(x -y), S(y)] (3)YIEX

An example of this process is shown in Fig.2, adapted from anillustration in Koppen et al. [7]. On the left side of the figure isa window in a fuzzy image g, with the fuzzy structuringelement (SE) on the right. The first step involves calculatingthe minima of the corresponding positions in the imagewindow and the point-inverted SE. In the second step, thesupremum of all the minima is calculated as the result of thefuzzy dilation for the actual position x. Fuzzy erosion, the dualto fuzzy dilation can be similarly defined [3]:

(4)c5 (,u)(x) = inf max [1 -,u(x -y), (y)]

The operations of fuzzy opening and fuzzy closing can besimilarly defined:

Y; (A) = 8; (C§ (a)) (5)

¢b (jI) = C; (8; (U)) (6)

fuzzy image,

Fig 2. An example of the process of fuzzy dilation.

The overall behavior of fuzzy morphological operationsare similar as grayscale morphology. Fuzzy dilations eliminatelow-intensity (dark) details, enhance high-intensity (light)details; frizzy erosions eliminate light details, enhance darkdetails; fuzzy closings eliminate dark details and fuzzyopenings eliminate light details.

IV. Fuz IMAGE SHARPENING

The concept of contrast can be approximately defined asthe relative difference in intensity between an image structureand its background. The principal objective of contrastenhancement or sharpening is to emphasize fine detail in amammogram, or to enhance detail that is blurred. Theprinciple of morphological contrast enhancement wasintroduced by Soille [8], as an extension to toggle contrasts,and recently extended to selective enhancement based on areamorphology [9]. Morphological contrast enhancement is basedon the notion of morphological top-hats. A top-hat is aresidual filter which preserves those features in an image thatcan fit inside the structuring element (SE) and removes thosethat cannot. Morphological contrast enhancement is derivedby calculating the dual area top-hats in parallel.

The top-hat by fuzzy opening, y , is defined as thedifference between the fuzzified image, , , and its fuzzyopening, yr, using the fuzzy structuring element ;:

4, =y-Yr() (7)

356

Page 3: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

Simiilarly the dual fuzzy top-hat by closing, 0,,, is thedifference between the fuzzy closing, 1' , using the fuzzystructuring element s and the fuzzified image, u:

9H = O4 (U) -'U (8)

The fuzzy top-hat by opening, yields an image that containsall the residual features (i.e. peaks and ridges) removed by thefuzzy opening. Adding these residual features to the originalimage has the effect of accentuating high-intensity (light)structures. The dual residual (i.e., valleys and troughs)obtained by using the fuzzy top-hat by closing, is thensubtracted from the resulting image to accentuate low-intensity (dark) structures:

I = + - KTH

The first experiment applies the enhancement algorithm to animage of a diatom. Diatoms are microscopic, unicellular algae,related to brown algae, which are found in most aquatichabitats [12]. They are exceptional indicator organisms for awide variety of applications including forensic science andenvironmental monitoring. One of the challenges with imagesof diatoms, normally acquired through some form ofmicroscopy, is that their contour is the most discerningfeature, with the rest of the body transparent with intensitiessimilar to those ofthe background region of the image,.

(9)

V. EXPERIMENTAL RESULTS

The performance of this algorithm has been tested on variousbiologically typed images including fingerprints, and diatoms.The effect here is not to grossly change the contrast of theimage, but rather to improve the acuity and visual appearanceof structures within an image. We compare the results of theFMS algorithm against other common enhancementalgorithms such as unsharp masking (UM), and ContrastLimited Adaptive Histogram Equalization (CLAHE). TheCLAHE algorithm, although technically a contrast-enhancedrather than a sharpener, is shown for comparative purposes.Experiments are performed using images fuzzified with thenonna-function.

A. Image Quality Metrics

We endeavor to characterize the performance of the algorithmusing two metrics. The first metric used is formed by twofigures of merit representing an estimate of the local varianceof an image [10]. The estimate is performed separately indetail regions (detail variance, DV) and in relatively uniformregions (background variance, BV) of an image. Here weexpect reasonably high values of DV in the enhanced images,while the BV value should remain low in order to indicatelimited noise amplification. We use a mask-activatedadaptation of this algorithm using a ground truth image todenote the background/detail regions in the image. The secondmetric, introduced by Wang et al. [11], the Universal QualityIndex (UQI) models image distortion as a combination ofthreefactors: loss of correlation, luminance distortion and contrastdistortion. The dynamic range of UQI is [-1,1], with Iproviding the best estimate of quality. The UQI also providesquality maps to illustrate the distribution of image quality.

B. Experiment 1: Diatoms

(a) (b)

(c) (d)Fig 3. Contrast enhancement of diatom image: (a) Original image, (b) Fuzzymorphological sharpening, (c) Unsharp masking, (d) CLAHE algorithm.

The results of applying the FMS, UJM and CLAHE algorithmsto two diatom images, Staurocons binodis and Naviculaplacentula obtained using brightfield illumination microscopeare shown in Fig.3 and Fig. 6 respectively. To determine theeffect of each algorithm on noise amplification, we use amanually extracted ground truth masks (Fig. 4) to calculate amask-oriented DV/BV variance.

Fig 4. Ground truth masks used to calculate BV/DV metrics

357

Page 4: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

The data in Table I summarizes the quantitative measuresobtained for the diatom images shown in Fig. 3. All threealgorithms show an increase in the DV over the original,however both CLAHE and UM algorithms show a highervalue of BV than the FMS algorithm, indicating greateramplification of background noise in both these algorithms.

TABLE IVARIANCE METRIcs FOR DIATOM IMAGE 1

BV DVOriginal 14.634 206.366

Unsharp Masking 58.548 516.822CLAHE 65.392 457.092

FMS Algorithm 44.261 463.824

TABLE IIUQI METRICS FOR DIATOM IMAGES

Diatom I Diatom 2Unsharp Masking 0.6278 0.7406

CLAHE 0.5605 0.6033FMS Algorithm 0.8591 0.9115

(a) (b)

(c) (d)Fig 6. Contrast enhancement of a diatom image: (a) Original image, (b) Fuzzy

morphological sharpening, (c) Unsharp masking, (d) CLAHE algorithm.

(a) (b)

Fig 5. Enlarged region of interest from Fig.3.

The images in Fig.5a and 5b show enlarged regions-of-interest(ROIs) extracted from Fig. 3a and 3b respectively. Visualassessment shows a definite increase in the "Crispness" of theFMS image, especially along the boundary of the diatom: the (a) (b)darker regions of the image have become darker, and thecorresponding light regions have become lighter. A seconddiatom is shown in Fig.6. The FMS algorithm scored thehighest UQI metric, and enlarged ROIs from each of theimages are shown in Fig.7. The CLAHE algorithm hasenhanced the contrast significantly, at the expense ofdarkening some of the inner features and causing them tocoalesce. The UM has sharpened the image at the expense ofaccentuating noise in the image. The results of the FMSalgorithm, whilst having a modest sharpening effect, havelittle influence on the noise in the image. In fact the effect isalmost to increase acuity by region homogenization. Thecorresponding variance metrics are shown in Table III. (c) (d)

Fig 7. Enlarged region of interest from Fig.6. (a) Original image, (b) Fuzzymorphological sharpening. (c) Unsharp masking, (d) CLAHE algorithm.

358

Page 5: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

UQI METRICS FOR FINGERPRINT IMAGES

TABLE mVARIANCE METRICS FOR DIATOM IMAGE 2

OriginalUnsharp Masking

CLAHEFMS Aleorithm

_BV

I 41.1786

_DV_84.621

234.834_552.725

140.4626

Unsharp MaskingCLAHE

FMS AlgonthmIC. Experiment 2: Fingerprint images

The second experiment is performed using two degradedfingerprint images. Fingerprints exhibiting poor quality, e.g.low contrast images where the ridges are not well defined,parallel ridges are not well separated, or distortion of the ridgestructure, are less likely to produce a successful match. Oneof the ways of improving the quality of such images isimproving the acuity and clarity of the ridge structures.Consider the low-quality fingerprint shown in Fig.8, depictinglow contrast between ridges and valleys.

(a)

(c)

(b)

TIMAGE 1l0.7878l0.6908l0.9044

TIMAGE 2l0.8049l0.7017I0.9051 I

(a) (b)

(c) (d)Fig 9. Contrast enhancement of fingerprint image: (a) original image, (b)Fuzzy morphological sharpening, (c) Unsharp masking, (d) CLAHE

The results for a second fingerprint is shown in Fig.9,depicting ridges which are not well separated and a non-uniformly background region. Fig. 10 shows thecorresponding quality map for two of the enhancementmethods, with dark regions signifying regions of perceivedlow quality.

(d)Fig 8. Contrast enhancement of fingerprint image: (a) original image, (b)Fuzzy morphological sharpening, (c) Unsharp masking, (d) CLAHE

The FMS does not produce any great increase in contrast, butneither is that its directive. Due to the difficulty in generatinga ground truth for fingerprint images, we have used the UQImetrics exclusively as measures of improved image quality.Results are given in Table IV. Not surprisingly, the FMSalgorithm has the highest UQI metric, as it is most similar tothe original image, there has been minimal noise or contrastaccentuation.

(a) (b)Fig 10. UQI quality maps for Fig,6b (FMS) and Fig 6d (CLAHE)

TABLE IV

359

Page 6: [IEEE NAFIPS 2005 - 2005 Annual Meeting of the North American Fuzzy Information Processing Society - Detroit, MI, USA (26-28 June 2005)] NAFIPS 2005 - 2005 Annual Meeting of the North

(a) (b)

(c) (d)Fig 11. Enlarged region of interest from Fig.9: (a) original image, (b) Fuzzy

morphological sharpening, (c) Unsharp masking, (d) CLAHE

Regions of interest have been selected from the fingerprints inFig. 9, and enlarged to show detail (Fig.l l). Fig I c depictsthe result from the UM algorithm. A limited sharpening ofdetails is obtained, however at the expense of an increase innoise amplification. The result of the CLAHE algorithm(Fig. lI d) has significantly improved the contrast of the ridges,but has also sharpened the noise within the valleys. The resultof FMS algorithm (Figl lb) shows moderate enhancement ofcontrast, but the ridges details are sharply reproduced, withlittle effect of noise. A better result could no doubt beachieved using directional linear fuzzy structuring elements, inorder to better match the linear form of the ridges in thefingerprint.

VI. CONCLUSION

This paper has introduced a novel algorithm for contrastenhancement in the context of image sharpening which isbased on the principles of fuzzy morphology. There is nodoubt that the size and shape of the fuzzy SE used will affectthe result of the image sharpening. In a global sense the resultsshow images which have been sharpened without many of theside-effects of techniques such as CLAHE and unsharpmasking. The experiments shown make exclusive use of thenorma-function, as it was felt that other fuzzification operatorssuch as the S-function would disproportionately alter thecontrast of the image. An extension of this algorithm might beto investigate membership functions which could be used toadd a component of contrast enhancement in addition to the

image sharpening. The caveat of evaluating enhancementalgorithms lies in the choice of performance metrics. Manymetrics such as mean-squared error (MSE) do not accuratelyreflect the enhancement which has occurred within an image.For example, the metrics used for evaluating the fingerprintsdo not adequately reflect the ridge-valley structure, and it maybe better to use a metric which is directed towards the type ofapplication, in this case, maybe directional contrast [13].

ACKNOWLEDGMENT

We would like to thank Norman Andresen for makingavailable the diatom images.

REFERENCES

[I] D. T. Puff, E. D. Pisano, K. E. Muller, R. E. Johnston, B. M.Hemminger, C. A. Burbeck, R. McLelland, and S. M. Pizer, "Amethod for detemination of optimal image enhancement for thedetection of mammographic abnormalities," Journal ofDigitalImaging, vol. 7, pp. 161-171, 1994.

[2] V. Goetcherian, "From binary to grey tone image processing usingfuzzy logic concepts," Pattern Recognition, vol. 12, pp. 7-15,1980.

[3] 1. Bloch and H. Maitre, "Fuzzy mathematical morphologies: Acomparative study," Pattern Recognition, vol. 28, pp. 1341-1387,1995.

[4] A. Kaufmann and M. M. Gupta, Fuzzy Matlhematical Models inEngineering and Management Science. Amsterdam: North-Holand, 1988.

[5] M. C. Maccarone, M. Tripiciano, and V. Di Gesu, "Fuzzymathematical morphology to analyse astronomical images,"presented at Intemational Conference on Pattem Recognition,1992.

[6] G. Matheron and J. Serra, "The birth of mathematicalmorphology," presented at International Symposium onMathematical Morphology VI, Sydney, Australia, 2002.

[7] M. Koppen, K. Franke, and 0. Unold, "A tutorial on fuzzymorphology," Fraunhofer IPK Berlin, Berlin, Germany.

[8] P. Soille, "A note on morphological contrast enhancement," Ecoledes Mines d'Ales & EERIE, Nimes Cedex, France, TechnicalReport 1997 1997.

[9] M. Wirth, J. Lyon, and D. Nikitenko, "Nonlinear enhancement ofmammograms using area morphology," presented at SPIE MedicalImaging: Image Processing, San Diego, USA, 2004.

[10] G. Ramponi, N. Strobel, S. K. Mitra, and T.-H. Yu, "Noniinearunsharp masking methods for image contrast enhancement,"Journal ofElectronic Imaging, vol. 5, pp. 353-366, 1996.

[11] z. Wang and A. C. Bovik, "A universal image quality index,"IEEE Signal Processing Letters, vol. 9, pp. 81-84, 2002.

[12] H. du Buf, M. M. Bayer, S. J. M. Droop, R. Head, S. Juggins, S.Fischer, H. Bunke, M. Wilkinson, J. Roerdink, J. Pech-Pacheco, G.Cristobal, H. Shahbazkia, and A. Ciobanu, "Diatom identification:A double challenge called ADIAC," presented at IntemationalConference on Image Analysis and Processing, Venice, Italy,1999.

[13] S. Joun, H. Kim, Y. Chung, and D. Ahn, "An experimental studyon measuring image quality of infant fingerprints," presented atKnowledge-Based Intelligent Information and EngineeringSystems, Oxford, UK., 2003.

360