International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 900

ISSN 2229-5518

An Improved Shadow Segmentation Method

For Color Images Based on Intensity

D. Usha Nandini, Dr. Ezil Sam Leni, A. Mary Binu Aswini

Abstract: Shadows are difficult to detect, especially in single outdoor images. It affects the quality of images and it may lead to bad results in image segmentation and object recognition. Detecting and removing shadows cause many problems in image processing. Tian proposed Tricolor Attenuation Model to detect shadows that describes attenuation relationship between shadow and non-shadow regions. It requires rough segmentation and four thresholds. It fails to give accurate results in complex scenes. In this paper, proposed a novel method of combining intensity with tri color image. It avoids the segmentation step and takes a threshold to detect the shadow instead of four thresholds. All simple and complex shadow in outdoor images is detected and comparisons validated its effectiveness.

Key words:Tricolor attenuation Model, Masking, Discrete W avelet Transform.

1 INRODUCTION

Shadow detection in images is great significance in image processing. Shadow is a created area where the direct light from the light source cannot reach due to the obstruction by an object. Shadows usually occur in the outdoor scenes when the object is not brightened by the light source. Shadows regularly introduce errors in the performance of computer vision processes, such as object recognition and tracking. Shadows can be divided into two types such as cast shadow and self-shadow (shown in fig 1).
The self-shadow is creating dark place in the part of an object when the light is not brightened and apart from the object, some dark place projected from it when the light is not illuminated which called as cast shadow. The projected dark place of object also has two types. Some area in that is completely dark when light is totally infertile and some area moderately infertile which is called as umbra and penumbra respectively. Shadows attenuate pixel intensity and, the degree of attenuation is different in the RGB colors. Shadows cause problems in where objects identification.
To show the difference between shadow and non-shadow (real object) background by a machine is very difficult. The non-shadow regions have high intensity in day light but the shadow regions of umbra and penumbra have middle and low intensity in part sunlight + skylight and skylight respectively.

Research Scholar, Department of CSE, Sathyabama University, Chennai, Tamil Nadu, India.

Professor & HOD, Department of CSE, SRR Engineering College, Chennai, Tamil Nadu, India.

Pursuing M.E in CSE at Sathyabama University, Chennai, Tamil Nadu, India.

Shadows affect the quality of image by loss of feature, false color tone but it can gives extra information about place of position and shape of object.

2 EXISTING METHOD

In existing, they proposed tricolor attenuation model for
detect the shadow. Let denote [𝐹𝑅 𝐹𝐺 𝐹𝐡 ] as a tricolor vector of pixel value in image F. [𝐹𝑁𝑆𝑅 𝐹𝑁𝑆𝐺 𝐹𝑁𝑆𝐡 ] and [𝐹𝑆𝑅 𝐹𝑆𝐺 𝐹𝑆𝐡 ] as a pixel value vector in corresponding non-shadow and shadow region. [βˆ†π‘… βˆ†πΊ βˆ†π΅] denotes
tricolor attenuation vector. The relationship between
shadow and non-shadow is

[𝐹𝑅 𝐹𝐺 𝐹𝐡 ]=[𝐹𝑆𝑅 𝐹𝑆𝐺 𝐹𝑆𝐡 ]-[βˆ†π‘… βˆ†πΊ βˆ†π΅] (1)
Fig. 1. Types of Shadows
The relationship between βˆ†π‘… βˆ†πΊ π‘Žπ‘›π‘‘ βˆ†π΅ is called
Tricolor Attenuation Model (TAM) [1]which describes the
attenuation relationship between shadow and non-shadow background in three color channels. This relationship is
used for strong shadow detection. For example βˆ†π‘… > βˆ†πΊ >
βˆ†π΅, if we subtract B from R channel
IJSER Β© 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 901

ISSN 2229-5518

= 𝐹𝑆𝑅 - 𝐹𝑆𝐡
= 𝐹𝑁𝑆𝑅 - βˆ†π‘… – (𝐹𝑁𝑆𝐡 - βˆ†π΅)
= 𝐹𝑁𝑆𝑅 - 𝐹𝑁𝑆𝐡 + (βˆ†π΅ βˆ’ βˆ†π‘…)<𝐹𝑁𝑆𝑅 - 𝐹𝑁𝑆𝐡 . (2)
Disparity between R and B channels of shadow is lower
than that of the corresponding non-shadow background. If
we subtract the minimum attenuated channel from the maximum attenuated channel, the results in shadow region will be lower than the non-shadow region. From this key point TAM detect the shadows.
TAM represented by





