The present invention relates to charging condition control in a distance measuring apparatus for measuring the distance to an object and, more specifically, a method of controlling charging conditions suitably applied to an automatic focusing mechanism of a camera.
Conventionally, a distance measuring device which performs trigonometric calculation by projecting a light spot onto an object to be measured and receiving light reflected by the object using a position detection means such as a position sensitive detector (PSD) or the like is known. Further, another distance measuring device which circulates an accumulated charge using a ring-shaped charge transfer device, such as a CCD, to integrate reflected light of ON/OFF-projected light spots and skims a predetermined amount of charges of external light components other than the light spot has been proposed by Japanese Patent Publication No. 5-22843 and Japanese Patent Application Laid-Open No. 8-233571. The distance measuring device of this type can keep accumulating charges while circulating the accumulated charge if the level of the accumulated charge is not high enough, thereby it is possible to obtain signals of good S/N ratio.
FIG. 12 is a diagram illustrating a configuration of a light-receiving unit 500 used in a distance measuring apparatus.
Note, in FIG. 12, a photoelectric conversion (photo-receiving) device 520 of the light-receiving unit 500 is represented by three photoelectric conversion devices X, Y and Z, to simplify the explanation.
An image sensing apparatus having the light-receiving unit 500 operates in two different modes, namely, an active mode and a passive mode.
The active mode projects light onto an object 515 to be measured, the distance to which is to be measured, by turning on and off a light emit element (here, infrared light-emitting diode; IRED) 514 to emit light pulses, receives light reflected by the object 515, when the IRED 514 is on and when the IRED 514 is off, respectively, using the photoelectric conversion devices X, Y and Z, and stores the charges separately when the IRED 514 is on and when the IRED 514 is off. Whereas, the passive mode receives external light reflected by the object without turning on the IRED 514 using the photoelectric conversion devices X, Y and Z, and store the charges.
The distance measuring apparatus is of a hybrid-type capable of performing distance measuring operations both in the active mode and in the passive mode, and, when a reliable measurement result is not obtained in the active mode, then the distance is measured once again in the passive mode.
Further, the light-receiving unit 500 has a linear CCD 524 which includes ON-pixels 522x, 522y, and 522z and OFF-pixels 523x, 523y, and 523z, respectively corresponding to the photoelectric conversion devices X, Y and Z, a ring-shaped CCD 521 which includes a plurality of ON-pixels and OFF-pixels, and a skim CCD 523.
The charges obtained as a result of photoelectric conversion in the photoelectric conversion devices X, Y and Z are respectively transferred to the corresponding ON-pixels and OFF-pixels of the linear CCD 524 and stored. Thereafter, the charges are transferred to the ring-shaped CCD 521.
Next, timing of charge transfer operation in the light-receiving unit 500 is explained with reference to FIG. 13.
Referring to FIG. 13, the IRED 514 turns on and off in synchronization with the ON/OFF (High/Low) of a charging signal in the active mode, and the IRED 514 is kept off independent of the ON/OFF of the charging signal in the passive mode.
Below, the active mode is explained.
First, charges obtained in the photoelectric conversion devices X, Y and Z while the charging signal is ON (i.e., High level) are transferred to the ON-pixels 522x, 522y, and 522z while an ON-pixel transfer signal is ON (i.e., High level).
Further, charges obtained in the photoelectric conversion devices X, Y and Z while the charging signal is OFF (i.e., Low level) are transferred to the OFF-pixels 523x, 523y, and 523z while an OFF-pixel transfer signal is ON (i.e., High level).
In this manner, charges due to projected light reflected by the object and external light are stored in the ON-pixels 522x, 522y, and 522z, while charges due to external light are stored in the OFF-pixels 523x, 523y, and 523z in the active mode.
After the charges obtained in the photoelectric conversion devices X, Y and Z are transferred to the ON-pixels 522x, 522y, and 522z and the OFF-pixels 523x, 523y, and 523z, the charges are transferred to the ring-shaped CCD 521.
To transfer the charges to the ring-shaped CCD 521, a ring transfer signal is used. The ring transfer signal becomes High so that charges from the same pixel of the linear CCD 524 are always transferred to the same pixel of the ring-shaped CCD. Accordingly, charges outputted from the ON-pixel 522x, corresponding to the photoelectric conversion element X obtained during the charging signal is ON, for example, are accumulated.
In FIG. 13, the numerals 1, 2, 3, and so on, indicate the number of circulations. The number of circulations indicates the number of times charges are transferred to the ring-shaped CCD 521.
More specifically, in the first circulation, charges are transferred to the ring-shaped CCD 521 once, as shown in FIG. 14A, and the charges obtained in one charging operation are stored. In the second circulation, charges obtained in two charging operations are accumulated, as shown in FIG. 14B, and in the third circulation, charges are transferred to the ring-shaped CCD 521 three times; in other words, three charging operations are performed and charges obtained in the three charging operations are accumulated in the respective pixels, as shown in FIG. 14C.
When the charges accumulated in the ring-shaped CCD 521 do not reach a predetermined level (level in which distance measurement can be performed on the basis of the charges), i.e., incoming light to the photoelectric conversion devices X, Y and Z is low, the number of circulations, i.e., the number of charging operation, is increased, and the charges are sequentially transferred to the ring-shaped CCD 521 and accumulated until charges are accumulated to the necessary (predetermined) level. In this manner, it is possible to obtain charges of good S/N ratio.
Whereas, in a case where an amount of charge in the ring-shaped 521 exceeds a predetermined level within a predetermined number of circulations, i.e., in a case where incoming light to the photoelectric conversion devices X, Y and Z is high, it is necessary to adjust the amounts of charges to be stored in the pixels of the linear CCD 524 in one charging operation in order to prevent the pixels from being saturated.
As for adjusting the amount of charges, there are a method of adjusting a charging period by controlling an electrical shutter function, and a method for controlling a frequency for operating the photoelectric conversion devices X, Y and Z, thereby controlling a charging period.
More specifically, in the method of adjusting the charge amounts by controlling the electrical shutter function, if a reference charging period is 100%, then the charging period is reduced to 70%, 50%, and so on, when the object 515 is bright.
Further, in the method of adjusting the charge amount by controlling the frequency for operating the photoelectric conversion devices X, Y and Z, if any of the ON-pixels 522x, 522y, and 522z and the OFF-pixels 523x, 523y, and 523z is saturated when the photoelectric conversion devices X, Y and Z are operated at 1 MHz, then by operating the photoelectric conversion devices X, Y and Z in the doubled frequency, namely at 2 MHz , it is possible to halve the duration of the charging period without changing other charging conditions.
Further, means for changing the frequency for operating the linear CCD 524 and the ring-shaped CCD 521 depending upon the amount of external light in order to prevent the linear CCD 524 from being saturated is disclosed in the Japanese Patent Application Laid-Open No. 9-229676.
By adjusting the amount of charge as described above, the pixels of the linear CCD 524 are prevented from being saturated.
In such a hybrid-type distance measuring apparatus, a precise result of distance measurement is obtained since defects of the respective modes (active mode and passive mode) in the distance measuring operation are compensated by each other. The effects of a hybrid-type distance measuring apparatus are disclosed in the Japanese Patent Application Laid-Open No. 9-229674 by the present applicant, for instance. However, in this apparatus, since the distance measuring operations are performed both in the active mode and in the passive mode in time serially; therefore, it takes a longer time to perform the distance measuring operation comparing to a distance measuring operation performed in only one mode. Accordingly, a plurality of techniques for reducing time required for performing distance measuring operation in a hybrid-type distance measuring apparatus have been proposed. One of those techniques is disclosed in the Japanese Patent Application Laid-Open No. 9-229681 by the present applicant. According to the technique, in a case of performing a plurality of distance measuring operations consecutively, such as a case of performing a multi-point distance measuring operation, the frequency for operating a sensor and an open period of an electronic shutter set in the first operation are used in the subsequent distance measuring operations.
In a distance measuring apparatus mounted on a camera having a wide angle lens, for instance, a plurality of sensor arrays are arranged in the direction of the base line, as shown in FIG. 15, so as to measure distances to objects in a wide range by the respective sensor arrays.
FIG. 15 is a view for explaining the conventional technique as described above. In FIG. 15, reference numeral 50 denotes a light-receiving lens; and 51 to 53, sensor arrays for receiving light. In FIG. 15, a light-receiving unit of a distance measuring apparatus is mainly shown, and a light-emitting device is not shown. The sensor arrays 51 to 53 receive light incoming from the right, center, and left, respectively, via the light-receiving lens 50. Reference numeral 54 denotes a selector for selecting one of the outputs from the sensor arrays 51 to 53, which is composed of a switch; and 55, a signal processing unit for performing distance measuring calculation using the output of the sensor array selected by the selector 54.
As shown in FIG. 15, since the respective sensor arrays 51 to 53 receive light from different directions, the intensity of light received in the respective sensor array 51 to 53 may differ from each other. Thus, if the operational frequency of a sensor and an open period of an electronic shutter which are set for measuring a distance to an object 222 using the central sensor array 52, are used as charging conditions for measuring distance to an object 221 using the left sensor array 51, since light is very strong it may cause the sensor array 51 saturation. Accordingly, in the multi-point distance measuring apparatus which measures distances to objects in the multiple directions as described above, it is necessary to independently set the operational frequency of the sensor and the open period of the electronic shutter for measuring distances in the different directions, which requires a considerably long time for performing distance measuring operation.
Next, referring to FIG. 16, processes performed in integration clear gate (ICG) mode for determining charging conditions which do not cause saturation in the pixels of the linear CCD 524 by external light during a charge period are explained. Note, the ICG mode is performed by a not-shown controller, such as a CPU, while controlling the light-receiving unit 500.
First, when the ICG mode is initiated, the operation frequency of the linear CCD 524 and the ring-shaped CCD 521, fc, is set to the lowest value, namely, 500 kHz in step S702.
Next, a charging period is set to an initial value, i.e., the longest period. Since the charging period and other charging conditions in the linear CCD 524 can be changed by communicating with the controller (not shown) as described above, the controller generates communication data indicative of the initial value which makes the charging period longest, and sends the data to the light-receiving unit 500, thereby the charging period is set to the initial value in step S703.
Thereafter, the linear CCD 524 and the ring-shaped CCD 521 are cleared in step S704, then charging processing is initiated in step S705.
At the same time, the controller monitors a signal SKOS outputted from the light-receiving unit 500. The signal SKOS has a characteristic of changing its signal level (high and low) when the level of charges integrated in the ring-shaped CCD 521 exceeds a predetermined level during integrating charges in the ICG mode. The predetermined level is set on the basis of a value obtained by multiplying the capacitance of each pixel of the linear CCD 524 by a desired number. Therefore, by monitoring time since the charging processing is initiated until the level of the signal SKOS changes, it is possible to determine whether or not the current charging conditions are proper.
Next in step S706, whether or not the level of the signal SKOS has changed is checked. If the level is not changed, then the process proceeds to step S707 where whether or not the number of circulations exceeds the maximum number of circulations, which is set in advance, is determined. If it does, then the integration of charge is terminated at that point, and the process is completed. Whereas it is does not, then the process returns to step S706 where the processes of the subsequent steps are performed.
Whereas, if it is determined in step S706 that the level of the signal SKOS has changed, then whether or not the number of the circulations is equal to or less than a predetermined number of circulations (in FIG. 16, four), in other words, whether or not time elapsed before the level of the signal SKOS has changed is within a predetermined period, is determined in step S709. If the number of circulations exceeds the predetermined number, then the process is completed.
Note that the number of circulations is counted by counting a clock IRCLK which will be explained later.
Whereas, if it is determined in step S709 that the number of circulations is equal to or less than the predetermined number, namely, equal to or less than four, then the process proceeds to step S710 where whether the set operation frequency fc is the maximum frequency or not is determined.
If it is determined that the operation frequency fc is the maximum, then in step S711, whether or not the charging period which is currently set is the shortest is determined. If it is determined in step S711 that the charging period is the shortest, then the process is completed. Whereas, if it is not, the charging period is changed to a shorter period in step S712, then the process returns to step S703, and the subsequent steps are repeated. By changing the charging period to a shorter period, the changing condition that changed so that the level of the signal SKOS does not change within the predetermined number of circulations.
Further, if it is determined in step S710 that the operation frequency fc is not the maximum, the operation frequency fc is changed to a higher frequency in step S713, then the process returns to step S703 and the subsequent processes are repeated.
After the ICG mode as described above is completed, the charging (integration) mode for integrating charges in the ring-shaped CCD 521 is performed, then the reading mode for outputting the charges integrated in the ring-shaped CCD 521 to a microcomputer, for example, is performed.
Then, the microcomputer performs operations for calculating the distance to the object 515 on the basis of the outputted charges.
FIG. 17 shows waveforms of signals when the operation frequency fc is changed from the lowest to the highest, further, the charging period is shortened by a predetermined period, in the ICG mode.
In FIG. 17, the signal IRCLK is a reference clock for changing the charging conditions, and the IRED 514 turns on and off in synchronization with the signal IRCLK. Further, the signal IRCLK is also used for counting the number of circulations.
Further, the signal SKOS is outputted from the light-receiving unit 500, and, as described above, the level of the signal SKOS is changed in accordance with the set charging conditions.
When the ICG mode is initiated, 500 kHz is set as an initial frequency of the operation frequency fc. With 500 kHz, if the level of the signal SKOS has changed in a time equal to or less than four circulations (i.e., if the level of the signal SKOS has changed before the count of the signal IRCLK reaches five), the operation frequency fc is changed to a higher frequency (in this case, 1 MHz ), then the ICG mode is repeated.
Next, with the operation frequency fc of 1 MHz, if the level of the signal SKOS has changed before the count of the signal IRCLK reaches five, the operation frequency fc (1 MHz ) is changed to a higher frequency (2 MHz ), then the ICG mode is repeated.
Thereafter, with the operation frequency fc of 2 MHz, if the level of the signal SKOS has changed before the count of the signal IRCLK reaches five, since it is not possible to change the operation frequency fc to a higher frequency, because 2 MHz is the maximum frequency, the charging period is shortened, and the ICG mode is repeated. Under the above conditions, the level of the signal SKOS does not change when the count of the signal IRCLK reaches four, in the example shown in FIG. 17. Accordingly, the ICG mode is completed, and the process moves to the charging mode.
In the above operation, it is necessary to drive the CCDs at a predetermined frequency while accumulating charges in the linear CCD 524 and the ring-shaped CCD 521 and while executing the ICG mode for determining the charging conditions. Whereas, it is not necessary to drive the CCDs at the predetermined frequency while communicating with the controller and clearing residual charges in the CCDs, for instance, and any frequency may be used as long as the CCDs are not improperly operated.
However, as described above, the operation frequency fc when communicating with the controller and clearing residual charges in the CCDs are the same as the operation frequency fc when accumulating charges in the CCDs and executing the ICG mode for determining the charging conditions.
More specifically, in the example as shown in FIGS. 16 and 17, in the first execution of the ICG mode, the communication and the clearing of the CCDs in step S703 and S704 are performed at the operation frequency fc of 500 kHz, thereafter, charging operation is performed at the same driving frequency fc, i.e., 500 kHz, in the steps subsequent to step S705. In the next execution of the ICG mode, the communication and the clearing of the CCDs in step S703 and S704 are performed at the operation frequency fc of 1 MHz, thereafter, charging operation is performed at the same operation frequency fc of 1 MHz in the steps subsequent to step S705. In the next execution of the ICG mode, the communication and the clearing of the CCDs in step S703 and S704 are performed at the operation frequency fc of 2 MHz, thereafter, charging operation is performed at the same operation frequency fc of 2 MHz in the steps subsequent to step S705.
Therefore, when a driving frequency is set to a low frequency for driving a sensor to accumulate charges or to determine charging conditions, for instance, communication with a controller, such as a microprocessor, and clearing of residual charges in the sensor are conventionally performed at the same low frequency. Therefore, compared to a case where the operation frequency is set to a high frequency, it takes a longer time to communicate with the controller and clear charges in the sensor, which causes low throughput.