Background of the Invention
The present invention relates to the color imaging arts. It finds particular application to color correction tables for printers and will be described with particular reference thereto.
Heretofore, computers and other electronic equipment have typically generated three-dimensional RGB (red, green, blue) color signals. Many printers, however, receive four-dimensional CMYK (cyan, magenta, yellow, and black) signals as input and print output colors which are measured as corresponding RGB values. A look-up table is commonly provided to convert each digital RGB color signal value to a corresponding digital CMYK value before being received by the printer.
A printer which has an ideal dye behavior has a one-to-one correspondence of cyan-to-red, magenta-to-green, and yellow-to-blue. This means that when printed, the cyan ink will only absorb red light, the magenta ink will only absorb green light, and the yellow ink will only absorb blue light. However, printers inherently have a non-ideal dye behavior and therefore have a complex non-linear colorimetric response. Interactions between the cyan, magenta, and yellow inks exist which result in unwanted absorptions of reds, greens, and blues. Even once a printer is calibrated such that one or a range of input digital CMYK values produce the proper color(s), the full spectrum of CMYK values and printed colors is not accurate. In other words, the colors asked to be printed and the actual colors printed are not the same.
This discrepancy arises because the relationship between digital values that drive the printer and the resulting colorimetric response is a complex non-linear function. A response, or other value, labeled as "colorimetric" indicates that the response or value which has been measured by an instrument. Modeling the colorimetric response to achieve linearity across the available spectrum usually requires many parameters. Therefore, the relationship between the CMYK values driving the printer and the measured colorimetric RGB values of the resulting printed patch is often not characterizable by a simple function or model. The number of measurements required to characterize the printer adequately, can be as many as 1,000 measurements. Typically, a color correction look-up table is built which approximates the mapping between RGB colorimetric space and CMYK values. More specifically, the color correction look-up table corrects for non-linearities and unwanted absorptions of inks such that the printer prints the true corresponding color.
To build the look-up table, a set of CMYK digital values are sent to the printer. The printer prints a corresponding set of color patches. The color patches are measured and a colorimetric RGB coordinate is found for each patch, hence for each CMYK value. Each of the RGB coordinates identify a three-dimensional vector location within the three-dimensional space. Each RGB coordinate is typically represented by an 8-bit red value, an 8-bit green value, and an 8-bit blue value. Although the RGB coordinate is capable of addressing 256.sup.3 locations, the look-up table is typically partitioned into a smaller size, such as 16.times.16.times.16 (4096) table locations, each of which stores a four-dimensional CMYK value. The number of table locations is selected based on the desired accuracy of the look-up table compared to the expense of storing a large number of values.
At each measured RGB location, the CMYK value corresponding to the RGB coordinate is known. Measured RGB coordinates do not in general coincide with the node locations (intersection points) of the look-up table. Hence, the CMYK values to be filled-in at the table nodes are estimated from the known CMYK values at the measured RGB locations by an interpolation technique such as Shepard's algorithm. Once the table is built, RGB coordinates are converted to CMYK values by interpolating the nearest known CMYK values neighboring the inputted RGB coordinate location to obtain an interpolated printer CMYK value. The interpolating is commonly a tetrahedral or trilinear interpolation. Thus, the variables in the design of the correction table are the RGB locations, the CMYK values at the locations, and the method used to interpolate between the CMYK values.
Due to drifts in printer response and the interpolation technique used to map the transformations, a particular colorimetric RGB location may not produce the correct printer CMYK value. In order to adjust for the difference, CMYK values are reprinted and the color patches are remeasured to determine the error. Remeasuring color patches is an expensive and time-consuming process.
The present invention provides a new and improved method and apparatus for refining a color correction table which overcomes the above-referenced problems and others.
Summary of the Invention
In accordance with the present invention, a new and improved iterative technique for refining a color correction table of a printer is provided. The color correction table has a plurality of RGB node locations which store a CMYK value for converting the RGB node location into CMYK color space. The color correction table is generated by printing color patches for a plurality of CMYK values. Each printed color patch is measured to obtain a colorimetric RGB location. A transformation vector is calculated for each of the colorimetric RGB locations which transforms the colorimetric RGB location to the corresponding CMYK value. The calculated transformation vectors are interpolated to the RGB node locations of the color correction table to obtain table transformation vectors for thee RGB node locations. Each table transformation vector is based on a weighted sum of the calculated transformation vectors and a Euclidean distance between a current table location and the RGB node locations storing the calculated transformation vectors. The table transformation vectors are combined for the RGB node locations of the table to obtain the corresponding CMYK values. The color correction table is then refined by inputting the measured colorimetric RGB locations into the color correction table and recovering corresponding CMYK values. For each of the colorimetric RGB locations, the recovered CMYK values are compared to the originally printed CMYK values to obtain a printer residual error for each of the colorimetric RGB locations. The printer residual errors are interpolated to the node locations in the color correction table as a weighted sum combined with a function of a Euclidean distance between a current node location and the colorimetric RGB locations. The CMYK values of the color correction table are refined by combining the interpolated residual errors with the CMYK values. The table CMYK values are iteratively refined until the residual errors are within a selected tolerance.
One advantage of the present invention is that the color correction table is iteratively refined with the same measurements used in generating the color correction table.
Another advantage of the present invention is that additional measurements of color patches are not required.
Still further advantages of the present invention will become apparent to those of ordinary skill in the art upon reading and understanding the following detailed description of the preferred embodiments.
Brief Description of the Drawings
The invention may take form in various components and arrangements of components, and in various steps and arrangements of steps. The drawings are only for purposes of illustrating a preferred embodiment and are not to be construed as limiting the invention.
FIG. 1 is a diagrammatic illustration of a color correction table generator;
FIG. 2 is a diagrammatic illustration of the iterative refining system in accordance with the present invention;
FIG. 3A is an illustration of a color correction table converting an RGB location to a CMYK value in accordance with the present invention;
FIG. 3B is an enlargement of a section of the color correction table shown in FIG. 3A; and,
FIG. 4 is an illustration of a location in the color correction table being interpolated based on distances to known locations in accordance with the present invention.
Detailed Description of the Preferred Embodiments
With reference to FIG. 1, a color correction table 10 is a three-dimensional table having an R axis, G axis, and B axis representing red, green, and blue colorimetric locations. Each location is identified in the preferred embodiment by a three-dimensional RGB vector which is defined by an 8-bit red value, an 8-bit green value, and an 8-bit blue value. In the preferred embodiment, the color correction table 10 is partitioned into 16.times.16.times.16 or 4096 intersecting node locations. Each location stores a CMYK value for converting the RGB address to CMYK color space. For other RGB addresses, the CMYK value is found by interpolating the CMYK values of the nearest node locations.
With reference to FIGS. 3A and 3B, the color correction table 10 converts an inputted RGB location X.sub.RGB to a corresponding CMYK value Y.sub.CMYK. For simplicity, FIG. 3B shows a two-dimensional grid of R and G locations with the B value set to zero. For an input RGB color X.sub.ij at (R.sub.i, G.sub.j), the corresponding CMYK value Y.sub.CMYK is found by interpolating the CMYK values stored at the nearest neighbor locations of (R.sub.i, G.sub.j) which are CMYK.sub.1 -CMYK.sub.4 in this example. Preferably, a trilinear or tetrahedral interpolation is performed as is known in the art. As is shown, RGB values such as X.sub.ij do not always lie on an intersecting table location.
The color correction table 10 is generated for a printer 12 based on the printing characteristics of the printer 12. The printer characteristics are determined by inputting a set of CMYK values y.sub.j, 1.ltoreq.j.ltoreq.K to the printer 12. The number of values K is about 1000. The printer 12 prints a set of color patches, one patch for each CMYK value. A measuring device 14 measures each patch to obtain corresponding colorimetric RGB locations x.sub.j. Typical measuring devices 14 include colorimeters, spectrophotometers, or similar devices. For simplicity, we will discuss three-color (CMY) rather than four-color (CMYK) printing device values y.sub.j ' in device RGB coordinates, R.sub.d, G.sub.d, B.sub.d, where R.sub.d =1-C, G.sub.d =1-M , and B.sub.d =1-Y.
Given the colorimetric RGB locations x.sub.j ' and the corresponding device RGB printer values y.sub.j ', the color correction table 10 is generated to map a given colorimetric RGB location to a device RGB value. Assuming that the color correction table 10 has a fixed table size of N, the table 10 has a set of colorimetric RGB locations {x.sub.i }, each storing a device RGB value y.sub.i for i=1 to N which converts the RGB location to device RGB color space. In general, the table node locations do not coincide with the measured RGB coordinates. There are several methods, well known in the art, for estimating device RGB values at the table node locations, based on the known device RGB values at the measurement locations. One such method is now described, which is used in the preferred embodiment.
For each of the known colorimetric RGB locations x.sub.j ' that were measured, a transformation processor 16 calculates a transformation vector t.sub.j '. The transformation vector t.sub.j ' represents a transformation difference between the inputted device RGB values y.sub.j ' and the outputted measured RGB values x.sub.j ' and is defined as:
For the measured RGB locations x.sub.j ', the transformation vectors t.sub.j ' are stored. Since the number of measured RGB locations x.sub.j ' (typically about 1000) is less than the number of locations in the table 10 (4096 locations) and generally will not lie exactly on a table location, the transformations for each location are determined by interpolation. An interpolator 18 interpolates the transformation vectors t.sub.j ' through all N locations of the color correction table 10 and finds a table transformation vector t.sub.i for each table location denoted by x.sub.i. Each table transformation vector t.sub.i is defined as a weighted sum of the known transformation vectors t.sub.j ' at the measured colorimetric RGB locations x.sub.j ': ##EQU1##
The weighted sum is based on a Euclidean distance d.sub.ij between a current table location x.sub.i and the measured RGB locations x.sub.j ' as shown in FIG. 4. As the distance d.sub.ij increases between the table location x.sub.i and the measured RGB locations x.sub.j ', the contribution of the transformation vector t.sub.j ' on x.sub.i decreases as 1/d.sub.ij.sup.4. In the preferred embodiment, the power of 4 is used so that the sum in Equation (2) converges in R.sup.3. A higher or lower power may be used for other different domain space. For example, if the domain space is R.sup.n, then the d.sub.ij is raised to a power greater than n.
Once a transformation vector is found for each RGB location in the table 10; a table device RGB value y.sub.i is found for each RGB location. The table device RGB values y.sub.i are filled as a combination of the RGB locations x.sub.i and the table transformation vectors t.sub.i :
To recover a table device RGB value y for an inputted RGB location x, the table device RGB values neighboring the RGB location x are interpolated as shown in FIG. 3B. In the preferred embodiment, tetrahedral interpolation is used.
With reference to FIG. 2, the refining system of the present invention is shown. To verify the accuracy of the table device RGB values y.sub.i, the originally measured colorimetric RGB locations x.sub.j ' are inputted to the color correction table 10. If the transformation is perfect, the original device RGB values y.sub.j ' will be obtained since these were the device RGB values which produced the colorimetric RGB locations x.sub.j ' measured after printing. To obtain the table device RGB value y.sub.i for one of the inputted RGB locations x.sub.j ', a three-dimensional linear or tetrahedral interpolation is performed among a set of values neighboring x.sub.j ' as is known in the art. The interpolation does not guarantee that the original device RGB values y.sub.j ' are recovered at the colorimetric RGB locations x.sub.j '. The table 10 produces residual errors even at the colorimetric RGB locations x.sub.j ' that were used to generate the color correction table 10.
For refining the table device RGB values y.sub.i, the initial table device RGB values are denoted by {y.sub.i.sup.0 }. The ".sup.0 " indicates the initial or zero-th iteration. The original colorimetric RGB locations x.sub.j ' are inputted to the table 10 and resulting table device RGB values y.sub.j.sup.0 are recovered by a three-dimensional linear interpolation technique among the y.sub.i.sup.0 as is known in the art. A comparator 20 compares the recovered table device RGB values y.sub.j.sup.0 with the originally inputted device RGB values y.sub.j ' which were used to generate the table 10. Residual errors e.sub.j.sup.0 ' are determined for each location x.sub.j ' as:
The residual error is a difference between the recovered table device RGB value y.sub.j.sup.0 and the original device RGB value y.sub.j.sup.0 ' for each measured RGB location x.sub.j '. A residual error is found for each of the measured RGB locations in the table 10. Residual errors are found for all other table locations by interpolating the known residual errors. The interpolator 18 interpolates and propagates the known residual errors e.sub.j.sup.0 ' to the other table values {y.sub.i.sup.0 }. This is performed by a method that interpolates smoothly along scattered data. In the preferred embodiment: ##EQU2## A refining means 22 refines the initial device RGB table values y.sub.i.sup.0 with the corresponding residual error value e.sub.i.sup.0 for each table location x.sub.i. The refined table device RGB values {y.sub.i.sup.1 }, after 1 iteration, are:
The new set of table device RGB values {y.sub.i.sup.1 } define an improved color correction table. Equations (4) through (6) are carried out for successive iterations. The iterations terminate when a preselected condition is fulfilled such as, the average e.sub.i changing by less than a preassigned percentage. Alternately, a fixed number of iterations can be performed, e.g., 3 iterations.
Although the foregoing discussion has applied the present invention to domain and range spaces in R.sup.3 three-dimensional space, the present invention applies to any multidimensional space to improve the fit of the color correction table. For a domain space of R.sup.n, d.sub.ij in Equations (2) and (5) are raised to a power greater than n so that the summations converge. The dimensionality of the range space does not affect the formulations.
The invention has been described with reference to the preferred embodiment. Obviously, modifications and alterations will occur to others upon reading and understanding the preceding detailed description. It is intended that the invention be construed as including all such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.