ShadowCuts: Photometric Stereo with Shadows

This page contains code/data/results for an algorithm for performing Lambertian photometric stereo in the presence of shadows. Main features of the algorithm are:


Some of the real image datasets used in the paper can be found here:


Some sample code and synthetic datasets to test it can be found here:

Within each folder, first run gendata.m (in Matlab) to generate the appropriate data files. Then, run gclabel.cpp to estimate the shadow map and normal field. Finally, run genheight.m in Matlab to integrate the normal field. The light source directions and some other parameters are hard coded in gclabel.cpp.

For other datasets of your own, you can generate the input files and the graph cuts optimization code similar to the examples shown above.


M.K. Chandraker, S. Agarwal and D.J. Kriegman
ShadowCuts: Photometric Stereo with Shadows [PDF]
CVPR 2007, Minneapolis, Minnesota.

Last updated March 7, 2008.