Cast shadows cause serious problems in the functionality of vision-based applications, such as video surveillance, traffic monitoring and various other applications. Accurate detection and removal of cast shadows is a challenging task. Common shadow detection techniques normally use color information, which is not a reliable base in every scenario. This paper presents a novel scheme for real time detection of cast shadows using contour like structures of objects, which are obtained by gradient-based background subtraction. The scheme does not use any color information. Two basic rules are followed for shadow detection. The first rule is that shadows do not change the texture of the background. The second rule is a cast shadow lies outside the boundary of an object and has a relatively small common boundary with the object. Experimental results show the performance of the proposed scheme. Objective evaluation shows that the algorithm classifies 90 percent of the pixels of the objects and their shadow correctly.