Autofocus apparatus

Abstract: The autofocus apparatus has a first mode of shifting a focus lens at a fine step interval so as to sample an AF evaluation value, and for detecting an in-focus position on the basis of a sampling AF evaluation value; and a second mode of shifting the focus lens at a coarse step interval so as to sample an AF evaluation value, and detecting a rough in-focus position on the basis of the sampling AF evaluation value, and subsequently, shifting the focus lens at a fine step interval so as to sample an AF evaluation value in the vicinity of the rough in-focus position, and detecting an in-focus position on the basis of the sampling AF evaluation value, and further, can select the first mode and the second mode.

Description: The present invention relates to an autofocus apparatus, which is used for a digital camera, a digital video camera. In an autofocus apparatus of a digital camera, a high frequency component of a video (image) signal from an image pickup device is used for an evaluation of focal control. The autofocus apparatus has the following excellent features; more specifically, there is substantially no existence of parallax, and in the case where a depth of field is shallow and a subject (object) is distant from a camera, it is possible to accurately focusing thereon. In addition, the autofocus apparatus requires no specific autofocus sensor, and has a very simple mechanism. Moreover, in the autofocus apparatus of a digital camera, in order to securely seize a shutter chance, there has been proposed a technique of shortening an AF run time. For example, an autofocus camera disclosed in Japanese Patent Application No. 1-206 164 (publication number 3-070273) detects a high-band component level of a video signal obtained from an image pickup device as a focus evaluation value every predetermined period, and thereby, performs an autofocus operation. Such an autofocus camera includes: search means; interpolation means; and focus evaluation value discriminating means. More specifically, the search means shifts (moves) a focus lens in a relatively coarse step from an infinity of subject distance to a closest focusing point, and thus, obtains a focus evaluation value for each step. The interpolation means makes an interpolation between a first maximum focus evaluation value obtained by the search means and a mutually adjacent focus evaluation value existing near to the first maximum focus evaluation value, and then, generates an interpolation focus evaluation value. The focus evaluation discriminating means discriminates a second maximum focus evaluation value from the interpolation focus evaluation value obtained by the interpolation means. Moreover, an autofocus camera disclosed in Japanese Patent Application Publication No. 3-068 280 detects a high-band component level of a video signal obtained from an image pickup device as a focus evaluation value every predetermined period, and thereby, performs an autofocus operation. Such an autofocus camera includes: first search means; and second search means. More specifically, the first search means shifts (moves) a focus lens in a relatively coarse step from an infinity of subject distance to a closest focusing point, and thus, obtains a focus evaluation value for each step. The second search means shifts (moves) the focus lens to the vicinity of subject distance corresponding to a first maximum focus evaluation value obtained by the first search means, and thereafter, shifts the focus lens in a fine step in the vicinity of the subject distance, and thus, obtains a second maximum focus evaluation value from a focus evaluation value for each fine step. However, the aforesaid autofocus cameras disclosed in Japanese Patent Application No. 1-206 164 and Japanese Patent Application Publication No. 3-068 280 have a problem that an AF running time becomes long depending upon the conditions. The following is a description on the cause of problem. Usually, in AF of an electronic camera, first, a focus lens is shifted to infinity, and thereafter, an AF evaluation value is sampled while driving the focus lens to a near side, and thus, a peak of the AF evaluation value is obtained. In this case, when employing the methods disclosed in the aforesaid Japanese Patent Application Laid-Open No. 1-206141 and 3-204973 with respect to a subject near to the infinity, in order to obtain the peak 1 of the AF focus evaluation value of a relatively coarse step, the focus lens is driven to the near side from an in-focus position, and thereafter, an AF evaluation value in a fine step is sampled. Further, the focus lens is driven to the infinity side from the peak 1, and thereafter, a peak 2 of the AF evaluation value is obtained. For this reason, the focus lens is driven to the near side from the in-focus position so as to obtain the in-focus position, and thereafter, the focus lens is driven to the in-focus position. Moreover, when employing the methods disclosed in the aforesaid Japanese Patent Application No. 1-206 164 and with respect to a subject near to the infinity, the AF evaluation value is sampled from a focus infinity position; nevertheless, in two-time AF evaluation value sampling of relatively coarse step and fine step, as a focus lens operation, there are many return operations for the fine step AF evaluation value sampling. As seen from the above description, according to the technique disclosed in the aforesaid Japanese Patent Applications, Publication No. 3-068 280, the AF running time is not always shortened. Usually, in order to obtain a peak, at least three sampling AF evaluation values are required; for this reason, in the aforesaid two-time AF evaluation samplings, at least six sampling AF evaluation values are required. In the case where an in-focus position is obtained in six time or less AF evaluation value samplings, the AF running time can not be shortened even if there is no factor described above. In general, a peak detection from three sampling AF evaluation values is not made because there is a noise, a pseudo peak or the like. Moreover, when the sampling number of AF evaluation values required for detecting a peak becomes much, there are many cases where the AF running time is not shortened. US 5,767,989 discloses an image inputting apparatus for scanning a negative film or film slides e.g. in a photoprinter. Disclosed is a camera-like arrangement of a lens unit attached to an optical frame and of an external control section. The autofocusing operation is performed on the basis of image data but not on the basis of a high frequency component of a luminance signal. EP 0 401 859 A2 discloses an automatic focus adjustment system where a control circuit is arranged to divide a moving range of the focusing device into a first area and a second area, which is set on the nearest focusing distance side of the first area to make the focusing device movable within the first area in a first focusing mode and to make it movable within both the first and second areas in a second focusing mode. It is an object of the present invention to provide an autofocus apparatus for a digital camera, which shortens a time of driving a focus lens to an in-focus position so as to achieve a reduction of AF running time. This problem is solved by an autofocus apparatus for a digital camera with the features according to claim 1. Further advantageous embodiments are the subject matter of the dependent claims. Other objects and features of this invention will become understood from the following description with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing a construction of a digital amera according to one embodiment of the present invention; Fig. 2 is a circuit diagram showing each pulse motor driver shown in Fig. 1; Fig. 3 is a view to explain a logic value of each pulse motor driver of Fig. 2; Fig. 4 is a view to explain an operation concept of each pulse motor driver of Fig. 2; Fig. 5 is a graph showing a relation between each focal length (zoom) position and a driving pulse of pulse motor for driving a focus lens in each camera-to-subject distance; Fig. 6 is a view showing a relation between a driving pulse number of pulse motor for driving a focus lens and 1 AF step; Fig. 7 is a view showing a relation between an AF evaluation value and an in-focus peak; Fig. 8 is a view to explain a coarse adjustment and a fine adjustment; Fig. 9 is a view showing one example of a relation between a camera-to-subject distance L, an AF step number and an AF sampling time in each zoom position; Figs. 10A and 10B are views to explain the sampling concept of a normal area and a macro area; Fig. 11 is a view showing a setup example of coarse adjustment/no coarse adjustment in each zoom position and camera-to-subject distance (normal area, macro area, super-macro area) in the case where a setting pixel aspect ratio is 1800 × 1200 pixels; Fig. 12 is a view showing a setup example of coarse adjustment/no coarse adjustment in each zoom position and camera-to-subject distance (normal area, macro area, super-macro area) in the case where a setting pixel aspect ratio is 900 × 600; Fig. 13 is a timing chart of the case where a coarse adjustment is made in a macro area and a normal area in the case where a setting pixel aspect ratio is 1800 × 1200 pixels; Fig. 14 is a timing chart of the case where a coarse adjustment is made in a macro area and no coarse adjustment is made in a normal area in the case where a setting pixel aspect ratio is 1800 × 1200 pixels; Fig. 15 is a timing chart of the case where a coarse adjustment is made in a macro area and a normal area in the case where a setting pixel aspect ratio is 900 × 600 pixels; and Fig. 16 is a timing chart of the case where a coarse adjustment is made in a macro area and no coarse adjustment is made in a normal area in the case where a setting pixel aspect ratio is 900 × 600 pixels. DESCRIPTION OF THE PREFERRED EMBODIMENTS A preferred embodiment of an autofocus apparatus according to the present invention will be detailedly described below with reference to the accompanying drawings. Fig. 1 is a view showing a construction of a digital camera to which an autofocus apparatus according to this embodiment is applied. In Fig. 1, a reference numeral 100 denotes a digital camera. The digital camera 100 includes a lens system 101, a mechanism 102 including a diaphragm (aperture), a mechanical shutter and the like, a CCD 103, a CDS circuit 104, a variable gain amplifier (AGC amplifier) 105, an A/D converter 106, an IPP 107, a DCT 108, a coder 109, an MCC 110, a DRAM 111, a PC card interface 112, a CPU 121, a display section 122, a control section 123, an SG (control signal generating) section 126, a strobe device 127, a battery 128, a DC-DC converter 129, an EEPROM 130, a pulse motor driver 131, a pulse motor 132, a pulse motor driver 133, a pulse motor 134, a pulse motor driver 135, and a pulse motor 136. In Fig. 1, BUS denotes a bus. Moreover, the digital camera is connectable with a removable PC card 150 via the PC card interface 112. A lens unit is composed of the lens system 101 and the mechanism 102 including the diaphragm, a mechanical shutter and the like. The lens system 101 comprises a variable focus (vari-focal) lens, and is composed of a focus lens 101a and a zoom lens 101b. The pulse motor driver 131 drives the pulse motor 132 according to a control signal supplied from the CPU 121 so as to shift (move) the focus lens 101a to an optical axis direction. The pulse motor driver 133 drives the pulse motor 134 according to a control signal supplied from the CPU 121 so as to shift the zoom lens 101b to an optical axis direction. The pulse motor driver 135 drives the diaphragm (aperture) and the mechanical shutter according to a control signal supplied from the CPU 121. The CCD (Charge Coupled Device) 103 converts a video (image) inputted via the lens unit into an electric signal (analog image data). The CDS (Correlation Double Sampling) circuit 104 is a circuit for reducing a noise with respect to a CCD type image pickup device. The AGC amplifier 105 corrects a level of the correlation double sampling signal from the CDS 104. In this case, a gain of the AGC amplifier 105 is set by the CPU 121 when a setting data (control voltage) is set in the AGC amplifier 105 via the D/A converter built in the CPU 121. Further, the A/D converter 106 converts the analog image data from the CCD 103 inputted via the AGC amplifier 105 into a digital image data. More specifically, an output signal of the CCD 103 is converted into a digital signal by the A/D converter 106 via the CDS circuit 104 and the AGC amplifier 105 at an optimum sampling frequency (e.g., an integer time of sub-carrier frequency of NTSC signal). The IPP (Image Pre-Processor) 107 which is a digital signal processor, the DCT (Discrete Cosine Transformer) 108 and the coder (Huffman Encoder/Decoder) 109, divides the digital image data inputted from the A/D converter 106 into a color difference signal (Cb, Cr) and a luminance signal (Y), and then, executes data processings for various processings, correction and image compression/elongation. Further, the above IPP (Image Pre-Processor) 107 extracts a high frequency component of the luminance signal (Y) of the inputted image data, and then, calculates an AE evaluation value so as to output it to the CPU 121. Furthermore, the IPP 107 generates a video signal on the basis of the color difference signal (Cb, Cr) and the luminance signal (Y), and then, outputs the video signal to the display section 122. The above DCT 108 and the coder (Huffman Encoder/Decoder) executes an orthogonal transformation which is one process of image compression/enlargement (elongation) conformed to JPEG, and executes Huffman coding/decoding which is one process of image compression/enlargement conformed to JPEG. The MCC (Memory Card Controller) 110 temporarily stores the compressed image, and then, executes recording to the PC card 150 or reading from the PC card 150 via the PC card interface 112. The CPU 121 uses a RAM as a work area according to a program stored in the ROM, and then, controls the whole internal operations of the above digital camera according to an instruction from the control section 123, or an external operating instruction by a remote control (not shown) or the like. More specifically, the CPU 121 executes the following controls for a shooting operation, an AF operation, an automatic exposure (AE) operation, an automatic white balance (AWB) adjustment operation and the like. A camera power is inputted to the DC-DC converter 129 from the battery 128, for example, NiCd, nickel hydrogen, lithium battery or the like, and then, is supplied to the digital camera. The display section 122 is realized by a LCD, a LED, an EL or the like, and displays a taken (shot) digital image data, an enlarged recording image data or the like. Further, the display section 122 displays various setup screens such as an AF condition setup screen for setting an AF condition, a setup screen for setting a super-macro mode. A user operates the control section 123 so as to display various setup screens. In the above AF condition setup screen, it is possible to select a manual setup mode of executing an AF operation according to an AF condition set by the user, and an automatic setup mode of executing an AF operation according to an automatically set AF condition. In the case where the user selects the manual setup mode, the setup mode sets a shift range between a normal area and a macro area, which is a shift range (camera-to-subject distance) of the focus lens 101a, and sets a sequence of AF evaluation value sampling in the set shift range, and further, sets coarse adjustment (second mode)/no coarse adjustment (first mode) in each of the normal area and the macro area. The user sets a shift range of the focus lens 101a between the normal area and the macro area, and further, when setting the sequence of AF evaluation value sampling in the normal area and the macro area of the set shift range, according to the set sequence, an in-focus position is detected. In the case where no in-focus position is found (detected), the in-focus position is detected in a shift range set by the next sequence. In the case where coarse adjustment is selected, the focus lens 101a is shifted, and then, an AF evaluation value is sampled at a fine step interval (e.g., 1 AF step), and further, a peak position is detected from a plurality of AF evaluation values thus sampled so as to detect an in-focus position. On the other hand, in the case where no coarse adjustment is selected, the focus lens 101a is shifted, and then, an AF evaluation value is sampled at a coarse step interval, and further, a peak position is detected from a plurality of AF evaluation values thus sampled so as to detect a roughly in-focus position. Next, in the vicinity of the roughly in-focus position, the focus lens 101a is shifted, and then, an AF evaluation value is sampled at a fine step interval, and further, a peak position is detected from a plurality of AF evaluation values thus sampled so as to detect a final in-focus position. In the case where the automatic setup mode is selected, coarse adjustment (second mode)/no coarse adjustment (first mode) is automatically set up in each of the normal area and the macro area in accordance with a camera-to-subject distance, a focal length, a setting pixel aspect ratio and an aperture (diaphragm) value. The control section 123 includes a function select button, a shooting instruction button, a button for executing various setups on the setup screen of the display section 122, an image quality select key for selecting a recording image quality, etc. In the case where a high image quality mode is selected by the image quality select key, a recording pixel aspect ratio of the CCD is set to 1800 × 1200 pixels; on the other hand, in the case where a normal image quality is selected, the recording pixel aspect ratio of the CCD is set to 900 × 600 pixels. Moreover, an adjustment data used when the CPU 121 controls an operation of the digital camera is written in the EEPROM 130. The above digital camera 100 (CPU 121) includes a recording mode for recording an image data obtained by picking up a subject in the PC card 150, a display mode for displaying the image data recorded in the PC card 150, and a monitoring mode for directly displaying the picked up image data on the display section 122. Next, the following is a detailed description on the pulse motor drivers 131, 133 and 135. Fig. 2 is a circuit diagram of each pulse motor driver, Fig. 3 is a table showing a logic value of each pulse motor driver, and Fig. 4 is a view showing an operation concept of the pulse motor driver. Each pulse motor driver has an input/output relation according to the logic value table shown in Fig. 3. According to the logic value table shown in Fig. 3, each of the pulse motor drivers 131, 133 and 135 has no input (IN1, 2) in the case where an enable signal of the circuit is "L" (low), and is in a waiting state; therefore, output (OUT1, 2, 3, 4) becomes an off state. On the other hand, in the case where the enable signal is "H" (high), from the logic relation between the input IN1 and IN2, the outputs OUT1 to OUT4 are an output for generating a two-phase excitation change of the pulse motor. Next, the following is a description on a control for the lens system 101. As described before, the lens system 101 is a vari-focal lens, and has different in-focus position of the focus lens 101a depending upon each focal length position. Fig. 5 is a graph showing a relation between each of focal length (zoom) positions zp1 to zp9 and a driving pulse of the pulse motor 131 for driving the focus lens 101a in each camera-to-subject distance (infinity: 0.4m, 0.078m). In Fig. 5, the vertical axis (ordinate) takes a driving pulse number of the pulse motor 132 for driving the focus lens 101a, and the horizontal axis (abscissa) takes a focal length (zoom) position. As seen from the graph of Fig. 5, only in the case where the focal length (zoom) position is zp1 and zp3, an in-focus up to 0.078m is possible. More specifically, in the case where the focal length (zoom) position is zp1, a camera-to-subject distance is set so that the in-focus is continuously possible in a range from infinity to 0.078m. Moreover, in the case where the focal length (zoom) position is zp3, when the in-focus is continuously made in a camera-to-subject distance from infinity to 0.078m, the pulse number increases. For this reason, considering an AF running time, only in the case where a super-macro mode is set, an in-focus range from 0.4m to 0.078m is set; on the other hand, in the case where the super-macro mode is not set, an in-focus range from infinity to 0.4m is set. Fig. 6 is a table showing a relation between a driving pulse number of the pulse motor 132 for driving the focus lens 101a and 1 AF step. In the case where the setting pixel aspect ratio of the CCD 103 is 1800 × 1200 pixels, the driving pulse number is set to 2 pulses in the case of a fine adjustment, and is set to 6 pulses (three times of the fine adjustment) in the case of a coarse adjustment. Moreover, in the case where the setting pixel aspect ratio of the CCD 103 is 900 × 600 pixels, the driving pulse number is set to 3 pulses in the case of a fine adjustment, and is set to 9 pulses (three times of the fine adjustment) in the case of a coarse adjustment. Next, the following is a description on a method for determining an in-focus position. The in-focus position is detected on the basis of an AF evaluation value. The IPP 107 extracts a high frequency component from a luminance signal by using a filter A (seventh band-pass filter) and a filter B (tertiary band-pass filter), and then, outputs the high frequency component to the CPU 121 as an AF evaluation value. More specifically, the CPU 121 samples the AF evaluation value while driving the focus lens 101a for each arbitrary shift rate, and then, finds a position (in-focus peak) having the maximum value of the AF evaluation value, and thus, determines the in-focus peak as an in-focus position. Then, the CPU 121 shifts the focus lens 101a to the in-focus position thus determined. The relation between the AF evaluation value and the in-focus position will be described below with reference to Fig. 7. Fig. 7 is a graph showing a relation an AF evaluation value and an in-focus peak. In the graph of Fig. 7, the horizontal axis (abscissa) takes a camera-to-subject distance (from near to infinity), and the vertical axis (ordinate) takes an AF evaluation value by the filters A and B from near to infinity. In the graph of Fig. 7, a peak position P of the AF evaluation value is an in-focus position (in-focus peak). A coarse adjustment and a fine adjustment will be described below with reference to Fig. 8. Fig. 8 is a graph to explain the coarse adjustment and the fine adjustment. In the graph of Fig. 8, the horizontal axis takes a camera-to-subject distance (from near to infinity), and the vertical axis (ordinate) takes an AF evaluation value of the coarse adjustment and the fine adjustment from near to infinity. Moreover, in Fig. 8, T denotes 1 AF step. In this embodiment, as described above, in the case of detecting an in-focus position, there are the case where no coarse adjustment is made, and the case where the coarse adjustment is made. In the case where no coarse adjustment is made, an AF evaluation value is sampled at 1 AF step interval so as to determine an in-focus position. Moreover, in the case where the coarse adjustment is made, an AF evaluation value is sampled at a sampling period greater than the case of the fine adjustment, and then, a roughly in-focus- position is detected. Then, in the vicinity of the roughly in-focus position, an AF evaluation value is sampled at 1 AF step interval, and thus, a final in-focus position is determined. Namely, the case of making the coarse adjustment has two steps, that is, coarse adjustment and fine adjustment. Subsequently, a normal area and a macro area will be described below with reference to Fig. 9. Fig. 9 is a view to explain a sampling concept of the normal area and the macro area. Fig. 9 shows the case where a coarse adjustment is made in the normal area and no coarse adjustment is made in the macro area. Moreover, in Fig. 9, A denotes a sampling locus of the case where an in-focus position exists in the macro area, and B denotes a sampling locus of the case where an in-focus position exists in the normal area. In the normal area, as shown by B, even if an in-focus peak is detected during AF evaluation value sampling, the AF evaluation value sampling is always carried out over the whole areas of the AF step number in each zoom point. Moreover, in the macro area, as shown by A, even if an in-focus peak is detected during AF evaluation value sampling, the sampling is completed in the middle of sampling. The above process is carried out in order to reduce a time although the AF evaluation values of the whole areas are sampled, and thereby, it is easy to prevent a pseudo in-focus (pseudo peak). In the example shown in Fig. 9, the in-focus position is detected in the sequence from the normal area to the macro area. As described before, the in-focus position may be detected in the reverse sequence by user's select. Figs. 10A and 10B are views showing relation between a camera-to-subject distance L, an AF step number and an AF sampling time in each of zoom positions (z1 to z9). In a closest focusing distance side, the AF step number and the AF sampling time becomes large. Next, the following is a description on the case (automatic setup mode) of changing the setting of coarse adjustment/no coarse adjustment in a normal area, a macro area and a super-macro area in accordance with a setting pixel aspect ratio. The above automatic setup mode will be described below with reference to Fig. 11 and Fig. 12. Fig. 11 shows a setting example of each zoom position (z1 to z9) and coarse adjustment/no coarse adjustment in a camera-to-subject distance (normal area, macro area, super-macro area) in the case where the setting pixel aspect ratio is 1800 × 1200 pixels. Fig. 12 shows a setting example of each zoom position (z1 to z9) and coarse adjustment/no coarse adjustment in a camera-to-subject distance (normal area, macro area, super-macro area) in the case where the setting pixel aspect ratio is 900 × 600 pixels. In Fig. 11 and Fig. 12, a camera-to-subject distance from 1m to infinity is set as a normal area, and a distance near from 1m is set as a macro area. As seen from Fig. 11 and Fig. 12, in the macro area, the setting of coarse adjustment/no coarse adjustment is the same in the case where the setting pixel aspect ratio is 1800 × 1200 pixels and in the case where the setting pixel aspect ratio is 900 × 600 pixels. On th other hand, in the normal area, when the zoom position ranges from z6 to z9, the setting pixel aspect ratio is 1800 × 1200 pixels, the coarse adjustment is made, and in the case where the setting pixel aspect ratio is 900 × 600 pixels, no coarse adjustment is made. Under the condition (normal area, zoom positions of z6 to z9), in the case where the setting pixel aspect ratio is 1800 × 1200 pixels, the coarse adjustment is made, and thereby, it is possible to reduce an AF running time. Next, an in-focus operation timing will be described below with reference to Fig. 13 to Fig. 16. Fig. 13 to Fig. 16 individually show an in-focus operation timing of the case where the zoom position is z9 (tele) and a camera-to-subject distance is 0.4m (closet distance). In Fig. 13 to Fig. 16, FME denotes an enable signal of the pulse motor driver 131, FPM1 and FPM2 denote a driving pulse of the pulse motor 132, and VD denotes a vertical synchronizing signal. First, the following is a description on the case where the setting pixel aspect ratio is 1800 × 1200 pixels. Fig. 13 is a timing chart in the case where the setting pixel aspect ratio is 1800 × 1200 pixels, and in the case where a coarse adjustment is made in the macro area and the normal area, and Fig. 14 is a timing chart in the case where the setting pixel aspect ratio is 1800 × 1200 pixels, and in the case where a coarse adjustment is made in the macro area and no coarse adjustment is made in the normal area. In Fig. 13, in an interval (1), the focus lens 101a is shifted from the closest focusing position to the infinity position in order to carry out AF evaluation value sampling. In an interval (2), the focus lens 101a is shifted at 3 AF step (coarse adjustment) per 1 VD (1/30 second), and simultaneously, in the normal area and the macro area, coarse adjustment AF evaluation value sampling is carried out so as to detect an in-focus peak (in the normal area, no peak exist). In an interval (3), in order to make a fine adjustment, the focus lens 101a is shifted to a fine adjustment AF evaluation value sampling position on the infinity side slightly from the in-focus peak position in coarse adjustment. In an interval (4), the focus lens 101a is shifted at 1 AF step (fine adjustment) per 1 VD, and simultaneously, fine adjustment AF evaluation value sampling is carried out so as to detect an in-focus peak. In an interval (5), the focus lens 101a is shifted to the in-focus peak position, that is, an in-focus position. In Fig. 14, in an interval (1), the focus lens 101a is shifted from the closest focusing position to the infinity position in order to carry out AF evaluation value sampling. In an interval (2), the focus lens 101a is shifted at 1 AF step (fine adjustment) per 1 VD (1/30 second), and simultaneously, in the normal area, AF evaluation value sampling is carried out so as to detect an in-focus peak. In an interval (3), a no peak exists in the normal area; for this reason, subsequently, the focus lens 101a is shifted at 3 AF step (coarse adjustment) per 1 VD, and simultaneously, coarse adjustment AF evaluation value sampling is carried out so as to detect an in-focus peak. In an interval (4), in order to make a fine adjustment, the focus lens 101a is shifted to a fine adjustment AF evaluation value sampling position on the infinity side slightly from the in-focus peak position in coarse adjustment. In an interval (5), the focus lens 101a is shifted at 1 AF step (fine adjustment) per 1 VD, and simultaneously, fine adjustment AF evaluation value sampling is carried out so as to detect an in-focus peak. In an interval (6), the focus lens 101a is shifted to the in-focus peak position, that is, an in-focus position. In this case, an AF running time is 1656 mS in the case of Fig. 13, and is 1824 mS in the case of Fig. 14. Therefore, in the case of Fig. 13, it is possible to shorten the AF running time by about 10% as compared with the case of Fig. 14. Next, the following is a description on the case where the setting pixel aspect ratio is 900 × 600 pixels. Fig. 15 is a timing chart in the case where the setting pixel aspect ratio is 900 × 600 pixels, and in the case where a coarse adjustment is made in the macro area and the normal area, and Fig. 16 is a timing chart in the case where the setting pixel aspect ratio is 900 × 600 pixels, and in the case where a coarse adjustment is made in the macro area and no coarse adjustment is made in the normal area. The case of Fig. 15 and Fig. 16 has the same operation as the case of Fig. 13 and Fig. 14 although is different in the setting pixel aspect ratio (pulse number in 1 AF step); therefore, the details are omitted. In this case, the AF running time is 1472 mS in the case of Fig. 15, and is 1496 mS in the case of Fig. 16. Therefore, in the case of Fig. 15, it is possible to shorten the AF running time by about 2% as compared with the case of Fig. 16. As seen from the above description, in the case where the setting pixel aspect ratio is different, the AF running time is different. In addition to the setting pixel aspect ratio, the AF running time is different whether the AF evaluation value should be sampled to what degree in the fine adjustment from the peak position obtained in the coarse adjustment, in order to have the same AF accuracy as the case where no coarse adjustment is made, or whether the coarse adjustment should be made at an AF step how many times as much as the fine adjustment. Moreover, in addition to AF evaluation value sampling, the number of driving times of the focus lens 101a increases in the coarse adjustment; for this reason, a driving speed of the focus lens 101a has a relation with a focus shift rate for removing a back rush. Therefore, depending upon an AF setting method in accordance with setting conditions and AF evaluation values, it is determined whether or not the AF running time is shortened. Next, the following is a description on the case of setting coarse adjustment/no coarse adjustment in accordance with an F-number of aperture in AF or in recording. In the case where the setting pixel aspect ratio is 1800 × 1200 pixels, when the F-number is F11 or less, the setting condition shown in Fig. 11 is used; on the other hand, when the F-number is F11 or more, the setting condition shown in Fig. 12 is used. The F-number is determined by carrying out an AE control. More specifically, the IPP 107 outputs an AE evaluation value on the basis of a luminance signal, and the CPU 121 sets an F-number of aperture on the basis of the outputted AE evaluation value via the pulse motor 136 in monitoring. Moreover, the SG section 126 sets an electronic shutter second/time for resetting a storage charge of the CCD 103. In this case, in monitoring and in recording, a coupled range is different between an electronic shutter and a camera shutter; for this reason, the F-number is also different. As is evident from the above description, in this embodiment, a user can arbitrarily select no coarse adjustment mode and coarse adjustment mode. More specifically, in no coarse adjustment mode, the focus lens 101a is shifted, and then, the AF evaluation value is sampled at a fine step interval (e.g., 1 AF step), and thereafter, the peak position is detected from the sampled AF evaluation value so as to detect an in-focus position. In the coarse adjustment mode, the focus lens 101a is shifted, and the AF evaluation value is sampled at a coarse step interval, and thereafter, the peak position is detected from the sampled AF evaluation value so as to detect a roughly in-focus position. Subsequently, in the vicinity of the roughly in-focus position, the focus lens 101a is shifted, and then, the AF evaluation value is sampled at a fine step interval, and thereafter, the peak position is detected from the sampled AF evaluation value so as to detect a final in-focus position. Therefore, it is possible to realize the shortest AF running time in each photography scene. Further, in this embodiment, the user sets a plurality of shifting ranges (camera-to-subject distance) of the focus lens 101a for sampling an AF evaluation value, and then, arbitrarily sets a sequence of detecting an in-focus position in the range set by the user, and thereafter, detects the in-focus position according the sequence. In the case where no in-focus position is found, the in-focus position is detected in the shifting range set in the next sequence. Therefore, for example, like a scenic area priority AF, a portrait area priority AF, a macro area priority AF, it is possible to preferentially perform an AF operation in the vicinity of camera-to-subject distance of each scene, and thus, to realize the shortest AF running time in the scene. Further, in this embodiment, the user can arbitrarily set the coarse adjustment mode and no coarse adjustment mode for each set shifting range (camera-to-subject distance) of the focus lens 101a; therefore, it is possible to further reduce the AF running time. For example, in particular, in the closest focusing distance, the depth of field is shallow as compared with the vicinity of infinity; for this reason, the number of AF samplings increases as compared with the camera-to-subject distance. However, the user uses the coarse adjustment mode in the macro area, and thereby, it is possible to further reduce the AF running time. Further, in this embodiment, in accordance with a camera-to-subject distance, a focal length, setting pixel aspect ratio, and an F-number, which have a relation with an increase and decrease of AF sampling number, the coarse adjustment mode and no coarse adjustment mode are automatically selected. Therefore, the user can realize an AF operation at an optimum (shortest) AF running time without spending a time for selection (setting). Although the invention has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fall within the scope of the claims.

