Performance Evaluation of Shadow Detection Algorithms

Document Sample
Performance Evaluation of Shadow Detection Algorithms Powered By Docstoc
					 Performance Evaluation of
Shadow Detection Algorithms


               Like Zhang
     University of Texas at San Antonio

             Heng-Ming Tai
       University of Tulsa, Tulsa, OK

           Chwan-Hwa Wu*
             Auburn University
                 Introduction

 This paper conducts the performance evaluation for
  several shadow detection algorithms based on different
  color spaces.
 Background model in the object segmentation algorithm is
  updated using information from pixel changes and the
  detected object.
 Performance comparison among several shadow detection
  schemes in strong light and weak light conditions is
  presented.
    Object Segmentation Problems


• Light changes
• Background changes (car moves in/out)
• Shadow effects
     Pixel-based Segmentation
              Frame n      Frame n-1


Background                  Frame
  Update                   Difference

             Background     Object
              Difference   Extraction
                                  VOP
               Video          Post
               Object      Processing
              Object-based Adaptive
               Background Update
                        Frame n                  Frame n-1



     Background        Background             Frame
       Update           Difference           Difference
Moving         Still
Object        Object         Object Extraction
       Object
    Classification                    VOP
                                   Post            Video
                                Processing         Object
  Background Update Algorithm

• Find frame difference (FD)
                     1, if | I n  I n1 | T p
             FD(i)  
                     0, otherwise
• Get extracted object information (VO)
           LRk   FD(i), if i VOk
• Identify Still object
                  0, if i VOk and LRk  Ts
          SR(i)  
                  SR(i)  1, otherwise
• Update background
                     I n (i), if SR(i )  Tb
            BG(i )  
                     BG(i ), otherwise
            Shadow Detection
Shadows in object segmentation and tracking for two
   video sequences: (a) Campus, (b) Parking lot
                Shadow Detection

Methods based on color space
  Color spaces are characterized with different bases that
  represent intensity and color information in color images
• YUV
• HSV
• RGB
Method based on gradient information
• Edge Difference
                Shadow Detection
                      (YUV Space)


• YUV has been used by most image compression
  standards such as JPEG, H.261, and MPEG.
• YUV color space assume the following hypotheses on
  the environment
   – strong light source
   – static and planar background
• Properties:
   – Insensitive to illumination changes
   – Performs best in weak light conditions (indoor or cloudy
     day)
                      Shadow Detection
                                 (YUV Space)

• Shadow pixel can be described as
                 I k ( x, y )  E k ( x , y )  k ( x, y )
   where k(x,y) is the reflectance of the object surface and Ek(x,y) the
   irradiance
                         C A  C p cos( N ( x, y ), L), illuminate
                         
          E k ( x, y )  
                         C A, Shadowed
                         
• If a background point is covered by the shadow, we have
                                         CA
            R k ( x, y ) 
                             C A  C P cos ( N ( x, y ), L)
   CA and Cp are the intensity of the ambient light and of the light source,
   respectively. L denotes the direction of the light source and N(x,y) the
   object surface normal
                         Shadow Detection
                                     (HSV Space)


• HSV describes any color in terms of three quantities - Hue,
  Saturation, and Value.
    HSV color space corresponds closely to human
     perception of color
    The color information improves the discrimination
     between shadow and object
• To achieve better distinction between moving cast shadows and
  moving object, a shadow mask SPk for each (x,y) points is defined as
                                  I kv ( x, y )
                     1, if   v                   ( I ks ( x, y )  Bks ( x, y ))  Ts
                                  Bk ( x, y )
                     
      SPk ( x, y )         | I kH ( x, y )  BkH ( x, y ) | TH
                     0, otherwise
                     
                     
                     
                Shadow Detection
        (Proposed Edge-based RGB Space)


Proposed scheme: Edge-based gradient algorithm in RGB
  space
• Difference of color channels
    DR  Rmo  Rbg      DRG | DR  DG |
    DG  G mo  Gbg     DRB | DR  DB |
    DB  Bmo  Bbg      DGB | DG  DB |

• Shadow detection
   1. DR  0 and DG  0 and DB  0
      or DR  0 and DG  0 and DB  0
   2. DRG  Tc and DRB  Tc and DGB  Tc
                        Shadow Detection
                    (Edge-Difference Method )

Alternative approach for shadow removal is to use the
  gradient filter
 Shadow area tends to have a slow gradient change in
  luminance value
 After taking the gradient, values in the shadow region tend to be
  very small while the edges have large gradient values
 In the indoor environment or weak light condition, the pixel value
  difference among the neighbors of edge points is very small.
• The edge difference method to extract object and remove shadow is:
    ED( x, y )  max{max{| I n ( x  1, y  1)  I n ( x  1, y  1) |,
                      | I n ( x  1, y  1)  I n ( x  1, y  1) |},| I n ( x  1, y )  I n ( x  1, y ) |,
                      | I n ( x, y  1)  I n ( x, y  1) |}
   ED: the object edges, In: current frame, x, y: location of current pixel
Shadow Detection and Removal

            Highway 1




       Parking Lot Monitoring
                     Matching Error

The accuracy of extracted object comparing with the
standard object mask (extracted manually)

                                   1 N ,M
                           Em         
                                    NM Tkl  Okl
                                  NM k 1,l 1


Tkl : hand-drawn target mask (extracted manually)
Okl : extracted object image




       Pixel-based            Intra-frame           Objectl-based
 VOP Extraction and Background Update

            Frame 65
       Initial Background




Frame 100




Frame 110



                            Updated background   Extracted object
                 Object Segmentation

Pixel-based




Inter-Frame
Subtraction




 Proposed
Object-based

               Frame 100   Frame 110   Frame 120
  Highway Monitoring




    Frame 1           Frame 110




Updated background   Extracted object
          Strong Light Condition




Object with       YUV           HSV
 shadow




   RGB            Edge        Original
Matching Error (Strong Light)




Solid line: RGB   Dash line: Edge
Dot line: HSV     Dash-dot line: YUV
              Weak Light Condition




Object with           YUV            HSV
 Shadow




   RGB                Edge       Original
Matching Error (Weak Light)




Solid line: RGB   Dash line: Edge
Dot line: HSV     Dash-dot line: YUV
                       Conclusions

• Performance evaluation of different shadow
  detection methods has been examined in the
  strong light and the weak light conditions.

• Related work:

 Haritaoglu, et al., “W4: Real-time surveillance of people and their
  activities”, IEEE Trans. Pattern Analysis and Machine Intelligence,
  vol. 25, pp. 809-830, Aug. 2000

 Prati, et al., “Detecting moving shadows: algorithms and
  evaluation”, IEEE Trans. Pattern Analysis and Machine
  Intelligence, 25, pp. 918-923, July 2003
Thank you!

Questions ?