Method and apparatus for image-dependent color shifting

Abstract: A method of correcting color shifts produced by improper imaging in a natural scene image including the steps of: converting by convertor (100) an electronically encoded natural scene image described in terms of red-green-blue color space to electronic encoding terms of luminance, chrominance color space; sorting in a sorter (102) each luminance signal forming the image into one of a plurality of predetermined luminance magnitude bands; for each luminance magnitude band, calculating in averaging circuitry (104,150) the band average chrominance signal of each pixel in the band to determine the relative amounts of each color in the band; for each band average chrominance signals, averaging in an interband averaging circuit (108) the band average chrominance signals over a subset of the luminance magnitude bands to derive an interband average chrominance value; comparing at a comparator (120) each interband average chrominance value with neutral gray color to determine a correction signal; for each luminance magnitude band, adding the correction signal to the color of each pixel in the band.

Description: The present invention is directed towards a method and apparatus for image-dependent color shifting in electronic documents of strongly color shifted natural scene images. In the past, a typical application for copiers or scan-to-print image processing systems was to reproduce an input image as accurately as possible, i.e., render a copy. Thus, copies have been rendered as accurately as possible, flaws and all. However, as customers become more knowledgeable in their document reproduction requirements, they recognize that an exact copy is often not what they want. Instead, they would rather obtain the best possible document output. Until recently, image quality from the output of a copier or a scan-to-print system was directly related to the input document quality. One very common set of input documents includes photographs. Unfortunately, photography is an inexact science, particularly among amateurs, and original photographs are often poor. Alternately, technology, age or image degradation variations result in pictures having an unsatisfactory and undesirable appearance. What is desired then, is a copy giving the best possible picture, and not a copy of the original. One improvement that can be made to an image is correction of color shifts. When photographic color prints (a significant image source for electronic images) are made from negative or positive color images, the overall colors of the print frequently do not correspond to those desired. This may arise from a number of causes, such as change in sensitivity of the film due to aging, use of incorrect lighting, error in print processing and the like. If an exact print is made from such pictures based on the sensitivity which the film should have had, i.e, assuming that the positive or negative was correct, then the printer, particularly if a reflection prints (as opposed to a transparency) will display the errors to a greater extent than the transparency because such printers are nearly always viewed under conditions in which there are comparison objects. Of course, electronic images can only reproduce what is recorded, but given the possibility of pixel by pixel color editing. US-A 2,571,697 to Evans teaches that in photographic processes, an overall color shift can be made to the image without knowledge of the original colors. Starting with the assumption that if light passes though the printing apparatus onto a printing material without a color image or other obstruction in the light beam, the printing light should produce a neutral gray (approximately). For a color shifted image, if light which will reproduce substantially as gray on the printing material is permitted to pass though the transparency so that a uniform amount of the light strikes the transparency at all points, the light passing through the transparency usually will not print as neutral gray, but will deviate from gray by an appreciable amount. The light which passes through the transparency is collected or integrated and each component primary color forming the light is measured by the use of a photoelectric cell. By comparing the amount of these colors received after passing through the transparency with the amount of these colors in light from the light source, a correction factor can be determined, and an adjusted light source can be provided, by inserting a filter in the light path. It will no doubt be appreciated that the photographic correction process described in US-A-2,571,697 to Evans is limited to changes across the entire image, limited to filters available; limited to corrections to each component color, and limited to uniform analog changes over the entire input intensity range. JP-A-04172094 reduces color slippage by inputting RGB picture data into a color slippage correcting circuit. The brightness exponent of the picture data is then changed so as to contradict the smoothing effect of the color slippage correcting circuit. According to the present invention there is provided a method and apparatus according to any one of the appended associated method and apparatus claims. In accordance with one aspect of the invention, there is provided a method of correcting color shift produced by improper imaging in a natural scene image including: converting an electronically encoded natural scene image described in terms of color density color space signals to an electronic encoding in terms of luminance/chrominance color space signals (Y,E,S) each having a luminance component (Y) and a chrominance component (E,S); sorting each luminance/chrominance color space signal (Y,E,S) forming the image into one of a plurality of predetermined luminance magnitude bands (L 1 -L N ) in accordance with the magnitude of its luminance component (Y); for each luminance magnitude band (Li), calculating a band average chrominance signal (<E>;<S>) from the chrominance component (E,S) of the luminance/chrominance color space signals (Y,E,S) in that band to determine an average color in the band; for each calculated band average chrominance signal, smoothing interband differences between band average chrominance signals, by averaging each calculated band average chrominance signal with at least one calculated band average chrominance signal, and less than all the calculated band average chrominance signals, to calculate an interband average chrominance value for each calculated band average chrominance signal; comparing each interband average chrominance value with neutral gray color signal to determine a color shift correction signal for a corresponding luminance magnitude band and for each luminance magnitude band, adding the correction signal to the color of each pixel in the band to shift the color of the natural scene image. In accordance with a second aspect of the present invention there is provided a color shift correcting system for correcting the color shifts produced by improper imaging in a natural scene image including: a source of electronically encoded natural scene images encoded in terms of color density color space signals; a color space converter, for receiving as an input the electronically encoded natural scene image and providing as an output an electronically encoding natural scene image in terms of luminance/chrominance color space signals (Y,E,S) each having a luminance component (Y) and a chrominance component (E,S); a luminance signal sorter for receiving as an input at least the luminance components of the luminance/chrominance color space signals from the color space converter, and mapping each luminance/chrominance color space signal forming the image to one of a plurality of predetermined luminance magnitude bands in accordance with the magnitude of its luminance component (Y); an averaging circuit for receiving as an input for each luminance magnitude band the chrominance component of the luminance/chrominance color space signals (Y,E,S) in that band, and producing as an output signal a band average chrominance signal representing an average color in the band; an interband averaging circuit for receiving as an input for each luminance magnitude band the calculated band average chrominance signal and at least one calculated band average chrominance signal, and less than all the calculated band average chrominance signals, from other luminance magnitude bands, and producing as an output signal an interband average chrominance signal for each calculated band average chrominance signal whereby interband differences between band average chrominance signals are smoothed; a comparator, having as inputs each interband average chrominance value, and a signal representing neutral gray, and providing as an output a difference signal representing the different therebetween, whereby a color shift correction for a corresponding luminance magnitude band is determined; and a signal adder, having as inputs the difference signal, and the electronically encoded natural scene image in terms of luminance/chrominance color space signals for each luminance magnitude band corresponding to the difference signals, and producing as an output a color shifted signals. The described process determines for a given brightness band the deviation from gray of the image. Clearly, if the image is not color shifted, relatively little color correction will occur. Additionally, operating on the image by luminance brightness bands arrangement mitigates the problems of the usual image composition centered on a single color from causing a color shift to occur over an entire image. In accordance with another aspect of the invention, the described color shifting process optimally addresses strongly color shifted images, and accordingly detection of strongly shifted color image might be achieved by comparing the variation of the color as defined in the chrominance signals over the luminance band with a threshold signal, to determine whether the image is strong color shifted. This detection can be used to prevent operation on the image in cases where the benefits are minimal. The present invention will be described further, by way of examples, with reference to the accompanying drawings, in which:- Figure 1 shows a block diagram of a system employing the present invention; Figure 2 shows a block diagram of a system accomplishing the present invention; Figure 3 shows the principle of the present invention operation; and Figure 4 shows the correction afforded by the present invention. Referring now to the drawings where the showings are for the purpose of describing the embodiment of the invention and not for limiting same, reference is made to Figure 1 which scan-to-print system in which the present invention may find advantageous use. In the present invention, natural scene images, typically the result of a photographic process, as opposed to computer generated imagery, are scanned at a scanner 10 or the like. Scanner 10 represents a device, which may include a slide scanner, a document scanner, an electronic camera etc., for reducing a visible image to electronic signals. The electronic signals produced by the scanner 10 are commonly defined in terms of a standard CIE color space or alternatively, are convertible to such space such as the color spaces described in the "Xerox Color Encoding Standard," XNSS 289005, 1989. These signals are edited, enhanced and prepared for printing at color image processing unit 20, which in Figure 1 provides as an output r, g, b signals. Printer 30 receives the signal from color image processing unit 20, and provides for conversion of the signals to printer driver signals, commonly given in terms of the colorants that will be used in reproduction, typically Cyan, Magenta, Yellow and Key or black (CMYK). The printer has an output of the natural scene image, which, hopefully, closely resembles the scene viewed by the user originally. Alternatively, the processed image from color image processing unit 20 is displayed on a television screen, CRT display or the like. In accordance with the invention, and with reference to Figure 2, the received signals, in this case r, g, b signals, are initially converted at color space converter 100 to a color space representation of the image in a luminance / chrominance system, where one value describing the image represents brightness and the remaining two values represent color. One such space that is preferred for the process is Xerox YES, as described in the above citation. The YES described image signals are next sorted at sorter 102 by luminance signals into a plurality of luminance magnitude bands. Thus, for example, if the luminance signal is an 8 bit digital signal, as it is expected to be, the luminance signals might be sorted into 16 different bands, such as 0-15, 15-31, 32-47,... 240-255. The bands do not have to be equal in size. Greater and lesser numbers of bands are desirable, although a number of bands greater than 1 is desired. A number of bands greater than 16 bands tends to produce artificial looking results. Each of the bands are processed more or less the same way, and accordingly, only the band for luminance values 16-31 will be described. At each band, the E and S signals associated with L signals within the luminance magnitude band are averaged at averagers 104 and 106, thus deriving a band average, which for the second luminance band L 2 is designated <E> 2 and <S> 2 , reflecting the integral signal of the color within a luminance magnitude band. This band average signal represents the band chrominance and will be used for determining the required color shift. Additionally, an optional measurement of the standard deviations σ E and σ S is taken in blocks 104 and 106 to aid the color shift detection in optional color shift detection block 105. In order to soften what may be very disparate color shifts between bands, at interband averager 108, the band average <E> l and <S> l signals are also averaged with the band average <E> j and <S> j signals of a few of the adjacent bands. In the example of Figure 2, <E> 2 <S> 2 is averaged with <E><S> 1 and <E><S> 3 . Interband averaging may be performed with the immediately adjacent band averages, with the immediate and second neighbors, only one neighbor or some other combination of band averages. It will not accomplish the goals of the invention however, to uniformly interband average with the entire set of band averages. The interband averaging arrangement may also use a weighting function, which weights the neighbors and therefore their contribution to the interband average. The output of interband averager 108 is compared at comparator 120, which has as one input the signal <E> 2 <S> 2 and as a second input, a signal representing the value of gray at the center of the luminance magnitude band which commonly equals Zero. The output of comparator 120 represents the difference in color values of <E> 2 <S> 2 and neutral gray. This value is the color shift value which will be added to each signal within the luminance magnitude band to which it applies. At signal adder 122, the output of comparator 120, ΔGray ES is added to each value within the second luminance magnitude band L 2 or L = 16-32. The output of the signal adder 122 is directed to a second color space converter 130 so that the signal may be further processed, or to another output. It has been determined that the described process works better when it is applied only to strongly color shifted natural scene images. It is known that images with very large color variations relative to the average chrominance are not likely to be strongly color shifted. Therefore, optionally provided is color shift detector 105. Signals from color space converter <E>, <S> and σ E , σ S are compared at block 105 to determine the relationship between the color shift <E>, <S> and the color variation σ E , σ S . For strongly color shifted original images a good indication is that the average color shift <E>,<S> of the individual luminance bands is in general larger than the color variation σ E , σ S . If color shift processing is not warranted, the color signals are directed immediately to an output such as color space converter 130. With reference now to Figures 3 and 4, the invention is shown graphically for improved understanding. Figure 4 shows a section of color space, generally illustrated as a cylindrical solid, although it is understood that the gamut of real colors is a subset of the displayed cylindrical solid. The axis of the solid represents the luminance signal or gray values, varying from black to white. A ray C, extending from the solid represents chrominance given in Figures 3 and 4 as difference signals E (red minus green) and S (yellow minus blue). The axial length of the cylinder can be divided into a plurality of bands or parallel planes defined by the magnitude of the luminance signal. It can be seen that within a band defined by planes at Y K and Y M , a plurality of colors C N are defined by their vector from the axis. If vectors C N are averaged, they provide a new band average vector C corr which has distance and direction from the axis. The band average vector may be averaged with one or more other average vectors (not shown). With reference now to Figure 4, the same section of color space is shown, illustrating the movement of each color C N by a distance and direction defined by the difference between the band average vector C corr and neutral gray. The colors of the image are thus changed. It will no doubt be appreciated that the present invention can be accomplished through application software accomplishing the functions described, though a hardware circuit, which will probably provide optimum speed, or through some combination of software and hardware.

