Spatial distributions of local illumination color in natural scenes

In natural complex environments, the elevation of the sun and the presence of occluding objects and mutual reflections cause variations in the spectral composition of the local illumination across time and location. Unlike the changes in time and their consequences for color appearance and constancy, the spatial variations of local illumination color in natural scenes have received relatively little attention. The aim of the present work was to characterize these spatial variations by spectral imaging. Hyperspectral radiance images were obtained from 30 rural and urban scenes in which neutral probe spheres were embedded. The spectra of the local illumination at 17 sample points on each sphere in each scene were extracted and a total of 1904 chromaticity coordinates and correlated color temperatures (CCTs) derived. Maximum differences in chromaticities over spheres and over scenes were similar. When data were pooled over scenes, CCTs ranged from 3000 K to 20,000 K, a variation of the same order of magnitude as that occurring over the day. Any mechanisms that underlie stable surface color perception in natural scenes need to accommodate these large spatial variations in local illumination color.


Introduction
The color and level of natural illumination, mainly light from the sun and sky, vary over time and with location in the scene being viewed. At any particular location, temporal changes can be slow, such as those arising from the elevation of the sun, producing a change from reddish at dawn (and dusk) to bluish at noon; or they can be fast as when a cloud occludes the sun. These spectral and colorimetric changes are well characterized and are considerable -expressed in terms of correlated color temperature (CCT) they are in the range 4000-40,000 K (Hernández-Andrés, Romero, Nieves, & Lee, 2001;Judd, MacAdam, & Wyszecki, 1964;Lee, 1994;Wyszecki & Stiles, 1982).
Despite these variations, visual sensitivity to global variations in the color of the illumination is generally low. Being able to compensate for global variations in illumination color is central to theories of stable surface color perception, i.e. color constancy, including Land's Retinex theory (Land & McCann, 1971;McCann, McKee, & Taylor, 1976) and other computational color-constancy algorithms (Gijsenij, Gevers, & van de Weijer, 2011;Hurlbert, 1986). Empirical laboratory studies with complex real three-dimensional scenes rendered with spatial color gradients have shown that sensitivity to smooth spatial variations in illumination color is also very low (de Almeida & Nascimento, 2009;Ruppertsberg, Bloj, & Hurlbert, 2008).
Yet unlike the characterization of natural temporal changes in illumination color, the characterization of natural spatial variations in local illumination color and their consequences for color constancy have received relatively little attention (cf. Hubel, 2000). Chromatic spatial variations in natural scenes have been estimated indirectly from a computer analysis of color images (Gu, Huynh, & Robles-Kelly, 2014) and from empirical measurements with an RGB video camera to which a neutral sphere was attached and was visible in the field of view (Ciurea & Funt, 2003). Both of these approaches have provided useful but constrained data on local illumination. There are clearly significant methodological and experimental difficulties in obtaining more comprehensive data  local illumination color by making successive spectroradiometric measurements from within the scenes themselves.
The aim of the present work was to characterize the spatial variations in illumination color in natural scenes by spectral imaging. Small neutral probe spheres were embedded in the scenes, which were then imaged with a hyperspectral camera. From the reflected radiance images, the spectrum of the local illumination could be estimated simultaneously at each location (or surface direction) on each sphere in each scene and then characterized in terms of its chromaticity and CCT. The chosen scenes were 30 close-up and distant views of rural and urban environments. It was found that the spatial variations in local illumination color within these scenes were unexpectedly large and of the same order of magnitude as variations across the day.

