Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Pixel-wise orthogonal decomposition for color illumination invariant and shadow-free image

Open Access Open Access

Abstract

In this paper, we propose a novel, effective and fast method to obtain a color illumination invariant and shadow-free image from a single outdoor image. Different from state-of-the-art methods for shadow-free image that either need shadow detection or statistical learning, we set up a linear equation set for each pixel value vector based on physically-based shadow invariants, deduce a pixel-wise orthogonal decomposition for its solutions, and then get an illumination invariant vector for each pixel value vector on an image. The illumination invariant vector is the unique particular solution of the linear equation set, which is orthogonal to its free solutions. With this illumination invariant vector and Lab color space, we propose an algorithm to generate a shadow-free image which well preserves the texture and color information of the original image. A series of experiments on a diverse set of outdoor images and the comparisons with the state-of-the-art methods validate our method.

© 2015 Optical Society of America

1. Introduction

Shadows, a physical phenomenon observed in most natural scenes, are problematic to many computer vision algorithms. They often bring some wrong results in edge detection, segmentation, target recognition and tracking. For these reasons, shadow processing and illumination invariant on an image are of great practical significance and have attracted a lot of attentions [16]. Some previous works dealt with this problem by utilizing additional information from multiple images [79], time-lapse image sequences [2, 10, 11] or user inputs [9, 12, 13]. Although these methods achieve impressive results for illumination invariant and shadow-free image, they may not be applied automatically to a single image. In general, a robust method for illumination invariant and shadow-free on a single image is more favored and challenging. The recent works related to a shadow-free image on a single image can be divided into two categories: methods that need shadow detection and methods that do not need shadow detection.

Methods with shadow detection. Most works for shadow-free image often undergo two basic steps: shadow detection and shadow removal [14]. A fair proportion of shadow detection methods are based on shadow features with statistical learning [1518]. The most commonly used shadow features are intensity, histograms, texture, color ratio, geometry property, and gradient. Lalonde et al. [16] obtained shadow removal results in consumer-grade photographs by a conditional random field (CRF) learning approach on color ratio, texture and intensity distributions. Based on initial segmentation, the method proposed by Guo et al. [15] detects shadows using SVM on shadow features (e.g, texture, chromaticity, and pairwise relation) and then relights each pixel to obtain a shadow-free image. These shadow features may not be robust enough in some applications. For example, shadowed regions are often dark, with less texture and little gradient, but some non-shadowed regions may also have similar characteristics. Due to the lack of robust shadow features, these shadow feature and learning based methods are not always effective, especially in soft shadow regions or some complex scenarios. Besides, all these learning-based methods are usually time-consuming since large complex features are needed to be analyzed for classifiers. Some other works for shadow-free image with shadow detection are based on computing physically-based illumination invariants [1922]. With a physically-based illumination invariant, Finlayson et al. [19, 20] proposed a method to obtain a shadow-free image by shadow edge detection and solving a Poisson’s equation. In [22], we deduced a linear relationship between pixel values of a surface in and out of shadow regions, and then proposed a shadow removal method based on shadow edge detection. In the condition of correct shadow edge detection, the method proposed by Arbel and Hel-Or [14] yields a shadow-free image by finding scale factors to cancel the effect of shadows. All these mentioned methods require shadow edges to be correctly detected. However, automatic edge detection is known to be non-robust [23], especially in complex scenarios and texture (such as the shadows of leaves and grasses). The defect of these shadow detection based methods is revealed in [24]. Even when the shadows are detected rightly, retaining the original color and texture in a shadow-free image is also a challenging problem [14, 25].

Methods without shadow detection. Another effective approach for shadow-free image is intrinsic image via image decomposition. Tappen et al. [17] proposed a learning-based approach to predict the derivatives of reflectance and illumination images. Although this method successfully separates reflectance and shading for a given illumination direction used for training, it is not designed for arbitrary lighting directions [24]. Assuming that the neighboring pixels that have similar intensity values should have similar reflectance, Shen et al. [26] proposed both an automatic and user scribbles method to separate intrinsic image from a single image with optimization. Although their automatic method is able to extract most of the illumination variations, residual shadows remain in the reflectance image and they stated that user scribbles cannot improve the result significantly. Finlayson et al. [20] derived a grayscale shadow-free image by finding the special direction in a 2-D chromaticity feature space. In [22], we obtained a grayscale shadow-free image based on a physical deduced linear model from the view of atmospheric transmittance effects. These derived grayscale shadow-free images have some limitations in real applications due to the loss of color information. Applying narrowband camera sensors in deduction, Maxwell et al. [27] found that a 2-D illumination invariant image can be obtained by projecting the colors (in log-RGB) onto a plane. In their method, the projecting normal vector is determined either from a user input or a 2-D entropy searching, which may have some limitations in real applications. With the assumption of chromatic surfaces, Planckian lighting and narrowband camera sensors, Yang et al. [24] obtained a shadow-free image using bilateral filtering without shadow detection. The comparison results in [24] shows that this method for shadow-free image outperforms Finlayson’s [19] (a classical method for shadow-free image that need shadow detection). However, based solely on chromaticity, this method may not be valid on neutral regions when the neighboring regions of the image are also neutral [24]. The experimental results presented in section 4 of this paper also show that bilateral filtering often makes the method in [24] fail to recover a shadow-free image from the image with darker shadows or in which shadows pervade in a scenario.

In this paper, we propose a novel, effective and efficient method to obtain a shadow-free image from a single outdoor image without feature extraction or shadow detection. The research is based on our previous work of grayscale illumination invariant image derivation from a physically-based shadow linear model [22]. With three different grayscale illumination invariant images (e.g., Fig. 1(b)) from this linear model [22], we apply them to set up three linear equations for each pixel value vector. The solution space of these linear equations is decomposed into one-dimensional nullspace (free solution space) and particular solution space. The free solution, representation of illuminants ratio, is only determined by illumination condition. The particular solution, which is perpendicular to free solutions, is unique and illumination invariant. It retains the basic color information of the original pixel value vector. Therefore, we name this process as pixel-wise orthogonal decomposition for color illumination invariant. Due to that this color illumination invariant image (e.g., Fig. 1(c)) still has some color distortion compared with the original image, combining color illumination invariant image and Lab color space, we propose an algorithm to generate a shadow-free image (e.g., Fig. 1(d)), which better preserves the color and texture information of the original image.

 figure: Fig. 1

