If image data is input to an image processor (step S1), the image
processor generates an integrated image sum (step S2). The image
processor extracts a maximum output max from the integrated image sum
(step S3). The image processor compares the maximum output max with a
preset threshold (step S4). In this case, the threshold is set to 80% of
the saturation amount. When the saturation amount is 3 V, the threshold
is 2.4 V. If the maximum value max is smaller than the threshold, imaging
continues. If the maximum value max is equal to or larger than the
threshold, the integrated image sum is cleared to 0 (step S5), and a
refresh operation is performed.