This application claims priority under 35 U.S.C. §119(a) to a Patent Application filed in the Korean Intellectual Property Office on Jan. 15, 2009 and assigned Serial No. 10-2009-0003389, the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates generally to a method for adjusting white balance in an imaging device, and in particular, to a method for adjusting white balance of single-colored images.
2. Description of the Related Art
Image devices for providing and/or capturing color images require White Balance Adjustment (WBA) in order to maintain the same or similar color of a reproduced or captured image as or to a color of a related subject recognized by a user.
Due to a frequent change in conditions under which a subject is captured, particularly to a change in a light source for illuminating the subject or an external background with which the subject is captured, a color of the captured or reproduced image may be different from a color of the subject that the user first recognized. A human being may not sense a color change because of his/her high adaptability to colors regardless of illumination or background variations, whereas a color tone of a subject recognized by a user may be different from that of a captured or reproduced image since image devices, such as a digital camera and an image player, are limited in terms of adaptability to colors.
The white balance adjustment is a process of adjusting, as described above, an image having a different color tone from that of a subject recognized by a user such that the adjusted image may have the same or similar color as or to that of the subject the user first recognized. White balance, which is based on white regions among many different color regions in an image, is a color correction method of restoring a white color which may change depending on light sources (e.g., sunlight, a fluorescent lamp, and an incandescent lamp) for illuminating a subject or on backgrounds, to the initial white color that the user recognized.
One of the well-known white balance adjustment methods estimates a type of background lighting (light source) used for image capturing and adjusts white balance according to the estimated background lighting. This white balance adjustment method finds a white area in an image and adjusts a gain of each channel using a mean value of Red, Green Blue (RGB) values or color difference signals (R-Y) and (B-Y) in image information corresponding to the white area. Another white balance adjustment method adjusts a gain of each channel depending on a mean value per channel of the entire image, without estimating the light source. In this method, it is assumed that a color determined by a mean value of each channel is gray in a condition in which an input image undergoes a sufficient color change. That is, white balance of an image is sustainable by adjusting gains of RGB values of the image so that a mean value of each channel is constant.
The above-described white balance adjustment methods can adjust white balance only if an image to be white balance- adjusted, undergoes a sufficient color change or has white areas. Otherwise, the methods may cause color distortion.
An aspect of the present invention is to substantially solve at least the above problems and/or disadvantages and to provide at least the advantages below. Accordingly, an aspect of the present invention is to provide a method capable of adjusting white balance not only of a single-colored image, but also of an image with no white area.
According to an aspect of the present invention, there is provided a method for adjusting white balance, including transforming a plurality of input pixels into a digital color space, determining a hue region of each of the color-space transformed input pixels, and determining a transformation matrix according to the determined hue region.
The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawing in which:
Embodiments of the present invention will be described herein below with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail for the sake of clarity and conciseness.
That is, when there is an image to be white balance-adjusted, such as an image to be provided to a user or a captured image, the white balance adjustment method according to the present invention determines hue regions by transforming the image into a digital color space, and provides the user with an image that is transformed using a color table to which a transformation matrix based on the determined hue regions is applied.
The step S3 of transformation into a digital color space (YCbCr) can be defined as set forth in the following Equation (1).
Y=0.29990×R+0.5870×G+0.1140×B Cb=−0.1687×R−0.3313×G+0.5000×B Cr=0.5000×R−0.4187×G−0.0813×B (1)
In Equation (1), Y denotes a luminance component of the digital color space, and Cb and Cr denote different chrominance components of the digital color space. R, G and B denote a red coordinate, a green coordinate and a blue coordinate in the RGB coordinate system, respectively.
The digital color space (YCbCr) is a type of color space used in digital image devices, wherein Y denotes brightness, Cb denotes the strength of a blue color, and Cr denotes the strength of a red color.
That is, step S3 of transformation into a digital color space (YCbCr) is for transforming an image received in a form of a trichromatic system (RGB) based on the first color table into a form of the digital color space (YCbCr) which can be recognized by digital devices.
The hue region determination step S4 is for determining hue regions in which a captured single-colored subject or a single-colored image to be provided to a user is included. Each image, which is captured by digital devices or to be provided to the user, is comprised of a plurality of pixels, and each image on which the white balance adjustment is to be performed, such as the above-described image (image which is captured or to be provided to the user), is defined as an input image. Therefore, the input image described above is also made up of a plurality of pixels, and each pixel on which the white balance adjustment is to be performed is referred to as an input pixel.
The step S4 of determining a hue region of each of the digital-color-space transformed input pixels is for determining in which one of the hue regions in the form of the graph shown in
The above-described transformation matrix is used to obtain a new color table (R′G′B′), which is white-balance adjusted, and can be obtained using the following Equations (2) and (3). The transformation matrix can be selected according to a color to which a single-colored subject, which is to be white-balance adjusted, belongs. The transformation matrix determination step S5 can be described with reference to
I=LM×O (2)
IO−1=LM (3)
In Equations (2) and (3), I denotes image data 310 in each color (e.g., red, blue, green) according to each state (external conditions such as a light source), LM denotes data 330 in a color which is a criterion of each color to be transformed, and O denotes data 320 obtained by transforming the image data I.
That is, a matrix obtained in Equation (2) can be determined as a transformation matrix in each color through linear transformation (LM) in Equation (3).
The transformation matrix can be determined by acquiring single-colored images per light source, transforming each of the images acquired per light source into an original color based on information about each light source, and calculating a transformation matrix by performing linear transformation on image data before the transformation and image data after the transformation.
In transforming each of the images acquired per light source into an original color based on information about each light source, a gain is calculated per channel using mean RGB of a white image captured per light source as the information about each light source. The transformation into the original color can be performed by applying the calculated gain to a captured single-colored image. In calculating a 3×3 transformation matrix by performing linear transformation on image data before the transformation and image data after the transformation, mean RGB of the entire image is used as the image data before and after the transformation. A transformation matrix of each hue region can be obtained by performing this process on each hue region.
Thus, once a hue region of each input pixel is determined, a transformation matrix to be applied can be selected, and a new second color table (R′G′B′) can be calculated by applying the transformation matrix to a first color table (RGB) of the input pixel.
As is apparent from the foregoing description, according to embodiments of the present invention, by calculating a transformation matrix according to a hue region to which each input pixel belongs and applying a different transformation matrix to each of hue regions corresponding to the input pixels according to the calculated transformation matrix, it is possible to perform white balance adjustment on an image captured with a single-colored background, thus minimizing color distortion.
While the invention has been shown and described with reference to a certain preferred embodiment thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2009-0003389 | Jan 2009 | KR | national |