βˆ†π‘…

urban aerial images and it is based on some thresholding scheme [8], [9]. In property-based techniques, it depends on its features .In the property based shadow detection method, it will not detect the shadow depend on only one feature. So one feature is not enough and it needs more features to detect shadows. For example, shadows usually have lower pixel values compare than non-shadow regions, but pixels that have lower values may not be shadows.
Most of shadow detection methods focus on detecting moving shadows. Problem in that is located the moving objects and their moving shadows. Yangs proposed detect the moving cast shadow using ratio edge [5]. Huang and Chen employed Gaussian mixture model to learn the color features and to model the background appearance under
βˆ†π‘…
βˆ†πΊ =
βˆ†π΅
. βˆ†π΅

βˆ†π΅

βˆ†πΊ . βˆ†π΅ =

βˆ†π΅

1. βˆ†π΅
π‘š. 𝐹𝑁𝑆𝑅 /𝐹𝑁𝑆𝐡
𝑛. 𝐹𝑁𝑆𝐺 /𝐹𝑁𝑆𝐡
1
. βˆ†π΅ (3)
cast shadows [6]. Siala described a moving shadow
detection algorithm by training the manually segmented
shadow regions [7].
Where m=1.31, n=1.19.
Tian proposed the multi-step shadow detection algorithm in the TAM model [1]. It segments the given input image and calculates TAM for each sub region. Take the mean value of each sub region as a threshold to obtain initial shadow. In each sub region, it using the mean value in R, G and B color channels to verify and obtain detailed and accurate boundaries.
It can work on single still images and also with complex scenes. But it has some problem such that need rough segmentation and it uses four thresholds. These thresholds are insufficient for some images. To overcome above problems we combine tri color image with intensity information. From our proposed method, we can avoid rough segmentation and take one threshold in its place of four simple ones.

3 RELATED WORKS

Shadows are an important and challenging part in pattern recognition. It gives more information about the scene such as the shape, location of sun and the geometry. Most of shadow detection methods can be divided into property based and physics based.
In physics-based, it depends on some prior knowledge such as information of light and geometry of place [2], calibration of the camera and some scenes of indoor information [3], [4]. Most of these physics based techniques are usually designed for some specific applications of detect the shadows in video stream or shadows in continuous image [5], [6] and [7] detect the shadows in
Lalonde et al. [10] proposed learning approach to detect ground shadows by train a decision tree classifier on a set of shadow sensitive features. Learning methods can give accurate results if the parameters are trained well. It will fail when the test image differ from input image. Guo et al. [11] proposed learning based shadow detection method by paired region to detect the shadows.
Shadow detection in still image is difficult by less information. Wu et al. [12] employ the Bayesian approach to extract shadows in single image, but their method need user interaction as input. Nielsen et al. [13] employ Ξ± channel for soft shadow segmentation but it need manually handpick a sunlit surface and shadow counterpart for initialize the overlay color. Markov random field model [14] to detect shadows automatically in a single color image but it cannot work on complex scenes.

Fig 2 left: original image. Right: TAM image.
Many methods can work on single still images, but they have suffered from at least one of the following problems.
IJSER Β© 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 902

ISSN 2229-5518

1. Need some prior knowledge such as user interaction [12].
2. Effective in specific application [6].
3. Failing on complex scenes [14].

Proposed combining tri color and intensity can overcome the above problems and give more accurate results.
Input image
TAM image Intensity image
Combined TAM and intensity
Threshold for detecting shadows
Output image (shadows)
Fig.3. Block diagram of proposed method.

4 PROPOSED METHOD

The proposed method is combining the TAM image and intensity to detect the shadows. It mainly based on Tricolor Attenuation Model. It gives strong information of shadow detection.

4.1 Tri color image