Hyperspectral system
Hyperspectral radiance images of natural outdoor scenes were acquired with an in-house hyperspectral imaging system. It has been described previously (Foster, Amano, Nascimento, & Foster, 2006), but, in brief, the system consisted of a low-noise Peltier-cooled digital camera (Hamamatsu, model C4742-95-12ER, Hamamatsu Photonics K. K., Japan) and a fast tunable liquid-crystal filter (Varispec, model VS-VIS2-10-HC-35-SQ, Cambridge Research & Instrumentation, Inc., MA) mounted in front of the lens, together with an infrared blocking filter. The images were acquired over a wavelength range from 400 to 720 nm in 10 nm steps with an effective image size of 1344 Â 1024 pixels. The focal length of the camera lens was typically 75 mm and the field of view was approximately 6.9°Â 5.3°. Images were corrected at each wavelength for dark noise, stray light, and spatial non-uniformities. These corrected images were then registered over wavelength by uniform scaling and translation to compensate for small differences in optical image size with wavelength, i.e. chromatic differences of magnification, and any small differences in optical image position (Ekpenyong, 2013). Spectral radiances were calibrated with reference to the spectrum of the light reflected from an embedded surface covered in matt gray emulsion paint (VeriVide Ltd, Leicester, UK) to produce the surface reflectance of Munsell N5 or N7. This reference surface was always present in each scene and its reflected spectrum was measured with a telespectroradiometer (SpectraColorimeter, PR-650, PhotoResearch Inc., Chatsworth, CA) at the time of image acquisition. Depending on the scene the reference surface was either a small flat surface or one of the neutral probe spheres embedded in the scene. The hyperspectral radiance data at each pixel were corrected so that at the reference surface the recorded spectrum coincided with that measured with the telespectroradiometer. A more detailed description of the hyperspectral system and its calibration is given elsewhere (Ekpenyong, 2013;Foster et al., 2006).
The spectral accuracy of the hyperspectral system in recovering spectral reflectance factors of colored samples was established previously to be within 2% (Foster et al., 2006;Nascimento, Ferreira, & Foster, 2002) and the recovery of spectral radiance was therefore also within 2%. In separate measurements, errors in peak transmittance wavelength of the tunable filter were found to be less than 1 nm over 400-660 nm and less than 2 nm over 670-720 nm. Errors in peak spectral radiance recorded by the whole system at 436 and 546 nm were found to be less than 1 nm at the center and edges of the imaging field.

Scenes and illumination sampling
Hyperspectral radiance data from 30 natural scenes in the Minho region of Portugal were acquired during late spring and summer of 2002 and 2003. The sky in most of the scenes was clear but in five it was overcast with cloud. Each acquisition lasted a few minutes and took place within the period 11:00-18:00. There were 17 images of rural scenes, containing mainly trees, flowers and other vegetation, and 13 of urban scenes containing some type of man-made construction. Both close-up and distant views were included. The aperture of the camera was deliberately stopped down to provide a large depth of focus and particular care was taken to ensure that the spheres in the scenes were in focus. The line-spread function of the system estimated from the set of natural images was almost Gaussian with a standard deviation of 1.3 pixels at 550 nm (Foster et al., 2006). Fig. 1 shows color renditions of the scenes; no region of the images including the embedded spheres was significantly out of focus.
Where possible, the probe spheres embedded in each scene were distributed over the field of view. The spheres were made of glass or plastic material and were covered in Munsell N5 or N7 matt gray emulsion paint, and, depending on the scene, their diameters varied from 16 mm to 80 mm. The physical size of the spheres was not adjusted for constant image size because of their variable distance from the camera. The number of spheres in each scene varied from one to seven.
The global illumination in 24 of the scenes was measured at or close to the time of image acquisition by recording the spectrum reflected from a barium sulfate plug placed horizontally and located where only direct illumination was incident. In five of the scenes it was recorded from the top of one of the spheres in the scene. In one scene no direct illumination could be recorded.
These images of scenes with multiple embedded spheres were acquired solely for analyzing spatial variations in local illumination. Data from these images have not been reported previously and the images should be distinguished from similar images without multiple spheres used in previous studies for other purposes (Foster et al., 2006;Linhares, Pinto, & Nascimento, 2008).

Local illumination estimates
Estimates of the local illumination color were derived as follows. For each sphere in each scene, radiance spectra were extracted from the hyperspectral image at 17 sample points distributed uniformly over the image of the sphere. Each point corresponded to one image pixel. One point was located at the center of the image of the sphere and the others were distributed evenly along vertical, horizontal, and the two 45°oblique axes, with spacing one-sixth of the sphere diameter. Any sphere in the camera view that was partially occluded by other objects (e.g. leaves, trees) was excluded from the analysis. In total there were 112 spheres yielding a total of 1904 local illumination sample points.
The radiance spectra at each sample point represented an estimate of the local illumination incident on a planar surface element tangent to the sphere at that point, scaled by the reflecting properties of the Munsell paint. More precisely, let L i ðh i ; / i ; x; y; kÞ be the spectral radiance at wavelength k incident at the point (x, y) in the direction (h i , / i ) with respect to the surface normal (h xy , / xy ); let L r ðh r ; / r ; x; y; kÞ be the corresponding spectral radiance reflected in the direction (h r , / r ) defined by the viewing geometry; and let f ðh i ; / i ; h r ; / r ; x; y; kÞ be the spectral bidirectional reflectance distribution function (Nicodemus, Richmond, Hsia, Ginsberg, & Limperis, 1997). Then L r ðh r ; / r ; x; y; kÞ ¼ where the integration is taken over the solid angle 2p above the surface element with normal (h xy , / xy ). If there is no interaction between the wavelength dependence and geometrical dependence of reflection, then f ðh i ; / i ; h r ; / r ; x; y; kÞ is separable and can be written f 1 ðh i ; / i ; h r ; / r ; x; yÞ f 2 ðkÞ, where f 2 ðkÞ is the normalized spectral reflectance (Nicodemus et al., 1997). Since the viewing geometry is fixed and the spectral dependence of Munsell paint is known and is approximately Lambertian, it follows that after correction by f 2 ðkÞ the description (1) can be simplified (Nicodemus et al., 1997, Eqs. C1 and C8) thus: In other words, the corrected spectral radiance L r ðx; y; kÞ in (2) gives a measure at (x, y) of the integrated local illumination on a surface element tangent to the sphere at (x, y) with normal (h xy , / xy ).
From each of these local illumination estimates, the corresponding CIE (x, y) chromaticity coordinates and CCT were calculated in the usual way (CIE, 2004).

