A note on parametric image enhancement

A note on parametric image enhancement

0031 3203/87$300+ .00 PergamonJournalsLid. ~C'1987PatternRecognitionStx:lety Pattern Recognition.Vol.20,No.6. pp.617 621,1987. Printedin GreatBritai...

282KB Sizes 5 Downloads 77 Views

0031 3203/87$300+ .00 PergamonJournalsLid. ~C'1987PatternRecognitionStx:lety

Pattern Recognition.Vol.20,No.6. pp.617 621,1987.

Printedin GreatBritain.

A N O T E ON PARAMETRIC IMAGE E N H A N C E M E N T J. D. Tunas Department of Mathematical Sciences, University of Arkansas, Fayetteville, AR 7~701, U.S.A. (Received 19 March 1987)

Ai~tract--A method for defining image enhancement operators based upon a parametric family is considered. This family of operators can be used for either context-free or context-sensitive enhancement that can be used either locally or globally. A modification of this procedure is suggested whereby the estimation of the parameters is performed using statistics which allow for efficient use of cellular or neighborhood image processors rather than those computed using the usual arithmetic operations. Context-free Robust estimators

Context-sensitive

Beta distribution

1. INTRODUCTION

g~ = ( M - m)P,~[O,~] + m

In a recent survey of digital image enhancement procedures, Wang et al. °) stated that the primary purpose of digital image enhancement is to improve picture quality thereby improving human vision ability and increasing the chance of success in automatic picture processing. Enhancement techniques are fairly diverse and are related to the areas of spatial smoothing, gray-level modification, edge enhancement and filtering. This paper is restricted to gray-level modification for use in automatic image processing. That is, let G = {go} denote the original observed image and go is the gray-level at pixel (i, j ) then the objective is to determine an operator .~r such that the rescaled pixel at location (i, j) given by

o;j = ~(g,j)

(t)

satisfies the criterion suggested by Wang et aL I" The operator or function ~ is said to be context-free if it is chosen a prior and independently of the original image

G..9r is said to be context-sensitive if it is dependent upon the image G. ~ is said to be either global or local, depending upon whether or not its domain is the entire image or some subimage. The literature contains a wide variety of procedures for generating the operator ~" and their uses in many diverse applications. Most of these operators are global and context-sensitive. For example, a commonly used method is based upon an estimate of the gray-level probability distribution function. That is, let/~(z) denote an empirical estimate for the cumulative probability distribution function, given by Po(z) = P r I G ~_ z].

Neighborhood processors

(2)

(3)

where m = min (g~j) and M = max (go). Operators of

this type are often adequate for most image enhancement needs; however, their utility diminishes as the requirement for real-time processing increases. Cocklin et al. (~) considered an application whereby the above type of enhancement procedure was modified. They noted that in order to obtain quality imagery from chest radiographs for effective diagnostics it is necessary to be able to define operators which are both local and context-sensitive. The methods were based upon local histogramming and proved satisfactory as long as the processing time was not a limiting factor. In the event that the processing time does become a crucial factor, the enhancement operators are often approximated and incorporated in a table-lookup scheme. Hence, the procedure becomes context-free and somewhat ad hoc, in that the determining selection criteria are primarily based upon human perception and interpretation. An alternative approach would be to define a family of parametric operators where these parameters can either be predetermined (context-free) or easily estimated from the original image data (contextsensitive). This paper considers such a class of operators whose parameters can be expressed as simple functions of the sample moments. The paper also suggests a procedure for replacing these estimates by values which are easily computed using neighborhood or cellular processors.

2. PARAMETRIC ENHANCEMENT OPERATORS

In this section, the estimates of the cumulative nrnh2hilitv di~trihntlnn fllnctinn ~ntt r,nrr~eru~ntlino

J.D. Tua~

618

distribution functions. This type of procedure has been used in the literature. For example, Wang et alY ) mention a procedure based upon the gamma function [Fig. 5.1, p. 372] although they did not indicate how the curve or function was obtained. A second example is given in Cocklin et al. a) where they considered a special class of the gamma distribution function called a finite Rayleigh distribution [equation (16), p. 73]. Both of these functions allow for variable shape in the grey-level histograms and are completely determined whenever the underlying parameters are specified. However, since both of these functions are positive on the positive real line, they are truncated to fit the gray-level values. Rather than use a family of functions which are positive on the positive real line, one could easily accomplish the enhancement using a family of distributions given by the probability density function, fb(U) =

(u - a ~ ' - ~(b - u ) ~ - '

(4)

B (a, fl)(b - a)" + # - J

flU'-I (1 - u)#-Idu for a-- 0 and B(a, fl)- j0 = F(a)I'(fl)/F(a+ fl).This family allows for variable shape p.d.f,which are positive over the finiteinterval (a,b) (cfJohnsOn and Kotz~3)).If the original gray-level values, denoted by O#, are defined in the interval (a =- m, b -- M ) then by letting u = (O~ - m)/(M

