Vous êtes sur la page 1sur 6

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856

Daylight Color Model for Outdoor Machine Vision in Bandar Abbas, Iran
Sahragard, Nasrolah
Department of Electrical and Computer Engineering, Hormozgan University, Bandar Abbas, Iran Km 9 Minab Road, p.O.Box 3995 Bandar Abbas, Iran

Abstract: One key factor essential for most outdoor machine


vision applications mainly those which are based on color recognition is accurate modeling of daylight and surface reflectance. Previously developed CIE daylight model has three drawbacks that limit its use in predicting the color of incident light for outdoor machine vision. Lack of considering ambient light, effects of light reflected off the ground and lack of context information account for these deficiencies. Color models which are developed for North America and Malaysia may not be suitable and reliable for other places in the world. A model of reflectance comprising diffuse and specular reflection is also needed to predict color in outdoor environment. In this paper, a daylight color model showing the color of daylight for different range of sky conditions is developed that is applicable to weather conditions of the city of Bnadar abbas. This daylight color model could be later used along with a surface reflectance model to estimate the color of surfaces in outdoor machine vision images. Keywords: Color imaging, colorimetry, color models, glossy reflection, surface reflection functions

Different models of surface reflectance are described by Dana [18], Nicodemus [19], and Horn [2]. Their models are built by a bidirectional reflection distribution function called (BRDF) that describes how light in a given direction is reflected off a surface at specified orientation. Because of the composition of incident light and surface characteristics, different spectra of light are reflected at different surface orientations and this makes BRDF very complex. The simple Lambertian model is explained by Horn [2]. It describes the reflectance of matte surfaces as Oren and Nayar [20] and Wolf et al. [21] state. It predicts that light incident upon a surface is scattered equally in all directions where the total light being reflected is a function of the incident angle. The composite of the specular and lambertian components are used by Cook and Torrance [22] and Klinker [10] to model surfaces with specular components. For example, shafer [5] models surface reflectance as a linear combination of the diffuse and specular components, and finds weights of each component from a measure of specularity. Shafer's dichromatic reflectance model shows that color changes in RGB lies within a parallelogram, the length and breath of which are determined by the two reflectance components. Klinker [10] shows in dichromatic model, surface reflectance is of dog legged type ("" shaped) distribution in RGB. Sato and Ikeuchi [23] use temporal images to model surface components. All of these methods are based on the existence of pure specular reflection from a point source light. For the reason that daylight is an extended light source and not a point source, none of the methods discussed above could be used for outdoor images. Buluswar [24] developed color models for outdoor machine vision that predicts the color of a surface. His model is applied to outdoor images in North America under good weather condition. His models may not be valid for different geographical places with different weather environment. Humidity, fog, haze, hail, etc. will change the applicability of his models for outdoor machine imagery. A method for automatic color correction is brought about in 2004 by Gasparini and Scheltini [25]. Their method in Page 249

1. INTRODUCTION
Daylight color model and surface reflectance model are two main models in predicting surface color. An important feature of color object recognition in machine vision is color. The CIE daylight model (Commission of International Illumination 1931) [1] has deficiencies which makes it unfit for use in outdoor machine vision. These deficiencies include the effect of ambient light from the sky, the effect of light reflected off the ground, and the effect of context information. Other daylight color model [1] and surface reflectance models [2], [3], [4], [5] which are not used in the images of outdoor machine. In color constancy area under changing illumination, a major computational work is needed for color recognition. In this area, one tries to match the object colors not knowing the composition of incident light or surface reflectance. In the area of color constancy, lots of work have been done by Land E [7], D' Zumra and Iverson [12], Ohata and Hayashi [14], Yuile [9], Shafer [5], Simonds [6], Forsyth [11], Finlayson [15], Maloney and Wandell [8], Klinker et al. [10], Funt et al. [17], Novak and Shafer [13], and Funt and Finlayson [16]. But the applicability of their work has not served its usefulness in outdoor machine images.

