The present invention relates to a focus detection apparatus and method, electronic device, and storage medium
One of the focus detection methods used in image capturing apparatuses is a so-called on-imaging plane phase difference method, in which at least a part of the pixels of an image sensor are configured as focus detection pixels formed so as to be able to acquire signals having a phase difference, thereby performing phase difference focus detection. As an example of focus detection pixels for such on-imaging plane phase difference focus detection (hereinafter referred to as “on-imaging plane phase difference AF”), Japanese Patent Laid-Open No. 58-24105 discloses an image capturing apparatus using an image sensor in which a plurality of pixels are arranged in two dimensions wherein each pixel is formed with one microlens and a plurality of photoelectric conversion units. The plurality of photoelectric conversion units are configured to receive light transmitted through different exit pupil regions of an imaging lens through one microlens, thereby pupil division is realized. The on-imaging plane phase difference AF can be performed by calculating the image shift amount based on the phase difference between the signals obtained from the plurality of photoelectric conversion units. Also, an image can be acquired from an added signal obtained by adding up the signals of the plurality of photoelectric conversion units for each pixel.
In such an image sensor, if the image sensor has a configuration in which the plurality of photoelectric conversion units are arranged horizontally in each pixel and the pupil division direction is horizontal, in a case where the subject has no change in brightness in the horizontal direction, such as horizontal stripes, the phase difference between signals will be very small, and the focus detection accuracy may be low.
In consideration of the above, Japanese Patent No. 5810196 discloses a technique for improving focus detection accuracy by arranging the photoelectric conversion units of focus detection pixels in two directions, so that the pupil division directions are two. Also, U.S. Pat. No. 9,485,442 discloses a method in which focus detection calculation is performed separately for signals having different pupil division directions.
Here, an arithmetic circuit for focus detection that is configured on the premise of processing a pair of focus detection signals obtained from photoelectric conversion units divided in a certain pupil division direction (e.g., the horizontal direction) cannot process a pair of focus detection signals obtained from photoelectric conversion units divided in a different pupil division direction (e.g., the vertical direction).
The present invention has been made in consideration of the above situation, and processes focus detection signals having parallax in a plurality of different directions using one arithmetic circuit for focus detection.
According to the present invention, provided is a focus detection apparatus comprising one or more processors and/or circuitry which function as: an acquisition unit that acquires a pair of focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a separation unit that separates the focus detection signals for each of the directions of the parallax; a detection unit that detects a focus state based on first focus detection signals, separated by the separation unit, having parallax in a predetermined first direction; and a rearrangement unit that rearranges second focus detection signals, separated by the separation unit, having parallax in a predetermined second direction which is different from the first direction so as to change the direction of the parallax of the second focus detection signals to the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals rearranged by the rearrangement unit.
Further, according to the present invention, provided is a focus detection apparatus comprising one or more processors and/or circuitry which function as: a generation unit that generates a pair of first focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a detection unit that detects a focus state based on the first focus detection signals in a case where a direction of the parallax is a predetermined first direction; and a rearrangement unit that rearranges the first focus detection signals to generate second focus detection signals having parallax in the first direction in a case where the direction of the parallax of the first focus detection signals is a second direction which is different from the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals.
Furthermore, according to the present invention, provided is an electronic device comprising: an image sensor; and a focus detection apparatus comprising one or more processors and/or circuitry which function as: an acquisition unit that acquires a pair of focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a separation unit that separates the focus detection signals for each of the directions of the parallax; a detection unit that detects a focus state based on first focus detection signals, separated by the separation unit, having parallax in a predetermined first direction; and a rearrangement unit that rearranges second focus detection signals, separated by the separation unit, having parallax in a predetermined second direction which is different from the first direction so as to change the direction of the parallax of the second focus detection signals to the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals rearranged by the rearrangement unit.
Further, according to the present invention, provided is an electronic device comprising: an image sensor; and a focus detection apparatus comprising one or more processors and/or circuitry which function as: a generation unit that generates a pair of first focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a detection unit that detects a focus state based on the first focus detection signals in a case where a direction of the parallax is a predetermined first direction; and a rearrangement unit that rearranges the first focus detection signals to generate second focus detection signals having parallax in the first direction in a case where the direction of the parallax of the first focus detection signals is a second direction which is different from the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals.
Further, according to the present invention, provided is a focus detection method comprising: acquiring a pair of focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; separating the focus detection signals for each of the directions of the parallax; detecting a focus state based on separated first focus detection signals having parallax in a predetermined first direction; rearranging separated second focus detection signals having parallax in a predetermined second direction which is different from the first direction so as to change the direction of the parallax of the second focus detection signals to the first direction; and detecting a focus state based on the rearrangement second focus detection signals.
Further, according to the present invention, provided is a focus detection method comprising: generating a pair of first focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; rearranging the first focus detection signals to generate second focus detection signals having parallax in the first direction in a case where the direction of the parallax of the first focus detection signals is a second direction which is different from the first direction; detecting a focus state based on the first focus detection signals in a case where a direction of the parallax is the first direction, and detecting a focus state based on the second focus detection signals in a case where a direction of the parallax is the second direction.
Further, according to the present invention, provided is a non-transitory computer-readable storage medium, the storage medium storing a program that is executable by the computer, wherein the program includes program code for causing the computer to function as a focus detection apparatus comprising: an acquisition unit that acquires a pair of focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a separation unit that separates the focus detection signals for each of the directions of the parallax; a detection unit that detects a focus state based on first focus detection signals, separated by the separation unit, having parallax in a predetermined first direction; and a rearrangement unit that rearranges second focus detection signals, separated by the separation unit, having parallax in a predetermined second direction which is different from the first direction so as to change the direction of the parallax of the second focus detection signals to the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals rearranged by the rearrangement unit.
Further, according to the present invention, provided is a non-transitory computer-readable storage medium, the storage medium storing a program that is executable by the computer, wherein the program includes program code for causing the computer to function as a focus detection apparatus comprising: a generation unit that generates a pair of first focus detection signals having parallax in one of a plurality of different directions for each pixel from signals of a plurality of pixels output from an image sensor; a detection unit that detects a focus state based on the first focus detection signals in a case where a direction of the parallax is a predetermined first direction; and a rearrangement unit that rearranges the first focus detection signals to generate second focus detection signals having parallax in the first direction in a case where the direction of the parallax of the first focus detection signals is a second direction which is different from the first direction, wherein the detection unit further detects a focus state based on the second focus detection signals.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention, and together with the description, serve to explain the principles of the invention.
Hereinafter, embodiments will be described in detail with reference to the attached drawings. Note, the following embodiments are not intended to limit the scope of the claimed invention, and limitation is not made to an invention that requires a combination of all features described in the embodiments. Two or more of the multiple features described in the embodiments may be combined as appropriate. Furthermore, the same reference numerals are given to the same or similar configurations, and redundant description thereof is omitted.
In
A third lens group 105 (focus lens) carries out focus adjustment by moving forward and backward along the optical axis. A low-pass optical filter 106 is an optical element for reducing false color and moiré of a sensed image. An image sensor 107 is composed of a two-dimensional CMOS photo sensor and the surrounding circuitry, and disposed on an imaging plane of the imaging optical system.
A zoom actuator 111 carries out a magnification-change operation by rotation of a cam barrel, not shown, to move the first lens group 101 through the second lens group 103 forward and backward along the optical axis. An aperture-shutter actuator 112 controls the diameter of the opening of the aperture-shutter 102 and adjusts the amount of light for image shooting, and also controls the exposure period during still image shooting. A focus actuator 114 moves the third lens group 105 forward and backward along the optical axis to adjust the focus.
As an electronic flash 115 for illuminating a subject during image shooting, a flash illumination device that uses a Xenon tube is preferable, but an illumination device comprised of a continuous-flash LED may also be used. An AF auxiliary flash unit 116 projects an image of a mask having a predetermined opening pattern onto a subject field through a projective lens to improve focus detection capability with respect to dark subjects and low-contrast subjects.
A CPU 121 controls the camera main body in various ways within the image capturing apparatus. The CPU 121 may, for example, have a calculation unit, ROM, RAM, A/D converter, D/A converter, communication interface circuitry, and so forth. In addition, the CPU 121, based on predetermined programs stored in the ROM, actuates the various circuits that the camera has, and executes a series of operations of AF, image shooting, image processing, and recording.
An electronic flash control circuit 122 controls light emission of the electronic flash 115 in synchronization with an image shooting operation. An auxiliary flash circuit 123 controls firing of the AF auxiliary flash unit 116 in synchronization with a focus detection operation. An image sensor actuation circuit 124 controls the image shooting operation of the image sensor 107 as well as A/D-converts an image signal read out from the image sensor 107 and transmits the converted image signal to the CPU 121. An image processing circuit 125 performs such processing as y conversion, color interpolation, JPEG compression and the like on an image signal acquired from the signal read out from the image sensor 107.
A focus actuation circuit 126 controls the actuation of the focus actuator 114 based on the focus detection result to move the third lens group 105 reciprocally in the optical axis direction, thereby performing focus adjustment. An aperture-shutter actuation circuit 128 controls the actuation of the aperture-shutter actuator 112, thereby actuating the opening of the aperture-shutter 102. A zoom actuation circuit 129 actuates the zoom actuator 111 in accordance with the zoom operation by the user.
A display device 131, such as an LCD, displays information relating to the image shooting mode of the camera, preview images before image shooting, confirmation images after image shooting, and focus state display images during focus detection, and so forth. An operating switch group 132 is composed of a power switch, a release (image shooting trigger) switch, a zoom operation switch, an image shooting mode selection switch, and so on. A detachable flash memory 133 records captured images.
A pixel group 200 includes pixels of 2 columns×2 rows, and a pixel 200R having an R (red) spectral sensitivity is arranged at the upper left position, a pixel 200Ga having a G (green) spectral sensitivity is arranged at the upper right position, a pixel 200Gb having a structure of the pixel 200Ga rotated by 90 degrees is arranged at lower left position, and a pixel 200B having a B (blue) spectral sensitivity is arranged at the lower right position. Each of the pixels 200R, 200Ga and 200B is formed from a first focus detection pixel 201 and a second focus detection pixel 202 arrayed in 2 columns×1 row, and the pixel 200Gb is formed from the first focus detection pixel 201 and the second focus detection pixel 202 arrayed in 1 column×2 rows.
A number of the pixel groups each having the array of 2 (columns)×2 (rows) pixels shown in
Each of the photoelectric conversion units 301 and 302 may be formed as a pin structure photodiode including an intrinsic layer between a p-type layer and an n-type layer or a p-n junction photodiode without an intrinsic layer, as needed.
In the pixel 200Ga, a color filter 306 is formed between the microlens 305 and the photoelectric conversion units 301 and 302. Furthermore, the spectral transmittance of the color filter 306 can be changed for each pixel or each photoelectric conversion unit, as necessary. Also, the color filter may be omitted.
Light that has entered the pixel 200Ga shown in
The pixels 200R and 200B shown in
The correspondence between pupil division and the pixel structure according to this embodiment shown in
A first partial pupil region 501 is almost conjugate with the light receiving surface of the photoelectric conversion unit 301 having a center of gravity decentered in the −x direction via the microlens 305, and represents a pupil region which passes light that can be received by the photoelectric conversion unit 301. The first partial pupil region 501 has a center of gravity decentered to the +x side on the pupil plane.
Further, a second partial pupil region 502 is almost conjugate with the light receiving surface of the photoelectric conversion unit 302 having a center of gravity decentered in the +x direction via the microlens 305, and represents a pupil region which passes light that can be received by the photoelectric conversion unit 302. The second partial pupil region 502 has a center of gravity decentered to the −x side on the pupil plane.
Further, a pupil region 500 is a pupil region which passes light that can be received by the photoelectric conversion units 301 and 302 of the entire pixel 200Ga.
In the following explanation, the pixels having the photoelectric conversion units 301 and 302 divided in the horizontal direction, such as the pixel 200Ga, pixel 200R, and pixel 200B, are referred to as “horizontally divided pixels.” Also, the pixels having the photoelectric conversion units 301 and 302 divided in the vertical direction, such as the pixel 200Gb, are referred to as “vertically divided pixels.”
As described above with reference to
In the image sensor 107 of the present embodiment, each pixel is configured from the first focus detection pixel 201 including the photoelectric conversion unit 301 and the second focus detection pixel 202 including the photoelectric conversion unit 302, but the present invention is not limited to this. For example, an imaging pixel having an undivided photoelectric conversion unit, a first focus detection pixel, and a second focus detection pixel may each be configured as separate pixel configurations, and the first focus detection pixel and the second focus detection pixel may be discretely arranged in the imaging pixel array.
In each pixel having the configuration as explained with reference to
Then, a signal (hereinafter referred to as a “horizontal A image”) is generated by collecting A signals (hereinafter referred to as a “horizontal A signal”) from the horizontally divided pixels, and a signal (hereinafter referred to as a “horizontal B image”) is generated by collecting B signals (hereinafter referred to as a “horizontal B signal”) from the horizontally divided pixels. Then, focus detection is performed based on the phase difference between the generated horizontal A image and horizontal B image. Also, a signal (hereinafter referred to as a “vertical A image”) is generated by collecting A signals (hereinafter referred to as a “vertical A signal”) from the vertically divided pixels, and a signal (hereinafter referred to as a “vertical B image”) is generated by collecting B signals (hereinafter referred to as a “vertical B signal”) from the vertically divided pixels, and focus detection is performed based on the phase difference between the generated vertical A image and vertical B image. Note, in the following description, when describing processing common to the horizontal and vertical directions, the terms “A signal” and “B signal”, “A image” and “B image” are used.
Next, the relationship between a defocus amount and an image shift amount between the A image and the B image obtained from the image sensor 107 of this embodiment will be described.
Let the magnitude of a distance from an imaging position of a subject to the imaging surface 800 be |d|, then the defocus amount d is defined as a negative value (d<0) in a front-focused state in which the imaging position of the subject is closer to the subject than the imaging surface 800, and is defined as a positive value (d>0) in a rear-focused state in which the imaging position of the subject is on the opposite side of the subject with respect to the imaging surface 800. d=0 holds in a focus state in which the imaging position of the subject is at the imaging surface 800 (in-focus position). In
In the front-focused state (d<0), subject light passed through the first partial pupil region 501 among the luminous flux from the subject 802 converges once, then spreads to the width Γ1 around the center of gravity position G1 of the luminous flux, and a blurred image is formed on the imaging surface 800. The same applies to the subject light that has passed through the second partial pupil region 502, and a blurred image spreading to the width Γ2 is formed around the center of gravity position G2. The blurred image is received by the first focus detection pixels 201 and the second focus detection pixels 202 constituting respective pixels arranged in the image sensor 107, and the A image and the B image are generated from the obtained photoelectric signals. Therefore, the A image and the B image are recorded as the subject image in which the object 802 is blurred in the widths Γ1 and Γ2 around the center of gravity positions G1 and G2 on the imaging surface 800.
As the magnitude |d| of the defocus amount d increases, the blur widths Γ1 and Γ2 of the subject image increase substantially proportionally. Similarly, the magnitude |p| of the image shift amount p (=the difference between the center of gravity positions G1 and G2 of the luminous fluxes) between the A image and the B image also increases roughly in proportion to the magnitude |d| of the defocus amount d as it increases. The similar relationship holds in the rear-focused state (d>0) although the image shift direction of the image of the subject between the first focus detection signal and the second focus detection signal is opposite to that in the front-focused state.
Thus, the image shift amount p calculated from the A image and the B image is roughly proportional to the defocus amount d, so the defocus amount d can be calculated from the image shift amount p by using a conversion coefficient that is calculated in advance based on the baseline length.
Next, the configuration of the image processing circuit 125 in this embodiment will be described with reference to
First, the A signals and the B signals obtained by reading out signals from image sensor 107 are stored in a memory 1251 in the image processing circuit 125.
The A signals and B signals may be stored in a memory (not shown) that is normally provided in an image capturing apparatus, and read out by the image processing circuit 125 as needed.
Next, a separation circuit 1252 separates the first and second focus detection signals arranged as shown in
In addition, in the arrangement of the horizontal A signal 601 and the horizontal B signal 602 after separation as shown in
Then, the horizontal A signal 601 and the horizontal B signal 602 are output to a shading correction circuit 1253, and the vertical A signal 603 and the vertical B signal 604 are output to a shading correction circuit 1255.
The shading correction circuit 1253 performs shading correction on the input horizontal A signal 601 and horizontal B signal 602.
The difference in the signal amount between the A signal and the B signal that occurs depending on the image height when the exit pupil distance and the pupil distance of the image sensor are different is called shading. It is known that good focus detection is possible by performing shading correction and reducing the difference between the A signal and the B signal. Note that, as the shading correction in this embodiment, a known method such as the method described in Japanese Patent Laid-Open No. 2016-57474 can be used, and therefore a detailed description will be omitted.
A different color mixing circuit 1254 performs different color mixing processing on the shading-corrected horizontal A signal 601 and horizontal B signal 602. In this embodiment, this processing involves smoothing processing in the correlation direction (horizontal direction) and adding processing of two or more pixels in the direction perpendicular to the correlation direction. First, by performing smoothing processing in the correlation direction (for example, with a 1-1 filter or a 1-2-1 filter), colors are mixed in the correlation direction, and then signals from two or more pixels are added in the direction perpendicular to the correlation direction to mix colors in the vertical direction, thereby generating a horizontal YA signal and a horizontal YB signal, respectively. This processing leaves the number of the horizontally divided pixels unchanged, and reduces the number of the horizontally divided pixels in the vertical direction to ½ or less.
A horizontal YA signal and a horizontal YB signal generated by the different color mixing circuit 1254 are sent to a correlation calculation circuit 1258. The correlation calculation circuit 1258 generates a horizontal A image and a horizontal B image from the horizontal YA signal and horizontal YB signal, and finds a correlation value by a known method while shifting the relative positions of the horizontal A image and the horizontal B image. The shift amount at which the correlation value showing the highest correlation is obtained is regarded as the image shift amount, and the found image shift amount is converted into a defocus amount using a conversion coefficient. The image shift amount and defocus amount obtained here indicate the focus state.
The CPU 121 then finds a correction value for actuating the focus actuator 114 based on the found defocus amount, and sends it to the focus actuation circuit 126.
On the other hand, the separated vertical A signal 603 and vertical B signal 604 are subjected to shading correction in the shading correction circuit 1255 in the same manner as in the shading correction circuit 1253. The shading-corrected vertical A signal 603 and vertical B signal 604 are sent to a row interpolation circuit 1256.
The row interpolation circuit 1256 performs interpolation processing in the column direction and sends the interpolated vertical A signal 603 and vertical B signal 604 to a rearrangement processing circuit 1257.
In the first embodiment, the vertical A signals and vertical B signals are only signals output from the pixels 200Gb, which are vertically divided pixels, and in the vertical direction, which is the correlation direction, the signals of the row of the pixels 200R are missing, which raises concerns about a decrease in detection accuracy. Therefore, in order to improve focus detection accuracy in the vertical direction, it is necessary to match the pixel spacing of the focus detection signal with the pixel spacing in the horizontal direction. Therefore, the vertical A signals and vertical B signals corresponding to the positions of the R pixels are vertically interpolated from the vertical A signals and vertical B signals of the adjacent Gb pixels.
This interpolation method is shown in
Note that since only green (G) signals are included in the vertical A and vertical B signals, it is not necessary to generate a Y signal. However, if the vertical A and vertical B signals are output from pixels of multiple colors due to the arrangement of color filters, a Y signal is generated.
The row-interpolated vertical A signals and vertical B signals are sent to the rearrangement processing circuit 1257, where they are rearranged.
The rearrangement processing of array is to be performed so that the pupil division direction of the horizontal A signals and the horizontal B signals and the pupil division direction of the vertical A signals and the vertical B signals coincide with each other, it is more efficient to perform the rearrangement processing of array for the focus detection signal array of the pupil division direction constituted with a smaller number of pixels, and therefore in this embodiment, the rearrangement processing of array is performed on the vertical A signals and the vertical B signals. Since the pupil division directions are the horizontal and vertical directions which are orthogonal to each other, transposition processing is performed as the rearrangement processing.
First, in step S101, the A signal output from the first focus detection pixel 201 of the image sensor 107 and the B signal output from the second focus detection pixel 202 are acquired and stored in the memory 1251 of the image processing circuit 125.
Next, in step S102, the A signal and B signal stored in the memory 1251 are separated by separation circuit 1252 into the horizontal A signal and horizontal B signal, and the vertical A signal and vertical B signal.
Next, in step S103, the horizontal A signal and the horizontal B signal are output to the shading correction circuit 1253, the vertical A signal and the vertical B signal are output to the shading correction circuit 1255, and shading correction processing is performed in steps S104 and S106, respectively.
Then, in step S105, the different color mixing circuit 1254 performs the above-mentioned different color mixing processing to reduce the data amount of the horizontal A signal and the horizontal B signal, and generates the horizontal YA signal and the horizontal YB signal. Note, if the detection signal is of a single color, this processing is not necessary. Also, if a column of a specific color signal is thinned out during reading out the signals, a signal in the thinned column may be interpolated with the average value of the left and right columns to improve the detection accuracy in the horizontal direction. After the different color mixing processing, the process proceeds to step S109.
On the other hand, in step S107, the row interpolation circuit 1256 performs row interpolation processing on the vertical A signal and the vertical B signal as described with reference to
Thereafter, in step S108, the rearrangement processing circuit 1257 performs the rearrangement processing on the vertical A signal and vertical B signal undergone the interpolation processing as described with reference to
In step S109, in order to increase the correlation (degree of coincidence of signals) and improve the focus detection accuracy, the correlation calculation circuit 1258 performs filter processing on the A signal and the B signal using a band-pass filter that extracts a specific frequency band. Examples of band-pass filters include differential filters such as {1, 4, 4, 4, 0, −4, −4, −4, −1} that cut off DC components and perform edge extraction, and additive filters such as {1, 2, 1} that suppress high-frequency noise components.
Next, in step S109, shift processing of relatively shifting the first focus detection signal and the second focus detection signal undergone the filter processing in the pupil division direction is performed, and a correlation amount indicating the degree of coincidence of the signals is calculated.
Let the kth A signal after the filter processing be A(k), the kth B signal be B(k), and the range of the number k corresponding to the focus detection area be W, the shift amount by the shift processing be s, and the shift range of the shift amount s be Γ, then the correlation amount COR is calculated using the formula (1).
By shifting by the shift amount s, the difference between the kth A signal (k) and the k−sth B signal (k−s) is taken to generate a shift subtraction signal. The absolute value of the generated shift subtraction signal is calculated, and the sum of the shift subtraction signals of the number k within the range W corresponding to the focus detection area is taken to calculate the correlation amount COR(s). If necessary, the correlation amount calculated for each row may be added across multiple rows for each shift amount.
Then, in step S110, a real value of a shift amount at which the correlation amount becomes the minimum is calculated from the correlation amounts by sub-pixel calculation, and this is taken as the image shift amount p. The image shift amount p is then multiplied by a conversion coefficient K to obtain a defocus amount d.
In this way, by performing rearrangement processing of array on the focus detection signals output from vertically divided pixels, it is possible to use the same circuit to perform processing, from filter processing to calculation of the defocus amount, on focus detection signals that have been pupil-divided in both the horizontal and vertical directions.
As described above, according to the first embodiment, it is possible to process focus detection signals divided in different pupil directions using a common circuit, thereby making it possible to reduce the circuit scale.
Next, a second embodiment of the present invention will be described.
In a readout mode in which rows are thinned and read out from the image sensor 107 (for example, an image for flicker detection), if focus detection is to be performed using focus detection signals output from the vertically divided pixels, there is a concern that focus detection performance will be degraded because image shifts in the thinned signals cannot be detected.
In consideration of the above concern, in the second embodiment, in a case where focus detection is performed while switching between multiple readout modes, vertical focus detection is performed in a readout mode in which signals are read out without vertical thinning, and vertical focus detection is not performed in a readout mode in which signals are read out with vertical thinning.
The configuration of the image capturing apparatus is similar to that described with reference to
First, in step S201, it is determined whether the mode is the thinning readout mode. If the mode is the thinning readout mode, the process proceeds to step S202, and if the mode is not the thinning readout mode (if the mode is all-pixel readout mode), the process proceeds to step S101, and thereafter, the processes described with reference to
In step S202, the horizontal A signal output from the first focus detection pixels 201 of the image sensor 107 and the horizontal B signal output from the second focus detection pixels 202 are acquired and stored in the memory 1251 of the image processing circuit 125.
In step S203, the shading correction circuit 1253 performs shading correction processing on the horizontal A signal and the horizontal B signal to make their intensities uniform.
In step S204, the different color mixing circuit 1254 performs the above-mentioned different color mixing processing to reduce the data amount of the horizontal A signal and the horizontal B signal, generates the horizontal YA signal and the horizontal YB signal, and the process proceeds to step S109. Note that if the horizontal A signal and the horizontal B signal are of a single color, the different color mixing processing is not necessary. Also, if columns of a specific color signal are thinned out, the signal of the thinned columns may be interpolated using the average value of the horizontal A signal and the horizontal B signal of the left and right columns, respectively, in order to improve the detection accuracy in the horizontal direction.
In this way, the same circuit is used for the horizontal focus detection signals in the thinning readout mode and the horizontal and vertical focus detection signals in the all-pixel readout mode to perform processing from filtering to calculation of the defocus amount.
As described above, according to the second embodiment, even if focus detection is performed while switching between a readout mode in which focus detection in the vertical direction is performed and a readout mode in which focus detection in the vertical direction is not performed, it is possible to process the focus detection using a common circuit, thereby making it possible to reduce the circuit size.
Next, a third embodiment of the present invention will be described.
In the third embodiment, focus detection is performed using focus detection signals in which the pupil is divided in a third direction (e.g., a direction tilted by 45 degrees) in addition to the horizontal and vertical pupil division directions.
Note that the configuration of the image capturing apparatus is similar to that described with reference to
The schematic arrangement of the imaging pixels and focus detection pixels of the image sensor 107 in the third embodiment is shown in
A pixel group 700 is composed of 2 rows and 2 columns of pixels, with a pixel 700R having a spectral sensitivity of R (red) arranged in the upper left, a pixel 700Ga having a spectral sensitivity of G (green) arranged in the upper right, a pixel 700Gb arranged in the lower left, and a pixel 700B having a spectral sensitivity of B (blue) arranged in the lower right. Furthermore, each pixel is composed of a first focus detection pixel 701, a second focus detection pixel 702, a third focus detection pixel 703, and a fourth focus detection pixel 704.
By arranging a large number of pixel groups 700 of 2 columns×2 rows shown in
For generating focus detection signals where the pupil division direction is horizontal, the outputs from the first focus detection pixel 701 and the second focus detection pixel 702 of each pixel are added together to generate a horizontal A signal, and the outputs from the third focus detection pixel 703 and the fourth focus detection pixel 704 are added together to generate a horizontal B signal.
In addition, for generating focus detection signals where the pupil division direction is vertical, the outputs from the second focus detection pixel 702 and the third focus detection pixel 703 of each pixel are added together to generate a vertical A signal, and the outputs from the first focus detection pixel 701 and the fourth focus detection pixel 704 are added together to generate a vertical B signal.
Furthermore, for generating focus detection signals where a pupil division direction is at a diagonal angle of 45 degrees, the output from the first focus detection pixel 701 of each pixel is used as an A signal (hereinafter referred to as a “diagonal A signal”), and the output from the third focus detection pixel 703 is used as a B signal (hereinafter referred to as a “diagonal B signal”). Alternatively, the output from the second focus detection pixel 702 may be used as a diagonal A signal, and the output from the fourth focus detection pixel 704 may be used as a diagonal B signal.
Furthermore, by adding up the outputs from the first to fourth focus detection pixels 701 to 704 for each pixel of the image sensor 107, an imaging signal (captured image) with a resolution of N effective pixels is generated.
An example of m×n focus detection signals having a pupil division direction of the diagonal angle of 45 degrees, generated in the third embodiment, is shown in
Next, the configuration of the image processing circuit 125 in the third embodiment will be described with reference to
First, an A signal and a B signal obtained by reading out signals from the image sensor 107 are held in the memory 1251 in the image processing circuit 125. In the third embodiment, horizontal A signal and horizontal B signal, or vertical A signal and vertical B signal, or diagonal A signal and diagonal B signal are obtained depending on the combination of the outputs of the first to fourth focus detection pixels 701 to 704 during reading out signals.
The shading correction circuit 1253 performs shading correction on the input A signal and B signal. After that, the different color mixing circuit 1254 performs different color mixing processing on the shading-corrected A signal and B signal to generate the YA signal and YB signal. The generated YA signal and YB signal are sent to a switching unit 1260, and if the focus detection direction is the horizontal direction, the signals are output to the correlation calculation circuit 1258. On the other hand, if the focus detection direction is the vertical direction or a diagonal direction of 45 degrees, the YA signal and YB signal are output to the rearrangement processing circuit 1257.
In the rearrangement processing circuit 1257, if the focus detection direction is the vertical direction, the signal arrangement is converted as described with reference to
First, in step S301, the A signal and B signal are generated from the signals obtained from the first to fourth focus detection pixels 701 to 704 of each pixel of the image sensor 107, with pupil division in the horizontal direction, vertical direction, or diagonal direction of 45 degrees as described above, and are stored in the memory 1251 of the image processing circuit 125. Then, in step S302, shading correction is performed on the A signal and B signal by the shading correction circuit 1253, and in step S303, the YA signal and YB signal are generated by the different color mixing circuit 1254. In the third embodiment, first and second focus detection signals are obtained for every pixel by dividing the pupil in the horizontal direction, vertical direction, or diagonal direction of 45 degrees, and therefore, unlike the first and second embodiments, there is no need to interpolate signals lost due to the separation.
Next, in step S304, the direction in which focus detection is to be performed is determined. If the determined direction is the horizontal direction, the process proceeds to step S108, if the determined direction is the vertical direction, the process proceeds to step S305, and if the determined direction is a diagonal direction of 45 degrees, the process proceeds to step S306.
In step S305, the rearrangement processing is performed on the A signal and B signal by the rearrangement processing circuit 1257, as described with reference to
In step S306, the rearrangement processing is performed on the A signal and B signal by the rearrangement processing circuit 1257, as described with reference to
In this way, by performing the rearrangement processing of array on focus detection signals having a pupil division direction other than the horizontal and vertical directions, it becomes possible to perform focus detection calculations using a common circuit.
As described above, according to the third embodiment, it is possible to process focus detection signals divided in different pupil directions using a common circuit, making it possible to reduce the circuit scale.
Note that in the above-mentioned third embodiment, the image sensor 107 having the configuration shown in
The present invention may be applied to a system made up of a plurality of devices, or to an apparatus made up of a single device.
Embodiment(s) of the present invention can also be realized by a computer 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 embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method 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 embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). 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. 2023-131462, filed Aug. 10, 2023 which is hereby incorporated by reference herein in its entirety.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2023-131462 | Aug 2023 | JP | national |