- m)

(5)

the standard beta density function given by f(u) = B(~t,fl)-'u s- '(I - u)#- '

(6)

for 0 ~ u ~ I can be used to define the enhancement operator in equation (3).That is,let

to define context-sensitive enhancement operators. Even though ~ and fl are functions of the simple sample statistics, there are some applications which use processors where the above computations are not very efficient. The next section considers a procedure for replacing the sample estimates ~ and F by other sample estimates which can be computed efficiently using neighborhood processors rather than arithmetic processors. 3. PARAMETER E S T I M A T I O N W I T H N E I G H B O R H O O D PROCESSORS

This section considers some short-cut or computationally simple procedures for estimating the mean and variance, hence, the parameters ~ and ~. Although the mean and variance are already computationally simple, there are processors in real time vision systems which are not efficient in routine arithmetic operations. For example, processors which are based upon cellular automata or neighborhood processing using mathematical morphological type operations [cf., Serra(()]. These processors allow for the computation of local, e.g. 3 x 3 cells, minimums and maximums as well as more sophisticated operations. In the event that one is using this type of processor, there are some simple statistical procedures for estimating the scale and location parameters. For example, one can select k n x n random cells within the original gray-level image. Within each of these k cells, compute the simple order statistics: rain, max, and either the median or midpoint between the rain and max depending upon which is easier to compute. This is, let w~-m a x j - min~ and m~ = median or (max~ + min~)/2 for cell i, i = 1,..., k. Then the values of ~ and s in equation (8) can be replaced by rh and ~/dn, respectively, where

P(u)=l.(~[~)=B(#,f)-'f:t~-'(1-t)#-'dt. (7)

l,(a, fl) is called the Incomplete Beta Ratio whose computational values are readily available using many existing software programs. Procedures for estimating the unknown parameters a and fl are well documented. One would normally use the maximum likelihood estimates, however, they are computationally restrictive for applications considered in this paper. Instead the method of moments can be used to provide a satisfactory solution for most enhancement needs. The first two moments are expressed by tz = a/a + fl and 02 =

,,(a + 1)

/~2. (8)

(~ +/~)(~ + B+ 1) The moment estimates are given by = ~2(1 -

~)/~

-

= fi(l -- ~)/s: - 1 -- ~

(9)

where ~ = ( # - m ) / ( M - m), s ~ = s2J(M - m) ~, 0 is the sample mean and ~ is the sample variance of the

k

k

= ~ m/k, ~ -- ~ w,/~ and d, is a specified constant i-|

i-I

depending upon the number of pixels in each of the k cells. David (5) has shown that both ~ and # / d , are effective quick measures for the location and scale parameters, respectively. Furthermore, these estimates are fairly robust to non-normal or skewed distributions whenever the sample sizes (number of pixels, N, in each cell) are small. Mantel (6) demonstrated that one could approximate the constant d, by N u: = n if the cells were chosen to be n x n. Thus, if the processor is using 8-neighbor cells, the scale parameter s in equation (8) is replaced by ~/3. In order to demonstrate the robustness of the statistics, • and ~,, random variables were generated from different families of the beta distribution. The beta parameters used in the simulation are given in Table 1. Table 2 contains the values, ~ and ~, vs the true population mean, ~ where ~ is the average of the cell sample means of the k = 5 cells. The experiment was replicated five times and 3 x 3 cells were used in all the simulations. Table 3 summarizes the results for and ~,/3 vs the true scale parameter, ¢, where $ is an

Parametric image enhancement Table 1. Parameters for the simulation =

fl

~

_,/~*

o

619

Table 3. Results for scale parameter

f12*

fl

=

a

g rain

3 3 3 3 I 0.5 1 2 2 9

3 2 I 5 I 0.5 2 1 9 2

0.50 0.60 0.75 0.86 0.50 0.50 0.33 0.67 0.18 0.82

0.189 0.200 0.194 0.165 0.289 0.354 0.236 0.236 0.111 0.111

0. -0.281 -0.861 - 1.570 0. 0. 0,566 -0,566 0.879 0.879

2.33 2.35 3.09 5.22 1.80 1.50 2,40 2.40 3.65 3.65

3 3 3 3 1 0.5 1 2 2 9

3 2 1 0.5 1 0.5 2 I 9 2

0.189 0.200 0.194 0.165 0.289 0.353 0.235 0.235 0.111 0.111

~t3 max

0.160 0.212 0.169 0.207 0.177 0.210 0.098 0.150 0.277 ' 0.338 0.367 0.386 0.205 0.248 0.192 0.255 0.101 0.145 0.098 0.130

min

max

0.159 0.172 0.171 0.098 0.274 0.304 0.184 0.177 0.095 0.096

0.212 0.200 0.195 0.145 0.298 0.321 0.238 0.253 0.141 0.130

*(flJ, f12) are the common parameters for the Pearson system of distributions.TM Table 2, Results for location parameter

3 3 3 3 1 0.5 1 2 2 9

3 2 1 0.5 1 0.5 2 1 9 2

0.50 0.60 0.75 0.86 0.50 0.50 0.33 0.67 0.18 0.82

min

max

rain

max

0.47 0.55 0.71 0.85 0.45 0.40 0.30 0.64 0.15 0.79

0.55 0.62 0.78 0.92 0.49 0.58 0.36 0.73 0.20 0.82

0,48 0.54 0.75 0.88 0.40 0.46 0.24 0.65 0.12 0.80

0.54 0.64 0.82 0.95 0.54 0.61 0.33 0.78 0.16 0.84

cells. ~ a n d g were included in b o t h tables for completeness. It should be n o t e d that this simulation study was by no m e a n s m e a n t to be exhaustive or conclusive. Its sole intent was to d e m o n s t r a t e the feasibility of using • and ~, as p a r a m e t e r estimates for a class of finite n o n - n o r m a l distributions. Figures 1 - 4 are plots the e n h a n c e m e n t operator, ~ ' , as given in e q u a t i o n (7) w h e n e v e r m = 0 a n d M = 1. These g r a p h s were generated using the p a r a m e t e r estimates for = a n d fl as functions of the values given in Tables 2 a n d 3. T h e solid line was generated using the true p o p u l a t i o n parameters. T h e points indicated by x was generated using t h e usual sample m o m e n t s ~ a n d

I 0

0.2

0.4

I

06

x Fig. 1. Enhan~ment o~rator

Q8

I

~ r = = 3 a n d fl = 3.

/ 0.8 --

06-

0,4

0,2--

0

0.2

I

I

0,4

0.6

X

1

0.8

I I

620

J.D. Tusas

'F

0

J'

0.2

04

0.6

0.8

I

x Fig. 3. Enhancement o p e r a t o r for = = 1 and fl = I.

}F

08

L

~

_-

--

-

--

-

-

--4

°/

06

04

02

0

I

I

1

I

J

0.2

0.4

0.6

08

I

Fig. 4. Enhancement operator for a = 2 and//= 9.

£ The points indicated by [] were generated using the estimates r~ and g,/3. The values of ,, and fl used in generating these Figs are (3, 3), (3, 1), (1, 1) and (2, 9). These were chosen because of the differences in shape. The Figs illustrate that the sample procedures are completely satisfactory for most enhancement needs. Indeed the graphs suggest that one could estimate the parameters using randomly selected cells using either of the two estimation procedures. SUMMARY

A parametric procedure for image gray-level enhancement is presented. The procedure was based upon using the beta distribution. Although the paper does not contain any new statistical concepts or methodologies, the procedure does have some properties which are desirable in some applications for machine vision systems. For example, the parameters are easily computed using both arithmetic and neighborhood processors. Since the enhancement operator is a function oftwo parameters which are easily estimated, the procedure allows for the needed flexibility to be used in real time

to be "trained" in an adaptable mode for varying industrial applicationsfl ) Since the enhancement operator depends upon the computation of the incomplete beta distribution ratio (equation (7)), it may appear to be too complicated to be suitable for real time systems. However, these values could easily be computed and stored for use in a table look-up scheme where the appropriate operator could be selected after having computed estimates for the parameters as indicated in Section 3. Depending upon how these statistics were estimated, the operator could either be context-free or sensitive and either local or global. REFERENCES

1. D. C. Wang, A. H. Vagnuc~i and C. C. Li, Digital image enhancement: a survey, Comput. Vision Graphics Image Process. 24, 363-381 (1983). 2. M. L. Cocklin, A. R. Gourlay et al., Digital processing of chest radiographs, Imaoe Vision Comput. !, 67-80 (1983). 3. N. L. Johnson and S. Kotz, Distributions in Statistics Continuous Univariate Distributions--2. John Wiley, New York. 4. J. Scrra, Stercology and structuring elements, J. Microscopy 95, 93-103 (1972). 5. H. A. David, Order Statistics. John Wiley, New York

Parametric image enhancement 6. N. Mantel, Rapid estimation of standard errors of means for small samples, Am. Statistician 5, 26-27 (1951). 7. Q. A. Holmes (1984). Private correspondence. S.O.V., Ann Arbor, MI.

621

8. E. L. Hall, Computer Image Processing and Recoynition. Academic Press, New York (1979). 9. A. Rosenfeld and A. C. Kak, Digital Picture Processiny. Academic Press, New York (1982).

About the Author--J. D. TUBBS is currently an Associate Professor in the Department of Mathematical Sciences at the University of Arkansas. Prior to coming to the university, he spent two years working on problems using remotely sensed data. More recently, his interests are in the areas 6f real-time vision processing in either industrial or target related systems.