Click here for direct access to the paper.
We present a method to automatically detect shadows in a fast and accurate manner by employing the inherent sensitivity of digital camera sensors to the near-infrared (NIR) part of the spectrum. Dark objects, which confound many shadow detection algorithms, often have much higher reflectance in the NIR. We can thus build an accurate shadow candidate map based on image pixels that are dark both in the visible and NIR representations. We further refine the shadow map by incorporating ratios of the visible to the NIR image, based on the observation that commonly encountered light sources have very distinct spectra in the NIR band. The results are validated on a new database, which contains visible/NIR images for a large variety of real-world shadow creating illuminant pairs, as well as manually labelled shadow ground truth. Both quantitative and qualitative evaluations show that our method outperforms current state-of-the-art shadow detection algorithms in terms of accuracy and computational efficiency.
Qualitative and Quantitative Results
Since we are the first to use near-infrared (NIR) images for shadow detection, we had to create a new image set that contains both the visible and the NIR image, and create the ground truth. In total, we have a labelled set of 74 visible/NIR pairs, that represent a big variety of scenes, both in complexity and predominant illuminants. We created three subsets, namely outdoor, indoor flash, and indoor uncontrolled. The latter set consists of images that were taken indoors, with a mix of sunlight and fluorescent/incandescent light. In most cases, sunlight was the predominant illuminant for this image set.
We present the results in terms of overall accuracy (Acc) and Matthews Correlation Coefficient (MCC) on the different image sets, as well as on all images.
The MCC is computed as follows in terms of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN):
By clicking on one image set (leftmost column), a web site opens with the detailed results for all images of that image set. Note that by clicking on the thumbnail, the full resolution image opens.
Here you can download the image dataset (linear images) as well as the ground truth masks used in this work. We also provide the code that was used to reproduce the results reported in the paper.
- RAW Image dataset (105 MB): Download
– Visible and NIR Image set.
- Ground Truth (3 MB): Download
– Binary Ground Truth shadow masks for the Image set above.
- Matlab code (17 MB): Download
– Code used to generate all the results on this page.
– Use this code with the Image set above to reproduce the results of the Quantitative and Qualitative Results section.
– Contains our method, as well as the original implementations from Tian et al.  and Guo et al. . It allows you to select different methods and generates an HTML file for comparison.
– See Readme.txt for further information on how to use the code.
– Code was tested on Windows 7 with Matlab 2011b.
Important Note: If you are having problems extracting the files above, please download and install 7Zip.
 D. Rüfenacht, C. Fredembach, and S. Süsstrunk, “Automatic and accurate shadow detection using near-infrared information.” To appear in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).
 J. Tian, L. Zhu, and Y. Tang, “Outdoor shadow detection by combining tricolor attenuation and intensity.” EURASIP J. Adv. Sig. Proc., 2012.
 R. Guo, Q. Dai, and D. Hoiem, “Single-Image shadow detection and removal using paired regions.” IEEE CVPR, pages 2033-2040, 2011.
Questions and remarks about the code and our method are welcome and can be sent to email@example.com.