1. Field of the Invention
The present invention relates to a distance determining apparatus, an imaging apparatus, a distance determining method, and a parallax-amount determining apparatus.
2. Description of the Related Art
Distance determining techniques (ranging) applicable to digital cameras are known. A ranging technique of determining a distance from an image sensor to an object scene includes using a phase difference detection method. In the phase difference method, some pixels in an imaging device have a function for achieving ranging. Each of such pixels includes multiple photoelectric conversion units which receive a light flux that has passed through respective different areas on a pupil of an imaging optical system. The amount of a shift between image signals generated by the photoelectric conversion units is estimated, and a defocus amount is calculated, whereby ranging is achieved by known methods.
When the photoelectric conversion units have pupil transmittance distributions different from each other, the image signals have values different from each other, resulting in reduction in accuracy in estimation of the amount of a shift between the image signals and reduction in accuracy in ranging. Japanese Patent No. 3240648 describes a method in which an image-signal correction filter is applied to both of a pair of image signals, whereby the values of image signal are corrected, resulting in improved accuracy in ranging.
In the case where an image-signal correction filter is applied to both of a pair of image signals, especially when a filter having a large number of taps (cells) is used, as in the case of contemporary image sensors, the processing time of the image-signal correction process is increased, and the ranging speed is decreased.
The present invention provides a distance determining apparatus and a distance determining method which achieve fast and highly accurate ranging, or provides a parallax-amount determining apparatus which determines a parallax amount with high speed and high accuracy.
A distance determining apparatus according to the present invention includes a distance calculating unit and a signal processor. The distance calculating unit calculates a distance to an object on the basis of a first signal corresponding to a light flux that has passed through a first pupil region of an exit pupil of an imaging optical system and a second signal corresponding to a light flux that has passed through a second pupil region of the exit pupil of the imaging optical system. The second pupil region is different from the first pupil region. The signal processor filters either one signal by using a filter based on an optical transfer function corresponding to the first pupil region and an optical transfer function corresponding to the second pupil region. The either one signal is one of the first signal and the second signal.
A distance determining method according to the present invention includes calculating a distance to an object on the basis of a first signal corresponding to a light flux that has passed through a first pupil region of an exit pupil of an imaging optical system and a second signal corresponding to a light flux that has passed through a second pupil region of the exit pupil of the imaging optical system, the second pupil region being different from the first pupil region; and filtering either one signal by using a filter based on an optical transfer function corresponding to the first pupil region and an optical transfer function corresponding to the second pupil region. The either one signal is one of the first signal and the second signal.
A parallax-amount determining apparatus according to the present invention includes a signal processor and a parallax-amount calculating unit. The signal processor filters either one signal by using a filter. The either one signal is one of a first signal corresponding to a light flux that has passed through a first pupil region of an exit pupil of an imaging optical system and a second signal corresponding to a light flux that has passed through a second pupil region of the exit pupil of the imaging optical system. The second pupil region is different from the first pupil region. The filter is based on an optical transfer function corresponding to the first pupil region and an optical transfer function corresponding to the second pupil region. The parallax-amount calculating unit calculates a parallax amount corresponding to the amount of a shift between the either one signal having been filtered by the signal processor and a signal different from the either one signal among the first signal and the second signal.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Description is made below by using a digital still camera as an exemplary imaging apparatus provided with a distance determining apparatus according to the present invention. However, the application of the present invention is not limited to this. For example, the distance determining apparatus according to the present invention may be applied to a digital video camera, a digital distance gauge, or the like. In the description in which figures are referred to, even when the figure numbers are different, identical components are designated with identical reference numerals, and repeated description thereof is avoided as much as possible.
As illustrated in
The distance determining apparatus 40 is constituted, for example, by a signal processing device having a central processing unit (CPU) and a memory. The CPU executes programs, whereby the function of the distance determining apparatus 40 is achieved. The signal processing device may be formed by using an integrated circuit in which semiconductor devices are integrated, and may be formed, for example, by using an integrated circuit (IC), a large-scale integrated circuit (LSI), a system LSI, a microprocessing unit (MPU), or a central processing unit (CPU).
The distance determining apparatus 40 includes a distance calculating unit 41 which calculates the distance to an object on the basis of a first signal corresponding to a light flux that has passed through the first pupil region of the exit pupil 21 of the imaging optical system 20 and a second signal corresponding to a light flux that has passed through the second pupil region. The first signal constitutes a group of electric signals generated by the photoelectric conversion units 11 of the pixels. In the first signal, the position of each of the pixels is associated with an electric signal generated by the photoelectric conversion unit 11 of the pixel. The second signal constitutes a group of electric signals generated by the photoelectric conversion units 12 of the pixels. In the second signal, the position of each of the pixels is associated with an electric signal generated by the photoelectric conversion unit 12 of the pixel. If a signal obtained after noise reduction and filtering are performed on the first signal corresponds to the light flux that has passed through the first pupil region of the exit pupil 21 of the imaging optical system 20, such a signal is encompassed in the first signal. The second signal is similarly defined.
The distance determining apparatus 40 includes a signal processor 42, a shift-amount calculating unit 43, and a filter generating unit 44 as well as the distance calculating unit 41. The signal processor 42 has a function of filtering either one of the first signal and the second signal by using a filter based on an optical transfer function corresponding to the first pupil region and an optical transfer function corresponding to the second pupil region. The shift-amount calculating unit 43 has a function of calculating the amount of a shift between the first signal and the second signal. The filter generating unit 44 has a function of generating a filter used in the filtering performed by the signal processor 42, on the basis of the shift amount calculated by the shift-amount calculating unit 43.
The recording device 30 has a function of recording a signal which has been read or a calculation result.
In the configuration having multiple photoelectric conversion units, such as that of a pixel 13, an image signal equivalent to that from a pixel having a single photoelectric conversion unit can be generated by summing signals obtained by the photoelectric conversion units 11 and 12, in the distance determining apparatus according to the present invention. The pixels 13 having such a configuration may be disposed at the positions of all of the pixels of the imaging device 10. Alternatively, the pixels 13 may be disposed at the positions of some of the pixels of the imaging device 10 so that a configuration including both of pixels having a single photoelectric conversion unit and the pixels 13 having multiple photoelectric conversion units is employed. In the latter configuration, the pixels 13 may be used to perform ranging, and the other pixels may obtain an image of an object. The pixels 13 may be discretely arranged in the imaging device 10, or may be disposed in such a manner that spacing between pixels 13 in the x direction is different from that in the y direction.
In the present invention, the distance between the imaging optical system 20 and the imaging device 10 is long with respect to the size of a pixel 13. Thus, a light flux that has passed through a different position in the exit pupil 21 of the imaging optical system 20 enters the surface of the imaging device 10 with a different incident angle. The photoelectric conversion units 11 and 12 receive a light flux passing within a predetermined angle range 22 (see
In the area through which a light flux received by a photoelectric conversion unit passes, an area of the exit pupil 21 which includes the pupil centroid and through which a light flux entering in an angle range in which the sensitivity of the photoelectric conversion unit is high passes is called a pupil region. The direction between the pupil centroids of the two pupil regions is called the pupil dividing direction. In the first embodiment, the pupil dividing direction is set to the x direction. The x direction is referred to as a first direction, and the y direction perpendicular to the x direction is referred to as a second direction.
The signal S1 (j=1 or 2) may be expressed by using Expression 2 described below.
The symbol f represents the light quantity distribution of an object image, and the symbol * represents convolution integration. The subscript j represents 1 or 2. The symbol PSFj represents a transfer function indicating the degree of degradation produced by the imaging optical system 20 or the imaging device 10 when a light flux from an object is obtained as a signal Sj, and is called a point spread function. The difference between the shape of PSF1 and that of PSF2 determines the difference between the shape of the signal S1 and that of the signal S2. The symbol F represents the Fourier transform, and the symbol Ff represents the result obtained by performing the Fourier transform on the light quantity distribution f of an object. The symbol iFFT represents the inverse Fourier transform.
The symbol OTFj represents a transfer function obtained by performing the Fourier transform on the point spread function PSFj, and is called an optical transfer function. The symbol OTFj is expressed as a function which has a modulation transfer function MTFj in an amplitude term and which has a phase transfer function PTFj in a phase term in the spatial frequency domain. The functions MTFj and PTFj are functions of determining a change amount of the amplitude and the position, respectively, of each of the space frequency components involved in transmission. The functions OTFj, MTFj, and PTFj are an optical transfer function corresponding to the jth pupil region, a modulation transfer function corresponding to the jth pupil region, and a phase transfer function corresponding to the jth pupil region. The symbol j represents 1 or 2.
The distance to an object is calculated from the amount of a shift between the signal S1 and the signal S2 in the x direction (first direction). This shift amount is obtained by using a known method. For example, the shift amount is obtained in such a manner that a correlation operation is performed while one of the pair of signals (S1 and S2) is shifted in the x direction, and that the shift amount is calculated when the correlation is the highest. A defocus amount is obtained from the obtained shift amount by using a known method, and the distance to an object is calculated.
Similarly to PSF, when MTF1 and PTF1 have a characteristic different from that of MTF2 and that of PTF2, respectively, the signal S1 has a shape different from that of the signal S2. The point spread function PSFj is obtained depending on the signal Sj, and is changed depending on optical characteristics (such as a focal length, an aperture, and a defocus amount) of the imaging optical system 20, the sensitivity characteristics of the pixels 13, the positions of the pixels 13 on the imaging device 10, and the like. The same is true for the functions OTFj, MTFj, and PTFj.
To prevent this, an image-signal correction filter is used to perform preprocessing for reducing an error in calculation of the shift amount. The present invention is related to the preprocessing, and is devised to reduce the processing time of the preprocessing. The preprocessing is described below on the basis of the method of determining a distance, according to the present invention.
As illustrated in
As illustrated in
As illustrated in
The image-signal correction filter used in this process has the following characteristic. That is, the image-signal correction filter is a two-dimensional filter having cells, the number of which is Ax in the x direction and Ay in the y direction (Ax and Ay are integers equal to or more than two). In addition, the image-signal correction filter is generated on the basis of the optical transfer function OTFj. More specifically, the image-signal correction filter is generated on the basis of the reciprocal of the optical transfer function OTFj corresponding to the first pupil region and the optical transfer function OTF2 corresponding to the second pupil region, and the image-signal correction filter ICF is expressed by using Expression 3 described below.
The symbol PG1 is a phase term obtained by converting the shift amount involved in the defocusing of the centroidal position of PSF1 into a phase amount with respect to each of the space frequencies, and the symbol PG2 is a phase term obtained by converting the shift amount involved in the defocusing of the centroidal position of PSF2 into a phase amount with respect to each of the space frequencies. The symbol ICF is expressed as a function in which the phase terms PG′ and PG2 are added to the product of the reciprocal of OTF1 and OTF2 (OTF2/OTF1) in the frequency space. Expression 3 may be expressed as Expressions 4 to 7 described below.
ICF=iFFT{HM−exp[i HP]} Expression 4
HM=MTF
2
/MTF
1 Expression 5
HP=PTF
2
−PTF
1
+PG Expression 6
PG=PG
2
−PG
1 Expression 7
The symbols HM and HP are an amplitude term and a phase term, respectively, in the frequency space of ICF. The symbol PG is a phase adjustment term obtained by converting the distance between the centroidal positions of PSF1 and PSF2 in the real space into a phase amount with respect to each of the space frequencies in the frequency space. The symbol PG is added to prevent the image signal from being moved by the distance between the centroids due to the image-signal correction process. The symbol PG is a term having a certain value independent of space frequencies, in the real space, and a term which does not affect the shape of a signal. Expression 3 may be transformed into other expressions. Either of the transformation expressions may be included in the embodiment for the image-signal correction filter according to the present invention.
As described above, ICF is determined in accordance with the ranging conditions, such as the state (the focal length, an aperture, and the defocus amount) of the imaging optical system 20 and the positions of the pixels 13 on the imaging device 10. Filter data corresponding to each of the conditions is stored in advance, and the filter data is read in accordance with a condition, whereby ICF is obtained. In addition to the above-described manner, only filter data corresponding to a typical provisional shift amount may be stored, and interpolation may be performed on the filter data stored in advance, for a provisional shift amount other than the typical value, whereby a filter is generated. Instead, filter data may be approximated by using a function, and coefficients of the function may be stored. For example, cell values of a filter are approximated by using an n-order function (n is a positive integer) using a position in the filter as a variable, and the coefficients of the function are stored. Then, coefficients are read in accordance with the ranging condition, and a filter is generated. This method allows the amount of filter data which is to be stored to be reduced, and allows the recording capacity for storing the filter to be reduced.
The corrected signal CS1 generated through the image-signal correction process is expressed by Expression 8 using Expressions 2 and 4 to 7.
CS
1
=S
1
*ICF=iFFT{Ff−MTF
2−exp[i(PTF2+PG)]} Expression 8
As a result, the modulation transfer function corresponding to the corrected signal CS1 is MTF2, and the phase transfer function is a sum of PTF2 and PG which does not affect the shape of the signal.
When a point spread function CPSF1 obtained by transforming PSF1 is used, the corrected signal CS1 may be expressed by Expression 9. The shape of CPSF1 determines the shape of the corrected signal CS1.
CS
1
=f*CPSF
1 Expression 9
By using the image-signal correction filter as described above, the image-signal correction process is performed on only one of the image signals (first signal S1), whereby a corrected signal whose shape is close to that of the other image signal (second signal S2) may be obtained. Therefore, the computation load in the image-signal correction process may be reduced, and high-speed preprocessing may be achieved.
As illustrated in
Alternatively, a transformation coefficient for associating a shift amount d with a defocus amount ΔL may be calculated in advance, and the detected shift amount and the transformation coefficient are used to calculate the defocus amount ΔL. Instead, a transformation coefficient for associating a shift amount with the distance to an object may be used to directly calculate the distance to the object. An operation of calculating the base length depending on the photographing condition and the positions of the photoelectric conversion units on the imaging surface may be skipped, achieving high-speed calculation of a distance.
In the image-signal correction process S20, a signal having better signal-to-noise (S/N) among the first signal S1 and the second signal S2 is desirably to be subjected to the image-signal correction process. Typically, a signal S contains noise. The noise occurs when, for example, light received by a photoelectric conversion unit is converted into an electric signal. The corrected signal CS1 obtained in the case where the first signal S1 contains noise δn may be expressed by Expression 11.
The term, δn·MTF2/MTF1, is a term representing an adverse effect of noise on the corrected signal CS1. The larger MTF2/MTF1 is, the larger the adverse effect of noise δn is. In particular, when MTF2/MTF1 is larger than 1, the noise is amplified, and the corrected signal CS1 is markedly degraded. Therefore, a signal for correcting an image signal is desirably selected so that a larger one among MTF1 and MTF2 is used as a denominator. Comparison of MTFs is performed in such a manner that the amplitude terms MTF1 and MTF2 of the function obtained by performing the Fourier transform on PSFj normalized with the sum of PSF1 and PSF2 are compared with each other. When MTF is large, a signal obtained by the photoelectric conversion units is increased, resulting in better S/N of the signal. Therefore, a signal having better S/N among the first signal S1 and the second signal S2 is selected, and the image-signal correction process is performed only on the selected signal, whereby the adverse effect of noise may be reduced.
For example, as illustrated in
The image-signal correction filter ICF may be a filter having either one of the amplitude term HM and the phase term HP. That is, as in Expression 12 or 13, the image-signal correction filter ICF may use a filter for correcting only an amplitude or only a phase in the frequency space.
ICF=iFFT{HM} Expression 12
ICF=iFFT{exp[i HP]} Expression 13
Even when such a filter is used, either one of the modulation transfer function and the phase transfer function which form the first signal S1 is made close to a corresponding one of the modulation transfer function and the phase transfer function which form the second signal S2, whereby an error in the shift amount may be reduced. The filters expressed by Expressions 12 and 13 are filters based on the optical transfer function corresponding to the first pupil region and the optical transfer function corresponding to the second pupil region.
In the first embodiment, a method of generating a corrected signal by performing convolution integration on a filter with respect to a signal in the real space is described. Alternatively, the image-signal correction process may be performed in the frequency space. Filter data (data in the braces for the inverse Fourier transform iFFT in Expression 4) in the frequency space may be stored in advance. Then, the obtained signal S1 is subjected to the Fourier transform, and a corrected signal FS1 in the frequency space is generated. The corrected signal FS1 is multiplied by a filter, and is subjected to the inverse Fourier transform, whereby the corrected signal CS1 may be generated. When the filtering is performed, the computation load may be reduced compared with convolution integration, achieving fast and highly accurate ranging.
The transfer functions constituting the image-signal correction filter ICF are not limited to the above-described functions, and may be other functions approximate thereto. Functions approximate to the transfer functions by using a polynomial or the like may be used. The image-signal correction filter ICF generated by using these methods also achieves the effect of correcting an image signal as described above.
The result of ranging performed by the distance determining apparatus according to the present invention may be used, for example, in focus detection in an imaging optical system. The distance determining apparatus according to the present invention achieves high-speed and highly accurate measurement of the distance to an object, and the amount of a shift between the object and the focal position of the imaging optical system may be found. The focal position of the imaging optical system is controlled, whereby the focal position may be adjusted to the object with high speed and high accuracy. An imaging apparatus, such as a digital still camera or a digital video camera, may be provided with the distance determining apparatus according to the first embodiment. On the basis of the distance determination result of the distance determining apparatus, focus detection in an optical system may be achieved. A distance map may be generated by using the distance determining apparatus according to the present invention.
In a second embodiment, an image-signal correction filter different from that in the first embodiment is used. Other than the difference in image-signal correction filter, the second embodiment is the same as the first embodiment. Therefore, the image-signal correction filter used in the second embodiment is described below.
An image-signal correction filter ICF according to the second embodiment has an amplitude adjustment term MM which produces a smaller correction effect when MTF1 is smaller, and which produces a larger correction effect when MTF1 is larger. Specifically, the image-signal correction filter ICF may be expressed by Expressions 14 and 15.
The symbol K represents an adjustment factor, and is a positive real number. The magnitude of K enables the effect of correction of the amplitude and the phase of each of the space frequency components to be adjusted. When MTF1 is small, MM is small. The image-signal correction filter ICF having such MM enables a space frequency component (a main component in the signal S1) having large MTF1 to obtain the effect of correcting an image signal, resulting in reduction in the adverse effect of noise in a space frequency component having small MTF1.
The adjustment factor K may be changed in accordance with the S/N of the signal S1. For example, in the image-signal correction process in step S20 in
In the second embodiment, similarly to the first embodiment, the image-signal correction process may be performed in the frequency space, or the second signal S2 may be subjected to the image-signal correction process. A signal having better S/N among the first signal S1 and the second signal S2 is desirably subjected to the image-signal correction process.
In a third embodiment, the distance determining apparatus according to the first embodiment further includes a determining unit (not illustrated) which determines whether or not the image-signal correction process is to be performed, on the basis of the magnitude of the shift amount calculated by the shift-amount calculating unit 43.
A larger defocus amount and a larger shift amount cause the difference between the shape of the first signal S1 and that of the second signal S2 to be larger. Therefore, a large shift amount produces a large detected error in the shift amount, resulting in degradation in accuracy in ranging. In contrast, a small shift amount produces a small detected error in the shift amount, allowing accuracy in ranging to be maintained. Therefore, as illustrated in
If the shift amount is larger than the threshold, the image-signal correction process (S20) which is the same as that in the first embodiment is performed, and the distance calculation process (S30) is then performed. If the shift amount is equal to or smaller than the threshold, the image-signal correction process (S20) is not performed, and the distance calculation process (S30) is performed by using the provisional shift amount as the shift amount. In the determination process in step S40, the magnitude of the threshold may be determined by comparing a detected error of the shift amount with an allowable error of the shift amount. The allowable error of the shift amount is determined in accordance with the target accuracy in ranging and in accordance with the configuration and the use of the distance determining apparatus.
Provision of the determination process achieves adequate ranging according to an approximate distance to the object (defocus amount), and achieves faster and higher accurate ranging.
In the third embodiment, similarly to the first embodiment, the image-signal correction process may be performed in the frequency space, or the second signal S2 may be subjected to the image-signal correction process. A signal having better S/N among the first signal S1 and the second signal S2 is desirably subjected to the image-signal correction process.
In the above-described embodiments, the example in which the distance to an object is calculated is described. The present invention may be applied to a parallax-amount determining apparatus which determines the parallax amount corresponding to the shift amount. For example, in the parallax-amount determining apparatus, a process of extracting an object located at a position close to the in-focus position from an image may be performed on the basis of the shift amount. The parallax amount may be the amount of a shift between two signals, or may be a physical quantity related to these.
Instead of the distance calculating unit 41 of the distance determining apparatus 40 according to the first embodiment, the parallax-amount determining apparatus includes a parallax-amount calculating unit which calculates a parallax amount corresponding to the amount of a shift between two signals. The other configuration may be the same as that of the distance determining apparatus 40. Specifically, the two signals are a signal which is subjected to the image-signal correction process among the first signal and the second signal, and the other signal which is not subjected to the image-signal correction process among the first signal and the second signal. The parallax-amount determining apparatus may further include an extraction unit which extracts an object having a predetermined parallax amount from an image in accordance with the parallax amount (shift amount).
To achieve the method of determining a parallax amount according to the fourth embodiment, a process of calculating a parallax amount is performed instead of the distance calculating process S30 in the flowchart in
In the fourth embodiment, either one of the first signal and the second signal is also subjected to filtering using the image-signal correction filter, enabling a parallax amount to be determined with high speed and high accuracy.
Similarly to the distance determining apparatuses according to the first to third embodiments, the parallax-amount determining apparatus may be used as a part of the imaging apparatus.
In the fourth embodiment, similarly to the first embodiment, the image-signal correction process may be performed in the frequency space. A signal having better S/N among the first signal S1 and the second signal S2 is desirably subjected to the image-signal correction process.
Certain aspects disclosed in the embodiments of the present invention can be realized by a computer, or one or more circuits (e.g., application specific integrated circuit (ASIC)), of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiments. Specifically, a method or steps thereof may be performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiments and/or by controlling the one or more circuits to perform the functions of one or more of the above-described units. The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2014-074578, filed Mar. 31, 2014, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2014-074578 | Mar 2014 | JP | national |