Volume 2, Issue 2 March April 2013

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
an unsupervised way, classifies true cast and predominant color so capable of differing between required image correction and those in which chromaticity must be reserved. It is much better than white patch algorithm but it is not easily seen what the algorithm is suppose to do when the cast detector classifies an image as unclassifiable. The problem of color changes caused by variation of natural illumination from the view of intensity and spectral content has been forwarded by Merchant Tillet et al. [26]. His method is very application specific and is only tested on vegetable and soil. He used a method of transformation which provides a scalar output from a three dimensional vector input. The central wavelength for the camera filters should be known to do calculations for scalar output. This information is hard to get since the companies hold this information. Also some information is lost because of the transformation involved. This would mean some objects with different colors could transform to the same scalar output. A similarity of objects with different reflectance spectra seen as the same color called metamerism through a color camera. In 2006 Manduchi [27] came up with a color constancy algorithm for color classification with explicit illuminant estimation and compensation. His algorithm uses a lot of hand label and gather huge training data sets which makes it time consuming and impractical in real applications. Inter-reflections are not considered in his algorithm. In 2006 Ebner [28] declared a genetic algorithm for color constancy. He assumed each pixel as one processing element that computes an estimate for the local illumination given the input pixel color and neighboring elements data. He used color Mondarians for his algorithm and there is no indication of when it is applicable for use in outdoor machines. Outdoor information such as humidity, fog, and cloud were not considered in the development of the algorithm. Good results are reported but the performance on timing for such a great task is not mentioned. Explanation of algorithms and techniques for outdoor machine vision is given by Sahragard [29]. Also Lee and Devan [30] in 2008 came up with maps calculated from time-average images of individual overcasts that show their brightness distributions in unexpected details. Those maps also helped them to find the actual location of the maxima of overcasts. Their information helped them estimate the gradients of cloud thickness observed in some overcasts. Sahragard et al.[31] came up with color models for tropical regions such as Malaysia. The models have been applied for outdoor machine vision and good results have been obtained. These models are used in color correction algorithm Sahragard et al.[32]. . However, the daylight model may not work for Bandar Abbas for two reasons i)the sun angles range in the model are not the same as the range of sun angles in Bandar Abbas city and ii)the Volume 2, Issue 2 March April 2013 model is not built under the existing weather condition in Bandar Abbas. The algorithms for color estimation and recognition are much related to outdoor machine vision. Also surface reflectance and daylight models are as important. Because of uncontrollability of outdoor weather, related algorithms may not work properly in outdoor environment. So a new daylight color model is built in HSV color space based on the weather conditions in Bandar Abbas. This new model could be used with surface reflectance function to predict the color of a surface.

2. CIE DAYLIGHT MODEL


The important factors that cause changes to daylight color are sun angle, cloud cover, and other weather conditions. CIE model is built by Judd et al. [1] and the behavior of daylight color variation in RGB color space is shown to follow a parabola. The data used for CIE model is transformed to HSV color space to fit the intention of this paper. Figure 1 shows the schematic of quadratic equation for CIE model in HSV color space and the equation is represented as: S = - 0.25H2 + 0.91H 0.013 (1) Where 23.04 H 243.76. The linear approximation of the quadratic CIE equation is: S = 0.87 H 0.05 (2) Where 6.36 H 312.99. The schematic is shown in Figure 2.In the following figures, points located to the right of the red point where the circle origin is representing sun color in HSV color space and those to the left show the color of sky based on CIE variations in HSV space. The circle radius is one for s going from 0 to 1 radial and the brightness is seen at 1 and h that covers the whole circle angles from 0 to 360. The CIE model as it is built [1] has three main disadvantages for use in outdoor machine vision. The model does not cover large portion of ambient light from

Figure 1: CIE Model sun vs Sky

Page 250

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
Bandar Abbas city.

3. DEVELOPING DAYLIGHT MODEL


