1. A method for processing a digital image comprising a plurality of pixels, wherein a pixel from the plurality of pixels may comprise values for one or more color channels, the method comprising the steps of: identifying from the plurality of pixel a set of foreground pixels; and selecting at least some of the pixels from the set of foreground pixels and for each selected foreground pixel: classifying pixels in a region surrounding the selected foreground pixel into one of two sets: a first set of pixels comprising pixels in the region that have an intensity that is within an intensity threshold value of the intensity of the selected foreground pixel; and a second set of pixels comprising pixels in the region that do not have an intensity that is within an intensity threshold value of the intensity of the selected foreground pixel; computing a first average intensity of the first sets of pixels and a second average intensity of the second set of pixels; and for a digital image with a background generally lighter than its foreground, responsive to the first average intensity being close to or brighter than the second average intensity, classifying the selected foreground pixel as a background pixel.