This disclosure is related to interpolating color pixel signal values for an image and, in particular, interpolating color pixel signal values using hue.
As is well-known, in a variety of circumstances, it is desirable to perform color interpolation. For example, for a camera or other imager that has the capability of creating a color image, typically it is too expensive to have the capability to capture three independent color pixel signal values for each pixel location of an image at least on part because this would employ additional sensors. Therefore, more typically, a subsampled color image is captured and then the missing color pixel signal values are computed using techniques of color interpolation. Most of the existing simple color interpolation techniques typically do not produce high-quality color images. Therefore, a need continues to exist for color interpolation techniques capable of producing quality color images from a subsampled color image.
The subject matter regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, both as to organization and method of operation, together with objects, features, and advantages thereof, may best be understood by reference to the following detailed description when read with the accompanying drawings in which:
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
As previously indicated, in a variety of circumstances it may be desirable to have a capability to interpolate color pixel signals from a subsampled color image in order to recover the missing color components in a particular pixel location.
In this particular embodiment of a method of using hue to interpolate color pixel signals in accordance with the present invention, color interpolation is accomplished by comparing, for a particular pixel location in a subsampled color image, relative differences in hue for two mutually orthogonal directions across the particular pixel location. Hue, in this context, for red and blue, refers to the relative signal value of a blue or red signal value to a green signal value at a given pixel location. It is assumed that if a significant change in hue occurs in a particular direction, the color pixel signal values in that direction are not as representative of the color pixel signal values at the particular pixel location as are the color pixel signal values from the mutually orthogonal direction. For example, it may be that in the image, an edge is being encountered. Therefore, in computing the color signal value for that particular pixel location, the change in hue for a direction that indicates less change in hue is weighed more heavily, in this particular embodiment. It is believed that this is more representative of how the human eye perceives color because the human vision system is more responsive to the relative change of color in neighboring pixels than to the color information in the pixel itself. In addition, as explained in more detail hereinafter, in computing pixel signal values for particular colors, the change in hue from both directions are weighed, instead of only using the change in hue from one direction to the exclusion of the other direction.
RCH—hor=|½×[−Rm,n−2+2Gm,n−1−2Gm,n+1+Rm,n+2]|
RCH—ver=|½×[−Rm−2,n+2Gm−1,n−2Gm+1,n+Rm+2,n]| [1]
It is noted that for convenience, for the equations throughout the text of this specification, such as equations [1] above, it is assumed that the pixel signal values employed, such as Ri,j or Gi,j, for example, are the logarithm of the pixel signal values having the corresponding designation from the subsampled image.
If the relative change in hue in the vertical direction is greater than the relative change in hue in the horizontal direction, then the values in the horizontal direction, that is, in this embodiment, the green and red pixel signal values that are the immediately adjacent pixel signal values in the horizontal direction, are weighed more heavily. In this embodiment, the weight assigned to these, 0.5 here, has been chosen based at least in part on fuzzy assignment concepts and experimentation, although the invention is not limited in scope in this respect. It is noted that other weights may be employed and provide satisfactory results. At the same time, the weights assigned to vertical signal values have been chosen as 0.1, although the invention is not limited in scope in this respect. On the basis of the above discussion, the missing green pixel signal values in this particular pixel location is estimated, in this embodiment, as
Gm,n=[0.5*(Ihor)+0.1*(Iver)]/(0.5+0.1); or
Gm,n=2[0.41667*(Ihor)+0.08333*(Iver)];
where
Ihor=(Gm−1,n+Gm+1,n)/2+0.5×(−Rm−2,n+2Rm,n−Rm+2,n)/4
Iver=(Rm,n−1+Rm,n+1)/2+0.5×(−Rm,n−2+2Rm,n−Rm,n+2)/4 [2]
If the relative change in hue in the horizontal direction is greater than the relative change in hue in the vertical direction, then a reverse approach is employed. More particularly, the pixel signal signal values in the alternate directions, in this particular embodiment, are weighed more heavily. In particular, the green pixel signal value in this particular pixel signal location for such a situation is estimated as follows.
Gm,n=2[0.08333*(Ihor)+0.41667*(Iver)];
It is noted that the form of this equation is similar to the form above, except that the vertical and horizontal pixel signal values that were computed are interchanged. Finally, if the two relative changes are equal, or substantially equal, then a simple average of Iver and Ihor are employed in this embodiment.
Gm,n=0.5*(Ihor+Iver);
Therefore, in order to compute the signal value for the green color plane, where the particular pixel location has a pixel signal value in the red color plane, the relative change in hue in mutually orthogonal directions is compared. It is noted that where the particular pixel location has a blue pixel signal value in the Bayer pattern shown in
hue—nw=Bm−1,n−1−Gm−1,n−1;
hue—sw=Bm+1,n−1−Gm+1,n−1;
hue—ne=Bm−1,n+1−Gm−1,n+1;
hue—se=Bm+1,n+1−Gm+1,n+1; [3]
Then, the related change in hue along the main diagonal and the secondary diagonal may be computed as follows.
hue—md=|hue—nw−hue—se|;
hue—sd=|hue—ne−hue—sw|; [4]
As discussed above, if the hue in any particular direction changes more significantly, then the hue in the mutually orthogonal direction is employed to estimate the blue pixel signal value in a particular pixel location. More accurately, that direction in which there is less relative change in hue is weighed more heavily than in the direction in which the relative change in hue is greater. Employing the relative change in hue in this fashion, the blue pixel signal value may be estimated as follows, assuming the relative relative change in hue along the main diagonal is less.
Bm,n=(Gm,n)+0.41667*((Bm−1,n−1−Gm−1,n−1)+(Bm+1,n+1−Gm+1,n+1))+0.08333*((Bm−1,n+1−Gm−1,n+1)+(Bm+1,n−1−Gm+1,n−1)); [5]
Likewise, a similar equation is employed for the opposing diagonal, except that the signal values along the diagonals are interchanged, providing the following equation.
(Bm,n)=(Gm,n)+0.08333*((Bm−1,n−1−Gm−1,n−1)+(Bm+1,n+1−Gm+1,n+1))+0.41667*((Bm−1,n+1−Gm−1,n+1)+(Bm+1,n−1−Gm+1,n−1)) [6]
It is noted that interpolation of a red pixel signal value for a particular pixel location having a blue pixel signal value may be obtained using a similar approach except that in the above equation the blue pixel signal values are interchanged with red pixel signal values.
This is because, as illustrated in
hue—n=Bm−1,n−G m−1,n;
hue—e=Bm,n+1−Gm,n+1;
hue—w=Bm,n−1−Gm,n−1;
hue—s=Bm+1,n−Gm+1,n;
hhor=hue—e−hue—w;
hver=hue—n−hue—s, [7]
where Bm,n+1 and Bm,n−1 are obtained from the previous interpolation calculation.
A similar approach may be employed to interpolate the red pixel signal value where the particular pixel location of the subsampled image includes a green pixel signal value, except that in the equations provided above, the blue pixel signal values are replaced by red pixel signal values, as follows
hue—n=Rm−1,n−Gm−1,n
hue—e=Rm,n+1−Gm,n+1;
hue—w=Rm,n−1−Gm,n−1;
hue—s=Rm+1,n−Gm+1,n;
hhor=hue—e−hue—w;
hver=hue—n−hue—S, [8]
where Rm−1,n and Rm+1,n (or Rm,n−1 and Rm,n+1 depending on whether the particular pixel is located in the red-green row or blue-green row) are obtained from the previous interpolation calculation.
It will, of course, be appreciated that the invention is not restricted in scope to a particular embodiment or implementation. For example, the foregoing approach, as one example of an approach in accordance with the invention, may be implemented in hardware, in software, in firmware, and/or any combination thereof. Again, intended merely as examples that do not limit the scope of the invention, an embodiment may comprise an imager including hardware, such as integrated circuit chips, that implement the foregoing. Alternatively, the imager may be coupled to a computing platform that includes software capable of implementing the foregoing. Likewise, a digital camera coupled to a desktop personal computer, for example, may implement an embodiment. Furthermore, these implementations in hardware and software may, of course, deviate from the foregoing and still be within the scope of the present invention.
For embodiments that are at least partially implemented in software, such as, for example, the previously described embodiment, such software may reside on a storage medium, such as, for example, random access memory, a CD ROM, a floppy disk, or a hard drive, such that instructions are stored, which, when executed, such as by a computing platform, such as a PC or other computing device, so that the system is capable of executing the instructions to result in the interpolation of color pixel signal values from a subsampled image. Likewise, such software may reside in firmware also, such as in flash memory or EEPROM, for example.
While certain features of the invention have been illustrated and described herein, many modifications, substitutions, changes and equivalents will now occur to those skilled in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the invention.
This patent application is a continuation-in-part of U.S. patent application Ser. No. 09/410,800, titled “Method of Interpolation Color Pixel Signals from a Subsampled Color Image,” by Acharya et al., filed on Oct. 1, 1999, assigned to the assignee of the present invention and herein incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
4605956 | Cok | Aug 1986 | A |
4642678 | Cok | Feb 1987 | A |
5014134 | Lawton et al. | May 1991 | A |
5321776 | Shapiro | Jun 1994 | A |
5373322 | Laroche et al. | Dec 1994 | A |
5392255 | LeBras et al. | Feb 1995 | A |
5398066 | Martinez-Uriegas et al. | Mar 1995 | A |
5491561 | Fukuda | Feb 1996 | A |
5513281 | Yamashita et al. | Apr 1996 | A |
5541653 | Peters et al. | Jul 1996 | A |
5552827 | Maenaka et al. | Sep 1996 | A |
5602589 | Vishwanath et al. | Feb 1997 | A |
5629734 | Hamilton et al. | May 1997 | A |
5706220 | Vafai et al. | Jan 1998 | A |
5737448 | Gardos | Apr 1998 | A |
5875122 | Acharya | Feb 1999 | A |
5892847 | Johnson | Apr 1999 | A |
5901242 | Crane et al. | May 1999 | A |
5995210 | Acharya | Nov 1999 | A |
6009201 | Acharya | Dec 1999 | A |
6009206 | Acharya | Dec 1999 | A |
6047303 | Acharya | Apr 2000 | A |
6091851 | Acharya | Jul 2000 | A |
6094508 | Acharya et al. | Jul 2000 | A |
6108453 | Acharya | Aug 2000 | A |
6124811 | Acharya et al. | Sep 2000 | A |
6130960 | Acharya | Oct 2000 | A |
6151069 | Dunton et al. | Nov 2000 | A |
6151415 | Acharya et al. | Nov 2000 | A |
6154493 | Acharya et al. | Nov 2000 | A |
6166664 | Acharya | Dec 2000 | A |
6178269 | Acharya | Jan 2001 | B1 |
6195026 | Acharya | Feb 2001 | B1 |
6215525 | Fujino | Apr 2001 | B1 |
6215908 | Pazmino et al. | Apr 2001 | B1 |
6215916 | Acharya | Apr 2001 | B1 |
6229578 | Acharya et al. | May 2001 | B1 |
6233358 | Acharya | May 2001 | B1 |
6236433 | Acharya et al. | May 2001 | B1 |
6236765 | Acharya | May 2001 | B1 |
6269181 | Acharya | Jul 2001 | B1 |
6275206 | Tsai et al. | Aug 2001 | B1 |
6285796 | Acharya et al. | Sep 2001 | B1 |
6292114 | Tsai et al. | Sep 2001 | B1 |
6295087 | Nohda | Sep 2001 | B1 |
6301392 | Acharya | Oct 2001 | B1 |
6348929 | Acharya et al. | Feb 2002 | B1 |
6351265 | Bulman | Feb 2002 | B1 |
6351555 | Acharya et al. | Feb 2002 | B1 |
6356276 | Acharya | Mar 2002 | B1 |
6366692 | Acharya | Apr 2002 | B1 |
6366694 | Acharya | Apr 2002 | B1 |
6373481 | Tan et al. | Apr 2002 | B1 |
6377280 | Acharya et al. | Apr 2002 | B1 |
6381357 | Tan et al. | Apr 2002 | B1 |
6392699 | Acharya | May 2002 | B1 |
6449380 | Acharya et al. | Sep 2002 | B1 |
6507364 | Bishay et al. | Jan 2003 | B1 |
6535648 | Acharya | Mar 2003 | B1 |
6570616 | Chen | May 2003 | B1 |
20010019630 | Johnson | Sep 2001 | A1 |
Number | Date | Country | |
---|---|---|---|
Parent | 09410800 | Oct 1999 | US |
Child | 09591867 | US |