This application is based on claims the benefit of priority from the prior Japanese Patent Application No. 2010-207831, filed on Sep. 16, 2010; the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to an image processing apparatus which enhances an image.
An image processing apparatus is known in which an image is processed such that pixels having the degree of depth of near view are relatively conspicuous compared to pixels having the degree of depth of distant view, thereby improving the sense of depth or stereoscopic effect of the image.
However, in the related art, there is a problem in that the resultant image is unnatural. In capturing an image by a camera, light reaches a sensor through a lens. When a human being observes something, light reaches the retina through the cornea or crystalline lens serving as a lens. Thus, the most conspicuous portion in an image captured by a camera or an image observed through eyes of a human being is not necessarily the near view. That is, a conspicuous area of an image, which has been processed in the related art such that a near view portion therein is more conspicuous than the other portion, is different from that of an image, which is obtained when a camera is focused on a certain portion or is observed when a human being watches a certain portion. Therefore, such an image is unnatural.
In general, according to one embodiment, an image processing apparatus includes a difference calculation unit, an intensity calculation unit, and an enhancing unit. The difference calculation unit calculates, for each partial area of an input image, a difference between a depth value of a subject and a reference value representing a depth as a reference. The intensity calculation unit calculates for each partial area an intensity, which has a local maximum value when the difference is 0 and has a greater value as the absolute value of the difference is smaller. The enhancing unit enhances each partial area according to the intensity to generate an output image.
Hereinafter, embodiments of an image processing apparatus will be described in detail with reference to the accompanying drawings.
An image processing apparatus according to a first embodiment enhances pixels in an image with strong intensity, the pixels having a depth that is close to a reference depth (reference value). With this, an image is generated in which a subject at a depth close to a reference value is distinctively (clearly) visible. Therefore, a person who views the generated image feels a sense of depth and a stereoscopic effect when viewing the subject.
As shown in
The difference calculation unit 104 calculates the difference between the depth value of a captured subject and the reference value 103 for each partial area of the input image 101, and outputs difference data 105. The intensity calculation unit 106 calculates intensity, which has a local maximum value when the calculated difference is 0 and has a greater value as the absolute value of the difference is smaller, for each partial area. The enhancing unit 108 generates and outputs the output image 109 in which the input image 101 is enhanced with the calculated intensity for each partial area.
As shown in
The difference data 105 is calculated by subtracting the reference value 103 from the depth value of each pixel in the depth data 102 and has the value of difference for each pixel.
Returning to
The value of intensity of each pixel is calculated by, for example, the value of difference of the pixel in difference data 105 and a function or a table which defines the relationship between the value of difference and the intensity.
The value of intensity of each pixel may be calculated by a function or a table which defines the relationship between the depth value, the reference value, and the intensity.
As shown in
Returning to
The output image 109 is generated by enhancing at least one of the brightness and saturation of the input image 101 on the basis of the intensity data 107. In enhancing, for example, a sharpening filter, such as an unsharp mask filter or a Laplacian filter, is used. The collection of pixels which is referenced in enhancing the value of a target pixel, a pixel to be processed by the sharpening filter is predefined. The collection of pixels to be referenced is, for example, a set of three pixels in each of the longitudinal and lateral directions horizontal centering on the target pixel.
In an image captured by a camera, the depth of a subject which is distinctively visible and the depth of a subject which is not distinctively visible will be described in connection with an example of
In the example of
As described above, according to the image processing apparatus 10 of the first embodiment, it is possible to enhance an image with strong intensity for a pixel having a depth close to the reference value 103. For this reason, an image is generated in which a subject at a depth close to the reference value 103 is distinctively visible. In an image which is obtained when the camera is focused to a certain portion, a subject at the depth is distinctively visible and thus conspicuous. Since the cornea and crystalline lens of the human being serves as a lens and the retina serves as a sensor, the same is applied when a person watches a certain portion. Therefore, a person who views the output image 109 generated by the image processing apparatus 10 of this embodiment feels a sense of depth and a stereoscopic effect when an object at the reference value 103 is watched.
It might be possible to impart a sense of depth or a stereoscopic effect by gradating an image; however, gradating an image is not necessarily desired by a person who views an image. In this embodiment, enhancing is done regardless of whether an image is gradated or not, such that a sense of depth and a stereoscopic effect are imparted when an object at the reference value 103 is watched.
Modification Relating to Partial Area
A case has heretofore been described where depth data 102 has a depth value in units of pixels of the input image 101. A partial area may not be the pixel of the input image 101. For example, the partial area may be a set of pixels of the input image 101. In this case, data which is obtained by interpolating the depth value of each pixel may be defined as depth data 102. Furthermore, the partial area may be an area smaller than the pixel of the input image 101. In this case, data obtained by integrating the depth value of each area, which is smaller than the pixel of the input image 101, and generating the depth value of each pixel may be defined as depth data 102. This modification also has the same effects as in the first embodiment.
Modification Relating to Depth Value
A case has heretofore been described where the depth value increases as the distance from the viewpoint is greater. In this case, as the distance from the viewpoint is smaller, the depth value is smaller. To the contrary, a form may be used in which, as the distance from the viewpoint is smaller, the depth value increases. In this case, the above-described process may be applied while the magnitude of the value is inverted. This modification also has the same effects as in the first embodiment.
Modification Relating to Enhancing
An example has heretofore been described where the sharpening filter is used to enhance an image. The brightness or saturation may be enhanced through image processing other than the sharpening filter. For example, at least one of the brightness and saturation of an image may be enhanced through gradation correction using a tone curve.
In order to enhance a set of pixels having a depth close to the reference value 103, a tone curve which has a slope greater than 1 in that portion is used. For description, it is assumed that the value of brightness or saturation of a portion having a depth close to the reference value 103 is mainly from a value 2501 to a value 2502 of
In the example of
For simplification of description, a modification has been described in which an image is enhanced through gradation correction using a single tone curve. In contrast, a configuration may be made such that an image is divided into partial images, and different tone curves are used for the divided partial images. Thus, the histogram relating to the brightness or saturation of a set of pixels having a depth when the difference from the reference value 103 is within a threshold value is enhanced finely for each, partial image.
With regard to the shape of a tone curve, the number of portions having a slope greater than 1 is not limited to one. For example, when there is a plurality of subjects having a depth value close to the reference value 103, as shown in
Of course, like a tone curve shown in
An image processing apparatus according to a second embodiment reduces the value of intensity which enhances a pixel at the boundary between objects or at the boundary between sites having a great difference in depth of an object having distinct irregularities. Therefore, it is possible to suppress a shoot of the sharpening filter.
As shown in
The second embodiment is different from the first embodiment in that the boundary degree calculation unit 1301 is further provided, and the intensity calculation unit 1303 has a different function. Other parts and functions are the same as those shown in
The boundary degree calculation unit 1301 calculates a boundary degree, which has a greater value as the difference between the depth value of a partial area and the depth value of a peripheral area of the partial area is greater, for each partial area (pixel). The intensity calculation unit 1303 calculates intensity, which has a local maximum value when the calculated difference is 0, has a greater value as the absolute value of the difference is smaller, and has a greater value as the boundary degree is smaller, for each partial area.
Steps S21 and Step S24 of
A method of calculating the boundary degree will be described with reference to
Returning to
When the value of difference and the value of boundary degree are input, the value of intensity is calculated by a function which outputs the value of intensity. Alternatively, when the value of difference and the value of boundary degree are input, the value of intensity is calculated by a table which outputs the value of intensity. When the calculation is performed using the function, it is not necessary to provide a memory for holding a table. When the calculation is performed using the table, the cost for computing the value of the function can be eliminated.
The intensity calculation unit 1303 is different from the intensity calculation unit 106 of the first embodiment in that, when the boundary degree of a certain pixel in the boundary degree data 1302 represents the boundary between objects or the boundary between sites having a great difference in depth of an object having distinct irregularities, the value of intensity of the pixel is reduced.
As described above, in the image processing apparatus 130 of the second embodiment, the intensity when a pixel having a great boundary degree is enhanced is reduced. Thus, there is the effect of suppressing a shoot of the sharpening filter. Hereinafter, the suppression effect will be described.
In the sharpening filter, the value of a pixel, such as brightness or saturation, is enhanced. The enhancing is realized by separating the value of a target pixel from a representative value of the value of a peripheral area (peripheral reference pixel) of the target pixel. The left side of
As shown in
In the second embodiment, the boundary degree which increases at the boundary between objects or at the boundary between sites having a great difference in depth of an object having distinct irregularities is calculated, and the intensity of enhancing is weakened as the boundary degree is great. For this reason, it is possible to suppress the occurrence of a shoot at the boundary. Furthermore, the second embodiment also has the same effects as in the first embodiment.
Modification Relating to Method of Calculating Boundary Degree
An example has heretofore been described where the difference between the depth value in the depth data 102 of each pixel in the pixel set 1601 and the depth value in the depth data 102 of the pixel 1501 is calculated, and the maximum value of the absolute value of the difference is calculated as the value of boundary degree of the pixel 1501. The method of calculating a boundary degree is not limited thereto. For example, the difference between the depth value in the depth data 102 of each pixel in the pixel set 1601 and the depth value in the depth data 102 of the pixel 1501 may be calculated, and the maximum value of a square of the difference may be calculated as the value of boundary degree of the pixel 1501. The difference between the depth value in the depth data 102 of each pixel in the pixel set 1601 and the depth value in the depth data 102 of the pixel 1501 may be calculated, and the sum of the absolute values or squares of the difference may be calculated as the value of boundary degree of the pixel 1501. In any cases, the same effects as the embodiment are obtained.
An image processing apparatus according to a third embodiment sets the depth value of a reference subject designated by the user as a reference value. Thus, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches a subject desired to watch.
As shown in
The third embodiment is different from the second embodiment in that the reference value setting unit 1802 is further provided. Other parts and functions are the same as those shown in
The reference value setting unit 1802 sets the depth value of a reference subject 1801 designated as a reference out of subjects in the input image 101 as a reference value.
As shown in
The reference subject 1801 is data which specifies the position or region of a subject to be enhanced in the input image 101. For example, the reference subject 1801 is coordinate data which represents the position in the input image 101. In this case, the depth value in the depth data 102 of a pixel nearest the position represented by the coordinate data is set as the reference value 103. Alternatively, the reference subject 1801 may be coordinate data of the four corners of a rectangular partial area in the input image 101. In this case, the average value of the depth values in the depth data 102 of one or more pixels included in the partial area represented by coordinate data is set as the reference value 103. The reference subject 1801 is designated by, for example, the user of the image processing apparatus 180 through a user interface and input to the image processing apparatus 180.
With the third embodiment, the reference subject 1801 is designated by an instruction of the user, and the depth value of the reference subject 1801 is set as the reference value 103. For this reason, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches a subject desired to watch.
An image processing apparatus according to a fourth embodiment sets the depth value of a reference subject detected from an image as a reference value. Thus, even when there is no instruction of the user, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches a subject.
As shown in
The fourth embodiment is different from the third embodiment in that the reference subject setting unit 2001 is further provided. Other parts and functions are the same as those shown in
The reference subject setting unit 2001 detects the face of a character or the like from the input image 101 through a face detection process, and sets the detected face or a subject including the detected face as a reference subject 1801.
As shown in
As described above, with the fourth embodiment, the region of a face of a character can be set as the reference subject 1801. For this reason, even when there is no instruction of the user, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches the face.
Modification 1 Relating to Reference Subject
When there are a plurality of faces in the input image 101, coordinate data of the four corners of a rectangle representing the region of a face of maximum size may be set as the reference subject 1801. Thus, even when there is no instruction of the user, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches a face of maximum size.
Modification 2 Relating to Reference Subject
When there are a plurality of faces in the input image 101, coordinate data of the four corners of a rectangle representing the region of a sharpest face may be set as the reference subject 1801. The degree of sharpness is, for example, power of a high-frequency component calculated through frequency analysis. Thus, even when there is no instruction of the user, a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches a sharpest face.
Modification 3 Relating to Reference Subject
A camera may be further provided in the reference subject setting unit 2001, detects a user's gaze direction through a gaze detection process from a image captured by the camera. Coordinate data of a position which is watched by the user may be calculated, and the calculated coordinate data may be set as the reference subject 1801. Thus, a region which is actually watched by the user is enhanced strongest, such that a sense of depth and a stereoscopic effect are imparted to the user in such a manner that the user watches the region.
Modification 4 Relating to Reference Subject
The input image 101 may be a plurality of parallax images. A parallax image is an image which is viewed from a plurality of viewpoints having parallax. The reference subject setting unit 2001 sets a region where there is no parallax between parallax images respectively entering the right eye and the left eye from a viewpoint to be supposed (a region where parallax is smaller than a predetermined threshold value) as the reference subject 1801. The enhancing unit 108 enhances at least one of the brightness and saturation of at least one of a plurality of parallax images (input image 101) on the basis of intensity data 107 to generate the output image 109.
The effects when a region where there is no parallax is set as the reference subject 1801 will be described in connection with an example where the input image 101 is a binocular parallax image.
As shown in
As described above, according to the first to fourth embodiments, an image is enhanced with stronger intensity for a pixel having a depth closer to a depth (reference value) as a reference. Therefore, it is possible to generate an image in which a subject at a depth close to the reference value is distinctively (clearly) visible, making it possible to impart a sense of depth and a stereoscopic effect to a person who views the generated image when the person watches a subject.
Next, the hardware configuration of the image processing apparatus according to each of the first to fourth embodiments will be described with reference to
The image processing apparatus according to each of the first to fourth embodiments includes a control device, such as a Central Processing Unit (CPU) 51, a storage device, such as a Read Only Memory (ROM) 52 or a Random Access Memory (RAM) 53, a communication I/F 54 which is connected to a network and performs communication, an external storage device, such as an Hard Disk Drive (HDD) or a Compact Disc (CD) drive device, a display device, such as a display, an input device, such as a keyboard or a mouse, and a bus 61 which connects the units. The image processing apparatus has a hardware configuration in which a typical computer is used.
An image processing program which is executed in the image processing apparatus according to each of the first to fourth embodiments is recorded on a computer-readable medium, such as a Compact Disk Read Only Memory (CD-ROM), a flexible disk (FD), a Compact Disk Recordable (CD-ROM), or a Digital Versatile Disk (DVD), in an installable format or executable format and provided as a computer program product.
The image processing program which is executed in the image processing apparatus according to each of the first to fourth embodiments may be stored in a computer connected to a network, such as Internet, and downloaded through the network. The image processing program which is executed in the image processing apparatus according to each of the first to fourth embodiments may be provided or distributed through a network, such as Internet.
The image processing program of each of the first to fourth embodiments may be embedded in a ROM or the like in advance and provided.
The image processing program which is executed in the image processing apparatus according to each of the first to fourth embodiments may be configured as a module including the above-described units (the difference calculation unit, the intensity calculation unit, and the enhancing unit). As actual hardware, the CPU 51 (processor) reads the image processing program from the storage device and executes the image processing program, such that the above-described units are loaded and generated on a main storage device.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2010-207831 | Sep 2010 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
6157733 | Swain | Dec 2000 | A |
6496598 | Harman | Dec 2002 | B1 |
6900799 | Takeuchi | May 2005 | B2 |
7260270 | Kusaka | Aug 2007 | B2 |
8520134 | Gomi et al. | Aug 2013 | B2 |
20030071765 | Suyama et al. | Apr 2003 | A1 |
20050069194 | Kagitani | Mar 2005 | A1 |
20060133667 | Schoelkopf et al. | Jun 2006 | A1 |
20060204034 | Steinberg et al. | Sep 2006 | A1 |
20070097207 | Toriumi | May 2007 | A1 |
20070121094 | Gallagher et al. | May 2007 | A1 |
20070126921 | Gallagher et al. | Jun 2007 | A1 |
20080131019 | Ng | Jun 2008 | A1 |
20080174605 | Kiuchi et al. | Jul 2008 | A1 |
20080240557 | Christie | Oct 2008 | A1 |
20090022396 | Watanabe et al. | Jan 2009 | A1 |
20090034871 | Keshet et al. | Feb 2009 | A1 |
20100097476 | Marks | Apr 2010 | A1 |
20110026051 | Wang | Feb 2011 | A1 |
20110158504 | Turner et al. | Jun 2011 | A1 |
20120076433 | Ono et al. | Mar 2012 | A1 |
Number | Date | Country |
---|---|---|
2009-038794 | Feb 2009 | JP |
2010-045457 | Feb 2010 | JP |
Entry |
---|
Jung, Jae-Ii, et al. “Improved depth perception of single-view images.” Ecti Transactions on Electrical Eng., Electronics, and Communications 8 (2010): 164-172. |
Japanese Office Action for Japanese Application No. 2010-207831 mailed on Aug. 14, 2012. |
Number | Date | Country | |
---|---|---|---|
20120070069 A1 | Mar 2012 | US |