Claims: A method of correcting color shift produced by improper imaging in a natural scene image including: converting an electronically encoded natural scene image described in terms of color density color space signals to an electronic encoding in terms of luminance/chrominance color space signals (Y,E,S) each having a luminance component (Y) and a chrominance component (E,S); sorting each luminance/chrominance color space signal (Y,E,S) forming the image into one of a plurality of predetermined luminance magnitude bands (L 1 -L N ) in accordance with the magnitude of its luminance component (Y); for each luminance magnitude band (Li), calculating a band average chrominance signal (<E>;<S>) from the chrominance component (E,S) of the luminance/chrominance color space signals (Y,E,S) in that band to determine an average color in the band; for each calculated band average chrominance signal, smoothing interband differences between band average chrominance signals, by averaging each calculated band average chrominance signal with at least one calculated band average chrominance signal, and less than all the calculated band average chrominance signals, to calculate an interband average chrominance value for each calculated band average chrominance signal; comparing each interband average chrominance value with neutral gray color signal to determine a color shift correction signal for a corresponding luminance magnitude band and for each luminance magnitude band, adding the correction signal to the color of each pixel in the band to shift the color of the natural scene image. A method as claimed in claim 1, wherein after sorting, the step of detecting strongly shifted color images is provided, including: comparing variation in color of the natural scene image as defined by the chrominance components of signals within a luminance magnitude band with the band average chrominance signal, to determine whether the image is strong color shifted; and directing the signals to an output if the comparison does not indicate a strongly color shifted color image. A method as claimed in claim 1 or claim 2, wherein the color density space is defined in terms of red-green-blue signals and/or wherein the luminance color space is defined in terms of Xerox YES signals. A method as claimed in any one of claims 1 to 3, wherein the luminance and chrominance components are defined in terms of 8 bit values, and the luminance components so defined are sorted into approximately 16 bands. A method as claimed in any one of claims 1 to 4, wherein the step of smoothing interband differences between band average chrominance signals, includes weighting the contribution to the interband average chrominance value in accordance with the difference in value of the luminance magnitude of the luminance magnitude band. A color shift correcting system for correcting the color shifts produced by improper imaging in a natural scene image including: a source of electronically encoded natural scene images encoded in terms of color density color space signals; a color space converter (100), for receiving as an input the electronically encoded natural scene image and providing as an output an electronically encoding natural scene image in terms of luminance/chrominance color space signals (Y,E,S) each having a luminance component (Y) and a chrominance component (E,S); a luminance signal sorter (102) for receiving as an input at least the luminance components of the luminance/chrominance color space signals from the color space converter (100), and mapping each luminance/chrominance color space signal forming the image to one of a plurality of predetermined luminance magnitude bands in accordance with the magnitude of its luminance component (Y); an averaging circuit (104,105) for receiving as an input for each luminance magnitude band the chrominance component of the luminance/chrominance color space signals (Y,E,S) in that band, and producing as an output signal a band average chrominance signal representing an average color in the band; an interband averaging circuit (108) for receiving as an input for each luminance magnitude band the calculated band average chrominance signal and at least one calculated band average chrominance signal, and less than all the calculated band average chrominance signals, from other luminance magnitude bands, and producing as an output signal an interband average chrominance signal for each calculated band average chrominance signal whereby interband differences between band average chrominance signals are smoothed; a comparator (120), having as inputs each interband average chrominance value, and a signal representing neutral gray, and providing as an output a difference signal representing the different therebetween, whereby a color shift correction for a corresponding luminance magnitude band is determined; and a signal adder (122), having as inputs the difference signal, and the electronically encoded natural scene image in terms of luminance/chrominance color space signals for each luminance magnitude band corresponding to the difference signals, and producing as an output a color shifted signals. A system as claimed in claim 6, additionally providing a strongly shifted color image detector including: a comparator (105) having as inputs the chrominance components of the sorted signals and the band average chrominance signal, and producing an output signal indicative of whether the image is strong color shifted; and switching means for directing the electronically encoding natural scene image in terms of luminance/chrominance color space signals from the luminance signals sorter to an output if the comparator does not indicate a strongly color shifted color image. A system as claimed in claim 6 or claim 7, wherein the color density space is defined in terms of red-green-blue signals and/or wherein the luminance/chrominance color space is defined in terms of Xerox YES signals. A system as claimed in any one of claims 6 to 8, wherein the luminance and chrominance color space components are defined in terms of 8 bit values, and the luminance components defined are sorted into approximately 16 bands. A system as claimed in any one of claims 6 to 9, wherein the interband averaging circuit further comprises: means for weighting the contribution to the interband average chrominance value of each of at least one calculated band average chrominance signal in accordance with the difference in value of the luminance magnitude with luminance magnitude of the given band average chrominance signal.

Inventors: ESCHBACH REINER, ESCHBACH, REINER
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1994
Main classification: H04N1
IPC codes: H04N1, G03G15, G06T5, H04N9