Results
By way of illustration, Fig. 2 shows data obtained from one of the scenes containing combinations of light from the sun, sky and surrounding surfaces. The image on the left is a color rendition of the scene with six embedded probe spheres indicated by numbers. The dot plot in the middle shows the CCTs of the local illumination in each of the 17 directions defined by the sample points on each of the spheres. The graph on the right shows the CIE 1931 (x, y) chromaticity coordinates from all 102 (= 6 Â 17) sample points. The solid line represents the daylight locus and the crosses the daylights D65 and D50 included for reference. As can be seen from the middle plot, there is a marked variation in the range of CCTs of the local illumination over each of the six spheres. Fig. 3 shows summary data from all 30 scenes. The graph on the left shows the CIE (x, y) chromaticity coordinates of the global illuminations recorded from the barium sulfate plug (or from the top of an exposed sphere). As expected, the recorded values lie close to the daylight locus. The graph in the middle shows the pooled CIE (x, y) chromaticity coordinates of all of the local illuminations, i.e. from each sample point from each sphere from each scene. The gamut of local illumination colors is much greater than of the global illuminations owing to the complex spatial structure of the scenes, especially variations in attached and unattached shadows and in mutual illumination. Consistent with other measures of daylight (Hernández-Andrés et al., 2001;Judd et al., 1964) the chromaticities tend to lie above the daylight locus. For comparison with the overall diversity in colors in the scenes, the inset shows in gray the gamut of colors of 100 randomly selected points in each image and in black the gamut replotted from the middle graph (notice the difference in scales).
The histogram on the right in Fig. 3 shows the frequency distribution of all of the local illuminations expressed in reciprocal color temperature calculated as 10 6 /CCT and measured in MK À1 Fig. 1. Color renditions of the 30 scenes analyzed in this study. The small gray spheres in the scenes were used to estimate the spectrum of the local illumination at different positions and directions within the scenes. One of the scenes was imaged twice with a 12-day interval.
(reciprocal megakelvin or mired). This inverse scale offers a more uniform representation of color differences and is used routinely in illumination studies (Hernández-Andrés et al., 2001;Masuda & Nascimento, 2013;Wyszecki & Stiles, 1982). The continuous curve is the best-fitting Gaussian distribution with peak at 5698 K and a FWHM of 53 MK À1 . A similar value for the peak has been reported elsewhere as best typifying daylight (Hernández-Andrés et al., 2001). The range of CCTs across scenes was considerable with 99% of the values extending over the interval 3000-20,000 K.
To reveal the separate variations of local illumination color within and across scenes, the maximum variations in CIE 1931 (x, y) chromaticity coordinates were calculated for each condition. Fig. 4 shows the results. The graph on the left shows maximum differences in (x, y) chromaticity coordinates over spheres and on the right maximum differences in (x, y) chromaticity coordinates over scenes. The two distributions are very similar, with their convex hulls having 50% overlap.
A high degree of spectral redundancy has been reported for daylight variations during the day (Hernández-Andrés et al., 2001;Judd et al., 1964). With five principal components it is possible to explain 99.991% of the variance of the 2600 spectra in the range 380-780 nm (Hernández-Andrés, Nieves, Valero, & Romero, 2004;Hernández-Andrés et al., 2001). A principal component analysis applied to the present data revealed a similar property for the variations in local illumination spectra across space. Fig. 5 shows the first three principal components obtained by analyzing the 1904 spectra that made up the samples analyzed here (i.e. from all the points from all the spheres from all the scenes). Although the spectral ranges are different, the profiles of these components are similar to the corresponding ones reported for variations during the day (Hernández-Andrés et al., 2001) and account for 99.946% of the variance in the data. The first component has a maximum displaced more towards the green part of the spectrum, an effect presumably due to mutual reflections from foliage.
With images recorded from both rural and urban scenes, it might be assumed that the large spatial variations in local illumination color were derived mainly from urban scenes with well-defined boundaries typical of the built environment. A comparison of the two types of scenes showed in fact that standard deviations were larger for rural scenes, a representative example of which is shown in Fig. 2. The graph on the left shows the CIE 1931 (x, y) chromaticity coordinates of the global illuminations recorded from a barium sulfate plug (or from the top of an exposed sphere). The graph in the middle shows the pooled CIE (x, y) chromaticity coordinates of all the local illuminations and in the inset in gray the coordinates of 100 randomly selected points in each image and in black data re-plotted from the main graph (notice the difference in scales). The histogram on the right shows the frequency distribution of all of the local illuminations expressed in reciprocal color temperature measured in MK À1 . The continuous curve is a best-fitting Gaussian distribution.