Claims: An autofocus apparatus for a digital camera comprising: a lens system (101) including a focus lens (101a); an image pickup device (103) for converting a subject light into an electric signal and for outputting the electric signal as image data; an A/D conversion unit (106) for converting the image data into a digital image signal; a processor (107) for dividing the digital image signal into a color difference signal and a luminance signal (Y); an AF evaluation unit (107) which outputs an AF evaluation value; a sampling unit (121) for sampling the AF evaluation value obtained by said AF evaluation unit while shifting a focus lens position and for detecting an in-focus position on the basis of the sampled AF evaluation value; the autofocus apparatus further having: a first mode of shifting the focus lens (101a) at a fine step interval so as to sample an AF evaluation value, for detecting an in-focus position on the basis of a sampling AF evaluation value; and a second mode of shifting the focus lens (101a) at a coarse step interval so as to sample an AF evaluation value, for detecting a rough in-focus position on the basis of the sampling AF evaluation value, and subsequently, shifting the focus lens (101a) at a fine step interval so as to sample an AF evaluation value in the vicinity of the rough in-focus position, for detecting an in-focus position on the basis of the sampling AF evaluation value, the autofocus apparatus being capable of selecting the first mode and the second mode, wherein the AF evaluation value is output by the AF evaluation unit (107) on the basis of a high frequency component of said luminance signal (Y), and wherein said autofocus apparatus automatically selects the first mode and the second mode in accordance with a focal length. The autofocus apparatus according to claim 1, further comprising: a setting unit for setting a plurality of focus lens shifting ranges for sampling the AF evaluation value and for setting a sequence for detecting an in-focus position in each shifting range set, wherein said autofocus apparatus detects an in-focus position in each shifting range according to the sequence set by said setting unit. The autofocus apparatus according to claim 2, the autofocus apparatus being capable of selecting the first mode and the second mode for each shifting range set by said setting unit, and detecting an in-focus position in each shifting range according to the sequence set by said setting unit.

Inventors: HATA DAISUKE, HATA, DAISUKE, Hata, Daisuke, Ricoh Company, Ltd.
Applicants: RICOH KK, RICOH COMPANY, LTD.
Application year: 2000
Main classification: H04N5
IPC codes: H04N5, G03B13, G02B7