We design an algorithm based on illuminant invariance theory to find shadow regions in a colour image. Shadows are caused by a local change in both the colour and the intensity of illumination. Using both chromaticity and intensity cues, an illuminant discontinuity measure is derived by which shadow edges can be locally identified. We model the problem of finding shadows by a Markov Random Field using our new measure. A graph-cut optimization method is then applied to the MRF to find the globally optimal segmentation of shadows in an image. In previous work, a 2-d chromaticity colour invariant image was recovered from a greyscale 1-d invariant image by adding back light so as to match the chromaticity of bright pixels. Here, since we segment shadows, we can take a completely different approach and leave nonshadow pixels unchanged, while adding light to shadow pixels so as to match neighbouring nonshadow pixels. The results are much more convincing shadow-free images, and shadow-segmentation is excellent.
Cheng Lu, Mark S. Drew, "Shadow Segmentation and Shadow-Free Chromaticity via Markov Random Fields" in Proc. IS&T 13th Color and Imaging Conf., 2005, pp 125 - 129, https://doi.org/10.2352/CIC.2005.13.1.art00024