Fig. 1 One experimental result of our algorithm. (a) Original image. (b) One of the three grayscale illumination invariant images. (c) Color illumination invariant image with our pixel-wise orthogonal decomposition. (d) Shadow-free image after color restoration.

Download Full Size | PDF

The main contributions of this paper are: (1) We propose a new pixel-wise orthogonal decomposition method to obtain a shadow-free image without feature extraction or shadow detection. (2) Our method requires only once pixel-wise calculation on an image and can run in real time. (3) This pixel-wise orthogonal decomposition retains the original texture well. (4) The color illumination invariant image yields an identical reflectivity result regardless of illumination condition, which is both invariant for different illumination conditions and shadows.

The rest of the paper is organized as follows. In Section 2, we give a brief introduction of the derivation of grayscale illumination invariant image and then present our orthogonal decomposition method for color illumination invariant image from a single image. In section 3, we present a color restoration method for the generation of shadow-free image from color illumination invariant image. Some quantitative and qualitative experiments on a diverse set of shadow images are given in Section 4. We end this paper with a brief discussion and conclusion in section 5.

2. Pixel-wise orthogonal decomposition and color illumination invariant image

In this section, we first give a brief introduction of our previous work of shadow linear model and the derivation of relevant grayscale illumination invariant image. Then we present our pixel-wise orthogonal decomposition method for color illumination invariant image from a single image.

2.1. Pixel-wise orthogonal decomposition

2.1.1. Shadow linear model on an image [22]

For visible light whose spectrum ranges from 400nm to 700nm, given spectral power distributions (SPD) of illumination E(λ), object reflectance S(λ) and sRGB color matching functions Q(λ), the RGB tristimulus values (H) in sRGB color space are computed by,

H=400700E(λ)S(λ)QH(λ)dλ
where H = {R,G,B} represent red, green, and blue channel respectively. Light emitted from the sun will be scattered by atmospheric transmittance effects which causes the incident light to be split into direct sunlight and diffuse skylight. The illumination for shadow is skylight while for non-shadow background is both sunlight and skylight. In clear weather when shadows most probably take place, the SPD of daylight and skylight show strong regularities, and they are mainly controlled by sun angles. Based on these principals, it is revealed that the sRGB tristimulus values of a surface illuminated by daylight are proportional to those of the same surface illuminated by skylight in each of the three color channels, i.e.,
log(FH+14)=log(KH)2.4+log(fH+14)
where FH denotes the RGB values of a surface in non-shadow area and fH denotes the RGB values for the same surface in shadow area. The proportional coefficients KH are independent of reflectance and are approximately equal to constants determined by Eq. (3).
KH=argminKHλ=400700|QH(λ)(Eday(λ)-KHEsky(λ))|
where Eday and Esky represent the SPD of daylight and skylight respectively. In our experiment, this SPD of daylight and skylight were obtained by calculating the mean values of the SPD of daylight and skylight measured by an Avantes USB 2.0 spectrometer under different sun angles on ten different days in sunny weather. This optimization problem of KH is solved by setting the sampling stepsize of in Eq. (3) as 5nm and the stepsize of KH as 0.01.

From Eq. (2), the following equation holds.

log(FR+14)+log(FG+14)-β1log(FB+14)=log(fR+14)+log(fG+14)-β1log(fB+14)
where
β1=log(KR)+log(KG)log(KB)
For a pixel in an image, Eq. (4) represents a shadow invariant. For an arbitrary pixel and its RGB value vector, (vR,vG,vB)T, log(vR + 14)+log(vG + 14) – β1 · log(vB + 14) keeps the same no matter whether the pixel is on shadow region or not. Apparently, a grayscale illumination invariant image is obtained. Two results of this type of illumination invariant image are shown in Fig. 2.

 figure: Fig. 2

Fig. 2 Grayscale illumination invariant image results based on the linear model

Download Full Size | PDF

2.1.2. Pixel-wise orthogonal decomposition

The grayscale illumination invariant image has some limitations in some applications due to the loss of color and contrast information. We expect to get an illumination (including shadow) invariant image, which can retain the color information of the original image and appear the same as the original image without shadow. For this purpose, based on the model in previous section, we deduce a pixel-wise orthogonal decomposition and obtain an illumination invariant image which retains the basic color information of the original image.

For a RGB value vector (vR,vG,vB)T, we first define the following grayscale illumination invariant values I1 according to Eq. (4):

I1=log(FR+14)+log(FG+14)-β1log(FB+14)=log(fR+14)+log(fG+14)-β1log(fB+14)=log(vR+14)+log(vG+14)-β1log(vB+14)

Similar to Eq. (6), we can obtain two other grayscale illumination invariant values I2 and I3,

I2=log(FR+14)β2log(FG+14)+log(FB+14)=log(fR+14)β2log(fG+14)+log(fB+14)=log(vR+14)β2log(vG+14)+log(vB+14)
I3=-β3log(FR+14)+log(FG+14)+log(FB+14)=-β3log(fR+14)+log(fG+14)+log(fB+14)=-β3log(vR+14)+log(vG+14)+log(vB+14)
where
β2=log(KR)+log(KB)log(KG),β3=log(KG)+log(KB)log(KR)

For convenience, let u = (uR,uG,uB)T defines a Log-RGB value vector of a pixel, where uH = log(vH + 14),H = {R,G,B}. From Eqs. (4), (7), and (8), we have the following linear equations,

