In an autofocus image sensor, monitoring pixels are disposed adjacent to a
pixel array over a length equal to that of the pixel array in each of a
standard portion and a reference portion. Signals from the monitoring
pixels of both of the standard portion and the reference portion are
subjected to arithmetic operation to control accumulation of electric
charges. Thus, an error in position detection is minimized.