A daylight color model with 230 samples is built which is a table indexed by sun angle, percentage of cloud cover, and sun visibility. There are other entries such as brightness, temperature, and humidity. The changes in sun elevation or sun angle is from 0 to 90 and cloud cover is partitioned into four groups of 0-20, 21-50, 5170, and 71-100 representing the percentage amount of cloud in the sky. The sun visibility is indicated as 1 for visible sun, 0.5 for sun covered with thin cloud and 0 for the covered sun. The average color of the sky is also measured and populated in the table. By use of this table and another model for surface reflectance function, the apparent color of a surface can be estimated. Data is measured in RGB and then transferred into HSV color space from images of a board having a number of matte papers of different colors mounted on a tripod with angular markings of 15 along with a rotatable head with marking of 10. The middle surface on the board is matte Munsell N/9 with 98% reflectivity and is used to sample the incident light. Pictures were taken from September until February. During data collection, angular markings on the tripod are changed to vary the viewing geometry in the azimuth; images were taken at every 10-15 change in sun angle. The viewing geometry with respect to white surface on the board was approximately fixed by keeping a constant distance about 1.5 meters between camera and the surface. The camera height was also fixed to about 1.5 meters. The other table entries include average HSV over 15x15 pixels to reduce the noise, and brightness from the direction of the sun hsvsun , Brsun and away from sun hsvaway , Braway . For each of these measurements, the ndard deviations h , s , br , h_away , s_away were calculated. No of samples # taken are also mentioned. The mean sky color hsvsky is measured with the white surface facing up the sky and populated in the table. This color model table is shown in Table 1.

Figure 2: Linear schematic of CIE Model in HSV color space the sky, ground reflection, and context information. To include these factors in the model of daylight for more practicality, color models have been developed by Buluswar [25]. His model is used for estimating the surfaces color for several places in North America under clear weather conditions and its usage for other places in the world and under different weather conditions such as humidity, fog, haze, and rain etc. is not established. The goal here is to build such a model that would fit the weather conditions in Bandar Abbas with mostly hot and humid weather. The previous model fails to be useful in resembling daylight color for the following reasons. It does not cover all variations in illumination angle and it is not constructed in a hot and humid place in order to convey this information and its effects. Another daylight model is built by Sahragard [31] for Malaysia where such a humid and hot weather exist. This model cannot be used for Bandar Abbas since the geographical location is different with longitude 56.2917E and latitude 27.1861N. Malaysia has longitude 101.7E and latitude 3.1597N. Because of this reason and also to include local context information a daylight color model is built for

