Single-Image Shadow Detection and Removal using Paired Regions [pdf]
Ruiqi Guo, Qieyun Dai and Derek Hoiem
CVPR 2011.

Abstract: In this paper, we address the problem of shadow detection and removal from single images of natural scenes.
Different from traditional methods that explore pixel or edge information, we employ a region based approach. In addition to
considering individual regions separately, we predict relative illumination conditions between segmented regions from their
appearances and perform pairwise classification based on such information. Classification results are used to build a graph of
segments, and graph-cut is used to solve the labeling of shadow and non-shadow regions. Detection results are later refined by
image matting, and the shadow free image is recovered by relighting each pixel based on our lighting model. We evaluate our
method on the shadow detection dataset in [19]. In addition, we created a new dataset with shadow-free ground truth images,
which provides a quantitative basis for evaluating shadow removal.


Our database for shadow detection and removal evaluation.
Contains original and ground truth shadow images.
Code [zip] Slides [pptx]
Demo code for detecting and removing shadows.
This code is written in Matlab and is tested on MATLAB 2009b on Linux x86_64.
Some supporting mex files may need to recompiled for other platforms. See the README file for instruction.
Dataset [zip]