Abstract:
The invention pertains to a method and apparatus for performing dynamic purity correction to insure that color purity is maintained across the face of a color monitor. The monitor displays a plurality of pixels, each having a particular luminescence value. Each luminescence value has several color components (E.g. red (R), green (G) and blue (B)). A grid of luminance measurements is made across the face of the monitor for each color component. From these luminance value grids, smoothly varying correction values are computed for each color component of each pixel by the interpolation of cubic splines, such as a Catmull-Rom spline. Incoming digital video signals are multiplied by corresponding correction values to insure color accuracy of the monitor. In a preferred embodiment, the calculation of correction values is repeatedly performed in real time (at the display dot clock rate) in a single monolithic RAMDAC integrated circuit to increase speed, improve fidelity, and minimize use of memory space.

Description:
FIELD OF THE INVENTION 
     The invention pertains to a method of improving the color accuracy of a monitor by compensating for the luminance variations that occur across the face of the monitor by computing and then applying smoothly varying correction values to each color component of each pixel in real time. 
     BACKGROUND OF THE INVENTION 
     Monitors have been increasingly used in photorealistic color production and prepress systems. Accordingly, it is important that any luminance variations across the face of the monitor be corrected in order to insure color accuracy and predictability. If luminance differences exist between color channels, then color purity will be compromised. 
     Luminance variations can be introduced into a monitor by a number of ways including, but not limited to, aging, shock, non-uniformities in phosphor deposition, shadow mask imperfections or thermal changes, differences in the beam energies of the different electron grins, and the position of the monitor relative to earth&#39;s magnetic field. The variations so introduced must be compensated for and corrected to maintain high color purity and uniformity. 
     One possible solution is to manufacture monitors to tight luminance and color purity specifications. However, such techniques increase their cost. 
     Existing systems adjust luminance by the addition of expensive, cumbersome, and complex external hardware that intercepts and modifies the video signal in the analog domain before it reaches the monitor. 
     European Patent Application Publication No. 514 025 A2 by Rasterops Corporation, published Nov. 19, 1992, discloses the use of a video normalizer to correct irregularities in video display monitor screens. A photo sensor detects the light output at various points on the monitor. These output values are converted to digital signals and processed to compute correction values. The correction values are then provided to a separate frame buffer that is external to the computer having a memory location for each pixel on the monitor display. A correction circuit converts these digital signals into analog correction signals which in turn either skew the output signals of the video color processing board or control transconductance amplifiers connected between the video color processing board and the RGB inputs of the monitor. This method has some problems in terms of speed. Applying correction signals in the analog domain or using them to control transconductance amplifiers causes an undesirable delay in processing when individual correction values need to be applied to the individual color components of each pixel. Also, this method provides monitor luminance correction (ie. the same correction to each color component), instead of dynamic purity correction which involves individual correction for each color component. 
     The present inventor has recognized that a preferable system would be able to rapidly calculate and apply smoothly varying correction signals in the digital domain on a pixel by pixel basis, for each color component, and that it would be advantageous for such a system to continuously calculate correction values for each pixel in real time (at the display dot clock rate) to avoid having to continuously store and retrieve these values. However, until the present invention, it had not been known how to overcome the limitations of the described prior art, or how to implement the described improvements over the prior art. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method for dynamically adjusting the luminance of each color channel digitally in real time. This &#34;on the fly&#34; approach reduces the complexity and enhances the speed and fidelity of dynamic purity correction, where &#34;dynamic purity correction&#34; denotes the process of determining correction values for each color component of each pixel of a monitor and multiplying incoming digital video signals by these correction values so that the resulting images accurately represent the information contained in the incoming signals. 
     According to the present invention, three separate correction data streams (each representing a smooth 3-dimensional correction surface) are generated by processing a regular grid of luminosity sample points (one for each color component, typically from the set of red (R), green (G), and blue(B) color components) by interpolating Catmull-Rom splines, and then multiplying the incoming color (typically RGB) components of each pixel of an input image data stream by the corresponding correction factor. 
     The use of cubic polynomials (of which Catmull-Rom splines are one form) to create the smooth correction surfaces results in corrected images that do not have visual artifacts (discontinuities) introduced by the correction process. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a system for implementing the method of the present invention. 
     FIG. 2 is a block diagram of the Correction Value Calculation Circuit block of FIG. 1. 
     FIG. 3 is a diagram representing a Catmull-Rom Spline. 
     FIG. 4 represents a Basis Matrix for the Catmull-Rom Spline. 
     FIG. 5 is a diagram of the Spline Interpolator 230 of FIG. 2. 
     FIG. 6 is a diagram representing the RGB Luminosity Measurement Grid of an embodiment of the present invention. 
     FIG. 7 is a diagram representing the Interpolated RGB Luminosity Measurement Grid of an embodiment of the present invention. 
     FIG. 8 represents a matrix formed by applying the Forward Difference Basis Matrix to the Catmull-Rom Basis Matrix of FIG. 4. 
     FIG. 9 is a block diagram of the RAMDAC Dataflow of an embodiment of the present invention. 
     FIG. 10 is a more detailed block diagram of the Forward Difference Coefficient Generator shown in FIG. 9. 
     FIG. 11 is more detailed block diagram of the Forward Difference Stepper shown in FIG. 9. 
     FIG. 12 is a diagram of the Integer Forward Difference Coefficient Registers of an embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A system employing an embodiment of the present invention is shown in FIG. 1. Although the technique is described in relation to a color monitor, the same technique can be used to improve the display accuracy of a monochrome monitor. Red, Green and Blue (RGB) luminosity components are measured at each of a plurality of measurement points across the face of a monitor 100. These luminosity values can be measured via a sensor 150, which measures, in the case of an RGB monitor, a red value (R), a blue value (B), and a green value (G) at a grid of regularly spaced points on the face of monitor 100. The sensor then supplies these values to a correction value calculation circuit (CVCC) 200. These luminosity values are processed in the CVCC 200, where a correction value is calculated for each color component of each individual pixel. For example, for an RGB color monitor, correction values Cr, Cg, or Cb would be calculated for the corresponding red (R), green (G), and blue (B) components of each pixel. Digital video signals, coming from block 300, whose color component signals are represented as R, G and B, are input to Color Lookup Tables (LUT) 350a,b,c, the resulting outputs Ri, Gi, and Bi of the LUTs are corrected to compensate for any detected luminosity variations that exist across the face of the monitor. The resulting corrected signals Ri&#39;, Gi&#39; and Bi&#39; are fed to monitor 100 after being converted to analog values by digital to analog converters (DACs) 155a, 155b, 155c. 
     The CVCC 200 is detailed in FIG. 2. The luminosity values measured by sensor 150 are supplied to a computer 210 which generates from the measured luminosity values a regular grid of luminosity values suitable for interpolating via Catmull-Rom splines a correction surface equal in size to that of the display. Each vertically (Y) direction aligned set of luminosity measurements is then interpolated into a smooth curve by the computer 210. In the preferred embodiment, these curves are also generated by interpolating Catmull-Rom splines where each interpolated point on a curve is separated in the Y direction from its neighbors by one pixel. These curves are stored in local VRAM 220 to be retrieved as control points during the raster scan of the image. 
     During the raster scan of the image, for each scanline, a set of control points, one point from each of the vertically interpolated curves, is retrieved from the VRAM and supplied to the Catmull-Rom spline interpolator 230. The interpolator computes a smooth Catmull-Rom spline of correction values in the horizontal (X) direction on the fly through the control points for each color component, and these correction values (shown as Cr, Cg, and Cb) are subsequently multiplied by the incoming digital video signals as shown in FIG. 2. 
     In this way, by first interpolating curves in the Y direction, and then using those curve values as control points to interpolate curves in the X direction, a 3-dimensional correction surface is constructed. 
     The corrected color components are then gamma corrected 240 to compensate for monitor gamma, which is a function of signal amplitude, and emerge from the correction value calculation circuit as Ri&#39;, Gi&#39;, and Bi&#39; in FIG. 2. 
     A more detailed discussion of the interpolation technique follows. 
     In block 200 of FIG. 1 smooth correction surfaces are derived by interpolating Catmull-Rom splines through luminosity sample points for each corresponding color component, first in the vertical (Y) direction by a computer, and then in the horizontal (X) direction in real time as the image is raster scanned. E.g., a set of N &#34;Red&#34; luminosity samples (R), from a set of N control points on the face of the monitor, are processed to generate a correction surface having M values (where M&gt;N, and M=the total number of pixels displayed by the monitor). 
     Catmull-Rom splines are a class of splines where the spline actually passes through (interpolates) the sample (control) points. Furthermore, the slope of the spline as it passes through a control point is equal to the slope formed by drawing a line through the control points on either side of the control point being interpolated. This results in a smooth, well behaved curve. An example of a Catmull-Rom spline, which passes through four control points, is shown in FIG. 3. Four control points (Pi-3, Pi-2, Pi-1, and Pi) are required to interpolate the spline between the points Pi-2 and Pi-1. This section of the spline between points Pi-2 and Pi-1 is called a polynomial segment. 
     Catmull-Rom splines are a class of parametric cubic curves. That is, both dimensional components (luminosity (L), and X, where X represents a location on the face of the monitor) of the curve are parameters of some third independent variable, t. The curve is approximated by a piecewise polynomial curve that is described by cubic polynomials that are parametric in t. The equations are: 
     
         L(t)=a.sub.1 t.sup.3 +b.sub.1 t.sup.2 +c.sub.1 t+d.sub.1   (1) 
    
     
         X(t)=a.sub.x t.sup.3 +b.sub.x t.sup.2 +c.sub.x t+d.sub.x   (2) 
    
     Where t varies between 0≦t&lt;1. The coefficients, a,b,c, and d, are computed using the basis matrix for Catmull-Rom splines. This basis matrix is shown in FIG. 4. 
     Preferably, t should be chosen such that each step of t corresponds to a one pixel move across (or down) the display. If the control points are regularly spaced in the X axis, then x changes linearly in t. Hence, if the control points are 128 pixels apart, then stepping t 1/128 will result in stepping x one pixel. Therefore x can be ignored as a parametric function of t. 
     The interpolated spline can have values greater than the maximum control point values. In FIG. 3, the luminosity values just to the left of Pi-2 are greater than Pi-2 (which is necessarily the case with a smooth curve because the slope of the curve at point Pi-2 is decreasing), hence some &#34;headroom&#34; has to be accounted for when providing the control points to the spline interpolation hardware if overflow is to be avoided. 
     As previously explained, a regularly spaced grid of luminosity measurements is taken for each color component. In a preferred embodiment of the invention, the measurements are made 128 pixels apart, by a sensor such as sensor 150 in FIG. 1. For a 72 dpi monitor this works out to a spacing between measurements of about 1.75&#34;. An example of such a grid for a 1280×1024 display with 63 measurement points is shown in FIG. 6. 
     In order to conveniently compute the Catmull-Rom splines for correction surface in the visible display area, a luminosity value grid of 143 points is formed (for each color component) from the measurement grid of FIG. 6 to create the interpolated RGB luminosity value grid shown in FIG. 7. The additional interpolated points both on and outside the boundary of the visible display area in FIG. 6 can be extrapolated from the measured points by a variety of techniques. In the preferred embodiment, some of the points are made by duplicating points near the boundary of the measured grid, and some are made by linearly interpolating the slope formed by the points near the boundary of the measured grid. 
     In order to prevent overflow, or to account for &#34;headroom&#34; mentioned above, in the preferred embodiment, the entire 3-dimensional correction surface is computed on computer 210 using the interpolated RGB luminosity value grid shown in FIG. 7, and all the luminosity values are uniformly adjusted such that no point on the surface exceeds, or overflows, a maximum value. 
     One way of arriving at the grid of measured RGB luminosity values would be to implement sensor 150 as a jig having an array of photometers being placed across the face of the monitor. This array of photometers would be used to measure the screen RGB luminosity data shown in FIG. 6. 
     For a 1280×1024 display, each of the three (RGB) visually smooth 3-dimensional luminance correction surfaces is comprised of 1,310,720 (1280×1024=1,310,720) smoothly varying points interpolated from a grid of 80 luminosity values. 
     For each scanline, the precomputed control points are loaded from VRAM 220 into the Catmull-Rom spline interpolator 230 prior to the start of the scan. 
     The straightforward evaluation of L(t) using previously disclosed equation (1) requires a computationally intensive number of multiplies, additions, and shifts. A more computationally efficient evaluation can be accomplished using forward differences, which is an approximation that reduces evaluation of the cubic polynomial to straightforward shift and adds. A derivation of this method and additional information regarding this method can be found in the following references: (1) Foley &amp; Van Dam, &#34;Computer Graphics, Second Edition&#34;, Addison-Wesley Publishers, 1990; (2) Victor Klassen, Integer Forward Differencing of Cubic Polynomials: Analysis and Algorithms&#34;, ACM Transactions on Graphics, April 1991; (3) Sheue-Lin Chang, Michael Shantz and Robert Rochetti, Rendering Cubic Curves and Surfaces with Integer Adaptive Forward Differencing, ACM Computer Graphics, Volume 23, Number 3, July 1989; and (4) Richard Barrels, John Beatty, and Brian Barsky, &#34;An Introduction to Splines for use in Computer Graphics &amp; Geometric Modeling&#34;, pp. 400-406, Morgan Kaufmann Publishers, 1987. 
     Evaluation of a spline between control points Pi-2 and Pi-1 reduces to the following set of 3 adds and 3 shifts that occur at the dot clock frequency (up to 216 MHZ in the preferred embodiment) for each color component. The symbol &#34;&gt;&gt;&#34; is used to indicate a right shift: 
     
         L=D&gt;&gt;8                                                     (3) 
    
     
         D=D+(C&gt;&gt;7)                                                 (4) 
    
     
         C=C+(B&gt;&gt;6)                                                 (5) 
    
     
         B=B+A                                                      (6) 
    
     Where D,C,B,A are integer forward difference coefficients that are found by applying the forward difference basis matrix to the Catmull-Rom basis matrix previously disclosed in FIG. 4. An example of the resulting matrix is shown in FIG. 8, where β=1/128. 
     The control points (or Pi&#39;s) for each scanline are loaded from VRAM 220 into the Control Point RAMs 231a,b,c as shown in FIG. 5, prior to the start of the scanline. The Forward Difference Coefficients (D,C,B,A) for polynomial segment N+1 are precomputed on the fly by the Forward Difference Coefficient Generators 232a,b,c as polynomial segment N is interpolated. Thus, there are 128 dot clock periods available to precompute the Catmull-Rom forward difference coefficients D,C,B and A. For each color component of each pixel, the forward difference engines 233a,b,c compute the resulting correction values (shown as Cr, Cg, Cb in FIG. 5) by evaluating equations 3-6 to find L. 
     The coefficient computation reduces to the following set of equations: 
     
         D=Pi-2                                                     (7) 
    
     
         C=Kc-3 * Pi-3+Kc-2 * Pi-2+Kc-1 * Pi-1+Kc * Pi              (8) 
    
     
         B=Kb-3 * Pi-3+Kb-2 * Pi-2+Kb-1 * Pi-1+Kb * Pi              (9) 
    
     
         A=Ka-3 * Pi-3+Ka-2 * Pi-2+Ka-1 * Pi-1+Ka * Pi              (10) 
    
     As a result, 12 multiplies and 9 adds must be performed for each color channel during the 128 dot clock periods required to compute the next set of forward difference coefficients. 
     As previously stated, in our implementation x changes linearly with t so that stepping 1/128 steps×one pixel. Thus, there is no need to utilize more sophisticated integer forward differencing techniques such as adaptive integer forward differencing. 
     The K&#39;s, in equations 7-10, are constants whose two&#39;s compliment hex values are given below in TABLE 1. Note that the radix point is actually 21 bits to the left of the least significant bit. 
     
                       TABLE 1______________________________________  Kc-3        =0xffffc0ff  Kc-2        =0xfffffd83  Kc-1        =0x000041fd  Kc          =0xffffff81  Kb-3        =0x000001fa  Kb-2        =0xfffffb12  Kb-1        =0x000003ee  Kb          =0xffffff06  Ka-3        =0xfffffffa  Ka-2        =0x00000012  Ka-1        =0xffffffee  Ka          =0x00000006______________________________________ 
    
     A block diagram of the data flow of a RAMDAC monolithic integrated circuit of a preferred embodiment of the present invention is shown in FIG. 9. The Control Point RAMs 400a,b,c and Forward Difference Coefficient Generators 410a,b,c and Forward Difference Engines 420a,b,c (shown in more detail in FIGS. 10-12) correspond to CVCC 200 of FIG. 1 and is detailed in FIG. 2. Each of the three Control Point RAMs 400a,b,c can contain 18 control points, which will support a display that is 1920 pixels wide. 
     For a 1920×1030 display, there are 18×3×1030 or 55,620 Luminosity Control Points (Pi&#39;s) to be stored in VRAM. If two bytes of storage are used for each Luminosity Control Point, then this represents approximately a 1.9% memory storage overhead for 24 bit color as compared to the storage requirements for the image itself. 
     With reference again to FIG. 9, after the Forward Difference Engines 420a,b,c compute the correction values, the correction values are combined with the outputs of the color lookup tables (LUTs) in multipliers 440a,b,c (where these multipliers correspond to multipliers 250a,b,c of FIG. 2). The outputs of the multipliers are gamma corrected in the Inverse Gamma Correction circuits 450a,b,c to produce corrected values Ri&#39;, Gi&#39;, and Bi&#39;. These corrected values are then convened into analog signals by digital-to-analog converters 460a,b,c. 
     The logic in the Forward Difference Coefficient Generators 420a,b,c of FIG. 9 is shown in FIG. 10. The luminosity values are combined with a Basis Coefficient ROM 411, containing Basis Coefficients. These Basis Coefficients are preferably directly wired into the datapath. The Coefficient Queue 412 holds intermediate results (multiply-accumulate) of each coefficient calculation, and stores the coefficients until they can be transferred to the Forward Difference Stepper at the end of the current polynomial segment. 
     The logic in the Forward Difference Stepper is shown in FIG. 11. Integer forward differencing has the disadvantage that error accumulates rapidly. Hence a sufficient number of fractional bits must be carried in the coefficient registers to insure that error on the order of a luminosity value LSB does not occur. One technique, first discussed by Bartels et al. discusses the use of successive guard bits to achieve higher precision (ie. allow more forward steps) while using fewer bits. See. Richard Bartels, John Beatty, and Brian Barsky, &#34;An Introduction to Splines for use in Computer Graphics &amp; Geometric Modeling&#34;, pp. 400-406, Morgan Kaufmann Publishers, 1987. Hence the higher order registers, A and B, contain more fractional bits, and some number of bits are truncated from B before it is added to C. This creates the illusion of more fractional bits for the C and D register, thus freeing up more bits for the significand. While the truncations add additional error, the overall increase in bits makes the tradeoff well worthwhile. 
     A theoretical analysis of error accumulation using successive guard bits indicates that the size of the fractional parts of the coefficient registers should be as shown in the following table, TABLE 2. 
     
                       TABLE 2______________________________________   A,B          24 bits   C            16 bits   D            9 bits______________________________________ 
    
     However, because this application is well behaved (no more than 40% variation between adjacent control points), it is possible to get by with fewer fractional bits, as shown in FIG. 12. 
     These register sizes were empirically shown to be sufficient by generating correction surfaces for a number of &#34;worst case&#34; grids of luminosity control points using Integer Forward Differencing and comparing the outputs to a correction surface generated using full double precision floating point. 
     Note that the radix point for register D is shown 10 bits to the right of the MSB. This is because in simulations to verify the operation of the invention, actual visible correction surfaces were generated from luminosity data, rather than corrections to actual images. In the preferred embodiment, the radix point would be to the left of the MSB, and the upper fractional 10 bits would be sent to the multiplier to modify the incoming pixel color component. 
     Rather than compute the Integer Forward Difference coefficients on the fly in the RAMDAC, it may be possible to transmit the differences between successive A,B,C, and D coefficients during the horizontal retrace rather than the Luminosity Control Points. If the differences between successive coefficients is small enough, perhaps the penalty of the extra data transfer per horizontal retrace and extra on board RAM would be less than the silicon area required to calculate the coefficients on the chip (multipliers, etc). 
     Unfortunately, due to the high degree of fractional accuracy required in order to control the rapidly propagating error, the Integer Forward Difference coefficients are quite sensitive to changes in the Luminosity Control Points. 
     When adjacent Control Points differed by 35%, the maximum differences between successive coefficients required the number of bits shown in TABLE 3. 
     
                       TABLE 3______________________________________    A           12 bits    B           18 bits    C           16 bits    D           18 bits______________________________________ 
    
     When adjacent Control Points differed by only 2.5%, the maximum differences between successive coefficients required the number of bits shown in TABLE 4. 
     
                       TABLE 4______________________________________    A           9 bits    B           13 bits    C           13 bits    D           18 bits______________________________________ 
    
     The 2.5% case would require approximately 4 times the on-board RAM over the alternate approach. More importantly, 4 times more storage would be required in VRAM for the coefficients, which is too much. 
     Various other modifications and alterations in the method and apparatus of this invention will be apparent to those skilled in the art without departing from the scope and spirit of this invention. Although the invention has been described in connection with specific preferred embodiments, it should be understood that the invention as claimed should not be unduly limited to such specific embodiments.