Table 1: Representation of Illumination color model showing hsv and brightness (Br) values for the incident light in the direction of the sun (hsvsun and Brsun) and away from the sun (hsvaway and Braway) for various conditions, along with the corresponding standard deviations and the number of samples (#). The different conditions are indexed by sun angle, cloud cover (cloud %) and the sun visibility factor (SV). Hsvsky in the last column shows the average color of the sky measured with the white surface facing up towards the sky. Sun Cloud Sun h brh-away brAngle % Visibility T* H* #

Volume 2, Issue 2 March April 2013

Page 251

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
hsvsun .2785 .2845 .3759 .5289 .1623 .3548 .2421 .1796 .3743 .4814 .1711 .3673 .1629 .1599 .3570 .1783 .0754 .3398 .2132 .0943 .3412 .3362 .0615 .3518 .3274 .0642 .0356 .3615 .0434 .3417 .3598 .0614 .3423 .3810 .0666 .3439 .5217 .0542 .3412 .4537 .0452 .3402 .4841 .0782 .3437 .4321 .0427 .3411 .5352 .0531 .3379 .4796 .0702 .3412 .4289 .0437 .3379 .4896 .0601 .3431

s
.372 .261 .265 .159 .167 .075 .211 .117 .066 .081 .032 .047 .085 .051 .132 .045 .148 .043 .152 .027 .139 .027 .135 .052 .129 .038 .127 .031 .093 .046 .118 .024 .112 .071 .014 .039 .013 .018 .083 .011

Brsun

sun

hsvaway .5236 .1324 .3439 .5356 .1537 .3595 .5398 .2101 .3784 .4897 .2118 .3663 .4489 .1355 .3532 .4561 .1271 .3439 .3841 .1511 .3552 .4648 .1312 .3567 .5315 .2354 .3710 .4497 .1576 .3496 .3853 .1114 .3613 .4180 .0562 .3438 .3710 .1108 .3398 .4724 .1351 .3557 .3811 .1209 .3512 .3413 .0671 .3397 .5471 .2843 .3756 .3610 .0876 .3453 .4101 .0892 .3437 .3773 .0603 .3426

s-away .055 .072 .054 .079 .02 .08 .129 .013 .135 .061 .119 .063 .153 .059 .153 .082 .027 .039 .157 .028 .116 .067 .082 .007 .241 .038 .079 .141 .156 .071 .143 .036 .182 .023 .142 .017 .037 .049 .094 .021

Braway

away

hsvsky .5593 .1208 .3518 .5351 .1112 .3512 .5126 .0398 .3412 .4853 .2115 .3724 .5218 .4284 .3393 .5723 .0911 .3378 .4673 .0723 .3417 .5428 .0792 .3516 .5431 .0541 .3319 .5812 .0532 .3396 .5508 .3364 .3480 .5111 .0562 .3214 .5821 .0734 .3398 .5483 .0462 .3395 .5424 .0836 .3457 .3789 .0483 .3392 .5672 .0613 .3397 .4337 .0231 .3378 .5183 .0621 .3422 .5273 .0654 .3392

0-10

0-20

2758

774

24.1

89.6

10

275

25.5

0-10

21-50

2356

623

25.4

93

245

53

0-10

51-70

0.5

1528

1119

24.9

98

233

115

0-10

71-100

478

589

27.8

89

19

91

54.8

11-25

0-20

5397

1140

29.5

77

20

491

137

11-25

21-50

6496

1213

35.7

72

592

167

11-25

51-70

0.5

1872

1523

30.4

85.1

17

547

183.3

11-25

71-100

637

397

29.5

93

16

91

3.12

26-45

0-20

6874

1211

33.9

61

598

36.8

26-45

21-50

6232

1392

30.4

71

21

1311

348.9

26-45

51-70

0.5

3687

1923

28.7

63.9

14

1202

340.5

26-45

71-100

1510

348

29

76.8

12

1128

131.2

46-60

0-20

5473

1509

35.3

63

1359

241

46-60

21-50

6108

863

35

58

19

1612

1032

46-60

51-70

0.5

3136

1631

42

59

18

1311

463

46-60

71-100

1226

1126

32

68.5

979

542

61-75

0-20

5886

1285

34.2

59

975

171

61-75

21-50

5414

832

32.9

61

15

1544

421

61-75

51-70

0.5

3562

1289

32.3

59

27

1568

439

61-75

71-100

1837

321

32.1

64

1213

369

T* is temperature Table 1: Continued


Sun Angle Cloud % Sun Visibility

H* is humidity

hsvsun .4276 .0697

h s
.092 .069

brBrsun
sun

T*

H*

h-away hsvaway .5153 .0914 s-away .039 .062

Br
away

braway

hsvsky .5434 .0421

76-90

0-20

4227

419

32.0

59

1497

258

Volume 2, Issue 2 March April 2013

Page 252

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
.3338 .3874 .0568 .3398 .5097 .0912 .3472 .4989 .0719 .3433 .3423 .4271 .0982 .3398 .4942 .0937 .3526 .5438 .1289 .3519 .3467 .5823 .0376 .3289 .5471 .0531 .3442 .5683 .1101 .3516

76-90

21-50

.065 .032 .058 .047 .017 .016

3682

471

32.7

58

.055 .043 .042 .037 .031 .069

1869

245.5

76-90

51-70

0.5

2443

1018

34.1

54.7

18

1602

427

76-90

71-100

1592

563

31.3

57

1381

362

4. RESULTS and DISCUSSION


There is discrepancy between our developed color model and CIE model as can be seen in Figure 3. The reasons for this shortage are as followings. First, it is the Field Of View (FOV) of 180 in our case study which indicates ambient skylight for large portion of the sky whereas Field Of View for CIE model is only 1.5 Judd et al. [1]. Second, it is the effect of sunlight reflected off the ground. It can be shown that the ambient light effect accounts for 80% of the shift whereas the ground's reflection of sunlight accounts for 15%.

As it is discussed above the CIE color model cannot be used for applications involving outdoor images and in outdoor machine vision. So a suitable daylight color model is built and the color of incident daylight is shown in HSV color space. This daylight color model along with a model for surface reflectance function will help us to predict the color of a surface. Normalized Photometric Function (NPF) is the normalized HSV distance between Lambertian and Illuminant color versus relative viewing angle since the color will be on the dichromatic line somewhere between Lambertian and Illuminant color. To do this, the albedo of the surface or the 3x3 color coefficient matrix should be found for the surface being under red, blue, and green light. Outdoor machine vision applications such as obstacle detection, road-following, and landmark recognition rely mostly on accurate color based models of daylight and surface reflectance. For fruit pick up where the color of fruit could help determine if it is ready for harvesting. It is also possible to measure the ripeness of the fruit by estimating its color. now, the model is expected to work for flat surfaces. An extension of the work for the spherical or elliptical surfaces may apply to food industry for outdoor machine.

References
Figure 3: Linear CIE Model versus our data where ambient skylight and ground reflection are causes of the s shift. For linear CIE: H = (hmax hmin) x 360=306.612 S = (smax smin) =0.7199 For our color model: H= (hmax hmin) x 360=236.88 S = (smax smin) x 360=0.3476 So hue for CIE color model is (236.88/306.612)x100=77.26%. It means that observed data is covering only 77.26% of angles covered by CIE linear in HSV color space. Saturation for our developed model is (0.3476/0.7199)x100= 48.28% so the observed data is covering only 48.28% of saturation covered by CIE linear in HSV. [1] Judd, D., MacAdam, D. and Wyszecki, G.,"Spectral Distribution of Typical daylight as a Function of Correlated Color temperature",. Journal of the Optical Society of America 1964. 54(8): p. 1031-1040. [2] Horn.B, Robot Vision. MIT Press, Cambridge, MA, 1987. [3] Nayar, S.K., K. Ikeuchi, and T. Kanade, Determining shape and reflectance of hybrid surfaces by photometric sampling. IEEE Transactions on Robotics and Automation, 1990. 6(4): p. 418-431. [4] Phong , B.T., Illumination for Computer Generated Pictures. Communications of the ACM, 1975. 18(6): p. 311-317. [5] Shafer, S.A., Using Color to Seperate Reflection Components. Color Research Application, 1985. 10(4): p. 210-218. [6] Simonds, J., Application of characteristic vector analysis to photographic and opyical response data Journal of the Optical Society of America A: Optics and Image Science, and Vision, 1963. 53(8).

5. CONCLUSION
Volume 2, Issue 2 March April 2013 Page 253

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
[7] Land E, M.J., Lightness and Retinex Theory. Optical Society of America, 1971. 61(1): p. 1-11. [8] Maloney, L.T. and B.A. Wandell, Color Constancy: A Method for Recovering Surface Spectral Reflectance. Journal of the Optical Society of America A: Optics and Image Science, and Vision, 1986. 3(1): p. 29-33. [9] Yuille, A., A Method for Computing Spectral reflectance. Biological Cybernetics , SpringerVerlog, 1987. 56: p. 195-201. [10] Klinker, G., Shafer, S. and Kanade, T., "Color Image Analysis with an Intrinsic Reflection Model" Proceedings of the International Conference on Computer Vision, 1988. [11] Forsyth, D., A Novel Approach for Color Constancy International Journal of Computer Vision, 1990. 5: p. 5-36. [12] D'Zmura, M. and G. Iverson, Color Constancy: Basic theory of two satge linear recovery of spectral descriptions for lights and surfaces. Journal of the Optical Society of America A: Optics and Image Science, and Vision, 1993. 10: p. 2148-2165. [13] Novak, C.L. and S.A. Shafer, Method for estimating scene parameters from color histograms. Journal of the Optical Society of America A: Optics and Image Science, and Vision, 1994. 11(11): p. 3020-3036. [14] Ohta, Y. and Y. Hayashi, Recovery of Illuminant and surface Colors from Images Based on the CIE daylight. Proceedings of the Third european Conference on Computer Vision, 1994. [15] Finlayson, G.D. Color constancy in diagonal chromaticity space. in IEEE International Conference on Computer Vision. 1995. Cambridge, MA, USA: IEEE. [16] Funt, B. and G. Finlayson, "The State of Computational Color Constancy". Proceedings of the First Pan-chromatic Conference, Inter-Society color Council, 1995. [17] Funt, B., K. Barnard, and L. Martin, "Is machine Color Constancy Good enough?" Proceedings of the Fifth European Conference on Computer Vision 1998. [18] Dana, K.J., et al., Reflectance and texture of realworld surfaces. ACM Transactions on Graphics, 1999. 18(1): p. 1-34. [19] Nicodemus, F., et al., "Geometrical Considerations and Nomenclature for Reflectance ". NBS Monograph 160, National Bureau of standards, 1977. [20] Oren, M. and S.K. Nayar, Generalization of the Lambertian model and implications for machine vision. International Journal of Computer Vision, 1995. 14(3): p. 227-251. [21] Wolff, L.B., S.K. Nayar, and M. Oren, Improved Diffuse Reflection Models for Computer Vision. International Journal of Computer Vision, 1998. 30(1): p. 55-71. Volume 2, Issue 2 March April 2013 [22] Cook, R. and K. Torrance, "A Reflectance Model For Computer Graphics". Image Understanding, 1987. 2: p. 1-19. [23] Sato, Y. and K. Ikeuchi, "temporal-color Space Analysis of Reflection". Journal of the Optical Society of America, 1994. 11(11): p. 2990-3002. [24] Buluswar, S.D. and B.A. Draper, Color models for outdoor machine vision. Computer Vision and Image Understanding, 2002. 85(2): p. 71-99. [25] Gasparini, F. and R. Schettini, Color balancing of digital photos using simple image statistics. Pattern Recognition, 2004. 37(6): p. 1201-1217. [26] Marchant, J.A., N.D. Tillett, and C.M. Onyango, Dealing with color changes caused by natural illumination in outdoor machine vision. Cybernetics and Systems, 2004. 35(1): p. 19-33. [27] Manduchi, R., Learning outdoor color classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. 28(11): p. 1713-1723. [28] Ebner, M., Evolving color constancy. The Journal of the pattern recognition society, 2006. 27: p. 1220-1229. [29] Sahragard, N. and A.R.B. Ramli, A review on algorithms and techniques for outdoor machine vision. European Journal of Scientific Research, 2009. 34(1): p. 125-131. [30] Raymond L. Lee,Jr., and david E. Devan . "Observed Brightness Distributions in Overcast Skies". Journal of Optical Society of America, Applied Optics Vol. 47, No. 34, 2008, pp H116H127. [31] Sahragard, N. "Color Model for Outdoor Machine Vision for Tropical Regions and its Comparison with the CIE Model. IOP Conf. Series: Material Science and Engineering Vol 17, February 2011, pp 1-12. [32] Sahragard, N. "Automatic Spike Detection and Correction for Outdoor Machine Vision :Application to Tomato". Journal of Scientific research and Essays Vol 6(31), pp. 6544-6554, December 2011

Author
Nasrolah Sahragard received the B.S. and M.S. degrees in Electrical and Computer Engineering from Louisiana State University, USA in 1981 and 1983, respectively. Then he worked for Auto-Com Telecommunication Company and later joined Southern State University in Louisiana. He has worked for the Electrical and Computer Engineering department at Hormozgan University in Bandar Abbas, Iran since 1990. He attended British Colombia institute of Technology in Canada from 1999-2001 and received his Ph.D in Robotics and Artificial Intelligence from University Putra Malaysia in 2011.

Page 254

Vous aimerez peut-être aussi