Focus adjuster

Abstract: A focus adjustor performing highly accurate focus adjustment to suit the photographer's intention with respect to a great variety of objects to be photographed. The focus adjustor permits appropriate division of focus detection area, permits selection of an area division such as to reflect the photographer's intention and permits use of the result of previous focal adjustment for a subsequent focus adjustment.

Description: BACKGROUND OF THE INVENTION Field of the Invention This invention relates to a focus adjuster for a camera. Related Background Art A focus adjuster for a camera is known, which converts a pair of foreground object images formed by two light fluxes coupled from a foreground object through two different optical paths to an optical system and passed through the system with a pair of photoelectric converting means into a pair of foreground object image signals consisting of a pair of discrete data, performs predetermined correlation operations while shifting the paired foreground object signals relative to each other, finds out a shift amount of the highest correlation degree and calculates a defocus of the optical system from that shift amount. Such a focus adjuster will now be described with reference to Figs. 20 and 21. Fig. 20 is an example of application of the prior art focus adjuster to a replaceable lens type single lens reflex camera. Replaceable lens 100 can be removably mounted in camera body 105. With lens 100 mounted, a photographing light beam from a foreground object is passed through lens 103 to be led to main mirror 107 provided in camera body 105. The light beam is partly reflected upwardly by main mirror 107 to be led to a viewfinder (not shown). At the same time, the remaining part of the light beam is transmitted through main mirror 107 to be reflected by sub-mirror 108 and led as focus detection light beam to auto-focus module 120 (hereinafter AF module). Fig. 21A shows an example of AF module 120. As is shown, the AF module comprises a focus detection optical system including field lens 122 and a pair of re-focusing lenses 124 and CCD (charge-coupled device) 125 having a pair of light-receiving sections A and B. In the above construction, light flux passing through paired areas symmetrical with respect to the axis of light incidence pupil of lens 103 forms a primary image in the neighborhood of field lens 122 and also coupled through field lens 122 and re-focusing lenses 124 to form a pair of secondary images of the pair of light-receiving sections of CCD 125. When the primary image coincides with a film conjugate surface (not shown), the direction and relative position of the pair secondary images with respect to the light-receiving sections of CCD 125 are predetermined by the construction of the focus detection optical system. More specifically, pair light-receiving sections A and B shown in Fig. 21B each consist of n light-receiving elements ai, bi (i = = to n - 1), and when the primary image coincides with the film conjugate surface, a foreground object image is formed in substantially equal areas on light-receiving sections A and B. When the primary image is formed on a surface shifted from the film conjugate surface, the relative position of the pair secondary images on CCD 125 is shifted from the predetermined position noted above in case of the presence of coincidence according to the direction of shift of the axial direction of the primary image (i.e., whether the shift is pre- or post-focus. In the case of the post-focus, for instance, the positional relation between the pair of secondary images is relatively spread, and in the case of the pre-focus it is narrowed. Light receiving elements ai and bi forming light-receiving sections A and B consist of charge storage elements such as photo-diodes and can accumulate charge for a charge accumulation time corresponding to the illumination intensity on CCD 125 to render the light-receiving element output to be of a level suited for a subsequent process to be described later. Returning to Fig. 20, interface 112 and memory 113 control the start and end of charge accumulation in CCD 125 by providing a control signal to CCD 125 according to charge accumulation start and end commands from a port of calculation and control unit (AFCPU) 110. A light-receiving element output signal is sequentially transferred to the interface according to transfer clock signal supplied to CCD 125. A/D converter means provided in the interface samples and A/D converts the light-receiving element output,and A/D converted data (2n pieces) corresponding to the number of light-receiving elements are stored in memory 112. AFCPU 110 performs well-known operations for focus detection according to the stored data to determine a defocus extent corresponding to the difference between the primary image and film conjugate surface. AFCPU 110 controls the form of display on AF display means 114 according to the result of focus detection calculation. For example, AFCPU 114 provides a control signal such that a triangle display section becomes active in case of pre- or post-focus and a round display section becomes active in case of in-focus. AFCPU 110 also controls the direction and extent of driving of AF motor 109 according to the result of focus detection operation, thus moving lens 103 to an in-focus position. According to the sign of defocus extent (whether pre- or post-focus), AFCPU 110 generates a drive signal to cause rotation of AF motor 109 in a direction such that focusing lens 103 approaches the in-focus point. The rotational motion of the AF motor is transmitted by a camera body side transmission system consisting of gears provided in camera body 105 to camera body side coupling 109a provided in a mount section of camera body 105, on which lens 100 is mounted. The rotational motion transmitted to camera body side coupling 109a is further transmitted through lens transmission system 102 including lens side coupling 101 fitted with coupling 109a and gears provided in lens 100, thus causing movement of lens 103 toward the in-focus position. Lens 100 includes lens inner calculation and control means (lens CPU) 104, and it supplies necessary AF data such as the number of rotations of coupling 101 per unit displacement of lens 103 to AFCPU 110 through lens side contact provided in the mount section and camera body side contact 106. The focus control operation in AFCPU 110 will now be described in detail. All image outputs obtained from image sensors A and B in Fig. 21B are subjected to an image output shift as shown in Figs. 22A and 22B to calculate the image shift extent. More particularly, denoting the image outputs of image sensors A and B by a0 to a39 and b0 to b39 (here n = 40), Fig. 22A shows a case when shift L is L = 20, Fig. 22B shows a case when L = 0, and Fig. 22C shows a case when L = -20. At each shifted position, the correlation of corresponding images of image sensors A and B is obtained to be compared to the extent of correlation concerning each shift position. A shift extent of the least correlation is determined to be the image shift extent. Lens 103 and other parts are driven according to the focus control operation such as correlation calculation to determine this image shift extent. Fig. 22E shows a different way of expressing the method of taking such a shift. In the matrix of the Figure, points shown by dot mark represent comparative picture elements. In this case, a shift number (i.e., shift extent) range of -20 to 20 constitutes the subject of calculation. The correlation calculation time is proportional to the number of blocks contained in this range. Problems in this calculation will now be discussed with reference to Figs. 15 and 16. Fig. 15 shows the viewfinder screen 100 of a single-lens reflex camera and its focus detection field. In the prior art, focus detection zone frame 3101 is so narrow that a depth to be described later does not enter the zone, and it is used for focus detection. In the in-focus state, image sensors A and B are located at positions equivalent to the narrow frame shown by solid line in Fig. 15. Reference numeral 3102 designates marks provided in the viewfinder field in correspondence to boundary in a detectable range. However, where focus detection can be effected in only such narrow focus detection area 3101, although there is no problem if there is an adequate pattern as foreground object in focus detection zone 3101 as shown in Fig. 16A (Figs. 16A and 16C showing the focus detection zone at the center of Fig. 15 on an enlarged scale, and Figs. 16B and 16D showing output ai of image sensor A), if the pattern vanishes due to a movement of hands holding the camera as shown in Fig. 16C, disability of focus detection results. In such a case, the photographing lens unnecessarily starts scanning, which is cumbersome. Accordingly, in order to maintain and improve the accuracy of the correlation calculation noted above and also broaden image area in the viewfinder field that is capable of focus detection, it is necessary to increase the number of picture elements (number of light-receiving elements), i.e., number of blocks in Fig. 22E to thereby increase the focus detection area of the focus adjuster. However, increasing the number of picture elements to meet this requirement presents various problems as follows. (1) With a wide focus detection area, there is a high possibility that foreground objects at different distances or depths are found in the area. Therefore, it is necessary to divide the wide focus detection area into a plurality of local focus detection areas and perform focus control operation for each local focus detection area. In addition, there are problems concerning the division of the focus detection area. (2) There are problems in the selection of defocus from among those of the local focus detection areas for indication and driving and in the manner how the user's intention is to be reflected. (3) There are problems accompanying the wideness of the focus detection area such as a problem of selecting a local focus detection area, with respect to which AGC (to be described later) is to be provided. (4) Although increasing the image area capable of use for focus detection has a merit of increasing the shift (to be described later) when taking image correlation to permit an increased defocus area to be provided for focus detection, the prior art method of calculation is time-consuming. Problems in (1) will be discussed. First, the problems presented by the division of the focus detection area in the prior art method will be discussed. As for one of image sensors A and B shown in Fig. 26, namely image sensor A, there are two well-known methods of division, i.e., a first method shown in (α), in which local focus detection areas R1 to R3 free from overlap are defined, and a second method in (β), in which partly overlapped local focus detection areas R1' to R3' are defined. An example of focus control calculation is disclosed in U.S.P. No. 4,812,869. In this example, the method of image shift control calculation is changed when the defocus is large and when it is small. More specifically, when the defocus is large, the image shift is calculated by shifting all image outputs of image sensors A and B shown in Fig. 21B in a manner as shown in Figs. 22A to 22C. When the defocus is small, on the other hand, image sensor A is divided to define overlapped local focus detection areas R1' to R3' as shown in Fig. 22D for detecting correlation between image sensors A and B. Now, the two methods of division noted above will compared with respect to their merits and demerits. A case will be considered, in which a foreground object having a light intensity distribution as shown in Fig. 27A is projected on image sensor A. In this case, the image shift can be calculated by either of the methods (α) and (β) in Fig. 26, with local focus detection area R2 and image sensor B in the former method and with local focus detection area R2' and image sensor B in the latter method. (The image shift can be detected when and only when there is a change in the light intensity distribution of the object.) Now,a case will be considered, in which a foreground object light intensity distribution having an edge as shown in Fig. 27B is projected on image sensor A. In the division method (α), the edge between bright and dark portions is just on the boundary between local focus detection areas R1 and R2. In this case of presence of a portion of large brightness change (i.e., large data amount) at an end of focus detection area, the large brightness change portion is shifted out of and into the area when the shift of the optimum correlation is obtained by shifting the image signal projected on the other image sensor. This deteriorates the accuracy of image shift calculation. In the division method (α), this applies to both detection areas R1 and R2 when there is an edge at the borderline between areas. That is, it is only when the edge is at this position that the accuracy of detection is deteriorated, or disability of detection results. With the division method (β), on the other hand, such an edge is completely contained at least in either area R1' or R2', and thus the above problem is not presented. Now, a case will be considered, in which there is a depth or distance in image. In such a case, an image as shown in Fig. 28A is projected on image sensor A, while an image as shown in Fig. 28D is projected on image sensor B. In this case, the close image areas and also the distant image areas can be overlapped over one another by shifting areas, but the borderline areas can not be overlapped by shifting. Therefore, an area where close and distant images coexist can not be detected. First, when the image shown in Fig. 28A is projected on image sensor A, in the case of the division method (α) the borderline between the close and distant images is found substantially at the borderline between areas R1 and R2. Thus, a close image can be detected using area R1, while a distant image can be detected using areas R2 and R3. In the case of the division method (β), images with depths are contained in both areas R1' and R2'. Therefore, detection is. impossible in these area. Table 1A shows what is described above. Figs. 28B and 28C show cases where the image on image sensor A is located at slightly shifted positions. Tables 1B and 1C show the possibility of detection in these cases. It will be seen that in case where there is a depth of image, the division method (α) of defining local focus detection areas without overlap has a higher possibility of detection. This is obvious from the fact that a depth found in overlap portions of local focus detection areas disables detection in both the areas. As is shown, the division methods (α) and (β) have their own merits and demerits. Now, the problem in (2) concerning the selection of defocus among those of the local focus detection areas for indication and driving, will be discussed. When distant, intermediate and close range views of images are projected on image sensor A divided into local focus detection areas R1 to R7 as shown in Fig. 14, the photographer should determine the image to be focused. If the camera itself determines the view for focusing, it may sometimes go counter to the photographer's will. To be able to accurately focus an intended foreground it is necessary to set in advance a narrow focus detection area such that a depth will not enter the area. In relation to this, Japanese Patent Laid-Open No. Sho 63-11906 proposes a system, in which focusing is effected according to the result of detection using three detection areas 3601 to 3603 provided in a viewfinder screen as shown in Fig. 19. In this case, there is a case when what can not be detected in central area 3601 can be detected in end area 3603. In such case, since the end area is spaced apart from the central area, there is a high possibility that a distant thing (for instance a tree outside a window) different from a thing in the central area (for instance a room wall) is focused. The problem in (3) will now be described. When continuous image sensor A (such as that with local focus detection areas R1 to R7 shown in Fig. 14) is used for detecting a plurality of foreground object images in a wide area, the brightnesses of the individual foreground objects may extremely vary from one another. In such a case, the way of providing AGC is important. Problems in this connection will be discussed. First, a case is considered, in which there is a A/D conversion capacity of about 8 bits for A/D converting analog image output into digital data to be stored in memory 113. With this order of dynamic range, if the brightness varies extremely, the output level can be optimized only for a portion of foreground objects through storage time control (i.e., through AGC). A case will now be considered, in which a wall with a poster applied thereto and a nearby window are projected on an image sensor for detecting a viewfinder screen central portion as shown in Fig. 17A. Fig. 17B shows a case when AGC is provided such that an image output in a predetermined central area is a predetermined peak (for instance 150), and Fig. 17C shows a case when AGC is provided the entire image output has a predetermined peak (for instance 150). It will be seen that in the case of Fig. 17C the central image is too low brightness to be detected by corresponding local focus detection area R4 of image sensor R4. Accordingly, the local focus detection area of image sensor A is shifted outwardly to areas R3, R5, R2 and R6, and focus detection first becomes possible in area R6. However, the photographer is thinking that naturally the poster at the center is focused. Therefore, there is a possibility of going counter to the photographer's will. The problem in (4) will now be discussed. As noted before in connection with the prior art, in the calculation of correlation between image sensors A and B the calculation time is substantially proportional to the number of blocks in Fig. 22E. In the example of Fig. 22E, the number of picture elements is 40 pairs. However, if this method is used in case where the number of picture elements is 80 pairs, the calculation time is increased to several times. According to U.S.P. No. 4,636,624, the image on image sensor A is divided into three blocks as shown in Fig. 25, and when comparing image sensors A and B in an area of small defocus and small shift number L as shown in Fig. 23, correlation C(L) between the picture element row of the second block shown at β and data of image sensor B after shift is obtained, while for areas α and γ the correlation C(L) is calculated for the first and third blocks with respect to data of image sensor B after shift. Here, the correlation C(L) is the value given as C(L) = Σ |a i - b i+L | In this method, as shown in Fig. 23, the correlation is discontinuous at shift numbers corresponding to the borderlines between adjacent blocks. GB 2 200 010 relates to a focus detection apparatus having a focus detector using an image sensor and a storage time control section for controlling storage time of the image sensor. US 4,766,302 relates to a focus detection system which uses correlation of blocks of photosensors in photosensor arrays. SUMMARY OF THE INVENTION It is desirable to provide an apparatus for performing highly accurate focus adjustment to suit the photographer's intention with respect to a great variety of foreground objects. It is also desirable to provide a focal adjuster, which permits appropriate division of focus detection area, permits selection of an area division such as to reflect the photographer's intention and permits use of the result of previous focal adjustment for a subsequent focus adjustment. The invention provides a focus detection apparatus as set out in claim 1. Figs. 4 to 6A and 6B schematically show an example of the method and apparatus for solving the problems in (1). In this example, 86 picture elements a1 to a86 of image sensor A of the first light-receiving element row is divided into seven local focus detection areas R1 to R7 in Fig. 5, and a plurality of borderlines are provided for each pair of adjacent areas. When an image having light intensity change as shown in Fig. 4 is projected, a position at which there is no great change is selected as borderline position. Fig. 6A shows a borderline portion between local focus detection areas R2 and R3 and an image on that portion on a scale enlarged in the abscissa direction. With respect to a foreground object image signal (image output) of light-receiving elements (picture elements) a22 to a26 in the neighborhood of the borderline, a difference |a i - a i+1 | as shown in Fig. 6B is calculated, and a borderline is determined to be at a position between elements a25 and a26, at which the difference is minimum. With this arrangement, it is possible to prevent deterioration of the accuracy of focus detection. To solve the problems in (2), the second focus adjuster is arranged such that the detecting means basically detects focus detection in a local focus detection area provided in the central portion of the first light-receiving element row and, when there is no foreground object image pattern capable of detection in the central local focus detection area, a pattern capable of focus detection is searched from the center toward the ends to effect focus detection with respect to a foreground object image pattern in a local focus detection area close to the center among patterns capable of focus detection. That is, center-preferential image shift calculation is performed. More specifically, where the first light-receiving element row is constituted by a continuous light-receiving element row, central to end portion of the focus detection area of wide image sensor are capable of foreground object image detection, and focus detection can be effected preferentially with a local focus detection area closer to the center. For example, focusing is effected preferentially not with a scene outside the window in Fig. 19 but with the window frame, and thus a foreground object closer to the center of the image sensor can be focused. Further, to solve the problems in (3), the detecting means in the second focus adjuster provides a predetermined amount of AGC for focus detection basically in the central local focus detection area of the first light-receiving row. More specifically, if there is a foreground object image pattern capable of detection in the central local focus detection area of the image sensor (Fig. 17A), focusing in the central local focus detection area is possible by providing AGC with respect to this pattern. If there is no foreground object image pattern capable of detection in the central area (Fig. 18A), AGC is provided to the next local focus detection area (window frame in Fig. 18A) to the central area. In this way, optimum AGC can be provided to each local focus detection area. To solve the problems in (4), the detecting means of the second focus adjuster, when selecting the predetermined light-receiving element row, selects a focus detection area including a light-receiving element row portion with a large foreground object image signal change among the first light-receiving element row as stationary local focus detection area and effects focus detection from foreground object image signals from this stationary local focus detection area and second light-receiving element row. Figs. 1 to 3 schematically show an example of the method and apparatus for solving the problems in (4). In this example, image sensors A and B respectively have 86 picture elements a1 to a86 and b1 to b86. The detecting means first determines local focus detection area Ai (with picture element number of Mi) with a large data amount from the entire area of image sensor A consisting of the first light-receiving element row. An area with large data amount means an area having a great change in the image output of the foreground object image signal as shown at Ai in Fig. 1. An example of the method of determining a great data amount area will be described later. With repsect to the picture element row of this selected local focus detection area Ai, correlation is calculated by progressively shifting the corresponding picture element row range of image sensor B consisting of the first light-receiving element row. This method permits examination of shift L in the illustrated case in a range of -37 to 37. In this way, this method permits obtaining an image shift by extracting a local focus detection area with a large data amount, and thus it is possible to detect a large shift range with a small amount of calculation. The number of picture elements Mi in the selected local focus detection area is may be 10 to 20 to attain a predetermined accuracy of focus detection and is sufficiently 30 at the most. Therefore, dispensing with small data amount areas has no adverse effects. Figs. 23 show examples of the manner of taking shift in case when selected local focus detection area Ai is other than the central area. It will be seen that there is no problem in the location of selected local detection area Ai, and likewise shift in a wide range can be coped with. Further, unlike the prior art example shown in Fig. 23, where the focus detection area consists of three discrete blocks, the correlation C(L) varies continuously with shift L as shown in Fig. 24. By way of example, the correlation in each shift in the case of Fig. 1 is and BRIEF DESCRIPTION OF THE DRAWINGS Figs. 1 to 3 are views illustrating the method of correlation calculation with a focus adjuster; Figs. 4 to 6A and 6B are views illustrating a method of local focus detection area borderline determination; Figs. 7 to 10 are views illustrating an example of a focus adjuster; Figs. 11 to 13 are views illustrating a second embodiment; Figs. 14 to 19 are views for explaining center-preferential focus detection; Figs. 20 and 21A to 21B are views illustrating a prior art focus adjuster; Figs. 22A to 22E are views illustrating correlation in the prior art; Figs. 23 and 25 are views illustrating the division of focus detection area in the prior art; Fig. 24 is a view showing an image sensor output when local focus detection areas are defined without overlap; and Figs. 26 to 28A to 28C are views illustrating image sensor outputs when local focus detection areas are defined without overlap and with overlap. DESCRIPTION OF THE PREFERRED EMBODIMENTS Now, an example of a focus adjuster which performs center-preferential image shift calculation, will be described. The camera construction, to which the example is applied, is substantially the same as the prior art structure shown in Fig. 20, and hence it is not shown. The process performed in AFCPU 110 is different from the prior art process, and it will now be described. Fig. 7 is a flow chart of focus control performed by AFCPU (detecting means) 110, and Fig. 8 shows the construction of the AFCPU. When power supply to the focus adjuster is started by turning on power supply to the camera or half depressing a release button, initialize step S1 in Fig. 7 is executed, in which is set a mode of setting the charge accumulation time according to the output of a monitor section (M2 in Fig. 21B) provided on a central portion of the image sensor. There are two well-known methods of control of the charge accumulation time of CCD image sensor, i.e., hardware AGC and software AGC. In the software AGC, the charge accumulation time and image output of the present time are used to determine the charge accumulation time of the next time. In the hardware AGC, with the start of charge accumulation the monitor section also starts charge accumulation. The monitor section output is detected at all time, and when the output reaches a predetermined value, the charge accumulation in the image sensor is ended. Since there is no previous data at the time of start, the software AGC is selected because the software AGC results in slow convergence. In this example, three monitor sections M1 to M3 are disposed in a row in parallel to image sensor A as shown in Fig. 21. AFCPU 110 can select either one of monitor sections M1 to M3 as hardware AGC. In the hardware AGC, however, it is liable that the image output of a foreground object image projected on an area in question is not adequate, for instance there is an overflow, due to possible imperfectness of correspondence between observation of average light amount in a wide area and observation of a local focus detection area. Therefore, in the second and following times, the software AGC is used (step S10). Thus, after the accumulation time is determined, the accumulation is started in step S2 and stopped in step S3. In step S4, image data is A/D converted in interface 112 and stored in memory 113. As the image data stored in the memory may also be used data of the differences between adjacent element outputs obtained over the entire image sensor or data obtained by filtering the image sensor output and thus cutting out predetermined space frequency components. In step S5, boundary determining means 1002 determines local focus detection area borderlines or boundaries by the method as described before. More specifically, with respect to initial value Q(r) of the last element of predetermined area as shown in Table 2B, image output a in its neighborhood is compared in the following program to determine the boundary between local focus detection areas as described before in connection with Fig. 6. (Local focus detection area boundary determination program) The start element p(r) and end element q(r) of each local focus detection area boundary thus determined are stored in memory areas R1 to R7 corresponding to the individual elements shown in Table 2A. In step S6, contrast determining means 1003 calculates contrast Cnt(r) of each area (r being variable) as and stores the result in the memory area corresponding to each element shown in Table 2A. Further, it calculates maximum and minimum values M(r) and S(r) in each area and stores these values in the memory areas corresponding to the individual elements shown in Table 2A. In step S7 (described in detail in Fig. 9), center-preferential image shift calculation is performed. To this end, center-preferential area determining means 1004 designates local focus detection areas progressively from central local focus detection area R4 as shown in Fig. 9 (steps S74 and S77). In steps S71 and.572, local focus detection area of r = 4 is selected, and in step S73 a check as to whether the contrast of the designated area is sufficient is done from Cnt(r) > Cth. If the contrast is sufficient, step S74 is calculated, in which image shift calculating means 1005 calculates image shift Z(r) and data amount E(r) by a predetermined method to be described later. If the contrast is insufficient, the data amount is set to E(r) = 0, and the routine then goes to step S76. Step S76, is provided for permitting the judgement of the next result after end of image shift calculation in opposite side areas equidistant from the central area. If r = 4, step S77 is executed. In step S77, judging means 1006 performs judgement of the result according to the magnitude of the data amount as shown in Table 3. i Content of judgement of result 0 FI = 1 (detectable) if E(4) > Eth 1. FI = 0 (undetectable) otherwise. 1 FI = 10 if E(3) > Eth 1 and E(5) > Eth 1. FI = 11 if E(3) > Eth 1 and E(5) ≦ Eth 1. FI = 12 if E(3) ≦ Eth 1 and E(5) > Eth 1. In case E(3) ≦ Eth 1 and E(5) ≦ Eth 1, FI = B if E(3) + E(4) + E(5) > Eth 2. FI = 0 (undetectable) otherwise. 2 FI = 20 if E(2) > Eth 1 and E(6) > Eth 1. FI = 21 if E(2) > Eth 1 and E(6) ≦ Eth 1. FI = 22 if E(2) ≦ Eth 1 and E(6) > Eth 1. In case E(2) ≦ Eth 1 and E(0) ≦ Eth 1, FI = 23 if E234 > Eth 2 and E456 > Eth 2, FI = 24 if E234 > Eth 2 and E456 ≦ Eth 2, FI = 25 if E234 ≦ Eth 2 and E456 > Eth 2, where E234 = E(2) + E(3) + E(4) and E456 = E(4) + E(5) + E(6). FI = 0 (undetectable) otherwise. 3 FI = 30 if E(1) > Eth 1 and E(7) > Eth 1. FI = 31 if E(1) > Eth 1 and E(7) ≦ Eth 1. FI = 32 if E(1) ≦ Eth 1 and E(7) > Eth 1. In case E(1) ≦ Eth 1 and E(7) ≦ Eth 1, FI = 33 if E123 > Eth 2 and E567 > Eth 2, FI = 34 if E123 > Eth 2 and E567 > Eth 2, FI = 35 if E123 ≦ Eth 2 and E567 > Eth 2, where E123 = E(1) + E(2) + E(3), E567 = E(5) + E(6) + E(7). FI = 0 (undetectable) otherwise i Defocus DEF 0 FI = 1 DEF = DEF(4) = K(4) x Z(4) + O(4) 1 FI = 10 DEF = Near{DEF(3), DEF(5)} FI = 11 DEF = DEF(3) FI = 12 DEF = DEF(5) FI = 13 DEF is a combination of DEF(3), DEF(4), and DEF(5) 2 FI = 20 DEF = Near{DEF(2), DEF(6)} FI = 21 DEF = DEF(2) FI = 22 DEF = DEF(6) FI = 23 DEF is a closer one to camera of a combination of DEF(2) to DEF(4) and combination of DEF(4) to DEF(6) FI = 24 DEF is a combination of DEF(2) to DEF(4) FI = 25 DEF is a combination of DEF(4) to DEF(6) 3 FI = 30: DEF = Near{DEF(1), DEF(7)} FI= 31 = DEF = DEF(1) FI = 32 DEF = DEF(7) FI = 33 DEF is a closer one to camera of a combination of DEF(1) to DEF(3) and a combination of DEF(5) to DEF(7) FI = 34 DEF is a combination of DEF(1) to DEF(3) DEF is a combination of DEF(5) to DEF(7) With r = 4 (i = 0), detection is possible if data amount E(4) is greater than Eth 1. In this case, FI = 1 is set. If the data amount is smaller, the detection is impossible. In this case, FI 0 is set. When FI = 1, the value of DEF(4) in area r = 4 is determined as defocus DEF in defocus calculation step S9 to be described later. In step S78, a check as to whether detection is possible is made by checking whether FI > 0. If the detection is possible, step S8 is executed. Otherwise, a check is done in step S79 as to whether all the local focus detection areas are checked. If all the areas are checked, next step S8 is executed even if these areas are all incapable of detection. If there are areas remaining without being checked, i is set to i = i + in step S80 (i.e., i = 1), in step S72 an area of r = 4 - i (in the instant case r = 3) is designated. Then as before, the routine goes through steps S73, S74 and S75 to step S76. Since r = 3, step S81 is executed. Then, with r = 4 + i the routine goes through steps S73, S74 and S75 to step S76 as before. Since this time r = 5, next step S77 is executed. At this time, the data amount is certified with respect to areas of r = 3 and r = 4. This time, the judgement of result in case of i = 1 will be described with reference to Table 3. If both E(3) and E(5) are both greater than Eth 1, FI = 10 is set, and in defocus calculation in step S9 to be described later either DEF(3) or DEF(5) that corresponds to a foreground object closer to the camera is adopted as defocus DEF. If either E(3) or E(5) is greater than Eth 1, FI = 11 is set. If E(5) is greater than Eth 1, FI = 12 is set. In the defocus calculation in step S9 to be described later, DEF(3) and DEF(5) are set as defocus DEF in the respective former and latter cases. If the predetermined value is met by none of data amounts, the sum of data amounts with respect to all the detection areas, for which the calculation has been done, or a plurality of detection areas among all the detection areas, in which calculation has been done, was obtained. If the sum is greater than Eth 2, FI = 13 is set, and in the defocus calculation in step S9 to be described later, a combination of DEF(3), DEF(4) and DEF(5) is obtained as defocus DEF. Otherwise, FI = is set (incapable of detection). Then, in step S78 whether the detection is possible is checked by checking whether FI > 0. If the detection is possible, step S8 is executed. If the detection is impossible, whether all the local focus detection areas have been checked is checked in step S79. If all the areas have been checked, next step S8 is executed even if the detection is impossible in all the areas. If there are remaining areas, i = i + 1 (i = 2 in the instant case) is set in step S80, and in step S72 r = 4 - i (r = 2 in the instant case) is set in step S72. The routine then goes through steps S73, S74 and S75 to step S76 as before. Since r = 2, step S81 is executed to set r = 4 + i (r = 6 in the instant case). The routine then goes through steps S73, S74 and S75 to step S76 as before. Like process is repeatedly executed. Here, the content of image shift calculating means 1005 in step S74 will be described. There are various well-known methods of obtaining relative displacement of image from pair image outputs, and these methods may be used. Here, a method described in U.S.P. No. 4,561,749 by the applicant will be described. As an example, local focus detection area R3 (r = 3) will be described. When this area corresponds to outputs a25 to a37 in Table 2A, the correlation C(L) corresponding to L picture element shift is s=p(r) + (L x 0.5), (r=3; p(3)=25) f=q(r) + (L x 0.5), (r=3: q(3)=37) where [Y] is a greater integer smaller than Y. (for example, in case Y = 3.5, [Y] = 3.) In this way, correlation is obtained with respect to each picture element shift L as shown in Fig. 10. The shift L may be about ± 5 to ± 10. (In this case, the detection area of image sensor A is a mobile local focus detection area as claimed). Further, in end elements of r = 1 and r = 7 there is no shifted corresponding picture element. These end elements are omitted from the addition as shown in Fig. 10. (That is, detection is not performed in out-of-focus areas.) Then, with respect to three successive correlations C(L - 1), C(L) and C(L + 1), D = (C(L-1) - C(L+1))/ 2 E = MAX(C(L-1) - C(L), C(L+1) - C(L)) Cext = C(L) - D Cmin = Cext / E are calculated with respect to shift L such that C(L-1) ≧ C(L) and C(L+1) > C(L). Further, standardized correlation Cmin is obtained by varying the value of L, and it is compared to a predetermined value, for instance 0.4. If the correlation is greater, it is determined to be a true correlation position. Of course, it is possible to cause shift in the entire range to find out Cext and Cmin and determine it to be a maximum correlation position. Value E in this maximum correlation position is the data amount, and if this value becomes smaller, the accuracy of focus detection can no longer be guaranteed. Using this maximum correlation shift, the image shift can be calculated from Z = L + D/E. Referring back to Fig. 7, in step S8, a check is done as to whether focus detection in either local focus detection area was possible in step S7. If it was, the defocus is calculated in step S9. The defocus calculation has been described before in connection with Table 3, and a supplementary description will be given hereinunder. The defocus in each detection area is calculated as DEF(r) = Z(r) x k(r) + O(r) using image shift Z(r) detected in each detection area and off-set O(r) and conversion coefficient k(r) stored in memory as shown in Table 2. The conversion coefficient k(r) varies with individual local focus detection areas due to characteristics of the optical system for focus detection, and predetermined values are stored in advance for the individual local focus detection areas. Off-set O(r) varies depending on the status of adjustment of body, in which the focal adjuster is mounted, and it is written in EEPROM or the like for each body. The manner of selection of one of a plurality of image shift calculation results was described before when at least one of E(r) is above Eth 1 (Table 3). Now, a case will be considered, in which there is no area where E is above Eth 1, i.e., FI = 13. (Some description was given before in this connection.) In this case, the data amount is insufficient in a single area. However, focus detection is possible if sum E345 of data amounts of a plurality of areas is above Eth 2. A specific method of calculation may be DEF = DEF(3) x E(3)/E345 + DEF(4) x E(4)/E345 + DEF(5) x E(5)/E345 where E345 = E(3) + E(4) + E(5). Likewise, in case when the detection area is increased (i = 2 and i = 3) if there is no area with E above Eth 1, defocus DEF is synthesized according to the sum of data amounts of a plurality of local focus detection areas as shown in Table 3. If it is determined in step S8 that all the local focus detection areas are incapable of detection, step S12 is executed. If the defocus is large again, a corresponding image shift calculation area is determined. In this case, since the pertinent area is not in the neighborhood of focus, search has to be made for a satisfactory correlation over a wide shift range. In this case, all the areas shown in Fig. 22C may be used for calculation. However, the calculation time may be reduced by selecting a local focus detection area of the greatest contrast Cnt(r) among areas R1 to R7 and detecting the shift as the stationary local focus detection area as described before in connection with Fig. 1. Further, if the image is dimmed greatly because of large defocus so that the contrast is below a predetermined value even in an area where the contrast Cnt(r) is highest, a combination of this highest contrast area and opposite side areas is handled as one area (which corresponds to detection area Ai in Fig. 1). In this case, the number of picture elements exceeds 30, so that it is possible to cope with even great dimness. More specifically, the area of maximum contrast Cnt(r) is selected in step S12, and if the contrast is above a predetermined value, this area is determined as stationary local focus detection area corresponding to detection area Ai in Fig. 1. If the contrast is below the predetermined value, a combination of this area and opposite side areas is determined to be a stationary local focus detection area corresponding to area Ai in Fig. 1. In step S13, image shift calculation is performed to obtain data amount and image shift. If no maximum correlation position is found or if the data amount is below a predetermined value, the detection is impossible. In this case, therefore, a low contrast flag is set, and the routine goes through step S14 to step S10. If the detection is possible, the routine goes through step S14 to step S15 to calculate the defocus, and the it goes to step S10. In step S10, the accumulation time for the next time is determined depending on the local focus detection areas (i = 0, 1, 2 or 3) used for the result judgement and according to image output data corresponding to these areas such that the next time peak in that area has a predetermined value. In step S11 lens drive is executed according to the calculated defocus, and when the driving is completed, accumulation is started in step S2. However, if it is detected in step S14 that the detection is impossible, simultaneously with the start of drive the accumulation is started in step S2 to search the lens position, at which the detection is possible. Now, an embodiment of a focus adjuster will be described, in which designation-preferential image shift calculation is performed as a modification of the center-preferential image shift calculation. In the center-preferential image shift calculation system, the result of calculation with respect to the central area is used preferentially, and if the detection is impossible in the central area, the detection area is progressively broadened from the central area for focus detection calculation. In the designation-preferential image shift system, the result of image shift calculation with respect to a designated detection area is used preferentially, and when the detection is impossible in the designated detection area, the detection area is progressively broadened from the designation-preferential detection area for focus detection calculation. To this end, the photographer designates a focus detection area by some means. An example of such area designation will now be described with reference to Fig. 11A. Description of parts shown in Fig. 20 corresponding to the previously described example is omitted. In this example, switches I to III are provided as detection area selection members on top of a shutter release button. Thus, area switching can be effected momentarily without separating hand from the shutter release button. First, a normal shutter release operation will be described. When member 151 is depressed into contact with member 152 to render state H the potential at input port 12 of microcomputer 110 for performing operation control, a commonly termed half depression state is set up to start focus detection operation. When member 151 is further depressed so that member 153 is turned on, a full-depressed state is set up, in which the potential at input port 11 is state H. As a result, mirror-up and exposure are started. Switches I to III provided as area selection members on top of the shutter release button may be small mechanical switches, contact switches or pressure-sensitive switches. In either case, the potentials at input ports 13 and 14 are changed between H and L according to the on-off operation of switches I to III. Of course, with mechanical switches the on-off operation should be possible with lighter touch than in the case of the half- and full-depression noted above. With contact switches and pressure-sensitive switches predetermined circuit members are inserted between adjacent ones of input ports I3 to I5. The detection area selection may be effected in correspondence to an "on" switch; for instance, a central area is selected as shown in Fig. 11B, a left area is selected as shown in Fig. 11C, and a right area is selected as shown in Fig. 11D. However, this manner of selection is difficult if switches I to III are smaller than finger tip as shown. Accordingly, as shown in Table 4A, preference is given to the left detection area when switch I is in state H irrespective of the state of the other switches, to the central detection area when switches I and II are respectively in states H and L irrespective of the state of other switches, and to the right detection area when switches I to III are respectively in states L, L and H. In such arrangement, the left, central and right detection areas can be selected with respective finger positions shown in Figs. 11E to 11G, thus improving the operability. Figs. 11E to 11G are views from the back side (film side) of camera. The preferential detection area is constituted by left local focus detection area (1) in the viewfinder field in Fig. 11H with the finder position of Fig. 11E, by central local focus detection area (2) in viewfinder field shown in Fig. 11F with the finger position of Fig. 11F, and by right local focus detection area (3) in the viewfinder field shown in Fig. 11H with the finger position shown in Fig. 11G. Table 4B shows an arrangement which may be adopted when the number of selectable detection areas is increased by increasing switches. Here, mark * means either state H or L as desired. Now, flow of operation of the designation-preferential image shift calculation system will be described with reference to Fig. 12A. This flow is the same as the flow shown in Fig. 7 except for that designation-preferential image shift calculation is performed in step S107. In initialize step S101, the states of input ports 13 to 15 are read out, and a preferential area is determined on the basis of the determination standards in Table 4A. One of monitor sections M1 to M3 shown in Fig. 21, on the basis of which the hardware AGC is to be applied, is determined on whether the preferential detection area is either R2 or R4 or R6. I II III Determination H * * Preference for R2 (left) L H * Preference for R4 (central) L L H Preference for R6 (right) I II III IV V VI VII Determination H * * * * * * Preference for R1 L H * * * * * Preference for R2 L L H * * * * Preference for R3 L L L H * * * Preference for R4 (central) L L L L H * * Preference for R5 L L L L L H * Preference for R6 L L L L L L H Preference for R7 The stop of first accumulation in step S103 is determined according to the output of the designated monitor. The second and following accumulation stops are controlled according to the setting of the accumulation time in step S110. Steps S104 to S106 are the same as described before. Fig. 13 shows the flow in step S107. In the Figure, step S107 corresponds to image shift calculator shown in Fig. 12B, step S277 corresponds to judging means 1706 in Fig. 12B, and the remaining portion corresponds to designation-preferential area determining means. First, in step S17 the designated area is read out. Then, ξ = 2, 4 and 6 is set on the basis of Fig. 4A according to whether the designated detection area is R2 to R4 or R6. Now, a case when ξ = will be described with reference to steps S271, S172, S272, S173, S182, S183, S176 and S181. The local focus detection areas for focus detection are, in the preferential order, r = 2 with i = 0, r = 1 and r = 3 with i = 1; r = 4 with i = 2, r = 5 with i = 3, r = 6 with i = 4, and r = 7 with i = 5 If it is found in step S272 that r is outside the range, E(r) = 0 is set in step S175. Steps S173, S172, S175 and S176 have the same functions as steps S73, S74, D75 and S76. The content of step S177 is as shown in Table 5. The gist of this table is the same as that of Table 3 except for that only single side area can be obtained from i = 2 if ξ is 2 and 6, for instance. In step S110 the next accumulation time is determined such that the peak of area, for which the focus detection calculation was performed in step S107, and adopted as defocus in step S109, has a predetermined value. (Note) E(r) = 0 if r is outside a predetermined range (r < 1 or r > 7). As designated area r = ξ, area ξ + 1 is expressed as ξ1, ξ - 1 as ξ1 , ξ + 2 as ξ2 and ξ - 2 as ξ2 . i Result determination content 0 FI = 1 if E(ξ) > Eth 1 FI = 0 otherwise 1 FI = 10 if E( ξ1 ) > Eth 1 and E( ξ1 ) > Eth 1 FI = 11 if E(ξ1) > Eth 1 and E( ξ1 ) > Eth 1 FI = 12 if E(ξ1) ≦ Eth 1 and E( ξ1 ) > Eth 1 FI = 13 if E(ξ1) ≦ Eth 1, E( ξ1 ) ≦ Eth 1 and E( ξ1 ) + E(ξ) + E(ξ) > Eth 2 FI = 0 otherwise 2 FI = 20 if E(ξ2) > Eth 1 and E( ξ2 ) > Eth 1 FI = 21 if E(ξ2) > Eth 1 and E( ξ2 ) ≦ Eth 1 FI = 22 if E(ξ2) ≦ Eth 1 and E( ξ2 ) > Eth 1 With E(ξ2) ≦ Eth 1, E( ξ2 ) ≦ Eth 1, E234 = E( ξ2 ) + E( ξ1 ) + E(ξ) and E456 = E(ξ) + E(ξ1) + E(ξ2), FI = 23 if E234 > Eth 2 and E456 > Eth 2 FI = 24 if E234 > Eth 2 and E456 ≦ Eth 2 FI = 25 if E234 ≦ Eth 2 and E456 > Eth 2 FI = 0 otherwise 3 FI = 30 if E(ξ3) > Eth 1 and E( ξ3 ) > Eth 1 FI = 31 if E(ξ3) > Eth 1 and E( ξ3 ) ≦ Eth 1 FI = 32 if E(ξ3) ≦ Eth 1 and E( ξ3 ) > Eth 1 4 Likewise i Defocus DEF 0 FI = 1 DEF = DEF(ξ) = K(ξ)*Z(ξ) + 0(ξ) 1 FI = 10 DEF = Near { DEF(ξ1), DEF( ξ1 ) } FI = 11 DEF = DEF(ξ1) FI = 12 DEF = DEF( ξ1 ) FI = 13 DEF is a combination of DEF( ξ1 ), DEF(ξ), and DEF(ξ1) 2 FI = 20 DEF = Near {DEF(ξ2), DEF( ξ2 )} FI = 21 DEF = DEF(ξ2) FI = 22 DEF = DEF( ξ2 ) FI = 23 DEF is a closer one to camera of a combination of DEF(ξ2) to DEF(ξ) and a combination of DEF(ξ) to DEF( ξ2 ) FI = 24 DEF is a combination of DEF( ξ2 ) to DEF(ξ) FI = 25 DEF is a combination of DEF (ξ) to DEF (ξ2) 3 FI = 30 DEF = Near {DEF(ξ3), DEF( ξ3 )} FI = 31 DEF = DEF(ξ3) FI = 32 DEF = DEF( ξ3 ) 4 Likewise In the above embodiment, an image sensor having a wide range focus detection area is divided for selectable local focus detection areas by the method described before such as to permit high speed processing for highly accurate focus detection. Thus, the focus detection accuracy is rather improved. Further, since the focus detection area is increased, the result of focus detection is not changed at all even if a swing of the detection area with respect to a foreground object is caused due to movement of the photographer's hands holding the camera. There is less possibility of hunting of lens. The intended focus can be reliably captured. The above embodiment concerns TTL type focus adjusters used for single-lens reflex camera. However, the focus adjuster according to the invention is not limited to a TTL type focus adjuster. For example, the focus adjuster according to the invention is applicable to a triangular measuring device for a lens shutter camera.

Claims: A focus detection apparatus comprising first and second light-receiving means (A,B) each comprising a plurality of photosensors and each arranged to receive an image from a field to be photographed, the photosensors of the first light-receiving means (A,B) being divided into at least three groups (R i ), each corresponding to a region in the field to be photographed, the apparatus comprising means (110) for correlating the received images to determine the degree to which an optical system is defocused, and automatic gain control means for controlling the operation of the photosensors so that the magnitudes of the outputs therefrom are dependent upon the detected intensity of received light, characterised in that the apparatus comprises selecting means (I,II,III) operable by a user for selecting one of said photosensor groups of the first light-receiving means (A), on which said correlation is to be based first, and in that the automatic gain control means effects the automatic gain control operation based on the intensity of light from the region in the field to be photographed corresponding to the group selected by said selecting means (I,II,III). An apparatus according to claim 1 further comprising a plurality of additional photosensors (M1,M2,M3) disposed substantially parallel to the direction of array of the plurality of photosensors of said first light-receiving means (A), each said photosensor providing an output corresponding to the intensity of incident light; wherein said detected intensity of received light is detected by one of said plurality of additional photosensors (M1,M2,M3) which is adjacent to the group of photosensors of said first light-receiving means (A) selected by said selecting means (I,II,III). An apparatus according to claim 1 or claim 2 wherein said automatic gain control means controls a charge accumulation time of said first and second light-receiving means (A,B).

Inventors: UTAGAWA KEN, UTAGAWA, KEN
Applicants: NIPPON KOGAKU KK, NIKON CORPORATION
Application year: 1989
Main classification: G02B7
IPC codes: G02B7