Homomorphic Filtering Approach using HSV Color

5 downloads 0 Views 261KB Size Report
In this new method all analysis carried out in the HSV color space using Value component as darkness / brightness ... When an image generated via physical process, its gray level values are .... Processing System”, (Digital Signal Processing).
Homomorphic Filtering Approach using HSV Color Space in Automatic Image Shadow Segmentation Hamideh Etemadnia, Prof. Mohammad Reza Asharif Department of Information Engineering University of Ryukyus 1 Senbaru, Nishihara, 903-0213, Okinawa JAPAN

Abstract: -In this paper we proposed a new and simple method in order to extract the shadow area, by using the homomorphic system to emphasize more on illumination and reflection components of image gray-level value separately. In this new method all analysis carried out in the HSV color space using Value component as darkness / brightness of a color to improve the accuracy in detecting shadow area. The presented experimental results which are obtained for shadow identification show that the proposed method has been successfully segmented the shadow area. Key-Words: -Homomorphic system, Shadow, Segmentation, HSV color space, Background equalization, Image processing.

1 Introduction Shadow occurs when an object totally or particularly occludes directly from the light source. Generally, shadow is divided into two parts: 1- Self shadow which is a part of shadow on the main object 2- Cast shadow, which is the object’s shadow on background. Different parts of shadow are illustrated in Fig. 1. Several approaches based on shadow properties [1], [2] or model base [3] have been proposed for shadow identification and classification. As it is clearly obvious, illumination in shadow area is lower than other parts of the image. However the reflection in the shadow area is as equal as non-shadow area for the same object. In the algorithm proposed in this paper we use the homomorphic approach in order to operate on image illumination and reflection separately in the frequency domain. We found out that using Value component of HSV (Hue, Saturation and Value) color space in shadow detection using homomorphic system, demonstrates a better result than using the dominant component of RGB color space [4], [5]. Therefore, the RGB components should be transferred to HSV components, at the first. As some applications for shadow segmentation we can mention cloud shadow identification in remote sensing images or shadow detection using in Robotic Vision for an unknown environment. Shadow detection also can be used in control traffic

system to identify the moving object from its shadow.

The body of this paper sketches out a system to recognize shadow by utilizing the homomorphic processing system in order to operate on illumination and reflection components of an image gray-level separately. The procedure of the proposed method for identifying shadow has three steps: the first step is converting the RGB color space components to HSV color space components, the second step is the homomorphic filtering process, and the third step is shadow identification. This paper is organized as follows. The concept of the homomorphic system is described in section 2. Section 3 discusses about the proposed methods to identify shadow area using LPF and HPF.

Experimental results based on the proposed methods and discussions about the results are presented in section 4 and section 5 concludes the paper.

2 Homomorphic Systems When an image generated via physical process, its gray level values are proportional to energy radiated by a physical source [7]. Consequently, gray-level values of image pixels, f(x,y), must be nonzero and finite. Also f(x,y) has two multiplication components: 1- illumination, i(x,y), which is determined by the light source 2- reflection, r(x,y), which is determined by material and color of objects in the image. f(x, y) = i(x, y).r(x, y) (1) Where the nature of i(x,y) component is nonzero and finite, and r(x,y) component is between zero (total absorption) and one (total reflection). Theoretically, shadow is the area of an image with the lower illumination value than other parts of the image but the reflection component of an object which shadow area laid on it, is usually the same as other parts. So, for shadow detection, we propose a new method to distinguish the illumination changes. To this end, we need to separate two components of each graylevel value, f(x,y). Because of multiplication operator in equation (1), it can not be used directly to operate separately on illumination and reflection components using any linear process. For instance, in the frequency domain we will reach to the following inequality: FFT{f(x, y)}

FFT{i(x, y)}.FFT{r(x, y)}

(2)

The homomorphic system will separate the image illumination and reflection components, by taking logarithm operation of each pixel gray-level f(x,y) and converting its components’ multiplication to addition: ln[f(x, y)] = ln[i(x, y)] + ln[r(x, y)]

(3)

Then, we can use FFT operator separately on each component: FFT{ ln[f(x, y)]} = FFT{ ln[i(x, y)]} + FFT{ ln[r(x, y)]} Ff (u, v) = Fi (u, v) + Fr(u, v)