{uR+uG-β1uB=I1uR+β2uG+uB=I2-β3uR+uG+uB=I3
where Ii,i = 1,2,3, correspond to the invariant values calculated by Eqs. (6), (7), and (8) respectively. The matrix format of Eq. (10) is as following:
Au=I
where A[11-β11-β21-β311], u = (uR,uG,uB)T, and I = (I1,I2,I3)T. According to the definitions and calculations of β1,β2, and β3, we have
2+β1+β2+β3-β1β2β3=0
which leads to rank(A) = 2. For a given image, from algebraic theory, we know that Eq. (11) has infinite number of solutions. The solution space can be decomposed into a particular solution plus one-dimensional nullspace solutions. For a pixel on an image, we only know one of the solutions, i.e., pixel Log-RGB value vector. We aim to find one solution of Eq. (11) which is illumination invariant. In the following, we prove that this solution exists and is unique.

From algebraic theory, any solution u of Eq. (11), can be expressed as following:

u=us+αu0
where us is an arbitrary particular solution and u0 is the normalized free solution of Eq. (11), such that Au0 = 0 and ‖u0‖ = 1, αR. The symbol ‖·‖ denotes L2 norm. One of the free solution is solved in Formula 14,
u0'=(β1β2-1,1+β1,1+β2)=log(KRKGKB)(log(KR),log(KG),log(KB))
From Formula 14, the normalized free solution u0 can be calculated as following:
u0=1u0'u0'

Here the free solution has no relationship with the image itself but is determined by matrix A, i.e. illumination condition. Formula 14 further reveals that this free solution is a representation of the ratio of illuminants in imaging environments.

Given a particular solution us and the normalized free solution u0 of Eq. (11), according to Eq. (13) and algebraic theory, we define up as

{up=us+αpu0αp=-us,u0
It is a particular solution of Eq. (11), where 〈·,·〉 denotes vector inner product. It can be proved that up, satisfying upu0, is the unique particular solution of Eq. (11) (The proof of the uniqueness of up is provided in Appendix A). For a Log-RGB value vector u, whether it is on shadow or not, it is the solution of Eq. (11) and can be decomposed as
u=up+αu0
where α = 〈 u, u0〉 and up, up = uαu0, is the unique particular solution of Eq. (11). Due to upu0, we call this process as pixel-wise orthogonal decomposition. For a given pixel, no matter how different the values of the pixel are with different illumination conditions, this pixel-wise orthogonal decomposition will yield a unique particular solution up.

From the deducing procedure above and the orthogonal decomposition, we know that u0, representation of illuminants ratio, is only related with (β1,β2,β3)T and up, perpendicular to u0, is illumination invariant. It means that for a pixel with Log-RGB value vector u, no matter whether it is on shadow or not, up is invariant and only α reflects the variation of pixel RGB values caused by shadow or different illuminants. The different solutions caused by different α component in Eq. (17) can be regarded as Log-RGB values of a pixel on different illumination conditions. Therefore, given an image under multiple illumination conditions, for each pixel with Log-RGB value vector u of this image, we can directly calculate its illumination invariant vector up as

{up=u+αpu0αp=-u,u0
By exponential transform on up for each pixel, we can get an illumination invariant image which retains basic color information of the original image in RGB color space.

This pixel-wise orthogonal decomposition process can be shown more clearly from the illustration in Fig. 3. For a pixel, us1 and us2 denote its log-RGB vector within shadow and log-RGB vector without shadow respectively, which are the solutions of Eq. (11). Here we denote any solution of Eq. (11) by vector u. According to our orthogonal decomposition Eqs. (14), (15), and (17), us1, us2, and u can be projected along the vector u0 into an specific solution of Eq. (13), up, which is perpendicular to u0. Therefore, for a pixel on an image, it means that, no matter how different the values of the pixel are with different illumination conditions (within shadow, without shadow or other illuminated), we can get an unique invariant up by our orthogonal decomposition.

 figure: Fig. 3

Fig. 3 An illustration of pixel-wise orthogonal decomposition.

Download Full Size | PDF

2.2. Analysis of Parameters β123 and color illumination invariant image

The estimation of parameters β1,β2,β3 is important in determining whether our pixel-wise orthogonal decomposition works well or not. Luckily, from Eqs. (5), (9), and (3), we know that these parameters are reflectance irrelevant and only determined by the illumination condition (i.e, the SPD of daylight and skylight), such as zenith angle (time) and aerosol (weather). In clear weather that shadows mostly take place, these parameters are mainly determined by zenith angle. The SPD can be measured by spectrometer or calculated in atmosphere optics (software like MODTRAN and SMARTS2) with zenith angle and aerosol (for weathers) in advance. We have calculated parameters β1,β2,β3 in sunny weather at different sun angles from 9:00 AM till 4:00 PM in our city and some of the values are shown in Table 1. The mean values in Table 1 are calculated by the mean SPD of daylight and skylight at 20° to 70°. From Table 1, we notice that the values of parameters β1,β2,β3 from sun angle 20° to sun angle 80° are quite stable. In real applications, the sun angle (time) is known and the parameters can then be determined. In the condition that we have no information about at what sun angles the pictures were taken, the stability of parameters shows that the mean values for β1,β2,β3 at 20° to 70° sun angles can be used for most situations in our decomposition, except some images taken at twilight, i.e., at sunrise or sunset, when sun angle is less than 10. Also, for more precise parameter values, an automatic entropy minimization method similar to Finlayson et al. [20] is employed. In addition to the factors (zenith angle and aerosol) mentioned above that may affect parameters β1,β2,β3, some other aspects are also worthy of attention. For example, cloud and fog will affect the SPD of daylight and skylight and further affect the parameters β1,β2,β3 in our algorithm. From clear weather to cloudy, as the clouds increase (aerosol increases), shadows vary from strong to weak. When shadows are weak, the error of the color illumination invariant results caused by parameters (β1,β2,β3) deviation from cloud is also weaker. Therefore, the influence caused by the cloud distribution would be small and can be corrected by automatic entropy minimization [20]. This similar situation also goes for foggy weather.

Tables Icon

Table 1. Parameters (PRMs) from representative sun angles

The above analysis shows that our pixel-wise orthogonal decomposition can work well on most situations. Our experimental results on many images in different scenes and reflectance also support this analysis. Two original images, their color illumination invariant images and α information are presented in Fig. 4. The shadows disappear and the main color information is maintained in our color illumination invariant images.

 figure: Fig. 4

Fig. 4 Pixel-wise orthogonal decomposition on images. Left: Original image. Middle: color illumination invariant image. Right: α information.

Download Full Size | PDF

Compared with prior works [20,27,28], our 2-D color illumination invariant image has three main advantages:

  1. Our 2-D color illumination invariant image is a true 2-D image which can be automatically obtained through a simple pixel-wise orthogonal decomposition. In [20, 28], Finlayson and Drew obtained a 2-D chromaticity image by projecting the 1-D chromaticity back to 2-D via keeping the vector components. In [27], Maxwell et al. stated that this 2-D chromaticity image is inherently one dimensional. Applying narrowband camera sensors in deduction, Maxwell et al. [27] successfully obtained a truly 2-D color illumination invariant image by projecting the colors (in log-RGB) onto a plane based on Shafer’s dichromatic reflection model [29]. Their 2-D color illumination invariant image is obtained either from a user input for projecting normal vector or an 2-D entropy searching. This user input or 2-D entropy search of the angle of the normal vector in a three dimensional space may bring some difficulties in real applications, especially for some images with small fragment shadows and complex reflectance. While our 2-D color illumination invariant image can be directly obtained by measuring the SPD of daylight and skylight or simply giving the information about at what sun angles the pictures were taken (the time when the pictures were taken). Even when these information is unknown to the users, a mean value of SPD information is suitable for most situations. For the correction of the errors caused by the mean values, a simple 1-D entropy searching is used to get optimized parameter values among all the given parameters that be measured in different sun angles in advance.
  2. Based on a rigorous mathematical deducing, our 2-D color illumination invariant image has an explicit and simple mathematical expression. This expression and fast pixel-wise calculation of our 2-D color illumination invariant image can be applied directly to the real-time applications.
  3. From the view of atmospheric transmittance effects, we do not apply the assumption of Planckian lighting and narrowband camera sensors in our derivation, which may be more practical in real situation.

3. Color restoration and shadow-free image

By the orthogonal decomposition on an image, some image color information gets lost (Fig. 4). As shown in Table 1 and Eqs. (14) and (15), the directions of free solution in different sun angles (from sun angle 20 to sun angle 80) are all near to (1,1,1)T. From the orthogonal decomposition equation, we have, if uαu0, the illumination invariant up ≈ (0,0,0)T. It implies that the closer to the neutral surface on RGB space a pixel RGB value vector is, the more color information is got lost. To restore this loss, we present a color restoration method to generate a shadow-free image by correcting color vectors on the illumination invariant image which are near RGB color neutral surface.

Let v(x,y) = (vR(x,y),vG(x,y),vB(x,y))T be an RGB image, where x = 1,2,...,M;y = 1,2,...,N; M and N denote the image width and height respectively. We define

u(x,y)=(log(vR(x,y)+14),log(vG(x,y)+14),log(vB(x,y)+14))T
With the orthogonal decomposition on u (to see Eq. (17)), we obtain
u(x,y)=α(x,y)u0+up(x,y)
where up(x,y) is illumination invariant on pixel (x,y), α(x,y) ∈ R. For u, we define the following pixel set, which indicates pixels that are near RGB color neutral surface,
S={(x,y)|u(x,y)u(x,y)-u0ɛ;x=1,2,..,M;y=1,2,,N}
where parameter ε is set to 0.15 empirically. We then calculate the following parameter vector,
T=1G(x,y)S(u0-u(x,y)u(x,y))
where G is the number of the pixels in set S. This parameter vector is used to measure the average deviation of the pixel vectors of image u in set S from the vector u0. Then the color correction on up is calculated as following:
uc(x,y)=up(x,y)(up(x,y)up(x,y)+1κu(x,y)u(x,y)-u03+1T)
From the formula above, if u(x,y) = α(x,y)u0, we have uc(x,y) = up(x,y) + T. This color correction aims to correct the color for pixels in set S. The role of function 1κu(x,y)u(x,y)-u03+1 in Eq. (23) is used to minimize the impact of this correction on pixels not in set S and keep the correction smooth. The parameter κ is set to 0.02 empirically. With exponentiation, we transform uc and up into RGB space and get ucRGB and upRGB respectively, where image upRGB has almost the same chrominance as original image and image ucRGB has almost the same luminance as original image. This is verified by experimental results on many images in different scenes and reflectance.

Then a shadow-free image is obtained by transferring the right luminance component of ucRGB to the color illumination invariant image. We adopt Lab color space (L, the luminance component; a, b, two chrominance components) for this transfer. First we convert ucRGB and upRGB from RGB space into Lab space and get ucLab and upLab respectively,

{ucLab(x,y)=(Lc(x,y),ac(x,y),bc(x,y))TupLab(x,y)=(Lp(x,y),ap(x,y),bp(x,y))T
Then the final shadow-free image ufLab in Lab space is obtained as following,
ufLab(x,y)=(Lc(x,y),ap(x,y),bp(x,y))T

An overview of our shadow-free image generation pipeline is presented in Algorithm 1. Figure 5 shows the stages of the algorithm implemented on a shadowed image. More shadow-free images can be seen in the experiment section and Appendix B. From the results, we can see that our method for shadow-free image effectively removes shadows from images while retaining the color and texture information of the original image. It is worth noting that, unlike shadow removal method that only recovers pixels in the shadow region, our shadow-free image, without the process of shadow detection, is operating on the entire image. In our algorithm, all the brighter pixels and darker pixels are pulled to the same illumination intensity and it may reduce the contrast of the image. Therefore, our shadow-free image may sometimes looks a bit dull compared with the original image.

Tables Icon

Algorithm 1. Algorithm pipeline: Pixel-wise orthogonal decomposition for shadow-free image

 figure: Fig. 5

Fig. 5 The stages of our algorithm implemented on a shadowed image. Note that the arrow in the first row represents the color space conversion, that is converting from RGB space to Lab space. These three components have no actual use in our algorithm. They are only used to act as the reference for the Lab component of our shadow-free image O.

Download Full Size | PDF

4. Experiments

In our experiment, we evaluate the results of color illumination invariant image and the relevant shadow-free image on more outdoor real images. These images consist of common scenes or objects under a variety of illumination conditions without shadow or with different types of shadows, such as soft shadows, cast shadows, and self shadows. We first compare our method with two state-of-the-art full-automatic methods (a statistical learning method [15] and a physical-based method [24] (Figs. 6 and 7)) and a shadow removal method [14, 30] with human intervention (Fig. 8), respectively. Then the results obtained by our method and Shen’s method [26] on images under different illumination conditions show that our color illumination invariant image is much closer to the intrinsic feature than Shen’s from the view of yielding an identical reflectivity result regardless of illumination condition (Fig. 9).

 figure: Fig. 6

Fig. 6 Comparisons with two state-of-the-art methods (Guo et al. [15] and Yang et al. [24]). (b1), (b2) are close-ups of the red rectangles in (a1), (a2).

Download Full Size | PDF

 figure: Fig. 7

Fig. 7 Comparisons with two state-of-the-art methods (Guo et al. [15] and Yang et al. [24]) on more images.

Download Full Size | PDF

 figure: Fig. 8

Fig. 8 Comparison with Arbel’s shadow removal method [14, 30]. (a) Original image. (b) Examples of user-guided shadow and non-shadow observations in Arbel’s method denoted by red circles and white circles respectively. (c) The extracted shadow masks in Arbel’s method. (d) Arbel’s shadow-free image. (e) Our shadow-free image.

Download Full Size | PDF

 figure: Fig. 9

Fig. 9 Images under different illumination conditions. For rows: (r1) original image, (r2) intrinsic image by Shen et al. [26], (r3) our color illumination invariant image, (r4) our shadow-free image. For columns: (a) (reference image) in daylight, (b) and (c) partly in daylight and partly in skylight, (d) in skylight.

Download Full Size | PDF

4.1. Comparison of shadow-free images

Comparison with full-automatic methods. In our experiment, we compare our method with two state-of-the-art methods ([15] and [24]) in terms of shadow-free results and running time. These two methods are based on shadow feature with statistical learning and physical model respectively. These methods are executed with the codes published by the authors of [15] and [24].

In Fig. 6, we show two shadow-free image results. For the first image (Fig. 6(a1)), both our method and Yang’s method [24] remove the soft-shadow of leaves successfully. However, Guo’s method [15] fails to recover a shadow-free image due to the wrong detection on shadows. Due to lack of robust shadow features, this shadow feature and learning based method [9] are not always effective, especially in soft shadow region or some complex scenarios (e.g., Figs. 7(d) and 7(e)). Close-ups of the first image (Fig. 6(b1)) show that, compared with our result, Yang’s method [24] fails to retain the white arrow on the ground. This is because that Yang’s method is not solid for neutral regions when its neighbor regions are also neutral [24]. For the second image (Fig. 6(a2)), our method gets a shadow-free image with texture preserved, while Guo’s method [15] fails to retain the original texture even when it detects the shadows successfully due to the inappropriate relighting on pixels. Specially, some pixels are relighted serious wrongly, such that it looks like that some objects that do not exist in the original image appear (e.g., the tiny yellow flowers shown in Guo’s shadow-free image in Fig. 6(b2)). Close-ups of the red rectangle (Fig. 6(b2)) show that some of the grasses are blurred in Yang’s method [24] due to bilateral filtering, while our method, without any filtering operation, retains the texture well.

Some other comparison results are shown in Fig. 7. The images in Fig. 7 show that our method removes shadows effectively from a single image with texture well-preserved. However, Guo’s method [15] fails to recover a shadow-free image either due to the wrong detection on shadow regions (Figs. 7(b), 7(d), and 7(e)) or the inappropriate relighting on pixels (Figs. 7(a) and 7(c)). Due to the complex of image reflectance and the irregular distribution of shadows in Fig. 7(e), none of the shadow regions are correctly detected in Guo’s shadow-free image. For images with dark shadows or in which shadows pervade in a scenario (Figs. 7(a)7(e)), Yang’s method [15] blurs the shadow-free images. For example, the clear water in the original image in Fig. 7(e) is seriously blurred in Yang’s method. Some small and tiny objects such as leaves are also removed in Yang’s results.

Figures 6 and 7 verify that our method removes shadows more effectively from a single image, and performs steadily on images with complex outdoor scenes. Our shadow-free image also better preserves the original texture compared to the other two methods. In running time, our method also outperforms Guo’s [15] and Yang’s [24]. In Table 2, we compare the running time of these three methods on the images shown in Fig. 7. All experiments were conducted on a computer with Intel (R) Core (TM) i3-2120 3.3GHz CPU and 2G RAM memory. The source codes that Guo and Yang provided are implemented in Matlab and C++ respectively. For better comparison, we implement our method both in Matlab and C++. Without any statistical learning or complex filtering operation, our method is faster than Guo’s [15] and Yang’s [24]. Note that, when the reflectance of image becomes complex and shadows on the image get intricate, it will be extremely hard for Guo’s method to detect shadow regions and then remove them, and the running time rose up to 6.4827e+003 second, almost 2 hours in Fig. 7(e). All these tested examples and quantitative results show that our method performs better in terms of accuracy, consistency, and efficiency than the other two methods on shadow images. Table 2

Tables Icon

Table 2. Comparison of running time of the three methods on images shown in Fig. 7 (measured in seconds)

Comparison with shadow removal method with human intervention. Apart from previous comparisons with full-automatic methods for shadow-free image, in this section, we also compare our method with a shadow removal method [14, 30]. In Arbel’s method, the shadow mask is firstly extracted based on region growing and SVM learning with the user inputs (Figs. 8(b) and 8(c)). Then the shadow-free image is constructed by multiplying a constant scalar to cancel the effect of shadows in umbra regions, while on penumbra regions, the shadows are removed based on the intensity surface construction.

Figure 8 gives the comparison of our method with Arbel’s method on shadow-free image. Figure 8(r1,e) shows that even though Arbel’s method effectively removes shadows from image with dark shadows, the texture in the original shadow area is not consistent with that in the non-shadow area. Figures 8(r2,d) and 8(r3,d) further show that Arbel’s method fails to reconstruct a shadow-free image from images with complex shadows. In these complex scenarios, the constant scalar in the umbra area in Arbel’s method no longer works. These wrong constant scalar relights the shadow regions either excessively or insufficiently. As a contrast, our method can not only remove the shadows, but also keep the texture consistency between the shadow and non-shadow area as shown in Figs. 8(r1,d), 8(r2,e), and 8(r3,e).

4.2. The “intrinsic” of color illumination invariant image

Both Guo’s [15] method, Yang’s [24] method, and Arbel’s method [14, 30] are designed for removing shadows from an image. They cannot yield an identical reflectivity result regardless of illumination condition. In this section we will show that our color illumination invariant image has intrinsic feature. We apply our algorithm to a series of images taken in outdoor scenes at different times on a sunny day to testify the intrinsic feature of our color illumination invariant image.

Shown in Fig. 9(r1), these tested images were taken under four different illumination conditions, one under total daylight (Fig. 9(r1,a)), two under partly daylight and partly skylight (Figs. 9(r1,b) and 9(r1,c)), and one under total skylight (Fig. 9(r1,d)). Taking the image under total daylight as reference image, we compare the differences between the corresponding processed results by different methods. For an intrinsic image derivation algorithm, the difference of the reference intrinsic image and other three intrinsic images should be approximately the same or at least much closer to each other than the original image sequences. In our experiment, we calculated the differences both for our color illumination invariant images and shadow-free images. As a comparison, we also present the intrinsic images obtained by Shen et al. [26] and the corresponding differences. The root mean square error (RMSE) is used as the measurement. Since being compressed, the range of our color illumination is much lower compared with original images and shadow-free images. Therefore, besides RMSE, we also adopt Relative Error ( RMSETheRangeofMeasuredImage) as our measurement. All these measured images are 24 bit RGB images.

As shown in Fig. 9(r3), the four color illumination invariant images generated by our method are basically the same. It verifies that our orthogonal decomposition on an image yields an identical reflectivity result regardless of illumination condition. The quantitative measurement is given in Table 3. Taken the images under total daylight and total skylight as an example, the RMSE difference of the original images is decreased from 101.85 to 4.67 in our color illumination invariant images. Also, when considering the Relative Error, this value is decreased from 39.94% to 5.7%. Even after a color restoration operation on illumination invariant images, the RMSE difference (24.88) between our shadow-free images is still much smaller than original images. However, the intrinsic images obtained by Shen et al. [26] still have a big difference, 86.36. The quantitative measurements demonstrate that our color illumination invariant images are considerably closer to generate an intrinsic representation than Shen et al. [26]. The corresponding shadow-free images also maintain this “intrinsic” to some extent.

Tables Icon

Table 3. MSE and relative error between images

5. Discussion and conclusion

In this paper, we propose a novel, effective and fast method to obtain a shadow-free image from a single outdoor image. Different from state-of-the-art methods that either need shadow detection or statistical learning, our shadow-free image is obtained by a pixel-wise orthogonal decomposition and color restoration. Also, our shadow-free image better preserves the texture information compared to the state-of-the-art method. Intrinsic to the illumination condition, our color illumination invariant image is useful for relighting by adjusting α information. Besides, only requiring pixel-wise calculation, our method for color illumination invariant image and shadow-free image can be further applied to the real-time applications to resist illumination variation.

Despite that our pixel-wise orthogonal decomposition is designed for outdoor shadow images, it is also valid for indoor situation by the correction of physical parameters β1,β2,β3. Figure 10(a) gives two results for our shadow-free images on the indoor shadow images. It shows that our pixel-wise orthogonal decomposition method can be also applied in indoor situation. According to our experiments, we also found two main limitations of our method: 1) Shadow-free image has somewhat color distortion, especially near neutral surface; 2) It does not work well on images with overexposure regions. The main reason for the failure on over-exposure regions is: the pixel values on overexposure region are not physically correct values, they do not satisfy the linear model and we cannot get their correct orthogonal decomposition. Figure 10(b) shows two failure examples for our shadow-free images. The modification and improvement of the model and method for an over-exposed regions, indoor image and more accurate color restoration are in process.

 figure: Fig. 10

Fig. 10 (a) Two original indoor images and the corresponding shadow-free images. (b) Two failure cases: original images with over-exposed regions and the corresponding shadow-free images.

Download Full Size | PDF

See Appendix for supporting content.

Appendix A. The uniqueness of particular solution up

The Theorem. Let A denote a 3 by 3 matrix, rank(A) = 2 and b be a non-zero three dimensional vector. For linear equations

Au=b
there exists a unique particular solution up of Eq. (26) that is perpendicular to its normalized free solution.

Proof. 1) Proof of the existence

Due to rank(A) = 2 and b0, we know that the dimension of the nullspace of Eq. (26) is one. Let us be a particular solution of Eq. (26) and u0 be the normalized free solution of Eq. 26, i.e., Aus = b, Au0 = 0 and ‖ u0 ‖ = 1. We obtain a new solution of Eq. (26) by

up=us-us,u0u0
By inner product operation on both sides of Eq. (27) with u0, we have
up,u0=us,u0-us,u0u0,u0=us,u0-us,u0=0
Then we have upu0. Because that the dimension of the nullspace of Eq. (26) is one, we get that up is perpendicular to any non-zero free solution of Eq. (26).

2) Proof of the uniqueness

