Method and apparatus for identifying the color of an image

Abstract: A method, 400, and an apparatus, 102, to reduce the errors in linearly transforming the RGB values to the XYZ values of the colors of an image, 100. The image, 100, is measured twice, once with and once without a filter, 116, between the image, 100, and the sensors, 108, measuring the image, 100. The apparatus, 102, is capable of generating at least three output values substantially simultaneously to measure the color of each element, 104, of the image, 100.

Description: The present invention relates generally to color images and more particularly to methods and apparatus for identifying the colors of an image. The color of every element in an image can be identified by three values, generally known as its XYZ values. Each value corresponds to the spectral information in one spectral band, and the three values together identify the color of an element in the image. The XYZ values depend on the responses of the human eyes and are instrument independent. The values are known as CIE standard responsivities. A general discussion of such standards can be found in "Color Science: Concepts and Methods, Quantitative Data And Formulae," second edition, written by Wyszecki and Stiles, and published by John Wiley and Sons. Numerous electronic instruments have been used to identify colors of an image. The instruments typically measure the color of each element and identify it by three values, generally known as its RGB or Red-Green-Blue values. The color of each element of the image is identified by measuring the element with three sensors, with each sensor corresponding to one of the three components, red, green or blue. One such instrument is a scanner. Different instruments have different sensors with different characteristics, which produce different RGB values. Therefore, the RGB values are instrument dependent. It would be very beneficial to transform the instrument dependent RGB values to the instrument independent XYZ values to simplify the hardware and software manipulating the values. If the RGB values can be transformed to the XYZ values by a three by three matrix with minimal errors, then such a transformation is known as a linear transformation. Instruments capable of performing linear transformation are known as colorimetric instruments. Prior art inexpensive scanners are quite non-colorimetric. For each element, the calculated or scanner-identified XYZ values are significantly different from the actual XYZ values. Moreover, the errors introduced by the transformation process depend on the media, such as the paper and ink, used to produce the image. One way to improve on the transformation linearity is to use more sensors to measure each element. Typical scanners employ arrays of charge coupled devices (CCD) as sensors. These CCD arrays are expensive. Using more CCD devices to reduce the errors in the transformation process is a very expensive approach. There is still a need to improve on the instrument and the method to linearly transform the RGB values to the XYZ values. Further, it would be desirable if the improvement does not incur significant cost. According to an aspect of the present invention there is provided an instrument for identifying the colours of an image as specified in claim 1. According to another aspect of the present invention, there is provided a method of identifying the colours of an image as specified in claim 5. The present invention provides an improvement on an instrument and a method of linearly transforming the RGB values to the XYZ values of a colour image without incurring significant cost. As in the prior art, the instrument to identify the colours for an image has many sensors. The instrument, using the sensors, is capable of generating at least three output values substantially simultaneously to measure the colour of each element of the image. The present invention improves on the instrument by having a filter and a moving mechanism to position the filter in between the sensors and the image. The colors of the image are measured sequentially at least two times, once with and once without the filter in between the image and the sensors. Preferably in the first measurement, at least some of the elements are measured and in the second measurement, every element in the image is measured. So, the first measurement and the second measurement may have different resolution. The two measurements significantly reduce the errors in linearly transforming the RGB values to the XYZ values, with little additional cost, and significantly improve on the colorimetry of the instrument. Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention. Figure 1 shows a preferred embodiment of the present invention measuring a color image. Figure 2 shows preferred steps to select a filter for the present invention. Figure 3 shows a coefficient matrix transforming a RGB matrix into an identified-XYZ matrix. Figure 4 shows the steps of the present invention to identify the colors of an image. Figure 5 shows the response of a filter for the present invention. The present invention significantly reduces the errors in linearly transforming the RGB values to the XYZ values of a color image with little additional cost. Figure 1 shows a preferred embodiment of the pertinent part of an instrument 102 of the present invention identifying the colors of an image 100. Many components of the instrument 102 are not shown in the figure; they should be obvious to those with ordinary skill in the art. The image 102 has one or more elements, such as 104 and 106. Each element has a color. The instrument 102 has a plurality of sensors, such as 108, 112 and 114. The sensors may be arranged as a one or two dimensional array. The instrument, using the sensors, is capable of generating at least three output values substantially simultaneously to measure the color of each element. For example, the sensors 108, 112 and 114, each provides an output value for the element 104 of the image 100. In one preferred embodiment, the instrument is a scanner, and the three output values correspond to the intensities of the red, green and blue components of the color of the element 104. This can be achieved by having red, green and blue filters permanently positioned in front of the corresponding sensors. The instrument 102 also preferably has a filter 116 and a moving mechanism 118 to position the filter 116 at different positions, such as in between the sensors 108, 112 and 114, and the image 100. Different moving mechanisms 118 are suitable for the present invention. These mechanisms are obvious to those with ordinary skill in the art and will not be further described in the specification. The colors of the image 100 is measured sequentially at least twice, once with and once without the filter 116 in between the image 100 and the sensors 108, 112 and 114. The sequential measurements identify the color of each element 104 of the image 100. In one preferred embodiment, the first measurement is performed without the filter 116. Each element 104 of the image 100 is measured by three sensors. Each sensor provides one output value for the element. The three sensors substantially simultaneously provide the output values corresponding to the red, green and blue components of the color of the element. The second measurement is performed with the filter 116 in between the sensors 108 and the image 100. Each element 104 of the image 100 is again measured by three sensors to provide three output values. Thus, every element of the image 100 is characterized by six output values. In another preferred embodiment, the first measurement is performed with the filter 116, providing output values for some of the elements of the image 100. The output values of the elements that are not measured are generated from the output values of those elements that are measured. The generation process can be by interpolation between the measured elements or by other means obvious to those with ordinary skill in the art. Each element is measured by one sensor, instead of three. After the first measurement, the second measurement is performed without the filter 116, providing three output values for each element of the image 100. The number of bits representing the output values in the first measurement can be less than the number of bits representing the output values in the second measurement. This may provide a lower intensity resolution for the first measurement. Also, the first measurement has a lower spatial resolution than the second measurements; for example, the first measurement provides a spatial resolution of 100 output-values-per-inch of the image, while the second provides a spatial resolution of 300 output-values-per-inch of the image. With the first and second measurements, every element of the image 100 is characterized by four output values. The present specification has only described the embodiments with four or six output values for each element. It should be obvious that other numbers of output values and other spatial and intensity resolutions are also suitable for this invention. Figure 2 shows preferred steps 200 to select the filter 116. A group of commercially available filters are designated as pre-selected filters. This group of filters may be a set specified by Spectral Curves No. 9081 from Edmund Scientific Company. In fact, the group of filters may be any group of filters with different bandwidth and filter response. Another group of commercially available images are designated as pre-selected images. Each pre-selected image has a color whose XYZ values have previously been calibrated and are known. All the pre-selected images have different colors. One example of the group of pre-selected images is the twenty-four MacBeth ColorChecker color patches. Other pre-selected images may be used as long as the XYZ values of the images have been calibrated and are known. One filter is picked, 202, from the group of pre-selected filters for the instrument. The instrument then identifies the colors of all the pre-selected images. The identification process starts from picking, 204, a pre-selected image from the group of pre-selected images. The color of the pre-selected image is measured by the sensors in the instrument 102 as described above to identify the color of the pre-selected image. With the MacBeth color patches, the entire pre-selected image is of the same color, and is characterized by four or more output values. The process repeats, 208, until all the pre-selected images have been measured. If there are twenty-four pre-selected images and each image is characterized by six output values, a twenty-four by six matrix of output values are created. Each row in the matrix corresponds to the output values of one pre-selected image. All the output values correspond to the RGB values of the pre-selected images so the matrix is called a RGB matrix. The XYZ values of the pre-selected images are previously known and can be represented in a twenty-four by three known-XYZ matrix. The next step is to generate, 212, a set of coefficients to linearly transform the output values as close to their corresponding known XYZ values as possible. In other words, in the present example, the next step is to find a six by three matrix of coefficients that would transform as closely as possible the twenty-four by six RGB matrix into the twenty-four by three known-XYZ matrix. Figure 3 shows the three matrices, the RGB matrix, 300, the coefficient matrix, 302, and the identified-XYZ matrix 304. The identified-XYZ 304 is generated by multiplying the RGB matrix 300 to the coefficient matrix, 302. Each row in the matrices correspond to one specific color patch. The coefficient matrix, 302, can be generated by the standard methods of linear regression, minimizing the root-mean-squared errors between identified-XYZ matrix, 304, and the known-XYZ matrix. A general discussion of the linear regression methods to generate the coefficients can be found in the following two references: "Data Analysis and Regression," written by Mosteller and Tukey, and published by Addison Wesley in 1977; and "Solving Least Squares Problems," written by Lawson and Hanson, and published by Prentice-Hall in 1974. The linear regression methods will not be further described in the specification. Another method to generate the coefficient matrix, 302, is by a search procedure minimizing Delta E errors between the identified-XYZ matrix, 304, and the known-XYZ matrix. The term, Delta E, is an industry standard. It quantifies the difference between two sets of XYZ values. A general discussion on Delta E can be found in "Color Science: Concepts and Methods, Quantitative Data And Formulae" by Wyszecki and Stiles, supra. An example of a search procedure is the program "Stepit," written by Chandler from the Indiana University, and distributed by Quantum Chemistry Exchange of the Department of Chemistry of the Indiana University. The program is incorporated by reference into the specification. In contrast to the linear regression methods, this search procedure does not guarantee that the coefficient matrix corresponds to the global minimum solution. This problem of producing a local minimum solution may be circumvented by starting the search with different initial values for the coefficient matrix. Other search routines may be used. Since it is obvious to those with ordinary skill in the art, the search procedure will not be further described in the specification. From the RGB matrix 300, and the generated coefficient matrix 302, the identified-XYZ matrix is generated. This identified-XYZ matrix may not be the same as the known-XYZ matrix. Their difference may be quantified to generate, 214, a difference value by a number of different methods. For example, one method sums all the root-mean-square differences between the identified-XYZ values and the known XYZ values of each color patch to produce the difference value. Another method sums all the Delta E errors between the identified-XYZ values and the known XYZ values of each color patch to produce the difference value. A third method specifies the difference value as the largest Delta E error among all the Delta E errors between the identified-XYZ values and their corresponding known XYZ values. The above steps to get the difference value is repeated, 216, for every filter in the group of pre-selected filters. From the group of pre-selected filters, the filter that provides the minimal difference value is chosen, 218, to be the preferred filter, 116, of the present invention. Figure 4 shows the steps 400 to identify the colors of the image 100. The instrument 102 first measures, 402, the colors of the image 100 by generating at least three output values substantially simultaneously for each element 104 of the image 100. Then the moving mechanism 118 positions, 404, the filter 116 in between the sensors 108, 112 and the image 100. With the filter 116 in place, the colors of the image is again measured, 406, by the instrument 102. In the second measurement, another set of output values are produced for the elements of the image 100. From the output values, the color of each element of the image 100 is identified based on the coefficient matrix of the filter, 116. In one preferred embodiment, each element of the image 100 is characterized by six output values, which are RGB values. The six RGB values are transformed by the coefficient matrix into the three XYZ values to identify the color of its corresponding element. The invention will be further clarified by a consideration of the following example, which is intended to be purely exemplary of the use of the invention. The instrument 102 is simulated to be an improved Hewlett Packard Scanjet IIC scanner by having a filter. Figure 5 shows the filter response 500 of the filter selected for this example. The graph 500 plots the amount of light transmitted, 502, as a function of the wavelength, 504, of the light. For the amount of light transmitted as shown in the graph 500, one implies all the light being transmitted and zero implies all the light being blocked by the filter. The filter is placed in between the sensors in the instrument 102 and the image, and is simulated as part of the scanner. The instrument 102 is used to identify the twenty-four MacBeth ColorChecker color patches under a desired illuminant (CIE standard Illuminant C). The results of the identifications are compared to the results of the Scanjet IIC scanner before the improvement. Table one shows the results of simulated measurements before and after the improvement. The first column specifies each color of the twenty-four MacBeth ColorChecker color patches, the second column specifies the Delta E errors in the Scanjet IIC scanner before the improvement, and the third column specifies the Delta E errors after the improvement. Two color patches with their Delta E value differs by more than 5 are visibly detectable to be different. Thus, a CIE standard specifies that two color patches are colorimetrically matched if their Delta E value is less than 5. As shown in Table one, before the improvements or without the filter, the Scanjet IIC scanner can give Delta E errors as high as 20. After the improvements or with the filter as applied to the present invention, the Delta E errors are less than 3. It has also been found empirically that the Delta E errors of the present invention is approximately independent of the media, such as the paper and ink, used to produce the image. Another preferred embodiment of the present invention uses transparencies instead of filters. In this embodiment, a preferred transparency is chosen for a scanner by first having the scanner scan some previously calibrated color patches, such as the twenty-four MacBeth ColorChecker color patches. Then the color patches are scanned again with each of a pre-selected group of transparencies in between the patches and the scanner. One example of the group of transparencies is the 8'' by 10'' commercially available, Edmund Scientific transparencies, with the part number N70,638. There are 44 transparencies in the group. Any other groups of transparencies may be applicable as long as there are enough transparencies with different spectral transmittances. Based on the measured values with and without the transparencies, the specific transparency providing the minimal difference value for the color patches is chosen to be the preferred transparency for this embodiment. The scanner and the preferred transparency can then be used to provide, for example, the XYZ values of different color images. Again this can be done by scanning a color image with the scanner, once without and once with the preferred transparency between the image and the scanner. This two part scanning would again significantly reduce the amount of error in generated XYZ values. The XYZ values may then be sent to a printer or a display to have the images reproduced. The present invention can be extended to more than one transparency or filter. As an example, if the goal is to select two filters out of the group of pre-selected filters, then, based on Figure 2, instead of picking the filter to give the lowest difference value, one selects two filters that give the lowest difference value. The step 202 in Figure 2 is modified to pick two filters out of the group. An image is then measured first without a filter, then with each of the two filters to produce, for example, nine output values. After all the images are measured, a nine by three coefficient matrix and its difference value are calculated. The above process is repeated for all combinations of two filters out of the group of pre-selected filters. The two filters giving the lowest difference value are selected. More filters or transparencies may be used. The present invention reduces the errors in linearly transforming the RGB values to the XYZ values of a color image without incurring significant cost. All that is required for the improvement is to have one more filter in between the image and the sensors measuring the image, and to measure the image more than once. MacBeth color patch Scanjet IIC Modified Scanjet Bluish Green 13.1 1.51 Blue Flower 2.61 0.57 Foliage 7.86 0.72 Blue Sky 6.43 1.39 Light Skin 5.32 0.71 Dark Skin 3.18 0.80 Orange Yellow 7.02 2.13 Yellow Green 8.13 1.90 Purple 9.63 0.99 Moderate Red 4.53 2.52 Purplish Blue 11.42 2.66 Orange 8.75 1.85 Cyan 15.58 1.11 Magenta 2.86 0.90 Yellow 1.69 1.90 Red 20.30 1.63 Green 11.87 1.26 Blue 17.24 0.67 Neutral 3.5 2.45 0.89 Neutral 5.0 3.06 0.97 Neutral 6.5 3.29 0.78 Neutral 8.0 3.00 1.02 White 3.12 0.99 Black 1.87 2.07

