Apparatus and method for automatic colour conversion

Abstract: The present invention changes a color corresponding to a source color to a destination color by initially selecting a target source color and a target destination color. The selected target source color is converted to a source hue value, a source chroma reference value, and a source lightness reference value, and the selected target destination color is converted to a destination hue value, a destination chroma reference value, and a destination lightness reference value. A circuit then generates a first set of source/destination chroma and a first set of source/destination lightness values representing source/destination chroma and lightness relationships, respectively, for sources values in a range from the source chroma and lightness reference values, respectively, to minimum source chroma and lightness values, respectively, using a first and third function, respectively. The circuit also generates a second set of source/destination chroma values and a second set of source/destination lightness values representing source/destination chroma and lightness relationships, respectively, for source values in a range from the source chroma and lightness reference values, respectively, to maximum source chroma and lightness values, respectively, using a second and fourth function, respectively. These values are stored. Received color data is converted to a color hue value, a color chroma value, and a color lightness value. A comparator determines if the color hue value corresponds to the source hue value. When the comparator determines that the color hue value corresponds to the source hue value, destination chroma and lightness values associated with the source chroma and lightness values, respectively, that corresponds to the color chroma and lightness values, respectively, are selected based on the stored source/destination chroma and lightness relationships, respectively. The destination hue value and the selected destination chroma and lightness values are converted into output color data representing the destination color.