Discussion
The local illumination in natural environments depends not only on the relative contributions from the sun and sky but, importantly, also on the presence of occluding objects and mutual reflections. The resulting spatial variations in the color of the illumination can be surprisingly large. As shown here by spectral imaging with embedded probe spheres, the correlated color temperatures in 30 rural and urban scenes had values ranging from 3000 K to 20,000 K, a variation similar in magnitude to that over the day in diverse atmospheric conditions and in different terrestrial latitudes (Hernández-Andrés et al., 2001;Wyszecki & Stiles, 1982).
By contrast, the CCTs of the global illumination recorded from a barium sulfate plug or the top of an exposed sphere in each scene ranged from just 5000 K to 8000 K. This range, representing the variation in the light from the sun and sky without occlusions or reflections, was smaller than anticipated given that the scenes were imaged at times between 11:00 and 18:00 and in different atmospheric conditions with clear and overcast skies. Lower minimum CCTs might have been obtained if scenes had been imaged either earlier or later in the day under direct sun. The Portuguese summer day lasts for more than 14 h, starting at about 6:00 and ending about 21:00.
In achieving stable surface color perception, the visual system seems able to tolerate smooth spatial variations in illumination color (de Almeida & Nascimento, 2009;Ruppertsberg et al., 2008). But more abrupt spatial variations present a greater challenge. By their nature, global changes in illumination occur more uniformly across scenes and color constancy can involve relatively slow-acting global chromatic-adaptation mechanisms. Illumination changes across space have a more immediate impact as the gaze moves over a scene. Although there are fast-acting chromatic-adaptation processes (Rinner & Gegenfurtner, 2000), other non-adaptational mechanisms must be involved to preserve the simultaneous perception of local illumination differences (Arend & Reeves, 1986;Joost, Lee, & Zaidi, 2002;Lichtenberg, 1793). One mechanism that might contribute to stable surface color perception is the spatial ratio of cone excitations arising from light reflected from different surfaces in a scene (Foster & Nascimento, 1994;Nascimento et al., 2002). Such ratios were shown to be approximately invariant under changes in illumination. For the same pair of surfaces this invariance must hold whether the changes are in global illumination spectrum on a scene or the result of a more local change. Invariant ratios may provide the basis for a range of perceptual color phenomena, including relational color constancy and displacement color constancy. A complication with the spatial variations in natural illumination described here is that their geometry may change over the course of the day. But provided that the sampling of ratios is constrained to nearby points or moderate time intervals, spatial ratios remain approximately invariant (Foster, Amano, & Nascimento, 2016).
In estimating the spectral properties of natural scenes, the fact that there are large spatial variations in local illumination spectra does mean that accurate surface spectral reflectances cannot be recovered from spectral radiance data by assuming a single global illumination acting uniformly over the scene. Nonetheless the technique of assigning effective spectral reflectances to surfaces based on the assumption of a single global illumination (Foster et al., 2006, Appendix A) does allow the simulation of surfaces in scenes under different global illuminations (Feng & Foster, 2012;Linhares et al., 2008;Nascimento et al., 2002). Spatial cone excitation ratios obtained with this technique are almost invariant (Nascimento et al., 2002), and mean relative deviations in ratios are of the same order of magnitude as those from actual scenes, providing that sampling is from points close together in space or time, as mentioned earlier, or from points separated arbitrarily  but undergoing even changes in illumination, where, for example, both are in shade or both are in direct illumination (Foster et al., 2016). Whatever the mechanisms are that underlie stable surface color perception in natural scenes, it is evident that they need to accommodate large spatial variations in local illumination color which can be of the same order of magnitude as the variations across the day.