Similar due to rank(A) = 2 and b0, the solution space of Eq. (26) can be decomposed into a particular solution plus one-dimensional nullspace solutions. Without loss of generality, for up in Eq. (27) and the normalized free solution u0, any solution u of Eq. (26) can be expressed as following,

u=up+au0
where aR. Suppose there exists another particular solution u′p of Eq. (26), such that u′pu0 and u′pup. According to Formula 28, we can have
up=up+au0
By inner product operation on both sides of Formula 29 with u0, we have
up,u0=up,u0+au0,u0
Because upu0, u′pu0, and ‖ u0 ‖ = 1, we obtain 0 = 0 + a′. Then a′ = 0.

From Eq. (29) and a′ = 0, we can get that the solution of Eq. (26), which is perpendicular to any non-zero free solution of Eq. (26), is unique.

For the case b= 0, we set up = 0.

Appendix B. Our results on more outdoor images

In this section we show our results on more outdoor images. For each case, we provide the original image, color illumination invariant image, α information, and the final shadow-free image.

 figure: Fig. 11

Fig. 11 Our results on some cast shadow images. Both images with soft shadows and dark shadows are given.

Download Full Size | PDF

 figure: Fig. 12

Fig. 12 Our results on more complex outdoor scenes, which mainly contain cast shadows and self shadows.

