Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium that correct a parallax image based on a correction value calculated using a captured image
10771762 ยท 2020-09-08
Assignee
Inventors
Cpc classification
H04N13/232
ELECTRICITY
H04N25/61
ELECTRICITY
H04N23/67
ELECTRICITY
H04N25/704
ELECTRICITY
International classification
H04N13/232
ELECTRICITY
G03B35/10
PHYSICS
Abstract
An image processing apparatus includes an acquisition unit that acquires a parallax image generated based on a signal from one of a plurality of photoelectric converters that receive light beams passing through partial pupil regions of an imaging optical system different from each other, and a captured image generated by combining a plurality of signals from the plurality of photoelectric converters. A determination unit determines whether the parallax image contains a defect, and an image processing unit corrects, if the determination unit determines that the parallax image contains the defect, one or more pixel values of the parallax image that include the defect, using the captured image to calculate a correction value for each of the one or more pixels in the parallax image, and replaces the one or more pixels in the parallax image with the corresponding correction value.
Claims
1. An image processing apparatus comprising: (A) a memory storing instructions; (B) one or more processors that execute the instructions stored in the memory; and (C) an image processing circuit that, based on the instructions executed by the one or more processors, is configured to function as: (a) an acquisition unit configured to acquire (i) a parallax image generated based on a signal from one of a plurality of photoelectric converters that receive light beams passing through partial pupil regions of an imaging optical system different from each other, and (ii) a captured image generated by combining a plurality of signals from the plurality of photoelectric converters; (b) a determination unit configured to determine whether the parallax image contains a defect; (c) an image processing unit configured (i) to calculate a correction value by using pixel values of the captured image corresponding to the defect determined by the determination unit, and (ii) to correct one or more pixel values of the parallax image that include the defect with the corresponding correction value; and (d) a storage unit configured to store the parallax image corrected by the image processing unit in a storage medium.
2. The image processing apparatus according to claim 1, wherein the determination unit determines whether the parallax image contains the defect by comparing the parallax image with the captured image.
3. The image processing apparatus according to claim 2, wherein the image processing unit corrects the pixel value of the parallax image at a first position that contains the defect, based on a comparison of the pixel value of the parallax image with a pixel value of the captured image at the first position.
4. The image processing apparatus according to claim 3, wherein the image processing unit corrects the pixel value of the parallax image at the first position based on the pixel value of the captured image at the first position, a pixel value of the parallax image at a second position that does not contain a defect, and a pixel value of the captured image at the second position.
5. The image processing apparatus according to claim 4, wherein the second position is a position adjacent to the first position in a predetermined direction.
6. The image processing apparatus according to claim 4, wherein, when a luminance value of one of the pixel value of the parallax image and the pixel value of the captured image at the second position is less than a predetermined luminance value, the image processing unit replaces the pixel value of the parallax image with the predetermined luminance value.
7. The image processing apparatus according to claim 6, wherein the predetermined luminance value is set to change depending on a number of partial pupil regions.
8. The image processing apparatus according to claim 6, wherein the predetermined luminance value is set to change depending on the first position.
9. The image processing apparatus according to claim 6, wherein the predetermined luminance value is set to change depending on imaging condition information.
10. The image processing apparatus according to claim 9, wherein the imaging condition information includes at least one of an International Organization of Standardization (ISO) speed, an F-number of the imaging optical system, and an exit pupil distance.
11. The image processing apparatus according to claim 3, wherein the memory is configured to store defect information on the first position, and wherein the image processing unit corrects the parallax image based on the stored defect information.
12. The image processing apparatus according to claim 3, further comprising (D) an inspector configured to inspect defect information on the first position, wherein the image processing unit corrects the parallax image based on the defect information.
13. The image processing apparatus according to claim 1, wherein the parallax image is generated by collecting light receiving signals from a plurality of subpixels included in the one photoelectric converter, of the plurality of photoelectric converters, for each of the partial pupil regions in the imaging optical system, the partial pupil regions being different from each other, and wherein the captured image is generated by collecting light receiving signals from all subpixels included in the plurality of photoelectric converters.
14. The image processing apparatus according to claim 1, wherein the parallax images include a first parallax image and a second parallax image, which correspond to light beams passing through the partial pupil regions in the imaging optical system, the partial pupil regions being different from each other, wherein the acquisition unit acquires the captured image and the first parallax image, among the parallax images, from an image pickup element including the plurality of photoelectric converters, and wherein the image processing unit is further configured: (iii) to correct the first parallax image, among the parallax images; and (iv) to generate the second parallax image by subtracting the corrected first parallax image from the captured image.
15. The image processing apparatus according to claim 1, wherein the image processing unit performs refocus process for the captured image based on the corrected parallax image.
16. The image processing apparatus according to claim 1, wherein the image processing unit performs a light amount correction process for the parallax image based on the captured image.
17. The image processing apparatus according to claim 16, wherein the image processing unit performs the light amount correction process for the parallax image based on the captured image for each color of the parallax image based on the captured image.
18. The image processing apparatus according to claim 16, wherein the image processing unit performs the light amount correction process for the parallax image based on a projection signal of the captured image and a projection signal of the parallax image.
19. The image processing apparatus according to claim 16, wherein the image processing unit corrects the parallax image after the light amount correction process is performed, based on the captured image, after the light amount correction process is performed for the parallax image.
20. An image pickup apparatus comprising: (A) an image pickup element including a plurality of arrayed pixels that include a plurality of photoelectric converters that receive light beams passing through partial pupil regions in an imaging optical system, the partial pupil regions being different from each other; (B) a memory storing instructions; (C) one or more processors that execute the instructions stored in the memory; and (D) an image processing circuit that, based on the instructions executed by the one or more processors, is configured to function as: (a) an acquisition unit configured to acquire (i) a parallax image generated based on a signal from one of the plurality of photoelectric converters, and (ii) a captured image generated by combining signals from the plurality of photoelectric converters; (b) a determination unit configured to determine whether the parallax image contains a defect; (c) an image processing unit configured (i) to calculate a correction value by using pixel values of the captured image corresponding to the defect determined by the determination unit, and (ii) to correct one or more pixel values of the parallax image that include the defect with the corresponding correction value; and (d) a storage unit configured to store the parallax image corrected by the image processing unit in a storage medium.
21. The image pickup apparatus according to claim 20, wherein the image pickup element includes the plurality of photoelectric converters for a single micro lens, and the micro lens is two-dimensionally arrayed.
22. An image processing method comprising the steps of: acquiring (i) a parallax image generated based on a signal from one of a plurality of photoelectric converters that receive light beams passing through partial pupil regions of an imaging optical system different from each other, and (ii) a captured image generated by combining a plurality of signals from the plurality of photoelectric converters; determining whether the parallax image contains a defect; calculating a correction value by using pixel values of the captured image corresponding to the defect determined by the determining; correcting one or more pixel values of the parallax image that include the defect with the corresponding correction value; and storing the parallax image corrected by the correcting in a storage medium.
23. A non-transitory computer-readable storage medium storing a program that causes a computer to execute an image processing method comprising the steps of: acquiring (i) a parallax image generated based on a signal from one of a plurality of photoelectric converters that receive light beams passing through partial pupil regions of an imaging optical system different from each other, and (ii) a captured image generated by combining a plurality of signals from the plurality of photoelectric converters; determining whether the parallax image contains a defect; calculating a correction value by using the pixel values of the captured image corresponding to the defect determined by the determining; correcting one or more pixel values of the parallax image with the corresponding correction value; and storing the parallax image corrected by correcting in a storage medium.
24. The image processing apparatus according to claim 1, wherein the correction value Ac(i, j), for a pixel at a position i, j in the parallax image, is calculated using a pixel value A(i, j) of the parallax image and a pixel value I(i, j) of the captured image, in the following expression:
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
(31)
(32)
(33)
(34)
(35)
DESCRIPTION OF THE EMBODIMENTS
(36) Exemplary embodiments of the present invention will be described below with reference to the accompanied drawings.
First Embodiment
(37) Referring now to
(38) A first lens unit 101 is disposed at the forefront side (object side) among a plurality of lens units that constitute an imaging lens (imaging optical system), and is held on a lens barrel so as to move back and forth in a direction of an optical axis optical axis (OA) direction. A stop/shutter 102 (aperture stop) adjusts its opening diameter to control a light amount in capturing an image, and also functions as a shutter to control an exposure time in capturing a still image. A second lens unit 103 moves integrally with the stop/shutter 102 back and forth in the OA direction, and has a zoom function for a magnification-varying operation in conjunction with the back-and-forth motion of the first lens unit 101. A third lens unit 105 is a focus lens unit that moves back and forth in the optical axis direction for focusing (a focus operation). An optical lowpass filter 106 is an optical element that reduces a false color or a moire of a captured image (captured image).
(39) An image pickup element 107 (image sensor) performs a photoelectric conversion of an object image (optical image) formed by the imaging optical system, and, for example, includes a complementary metal oxide semiconductor (CMOS) sensor, or a charge coupled device (CCD) sensor, and its peripheral circuit. As the image pickup element 107, for example, a two-dimensional single plate color sensor is used, which includes a primary color mosaic filter having a Bayer array formed on light receiving pixels having m pixels in a horizontal direction and having n pixels in a vertical direction in an on-chip configuration.
(40) A zoom actuator 111 rotationally moves (drives) an unillustrated cam cylinder to move the first lens unit 101 and the second lens unit 103 along the optical axis direction for the magnification-varying operation. The stop/shutter actuator 112 controls the opening diameter of the stop/shutter 102 to adjust the light amount (imaging light amount) and also controls the exposure time in capturing the still image. A focus actuator 114 moves the third lens unit 105 in the optical axis direction for focusing.
(41) An electronic flash 115 is an illumination device to be used for illuminating the object. The electronic flash 115 can use a flash illumination device that includes a xenon tube or an illumination device that includes a light emitting diode (LED) continuously emitting light. An auto focus (AF) auxiliary lighting unit 116 projects an image of a mask having a predetermined opening pattern onto the object via a projection lens. This configuration can improve a focus detection capability for a dark object or an object with a low contrast.
(42) A central processing unit (CPU) 121 is a control apparatus (control unit or controller) that governs various controls over the image pickup apparatus 100. The CPU 121 includes a processor, a read only memory (Rom), a random access memory (RAM), and analog/digital (A/D) converter, a digital/analog (D/A) converter, a communication interface circuit, and the like. The CPU 121 reads out and executes a predetermined program stored in the ROM to drive various circuits of the image pickup apparatus 100 and to perform a series of operations, such as focus detection (AF), imaging (photographing), image processing, or recording.
(43) An electronic flash control circuit 122 controls lighting on and off of the electronic flash 115 in synchronization with the imaging operation. An auxiliary light driving circuit 123 controls lighting on and off of the AF auxiliary lighting unit 116 in synchronization with the focus detection operation. An image pickup element driving circuit 124 controls the imaging operation of the image pickup element 107 and also performs the A/D conversion of the acquired image signal to send it to the CPU 121.
(44) An image processing circuit 125 (image processing apparatus) provides processes, such as a gamma () conversion, a color interpolation, or a Joint Photographic Experts Group (JPEG) compression on the image data output from the image pickup element 107. In this embodiment, the image processing circuit 125 includes an acquisition unit 125a and an image processing unit 125b (corrector). The acquisition unit 125a acquires a captured image and at least one parallax image (viewpoint image) from the image pickup element 107. The captured image is an image generated by combining a plurality of signals (first signal and second signal) from a plurality of photoelectric converters (first subpixel and second subpixel), which receive light beams passing through different partial pupil regions of the imaging optical system. The parallax image (viewpoint image) is an image generated based on a signal from a photoelectric converter (first subpixel or second subpixel) among the plurality of photoelectric converters. The image processing unit 125b performs a correction process (corrects a defect) so as to reduce a defect included in the parallax image based on the captured image.
(45) A focus driving circuit 126 (focus driver) drives the focus actuator 114 based on the focus detection result to move the third lens unit 105 along the optical axis direction for focusing. A stop/shutter driving circuit 128 drives the stop/shutter actuator 112 to control the opening diameter of the stop/shutter 102. A zoom driving circuit 129 (zoom driver) drives the zoom actuator 111 in response to a zoom operation by a user.
(46) A display device 131 (display unit) includes for example, a liquid crystal display (LCD). The display device 131 displays information on an imaging mode of the image pickup apparatus 100, a pre-captured preview image, a captured image for confirmation use, an in-focus state displaying image in the focus detection, or the like. An operating member 132 (operating switch unit) includes a power switch, a release (imaging trigger) switch, a zooming switch, an imaging mode selection switch, and the like. The release switch is a two-step switch in a half-pressed state (in a state in which SW1 is ON) and in a fully pressed state (in a state in which SW2 is ON). A recording medium 133 is, for example, a flash memory that is removable from the image pickup apparatus 100, and records a captured image (image data).
(47) Referring now to
(48)
(49) As illustrated in
(50) As illustrated in
(51) As illustrated in
(52) Each of the photoelectric converters 301 and 302 is configured as a photodiode having a p-i-n structure that includes a p-type layer, an n-type layer, and an intrinsic layer between the p-type layer and the n-type layer. If necessary, the intrinsic layer can be excluded and a photodiode with a p-n junction may be applicable. The pixel 200G (each pixel) is provided with a color filter 306 between the micro lens 305 and each of the photoelectric converters 301 and 302. If necessary, a spectral transmittance of the color filter 306 can be changed for each subpixel, or alternatively the color filter may be excluded.
(53) As illustrated in
(54) Referring now to
(55) In
(56) The incident light is condensed on a focus position by the micro lens 305. Due to an influence of diffraction caused by wave nature of light, however, a diameter of a light condensed spot cannot be made smaller than a diffraction limit A and it has a finite size. While the light receiving surface of each of the photoelectric converters 301 and 302 has a length of around one m to two m, the condensed spot of the micro lens 305 is around one m. Accordingly, the partial pupil regions 501 and 502 in
(57)
(58) In this embodiment, the image pickup element 107 includes the plurality of subpixels that share a single micro lens and that receive a plurality of light beams passing through different regions (first partial pupil region and second partial pupil region) in a pupil of the imaging optical system (imaging lens). The image pickup element 107 includes, as the plurality of subpixels, first subpixels (a plurality of subpixels 201) and second subpixels (a plurality of subpixels 202).
(59) In this embodiment, signals of the subpixels 201 and 202 are added (combined) to each other and read out for each pixel of the image pickup element 107, so that a captured image is generated with a resolution of the number N of effective pixels. As described above, the captured image is generated by combining light receiving signals of the plurality of subpixels (subpixels 201 and 202 in this embodiment) for each pixel.
(60) In this embodiment, the light receiving signals of the plurality of subpixels 201 are collected to generate a first parallax image. The first parallax image is subtracted from the captured image to generate a second parallax image. The embodiment is not limited to this example, and the light receiving signals of the plurality of subpixels 202 may be collected to generate the second parallax image. Thus, the parallax image is generated based on the light receiving signals of the plurality of subpixels for each of the partial pupil regions that are different from each other.
(61) In this embodiment, each of the first parallax image, the second parallax image, and the captured image is an image in the Bayer array. If necessary, each of the first parallax image, the second parallax image, and the captured image may be demosaiced.
(62) Referring now to
(63) A defocus amount d is defined such that a distance from an imaging position of an object to the imaging plane 600 is a front focus state has a negative sign (d<0) in which the imaging position is located closer to an object side than the imaging plane 600, and a rear focus state has a positive sign (d>0) in which the imaging position is located at a side opposite to the object relative to the imaging plane 600. In an in-focus state in which the imaging position of the object is on the imaging plane 600 (in-focus position), the defocus amount d=0 is satisfied.
(64) In the front focus state (d<0), the light beam that has passed through the partial pupil region 501 (or partial pupil region 502) in the light beams from the object 602 is condensed once. Thereafter, the light beam spreads to a width F1 (F2) around a center position of gravity G1 (G2) of the light beam, and a blurred image is formed on the imaging plane 600. The blurred image is received by the subpixels 201 (subpixels 202) constituting each pixel arrayed in the image pickup element 107, and the first parallax image (second parallax image) is generated. Therefore, the first parallax image (second parallax image) is recorded as a blurred object image in which the object 602 is blurred with the width F1 (F2) at the center position of gravity G1 (G2) on the imaging plane 600. The blurred width F1 (F2) of the object image approximately increases in proportion as the absolute value |d| of the defocus amount d increases. Similarly, an absolute value |p| of an image shift amount p of the object image between the first and second parallax images (i.e., a difference of the center positions of gravity of the light beams (G1G2)) approximately increases as the absolute value |d| of the defocus amount d increases. This is similarly applied to the rear focus state (d>0), but an image shift direction of the object image between the first and second parallax images is opposite to that in the front focus state.
(65) As described above, according to this embodiment, the absolute value of the image shift amount between the first and second parallax images increases as the absolute value of the defocus amount increases between the first and second parallax images or the imaging signals obtained by adding the first and second parallax images.
(66) A description will now be given of the correction process of the parallax image in this embodiment. In this embodiment, the image pickup element 107 can output the captured image and at least one parallax image (at least one of the first parallax image and the second parallax image). The image processing circuit 125 (acquisition unit 125a) acquires the captured image and the parallax image that are output from the image pickup element 107. Then, the image processing circuit 125 (image processing unit 125b) corrects (revises) the parallax image based on the captured image. If necessary, the acquisition unit 125a may store the acquired captured image and at least one acquired parallax image in a memory, such as the recording medium 133 and the memory 134, to acquire the captured image and parallax image, which are stored in the memory.
(67) Due to the influence caused by short-circuiting of the transfer gate according to a circuit configuration or a drive method of the image pickup element 107, a flaw signal (defect signal) may occur in the parallax image (first parallax image or second parallax image) and a defect, such as a dot flaw and a line flaw, may be included in the parallax image even if the captured image is normal. If necessary, defect information, such as dot flaw information and line flaw information, inspected in the mass production step, or the like, can be previously stored in the memory. In this case, the image processing circuit 125 (image processing unit 125b) performs the correction process of the parallax image by using the stored defect information. If necessary, the image processing circuit 125 (inspector) may inspect the parallax image on the real-time basis (i.e., while a user uses the image pickup apparatus 100) and determine a defect, such as a dot flaw and a line flaw.
(68) Referring now to
(69) If the first parallax image includes the defect (line flaw) in the j-th row and the captured image is normal in the j-th row, it is necessary to correct the j-th row in the first parallax image. In this embodiment, the image processing circuit 125 (image processing unit 125b) corrects the first parallax image (pixel value at a position to be corrected in the first parallax image) based on the captured image. If necessary, the second parallax image can be corrected similarly.
(70) In this embodiment, a correction value (correction signal) of the first parallax image at a position (j, i) where the defect occurs, i.e., position to be corrected (first position) is defined as Ac(j, i). The image processing unit 125b calculates the correction value Ac(j, i) according to the following expression (1), and corrects the first parallax image by using the calculated correction value Ac(j, i) as the pixel value A(j, i) of the first parallax image.
(71)
(72) In the expression (1), parameters A0 and I0 are values used to stabilize a calculation value and to suppress an amplification of a noise if the pixel value A of the first parallax image and the pixel value I of the captured image have low luminances (low luminance signals).
(73) As described above, in this embodiment, the image processing unit 125b performs the correction process for the parallax image based on the captured image, i.e., replaces the pixel value A(j,i) of the parallax image at the position to be corrected with the correction value Ac(j,i). Specifically, the image processing unit 125b determines the correction value Ac(j, i) for the parallax image by using the pixel value I(j, i) of the captured image and pixel values I(j.sub.2, i.sub.2) and A(j.sub.2, i.sub.2) of the captured image and the parallax image at a position (j.sub.2, i.sub.2) (j, i) near the position to be corrected.
(74) In the expression (1), specific values of the parameters A0 and I0 can be set as appropriate. For example, if the pupil dividing number Np is 2, the parameters A0 and I0 can be set to be A0=I0/Np. Values of the parameters A0 and I0 may be changed depending on an imaging condition, such as a position (j, i) to be corrected, an International Organization of Standardization (ISO) speed, an F-number of the imaging optical system, and an exit pupil distance. The values of the parameters A0 and I0 may be set based on a pixel value A of the first parallax image or a pixel value I of the captured image near (at the periphery of) the position to be corrected.
(75)
(76) Referring now to
(77) Each of the first signal Ai and the second signal Bi has incident angle information as well as light intensity distribution information. Therefore, the first signal Ai is moved parallel (translated) to a virtual imaging plane 610 at the angle a and the second signal Bi is moved parallel (translated) to the virtual imaging plane 610 at the angle b, and then these signals are added to generate the refocus signal on the virtual imaging plane 610. The parallel movement of the first signal Ai to the virtual imaging plane 610 at the angle a corresponds to a shift by +0.5 pixel in the column direction, and the parallel movement of the second signal Bi to the virtual imaging plane 610 at the angle b corresponds to a shift by 0.5 pixel in the column direction. Accordingly, when the first signal Ai and the second signal Bi relatively shifted by +1 pixel to add the first signal Ai to the corresponding second signal (Bi+1) and to combine the first signal Ai with the second signal (Bi+1), the refocus signal on the virtual imaging plane 610 can be generated. Similarly, when the first signal Ai and the second signal Bi are shifted by an integral multiple of the pixel pitch (i.e. integer shift is performed) and these signals are added to each other, the shift addition signal (refocus signal) on each virtual imaging plane can be generated according to the integer shift amount.
(78) In this embodiment, the influence of the defect included in at least one of the parallax images (at least one of the first parallax image and the second parallax image) is removed or reduced by the correction process. Therefore, it is possible to perform the refocus process based on the corrected parallax image. Accordingly, the refocus process by using each of signals (first signal and second signal) that form the parallax images can be performed with a high accuracy.
Second Embodiment
(79) Referring now to
(80)
(81)
(82) As illustrated in
(83) As illustrated in
(84) As illustrated in
(85) In this embodiment, the image pickup element 107 includes the plurality of subpixels that share a single micro lens and that receive a plurality of light beams passing through regions (first to fourth partial pupil regions) different from each other in a pupil of the imaging optical system (imaging lens). The image pickup element 107 includes, as the plurality of subpixels, first subpixels (a plurality of subpixels 201), second subpixels (a plurality of subpixels 202), third subpixels (a plurality of subpixels 203), and fourth subpixels (a plurality of subpixels 204).
(86) In this embodiment, signals of the subpixels 201, 202, 203, and 204 are added (combined) and read out for each pixel of the image pickup element 107 so that a captured image with a resolution of the effective pixel number N can be generated. As described above, the captured image is generated by combining light receiving signals of the plurality of subpixels (subpixels 201 to 204 in this embodiment) for each pixel.
(87) In this embodiment, the light receiving signals of the plurality of subpixels 201 are collected to generate a first parallax image. Similarly, the light receiving signals of the plurality of subpixels 202 are collected to generate a second parallax image, and the light receiving signals of the plurality of subpixels 203 are collected to generate a third parallax image. Furthermore, in this embodiment, the first parallax image, the second parallax image, and the third parallax image are subtracted from the captured image to generate a fourth parallax image. This embodiment is not, however, limited to this example, and the light receiving signals of the plurality of subpixels 204 may be collected to generate the fourth parallax image. As described above, the parallax image is generated based on the light receiving signals of the plurality of subpixels for each of the partial pupil regions that are different from each other.
(88) In this embodiment, each of the captured image and the first to third parallax images (and the fourth parallax image) is an image in the Bayer array. If necessary, each of the captured image and the first to third parallax images (and the fourth parallax image) may be demosaiced. The correction process (defect correction) on the parallax image according to this embodiment is the same as that in the first embodiment, and, accordingly, a description thereof is omitted.
Third Embodiment
(89) Next follows a description of the third embodiment according to the present invention. This embodiment is different from the first embodiment in that the image processing unit 125b performs a light amount correction process (shading correction) of a parallax image based on a captured image. In addition to the light amount correction process according to this embodiment, similar to the first embodiment, the correction process of the parallax image may be performed based on the captured image so as to reduce a defect contained in a parallax image.
(90) A pupil region 500 illustrated in
(91)
(92)
(93) As illustrated in
(94) A captured image having a resolution of the pixel number N can be generated based on the LF data (input image) for each pixel by combining all the signals from the two rows by one column divided subpixels 201 and 202 (NxNy divided first photoelectric converter to N.sub.LF-th photoelectric converter) with one another.
(95) A signal form a specific subpixel is selected for each pixel from the two rows by one column divided subpixels 201 and 202 (NxNy divided first photoelectric converter to N.sub.LF-th photoelectric converter) based on the LF data (input image). Thereby, a viewpoint image corresponding to a specific partial pupil region among the partial pupil regions 501 and 502 (first subpixel to N.sub.LF-th subpixel) can be generated. For example, the first viewpoint image (first parallax image) can be generated with a resolution of the pixel number N corresponding to the partial pupil region 501 in the imaging optical system by selecting a signal from the subpixel 201. This is true of another subpixel.
(96) As discussed, the image pickup element according to this embodiment has a plurality of arrayed pixels with a plurality of photoelectric converters configured to receive light beams that have passed different partial pupil regions in the imaging optical system, and can acquire the LF data (input data). This embodiment performs the image processing (correction process), such as a flaw correction and a shading correction, for the first viewpoint image and the second viewpoint image (first viewpoint image to N.sub.LF-th viewpoint image) and generates an output image.
(97) Referring now to
(98) Initially, in a stage prior to step S1 in
(99) In step S0, initially, the image processing circuit 125 inputs the LF data (input image) acquired by the image pickup element 107. Alternatively, the image processing circuit 125 may use the LF data (input image) previously captured by the image pickup element 107 and stored in the recording medium.
(100) Next, in step S0, the image processing circuit 125 generates a captured image depending on the pupil region into which different partial pupil regions (first partial pupil region and the second partial pupil region) are combined in the imaging optical system. The LF data (input image) will be referred to as LF. In addition, a subpixel signal that is the i.sub.s-th (1i.sub.sNx) in the column direction and the j.sub.s-th (1j.sub.sNy) in the row direction will be referred to as a k-th subpixel signal in each pixel signal of the LF, where k=Nx(js1)+i.sub.s (1kN.sub.LF). The image processing circuit 125 generates, as expressed in the following expression (2), a combined image as a captured image I(j, i) that is the i.sub.s-th in the column direction and the j.sub.s-th in the row direction.
(101)
(102) In order to maintain a good signal to noise ratio (S/N) of the captured image (j, i), this embodiment combines the subpixel signals of the expression (2) with each other in an electrostatic capacitor (FD) in the image pickup element before each subpixel signal is analog-to-digital-converted (A/D-converted). If necessary, before each subpixel signal is A/D-converted, this embodiment may combine the subpixel signals of the expression (2) with each other in converting the electrical charges accumulated in the electrostatic capacitor (FD) in the image pickup element into the voltage signal. If necessary, after each subpixel signal is A/D-converted, this embodiment may combine the subpixel signals of the expression (2) with each other.
(103) This embodiment bisects each pixel in the x-axis direction, such as Nx=2, Ny=1, and N.sub.LF=2. All of the signals from the subpixels 201 and 202 bisected in the x-axis direction (NxNy divided first subpixel to N.sub.LF subpixel) are combined for each pixel based on the input image (LF data) corresponding to the illustrative pixel arrangement in
(104) Next, in step S0, the image processing circuit 125 generates the k-th viewpoint image I.sub.k(j, i) that is the i-th in the column direction and the j-th in the row direction corresponding to the k-th partial pupil region in the imaging optical system as expressed in the following expression (3).
I.sub.k(j,i)=I.sub.N.sub.
(105) This embodiment bisects each pixel in the x-axis direction, such as Nx=2, Ny=1, N.sub.LF=2, and k=1. This embodiment selects a signal of the subpixel 201 bisected in the x-axis direction, for each pixel based on the LF data (input image) corresponding to the pixel arrangement illustrated in
(106) As described above, the image processing unit 125b generates a captured image corresponding to a pupil region into which different partial pupil regions are combined, based on the input image acquired by the image pickup element having a plurality of pixels with a plurality of photoelectric converters configured to receive light beams that have passed different partial pupil regions in the imaging optical system. In addition, the image processing unit 125b generates at least one viewpoint image for each different partial pupil region.
(107) This embodiment generates the captured image I(j, i) as the RGB signal in the Bayer array and the first viewpoint image I.sub.1(j, i) as the RGB signal in the Bayer array based on the LF data (input image) acquired by the image pickup element 107, and stores them in the recording medium. In addition, this embodiment generates a second viewpoint image I.sub.2(j, i) based on the captured image I(j, i) and the first viewpoint image I.sub.1(j, i). This configuration can provide image processing similar to that for the captured image acquired by the conventional image pickup element in which the photoelectric converter on each pixel is not divided for the captured image I(j, i) in this embodiment. If necessary, in order to make equivalent the process to each viewpoint image, the first viewpoint image I.sub.1(j, i) and the second viewpoint image I.sub.2(j, i) may be generated and stored in the recording medium.
(108) Next, in step S1 in
(109) Referring now to
(110)
(111) In order to generate each viewpoint image with a good image quality, the image processing unit 125b according to this embodiment performs a shading correction (light amount correction) for each of RGB in the first viewpoint image I.sub.1 (k-th viewpoint image I.sub.k) by using the captured image I(j, i) as a base or reference image.
(112) In step S1 in
(113) Assuming integers j.sub.2 (1j.sub.2N.sub.V/2) and i.sub.2 (1i.sub.2N.sub.H/2), and assuming that the captured image I in the Bayer array in
(114) In step S1, next, the image processing unit 125b performs a projection process for the captured images RI(2j.sub.21, 2i.sub.21), G.sub.rI(2j.sub.21, 2i.sub.2), G.sub.bI(2j.sub.2, 2i.sub.21), and BI(2j.sub.2, 2i.sub.2). More specifically, for the captured images RI(2j.sub.21, 2i.sub.21), G.sub.rI(2j.sub.21, 2i.sub.2), G.sub.bI(2j.sub.2, 2i.sub.21), and BI(2j.sub.2, 2i.sub.2), the projection process is performed in the direction (y-axis direction) orthogonal to the pupil dividing direction (x-axis direction) with expressions (4A) to (4D). Thereby, the projection signals RP(2i.sub.21), G.sub.rP(2i.sub.2), G.sub.bP(2i.sub.21), and BP(2i.sub.2) of the captured images are generated. The saturated signal value or the defective signal value does not contain information used to correctly detect shading for each of RGB in the captured image. Hence, a product of the captured image and the effective pixel V.sub.k is calculated, the projection process is performed (numerators on the upper stages in expressions (4A) to (4D)) by excluding the saturated signal value and the defective signal value, and a normalization is performed with the effective pixel number used for the projection process (denominators on the upper stages in expressions (4A) to (4D)). Where the effective pixel number used for the projection process is zero, the projection signal of the captured signal is set to zero by the lower stage in expression (4A) to the lower stage in expression (4D). The projection signal of the captured image is also set to zero where the projection signal of the captured image becomes a negative signal due to the noise influences. Similarly, the projection process is performed for the k-th viewpoint images RI.sub.k(2j.sub.21, 2i.sub.21), G.sub.rI.sub.k(2j.sub.21, 2i.sub.2), G.sub.bI.sub.k(2j.sub.2, 2i.sub.21), and BI.sub.k(2j.sub.2, 2i.sub.2) in the direction (y-axis direction) orthogonal to the pupil dividing direction (x-axis direction) with expressions (4E) to (4H). This configuration generates projection signals RP.sub.k(2i.sub.21), G.sub.rP.sub.k(2i.sub.2), G.sub.bP.sub.k(2i.sub.21), and BP.sub.k(2i.sub.2) of the k-th viewpoint image.
(115)
(116) A low-pass filter process follows the projection process of the expressions (4A) to (4H). The low-pass filter process is performed for the projection signals RP(2i.sub.21), G.sub.rP(2i.sub.2), G.sub.bP(2i.sub.21), and BP(2i.sub.2) of the captured image, and the projection signals RP.sub.k(2i.sub.21), G.sub.rP.sub.k(2i.sub.2), G.sub.bP.sub.k(2i.sub.21), and BP.sub.k(2i.sub.2) of the k-th viewpoint image. Thereby, the projection signal in the captured image is smoothed. Alternatively, the low-pass filter process may be omitted.
(117)
(118) In step S1, the image processing unit 125b calculates shading signals RS.sub.k(2i.sub.21), G.sub.rS.sub.k(2i.sub.2), G.sub.bS.sub.k(2i.sub.21), and BS.sub.k(2i.sub.2) for each of RGB of the k-th viewpoint image I.sub.k relative to the captured image as a reference by expressions (5A) to (5D).
(119)
It is necessary that a light receiving amount of the pixel is greater than that of the subpixel, and the light receiving amount of the subpixel is greater than 0 in calculating the shading component. Hence, where a conditional expression RP(2i.sub.21)>RP.sub.k(2i.sub.21)>0 is satisfied, a ratio is acquired by the expression (5A) between the R projection signal RP.sub.k(2i.sub.21) of the k-th viewpoint image and the R projection signal RP(2i.sub.21) of the captured image. Then, the result is multiplied by the pupil dividing number N.sub.LF for a normalization and the R shading signal RS.sub.k(2i.sub.21) of the k-th viewpoint image I.sub.k is generated. Thereby, the R signal component of the object can be cancelled out, and the R shading component of the k-th viewpoint image I.sub.k can be separated. Where the conditional expression RP(2i.sub.21)>RP.sub.k(2i.sub.21)>0 is not satisfied, the R shading signal RS.sub.k(2i.sub.21) of the k-th viewpoint image I.sub.k is set to 0.
(120) Similarly, where a conditional expression G.sub.rP(2i.sub.2)>G.sub.rP.sub.k(2i.sub.2)>0 is satisfied, a ratio is acquired by the expression (5B) between the G.sub.r projection signal G.sub.rP.sub.k(2i.sub.2) of the k-th viewpoint image and the G.sub.r projection signal G.sub.rP(2i.sub.2) of the captured image. Then, the result is multiplied by the pupil dividing number N.sub.LF for a normalization and the G.sub.r shading signal G.sub.rS.sub.k(2i.sub.2) of the k-th viewpoint image I.sub.k is generated. Thereby, the G.sub.r signal component of the object can be cancelled out, and the G.sub.r shading component of the k-th viewpoint image I.sub.k can be separated. Where the conditional expression G.sub.rP(2i.sub.2)>G.sub.rP.sub.k(2i.sub.2)>0 is not satisfied, the G.sub.r shading signal G.sub.rS.sub.k(2i.sub.2) of the k-th viewpoint image I.sub.k is set to 0.
(121) Similarly, where a conditional expression G.sub.bP(2i.sub.21)>G.sub.bP.sub.k(2i.sub.21)>0 is satisfied, a ratio is acquired by the expression (5C) between the G.sub.b projection signal G.sub.bP.sub.k(2i.sub.21) of the k-th viewpoint image and the G.sub.b projection signal G.sub.bP(2i.sub.21) of the captured image. Then, the result is multiplied by the pupil dividing number N.sub.LF for a normalization and the G.sub.b shading signal G.sub.bS.sub.k(2i.sub.21) of the k-th viewpoint image I.sub.k is generated. Thereby, the G.sub.b signal component of the object can be cancelled out, and the G.sub.b shading component of the k-th viewpoint image I.sub.k can be separated. Where the conditional expression G.sub.bP(2i.sub.21)>G.sub.bP.sub.k(2i.sub.21)>0 is not satisfied, the G.sub.b shading signal G.sub.bS.sub.k(2i.sub.21) of the k-th viewpoint image I.sub.k is set to 0.
(122) Similarly, where a conditional expression BP(2i.sub.2)>BP.sub.k(2i.sub.2)>0 is satisfied, a ratio is acquired by the expression (5D) between the B projection signal BP.sub.k(2i.sub.2) of the k-th viewpoint image and the B projection signal BP(2i.sub.2) of the captured image. Then, the result is multiplied by the pupil dividing number N.sub.LF for a normalization and the B shading signal BS.sub.k(2i.sub.2) of the k-th viewpoint image I.sub.k is generated. Thereby, the B signal component of the object can be cancelled, and the B shading component of the k-th viewpoint image I.sub.k can be separated. Where the conditional expression BP(2i.sub.2)>BP.sub.k(2i.sub.2)>0 is not satisfied, the B shading signal BS.sub.k(2i.sub.2) of the k-th viewpoint image I.sub.k is set to 0.
(123) For a high shading correction accuracy, where an effective shading-signal number that satisfies RS.sub.k(2i.sub.21)>0, G.sub.rS.sub.k(2i.sub.2)>0, G.sub.bS.sub.k(2i.sub.21)>0, and BS.sub.k(2i.sub.2)>0 is equal to or greater than a predetermined number, the shading correction may be provided.
(124) Next, in step S1, the image processing unit 125b performs a calculation process expressed by expressions (6A) to (6D). The shading functions RSF.sub.k(2i.sub.21), G.sub.rSF.sub.k(2i.sub.2), G.sub.bSF.sub.k(2i.sub.21), and BSF.sub.k(2i.sub.2) of the k-th viewpoint image I.sub.k for each of RGB are set to the smooth N.sub.SF-th polynomial function to a positional variable in the pupil dividing direction (x-axis direction). The effective shading signal that is generated by the expressions (5A) to (5D) and satisfies RS.sub.k(2i.sub.21)>0, G.sub.rS.sub.k(2i.sub.2)>0, G.sub.bS.sub.k(2i.sub.21)>0, and BS.sub.k(2i.sub.2)>0 is set to a data point. Coefficients RSC.sub.k(), G.sub.rSC.sub.k(), G.sub.bSC.sub.k(), and BSC.sub.k() in expressions (6A) to (6D) are calculated by these data points and parameter fitting with the least squares method.
(125)
(126) As described above, the shading functions RSF.sub.k(2i.sub.21), G.sub.rSF.sub.k(2i.sub.2), G.sub.bSF.sub.k(2i.sub.21), and BSF.sub.k(2i.sub.2) of the relative k-th viewpoint image I.sub.k for each of RGB on the basis of the captured image are generated.
(127)
(128) Next, in step S1 in
(129)
(130) Referring now to
(131) This embodiment generates a captured image depending on the pupil region into which different partial pupil regions are combined, based on an input image acquired by an image pickup element including a plurality of pixels with a plurality of photoelectric converters configured to receive light beams that have passed different partial pupil regions in the imaging optical system. Then, this embodiment generates a plurality of viewpoint images for each of the different partial pupil regions, performs image processing configured to correct the viewpoint image based on the captured image, and generates an output image. This embodiment performs image processing configured to correct a light amount (shading) for each color or for each of RGB based on the captured image. This embodiment performs image processing configured to correct a light amount of a viewpoint image based on the projection signal of the captured image and the projection signal of the viewpoint image. The configuration of this embodiment can provide a viewpoint image with a good quality.
(132) Next, in step S2 in
(133) In this embodiment, due to the short-circuiting of the transfer gate etc., caused by the circuit configuration and driving method of the image pickup element, only part of the k-th viewpoint image I.sub.k (first viewpoint image I.sub.1) causes a defective signal or a dot or line defect although the captured image I is normal. If necessary, this embodiment may previously store the dot defect information and line defect information inspected in the mass-production step etc., in the image processing circuit 125 etc., and may perform the defect correcting process for the k-th viewpoint image I.sub.k (first viewpoint image I.sub.1) based on the recorded dot and line information. In addition, this embodiment may inspect the k-th viewpoint image I.sub.k (first viewpoint image I.sub.1) on the real-time basis and provide a dot defect determination or a line defect determination.
(134) A description will now be given of the defect correction (step S2 in
(135) In the defect correction in step S2 in this embodiment, the captured image I that is normal is set to a reference image and the defect of the k-th viewpoint (first corrected) image M.sub.1I.sub.k is corrected based on the captured image I. This embodiment corrects a defect by comparing a signal value of the k-th viewpoint (first correct) image M.sub.1I.sub.k at a position that is not determined to be defective and a signal value of the captured image I at a position that is not determined to be defective. In this comparison, it is necessary for a highly accurate defect correction to remove the influence of the shading component for each of RGB of the k-th viewpoint image I.sub.k caused by the pupil shift, and to accurately compare the signal component for each of RGB of the object between the k-th viewpoint image I.sub.k and the captured image I. Hence, in step S1, this embodiment previously corrects the shading (light amount) for each of RGB of the k-th viewpoint image, generates the k-th viewpoint (first corrected) image M.sub.1I.sub.k, creates a shading state similar to that of the captured image I, and removes the influence of a shading component. Thereafter, in step S2, this embodiment highly accurately corrects a defect in the k-th viewpoint (first corrected) image M.sub.1I.sub.k in which the shading is corrected, based on the captured image I.
(136) In step S2 in
(137) In step S2, assume that a first position (2j.sub.D1, 2i.sub.D1) of the k-th viewpoint (first corrected) image M.sub.1I.sub.k for R is determined to be defective. At this time, the defect correcting process is performed by the following expression (8A) based on the captured image RI(2j.sub.D1, 2i.sub.D1) at the first position, the k-th viewpoint (first corrected) image RM.sub.1I.sub.k at a second position for R that is not determined to be defective, and the captured image RI at the second position. This configuration generates the k-th viewpoint (second corrected) image RM.sub.2I.sub.k(2j.sub.D1, 2i.sub.D1) after the defect is corrected at the first position.
(138) Assume that a first position (2j.sub.D1, 2i.sub.D) of the k-th viewpoint (first corrected) image M.sub.1I.sub.k for G.sub.r is determined to be defective. At this time, the defect correcting process is performed by the following expression (8B) based on the captured image G.sub.rI(2j.sub.D1, 2i.sub.D) at the first position, the k-th viewpoint (first corrected) image G.sub.bM.sub.1I.sub.k at the second position for G.sub.b that is not determined to be defective, and the captured image G.sub.bI at the second position. This configuration generates the k-th viewpoint (second corrected) image G.sub.rM.sub.2I.sub.k(2j.sub.D1, 2i.sub.D) after the defect is corrected at the first position.
(139) Assume that a first position (2j.sub.D, 2i.sub.D1) of the k-th viewpoint (first corrected) image M.sub.1I.sub.k for G.sub.b is determined to be defective. At this time, the defect correcting process is performed by the following expression (8C) based on the captured image G.sub.bI(2j.sub.D, 2i.sub.D1) at the first position, the k-th viewpoint (first corrected) image G.sub.rM.sub.1I.sub.k at a second position for G.sub.r that is not determined to be defective, and the captured image G.sub.rI at the second position. This configuration generates the k-th viewpoint (second corrected) image G.sub.bM.sub.2I.sub.k(2j.sub.D, 2i.sub.D1) after the defect is corrected at the first position.
(140) Assume that a first position (2j.sub.D, 2i.sub.D) of the k-th viewpoint (first corrected) image M.sub.1I.sub.k for B is determined to be defective. At this time, the defect correcting process is performed by the following expression (8D) based on the captured image BI(2j.sub.D, 2i.sub.D) at the first position, the k-th viewpoint (first corrected) image BM.sub.1I.sub.k at a second position for B that is not determined to be defective, and the captured image BI at the second position. This configuration generates the k-th viewpoint (second corrected) image BM.sub.2I.sub.k(2j.sub.D, 2i.sub.D) after the defect is corrected at the first position.
(141)
(142) At most positions (j, i) that are not determined to be defective, the k-th viewpoint (second corrected) image M.sub.2I.sub.k(j, i) has the same signal value as that of the k-th viewpoint (first corrected) image M.sub.1I.sub.k(j, i) and M.sub.2I.sub.k(j, i)=M.sub.1I.sub.k(j, i) is established. If necessary, the k-th viewpoint (second corrected) image M.sub.2I.sub.k(j, i) after the defect is corrected may be output as an output image.
(143) Referring now to
(144) This embodiment generates a captured image depending on a pupil region into which different partial pupil regions are combined, based on an input image acquired by an image pickup element including a plurality of pixels with a plurality of photoelectric converters configured to receive light beams that have passed different partial pupil regions in the imaging optical system. Then, this embodiment generates a plurality of viewpoint images for each of the different partial pupil regions, performs image processing configured to correct a viewpoint image based on the captured image, and generates an output image. This embodiment performs image processing so as to correct and to reduce the defect contained in the viewpoint image based on the captured image. This embodiment performs image processing configured to correct a signal value of a viewpoint image at a first position that is determined to be defective based on a signal value of a captured image at the first position. This embodiment performs signal processing configured to correct the signal value of the viewpoint image at the first position based on the signal value of the captured image at the first position that is determined to be defective, the signal value of the viewpoint image at the second position that is not determined to be defective, and the signal value of the captured image at the second position.
(145) In this embodiment, the image processing unit 125b performs a correction process (image processing) so as to reduce the defect contained in the viewpoint image based on the captured image after the light amount correction process of the viewpoint image is performed based on the captured image. This configuration can generate the viewpoint image with a good quality.
(146) Next, in step S2 in
RM.sub.3I.sub.k(2j.sub.21,2i.sub.21)=RSF.sub.k(2i.sub.21)RM.sub.2I.sub.k(2j.sub.21,2i.sub.21),(9A)
G.sub.rM.sub.3I.sub.k(2j.sub.21,2i.sub.2)=G.sub.rSF.sub.k(2i.sub.2)G.sub.rM.sub.2I.sub.k(2j.sub.21,2i.sub.2),(9B)
G.sub.bM.sub.3I.sub.k(2i.sub.2,2i.sub.21)=G.sub.bSF.sub.k(2i.sub.21)G.sub.bM.sub.2I.sub.k(2j.sub.2,2i.sub.21),(9C)
BM.sub.3I.sub.k(2j.sub.2,2i.sub.2)=BSF.sub.k(2i.sub.2)BM.sub.2I.sub.k(2j.sub.2,2i.sub.2),(9D)
(147) Now, the k-th viewpoint (third corrected) image M.sub.3I.sub.k in the Bayer array is acquired for each of R, G.sub.r, G.sub.b, and B. The k-th viewpoint (third corrected) image for R is expressed as RM.sub.3I.sub.k(2j.sub.21, 2i.sub.21)=M.sub.3I.sub.k(2j.sub.21, 2i.sub.21), and the k-th viewpoint (third corrected) image for G.sub.r is expressed as G.sub.rM.sub.3I.sub.k(2j.sub.21, 2i.sub.2)=M.sub.3I.sub.k(2j.sub.21, 2i.sub.2). The k-th viewpoint (third corrected) image for G.sub.b is expressed as G.sub.bM.sub.3I.sub.k(2j.sub.2, 2i.sub.21)=M.sub.3I.sub.k(2j.sub.2, 2i.sub.21), and the k-th viewpoint (third corrected) image for B is expressed as BM.sub.3I.sub.k(2j.sub.2, 2i.sub.2)=M.sub.3I.sub.k(2j.sub.2, 2i.sub.2).
(148) In step S3 in
(149) In step S3, initially, the saturation signal process is performed with the following expression (10) for the captured image I(j, i) where a maximum value of the captured signal is set to Imax, and the corrected captured image MI(j, i) is generated.
(150)
(151) Next, in step S3, the image processing unit 125b performs a saturation signal process corresponding to the shading state as in the following expression (11), for the k-th viewpoint (third corrected) image M.sub.3I.sub.k(j, i) where the shading function for the Bayer array is set to SF.sub.k(j, i). Thereby, the k-th viewpoint (fourth corrected) image M.sub.4I.sub.k(j, i) can be generated. Herein, the shading function SF.sub.k(j, i) for the Bayer array is calculated by the expression (6A) to (6D) based on shading functions RSF.sub.k(2i.sub.21), G.sub.rSF.sub.k(2i.sub.2), G.sub.bSF.sub.k(2i.sub.21), and BSF.sub.k(2i.sub.2) generated for each R, G.sub.r, G.sub.b, and B. In other words, assume that SF.sub.k(2j.sub.21, 2i.sub.21)=RSF.sub.k(2i.sub.21), SF.sub.k(2j.sub.21, 2i.sub.2)=G.sub.rSF.sub.k(2i.sub.2), SF.sub.k(2j.sub.2, 2i.sub.21)=G.sub.bSF.sub.k(2i.sub.21), SF.sub.k(2j.sub.2, 2i.sub.2)=BSF.sub.k(2i.sub.2).
(152)
(153) In step S4 in
I.sub.2(j,i)=MI(j,i)M.sub.4I.sub.1(j,i).(12)
(154) In this embodiment, the maximum signal value in the saturation of the first viewpoint (third corrected) image M.sub.3I.sub.1(j, i) may have the same maximum signal value as the maximum signal value I.sub.max in the saturation of the captured image I(j, i) due to the driving method of the image pickup element 107 and the A/D conversion circuit configuration. In this case, when the second viewpoint image is generated by subtracting the first viewpoint (third corrected) image from the captured image as in the expression (12) without the saturated signal process and the second viewpoint image may have a saturated signal value, the saturated signal value may have an incorrect signal value of 0. Hence, in order to prevent this problem, in step S3, the image processing unit 125b previously performs the saturation signal process corresponding to the shading state for the captured image I(j, i) and the k-th viewpoint (third corrected) image M.sub.3I.sub.k(j, i), so as to generate the corrected captured image MI(j, i) after the saturation signal process is performed and the first viewpoint (fourth corrected) image M.sub.4I.sub.1(j, i). Thereafter, in step S4, the image processing unit 125b can generate the second viewpoint image I.sub.2 corresponding to the correct saturated signal value using the expression (12) by generating the second viewpoint image I.sub.2(j, i).
(155) In step S5 in
(156) Finally, in step S6 in
(157)
(158) Referring now to
(159) An image processing apparatus according to this embodiment is an image processing apparatus having an image processing unit configured to perform the above image processing method. An image pickup apparatus according to this embodiment is an image pickup apparatus that includes an image pickup element including a plurality of arranged pixels with a plurality of subpixels configured to receive light beams that have passed the different partial pupil regions in the imaging optical system, and an image processing unit configured to perform the above image processing method. The configuration of this embodiment can generate the viewpoint image with a good quality.
Fourth Embodiment
(160) Next, a description will be given of a fourth embodiment according to the present invention. This embodiment detects an image shift amount distribution through a phase difference detection method based on the corrected first viewpoint image and the corrected second viewpoint image (corrected first viewpoint image to corrected N.sub.LF-th viewpoint image) generated in the third embodiment and a correlation (coincidence of the signal) between the corrected first viewpoint image and the corrected second viewpoint image.
(161) In generating the image shift amount distribution, initially, the color centers of gravity for RGB are accorded with one another for each position (j, i) based on the corrected k-th viewpoint image MI.sub.k (k=1 to N.sub.LF) as the RGB signals in the Bayer array. A k-th viewpoint luminance signal Y.sub.k is generated by the following expression (14).
(162)
(163) Next, in generating the image shift amount distribution, a one-dimensional bandpass filter process is performed for the first viewpoint luminance signal Y.sub.1 generated by the expression (14) in the pupil dividing direction (column direction) based on the corrected first viewpoint image MI.sub.1 as the RGB signal in the Bayer array, and generates a first focus detecting signal dYA. In addition, this embodiment performs a one-dimensional bandpass filter process for the second viewpoint luminance signal Y.sub.2 generated by the expression (14) in the pupil dividing direction (column direction) based on the corrected second viewpoint image MI.sub.2, and generates a second focus detecting signal dYB. The one-dimensional bandpass filter may use, for example, a primary differential filter [1, 5, 8, 8, 8, 8, 5, 1, 1, 5, 8, 8, 8, 8, 5, 1] etc. If necessary, a passage band may be adjusted for the one-dimensional bandpass filter.
(164) Next, in generating the image shift amount distribution, this embodiment shifts the first focus detection signal dYA and the second focus detection signal dYB relative to each other in the pupil dividing direction (column direction), calculates a correlation amount representing the coincidence of the signal, and generates the image shift amount distribution M.sub.DIS(j, i) based on the correlation amount. This embodiment sets a first focus detection signal to dYA(j+j.sub.2, i+i.sub.2) that is the j.sub.2-th (n.sub.2j.sub.2n.sub.2) in the row direction and the i.sub.2-th (m.sub.2i.sub.2m.sub.2) in the column direction as the pupil dividing direction around the position (j, i) as a center, and a second focus detection signal to dYB(j+j.sub.2, i+i.sub.2). Assume that a shift amount is s(n.sub.ssn.sub.s). Then, a correlation amount COR.sub.EVEN(j, i, s) at each position (j, i) is calculated by the following expression (15A) and a correlation amount COR.sub.ODD(j, i, s) is calculated by the following expression (15B).
(165)
(166) The correlation amount COR.sub.ODD(j, i, s) is a correlation amount that is made by shifting a shift amount between the first focus detection signal dYa and the second focus detection signal dYB by half a phase or 1 relative to the correlation amount COR.sub.EVEN(j, i, s). This embodiment calculates and averages shift amounts of real number values that minimizes the correlation amount, based on the correlation amount COR.sub.EVEN(j, i, s) and the correlation amount COR.sub.ODD(j, i, s) through a subpixel calculation, and detects an image shift amount distribution M.sub.DIS(j, i).
(167) In detecting an image shift amount by the phase difference method, this embodiment evaluates the correlation amounts in the expressions (15A) and (15B), and detects the image shift amount based on the correlation (coincidence of the signal) between the first focus detection signal and the second focus detection signal. This embodiment generates a first focus detection signal and a second focus detection signal based on the corrected first viewpoint image and the corrected second viewpoint image for which the shading (light amount) is corrected for each of RGB, and the captured image. Hence, this embodiment can improve the correlation (coincidence of the signal) between the first focus detection signal and the second focus detection signal, and highly accurately detect the image shift amount.
(168) Where a lens is driven to an in-focus position in accordance with a defocus amount detected by the automatic focus detection, the image shift amount distribution M.sub.DIS(j, i) is multiplied by a conversion coefficient K from an image shift amount depending on lens information such as an F-number F in an image pickup lens (imaging optical system) and an exit pupil distance, to a defocus amount. Thereby, the defocus distribution M.sub.Def(j, i) can be detected. The calculation may be performed for each image height position in the focus detecting region.
(169) This embodiment can generate a plurality of viewpoint images with good qualities. This embodiment can improve the detection accuracy of the image shift amount by using a plurality of viewpoint images with good qualities.
Fifth Embodiment
(170) Next follows a description of a fifth embodiment according to the present invention. This embodiment discusses an illustrative quadrisection where Nx=2, Ny=2, and N.sub.LF=4. In this embodiment, all signals from quadrisected subpixels 201 to 204 (NxNy divided first subpixel to N.sub.LF-th subpixel) are combined for each pixel based on the input image (LF data) corresponding to the pixel arrangement illustrated in
(171) This embodiment discusses an illustrative quadrisection where Nx=2, Ny=2, N.sub.LF=4, and k=1 to 3. A signal of the subpixel 201 (first subpixel) is selected from the quadrisected subpixels 201 to 204, which are combined for each pixel based on the LF data (input image) corresponding to the pixel arrangement illustrated in
(172) This embodiment generates a captured image depending on a pupil region into which different partial pupil regions are combined, based on an input image (LF data) acquired by an image pickup element including a plurality of arranged pixels with a plurality of photoelectric converters configured to receive light beams that have passed different partial pupil regions in the imaging optical system. Then, this embodiment generates a plurality of viewpoint images for each of the different partial pupil regions. In order to generate each viewpoint image with a good quality, this embodiment performs image processing, such as a flaw correction and a shading correction, similar to the third embodiment, for the first viewpoint image to the fourth viewpoint image (first viewpoint image to N.sub.LF-th viewpoint image) based on the captured image, and generates an output image.
(173) In step S1 in
(174) Initially, in step S1, the image processing unit 125b in this embodiment corrects shading (light amount) in the x-axis direction for the k-th viewpoint image I.sub.k (k=1 to N.sub.LF1) by the expressions (4A) to (7D). Next, in the expressions (4A) to (7D), the x-axis direction is replaced with the y-axis direction, and the shading (light amount) correction process is performed in the y-axis direction, and the k-th viewpoint (first corrected) image M.sub.1I.sub.k (k=1 to N.sub.LF1) is generated. In performing the two stages of the shading (light amount) correction in the x-axis direction and the shading correction in the y-axis direction, the pupil dividing number N.sub.LF is more than the necessary number by one so as to normalize the expressions (5A) to (5D). Hence, in the second shading correction in the y-axis direction, the multiplication of the pupil dividing number N.sub.LF for the normalization is omitted in the expressions (5A) to (5D).
(175) Due to the expressions (8A) to (10), the procedure of this embodiment is similar to that in the third embodiment until the k-th viewpoint (fourth corrected) image M.sub.4I.sub.k (k=1 to N.sub.LF1) is generated. In step S4 in
(176)
(177) Step S5 and subsequent steps in
(178) This embodiment can generate a viewpoint image with a good quality. In the photoelectric converter in each pixel in the image pickup element, another embodiment may increase the number of divisions, such as nine divisions where Nx=3, Ny=3, and N.sub.LF=9, and sixteen divisions where Nx=4, Ny=4, and N.sub.LF=16.
(179) As described above, the image processing apparatus (image processing circuit 125) in each embodiment includes an acquisition unit 125a and an image processing unit 125b (correction unit). The acquisition unit 125a acquires a parallax image generated based on a signal of one of a plurality of photoelectric converters that receive light beams passing through partial pupil regions in an imaging optical system that are different from each other, and acquires a captured image by combining signals from the plurality of photoelectric converters. The image processing unit 125b performs a correction process so as to reduce a defect (such as a dot flaw and a line flaw) contained in the parallax image based on the captured image.
(180) Preferably, the image processing unit 125b corrects a pixel value (pixel signal) of the parallax image at a first position (position to be corrected) that is determined to be defective by using a pixel value (pixel signal) of the captured image at the first position. More preferably, the image processing unit 125b corrects the pixel value of the parallax image at the first position based on a pixel value I of the captured image at the first position, a pixel value of the parallax image at a second position that is not determined to be defective, and a pixel value of the captured image at the second position. The second position is a position of a pixel near (or around) the first position (position to be corrected). More preferably, the second position is a position adjacent to the first position in a predetermined direction (a vertical direction, a horizontal direction, or an oblique direction on the pixel arrangement).
(181) Preferably, when the pixel value of the parallax image or the captured image at the second position is less than a predetermined luminance value (parameter A0 or I0), the image processing unit 125b replaces the pixel value with the predetermined luminance value. More preferably, the predetermined luminance value is set to change depending on the number of partial pupil regions. Preferably, the predetermined luminance value is set to change depending on the first position (position to be corrected). Preferably, the predetermined luminance value is set to change depending on imaging condition information. The imaging condition information includes at least one of an ISO speed, an F-number of the imaging optical system, and an exit pupil distance.
(182) Preferably, the image processing apparatus includes a memory (memory 134) that stores defect information on the first position, or an inspector configured to inspect the defect information on the first position. The image processing unit 125b performs the correction process based on the defect information stored in the memory or the defect information obtained as an inspection result by the inspector.
(183) Preferably, the parallax image is generated by collecting light receiving signals from a plurality of subpixels (a plurality of first subpixels, a plurality of second subpixels, a plurality of third subpixels, and a plurality of fourth subpixels) included in one photoelectric converter for each of the partial pupil regions in the imaging optical system different from each other. The captured image is generated by collecting light receiving signals from all subpixels (a plurality of first subpixels and a plurality of second subpixels, and, in addition, a plurality of third subpixels and a plurality of fourth subpixels if necessary) included in the plurality of photoelectric converters.
(184) Preferably, the parallax images include a first parallax image and a second parallax image which correspond to respective light beams passing through the partial pupil regions in the imaging optical system different from each other. Then, the acquisition unit 125a acquires the captured image and the first parallax image in the parallax images from an image pickup element 107 including the plurality of photoelectric converters. The image processing unit 125b performs the correction process for the first parallax image in the parallax images. Then, the image processing unit 125b generates the second parallax image by subtracting the corrected first parallax image from the captured image. Preferably, the image processing unit 125b (refocus unit) performs refocus process for the captured image based on the corrected parallax image.
(185) Preferably, the image processing unit corrects a light amount or shading in the parallax image based on the captured image. More preferably, the image processing unit performs a light amount correction process of a parallax image for each color in the parallax image based on the captured image. More preferably, the image processing unit performs the light amount correction process for the parallax image based on the projection signal of the captured image and the projection signal of the parallax image. More preferably, after the image processing unit performs a light amount correction process for a parallax image, the image processing unit corrects a parallax image so as to reduce the defect contained in the parallax image after the light amount correction process is performed based on the captured image.
Other Embodiments
(186) Embodiments of the present invention can also be realized by a computer of a system or an 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 and/or that includes one or more circuits (e.g., an application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiments, and by a method performed by the computer of the system or the 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 controlling the one or more circuits to perform the functions of one or more of the above-described embodiments. The computer may comprise one or more processors (e.g., a central processing unit (CPU), or a micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and to 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), a digital versatile disc (DVD), or a Blu-ray Disc (BD)) a flash memory device, a memory card, and the like.
(187) Each embodiment can provide an image processing apparatus, an image pickup apparatus, an image pickup apparatus, an image processing method, and a non-transitory computer-readable storage medium, each of which can generate a parallax image having an improved quality.
(188) While the present invention has been described with reference to exemplary embodiments, the invention is not limited to the disclosed exemplary embodiments and various variations and modifications may be made without departing from the scope of the invention.