A deviation detecting device comprising an optical system for forming correlated first and second images of an object; first and second image sensors for sensing the first and second images so as to generate first and second outputs representative of the intensity distributions thereof, respectively; a correlation detector for shifting the first output relative to the second output while incrementally changing the amount of shifting so as to detect a plurality of correlation degrees representative of the degrees of the correlation between the first and second outputs at different shift position defined by the incremental change in the amount of shifting; a highest correlation shift position detector for detecting the shift position which is defined by the amount of shifting providing the highest correlation degree; a calculation unit for calculating, based on the shift position detected by highest correlation shift position detector, data corresponding to the amount of deviation of the first and second images from a reference value; and a first determination unit for determining which of the correlation degree at a shift position next to the highest correlation shift position and the correlation degree at a position further next to the highest correlation shift position is lower than the other. The calculation unit is arranged to be disabled when the determination by the first determination unit indicates that the correlation degree at the shift position next to the highest correlation one is lower than that at the shift position further next thereto.
Automatic focusing system with correlation-determined disabling