Patent ID: 8355187

Claim:
An image reading apparatus that reads a document being transmitted in a direction of vertical scanning comprising: a timing predicting unit that predicts a reading-start-timing of the document by detecting a front-end of the document, the timing predicting unit predicting a reading-end-timing of the document by detecting a back-end of the document; an image reading unit that starts reading a horizontal scanning line of the document at the reading-start-timing, the image reading unit reading a line between documents at the reading-end-timing, the image reading unit generating density data of pixels on one of the horizontal scanning line of the document and the line between documents; a line density data classification unit that classifies the density data, which has been generated by the image reading unit, into first density data of a first line, second density data of a second line, and third density data of a third line, the first line being the horizontal scanning line that is a predetermined distance backward from the front-end, the second line being the horizontal scanning line of the document other than the first line, the third line being the line between documents; a first specific density data storage unit that stores the first density data as first specific density data; a second specific density data storage unit that stores a predetermined number of the second density data as second specific density data, including the second density data of a latest line that is the horizontal scanning line being read at the reading-end-timing; a third specific density data storage unit that stores the third density data as third specific density data; a determination unit that determines whether or not a foreign substance is attached to a reading position at which the image reading unit reads the document based on at least one of the first, second and third specific density data; and a peak density position specifying unit that specifies a peak density position of one of the first, second and third lines based on one of the first, second and third specific density data corresponding to one of the first, second and third lines, the peak density position being a position of a pixel that has a density value more than a first predetermined density standard value in one of the first, second and third lines, wherein if a difference of distance in a direction of horizontal scanning between the peak density position of one of the first, second and third lines and the peak density position of another one of the first, second and third lines is less than a predetermined distance and a density value of the pixel at the peak density position is more than a second predetermined density standard value, then the determination unit determines that the foreign substance is attached to the reading position.