Abstract:
The focus detecting apparatus of the present invention is adapted to detect focusing state of a taking lens by detecting relative positional relation between first and second images formed by luminous bundles from an object which passed through first and second image re-forming lenses, including first series of photosensitive elements receiving the first image, second series of photosensitive elements receiving the second image, first calculating device related to a plurality of portions of the series of elements each having a prescribed number of elements on the first series of photosensitive elements, for calculating a representative value for each portion, a second calculating device related to a plurality of portions of the series of elements each having a prescribed number of elements on the second series of photosensitive elements, for calculating a representative value for each portion correlation calculating device for calculating correlation between representative values of the portions of the series of elements on the first series of photosensitive elements and the representative values of each of the plurality of groups provided by dividing the portions of the series of elements on the second series of photosensitive elements, specifying device for specifying a group having highest correlation out of the correlation; and detecting device for detecting relative positional relation between the portions of the series of elements on the first series of photosensitive elements and the specified groups.

Description:
This application is a continuation of application Ser. No. 480,618, filed Feb. 15, 1990. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a focus detecting apparatus, and more specifically, to an improvement of a correlation calculating algorithm in a focus detecting apparatus using TTL (Through The Lens) phase difference detecting method. 
     2. Description of the Related Art 
     A focus detecting apparatus using a so-called TTL phase difference detecting method such as disclosed in U.S. Pat. No. 4,636,624 has been known, in which a condenser lens and first and second image re-forming lenses are provided behind a predetermined focal plane of a taking lens, and an amount of defocus, which corresponds to a difference amount between an image formed by the taking lens and the predetermined focal plane, is detected as an amount of displacement of a distance between first and second images re-formed by the first and second image re-forming lenses. 
     FIG. 1 is a schematic diagram showing the above mentioned conventional apparatus. Referring to the figure, the focus detecting apparatus comprises a taking lens TL, a film equivalent plane F, a condenser lens CL, image re-forming lenses L 1  and L 2 , an aperture mask M limiting light incidental to the image re-forming lenses L 1  and L 2 , apertures M 1  and M 2  of the aperture mask M and charge storing type image sensors I 1  and I 2 . An image in the range between the points A and B on the film equivalent plane F are re-formed as an image in the range between the points A 1  and B 1  and an image in the range between the points A 2  and B 2 , respectively, on the image sensors I 1  and I 2  by means of the condenser lens CL and the image re-forming lenses L 1  and L 2 . The image sensors I 1  and I 2  output two image signals corresponding to intensity distribution of the two images formed thereon to a correlation calculating circuit 1, and the distance between the two images formed on the image sensors I 1  and I 2  are determined in the correlation calculating circuit 1, since the image signals have a certain correlation. 
     FIG. 2 shows, in detail, a focus detecting optical system in the above described focus detecting apparatus. If the object is in-focus and a point image C is present on the film equivalent plane F, point images C 1  and C 2  are formed on the image sensors I 1  and I 2 . The distance between the point images at this time is represented as S 0 . When the object is in front focus and a point image D is present in front of the film equivalent plane F, point images D 1  and D 2  are formed on the image sensors I 1  and I 2 . The distance between the point images at this time is smaller than S 0 . If the object is in rear focus and a point image E is present behind the film equivalent plane F, point images E 1  and E 2  are formed on the image sensors I 1  and I 2 . The distance between the point images at this time is larger than S 0 . In this manner, when we represent the distance between images in the in-focus state by S 0 , the distance between images in the front focus state is smaller than S 0 , and the distance between images in the rear focus state is larger than S 0 . The distance between images is approximately proportional to the defocus amount. Therefore, the in-focus/out-of-focus state can be determined by detecting the distance between images, and if the object is out of focus, the amount and direction of defocus can be detected. 
     Now, if there are three point images A, B and C on the film equivalent plane F, the optical paths for forming point images C 1  and C 2  from the point image C on the optical axis are symmetrical about the optical axis l 0 . However, the optical paths for forming point images A 1  and A 2  based on the point image A out of the optical axis (the optical paths for forming point images B 1  and B 2  from the point image B) are asymmetrical about the optical axis l 0 . Therefore, brightness and size of the point images A 1  and A 2  and B 1  and B 2 , respectively, may not the same, even if the optical system for focus detection is manufactured in perfect symmetry about the optical axis l 0 . In this manner, as the height of image (hereinafter referred to as an &#34;image height&#34;) from the optical axis l 0  is increased, there will be less and less coincidence between the brightness and size of the two images generated from the same point image. Consequently, the brightness distributions of the two images on the image sensors I 1  and I 2  are not always symmetrical. Consequently, the distance between images determined by the correlation calculating circuit 1 becomes inaccurate, causing an error in focus detection. This is called an image height error. 
     As to the point images C, D and E on the optical axis, there will be no image height error generated. However, if the optical system for focus detection is formed not perfectly symmetrically, for example, when the area or shape of a pair of openings M 1  and M 2  of the aperture mask M is different from each other, the brightness or size of the two images formed based on the same point image does not coincide with each other, which also causes error in focus detection. 
     In view of the foregoing, various methods for evaluating correlation between the two images as exactly as possible to determine the distance between images accurately even in such cases have been proposed. For example, Japanese Patent Laying-Open No. 61-103114 discloses a correlation calculating method. In accordance with this method, one center of light intensity distribution (hereinafter referred to as a light intensity center) is calculated for the entire optical image on the image sensor I 1  serving as a base portion, a light intensity center is calculated in each of a plurality of partial regions of the optical image on the image sensor I 2  serving as a reference portion (with each partial region assumed to be of the same length as the base portion), the light intensity center of each partial region in the reference portion is compared with the light intensity center of the base portion, and when the light intensity center of one partial region coincides with the light intensity center of the base portion, it is determined that the partial region corresponds to the base portion. However, in this method, when the intensity centers of two or more partial regions in the reference portion coincide with the light intensity center of the base portion, which of the partial regions in the reference portion corresponds to the base portion can not be determined. 
     Further, since it is assumed that each of the partial region is of the same length as the base portion, it can not be assumed that the brightness distribution in that region is substantially flat. Therefore, influence of the brightness distribution when the light intensity center of a partial region near the base portion is calculated is different from that in calculating the light intensity center of a partial region distant from the base portion. Consequently, errors in focus detection derived from asymmetry of the brightness distribution can not be avoided. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to improve precision in detection in a focus detecting apparatus using TTL phase difference detecting method. 
     Another object of the present invention is to reduce influence of brightness distributions of two images whose phases are to be calculated, in a focus detection apparatus using TTL phase difference detecting method. 
     A further object of the present invention is to reduce influence of errors in manufacturing optical system for forming two images whose phases are to be calculated, in a focus detecting apparatus using TTL phase difference detecting method. 
     A still further object of the present invention is to reduce influence of asymmetry of brightness distributions of two images whose phases are to be calculated, in a focus detecting apparatus using TTL phase difference detecting method. 
     The above described objects of the present invention can be attained by a focus detecting apparatus in accordance with the present invention adapted to detect relative positional relation between first and second images formed by luminous bundles from an object passed through first and second portions of a taking lens further passing first and second image re-forming lenses to detect focus state of the taking lens, comprising: a first series of photosensitive elements receiving the first image; a second series of photosensitive element receiving the second image; first calculating means related to a plurality of portions of the series of elements each consisted of a prescribed number of elements on the first series of photosensitive elements, for calculating a representative value of each of the portions of the series of elements based on the light intensity received by that portion of the series of elements; a second calculating means related to a plurality of portions of the series of elements each consisted of a prescribed number of elements on the second series of photosensitive elements, for calculating a representative value of each of the portions of the series of elements based on the light intensity received by that portion of the series of elements; correlation calculating means for dividing the portions of the series of elements on the second series of photosensitive elements into a plurality of groups having the same number of portions of the series of elements as that of the portions of the series of elements on the first series of photosensitive elements for calculating correlation between representative values of each group and the representative values of the portions of the series of elements on the first series of photosensitive elements; specifying means for specifying a group having highest correlation calculated by the correlation calculating means; and detecting means for detecting relative positional relation between the portion of the series of elements on the first series of photosensitive element and the group specified by the specifying means. 
     In the focus detecting apparatus structured as described above, even if the optical systems for forming the first and second images are asymmetrical, the influence of the asymmetry on the error in focus detection can be reduced. 
     The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic diagram of a focus detecting apparatus using TTL phase difference detecting method; 
     FIG. 2 is a detailed diagram of a focus detecting optical system in the focus detecting apparatus shown in FIG. 1; 
     FIG. 3A is a schematic diagram illustrating formation of center data based on a plurality of light intensities from pixel signals in accordance with one embodiment of the present invention; 
     FIG. 3B is a diagram showing distribution of pixel signal data of FIG. 3A; 
     FIG. 3C is a diagram of distribution of light intensity center data provided from the pixel signal data of FIG. 3B; 
     FIG. 4 is a schematic diagram of a correlation calculating circuit in the focus detecting apparatus in accordance with one embodiment of the present invention; 
     FIG. 5A shows one example of distribution of pixel signals in one embodiment of the present invention; 
     FIG. 5B shows light intensity centers calculated from the pixel signals of FIG. 5A; 
     FIG. 6A shows distribution of pixel signals provided by compressing levels of the pixel signals of FIG. 5A and by applying offset thereto; 
     FIG. 6B shows light intensity centers calculated from the pixel signals of FIG. 6A; 
     FIG. 7A shows distribution of pixel signals in a base portion of one object for describing the method of determining offset in accordance with one embodiment of the present invention; 
     FIG. 7B shows distribution of pixel signals in a reference portion of one object for describing the method of determining offset in accordance with one embodiment of the present invention; 
     FIG. 8A shows distribution of pixel signals in a base portion of another object for describing the method of determining offset in accordance with one embodiment of the present invention; 
     FIG. 8B is a diagram showing distribution of pixel signals in a reference portion of another object for describing the method of determining offset in accordance with one embodiment of the present invention; 
     FIG. 9A is a diagram showing distribution of light intensity centers of one object for illustrating a method of determining resolution of light intensity centers in accordance with one embodiment of the present invention; 
     FIG. 9B is a diagram showing distribution of light intensity centers of the same object of FIG. 9A calculated at resolution different from that of FIG. 9A; 
     FIG. 10 is a flow chart showing a focus detecting program in accordance with one embodiment of the present invention; 
     FIG. 11 is a flow chart showing specific contents of correlation calculation of FIG. 10; 
     FIG. 12 is a flow chart showing contents of a first modification of one embodiment of the present invention; 
     FIG. 13 is a flow chart showing contents of a second modification of one embodiment of the present invention; 
     FIG. 14 is a flow chart showing contents of a third modification of one embodiment of the present invention; 
     FIG. 15A shows distribution of pixel signal levels in a fifth modification of one embodiment of the present invention; 
     FIG. 15B shows distribution of rows of pixels provided by prescribed processing of the pixel signals shown in FIG. 15A; 
     FIG. 16 is a flow chart showing contents of a sixth modification of one embodiment of the present invention; 
     FIG. 17 shows arrangement of luminous bundles from an object in accordance with a seventh modification of one embodiment of the present invention; and 
     FIG. 18 shows a range of comparison of centers in accordance with an eighth modification of one embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the present invention, data G 3  to G n-2  indicative of centers of functional values (for example, centers of the light intensity distribution themselves, i.e. the light intensity centers) based on a plurality (for example (N-4)) of light intensities are formed for a small number of (for example adjacent 5) pixel signals D 1  to D 5 , D 2  to D 6 , D 3  to D 7  . . . , D n-4  to D n  out of n pixel signals D 1  to D n , as shown in FIG. 3A. Consequently, data of the pixel signals D 1  to D n  as shown in FIG. 3B are converted into data of the light intensity centers G 3  to G n-2  as shown in FIG. 3C. In the present invention, such data conversion is carried out on the base portion and the reference portion, respectively. The data indicative of the centers may be determined by using contrast values of light intensities. 
     Now, assuming that the base portion outputs n pixel signals D 11  to D 1n  and the reference portion outputs m (m &gt;n) pixel signals D 21  to D 2m , (n-4) centers G 13  to G 1 (n-2) and (m-4) centers G 23  to G 2 (m-2) provided by the data conversion shown in FIGS. 3A to 3C are the data substantially free from the influence of brightness distribution, since each of the data is calculated for a small number of pixel signals. Therefore, by calculating correlation between the centers G 13  to G 1 (n-2) in the base portion and the centers G 2 (3+S) to G 2 (n-2+S) in the reference portion for a plurality of scan positions s=0 to (m-n), and by detecting, when the highest correlation is found at a specific scan position s, the distance between the centers G 13  to G 1 (n-2) of the base portion and centers G 2 (3+s) to G 2 (n-2+s) at that scan position s as the space between two images, the space between two images can be accurately evaluated, free from the influence of the brightness distribution. 
     The plurality of centers calculated in the base portion and the reference portion, respectively, are substantially free from the influence of the brightness distribution, since all of these centers are calculated based on a small number (for example, locally adjacent 5) pixel signals. In the range of locally adjacent small number of pixel signals, the brightness distribution can be assumed to be substantially flat. Therefore, no matter where the center is calculated in the base portion or the reference portion, the data of the center is free from the influence of the brightness distribution. 
     The details of the structure and function of the present invention will be more apparent from the following description of the embodiments. 
     FIG. 4 is a schematic diagram of a correlation calculating circuit 1 used in a focus detecting apparatus in accordance with one embodiment of the present invention. In this embodiment, the above described image sensors I 1  and I 2  are implemented in a CCD line sensor 10, and the correlation calculating circuit 1 is formed by a microcomputer 11. The optical system shown in FIGS. 2 and 3 are employed as the optical system for focus detection. The CCD line sensor 10 has a plurality of pixels arranged in a line, and a transfer line for reading charges stored in each of the pixels. Dummy pixels having no charge are positioned at the head of the series of pixels, followed by black reference pixels having light intercepting masks formed by aluminum vapor deposition. Pixels of the image sensor I 1  serving as the basic portion are positioned little spaced apart from the black reference pixels, and pixels for the image sensor I 2  serving as the reference portion are positioned little spaced apart from the pixels of the image sensor I 1 . Consequently, when a transfer pulse is inputted to the CCD line sensor 10, signals from the dummy pixels are outputted at first, thereafter signals are outputted from the black reference pixels, the signals from the pixels for the image sensor I 1  as the base portion are outputted, and finally, signals from the pixels of the image sensor I 2  are outputted. 
     In focus detection, when a focus detection instructing switch S1 is closed, a terminal P 9  of the microcomputer 11 is set to the &#34;low&#34; level, and in response thereto, the microcomputer 11 carries out a program for initializing the CCD line sensor 10. Before the start of focus detection, unnecessary charges are stored to be higher than the normal pixel signal level in the transfer lines and in the pixels of the CD line sensor. The unnecessary charges are cleared from the transfer line and from the pixels before taking out pixel signals. The clearing operation is the initialization of the CCD line sensor 10. 
     When the initialization is completed, the microcomputer 11 precedes to the execution of a focus detecting program. First, the microcomputer 11 outputs a clear pulse CLP from a terminal P 17 . Charges stored in all the pixels of the CCD line sensor are cleared by the clear pulse CLP, and the time when generation of the clear pulse CLP is stopped becomes the start point of accumulation. As the accumulation is started, a lowering voltage, with the rate of lowering dependent on the brightness of an object, is outputted from an object brightness monitoring terminal Q 2  of the CCD line sensor 10. This voltage is compared with a constant voltage V s  by a comparing circuit 12. When this voltage reaches V s , the output signal from the comparing circuit 12 is inverted from the &#34;low&#34; level to the &#34;high&#34; level. This &#34;high&#34; level signal is inputted to an interruption terminal P 13  of the microcomputer 11, as an interruption signal indicative of the completion of charge accumulation. When the interruption is accepted, the microcomputer 11 outputs a shift pulse SHP from a terminal P 16 . In response to the shift pulse SHP, the charges stored in each of the pixels of the CCD line sensor 10 are shifted to the transfer line in parallel, and thereafter serially transferred to be successively outputted as voltage signals from an analog signal output terminal Q 1 . In the CCD line sensor 10, the time period from the application of the clear pulse CLP to the terminal Q 7  to the application of the shift pulse SHP to the terminal Q 6  is the time for charge accumulation. The CCD line sensor 10 receives three phase pulses φ 1 , φ 2  and φ 3  from a transfer pulse generating circuit 14, and the transfer line therein is always kept in a data transfer state. Accordingly, when the shift pulse SHP is applied to the CCD line sensor 10, the line sensor output the dummy pixel signals first, the black reference pixel signals, and thereafter pixel signals of the image sensors I 1  and I 2 , from the analog signal output terminal Q 1 . 
     When the potential of the power supply voltage V cc  fluctuates, the fluctuation is superimposed on the analog signal outputs from the CCD line sensor 10, so that the analog signal outputs are inputted to a voltage fluctuation removing circuit 15 in order to offset and remove the fluctuation. The voltage fluctuation removing circuit 15 receives voltages provided by dividing the power supply voltage V cc  by resistances R 1  and R 2 , respectively, and outputs a voltage corresponding to difference between the two inputs. One of the black reference pixel signals outputted prior to the pixel signals from the image sensors I 1  and I 2  is sampled and held by a sample hold circuit 16 in response to a timing pulse outputted from a terminal P 12  of the microcomputer 11. The black reference pixel signal of the sample hold circuit 16 is subtracted by a subtracting circuit 17 from the following pixel signals. In this manner, the pixel signals are deprived of the voltage fluctuation component and the black reference output component. 
     The pixel signals from the subtracting circuit 17 are amplified by an amplifying circuit 18 based on the rate of amplification dependent on the brightness level detected by the brightness level detecting circuit 19. Rate of amplification is controlled to be higher as the brightness level is lower. The brightness level is detected as change in a prescribed time period of the lowering voltage by the brightness level detecting circuit 19 by using the lowering voltage outputted from the object brightness monitoring terminal Q 2  of the CCD line sensor 10. The change is used as a signal indicative of the brightness level. The amplified pixel signals are applied to a digitizing circuit 23 through a multiplexer 20. 
     The digitizing circuit 23 is formed of an A/D converting circuit carrying out successive comparison, comprising a voltage comparing circuit 21, a D/A converting circuit 22 and a microcomputer 11 programmed to apply 8 bits of binary number to the D/A converting circuit 22 through terminals P 1  to P 8  and to store the result of comparison inputted from a terminal P 10 . The digitized pixel signals are stored in a RAM contained in the microcomputer 11. The timing of A/D conversion is controlled by a timing pulse ADT applied from the transfer pulse generating circuit 14 to the terminal P 14 . 
     If all of the pixel signals have been taken, the microcomputer 11 temporarily outputs a &#34;high&#34; level voltage signal from a terminal P 11 , and in response, a multiplexer 20 selects and outputs a constant voltage from a constant voltage circuit 24. The constant voltage is digitized by the digitizing circuit 23 to be stored in a prescribed memory. Since the distance between two images formed on the base portion and the reference portion in the in-focus state is not always the same as the designed value due to error during manufacturing of the optical system for focus detection, the digitized data is used as a data for compensating the error. The constant voltage circuit 24 is formed of a constant current circuit 25 and a semifixed resistance 26. In adjusting the focus detecting apparatus, accurate data of the space between images are set by adjusting the semifixed resistance 26. 
     Thereafter, data processing as will be described later is carried out to detect amount and direction of defocus of the taking lens, automatic focus adjustment control of the taking lens is carried out, and the state of focusing is displayed. A lens controlling circuit 27 drives the taking lens to the in focus position in response to a signal indicative of the amount and direction of defocus. A displaying circuit 28 displays in-focus/out-of-focus state. 
     At the initialization of the CCD line sensor 10, clock pulses having shorter period (for example 1/16 of the normal period) than that of normal pixel signal transfer are applied to the CCD line sensor 10 to repeatedly carry out several (for example 10) transfer operations faster than the normal operation to make the transfer line empty. Charges in the pixels are cleared in parallel thereto. In that case, taking of pixel signals is not carried out. 
     The transfer pulse generating circuit 14 generates transfer pulses φ 1 , φ 2  and φ 3  by dividing clock pulses CLOCK having a prescribed period applied from a terminal P 15  of the microcomputer 11. The transfer pulses having shorter period than normal are generated by changing the rate of division of the clock pulses CLOCK in the transfer pulse generating circuit 14, when a flipflop 13 is at a set state with the output thereof being &#34;high&#34; level. The flipflop 13 is set by a clear pulse CLP from the terminal P 17  of the microcomputer 11 and is reset by a shift pulse SHP from the terminal P 16 . Namely, the transfer pulse generating circuit 14 is set in a state to generate the normal transfer pulse by the shift pulse SHP. As described in the foregoing, the time from the generation of the clear pulse CLP to the generation of the shift pulse SHP is defined as the time of charge accumulation in the CCD line sensor 10. During this period of charge accumulation, transfer pulses having shorter period than normal are outputted from the transfer pulse generating circuit 14. However, since the signals outputted through the transfer line from the CCD line sensor 10 during charge accumulation are treated unnecessary signals, there will be no problem even when the transfer pulses are made faster. 
     Data processing on the pixel signals from the image sensors I 1  and I 2  taken in the microcomputer 11 will be described. In this embodiment, a plurality of centers of functional values based on the light intensity, for example a plurality of light intensity centers are calculated from the pixel signals D 11  to D 1n  from the image sensor I 1  serving as the base portion, and a plurality of light intensity centers are also calculated from the pixel signals D 21  to D 2m  of the image sensor I 2  serving as the reference portion, and the latter light intensity centers are compared shifting one pixel by one pixel, with the former light intensity centers. For this purpose, the number of pixels m of the image sensor I 2  as the reference portion is set to be larger than the number of pixels n of the image sensor I 1  serving as the base portion. 
     The light intensity center is a data provided by dividing a sum of product of a distance from a pixel at the center of a group of a small number adjacent pixels to each of pixels in the group and the level of each pixel signal by the total sum of the levels of the pixel signals in the group. For example, the light intensity centers G i  of (2h+1) pixel signals D.sub.(i-h), D.sub.(i-h+1), . . . , D i  . . . , D.sub.(i+h-1), and D.sub.(i+h) immediately preceding and succeeding a pixel signal Di is represented by the following equation. ##EQU1## 
     In this embodiment, light intensity centers of adjacent five signals are used for correlation calculation. The light intensity centers G i  of five pixel signals D i-2 , D i-1 , D i , D i+1  and D i+2  directly preceding and succeeding the pixel signal Di is provided in accordance with the following equation. ##EQU2## 
     The content of the data processing in the present invention will be briefly described in the following, with the light intensity center G i  provided in accordance with the above equation (*). 
     (1) First, light intensity centers G 13  to G 1 (n-2) are calculated for (n-4) pixel data D 11  to D 15 , D 12  to D 16 , D 13  to D 17 , . . . , D 1 (n-4) to D 1n  taken out of the pixels D 11  to D 1n  of the image sensor I 1 . 
     (2) Thereafter, light intensity centers G 23  to G 2 (m-2) are calculated for (m-4) pixel data D 21  to D 25 , D 22  to D 26 , D 23  to D 27 , . . . , D 2 (m-4) to D 2m  taken out from the pixels D 21  to D 2m  of the image sensor I 2 . 
     (3) The light intensity centers G 23  to G 2 (n-2) are compared with the light intensity centers G 13  to G 1 (n-2) at first, and then the light intensity centers G 24  to G 2 (n-1) are compared with the light intensity centers G 13  to G 1 (n-2) by shifting one pixel. Thereafter, the light intensity centers G 2 (3+s) to G 2 (n-2+s) of the reference portion are compared with the light intensity centers G 13  to G 1 (n-2) of the base portion, shifting one pixel by one pixel, and finally the light intensity centers G 2 (m-n+3) to G 2 (m-2) are compared with the light intensity centers G 13  to G 1 (n-2). In the foregoing, s=0 to (m-n). 
     (4) Correlation is calculated based on the results of comparison. When there is a highest correlation between the sth light intensity centers G 2 (3+s) to G 2 (n-2+s) of the reference portion and the light intensity centers G 13  to G 1 (n-2) of the base portion, it is determined that the pixels D 11  to D 1n  of the basic portion corresponds to the pixels D 2 (1+s) to D.sub.(n+ s) of the reference portion. Whether the object is in focus or out of focus is determined based on the space between the pixels, and if it is out of focus, the amount and direction of defocus are calculated. In this embodiment, the amount of defocus is calculated by the pitch of each pixel. Interpolating calculation may be carried out, if it is necessary to improve accuracy in calculating the amount of defocus (Such an interprolating calculation is disclosed in U.S. Pat. No. 4,636,624, for example). 
     Now, the pixel signals D 11  to D 1n  and D 21  to D 2m  of the image sensors I 1  and I 2  of the base portion and the reference portion, respectively, are stored pixel by pixel as 8 bits of data in the RAM contained in the microcomputer 11. The 8 bits of data can have the values from 0 to 255. If the level of the pixel signals are relatively high, the resolution is high enough for accurately carrying out calculation of the light intensity center G i . However, if the level of the pixel signals are relatively low, the calculation of the light intensity center G i  can not be always carried out with high precision. Therefore, in the present invention, the accuracy in calculating the light intensity center G i  is improved by applying a prescribed offset to the pixel signal D i . In the following, (i) effect of improving accuracy by the offset, (ii) method for determining offset, (iii) method of calculating light intensity center and (iv) method for determining resolution of light intensity center will be described. 
     (i) Effect of improving accuracy by the offset 
     For example, as to the pixel signal D i  such as shown in FIG. 5A, light intensity center G i  is calculated for every five adjacent pixels. Consequently, the light intensity center G i  such as shown in FIG. 5B is calculated. In the regions α and β were the level of the pixel signal D i  is relatively high, the accuracy in calculating the light intensity center G i  is high, so that significant data can be provided. However, in the region γ where the level of the pixel signal D i  is relatively low, the accuracy in calculating the light intensity center G i  is low, so that ineffective data influence by the noise at low brightness only can be provided. For example, in the region β inclined downward to the right in FIG. 5A, the levels of adjacent five pixel signals D i-2  to D i+2  are assumed to be 250, 230, 120, 60 and 30, for example, the light intensity center will be 
     
         G.sub.i =(-2×250 -1×230+0×120+1×60+2×30)/(250+230+120+60+30)=-0.884 
    
     in accordance with the above described equation (*). In view of the fact that the full range of the pixel signal is 0 to 255, the data is calculated based on valid pixel signals derived from the contrast of the object, so that the accuracy in calculation can be regarded as relatively high. However, in the region γ where the signal level is low in FIG. 5A, when levels of adjacent five pixel signals D i-2  to D i+  2 are assumed to be 4, 4, 3, 2, 2, respectively, the light intensity center will be 
     
         G.sub.i =(-2×4-1×4+0×3+1×2+2×2)/(4+3+2+2)=-0.4, 
    
     in accordance with the above equation (*). Since the full range of the pixel signal is 0 to 255, the data seems to be calculated based on ineffective pixel signals derived from dark noise not related to the contrast of the object, so that the accuracy in calculation is very low. In such cases, it is not preferred to compare the former light intensity center with the latter light intensity center, regarding both as the data having approximately the same accuracy. Meanwhile, in the region α with high level in FIG. 5A, assuming that the levels of adjacent five pixel signals D i-2  to D i+2  are 254, 254, 253, 252 and 252, the light intensity center will be 
     
         G.sub.i =(-2×254-1×254+0×253+1×252+2×252)/(254+254+253+252+252)=0. 
    
     Namely, even if the level fluctuation is the same, the light intensity center G i  fluctuates much in the region γ where the pixel signal D i-2  to D i+2  are of low level, while the light intensity center G i  hardly fluctuates in the region α where the pixel signals D i-2  to D i+2  are at a high level. 
     Therefore, in the present embodiment, the influence of the dark noise is removed by applying offset such that the minimum value of the pixel signal D i  become 1/2 of the full range, that is, 128. Referring to FIG. 5A, when the level of the pixel signal D i  is compressed to 1/2 and an offset is applied so that the minimum value will be 128, a pixel signal D i  such as shown in FIG. 6A is provided. The light intensity center G i  of the pixel signal D i  is calculated to be as shown in FIG. 6B. It can be seen that the influence of dark noise in the region γ where the pixel signal D i  is of low level is removed. 
     (ii) Method for determining the offset 
     A method of determining the offset will be described with reference to FIGS. 7A, 7B, 8A and 8B. FIGS. 7A and 7B show a pixel signal D i  in the base portion and a pixel signal D 2i  in the reference portion of an object, respectively. FIGS. 8A and 8B show a pixel signal D 1i  of the base portion and a pixel signal D 2i  of the reference portion of another object, respectively. In both cases, at first a difference ΔM=(MX-MN) between the maximum value MX and the minimum value MN of the pixel signals D 1i  and D 2i  is calculated to determine the offset. 
     (a) When ΔM≧128 
     When the difference M is not less than 128 as shown in FIGS. 7A and 7B, the maximum value MX exceeds 255 when the minimum value MN of the pixel signals D 1i  and D 2i  is set to be 128. Therefore, in this case, all the pixel signals D 1i  and D 2i  are compressed to 1/2 as described with reference to FIGS. 5A and 6A, and thereafter, an offset of (128 -MN/2) is applied to all the pixel signals D 1i  and D 2i . Namely, conversion as represented by the following equation is carried out on the pixel signal D i  in general. 
     
         D.sub.i ←(1/2)D.sub.i +(128-MN/2) 
    
     The 8 bit pixel signal D i  can be made 1/2 easily, by shifting respective bit values once to the right. 
     (b) when ΔM&lt;128 
     Meanwhile, if the difference ΔM is smaller than 128 as shown in FIGS. 8A and 8B, the maximum value MX does not exceed 255, when the minimum value MN of the pixel signals D 1i  and D 2i  is set to be 128. Therefore, in this case, an offset of (128-MN) is applied to all the pixel signals D 1i  and D 2i . Namely, the conversion represented by the following equation is carried out on the pixel signals D i , in general. 
     
         D.sub.i ←D+(128-MN) 
    
     By converting the pixel signals D 1i  and D 2i  in the above described manner, the minimum value of the pixel signal D i  becomes 128, and the maximum value does not exceed 255. 
     (iii) Method of calculating light intensity center 
     The offset pixel signal is again represented by D i . As shown in FIG. 3A, the light intensity center G 3  is calculated in accordance with the equation (*) for adjacent five pixel signals D 1 , D 2 .sub., D 3 , D 4  and D 5  out of n pixel signals D 1 , D 2 , D 3 , D 4 , D 5 , D 6 , D 7 , . . . , D i , . . . , D n  ; a light intensity center G 4  is calculated in accordance with the equation (*) for the adjacent five pixel signals D 2 , D 3 , D 4 , D 5  and D 6  ; and a light intensity center G 5  is calculated in accordance with the equation (*) for the adjacent five pixel signals D 3 , D 4 , D 5 , D 6  and D 7 . In the same manner, the light intensity center G i  is calculated in accordance with the equation (*) for adjacent five pixel signals D i-2 , D i-1 , D i+1  and D i+2  preceding and succeeding a pixel signal D i , and finally, the light intensity center G n-2  is calculated in accordance with the equation (*) for the adjacent five pixel signals D n-4 , D n-3 , D n-2 , D n-1  and D n  preceding and succeeding the pixel signal D n-2 . Thus (n-4) light intensity centers G 3  to G n-2  in total are calculated. Now, since the pixel signal D i  take a value in the range of 128 to 255 as shown in FIG. 3B, the light intensity center G i  takes a value in the range of -0.426 to +0.426, as shown in FIG. 3C. Namely, when adjacent five pixel signals are 255, 255, 128, 128, and 128,  respectively, the light intensity center G i  takes the minimum value -0.426, and when the adjacent five pixel signals are 128, 128, 128, 255 and 255, the light intensity center G i  takes the maximum value +0.426. 
     (iv) Method of determining resolution of light intensity center. 
     The light intensity center G i  described above is provided as 2 bytes (16 bits b 15  to b 0 ) of data. Now, it is assumed that the upper 7 bits b 15  to b 9  represents the integral part, while the lower 9 bits b 8  to b 0  represent decimal part. Since the light intensity center G i  takes a value in the range of -0.426 to +0.426 and is in the range of ±(1/2) as described in the foregoing, the most significant bit b 8  of the decimal part corresponds to the sign bit, and the upper 7 bits b 15  to b 9  are unnecessary. Therefore, only the eighth to the first bits b 9  to b 11  are transferred to a 1-byte register, and in the succeeding data processing, the light intensity center G i  is treated as 1 byte of data, whereby comparison (that is, calculation of correlation) between the light intensity centers in the base part and the reference part can be is discarded. 
     In some cases, all the light intensity centers G i  of the base portion and the reference portion are in the range of±(1/4) as shown in FIG. 9A, dependent on the object. In such a case, the seventh bit b 7  also becomes a sign bit, and the upper 8 bits b 15  to b 8  become unnecessary. Therefore, when the eighth to the first bits b 8  to b 1  are treated as the data of the light intensity center G i  as described above, the resolution of the light intensity center G i  is decreased. Therefore, in such a case, not the least significant bit b 0  but the eighth bit b 8  is discarded, and the lower 1 byte (the seventh to the 0th bits b 7  to b 0 ) are treated as the light intensity center G i . Consequently, the light intensity center G i  becomes as shown in FIG. 9B, with the resolution improved twice that of the process described above. 
     A flow chart for realizing the above described data processing is shown in FIG. 10, and the contents of the data processing will be described. 
     When the pixel signals D 1i  and D 2i  are taken to the microcomputer 11, the microcomputer 11 executes the process shown in FIG. 10. First, in the step #100, the maximum value MX and the minimum value MN are calculated for the pixel signals D 1i  and D 2i , to calculate the difference ΔM=MX-MN. In the step #200, whether or not the difference ΔM is not less than 128 is determined. If ΔM≧128, then the program proceeds to the process of offset I in the step #210, and in the step #220, conversion of &#34;D i  ←D i  /2+(128 -MN/2)&#34; is carried out. If M&lt;128, the program proceeds to the process of offset II in the step #230, and in the step #240, conversion of &#34;D i  ←D i  +(128 -MN)&#34; is carried out. The program proceeds from the step #220 or #240 to the center intensity center G i  is calculated in accordance with the above described equation (*) in the step #310. By this calculation, (n-4) light intensity centers G 13 , G 14 , G 15 , . . . , G 1 (n-2) are provided for n pixel signals D 1  i of the base portion, and (m-4) light intensity center G 23 , G 24 , G 25  . . . , G 2 (m-2) are provided for m pixel signals D 2i  of the reference portion. Thereafter, the program proceeds to the process of determining accuracy of the light intensity center G i  of the step #400. In the step #410, whether or not all the intensity centers G 13 , G 14 , G 15  . . . , G 1 (n-20) and G 23 , G 24 , G 25  . . . , G 2 (m-2) exceed the range of ±(1/4) is determined. If all the light intensity centers G i  do not exceed the range of ±(1/4), the program proceeds to the step #420, in which the lower 8 bits b 7  to b 0  of the light intensity center G i  calculated as 2 bytes of data are newly treated as 1 byte data of the light intensity center G i . If any of the light intensity centers G i  exceeds the range of ±(1/4), the program proceeds to the step #430, in which the eighth to the first bits b 8  ti b 1  of the light intensity center G i  calculated as 2 bytes of data are newly treated as 1 byte of light intensity center G i . The program proceeds from the step #420 or #430 to the step #500 in which a subroutine of correlation calculation (see FIG. 11) is executed. This subroutine will be described later. As a result of correlation calculation, the amount of defocus DF and a flag LCF indicative of possibility of focus detection are provided. The flag is set to LCF=1 when focus detection is impossible, and it is set to LCF=0 when focus detection is possible. In the step #600, the program proceeds to the step #610 in which AF display is given. More specifically, the in-focus/out-of-focus display is carried out, and if it is out of focus, the direction of defocus is displayed. If LCF=1, the program proceeds to the step #620, in which display of impossibility of AF is given. The program proceeds from the step #610 or # 620 to the step #700 in which the lens is driven. More specifically, when it is out of focus, the lens is driven to an in-focus position based on the sign and magnitude of the defocus amount DF, and when it is in-focus, the driving of the lens is stopped. When focus detection is impossible, the lens is driven reciprocatedly to an end portion, in order to detect a lens position enabling focus detection. 
     FIG. 11 shows the subroutine of correlation calculation in the step #500. If this subroutine is called, in the step 510, the light intensity centers G 13 , G 14 , G 15 , . . . , G 1 (n-2) of the base portion are scanned in association with the light intensity centers G 23 , G 24 , G 25  . . . , G 2 (m-2) of the reference portion (that is, compared one pixel by one pixel), so as to determine the whole optical image of the base portion corresponds to which portion of the optical image of the reference portion. For this purpose, in the step #520, evaluation function F (s) is calculated for each of a plurality of scanning positions s=0, 1, 2, . . . , (m-n). The evaluation function F (s) is represented as the following equation. ##EQU3## 
     For example, if s=0, the evaluation function F (0) indicates difference between the light intensity centers G 13  to G 1 (n-2) of the base portion and the light intensity centers G 23  to G 2 (n-2) of the reference portion. If s=(m-n), the evaluation function F (m-n) indicates difference between the light intensity centers G 13  to G 1 (n-2) of the base portion and the light intensity centers G 2 (m-n+3) to G 2 (n-2) of the reference portion. Therefore, the smaller the value of evaluation function F(s), the higher becomes the correspondence between the light intensity centers G 13  to G 1 (-2) of the base portion and the light intensity centers G 2 (3+S) to G 2 (n-2+s) of the reference portion. When the value of the evaluation function F(s) become the smallest at a prescribed scanning position s, there is the highest correlation (coincidence) between the light intensity centers G 13  to G 1 (n-2) of the base portion and the light intensity center G 2 (3+s) to G 2 (n-2+s) of the reference portion at the scanning position s. In other words, the partial region at the scanning position s of the optical image of the reference portion corresponds to the whole optical image of the base portion. Therefore, in the step #530, the minimum value Min {F (s)} of the evaluation function F (s) is retrieved and in the step #540, the scanning position s at which the evaluation function F (s) becomes the smallest is determined. 
     In the steps following the step #550, whether or not the detected scanning position s is reliable is determined. At first, in the step #551, the true minimum value F 0  of the evaluation function F (s) is calculated by interpolation, based on the minimum value Min {F (s)} of the evaluation function F (s) and the values of the evaluation function F (s) preceding and succeeding the minimum value. Namely, since the scanning position s is integral data, the evaluation function F (s) are calculated as discrete values. However, if the scanning position s is data of real number, the evaluation function F (s) has continuous values. Therefore, the minimum value of the evaluation function F (s) in that case, is regarded as F 0 . In the step #552, contrast C 1  is calculated in accordance with the following equation for all the pixel signals D 1i  of the basic portion, and determined whether or not the contrast C 1  is larger than a prescribed value K 1 . ##EQU4## 
     If C 1  &gt;K 1  in the step #552, then if a value (F 0  /C 1 ) provided by dividing the true minimum value F 0  of the evaluation function F (s) calculated by interpolation by the contrast C 1  is smaller than a prescribed value K 2  or not is determined in #553. If C 1  ≦K 1  in the step #552 or if (F 0  /C 1 )≧K 2  in the step #553, the program proceeds to the step #555 in which the flag LCF is set to 1. As described above, the flag LCF indicates, when LCF=1, that the result of focus detection is unreliable and when LCF=0, that the result of focus detection is reliable. If C 1  &gt;K 1  in the step #552 and (F 0  /C 1 )&lt;K 2  in the step #553, it means that the contrast of the optical image provided in the basic portion is sufficiently high, and the minimum value F 0  of the evaluation function F (s) is sufficiently small. Namely, the result of focus detection is reliable, so that the program proceeds to the step #554 in which the flag LCF is set to 0. In the step #556, the scanning position s 0  at which the evaluation function F (s) has the true minimum value F 0  is calculated as a real number data by interpolating calculation. In the step #557, the amount of defocus DF is calculated based on the scanning position s 0  provided by the interpolating calculation. The program proceeds from the step #557 or #555 to the step #560, and returned. 
     Modification 1 
     In the above described embodiment, offset is given to the pixel signals D i  as described with reference to FIGS. 5A, 5B, 6A and 6B, in order to prevent degradation of accuracy in calculating the light intensity center G i . However, the accuracy in calculating the light intensity center G i  is degraded only when the level of the pixel signal D i  is low. Therefore, if the level of the pixel signal D i  is sufficiently high, the accuracy in calculating the light intensity center G i  is sufficiently high, even if the offset is not applied to the pixel signal D i . Rather, the resolution of the light intensity center G i  is reduced when the difference M between the maximum value MX and the minimum value MN exceeds 128, since the level of the pixel signal D i  is made 1/2 at the time of applying offset. For example, if the maximum value MX of the pixel signal D i  is 250 and the minimum value MN is 100, and an offset is applied, the maximum value MX become 250/2+(128-100/2)=203, and the minimum value MN becomes 128, which reduces contrast and decrease the resolution of the light intensity center G i . Therefore, as shown in FIG. 12, in the process of the offset determination in the step #201, whether or not the level of the pixel signal D i  is low is determined in the step #202, and if the level of the pixel signal D i  is low, offset is given in the step #204. If the level of the pixel signal D i  is high, the step #204 is skipped, and no offset is applied. By doing so, offset can be applied only when the brightness is low and the influence of the dark noise is large, and offset is not applied when the brightness is high and the influence of dark noise is small. Accordingly, light intensity center with high precision can be calculated in either case. In addition, when the brightness is high, the process of applying offset is omitted, so that the speed of operation when the brightness is high can be improved. 
     Modification 2 
     In the above described embodiment and in the modification 1, offset is applied to the pixel signal D i  in order to remove influence of the dark noise when the level of the pixel signal D i  is low. An algorithm as shown in FIG. 13 may be used as another method. In accordance with this algorithm, contrast C i  of five adjacent pixel signals D i-2 , D i-1 , D i , D i+1  and D i+2  used for calculating the light intensity center G i  is calculated, and if the contrast C i  is smaller than the prescribed value K, the light intensity center G i  is set to a constant value G (for example, G=0). The contrast C i  of the adjacent five pixel signals D i-2 , D i-1 , D i , D i+1 , and D i+2  can be calculated in accordance with the following equation. ##EQU5## 
     In the step #302, the contrast C i  of the adjacent five pixel signals D 1-2 , D i-1 , D i , D i+1  and D i+2  is calculated in accordance with the above equation, and in the step #304, whether or not C i  &lt;K is determined. If C i  &lt;K, then the light intensity center is set as G i  =G(=0) in the step #306. If C i  &gt;K, the light intensity center G i  is calculated in accordance with the equation (*) in the step #310. Since the dark noise has low level, the contrast C i  becomes smaller than the prescribed value K where pixel signals caused by the dark noise are continued, so that the program proceeds from the step #304 to #306, in which the light intensity center G i  is set to be a constant value G(=0). By doing so, improper calculation of the light intensity center G i  derived from the dark noise can be prevented. 
     Modification 3 
     In accordance with another method, the contrast C i  of the adjacent five pixel signals D i-2 , D i-1 , D i , D i+1 , and D i+2  is calculated, and the contrast is multiplied by the light intensity center G i  calculated in accordance with the above equation (*), so that a light intensity center G i  weighted by the contrast C i  is provided. The algorithm is shown in FIG. 14. Referring to the figure, the contrast C i  is calculated in the step #302, the light intensity center G i  weighted by the contrast C i  is calculated in the step #308 and the program proceeds to the correlation calculation of the step #500. In accordance with this method, the light intensity center G i  is evaluated to be small where the contrast C i  is low, while the light intensity center G i  is evaluated larger where the contrast C i  is high. Therefore, at portions where pixel signals caused by the dark noise are continued, the light intensity center G i  becomes smaller as the contrast C i  is low, whereby improper calculation of the light intensity center G i  due to the dark noise can be prevented. At portions where effective pixel signals are continued, the light intensity center G i  becomes larger as the contrast C i  is high, so that effective light intensity center G i  can be calculated. 
     Modification 4 
     The numerator of the above described equation (*) for calculating the light intensity center G i , that is, primary moment M i  of the light intensity distribution may be used instead of the light intensity center G i  to obtain the same effect. The primary moment M i  of the light intensity distribution can be provided by the following equation. 
     
         M.sub.i ={-2×D.sub.i-2 -1×D.sub.i-1 +0×D.sub.i+1 ×D.sub.i+1 +2×D.sub.i+2 } 
    
     As is apparent from the above equation, absolute value of the primary moment M i  of the light intensity distribution becomes smaller where pixel signals caused by the dark noise are continued, and it becomes larger where effective pixel signals are continued. Therefore, the same effect as described in the modification 3 can be provided. 
     Modification 5 
     The influence of the dark noise can be reduced in accordance with a still further method, in which where the pixel signal D i  is smaller than a prescribed value, an intermediate value (that is, not the maximum value nor the minimum value) out of three adjacent values is used as the value of the pixel at the center of the adjacent three pixels, which operation is successively carried out pixel by pixel, starting from the heading three pixels. FIGS. 15A and 15B illustrate this method (in these figures, the pixel signal D i  is simply represented by i). FIG. 15A shows fluctuation of the pixel signals D 0  to D 10  by the influence of the dark noise, and when the levels of the pixel signals D i  are low. In order to reduce the influence of the dark noise, the intermediate value D i  which is not the maximum value D 2  nor the minimum value D 0  out of the heading three pixels D 0  to D 2  is used as the pixel value of the center pixel D 1 . Thereafter, the intermediate value D 1  which is not the maximum value D 2  nor the minimum value D 3  out of the three pixels D 1  to D 3  shifted by one pixel from the head is used as the pixel value of the central pixel D 2 . Thereafter, the intermediate value D 1  which is not the maximum value D 2  nor the minimum value D 4  out of the three pixels D 2  to D 4  provided by shifting two pixels from the head is used as the pixel value of the central pixel D 3 . Then, the intermediate value D 3  which is not the maximum value D 5  nor the minimum value D 4  out of the three pixels D 3  to D 5  provided by shifting three pixels from the head is used as the pixel value of the central pixel D 4 . In the same manner, an intermediate value not the maximum value nor the minimum value out of the three pixels D i , D i+1  and D i+2  provided by shifting i pixels from the head is used as the pixel value of the central pixel D i+1 , and by repeating this process, a series of pixels D 1  to D 9  shorter than the series of pixels D 0  to D 10  by 2 pixels is provided as shown in FIG. 15B, and the influence of the dark noise can be significantly reduced. 
     Modification 6 
     Although the light intensity itself is used in the above embodiment and above modifications as the functional value based on the light intensity, the contrast value of the light intensity may be used. FIG. 16 shows an example in which a difference (contrast value) of pixel signal and D i+4  and D i  adjacent to each other with three pixels posed therebetween is used as a functional value based on the light intensity. In this example, the following differential conversion is carried out to calculate the contrast value in the step #50. 
     
         D.sub.i&#39; =D.sub.i+4 -D.sub.i 
    
     The number of data of the contrast value D i , calculated in accordance with the above equation is smaller than the number of data of the pixel signal D i  by 4. In the example of FIG. 16, the contrast value D i&#39;   used instead of the pixel signal D i  of FIG. 10, so that he number of data of the center G i  based on the contrast value D i , is smaller by 4 than that of FIG. 10. 
     Modification 7 
     In the optical system for focus detection, luminous bundles from the object for forming the first and second images are adapted to pass the first and second portions of a taking lens. The first and second portions do not necessarily sandwich the optical axis l 0  of the taking lens TL. For example, as shown by the hatched portions of FIG. 17, the first and second portions may be set not sandwiching the optical axis l 0  of the taking lens. In the example shown in the figure, a perpendicular bisector of the first and second portions exist on the optical axis l 0 . When viewed from the direction of the vertical bisector, the optical system has the same structure as that of the optical system for focus detection shown in FIGS. 1 and 2. 
     Modification 8 
     In each of the above described modification, the light intensity center taken in the full range as the image sensor I 1  of the basic portion are compared with the light intensity centers taken in the full range of the image sensor I 2  as the reference portion. However, as shown in FIG. 18, light intensity centers taken in the range represented by the hatched portion of the image sensor I 1  may be compared with the light intensity centers taken in the range represented by the hatched portion of the image sensor I 2 . 
     In the present invention, in a focus detecting apparatus adapted to detect state of focusing of a taking lens by detecting a space between first and second images formed by luminous bundles from an object passing through the first and second portions of the taking lens, correlation calculation is carried out on representative values based on the first light intensity calculated for each of a plurality of portions of a series of elements in a first series of photosensitive elements receiving the first image and representative values based on the second light intensity calculated for each of a plurality of portions of a series of elements in a second series of photosensitive elements receiving the second image, and the space between the first and second images are detected under the condition that the correlation is the highest, so that even if the brightness distribution of the first and second images are asymmetrical due to errors during manufacturing or assembling the optical system for focus detection, the space between the two images can be accurately evaluated. Therefore, in the focus detecting apparatus of the present invention, even if the optical system for forming the first and second images is asymmetrical, the influence thereof on the error in focus detection can be made smaller. 
     Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the spirit and scope of the present invention being limited only by the terms of the appended claims.