1. Field of the Invention
The present invention relates to an image capturing apparatus capable of reconstructing an image on an arbitrary refocus plane.
2. Description of the Related Art
Recently, among image capturing apparatuses such as an electronic camera, there is proposed an image capturing apparatus (light field camera) capable of acquiring even information of the incident direction of light in addition to the intensity distribution of light.
For example, according to “Ren. Ng and seven others, ‘Light Field Photography with a Hand-Held Plenoptic Camera’, Stanford Tech Report CTSR 2005-02”, a microlens array is interposed between an imaging lens and an image sensor, and one microlens corresponds to a plurality of pixels of the image sensor. Light having passed through the microlens is acquired by the plurality of pixels for respective incident directions. By applying a method called “Light Field Photography” to thus-acquired pixel signals (light field information), images focused on a plurality of image planes (refocus planes) can be reconstructed after shooting.
On the other hand, there is a demand for capturing an image which may give an illusion as to the size relationship between objects by using perspective in image capturing. For example, in a composition in which a person at a short distance appears to support a building at a long distance, as shown in
However, in shooting by a normal image capturing apparatus, the image capturing apparatus cannot focus on both of objects to be used for an illusion, and either object blurs, obtaining only a less effective trick art image.
Further, no proposal has been made for generation of an image such as a trick art image in the above-mentioned light field camera.
When focusing on both objects to be used for an illusion, as described above, if the objects exist outside the in-focus range, they become out of focus. To prevent this, when objects to be used for an illusion exist outside the in-focus range, a means which notifies the user of this is required. However, even such a means has not been considered so far.
The present invention has been made to solve the above-described problems, and provides an image capturing apparatus capable of easily reconstructing a trick art image intended by the user.
According to the first aspect of the present invention, there is provided an image capturing apparatus comprising: an image capturing unit configured to capture an image and generate light field image data; a selection unit configured to select an object from the captured image data; an associating unit configured to associate a plurality of objects selected by the selection unit; a reconstruction unit configured to reconstruct a plurality of images in which the plurality of objects associated by the associating unit are in focus, respectively; and a composition unit configured to composite the plurality of images reconstructed by the reconstruction unit.
According to the second aspect of the present invention, there is provided a method of controlling an image capturing apparatus including an image capturing unit configured to capture an image and generate light field image data, comprising: a selection step of selecting an object from the captured image data; an associating step of associating a plurality of objects selected in the selection step; a reconstruction step of reconstructing a plurality of images in which the plurality of objects associated in the associating step are in focus, respectively; and a composition step of compositing the plurality of images reconstructed in the reconstruction step.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
Reference numeral 101 denotes an imaging lens; 102, a microlens array; and 103, the image sensor. The microlens array 102 is constructed by a plurality of microlenses 1020. The image sensor 103 converts light, which has entered it via the microlenses 1020, into an electrical signal, and outputs the electrical signal to an A/D conversion unit 104.
The A/D conversion unit 104 digitizes the electrical signal, and outputs the digital data to an image processing unit 105. The image processing unit 105 performs various image generation processes such as white balance correction and color conversion, compression processing of compressing a generated image, composition processing of compositing a plurality of images, and object area detection processing and coordinate information association processing (to be described later). The processed image data is temporarily stored in a main memory 114 via a bus 112. The stored image data is recorded on an external recording medium (not shown) via a recording unit 115, or transmitted to an external apparatus (not shown) such as a personal computer via a communication unit 116. The display unit 106 displays the user interface screen of the image capturing apparatus, is used as an EVF, or displays a captured image.
The embodiment assumes that the image processing unit 105 has a function of performing calculation processing using a method called “Light Field Photography”, and reconstructing an image on an arbitrary refocus plane from captured image data.
Next, the arrangement of the imaging lens 101, microlens array 102, and image sensor 103 when acquiring a light field image will be explained.
The correspondence between pupil division areas a11 to a55 of the imaging lens 101 shown in
A method of calculating a refocus plane corresponding to an arbitrary object position in the frame will be explained.
As described with reference to
Expression (1) integrates beams having passed through the left area (pupil areas a11 to a52) of the exit pupil of the imaging lens 101 for the respective pixels of a given pixel array 20. This is applied to a plurality of pixel arrays 20 aligned in the horizontal direction, and an object image constructed by these output signals is defined as an A image. Expression (2) integrates beams having passed through the right area (pupil areas a14 to a55) of the exit pupil of the imaging lens 101 for the respective pixels of the given pixel array 20. This is applied to a plurality of pixel arrays 20 aligned in the horizontal direction, and an object image constructed by these output signals is defined as a B image. The correlation between the A and B images is calculated to detect an image shift amount (pupil division phase difference). Further, the image shift amount is multiplied by a conversion coefficient determined from the focus position of the imaging lens 101 and the optical system. As a result, a refocus plane corresponding to an arbitrary object position in the frame can be calculated.
Next, processing of reconstructing an image on an arbitrarily set refocus plane from captured image data acquired by the arrangement of the imaging lens 101, microlens array 102, and image sensor 103 will be explained.
Letting L(x′, y′, u, v) be an output from the pixel which receives this light, an output E(x, y) obtained at the coordinates (x, y) on the refocus plane is an integral of L(x′, y′, u, v) in regard to the pupil area of the imaging lens and is given by:
In equation (4), the refocus coefficient α is determined by the user. Thus, if (x, y) and (u, v) are given, the position (x′, y′) of a microlens which receives light can be obtained. Then, a pixel corresponding to the position (u, v) is obtained from a pixel array 20 corresponding to this microlens. An output from this pixel is L(x′, y′, u, v). This is executed for all pupil division areas, obtained pixel outputs are integrated, and thus E(x, y) can be calculated. If (u, v) are defined as the representative coordinates of a pupil division area of the imaging lens, the integration of equation (4) can be calculated by simple addition.
Image capturing processing and reconstruction processing for a light field image have been explained above. However, a light field image may be acquired from an external device by using the recording unit 115, communication unit 116, or the like, and is not limited to an image obtained by image capturing.
Next, a method of generating a trick art image in the first embodiment of the present invention will be explained.
An area except for objects to be used for an illusion effect of a trick art image will be called a background. An image having a great effect of a trick art can be obtained by setting the refocus plane of the background to be equal to that of one of objects to be used for an illusion. In the embodiment, it is desirable to generate an image in which the objects A and B are in focus because they are used for an illusion effect, and the objects C and D included in the background area are not in focus.
When the user starts an image capturing operation and selects the trick art mode, he selects objects to be used for a trick art in step S801. The selection operation is performed by operating the touch panel of the display unit 106.
In step S803, it is determined whether selection of all objects to be used for an illusion effect of a trick art has been completed. If the selection has not been completed, the process returns to step S801 to select an object again. If the selection has been completed, the process advances to step S804. This selection operation is completed by a half stroke (so-called SW1) of a shutter button included in the switch group 117.
In step S804, image capturing processing for a light field image is performed by a full stroke (so-called SW2) of the shutter button included in the switch group 117. In step S805, the coordinate information recorded in step S803 is associated as trick art coordinate information with the captured image data obtained in step S804, and recorded in the recording unit 115. The acquisition of captured image data to be used for a trick art image is thus completed.
Subsequently, playback of the image recorded in step S805 will be explained.
In step S1101, it is determined whether trick art coordinate information is associated with image data to be played back. If trick art coordinate information is associated, it is determined that image data to be played back is a trick art image, and the process advances to step S1102. If no trick art coordinate information is associated, it is determined that image data to be played back is not a trick art image, and the process advances to step S1104.
In step S1102, the trick art coordinate information associated with the image is read from the recording unit 115. In step S1103, the image processing unit 105 detects object areas to be used for an illusion effect of a trick art by using the trick art coordinate information read in step S1102, and records the result in the recording unit 115. Note that details of the object area detection method will be described later.
In step S1104, the image processing unit 105 reconstructs and composites images based on the detected objects. Note that details of the image reconstruction/composition method will be described later. In step S1105, the reconstructed image is displayed on the EVF.
In step S1106, it is determined whether the playback has ended. The playback ends when the user performs an operation such as selection of the end of the playback mode or a change of an image to be played back. If the user selects the end of the playback, the process ends. If the user does not end the playback, the process advances to step S1107.
In step S1107, the user selects, by a touch operation, an object to be in focus, and then the process advances to step S1104. Processing in step S1104 is performed in accordance with the object selected in step S1107. With this, the description of the operation in playback ends.
Next, details of the image reconstruction/composition method in step S1104 will be explained.
Then, an image is reconstructed at the focus position of an associated object except for the representative object out of the objects detected in step S1103. When there are a plurality of associated objects except for the representative object, reconstructed images are acquired by the number of associated objects. In the embodiment, an image reconstructed at the focus position of the object B is acquired.
The area of the detected object B is extracted from the acquired image of
In step S1107, a target to be in focus when reconstructing an image is selected by a touch operation. If the touched portion falls within the associated object area, the touched object is used as a representative object and the above-described image reconstruction/composition is performed. If the touched portion falls outside the associated object area, image reconstruction is performed at the focus position of the touched point.
A modification of the first embodiment will be explained. The object selection operation in step S801 of
In
Detection of the object area in step S1103 of
The representative object determination method in playback may include a distance recognition step, and an object closest to the image capturing apparatus may be adopted as a representative object. Alternatively, this method may include a personal authentication step, and an authenticated object may be set as a representative object. Alternatively, this method may include a person recognition step, and an object which is or is not a person may be set as a representative object. Alternatively, these steps may be combined to determine a representative object.
If a touched portion falls outside an associated object area in step S1107 of
As described above, an intended trick art image can be easily reconstructed by selecting objects to be used for a trick art and associating them with each other upon image capturing.
As the second embodiment, a case in which recorded captured image data are reconstructed into a trick art image in playback will be described. The arrangement of an image capturing apparatus is the same as that in the first embodiment, and a description thereof will not be repeated. A mode in which processing to be described in the embodiment is performed will be called a trick art playback mode.
In step S1401, it is determined whether the trick art playback mode has been selected. If the trick art playback mode has been selected, the process advances to step S1402. If the trick art playback mode has not been selected, the process advances to step S1406.
Processing in step S1402 is the same as that in step S801 of
In step S1404, it is determined whether selection of objects has been completed. If the selection has not been completed, the process returns to step S1402 to select an object again. If the selection has been completed, the process advances to step S1405. This selection operation is completed by operating a switch included in a switch group 117. Processes in steps S1405 to S1409 are the same as those in steps S1103 to S1107 of
As described above, according to the second embodiment, captured image data which were not obtained in the trick art mode can be easily reconstructed into an intended trick art image.
In the first and second embodiments, data acquired by the arrangement of the imaging lens, microlens array, and image sensor shown in
In the first and second embodiments, data acquired by the apparatus arrangement shown in
The third embodiment of the present invention will be described. The arrangement of an image capturing apparatus is the same as those in the first and second embodiments, and a description thereof will not be repeated. The third embodiment is different from the first embodiment in an operation when capturing an image to be used for a trick art, and only the difference will be explained.
When the user starts an image capturing operation and selects the trick art mode, he selects objects to be used for a trick art in step S1801. The selection operation is performed by operating the touch panel of a display unit 106.
The method of selecting objects in step S1801 is the same as the method described with reference to
In step S1810, the object distance to the point touched in step S1801 is calculated, and then the process advances to step S1811. The calculation of the distance can use the aforementioned pupil division phase difference, and a description thereof will be omitted.
In step S1811, it is determined whether the focus can be adjusted to the calculated object distance. A detailed determination method will be described later. If the focus can be adjusted to the calculated object distance, the process advances to step S1802; if it cannot be adjusted (outside the refocusable range), to step S1812.
In step S1812, as shown in
In step S1802, coordinate information of the point touched in step S1801 is recorded in a recording unit 115. In step S1803, it is determined whether selection of all objects to be used for an illusion effect of a trick art has been completed. If the selection has not been completed, the process returns to step S1801 to select an object again. If the selection has been completed, the process advances to step S1804. This selection operation is completed by a half stroke (so-called SW1) of a shutter button included in a switch group 117.
An example of the coordinate information held in step S1803 is the same as that already described with reference to
In step S1804, image capturing processing for a light field image is performed by a full stroke (so-called SW2) of the shutter button included in the switch group 117. In step S1805, the coordinate information recorded in step S1803 is associated as trick art coordinate information with the captured image data obtained in step S1804, and recorded in the recording unit 115. Accordingly, the acquisition of captured image data to be used for a trick art image is completed.
Next, the method of determining whether the focus can be adjusted to a calculated object distance, as described in step S1811, will be explained in detail with reference to
D<WD (5)
Since an object A in
In step S1812, the warning message 1900 is displayed as shown in
As described above, according to the third embodiment, when capturing images to be used for a trick art, if an object to be used for trick art exists outside the in-focus range, the user can be warned and notified of this.
The fourth embodiment of the present invention will be described. The arrangement of an image capturing apparatus is the same as those in the first to third embodiments, and a description thereof will not be repeated. The fourth embodiment is different from the second embodiment in an operation in reconstruction into a trick art image in playback, and only the difference will be explained. A mode in which processing to be described in the embodiment is performed will be called a trick art playback mode, similar to the second embodiment.
In step S2101, it is determined whether the trick art playback mode has been selected. If the trick art playback mode has been selected, the process advances to step S2102. If the trick art playback mode has not been selected, the process advances to step S2106.
Processing in step S2102 is the same as that in step S1801 of
In step S2103, coordinate information obtained by a touch in step S2102 is associated as trick art coordinate information with the image and recorded in a recording unit 115.
In step S2104, it is determined whether selection of objects has been completed. If the selection has not been completed, the process returns to step S2102 to select an object again. If the selection has been completed, the process advances to step S2105. This selection operation is completed by operating a switch included in a switch group 117. Processes in steps S2105 to S2109 are the same as those in steps S1103 to S1107 of
As described above, according to the fourth embodiment, captured image data which were not obtained in the trick art mode can be easily reconstructed into an intended trick art image. If an object to be used for an illusion exists outside the in-focus range, the user can be warned and notified of this.
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. 2013-027141, filed Feb. 14, 2013, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2013-027141 | Feb 2013 | JP | national |