In an image reading apparatus, the invention provides a method for
detecting foreign matter which may adhere to a white reference plate, and
correcting a reference value when foreign matter is detected. The method
includes computing an average of read values, comparing an absolute value
of difference between the computed average value and data of the next
read position to a predetermined threshold, and when a determining unit
determines that foreign matter adheres to the reference plate, replacing
the average value used for the determination of whether or not the
foreign matter adheres to the reference plate with the read data.