Patent ID: 7830563

Claim:
an image scanner that scans a document sandwiched between a transparent contact glass and a white scanning member, the image scanner comprising: a scanning unit that scans the white scanning member via the contact glass by using a linear sensor on one line basis when the image scanner is powered on, and outputs image data of the white scanning member; a data generating unit that generates an average of a predetermined pixel data area around a pixel data out of pixel data that are scanned by the scanner, and repeats generating the average up to an amount of one line of pixels so as to generate one line of pixel data; a storage unit that stores therein a one line of the pixel data generated by the data generating unit as a reference data in a situation that there is no dirt on both the contact glass and the white scanning member; a calculating unit that calculates a ratio between the one line of the pixel data generated by the data generating unit and the reference data stored in the storage unit at a predetermined time; and a determining unit that determines whether at least one of the contact glass and the white scanning member has dirt or a scratch thereon based on a difference between a maximum value and a minimum value of the ratio calculated by the calculating unit and a threshold.