Method for determining color space of an image
Granted 30 Aug 2005 · no office action yet
Assignee: Xerox
Law firm: Law firm · Log in to unlock
Attorney: Attorney · Log in to unlock
Inventors: Raja Bala · Examiner: Matthew C. Bella · AU 2676 · TC 2600
Life of the patent
8 dated eventsAbstract
A method for determining whether an input image is defined in accordance with a luminance-chrominance color space, includes receiving an input image in three dimensional color space, S 1 , S 2 and S 3 , where S 1 is an image value in the first dimension, S 2 is an image value in the second dimension and S 3 is an image value in the third dimension; extracting low and high extrema of S 1 values in the image; obtaining deviation of S 2 and S 3 from a predefined neutral axis for all pixels in the image whose S 1 value is either the low or the high extremum; testing a condition that certain of the deviations are within predetermined thresholds; and determining, if the condition holds true, that the image is in a luminance-chrominance color space.
Description
6 parts›FIELD OF THE INVENTION
This invention relates generally to color management systems and methods, and more particularly to a method for automatically determining the color space of an input image.
›BACKGROUND OF THE INVENTION
Color image reproduction systems include an input device for obtaining a representation of an original image and an output device for generating a replica of the image. Input and output devices use signals that represent the colors in the image as coordinates in some device dependent color space. The term “color space” refers to an N-dimensional space in which each point corresponds to a particular color. Examples of device-dependent three-dimensional color space include RGB (red (R), green (G) and blue (B)) and CMY (cyan (C), magenta (M) and yellow (Y)). Frequently, it is advantageous to transform device dependent color images into device independent color images. Examples of device independent color spaces include luminance-chrominance color spaces such as CIELAB, YC b C r , and HSV (hue saturation value) space.
In order to provide the correct output, the output device must know in which color space the input image is defined. Similarly, an image processing module that takes as input a color image must know the color space in which the image is defined. Incorrect assumptions on the colorimetry of image data can result in unpredictable and usually undesirable output quality from a color management system. A rather extreme case of this is when the assumed class of color space, e.g, RGB vs. CMY vs. luminance-chrominance, is incorrect. Many file formats encode the color space class in the header. However, a robust color management system must take into account cases where header information is incomplete, missing, or incorrect.
›SUMMARY OF THE INVENTION
A method is described for automatically determining whether a 3-channel color image is in a device dependent color space such as RGB or a luminance-chrominance color space. The method may be used to determine whether an input image is in luminance-chrominance space (such as YCC, LAB or HSV) or in a device dependent color space, such as RGB or CMY, without reference to any header or auxiliary information in the image file. Color space differentiation can be used in isolation or in conjunction with other image processing or analysis algorithms. The method is based on the concept that in a luminance-chrominance representation, when the first channel (e.g., luminance) takes on very low or high values, there are constraints in the allowable values taken on by the other two chrominance channels. Namely, for colors with very high or very low luminance, the chrominance values are expected to be on or close to the neutral axis of the luminance-chrominance space. The neutral axis definition depends on the encoding of the color space. For example, in most 8-bit luminance-chrominance encodings, the chrominance values of a neutral color are both typically 128. Thus colors with very high or very low luminance values are expected to have chrominance values close to 128. These constraints do not hold for the RGB or CMY case. This concept is used to distinguish the two classes of color spaces.
A method for determining whether an input image is defined in accordance with a luminance-chrominance color space, according to the invention, includes receiving an input image in three dimensional color space, S 1 , S 2 and S 3 , where S 1 is an image value in the first dimension, S 2 is an image value in the second dimension and S 3 is an image value in the third dimension; extracting low and high extrema of S 1 values in the image; obtaining deviation of S 2 and S 3 from a predefined neutral axis for all pixels in the image whose S 1 value is either the low or the high extremum; testing a condition that certain of the deviations are within predetermined thresholds; and determining, if the condition holds true, that the image is in a luminance-chrominance color space. If the condition is false, the image is in an RGB color space.
The entire input image need not be used; only a subset of the entire set of image pixels in the input image may be sampled. Extracting the low and high extrema of S 1 values in the image may be accomplished by creating a histogram for S 1 denoted by an array HIST, where HIST[i] is the number of image pixels whose S 1 value is equal to i; defining the high extremum i high to be the highest value of i for which HIST[i] is greater than a predetermined threshold K 1 ; and defining the low extremum i low to be the lowest value of i for which HIST[i] is greater than a predetermined threshold K 2
›BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a flow chart of a method for determining color space of an image.
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 1 of 2
Referring now to the drawing, FIG. 1 is a flow chart of a method of determining the color space of an input image. Denote the three separations of an input image as S 1 , S 2 , and S 3 step 10 ). If the image is in luminance-chrominance, then very high or low values of S 1 , the luminance component, correspond to colors near white and black, respectively, both of which are neutral colors. In these cases, the other 2 channels, S 2 , and S 3 should be similar in value, and close to the neutral value, e.g., 128 in an 8 bit representation. If the image is in RGB such a constraint does not exist. Very high or low values of S 1 (i.e., red) in ROB color space could occur with any combination of the other 2 channels.
There are some cases where the aforementioned assumption may not hold. For example, suppose a saturated yellow is the lightest color in a luminance-chrominance representation. This results in both the S 1 and yellow-blue dimensions taking on high values, and the red-green signal being in the vicinity of the neutral value. A similar situation occurs if a saturated blue is the darkest color in the image. However, the fact that there is a constraint on the red-green channel can be used to take care of both cases.
A specific implementation of the method to accomplish the classification is described below.
Referring again to FIG. 1 , create an array HIST which keeps a histogram of S 1 (step 12 ). Define two arrays A 1 and A 2 of length 256 (adjusted according to input data precision). As the image is visited, A 1 and A 2 are built as follows:
A 1 [i]=max (S 2 , S 3 ) over all pixels in the image for which S 1 =I (step 14 ) and A 2 [i]=min (S 2 , S 3 ) over all pixels image for which S 1 =I (step 16 ).
After the image has been traversed, define i low as the lowest value of i for which HIST[i] is greater than some threshold, t 1 (step 18 ). Define i high as the highest values of i for which HIST[i] is greater than some threshold, t 2 (step 20 ). The thresholds t 1 and t 2 are set to some small value in order to eliminate colors with very small pixel counts.
Next, define maximum deviations from neutral for the last two channels, occurring at S 1 =i low and S 1 =i high (step 22 ):
D 1 =abs(NEUTRAL−A 1 [i low]); D 2 =abs(NEUTRAL−A 2 [i high ]); D 3 =abs(NEUTRAL−A 2 [i low ]); and D 4 =abs(NEUTRAL−A 1 [i high ]),
where abs( ) denotes absolute value, and NEUTRAL denotes the assumed neutral value in the given color space encoding. For example, in an 8-bit luminance-chrominance encoding, NEUTRAL is typically 128. Generally D 1 –D 4 will take on small values in the case of luminance-chrominance images; while at least one of these will take on large values in the case of RGB images. To account for the blue and yellow cases described earlier for luminance-chrominance images, a larger range in the blue-yellow dimension must be allowed, while keeping a tighter constraint on the red-green dimension. Also, it must be noted that there are different flavors of luminance-chrominance spaces. In the YES and CIELAB spaces, the second and third dimensions represent red-green and yellow-blue variations respectively; while in YC b C r , the order and polarity are changed: the second and third dimensions are now blue-yellow and red-green. A simple classification rule that takes all these factors into account is:
If (D 1 <T 1 ) AND (D 2 <T 2 ) (step 24 ) classify as luminance-chrominance (CIELAB case) (step 26 ) else if (D 3 <T 3 ) AND (D 4 <T 4 ) (step 28 ) classify as luminance-chrominance (YC b C r case) (step 30 ) else classify as RGB (step 32 ),
where T 1 –T 4 are predetermined thresholds chosen from analyzing a set of training images.
To increase the efficiency of the method, the image may be sub-sampled, with only a small subset of pixels being traversed. Also, some cases of RGB input can be detected before the full image is swept. For example, if pixels in the vicinity of [255,255,255], [255,0,0], [0,0,0] etc., are encountered, it is already known that the data is in RGB.
The method has been demonstrated to successfully distinguish between luminance-chrominance space and RGB for a large set of test images. Based on an analysis of the parameters D 1 –D 4 for a set of training images, the following threshold values appear to produce good results for 8 bit image data: T 1 =T 3 =25, T 2 =T 4 =35.
One potential failure mode is the case where an RGB image, such as a test target, contains a small palette of colors chosen so that D 1 –D 4 all take on small values, thus looking like a luminance-chrominance image to the algorithm. In such cases, there is insufficient context for the method to determine the color space. In fact, unless other contextual knowledge is available, this confusion may well occur even with visual inspection. Appropriate checks on i low and i high , as well as a count of the number of distinct image colors can help identify such pathological cases, and have the method report a low degree of confidence in classification.
In the case where there is no header information, misclassification of RGB vs. luminance-chrominance will result in gross errors in downstream imaging all the way to the final output. In the case where header information is available, the method serves as an extra check to validate the color space, and can be combined with other image processing algorithms.
Another scenario where the method may be used is with documents comprising multiple image components assembled from different sources, and possibly in different color spaces. If the color space of each component is not individually labeled, this method can be used to extract this information, and attach the metadata to each component for correct processing by other imaging modules.
The invention has been described with reference to particular embodiments for convenience only. Modifications and alterations will occur to others upon reading and understanding this specification taken together with the drawings. The embodiments are but examples, and various alternatives, modifications, variations or improvements may be made by those skilled in the art from this teaching which are intended to be encompassed by the following claims.
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 2 of 2
The claims, as originally presented and as they may be amended, encompass variations, alternatives, modifications, improvements, equivalents, and substantial equivalents of the embodiments and teachings disclosed herein, including those that are presently unforeseen or unappreciated, and that, for example, may arise from applicants/patentees and others.
Claims
16 · 2 independent · depth 5Classifications
12 codes- G09G5/02
- H04N1/46
- H04N1/60
Claim changes
SoonSee which claims were amended, added or cancelled during examination, with every added and removed word marked.
The published claims of this patent are not paired with the granted ones in what we hold.
File wrapper
See the full prosecution history — every USPTO and applicant action on this file, in order.
Log in to unlockChain of title
See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.
Log in to unlockTerm & fees
See the term timeline — pendency span, in-force span, the maintenance fees paid and both computed expiry dates.
Log in to unlockPriority chain
1 priority documents›Priority documents — 1
| Type | Document | Date |
|---|---|---|
| related publication | US 20050128218 A1 | 16 Jun 2005 |
Worldwide family
4 members · 2 offices›IP5 & PCT — 4 members
| Office | Publication | Kind | Published | Filed | Status | Title |
|---|---|---|---|---|---|---|
| US | US-2005128218-A1 | A1 | 16 Jun 2005 | 11 Dec 2003 | published | Method for determining color space of an image |
| USthis patent | US-6937253-B2 | B2 | 30 Aug 2005 | 11 Dec 2003 | granted | Method for determining color space of an image |
| JP | JP-2005176384-A | A | 30 Jun 2005 | 10 Dec 2004 | published | Method for determining color space of image |
| JP | JP-4425123-B2 | B2 | 3 Mar 2010 | 10 Dec 2004 | granted | 画像の色空間を決定するための方法ja |
Validity challenges
See the validity challenges on record — reexaminations, IPRs and PGRs, with their institution decisions and outcomes.
Log in to unlockCitations
See every patent this one cites and every patent that cites it back — publication, assignee, and how each one was found.
Log in to unlock