Description: The present invention is directed to an apparatus and method for converting images of one color to images of another color. More particularly, the present invention is directed to an apparatus and method for color conversion wherein the target color is converted to a designated color while maintaining its gradation characteristics and a high quality. Conventional copiers, digital copiers in particular, offer various features for image editing in reproducing a document, including color conversion: this enables a user to designate a color in the document and convert this designated color to another color. With the color conversion function, the user selects a source color and a destination color such that the reproduced document will have all areas corresponding to the source color changed to the destination color. In a conventional digital copier, there may be a choice of retaining the source area gradation or not. The gradation mode is appropriate for pictorial images, while gradation can be excluded when constant colors are used; i.e., in business graphics. Color conversion involves the detection of pixels whose color is close to that of the selected source color and subsequent changing of the source color to the user selected destination color. The color video data from a scanner is usually in the form of red, green and blue (RGB) intensity. In order to identify pixels belonging to a particular color, it is possible to check the RGB values directly. However, simply checking the RGB values to identify pixels of a certain color and perform changes therefrom is not always satisfactory. Conventionally, color conversion operations have preferred to identify the particular color by studying the hue, chroma, and lightness of the color after converting the RGB values to a hue, chroma, and lightness space. Color spaces of this nature include the Munsell color specification, HSV, HLS (a space used in computer graphics), HSI (a color spaced used in image processing), and L*C*h which is a polar coordinate formed of L*a*b*. Hue is defined generically by the common term color. In other words, such common terms as red, yellow, green, and blue refer to hue. It is generally represented as an angular coordinate in the hue/chroma/lightness color space. The vividness or dullness of a color is defined as saturation or chroma. In other words, chroma or saturation indicates how close a color is either to gray or to its pure hue. It is represented as a radial coordinate in the hue/chroma/lightness color space. The chroma changes on a horizontal plane with the gray at the center and the colors becoming more vivid as the chroma value moves outwardly in each hue direction. The vertical dimension in the hue/chroma/lightness space is the lightness or intensity. This value refers to the luminous intensity with black and white at the extremes. To perform color conversion, the RGB values of a color are converted to the corresponding hue, chroma, and lightness representation. Upon color detection, the hue, chroma, and lightness values of the scanned color are converted to the hue, chroma and lightness values of a new destination color. The converted hue, chroma and lightness values can be transformed back to RGB values or the CMYK values for color output to a printer. An example of such a system is disclosed in US-A-4,500,919 to Schreiber. One version of color conversion is the monochrome mode. In this mode, an entire document is reduced to gray or a single hue. To obtain gray output, the chroma value of all pixels are changed to zero and the hue value becomes undefined while the lightness value remains unchanged. Such a monochrome mode method is illustrated in Figure 1. In conventional non-monochrome color conversion systems, only those pixels that have a color value close to the user selected source color are changed. Thus, it is necessary to check if a pixel is in the vicinity of the selected source color. If the pixel is in the vicinity of the selected source color, the appropriate color change is applied to that pixel. The actual color conversion process depends upon the selected source and destination color and can be separated into color to color, color to gray, and gray to color modes. The user can also select between a gradation mode and a no gradation mode. A gradation mode retains the shading of the source area in the output, while a no gradation mode renders a constant color. In the following discussions, h s , C* s , L* s , and h d , C* d and L* d denote the hue, chroma, and lightness values of the user selected source and destination colors, respectively. The symbols h, C*, L*, and h', C*', L*', denote the pixel values before and after the color conversion process. The gray to color conversion mode requires the user to specify the L* max , and C* max limits so as to define the source gray pixels. The color to color and color to gray conversion modes may require the user to specify the source color range in hue angles, h min = h s - dh, h max = h s + dh, and a minimum chroma value, C* min . The hue angles h min and h max , define a hue window with a half width dh. An example of a hue window is illustrated in Figure 2. It is noted that h max >h min is the usual case with respect to a hue window. However, if the hue window straddles the zero degree angle, h max will be less than h min . The hue angle is defined in the range from 0° to 360°. Thus, the hue value of the pixel needs to be normalized. In the normalization process, the following routines are carried out until h is within the range of 0° to 360°. If h is less than 0°, h = h + 360°, and if h is greater than or equal to 360°, h = h - 360°. For the gray to color mode, the chroma of a pixel needs to be checked against an upper bound C* max to ensure that the pixel under consideration is gray and is within the specified lightness range. If the pixel in question is a gray pixel, the hue and chroma are changed to that of the selected destination color and the lightness value change would depend upon the choice of gradation. For the color to gray mode, the color detection consists of checking if the hue is within the window of the source color. Once the pixel is determined to be within the hue window of the source color, the chroma value of the pixel in question may be checked against a lower limit chroma value C* min to insure that it is not a gray pixel. Once the pixel is determined to be equivalent to a source pixel, the identified pixel has its chroma value set to zero and its hue value becomes undefined. The color to color mode requires a slightly different process. For the color to color mode, the color detection consists of checking if the hue is within the window of the source color. Once the pixel is determined to be within the hue window of the source color, the chroma value of the pixel in question may be checked against a lower limit chroma value C* min to ensure that it is not a gray pixel. Once the pixel is determined to be equivalent to a source pixel, the gradation mode is checked. If there is no gradation mode, the color to color mode process sets the hue, chroma, and lightness values of the pixel to that of the destination color. For the gradation mode, the conventional device sets the hue value to that of the destination color while maintaining the chroma and lightness values unchanged to provide gradation. An example of a conventional device for converting one color to another color is described in US-A-4,972,257: this discloses a device which allows a user to convert a selected color of a color image to the same image having modified color for the selected color. During the conversion process, the conversion of the hue, saturation, and lightness properties are adjusted manually by the operator. In other words, once the color of the pixel in question is determined to be equivalent to the selected source color, the image data of the pixel is converted to a predetermined hue value, a predetermined saturation value, and a predetermined lightness value. After establishing the hue, saturation, and lightness values, the operator may adjust there various values to realize the desired color and gradation. JP-A-4336869 describes a color picture editing device which reads in RGB picture data and converts this into density, hue and saturation data. The density, hue and saturation data are then compared to respective reference values using a comparator means. This allows a predescribed color to be detected corresponding to the color picture. The density, hue and saturation can then be adjusted using a conversion means which is controlled on the basis of the comparison of the density, hue and saturation signals, with their respective reference values. Another example for converting one color to another color is illustrated in Figure 3. In Figure 3, it is determined at step S10 whether the incoming pixel value is from a gray source. If the pixel value in question is a from gray source, step S11 determines whether the pixel value has a chroma value less than a maximum chroma value (C* max ). If the chroma value of the pixel in question is not less than C* max , step S19 establishes the hue, chroma, and lightness values to remain unchanged in the pixel in question. However, if step S11 determines that the chroma value of the pixel in question is less than C* max , step S12 determines whether the lightness value of the pixel in question is greater than a minimum lightness value (L* min ) and less than a maximum lightness value (L* max ). If this condition is not satisfied at step S12, the hue, chroma, and lightness values remain unchanged as described above with respect to step S19. However, if the lightness value of the pixel in question does satisfy the conditions of step S12, step S13 determines whether a gradation mode has been selected. If a gradation mode has been selected, step S20 establishes the new hue and chroma values to be the destination hue and chroma values while allowing the lightness value to remain unchanged. On the other hand, if step S13 determines that no gradation mode has been selected, step S14 establishes the new hue, chroma, and lightness values to be the destination hue, chroma, and lightness values, respectively. If step S10 determines that the source is not a gray source, step S15 determines whether the maximum hue value (h max ) of a hue window is greater than or equal to the minimum hue value (h min ) of the hue window. If h max is greater than h min , step S16 determines whether the hue value of the pixel in question is greater than h min of the hue window and less than h max of the hue window. On the other hand, if step S15 determines that h max for the hue window is not greater than h min for the hue window, step S17 determines whether the hue value for the pixel in question is greater than h min for the hue window or less than h max for the hue window. If the hue value of the pixel in question does not meet the condition of step S16 or the condition of step S17, the hue, chroma, and lightness values remain unchanged as discussed above with respect to step S19. However, if the hue value of the pixel in question meets the conditions of either step S16 or step S17, step S18 determines whether the chroma value of the pixel in question is greater than a minimum chroma value (C* min ). If step S18 determines that the chroma value of the pixel in question is not greater than C* min , the hue, chroma, and lightness values remain unchanged as discussed above with respect to step S19. On the other hand, if the chroma value of the pixel in question is greater than C* min , step S21 determines whether the destination color is a gray destination. If the destination color is a gray destination, step 522 determines whether a gradation mode has been selected If a gradation mode has been selected, step 530 establishes the hue value as being undefined, the chroma value as being equal to zero, and allows the lightness value to remain unchanged. However, if step 522 determines that no gradation mode has been selected, step 523 establishes the hue value as being undefined, the chroma value as zero, and the lightness value as being equal to the destination lightness value. On the other hand, if step S21 determines that the destination color is not a gray destination, step 524 determines whether a gradation mode has been selected. If no gradation mode has been selected, step 534 establishes the hue value as the destination hue value, the chroma value as the destination chroma value, and the lightness value as the destination lightness value. However, if a gradation mode has been selected in step S24, step 539 establishes the hue value as the destination hue value, while allowing the chroma value and the lightness value to remain unchanged. Although conventional devices have a color conversion feature with gradation, the gradation is less than satisfactory in most instances. For example, in the method described with respect to Figure 3, if the original color is different in saturation or lightness from the user selected destination color, the output color will not quite match the selected color. This problem is caused because the source color has different average chroma and lightness values from that of the destination color, and these values have not been changed. Moreover, simply setting the chroma conversion that contains no true gradation. This causes many problems when attempting to reproduce a high quality document having the original colors of the image converted to certain destination colors. On the other hand, US-A-4,972,257 discloses the provision for the operator with the opportunity to adjust the hue, saturation, and lightness values manually so as to match the desired destination color with the selected source color. To realize a proper color to color conversion automatically so as to provide high speed copying without operator intervention while maintaining a true gradation capability, the system or method must be capable of internally and automatically adjusting the chroma and lightness values of the pixels in question such that the color conversion process can generate converted values which closely resemble the destination color. It is an object of the present invention, therefore, to provide a system or method that readily converts color data representing a source color to color data representing a destination color while maintaining integrity and graduation. In accordance with a first aspect of the present invention, we provide a system for changing inputted color data of a color image corresponding to a source color to a destination color, as defined in appended claim 1. In accordance with a second aspect of the present invention, we provide a method for changing inputted color data of a color image corresponding to a source color to a destination color, as defined in appended claim 2. In addition, the invention may have particular embodiments as defined in appended dependent claims 3 and 4. Further objects and advantages of the present invention will become apparent from the following description of the various embodiments and characteristic features of the present invention, in conjunction with the drawings, in which: Figure 1 illustrates a conventional flow chart for carrying out a color conversion process in a monochrome mode; Figure 2 illustrates a prior art schematic of a hue window in L*C*h space; Figure 3 illustrates a flow chart showing a prior art method for carrying out a color to color conversion process; Figure 4 illustrates a flow chart showing one embodiment of the present invention which carries out a color to color conversion in a color to color mode wherein gradation is automatic; Figure 5 illustrates a flow chart showing a further embodiment of Figure 4 wherein the color to color conversion process allows the selection between gradation and no gradation; Figure 6 illustrates a flow chart showing a third embodiment of the present invention which carries out a color to color conversion process having a color to color mode with gradation and a color to gray mode with gradation; Figure 7 illustrates a flow chart showing a fourth embodiment of the present invention which carries out a color to color conversion process having a color to color mode with gradation, a color to gray mode with gradation, and a gray to color mode with gradation; Figure 8 illustrates a flow chart showing a further embodiment of Figure 7 which includes the determination of a minimum chroma value; Figure 9 shows a block diagram illustrating a basic embodiment of the present invention; Figure 10 illustrates a block diagram showing a hardwired circuit for the embodiment illustrated in Figure 4; Figure 11 illustrates a block diagram showing a hardwired circuit for the embodiment illustrated in Figure 5; Figure 12 illustrates a block diagram showing a hardwired circuit for the embodiment illustrated in Figure 6; Figure 13 illustrates a block diagram of a hardwired circuit for the embodiment illustrated in Figures 7 and 8; Figure 14 illustrates a graphical representation showing a functional relationship between source chroma and lightness values and destination chroma and lightness values according to one embodiment of the present invention; Figures 15(A) and 15(B) illustrate graphical representations of functional relationships between source chroma and lightness values and destination chroma and light values according to a preferred embodiment of the present invention; and Figure 16 illustrates graphical representations showing functional relationships between source chroma and lightness values and destination chroma and lightness values according to still another embodiment of the present invention. In the following description, as well as in the drawings, like reference numerals represent the devices or circuits or equivalent circuits which perform the same or equivalent functions. In the following discussions with respect to the present invention, h s , C* s , L* s , and h d , C* d and L* d denote the hue, chroma, and lightness values of the user selected source and destination colors, respectively. The symbols h, C*, L*, and h', C*', L*', denote the pixel values before and after the color conversion process. The gray to color conversion mode requires the user to specify the L* max , and C* max limits so as to define the source gray pixels. The color to color and color to gray conversion modes may require the user to specify the source color range in hue angles, h min = h s - dh, h max = h s + dh, and a minimum chroma value, C* min . The hue angles h min and h max , detine a hue window with a half width dh. The hue angle is defined in the range from 0° to 360°. Thus, the hue value of the pixel needs to be normalized. In the normalization process, the following routines are carried out until h is within the range of 0° to 360°, if h is less than 0°, h = h + 360°, and if h is greater than or equal to 360°, h = h - 360°. Figure 4 illustrates one embodiment of the present invention. In Figure 4, step S15 determines whether the maximum hue value (h max ) of the hue window is greater than or equal to the minimum hue value (h min ) for the hue window. If h max is greater than h min , step S16 determines whether the hue value of the pixel in question is greater than h min of the hue window and less than h max of the hue window. On the other hand, if step S15 determines that h max for the hue window is not greater than h min for the hue window, step S17 determines whether the hue value for the pixel in question is greater than h min for the hue window or less than h max for the hue window. If the hue value of the pixel in question does not meet the condition of step S16 or the condition of step S17, the hue, chroma, and lightness values are established at step S19. At step S19, the hue, chroma, and lightness values remain unchanged for the pixel in question. However, if the hue value of the pixel in question meets the conditions of either step S16 or step S17, step S29 establishes the hue, chroma, and lightness values according to the functional relationships which will be discussed in more detail below. Figure 5 illustrates another embodiment of the present invention. In Figure 5, the determination of the hue value is the same as described above with respect to Figure 4. Figure 5 modifies Figure 4 with the addition of a gradation branch. More specifically, if the hue value of the pixel in question does not meet the condition of step S16 or the condition of step S17, the hue, chroma, and lightness values are established at step S19 as discussed above with respect to Figure 4. However, if the hue value of the pixel in question meets the conditions of either step S16 or step S17, step S24 determines whether a gradation mode has been selected. If no gradation mode has been selected, step S34 establishes the hue value as the destination hue value, the chroma value as the destination chroma value, and the lightness value as the destination lightness value. However, if a gradation has been selected in step S24, step S29 establishes the hue value, the chroma value, and the lightness value as discussed above with respect to Figure 4. Figure 6 illustrates a third embodiment of the present invention. In Figure 6, the method steps having the same labels perform the same functions as described above with respect to Figures 4 and 5. Figure 6 modifies Figure 5 with the addition of a gray destination branch. Figure 7 illustrates a fourth embodiment of the present invention. In Figure 7, the method steps having the same labels perform the same functions as described above with respect to Figures 4, 5, and 6 Figure 7 modifies Figure 6 with the addition of a gray source branch. More specifically, it is determined at step S10 whether the incoming pixel value is a gray source. If the pixel value in question is a gray source, step S11 determines whether the pixel value has a chroma value less than the maximum chroma value (C* max ). If the chroma value of the pixel in question is not less than C* max , step S19 establishes the hue, chroma, and lightness values to remain unchanged in the pixel in question. However, if step S11 determines that the chroma value of the pixel in question is less than C* max , step S12 determines whether the lightness value of the pixel in questions is greater than a minimum lightness value (L* min ) and less than a maximum lightness value (L* max ). If this condition is not satisfied at step S12, the hue, chroma, and lightness values are established as described above with respect to step S19. If the lightness value of the pixel in question does satisfy the conditions of step S12, step S13 determines whether a gradation mode has been selected. If a gradation mode has been selected, step S20 establishes the hue and chroma values to be the destination hue and chroma values while allowing the lightness value to remain unchanged. On the other hand, if step S13 determines that no gradation mode has been selected, step S14 establishes the hue, chroma, and lightness values to be the destination hue, chroma, and lightness values, respectively. If step S10 determines that the source is not a gray source, the remaining process begins at step S15. Figure 8 illustrates a fifth embodiment of the present invention. In Figure 8, the method steps having the same labels perform the same functions as described above with respect to Figures 4, 5, 6,and 7 Figure 8 modifies Figure 7 with the addition of a chroma minimum value determination. Moreover, if the hue value of the pixel in question meets the conditions of either step S16 or step S17, step S18 determines whether the chroma value of the pixel in question is greater than a minimum chroma value (C* min ). If step S18 determines that the chroma value of the pixel in question is not greater than C* min , the hue, chroma, and lightness values remain unchanged as discussed above with respect to step S19. On the other hand, if the chroma value of the pixel in question is greater than C* min , step S21 determines whether the destination color is a gray destination. If step S21 determines that the destination color is a gray destination, the remaining process is the same as described with respect to Figure 7 beginning at step S22. If the destination color is a gray destination, step S22 determines whether a gradation mode has been selected. If a gradation mode has been selected, step S30 establishes the hue value as being undefined, the chroma value as being equal to zero, and allows the lightness value to remain unchanged However, if step S22 determines that no gradation has been selected, step S23 establishes the hue value as being undefined, the chroma value as zero, and the lightness value as being equal to the destination lightness value. On the other hand, if step S21 determines that the destination color is not a gray destination, step S24 determines whether a gradation mode has been selected. If no gradation mode has been selected, step S34 establishes the hue value as the destination hue value, the chroma value as the destination chroma value, and the lightness value as the destination lightness value. However, if a gradation has been selected in step S24, step S29 establishes the hue value, the chroma value, and the lightness value in the same manner as Figure 4. The establishing of the hue, chroma, and lightness values at step S29 in Figures 4-8 will be discussed using the illustrated examples of Figures 14-16. In all the embodiments discussed above, these examples can be utilized to establish the destination values. The relationship between the chroma value of the pixel in question and the chroma value for the destination color can be realized in many ways. Also, the relationship between the lightness value of the pixel in question and the lightness value for the destination color can be realized in many ways. For example, as illustrated in Figure 14, the relationship between the two chroma values could be a straight line between the points 0 and 255 wherein 0 represents gray and 255 represents the most pure hue color, and the relationship between the two lightness values could also be a straight line between the points 0 and 255 wherein 0 represents black and 255 represents white. These relationships can easily be established through ongoing calculations or look-up tables. In this example, the chroma and lightness values of the pixel in question are directly mapped to destination chroma and lightness values. In this relationship, the chroma and lightness values of the selected source color and the chroma and lightness values of the selected destination color do not affect the respective mapping functions. In other words, the chroma and lightness values of the pixel in question are not mapped through the chroma and lightness values of the selected source color and the chroma and lightness values of the selected destination color in this embodiment. On the other hand, the relationship between the chroma and lightness values of the pixel in question and the destination chroma and lightness values may be mapped through the chroma and lightness values of the selected source color and the chroma and lightness values of the selected destination color. Such a mapping technique is represented by a "rubber band" transformation as illustrated in Figures 15(A) and 15(B). With respect to the "rubber band" transformation, the actual chroma and lightness values for the selected source color and the chroma and lightness values of the designated color are an integral part of the mapping function. In this embodiment, the actual chroma and lightness values for the selected source color are, initially, mapped directly to the chroma and lightness values of the designated color (point c). Using the mapping of the chroma values as an example, the mapping function of the "rubber band" transformation will be explained. The remaining chroma values, the chroma values other than the chroma values for the selected source and destination color, are mapped utilizing a first straight line (line a) connecting the point representing pure gray to the exact mapped point (c) and a second straight line (line b) connecting the exact mapped point (c) to the point representing a pure hue. In other words, the chroma values which are less than the chroma value of the selected source color (point c) are mapped according to a first function (line a), and the chroma values greater than the chroma value of the selected source color (point c) are mapped utilizing a second function (line b). In this way, the chroma values of the selected source and destination colors are integrated into the mapping function such that the mapping function is dependent upon these values, unlike the mapping function of Figure 14. This mapping function is also equally applicable to the mapping of the lightness values. The mapping takes on the characteristics of a rubber band being originally extended between two points (in case of the chroma mapping, the two points are gray and pure hue) and which has been stretched to a third point (point (c), the point established by the chroma values of the selected source and destination colors) outside the original path of extension (the dotted line or mapping function of Figure 14). By using this type of transformation to map the chroma and lightness values, the negative effects of the different average chroma and lightness values for the source and destination colors in a color to color conversion process can be significantly reduced or effectively overcome. Figures 15(A) and 15(B) represent only two possibilities for implementing the "rubber band" transformation. More specifically, the apex (point c) of each transformation (function) could be below or above the dotted line (the dotted line representing the direct mapping of Figure 14). Also, the chroma value could be directly mapped as in Figure 14, and the lightness value established as illustrated in Figures 15(A) and 15(B), or the lightness value could be directly mapped as in Figure 14, and the chroma value established as illustrated in Figures 15(A) and 15(B). The type of mapping for the individual values is interchangeable. Furthermore, the relationship between the chroma and lightness values of the pixel in question the destination chroma and lightness values may be mapped through the chroma and lightness values of the selected source color and the chroma and lightness values of the selected destination color as follows. The chroma and lightness values for the selected source color are mapped directly to the chroma and lightness values of the designated color. The remaining chroma and lightness values are mapped utilizing exponential functions or other n-th degree polynomials where n may be greater than two. Using the chroma mapping as an example, the mapping function of this embodiment will be discussed. A first exponential function connects the point representing pure gray to the exact mapped point, and a second exponential function connects the exact mapped point to the point representing a pure hue. In other words, the chroma values which are less than the chroma value of the selected source color are mapped according to a first exponential function or other n-th degree polynomial, and the chroma values greater than the chroma value of the selected source color are mapped utilizing a second exponential function or other n-th degree polynomial. Again, the chroma values of the selected source and destination colors are integrated into the mapping function such that the mapping function is dependent upon these values, unlike the mapping function of Figure 14. This mapping function is also equally applicable to the mapping of the lightness values. This transformation allows an initial slower approach with a quicker convergence between the two end points and the exact mapped point. The relationship between the chroma and lightness values of the pixel in question and the destination chroma and lightness values may also be represented as follows. The chroma and lightness values for the selected source color are mapped directly to the chroma and lightness values of the designated color. The remaining chroma and lightness values are mapped utilizing exponential functions or other n-th degree polynomials where n is greater than two and a straight line. Using the chroma mapping as an example, a first exponential function connects the point representing pure gray to the exact mapped point, and a straight line connects the exact mapped point to the point representing a pure hue. In other words, the chroma values which are less than the chroma value of the selected source color are mapped according to the first exponential function or other n-th degree polynomial, and the chroma values greater than the chroma value of the selected source color are mapped utilizing a straight line. The chroma values of the selected source and destination colors are integrated into the mapping function such that the mapping function is dependent upon these values, unlike the mapping function of Figure 14. This mapping function is also equally applicable to the mapping of the lightness values. This transformation allows an initial slower approach with a quicker convergence between the gray point and the exact mapped point and a more direct convergence between the exact mapped point and the pure hue point. Lastly, the relationship between the chroma and lightness values of the pixel in question and the destination chroma and lightness values may be represented as illustrated in Figure 16. In Figure 16, the chroma and lightness values for the selected source color are mapped directly to the chroma and lightness values of the designated color (point c). The remaining chroma and lightness values are mapped utilizing a function which fits the three points (the two end points and the exact mapped point (c)). Using the chroma mapping as an example, the function, as illustrated in Figure 16, is fitted between the point representing pure gray, the exact mapped point (c), and the point representing a pure hue. The chroma values of the selected source and destination colors are integrated into the mapping function such that the mapping function is dependent upon these values. This mapping function is also equally applicable to the mapping of the lightness values. This transformation allows a more natural or gradual approach between the end points and the exact mapped point (c). Figure 9 illustrates a block diagram showing a basic embodiment of the present invention. In this block diagram, RGB data from a pixel in question is fed into a first converter 1. This first converter converts the RGB data into a color space represented by lightness, chroma and hue (L*C*h). However, it is noted that the RGB data can also be converted into other color spaces like the Munsell color specification, HSV, HLS, or HSI space without affecting the operations of the present invention. In a preferred embodiment, the RGB data is converted to the polar form of L*a*b*, L*C*h. Upon being converted to the color space format, the values are fed into a destination color generator circuit 5. This destination color generator circuit 5 generates destination hue (h 2 ), chroma (C* 2 ), and lightness (L* 2 ) values based upon the hue (h 1 ), chroma (C* 1 ), and lightness (L* 1 ) values inputted thereto and control signals inputted from a source color detector circuit 3. The source color detector circuit 3 monitors the hue (h 1 ) and chroma (C* 1 ) values outputted from the first converter 1 to determine what type of destination values are to be generated by the destination color generator circuit 5. In accordance with the control signals, the destination color generator circuit 5 generates the proper hue (h 2 ), chroma (C* 2 ), and lightness (L* 2 ) values for the present invention. The destination hue (h 2 ), chroma (C* 2 ), and lightness (L* 2 ) values are fed into a second converter 7 which converts the color space back to RGB data which can be further processed to enable a reproduction of the image being inputted into the initial converter 1 with the proper color modifications. Figure 10 illustrates a block diagram showing a hardwire circuit for the process illustrated in Figure 4. In this illustration, a logic circuit 100 makes an initial determination as whether the hue value of the pixel in question is within a hue window corresponding to the selected source color. To make this determination, the hue value of the pixel in question is fed into the logic circuit as well as the hue maximum value of the hue window and the hue minimum value of the hue window of the selected source color. Using the logic elements as illustrated, the logic circuit 100 will produce a high signal when the hue value of the pixel in question is within the hue window and produce a low signal when the hue value of the pixel in question is outside the hue window. The logic circuit 100 includes comparators 10, 12, and 13 which compare the hue window maximum with the hue window minimum, the hue window minimum with the hue value of the pixel, and the hue window maximum with the hue value of the pixel in question, respectfully. The AND gates 14, 16 and 17 with the OR gates 15 and 18, along with inverter 11, produce the output signal discussed above from the outputs of the three comparators 10, 12, and 13. The output signal from the logic circuit 100 is fed into multiplexers 19, 21, and 23. Multiplexer 19 selects either the hue value of the pixel in question or the hue value of the destination color depending upon the state of the signal inputted from the logic circuit 100. More specifically, multiplexer 19 selects the destination hue value when the logic circuit 100 determines that the hue value of the pixel in question is within the hue window of the selected source color. Multiplexer 21 selects either the output of the chroma destination value generator 20 or the chroma value of the pixel in question depending upon the state of the control signal received from the logic circuit 100. More specifically, multiplexer 21 selects the chroma value from the chroma destination value generator 20 when the logic circuit 100 determines that the hue value of the pixel in question is within the hue window of the selected source color. The multiplexer 23 selects either the output from the lightness destination value generator 22 or the lightness value of the pixel in question depending upon the state of the control signal outputted from the logic circuit 100. More specifically, the multiplexer 23 selects the output from the lightness destination value generator 22 when the logic circuit 100 determines that the hue value of the pixel in question is within the hue window. The chroma destination value generator 20 converts the chroma value of the pixel in question into a destination chroma value utilizing either a look up table or a predetermined set of formulas to establish the relationship between the chroma value of the pixel in question being inputted and the chroma value to be outputted for the designated color. In other words, the relationship can be stored in a read only memory (ROM) as a look-up table or can be continually generated utilizing a plurality of formulas. The plurality of formulas allow flexibility in editing the chroma value being generated for the destination color. Figures 11, 12, and 13 illustrate various modifications to Figure 10. For example, Figure 11 includes a gradation signal input to the chroma and lightness destination value generators 20 and 22 to enable a greater variety of outputs from these devices. If the gradation signal is off, the chroma and lightness value generators will generate constant values of output corresponding to the chroma and lightness of the destination color. Figure 12 includes a gradation signal input and a gray destination signal input to the chroma and lightness destination value generators 20 and 22 to enable a greater variety of outputs from these devices. If the gray destination signal is on, the chroma and lightness value generators will generate a zero chroma value and a lightness destination value dependent upon the gradation requirement as shown in Figure 6. Lastly, Figure 13 includes a gradation signal input and a gray destination signal input to the chroma and lightness destination value generators 20 and 22 and a chroma minimum value detection to enable a greater variety of outputs from these devices. Although the present invention has been described in detail above, various modifications can be implemented. For example, the present invention has been described in detail with respect to utilization of L*C*h base; however, the color to color conversion process can be utilized using HLS, HSV, HSI, and the Munsell color specification space, as well as any other radiant color spaces to perform the proper color conversion. In the preferred embodiment, a L*C*h base is utilized because this base offers the advantage of more uniformity in the hue window specification for the different colors. Also, the mapping functions, although only described in detail with respect to a few embodiments, may incorporate any type of function wherein the selected source chroma and lightness values and the selected destination chroma and lightness values are made an integral part of the functions; i.e., the functions are dependent upon these values. Moreover, the mapping can more sophisticated by having more than one selected source chroma value, selected source lightness value, selected destination chroma value, and selected destination lightness value. For example, the user may select two source and two destination colors of the same hue, thus, producing two selected source/destination chroma values. In this example, the "rubber band" transformation would consist of three lines with respect to the mapping function. Therefore, the present invention is not limited to the selection of only one source color and one destination color having a same hue. Moreover, the present invention has been described in utilization with respect to digital copiers, the present invention can be utilized in any device which requires the conversion of a color image to another color. Lastly, the mapping of the source chroma and lightness values to the destination chroma and lightness value can be realized utilizing a variety of functions and/or combination of functions to achieve the desired gradation in the final destination product.

