Background subtraction or temporal differencing is commonly applied on an image sequence for foreground/background segmentation. However, cast shadows of moving foreground objects in a scene often result in detection errors for many vision-based applications. To address this problem, the authors propose an algorithm exploiting the information of colour, shading, texture, neighbourhood and temporal consistency to detect shadows efficiently and adaptively. The experimental results show that the proposed method can detect the penumbra as well as the umbra in different kinds of scenarios under various illumination conditions.