Patent ID: 8805025

Claim:
A method of detecting staining on a media item, the method comprising: receiving an image of the media item, where the image comprises a plurality of pixels having different intensity values within a range of intensity values; using pixels from the image having intensity values within a central portion of the range of intensity values to create a centrally-weighted image; applying a threshold to each pixel in the centrally-weighted image to transform each pixel to a binary value thereby creating an evaluation image comprising a plurality of pixels, each having one of two possible values; calculating a difference image between a binary reference image and the evaluation image by comparing a pixel in the evaluation image with a pixel in the binary reference image at a corresponding spatial location, so that the difference image includes (i) a stain pixel at each spatial location in which a pixel in the evaluation image has a low intensity pixel and the corresponding pixel in the binary reference image has a high intensity pixel, and (ii) a non-stain pixel at all other spatial locations; indicating that the media item is stained in the event that the difference image meets a staining criterion.