Claims: A system for changing inputted color data of a color image corresponding to a source color to a destination color, comprising: first input means for selecting a target source color and an associated destination color; first converting means for converting the inputted target source color to a source hue value (h s ), a source chroma reference value (C * s ), and a source lightness reference value (L * s ) and for converting the inputted destination color to a destination hue value (h d ), a destination chroma reference value (C * d ), and a destination lightness reference value (L * d ); first table means for generating a first set of values representing a source-to-destination chroma relationship for source chroma values in a range from the source chroma reference value (C * s ) to a minimum source chroma value (C * smin ) representing pure grey using a first function; second table means for generating a second set of values representing a source-to-destination chroma relationship four source chroma values in a range from the source chroma reference value (C * s ) to a maximum source chroma value (C * smax ) representing pure hue using a second function; chroma memory means for storing the first and second sets of values; second input means (1) for receiving color data (R'G'B') and for converting the color data to a color hue value (h 1 ), a color chroma value (C 1 ), and a color lightness value (L 1 ); comparing means (3) for determining if the color hue value (h 1 ) corresponds to the source hue value (h s ); chroma data generating means (5) for selecting a destination chroma value (C 2 ) for said color chroma value (C 1 ) based on the source-to-destination chroma relationships stored in said chroma memory means when said comparing means (3) determines that the color hue value (h 1 ) corresponds to the source hue value (h s ); third table means for generating a third set of values representing a source-to-destination lightness relationship for source lightness values in a range from the source lightness reference value (L * s ) to a minimum source lightness value representing pure black using a third function; fourth table means for generating a fourth set of values representing a source-to-destination lightness relationship for source lightness values in a range from the source lightness reference value (L * s ) to a maximum source lightness value representing pure white using a fourth function; lightness memory means for storing the third and fourth sets of values; lightness data generating means (5) for selecting a destination lightness value (L 2 ) for said color lightness value (L 1 ) based on the source-to-destination lightness relationships stored in said lightness memory means when said comparing means (3) determines that the color hue value (h 1 ) corresponds to the source hue value (h s ); and second converting means (7) for converting the destination hue value (h d ) and the selected destination chroma (C 2 ) and lightness (L 2 ) values into output color data (R"G"B") representing the destination color. A method for changing inputted color data of a color image corresponding to a source color to a destination color, comprising the steps of: (a) selecting a target source color and an associated destination color; (b) converting the inputted target source color to a source hue value (h s ), a source chroma reference value (C * s ), and a source lightness reference value (L * s ), and converting the inputted destination color to a destination hue value (h d ), a destination chroma reference value (C * d ), and a destination lightness reference value (L * d ); (c) generating a first set of values representing a source-to-destination chroma relationship for source chroma values in a range from the source chroma reference value (C * s ) to a minimum source chroma value (C * smin ) representing pure grey using a first function; (d) generating a second set of values representing a source-to-destination chroma relationship for source chroma values in a range from the source chroma reference value (C * s ) to a maximum source chroma value (C * smax ) representing pure hue using a second function; (e) storing the first and second sets of values; (f) receiving color data (R'G'B') and converting the color data to a color hue value (h 1 ), a color chroma value (C 1 ), and a color lightness value (L 1 ); (g) determining if the color hue value (h 1 ) corresponds to the source hue value (h s ); (h) selecting a destination chroma value (C 2 ) for said color chroma value (C 1 ) based on the stored source-to-destination chroma relationship when it is determined that the color hue value (h 1 ) corresponds to the source hue value (h s ); (i) generating a third set of values representing a source-to-destination lightness relationship for source lightness values in a range from the source lightness reference value (L * s ) to a minimum source lightness value representing pure black using a third function; (j) generating a fourth set of values representing a source-to-destination lightness relationship for source lightness values in a range from the source lightness reference value (L * s ) to a maximum source lightness value representing pure white using a fourth function; (k) storing the third and fourth sets of values; (l) selecting a destination lightness value (L 2 ) for said color lightness value (L 1 ) based on the stored source-to-destination lightness relationship when it is determined that the color hue value (h 1 ) corresponds to the source hue value (h s ); and (m) converting the destination hue value (h d ) and the selected destination chroma (C 2 ) and lightness (L 2 ) values into output color data (R"G"B") representing the destination color. The system as claimed in claim 1, wherein one or more of the first, second, third and fourth functions are distinct polynomials having at least one degree to produce the source-to-destination relationships. The system as claimed in any of the preceding claims 1 and 3, wherein the first function represents a first straight line from the source chroma reference value (C * s ) to the minimum source chroma value, the second function represents a second straight line from the source chroma reference value to the maximum source chroma value, the third function represents a third straight line from the source lightness reference value (L * s ) to the minimum source lightness value, and the fourth function is a fourth straight line from the source lightness reference value (L * s ) to the maximum source lightness value.

Inventors: SHIAU JENG-NAN, SHIAU, JENG-NAN
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1994
Main classification: H04N1
IPC codes: H04N1, G06T5, G06T1, G06T11