The present invention discloses a shadow removal method and apparatus. The method includes the following steps that: an inputted image to be detected is pre-segmented through using a super pixel
algorithm, and seed points are allocated for pre-segmented super pixels; the distance measure of each pixel point in the pre-segmented super pixels and the seed points of adjacent pre-segmented super pixels is obtained, the minimum value of the distance measure is adopted as the class
label of the pixels, and the coordinate mean values of pixels in each class
label are obtained, and the coordinate mean values are adopted as new seed points; the distance measure is iteratively calculated by using the weights of color distance and spatial distance until new seed points no longer change, and the new seed points are determined as final seed points and are adopted as super pixels;
material classification is performed on the super pixels, and a shadow material is removed. According to the method, the complexity of
background information is not considered, the material in the image is directly decomposed into the super pixels; and the super pixels are described based on the fusion of various features, the super pixels containing shadow are removed from pixel classes; and therefore, the accurate coordinate position of a target can be obtained.