Fuzzy Sets and Systems 36 (1990) 157-165 North-Holland
157
A N I N F O R M A T I O N M E A S U R E F O R A C O L O R SPACE* X I E Wei-Xin Northwest Telecommunication Engineering Institute, Xi'an, China
Received June 1988 Revised November 1988 Abstract: An ideal image processing system should match with that of human vision. In this
paper, we describe the human perception of colors by a set whose elements possess multiple properties with fuzziness. Based on the information measure of the set, we analyse the information in a color space. The results given show a relationship for the percentage of available information versus the number of quantized levels. Our quantitative measures are helpful for the study of image processing and computer vision. Keywords: Fuzzy sets; measure of fuzziness; human vision; image processing.
1. Introduction In general, all kinds of images are viewed by h u m a n eyes. O n e can consider a whole image processing system to be c o m p o s e d of a machine system and the human vision system. A n ideal machine system should match with the h u m a n vision system. Therefore, we must know how to analyse the h u m a n vision characteristics in order to optimize image processing systems and c o m p u t e r vision systems. It is important to discuss the m a n - m a c h i n e matching in quantitative measures of image quality. All available image quality measures must be connected with subjective evaluation. I m a g e intelligibility is an important subdivision of image quality; it denotes the ability of man to extract relevant information from an image. Clearly, it is desirable to formulate quantitative measures of image intelligibility as a basis for the design and evaluation of image systems. The quantitative measures could form the f r a m e w o r k for the optimization of image processing systems. H o w e v e r , the measures that have been developed are not perfect [6]. The key to the formulation of improved image quality measures is, no doubt, a better description of the h u m a n visual system. Fuzzy set theory has been applied in image processing and c o m p u t e r vision (for example, see [5] and [2]). Based on the theory of fuzzy information, we have mentioned the information of gray-tone images [8]. In this paper, we discuss the information of a set whose elements possess multiple properties with different degrees of fuzziness, and then analyse the information of a color space. Finally, theoretical results are interpreted with some typical vision data. * Project supported by the National Natural Science Foundation of China. 0165-0114/90/$3.50 (~) 1990, Elsevier Science Publishers B.V. (North-Holland)
Xie Wei-Xin
158
2. Information measures of fuzzy sets
Given a universe X and a property P, suppose the elements of X possess P in degrees. Map #A'X"-*[O, 1] describes a fuzzy set A. Suppose A is finite. A is expressed as
n
A=LJI, tA(Xi) IXi, n = l , . . . , N ,
VxeX.
(1)
The entropy of A is defined [5] as N
with Shannon function S(p) = -/~ log/u - (1 -/~)log(1 - P).
(3)
The information contained in A can be considered as [8]
Ut(P~, Po, It) = Hs(P~, Po) + Hf(t~) 1
u
= -,°1 log P, - P0 log eo + ~ ~ S(UA(Xi)).
(4)
l*e i = l
Here, Hf(/u) is the entropy of A, Hs(p~, Po) is the Shannon entropy of the nearest ordinary set, denoted by fi~, of A. p~ (p~ i> 0) denotes the probability with which the elements in A having grade of membership 1 will occur. P0 (P0 ~>0, P0 + P~ -1) denotes the probability with which the elements in .4 having grade of membership 0 will occur. Ht is comprised of two parts. One is the average amount of Shannon information arising from the randomness of the two kinds of events in the ordinary set .4, and the other is the average amount of fuzzy information arising from the fuzziness of the fuzzy set A relative to its ordinary set A. Given a universe X and M independent properties P " (m -- 1. . . . . M), and given /~A,~:X--*[0, 1],
m=l .....
M,
(5)
denote E : X ~ [0, 1]m,
(6)
where
E=[ IAAi(X)], VxiEX.
(7)
LUAAx,)_I The elements of the M x 1 matrix are the degrees with which xi possesses the M properties [4]. When M = 3 and/~,4m = {0, ½, 1}, we have the structure of a lattice as shown in Figure 1. The lattice has 2M = 8 vertices without fuzziness (000, 001, 010, 011, 100, 101, 110, 111), which fully possess some of the properties, but no other properties.
Information measure for color space
159
1111
110
~
1 ~0
02
Oll
~-Xlll
1
0~1
01 2 2" - 01 11 001 1
~000 Fig. 1. A lattice for M = 3 and /~A~= {0, ½, 1}.
Let us now discuss the information in E. Suppose we remove the uncertainties in E using a decision chain which includes M experiments. In the first experiment, the uncertainties of fuzzy set A are removed and the following information is obtained:
Ht(PA', P~', ~A,)
=
Hs(PA', pA,) + Hf(/AA,) '
(8)
where pA, and p~' are the probabilities with which two kinds of elements in the nearest ordinary set of A, will occur, respectively. Then in the second experiment, the uncertainties of fuzzy set A2 are removed, and so forth. After finishing these M experiments, all uncertainties in the M fuzzy sets are removed. Thus, the information in E, denoted by HT, is M
Ha- = ~
[Hs(pA%
PAn')+ Hf(IZAm) ],
(9)
m=l
where, Hf(~Am) is given by Eq. (2), and
Hs(P¢m, p.~m)=.pAm
Hs(pA% pA,~) is given by
log pare _ pare log pA..
(10)
3. Information measure o f a color space
Based on the trichromatic color vision, it is possible to match an arbitrary color by superimposing appropriate amounts of three primary colors. It has been determined that there are three basic types of cones in the retina. These cones have different absorption characteristics as a function of wavelength with peak absorptions in the red, green, and blue regions of the optical spectrum. The existence of the three types of cones provides a physiological basis for the
160
Xie Wei-Xin 12~r~en e~an~ G ~ R [ I~lackl
yellow.
l:,ed
I V °/
.agenta
Fig.2. Colorspacefortypicalred,green,blueprimaries. trichonomatic theory of color vision. The three types of cones perceive three tristimulus values of three primary colors, respectively. The three tristimulus values can be considered to form the three axes of a color space. A particular color may be described as a vector in the color space. The coordinates of the vectors specify the color [6]. A color space for typical red, green, and blue primaries is illustrated in Figure 2. In a color image quantization system the source image is described by source tristimulus values R, G, B which are quantized. A quantizer partitions the color space of the color coordinates into quantization cells and assigns a single color value to all colors within a cell. Denoting the quantized color space by C, we have
C=UUUc~jk,
i=O,...,I-1;j=O
i ./ k
..... J-1;k=0 ..... K-1.
(11)
i, j and k represent the quantization levels of tristimulus values R, G, and B, respectively. Ciik represents a quantization cell of the color space. Pal and King have mentioned [9] that a monochrome image can be considered as a fuzzy set I according to the perception of brightness by human vision. The fuzzy set I is described by /2,(1) :X--~ [0, 11,
Vle X,
(12)
where X - - { 0 , 1 , . . . , L - 1 } , ! represents the quantization gray level whose value varies from 0 (black) to L - 1 (white), and /h(l) represents the degree of the l-th element possessing the brightness property. For a color image, the three primary colors R (red), G (green), B (blue) can be considered as three properties perceived by human vision. According to Eq. (6), we may consider the color space described by Eq. (11) to be a set E given by E:C---~[0, 1]3,
VCijkeC,
and
Ir~R(Cijk)]
E = |/Zo(Cek )
,
(13)
L I~B(C#k) where ~'~R('), ~'~G(°) and /~B(') represent the degrees of cijk possessing the properties R, G, and B, respectively.
Information measure for color space
161
From Eq. (9), the information HT of the color space is found to be
HT = Hs(PR, pR) + Ht(#R) + Hs(P?, P°o)+ Ht(Uo) + Hs(P~, P~) + Hr(#a). (14) As mentioned previously, Hs(') and Hi(') are defined by Eqs. (10) and (2), respectively. From Eq. (2) we have 1 nf(#R)
IxJxK-=
1--1J--1 K--1
,~=oj=ok=o ~ ~'~ S(#g(%k)).
(15)
Because the value of #a(%k) only depends on i, Eq. (15) can be simplified as 11-1
Hf(#R) = ~
,~=oS(gR(Ci))'
(16)
where i represents the quantization level of R, #R(i) represents the degree of the i-th level possessing the property R and #a(i) ~ [0, 1]. In our discussion we assume that the occurrence probabilities of all cells in the color space are equal. Thus, the occurrence probabilities P~ and P~ of two kinds of elements in the nearest ordinary set of the fuzzy set described by #l~('), are equal [8], I.e., " PlR _--Poa _ 1. From Eq. (10) we have -
-
Hs(e~, Port) = 1.
(17)
In a similar manner, for properties G and B we have 1J--1
n,o,o) = 7
•1 j=O
s o , o(j)),
(18)
1 K--1
H,O,O
(19) k=O
and
H s ( e ? , eo = 1, Hs(PB, VoB) = 1,
(20) (21)
where j(k) represents the quantization level of G (B), #G(J) (#B(k)) represents the degree to which the j-th (k-th) level possesses the property G (B) and #c(J) e [0, 1], #B(k)e [0, 1]. P~ and P0G (P~ and P0B) denote the occurrence probabilities of two kinds of elements in the nearest ordinary set of the fuzzy set described by #to(') (#B(')), respectively. Substitituing Eqs. (17), (20) and (21) into Eq. (14) yields HT = 3 + Hf(gR) + Hf(#G ) + Hf(#G).
(22)
HT represents the information contained in the color space. It is interesting to note that the first term in the right side of Eq. (22) is the value of Shannon entropy which is yielded when the 'sharp' vertices (000), (001), (010), (011), (100), (101), (110), (111) occur with equal probabilities.
Xie Wei-Xin
162
4. Results and discussions In order to compute the information in the color space, one needs to determine the membership functions /~R('), / ~ ( ' ) , and /~B('). In [9], we have mentioned a method for valuation of membership function for gray levels based on information equivalence and we have shown that the membership function can be described with an asymmetric S-function as follows: ~(t) = 0
for l = O,
forO<~l <~kfl, =1-
2[[ ( 2 - k ) ( L - 1 ) J ]2 forka l L-1,
= 1
for I = L - 1,
(23)
where fl = I(L - 1), k = 376/255. The curve of/~(l) is plotted in Figure 3. With the method of information equivalence we have also studied the membership functions for the three tristimulus values. Our experimental results show that ga('), /~G('), and /~B(') have the same form of the asymmetric S-function given by Eq. (23). In a digital image system the red, green and blue tristimulus values are linearly quantized into I, J, and K levels, respectively. Usually digital image system manufactures provide the same number of levels for each of the three primary colors, i.e., I = J = K. Thus the number N of the quantization cells in the color space is N=I.J.
K = I 3,
(24)
The information HT in the color space as a function of N is illustrated in Figure 4. The normalized value HT/HTmax is illustrated in Figure 5. HTmax represents the
i 1.00
0.90 0.80 0.70 0.60 0.50 0.140 0.30 O.J2C
0.10 0,
L-1
Fig. 3. The membership function for gray levels as an asymmetric S-function.
Information measure for color space
163
4.80
4.50
4.20
3.90
J
3.60
3.30
3.00
ld2
s×,'o,
5×i0~:b~
,~,
~×'Io,
LN
Fig. 4. The information H T in a color space as a function of the number N of quantization cells.
l 1.00(
2
3
4
~
L(Bits)~
Hr/Hr~,,
0.950
0.90(
0.85(
0.800
0.75C
0.700
0.650 I~(Bits)~---.-..,~
Fig. 5. The normalized
valUe HT/HTmax.
~,
164
Xie Wei-Xin
information in the color space when the quantization cells are infinitesimal, and HT represents the information in the color space when N is limited. Therefore, Hr/HTmax represents the information availability of the color space when the number of quantization cells is limited, and 1-H'r/HTm~,, represents the information loss of the color space imposed on human vision from the insufficiency of quantization levels. Figure 5 shows that the information availability of the color space increases with growing number of quantization cells. It increases rapidly with N lower than 9 bits. When N ~> 9 bits, no significant increment of the information availability occurs. In view of information availability, it is not necessary for N to be too large. The human eye resolves about 4000 different colors [1]. Intrinsic noise, generated within the vision system, places a limit upon intensity discrimination [7]. Figure 4 shows that the incremental value AHT caused by an incremental value AN is very small when N > 4000, It is difficult for the information system of human vision to discriminate this very fine variation of AHT because of the interference of the intrinsic noise. Thus the number of the resolved colors is limited. One of the most accepted color standards, the Munsell color system, has about 1500 color samples. As a result of our analyses, the value of HT/HTma:,is 0.965 for N = 1500, illustrating that it is reasonable to use the about 1500 colors offered by the Munsell system over the last forty years instead of thousands of possible achieved colors. Our results show that HT/HTmax> 97% for N = 12 bits (I = 4 bits), HT/HTmax> 99% for N = 21 bits (I = 7 bits). Therefore, from these quantitative measures of information one can see that good color image quality can be achieved if the number N of the quantization color cells is larger than 12 bits, and we should let N be larger than 21 bits for getting an excellent color image quality. Based on analysis of information in a color space, we may develop quantitative parameters which optimize an image processing system or a computer vision system. 5. Conclusions The final receiver of image information is a human vision system. One should consider an image machine system and the human vision system as a whole, and let both match with each other. We have described the perception of colors by humans by a fuzzy set model. Based on the information measures of fuzzy sets, we have analysed the information in a color space and discussed the relationship for the information availability in the color space versus the number of quantization levels of the three tristimulus values. The proposed information model provides a quantitative description of image quality and is helpful for studies of image processing and computer vision. References [I] R. Clouthier and H.C. Andrews, Advances in image processing open new applications, Computer Graphics World 6 (1981) 51-56.
Information measure for color space
165
[2] R. Jain and S. Haynes, Imprecision in computer vision, Computer 15 (1982) 39-48. [3] L. De Luca and S. Termini, A definition of a non-probabilistic entropy in the setting of fuzzy sets, Inform. and Control 20 (1972) 301-312. [4] L. De Luca and S. Termini, Entropy of L-fuzzy sets, Inform. and Control 20 (1974) 55-73. [5] S.K. Pal and R.A. King, Image enhancement using smoothing with fuzzy sets, IEEE Trans. Systems Man Comput. U (1981) 494-501. [6] W.K. Pratt, Digital Image Processing (John Wiley & Sons, New York, 1978). [7] M.V. Srinivasan and et ai., Predictive coding: a fresh view of inhibition in the retina. Proc. Royal Society (London) Ser. B 216 (1982) 427-459. [8] W.X. Xie and S.D. Bedrosian, An information measure for fuzzy sets, IEEE Trans. Systems Man Comput. 14 (1984) 151-156. [9] Wei-Xin Xie and S.D. Bedrosian, Experimentally derived fuzzy membership function for gray levels images, J. Franklin Inst. 325 (1988) 154-164.