Download Full Size | PDF

Acknowledgments

This work was supported by the Natural Science Foundation of China under Grant No. 61102116, 61473280, and 61333019. We thank Eli Arbel for his provision of the source code of [14, 30].

References and links

1. E. H. Land and J. J. McCann, “Lightness and retinex theory,” J. Opt. Soc. Am. A 61, 1–11 (1971). [CrossRef]  

2. Y. Weiss, “Deriving intrinsic images from image sequences,” in Proc. ICCV, (IEEE, 2001), pp. 68–75.

3. G. D. Finlayson and S. D. Hordley, “Color constancy at a pixel,” J. Opt. Soc. Am. A 18, 253–264 (2001). [CrossRef]  

4. S.-S. Lin, K. M. Yemelyanov, E. N. Pugh Jr, and N. Engheta, “Separation and contrast enhancement of overlapping cast shadow components using polarization,” Opt. Express 14, 7099–7108 (2006). [CrossRef]   [PubMed]  

5. C. Jung, W. Kim, and C. Kim, “Detecting shadows from a single image,” Opt. Lett. 36, 4428–4430 (2011). [CrossRef]   [PubMed]  

6. J. T. Barron and J. Malik, “Intrinsic scene properties from a single rgb-d image,” in Proc. CVPR, (IEEE, 2013), pp. 17–24.