From the block diagram first we generate the tri color image. To obtain the tri color image, we first calculate the
mean values in R,G and B color channel (𝐹𝑅 𝐹𝐺 𝐹𝐡 ) of
input image F.
objects as a shadow because of dark. In Fig 3.The TAM image is formed by subtraction method of blue channel is subtracted from red channel. It detects some blue objects also as shadow.
TAM assumes a shadow and its non-shadow share an identical reflectance property. So it needs segmentation to ensure shadows are detected on uniform reflectance regions. Then the subtraction will smooth pixel values but it may details missing in accurate shadow detection results.
TAM can give strong information of shadow detection even though it may agonize from false detection and details missing problems. These shortcomings overcome by our proposed method of combining TAM and intensity (gray scale) image.

4.2 Combined TAM and intensity image

Combined image is obtained by
T=Ξ±R+S (5) R - TAM image; S - intensity image and Ξ± - weight co-
efficient. Detecting shadows mainly depend upon tricolor
image and by adding intensity image gives the accurate precise results.
The main problem of combine the Tricolor image and intensity is done by image fusion method otherwise masking method. Image fusion is the process that combines information from multiple images of the same image. The main application of image fusion is merging the gray-level high-resolution panchromatic image and the colored low- resolution multispectral image.
οΏ½ οΏ½ οΏ½ οΏ½ οΏ½

π‘˜ =1,……,𝑀 π‘˜ π‘˜ π‘˜

[𝐹� 𝑅
𝐹𝐺
𝐹𝐡 ] =1/M (βˆ‘π‘˜ βˆˆπ‘€

π‘˜

[𝐹𝑅
𝐹𝐺
𝐹𝐡 ])
(4)
Fig.4. Left: TAM image. Right: combined TAM image and
Where 𝐹𝑅
denotes the kth pixel of image Fin R channel,
and M is the number of pixels.
intensity information.
The tricolor images are formed by R-G and R-B respectively. It provides strong information for shadow detection so always shadows are dark in TAM images. Sometimes this subtraction idea may detect some other
IJSER Β© 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 903

ISSN 2229-5518




g 2 X







h 2 X

Fig.5. Block diagram of 1-D DWT
The advantage of this image fusion method is giving new image that retains the most desirable information and characteristics of each input image. We select discrete wavelet transform method to fuse the images.

4.2.1 Discrete Wavelet Transform

Discrete wavelet is a type of representation that can give frequency content of signal at particular instant of time. It transform decompose the image into a set of coefficients which records image information and then can be combined in order to obtain fusion images. The key method for using the wavelet transform image fusion is the combining of coefficients to obtain high quality image. The decomposition of input image in 1-D DWT is shown in Fig
5. The 2-D discrete wavelet transform is shown in Fig 6.

Fig.6. Block diagram of 2-D DWT
2-D DWT is very useful for image processing. The DWT has some property that based on frequency bands. In that the low frequency bands have small spatial declaration but
high-frequency bands have high vales. The property of
DWT is shown in fig 6.In that, image of band with lowest frequencies has the smallest spatial declaration and it gives the approximation information of the original image. It represent in the top left corner of that image other parts gives the band with high frequencies.So the DWT is suitable for image compression and the same time the other sub-images show the detailed information of the original image. Therefore, these sub-images can be used for edge detection or corner detection.

4.2.2 Masking Method

Mask is a small matrix value and it is called by weights. Each mask is using its one of the position as an origin. By using a mask, we can get output image of the same size as the input image. It is useful for noise reduction and reduces the blurred image. We can combine tricolor image and intensity image using mask image. From the mask we can get clear image that exactly the same width and height in pixels as the input images.

(a) (b)

(c)
Fig.7.(a) Original image. (b) Output of masking method image. (c) DWT method output.

5 RESULTS AND DISSCUSSION

Detecting shadows by combining tricolor and intensity images are discussed in this paper. Combining of the tricolorand intensity image is done by two methods,such
IJSER Β© 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 904

ISSN 2229-5518




(a) (b)


(c)

Fig 8. (a) original image (b) TAM image
(c) output of proposed method
that masking and Discrete Wavelet Transform (DWT).

