When an optical image obtained by an optical scanning unit of optically
scanning an original sheet automatically fed by an original sheet feeder
is read, it is discriminated in units of pixel whether or not dirt or
scratch attached to a running reading glass plate is present. Moreover,
the number of the dirt and the width of the dirt are detected, and an
image reading position which does not come under the influence of the
dirt as much as possible is set based on the detected number of the dirt
and the detected width of the dirt even when the dirt is detected at all
the reading positions.