Claims: An instrument for identifying the colours of an image (100) having one or more elements (104), each element (104) having a colour; comprising a plurality of sensors (108) capable of generating at least three output values substantially simultaneously to measure the colour of each element, each output value corresponding to a predetermined portion of the light spectrum; characterised by at least one filter or transparency (116); and means (118) for moving the or each filter or transparency (116) so that the or each filter or transparency (116) can be positioned sequentially between the sensors (108) and the image (100); the instrument (102) being capable of generating at least three output values substantially simultaneously to measure the colour of each element (104) and to make at least two measurements of the image sequentially, a first with and a second without the or each filter or transparency (116) between the image (100) and the sensors (108), thereby to identify the colour of each element (104) of the image (100). An instrument as recited in claim 1, wherein the instrument (102) is operable to measure only some of the elements (104) of the image in the first measurement and to measure all the elements (104) of the image in the second measurement; the output values not measured in the first measurement being generated by those which are measured. An instrument as recited in claim 1 or 2, wherein the instrument (102) is operable to generate only one of the output values during the first measurement and to generate all the output values during the second measurement. An instrument as recited in any preceding claim, wherein each measurement provides three output values for each element (104). A method of identifying the colours of an image (100) having one or more elements (104), each element having a colour; comprising the steps of: (a) positioning (404) sequentially at least one filter or transparency (116) between the image (100) and the sensors (108) and generating (402) at least one output value for the colour of each element (104) measured; (b) before or after step (a) generating (406) without a filter or transparency between the image and the sensors at least one output value for the colour of each element (104); wherein for at least one of steps (a) and (b) at least three output values are generated substantially simultaneously, each value corresponding to a predetermined portion of the light spectrum; and (c) identifying (408) the colour of each element (104) of the image (100) based on the output values of that element (104). A method as recited in claim 5, wherein three output values each corresponding to a predetermined portion of the light spectrum are generated in step (a). A method as recited in claim 5, wherein in step (a) one measured output value for each element is generated, and output values of the elements which are not measured are generated from the measured output value. A method as recited in claim 5, 6 or 7, wherein step (a) comprises the steps of manipulating the output values by a set of coefficients; the set of coefficients is generated by the steps of: picking (202) a pre-selected image from a plurality of pre-selected images; measuring (206) the colour of the pre-selected image by the method (400) to identify the colour of the pre-selected image; repeating (208) the step of "picking a pre-selected image" until every pre-selected image has been measured; and generating (212) the set of coefficients that manipulates the output values from the measurements so that the measured colour of each pre-selected image identifies as close to the known colour of that pre-selected image as possible. A method as recited in claim 5, 6 or 7, wherein the or each filter (116) is selected by the steps of: picking sequentially (202) a filter from a plurality of pre-selected filters for the instrument; identifying the colours of a plurality of pre-selected images by the instrument (102), the colour of each pre-selected image being known and different from the other pre-selected images; calculating (214) a difference value based on the difference between the identified colour and the known colour of each pre-selected image; repeating (216) the step of "picking a filter" until every pre-selected filter has been picked; and selecting (218) the filter which provides the minimal difference value.

Inventors: FARRELL JOYCE E, WANDELL BRIAN A, FARRELL, JOYCE E., WANDELL, BRIAN A.
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 1994
Main classification: G01J3
IPC codes: G06T7, G01J3, G06T1, H04N1