7. G. Finlayson, C. Fredembach, and M. S. Drew, “Detecting illumination in images,” in Proc. ICCV, (IEEE, 2007), pp. 1–8.

8. P.-Y. Laffont, A. Bousseau, S. Paris, F. Durand, and G. Drettakis, “Coherent intrinsic images from photo collections,” ACM Trans. Graph.31, (2012). [CrossRef]  

9. P. Laffont, A. Bousseau, and G. Drettakis, “Rich intrinsic image decomposition of outdoor scenes from multiple views,” IEEE Trans. Vis. Comput. Graphics 19, 210–224 (2013). [CrossRef]  

10. Y. Matsushita, K. Nishino, K. Ikeuchi, and M. Sakauchi, “Illumination normalization with time-dependent intrinsic images for video surveillance,” IEEE Trans. Pattern Anal. Machine Intell. 26, 1336–1347 (2004). [CrossRef]  

11. I. Huerta, M. Holte, T. Moeslund, and J. Gonzalez, “Detection and removal of chromatic moving shadows in surveillance scenarios,” in Proc. ICCV, (IEEE, 2009), pp. 1499–1506.

12. T.-P. Wu and C.-K. Tang, “A bayesian approach for shadow extraction from a single image,” in Proc. ICCV, (IEEE, 2005), pp. 480–487.