From fig.7 we can get clear idea about discrete wavelet transform (DWT) gives the accurate output compare than masking method. The proposed method output by discrete wavelet transform method is shown below. This is done by mat lab. The first image shows the different between TAM [1] and our proposed method. Combined tricolor and intensity gives the better accurate results compare than [1] method.Some other results of this method is shown below in fig 9.
Fig 9.Left :input image, right : output of proposed method

6 CONCLUSION

Detection of shadows in still images and videos is a broad interest in computer vision. In this paper, we proposed a method of combining intensity with TAM image. Here mainly the shadow detection based on TAM information and the accuracy of shadow is improved by intensity information. By combining TAM and intensity, it is improving quality of results. It is avoiding segmentation and requires one threshold. Different simple and complicated images were tested and give accurate results.

7 REFERENCES

[1] J Tian, J Sun, Y Tang, β€œTricolor attenuation model for shadow detection,” IEEE Trans Image Process.
18(10),2355-2363 (2009)
[2] D. C. Knill, D. Kersten and P. Mamassian,
β€œGeometry of shadows,” J. Opt. Soc. Amer. A, vol.
14, no. 12, pp. 3216-3232, 1997.
IJSER Β© 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 3, March-2014 905

ISSN 2229-5518

[3] H. Jiang and M. Drew, β€œTracking objects with shadows,” in Proc. ICME03: Int. Conf. Multimedia and Espoo. 2003, pp. 100-105.
[4] Y. Wang, K. F. Loe, J. K. Wu, and, K. β€œA dynamic
conditional random field model for foreground and shadow segmentation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 28, no. 2, pp. 279-289, Feb.2006.
[5] W Zhang, X Fang,X Yang, Q Wu, β€œMoving cast
shadow detection using ratio edge”. IEEE Trans
Multim. 9(6), 1202-1214(2007)
[6] J Huang and C Chen, β€œMoving cast shadow
detection using physics-based features”, in IEEE Conference on Computer Vision and Pattern Recognition, Miami, Florida, USA, pp. 2310-
2317(2009)
[7] K Siala, MChakchouk, O Besbes, FChaieb,
β€œMoving shadow detection with support vector domain description in the color ratio space”, in International Conference on Pattern Recognition, vol. 4. Cambridge, UK, pp. 384-387(2004)
[8] Victor J. D. Tsai, β€œA Comparative Study on
Shadow Compensation of Color Aerial Images in Invariant Color Models”, IEEE Trans on Geoscience and Remote Sensing, vol. 44, no. 6, June
2006
[9] Chung, Lin and J Huang, β€œEfficient Shadow
Detection of Color Aerial Images Based on Successive Thresholding Scheme”, IEEE Trans on Geoscience and Remote Sensing, vol. 47, no. 2, June
2009
[10] S Narasimhan, J Lalonde, A Efros, β€œDetecting ground shadows in outdoor consumer photographs”, in European Conference on Computer Vision, vol. 2. Crete, Greece, pp. 322-
335(2010)
[11] D Hoiem, R Guo, Q Dai, β€˜Single-image shadow
detection and removal using paired regions”, IEEE
Conference on Computer Vision and Pattern
Recognition, Springs, Colorado, USA, pp. 2033-
2040 (2011)
[12] T. P. Wu and C. K. Tang, β€œA Bayesian approach for
shadow extraction from a single image,” in Proc.
ICCV, 2005, pp. 480-487.
[13] M. Nielsen and C. B. Madsen, β€œsegmentation of
soft shadows based on a daylight- and penumbra model,” in Proc. Mirage, 2007, pp. 341-352.
[14] M. S. Drew and C. Lu, β€œA Markov random field
framework for finding shadows in a single color image,” in Proc. 10thCongr. Int. Colour Association, Granada, Spain, May 8-13, 2005.
[15] Jie Li and Wenxuan Shi β€œShadow detection in color
aerial images based on HIS space and color
attenuation relationship” EURASIP Journal on
Advances in Signal Processing 2012:116. 2012
[16] Brian C. Lovell, Conrad Sanderson, Andres Sanin, β€œShadow detection: a survey comparative evaluation of resent methods” Pattern Recognition, vol. 45, no. 4, 1684-1695 (2012).
IJSER Β© 2014 http://www.ijser.org