Ai Weili, Wu Zhihong, Liu Yanli. Outdoor shadow detection with paired regions[J]. Journal of Image and Graphics, 2015, 20(4): 551-558. DOI: 10.11834/jig.20150412.
Shadows usually degrade image quality and cause undesirable problems. Hence
shadow detection is a fundamental step in computer vision and image analysis
including such processes as image segmentation
object recognition
stereo registration
and scene analysis. For a single image
shadow detection is particularly challenging because of limited information. Most shadow detection algorithms have difficulty in detecting lathy shadows and self-shadows
as well as in distinguishing between shadows and dark pixels. To address these problems
a novel algorithm with pairwise regions for shadow detection is proposed in this study. Unlike traditional algorithms that explore pixel or edge information
the proposed algorithm involves the training of two models with support vector machine to learn shadow features and to classify shadow and nonshadow regions. Our algorithm has two stages: offline learning and online detecting. In the offline stage
the image is first segmented
after which every single regionis obtained by using the mean shift and canny detection algorithms. Support vector machine is then employed to construct a single region shadow model with the use of the texture and intensity features in each region. A pairwise region shadow model is finally constructed after manually marking pairwise regions of shadow and nonshadow with the distances of texture histograms
color ratios(in RGB color space and lab color space)
and the ratios of H channel to I channel in HSI color space. In the online stage
the same segmentation manipulation as that in the prior stage is performed for the input image. Thereafter
the features of the single and pairwise region models are extracted and integrated into the corresponding model to obtain the classification results separately. Finally
a graph is built using the two models
and the graph-cut algorithm is employed to label shadow and nonshadow regions. The following are the advantages of our method: 1) We consider both pixels and edges to achieve accurate segmentation
particularly for long and thin shadows; and 2) Except for common shadow features
we employ the ratios of H channel to I channel in HSI color space to detect self-shadows and to remove dark pixels from shadows. Visual experimental results show that our algorithm not only detects spindly shadows and self-shadows effectively but also separates shadows from dark pixels correctly. In terms of confusion matrix in shadow detection
our algorithm achieves an 85.2% performance versus 70.1% for the algorithm reported by Guo et al. and 60.2% for the algorithm by Tian et al. In addition
our algorithm runs 34% faster than that of Guo et al. under the same situation because of the use of a simple feature set. Shadow detection algorithms based on regions are commonly used for outdoor image processing. However
few algorithms can detect some special shadows
such as threadlike shadows and self-shadows
or to distinguish shadows from dark pixels. In this study
a new algorithm is presented to solve the problems arising from a single outdoor image by using paired regions. Experiment results indicate that our algorithm has satisfactory performance in detecting spindly shadows and self-shadows
as well as in distinguishing shadows from dark pixels.