13. A. Bousseau, S. Paris, and F. Durand, “User-assisted intrinsic images,” ACM Trans. Graph. 28, 130 (2009). [CrossRef]  

14. E. Arbel and H. Hel-Or, “Shadow removal using intensity surfaces and texture anchor points,” IEEE Trans. Pattern Anal. Machine Intell. 33, 1202–1216 (2011). [CrossRef]  

15. R. Guo, Q. Dai, and D. Hoiem, “Paired regions for shadow detection and removal,” IEEE Trans. Pattern Anal. Machine Intell. 35, 2956–2967 (2013). [CrossRef]  

16. J.-F. Lalonde, A. A. Efros, and S. G. Narasimhan, “Detecting ground shadows in outdoor consumer photographs,” in “Proc. ECCV,” (Springer, 2010), pp. 322–335.

17. M. F. Tappen, W. T. Freeman, and E. H. Adelson, “Recovering intrinsic images from a single image,” IEEE Trans. Pattern Anal. Machine Intell. 27, 1459–1472 (2005). [CrossRef]  

18. J. Zhu, K. G. Samuel, S. Z. Masood, and M. F. Tappen, “Learning to recognize shadows in monochromatic natural images,” in “Proc. CVPR,” (IEEE, 2010), pp. 223–230.

19. G. D. Finlayson, S. D. Hordley, C. Lu, and M. S. Drew, “On the removal of shadows from images,” IEEE Trans. Pattern Anal. Machine Intell. 28, 59–68 (2006). [CrossRef]  

20. G. D. Finlayson, M. S. Drew, and C. Lu, “Entropy minimization for shadow removal,” Int. J. Comput. Vis. 85, 35–57 (2009). [CrossRef]  

21. J. Tian, J. Sun, and Y. Tang, “Tricolor attenuation model for shadow detection,” IEEE Trans. Image Process. 18, 2355–2363 (2009). [CrossRef]   [PubMed]  

22. J. Tian and Y. Tang, “Linearity of each channel pixel values from a surface in and out of shadows and its applications,” in “Proc. CVPR,” (IEEE, 2011), pp. 985–992.

23. R. Jain, R. Kasturi, and B. G. Schunck, Machine Vision (McGraw-Hill, Inc., 1995).

24. Q. Yang, K. Tan, and N. Ahuja, “Shadow removal using bilateral filtering,” IEEE Trans. Image Process. 21, 4361–4368 (2012). [CrossRef]   [PubMed]  

25. F. Liu and M. Gleicher, “Texture-consistent shadow removal,” in Proc. ECCV, (Springer, 2008), pp. 437–450.

26. J. Shen, X. Yang, Y. Jia, and X. Li, “Intrinsic images using optimization,” in Proc. CVPR, (IEEE, 2011), pp. 3481–3487.

27. B. A. Maxwell, R. M. Friedhoff, and C. A. Smith, “A bi-illuminant dichromatic reflection model for understanding images,” in Proc. CVPR, (IEEE, 2008), pp. 1–8.

28. M. S. Drew, G. D. Finlayson, and S. D. Hordley, “Recovery of chromaticity image free from shadows via illumination invariance,” in Proc. ICCV, (IEEE, 2003), pp. 32–39.

29. S. A. Shafer, “Using color to separate reflection components,” Color Res. Appl. 10, 210–218 (1985). [CrossRef]  

30. E. Arbel and H. Hel-Or, “Texture-preserving shadow removal in color images containing curved surfaces.” in Proc. CVPR, (IEEE, 2007), pp. 1–8.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (12)