(4)

illumination logarithm, ln[i(x, y)], and reflection logarithm, ln[r(x, y)], respectively. Furthermore, we process Ff (u, v) by means of a linear filter. Therefore, the key to the approach is the separation of the illumination and reflection components achieved in the form shown in equations (2)-(5) and then to process the result by a linear filter, H(u, v), as shown below: Z(u, v) = H(u, v)Ff (u, v) = H(u, v)Fi (u, v) + H(u, v)Fr(u, v)

(6)

Where Z(u, v) is the Fourier transform of the result. Fig.2 illustrates the whole process of the homomorphic and linear filtering system.

Input LOG

FFT

Linear Processing

Output IFFT

EXP

H(u,v)

Homomorphic System

Fig.2 Block diagram of the Homomorphic system

3 Shadow Segmentation Homomorphic Filtering

using

The illumination component of an image, i(x, y), generally is characterized by slow spatial variation, while the reflection component, r(x, y), tends to vary abruptly, particularly at the junctions of dissimilar objects. These characteristics lead to associate the low frequency components of the Fourier transform of an image with the illumination and the high frequencies with the reflection [7]. Although these associations are rough approximation, they can be used for some advantages. In homomorphic system we have converted the multiplicative components of gray level, i(x, y) and r(x, y), to addition. Now by implying an appropriate filter, we want to separate these two components in order to segment shadow area by identifying the illumination changes. Here we have used two kinds of filtering, namely High Pass Filter (HPF) and Low Pass Filter (LPF) which are discussed in the next sections.

(5)

Whereas, Ff (u, v), Fi (u, v) and Fr(u, v) are the Fourier transform of gray-level logarithm, ln[f(x, y)],

3.1 Shadow Segmentation Using HPF In this part, first of all we are trying to extract the reflection components of image gray-levels in the

homomorphic system by using HPF. The HPF characteristic transfer function is given in [5]. In the next process, the gray-level value of the background of the original image and the one of the high pass filtered image which contains the reflection components and very small portion of illumination components, .i(x, y)+r(x, y), are detected by using an order filter. We choose the median filter as the order filter to calculate the median values of whole image in both cases. Then, we calculate the appropriate gain from these two median values for automatic background equalization. Here, we assume that the median gray-level is laid on the background. Then in the next process, by using the calculated gain in the median process, the backgrounds of the original image and the filteredimage will be equalized. Now, we divide the filtered image from the equalized original image in order to identify the shadow area. Fig. 3 illustrates the block diagram of the proposed system using HPF. We suppose that the reflection component will be more emphasized through high pass filtering. While the original image is subtracting from the filtered image, the reflection part is eliminated in order to get the illumination part to identify as shadow candidate area [5]. Since in HPF, we identify the reflection changes in an image, therefore, if we have shadow projected on a dark object in background, then the dark object will be identified as shadow area incorrectly (See Fig. 5(h)). This is the drawback of using HPF.

RGB/HSV Converter

Input Image

Extracted Shadow

Highpass Homomorphic Filter V-Component

-

Med Med

/

G

x

Generally, we are expecting a kind of smooth image as an output when the LPF is used in the homomorphic system. In this stage we have illumination changes or shadow area and of course a very small portion of reflection, i(x, y) + ·r(x, y), as LPF can not remove totally the effect of reflection. If we remove the phase information from the output of inverse Fourier transforms to have real and positive values for real image pixels we will reach to a better visibility for the shadow area. LPF approach is significantly powerful to detect the shadow over the dark objects (See Fig. 5(g)). The LPF characteristic function is given in [6]. Fig. 4 illustrates the system for shadow area extraction using LPF as the linear homomorphic filter.

RGB/HSV Converter

Input Image

As we pointed out earlier, it is supposed that the LPF has more emphasis on illumination component of the pixel gray-level. So, we are trying to find the illumination changes by using LPF in order to detect the shadow area. Choosing the LPF as the base linear filter for the homomorphic system enables us to reach to our goal -extracting shadow area- by less computational load compared with using HPF.

Extracted Shadow

Fig. 4 Block diagram of the proposed system using LPF