Fig. 1
Fig. 1 One experimental result of our algorithm. (a) Original image. (b) One of the three grayscale illumination invariant images. (c) Color illumination invariant image with our pixel-wise orthogonal decomposition. (d) Shadow-free image after color restoration.
Fig. 2
Fig. 2 Grayscale illumination invariant image results based on the linear model
Fig. 3
Fig. 3 An illustration of pixel-wise orthogonal decomposition.
Fig. 4
Fig. 4 Pixel-wise orthogonal decomposition on images. Left: Original image. Middle: color illumination invariant image. Right: α information.
Fig. 5
Fig. 5 The stages of our algorithm implemented on a shadowed image. Note that the arrow in the first row represents the color space conversion, that is converting from RGB space to Lab space. These three components have no actual use in our algorithm. They are only used to act as the reference for the Lab component of our shadow-free image O.
Fig. 6
Fig. 6 Comparisons with two state-of-the-art methods (Guo et al. [15] and Yang et al. [24]). (b1), (b2) are close-ups of the red rectangles in (a1), (a2).
Fig. 7
Fig. 7 Comparisons with two state-of-the-art methods (Guo et al. [15] and Yang et al. [24]) on more images.
Fig. 8
Fig. 8 Comparison with Arbel’s shadow removal method [14, 30]. (a) Original image. (b) Examples of user-guided shadow and non-shadow observations in Arbel’s method denoted by red circles and white circles respectively. (c) The extracted shadow masks in Arbel’s method. (d) Arbel’s shadow-free image. (e) Our shadow-free image.
Fig. 9
Fig. 9 Images under different illumination conditions. For rows: (r1) original image, (r2) intrinsic image by Shen et al. [26], (r3) our color illumination invariant image, (r4) our shadow-free image. For columns: (a) (reference image) in daylight, (b) and (c) partly in daylight and partly in skylight, (d) in skylight.
Fig. 10
Fig. 10 (a) Two original indoor images and the corresponding shadow-free images. (b) Two failure cases: original images with over-exposed regions and the corresponding shadow-free images.
Fig. 11
Fig. 11 Our results on some cast shadow images. Both images with soft shadows and dark shadows are given.
Fig. 12
Fig. 12 Our results on more complex outdoor scenes, which mainly contain cast shadows and self shadows.

Tables (4)

Tables Icon

Table 1 Parameters (PRMs) from representative sun angles

Tables Icon

Algorithm 1 Algorithm pipeline: Pixel-wise orthogonal decomposition for shadow-free image

Tables Icon

Table 2 Comparison of running time of the three methods on images shown in Fig. 7 (measured in seconds)

Tables Icon

Table 3 MSE and relative error between images

Equations (31)

Equations on this page are rendered with MathJax. Learn more.

H = 400 700 E ( λ ) S ( λ ) Q H ( λ ) d λ
log ( F H + 14 ) = log ( K H ) 2.4 + log ( f H + 14 )
K H = argmin K H λ = 400 700 | Q H ( λ ) ( E day ( λ ) - K H E sky ( λ ) ) |
log ( F R + 14 ) + log ( F G + 14 ) - β 1 log ( F B + 14 ) = log ( f R + 14 ) + log ( f G + 14 ) - β 1 log ( f B + 14 )
β 1 = log ( K R ) + log ( K G ) log ( K B )
I 1 = log ( F R + 14 ) + log ( F G + 14 ) - β 1 log ( F B + 14 ) = log ( f R + 14 ) + log ( f G + 14 ) - β 1 log ( f B + 14 ) = log ( v R + 14 ) + log ( v G + 14 ) - β 1 log ( v B + 14 )
I 2 = log ( F R + 14 ) β 2 log ( F G + 14 ) + log ( F B + 14 ) = log ( f R + 14 ) β 2 log ( f G + 14 ) + log ( f B + 14 ) = log ( v R + 14 ) β 2 log ( v G + 14 ) + log ( v B + 14 )
I 3 = - β 3 log ( F R + 14 ) + log ( F G + 14 ) + log ( F B + 14 ) = - β 3 log ( f R + 14 ) + log ( f G + 14 ) + log ( f B + 14 ) = - β 3 log ( v R + 14 ) + log ( v G + 14 ) + log ( v B + 14 )
β 2 = log ( K R ) + log ( K B ) log ( K G ) , β 3 = log ( K G ) + log ( K B ) log ( K R )
{ u R + u G - β 1 u B = I 1 u R + β 2 u G + u B = I 2 - β 3 u R + u G + u B = I 3
A u = I
2 + β 1 + β 2 + β 3 - β 1 β 2 β 3 = 0
u = u s + α u 0
u 0 ' = ( β 1 β 2 - 1 , 1 + β 1 , 1 + β 2 ) = log ( K R K G K B ) ( log ( K R ) , log ( K G ) , log ( K B ) )
u 0 = 1 u 0 ' u 0 '
{ u p = u s + α p u 0 α p = - u s , u 0
u = u p + α u 0
{ u p = u + α p u 0 α p = - u , u 0
u ( x , y ) = ( log ( v R ( x , y ) + 14 ) , log ( v G ( x , y ) + 14 ) , log ( v B ( x , y ) + 14 ) ) T
u ( x , y ) = α ( x , y ) u 0 + u p ( x , y )
S = { ( x , y ) | u ( x , y ) u ( x , y ) - u 0 ɛ ; x = 1 , 2 , . . , M ; y = 1 , 2 , , N }
T = 1 G ( x , y ) S ( u 0 - u ( x , y ) u ( x , y ) )
u c ( x , y ) = u p ( x , y ) ( u p ( x , y ) u p ( x , y ) + 1 κ u ( x , y ) u ( x , y ) - u 0 3 + 1 T )
{ u c Lab ( x , y ) = ( L c ( x , y ) , a c ( x , y ) , b c ( x , y ) ) T u p Lab ( x , y ) = ( L p ( x , y ) , a p ( x , y ) , b p ( x , y ) ) T
u f Lab ( x , y ) = ( L c ( x , y ) , a p ( x , y ) , b p ( x , y ) ) T
A u = b
u p = u s - u s , u 0 u 0
u p , u 0 = u s , u 0 - u s , u 0 u 0 , u 0 = u s , u 0 - u s , u 0 = 0
u = u p + a u 0
u p = u p + a u 0
u p , u 0 = u p , u 0 + a u 0 , u 0
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.