3.3 Comparison Between HPF and LPF Fig. 5 illustrates the block diagram of the LPF and HPF as a linear processing in the homomorphic system. Obviously using the LPF approach has been greatly improved Fig. 5. Comparison between two implemented system (LPF, HPF) the detection of shadow areas as compared to the HPF approach. • The computational load in the LPF approach is enormously lower than the one to detect the shadow area in the HPF approach. • LPF approach is significantly powerful to detect the shadow over the dark objects (Fig. 6(g)).

MF: Median Filtering G: Calculated gain Div: Division

Fig. 3 Block diagram of the proposed system using HPF

3.2 Shadow Segmentation using LPF

V-Component

Lowpass Homomorphic Filter

LPF

Value Comp

EXP

Amplitude Extracted Shadow

LOG HPF

EXP

MF G. Div. Extracted Shadow

Fig. 5 Comparison between two implemented systems (HPF & LPF)

4 Experimental Results The proposed shadow identification method was tested and compared in variety of color images implying appropriate HPF and LPF as the basis linear filters for the homomorphic system. As an example, the results for the Orange image are shown in Fig. 5. RGB color space image and Value component of HSV color space of the original image are shown in Fig. 5(a) and Fig. 5(b). Fig. 5(c) and Fig 5(d) depict the results of the proposed method using LPF and HPF as the homomorphic filter, respectively. In both cases the shadow area is detected. But in the LPF case we can see the specific boarder between the self and cast shadow area. Original RGB image and Value component of HSV color space of another test image which show the shadow of one object (orange) over the dark object (book) are illustrated in Fig. 5(e) and Fig. 5(f). Fig. 5(g) and 5(h) show the results of the proposed method using LPF and HPF, respectively. As we can see from the result the dark object is detected as shadow area by using HPF (Fig. 5(h)) which means this filter is not suitable in the cases when the object’s shadow occurred on another dark object [5] but by using LPF (Fig. 5 (g)), it is clearly obvious that just the shadow area are segmented. These examples allow us to recognize the powerful behavior of the homomorphic system and HSV color space in shadow identification using LPF.

5 Conclusions In this paper, we present a shadow identification method based on the homomorphic system by using Value component of HSV color space and implying HPF and LPF in the homomorphic filters. In processing with value component and LPF we can see the clear boundary between the self shadow and cast shadow which will be a robust result to separate self and cast shadow area from each other. Also implying LPF allows us to extract the shadow area that occurred on the dark objects. Further work will focus on defining a strategy to classify self and cast shadow points in shadow candidate area separately.

References [1] C.Jing and M. O. Ward, ”Shadow Segmentation and Classification in a constrained Environment,” CVGIP: Image Understanding, 59 (2): 213-225, 1994. [2] G. F. Lea and R. Bajcsy, ”Combining color and geometry for the active, visual recognition o

shadows.” IEEE proceeding of the Fifth International Conference of Computer Vision, ICCV: 1995. [3] E. Salvador , Andrea Cavallaro and T. Ebrahimi, ”Shadow Identification and Classification Using Invariant Color Model.” ICASSP 2001, May 7-11, 2001, Salt Lake city, UT [4] N. Herdotou, K.N. Plataniotis, and A.N. Venetsanpoulos,” A color segmentation scheme for object-based video coding,” in Proceeding of the IEEE Symposium on Advances in Digital Filtering and Signal Processing, 1998, pp. 2529. [5] M.R. Asharif, H. Etemadnia, ”Homomorphic Processing Approach for Image Shadow Identification”, International Symposium on Telecommunication, IST 2003, Isfehan, Iran, August 16-18, 2003. [6] Prof. Mohammad Reza Asharif, Hamideh Etemadnia, ”Automatic Shadow Identification in FFT Domain by using Homomorphic Processing System”, (Digital Signal Processing) DSP Symposium, D6-5, Nagoya, Japan, November 5- 7, 2003. [7] Rafael C. Gonzales, Richard E. Woods, ”Digital Image Processing”. Addison Wesley, 1993.

Experimental results

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

Fig. 6 (a): RGB color space image; (b): Value component of HSV color space image; (c): Result of proposed method using LPF; (d): Result of proposed method using HPF; (e): RGB color space image (Shadow of orange occurred on a dark object); (f): Value component of HSV color space image; (g): Result of proposed method using LPF; (h): Result of proposed method using HPF.

Suggest Documents