Image processing apparatus and method

Abstract: Image processing apparatus and method converts an image in a predetermined input system to an image corresponding to a colour gamut obtained by a predetermined output system. In the image processing apparatus and method a CPU (21) converts signals in a colour space which does not depend on a device to signals CMY (consisting of cyan (C), magenta (M) and yellow (Y)) corresponding, for example, to a printer (3) by referring to a lookup table, and outputs the signals to the printer (3) via an interface. On the lookup table stored in a ROM (22) there are registered the values of signals CMY corresponding to the values of signals L*a*b*. The values of signals CMY within a gamut in which the value ΔE of a colour-difference formula is minimised are used as the values of the signals CMY corresponding to the signals L*a*b*, which are mapped outside the gamut of the signals CMY.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to image processing apparatuses and methods, and in particular, to an image processing apparatus and method in which, when the colour gamut (hereinafter referred to as the "gamut") of an output system is narrower than the gamut of an input system, colours close to colours obtained by the input system can be outputted by compressing the gamut of colour signals outside the gamut of the output system in the direction along which the value of a colour-difference formula decreases to its minimum. 2. Description of the Related Art Recently, with the price reduction and speeding-up of electronic devices, desktop publishing (DTP) has become widespread, and various electronic devices for processing colour images are used. In many cases, such electronic devices have different gamuts (colour-reproduction ranges) which can be expressed in accordance with the types thereof. Thus, the concept of "device independent colour" for expressing a predetermined image with identical colours by a plurality of electronic devices is on the point of being introduced. The concept of device independent colour is realised as a colour management system (CMS). As shown in Fig. 12, when colour signals from a predetermined input system (video camera 61, scanner 62, monitor 63 or the like) are converted to colour signals for a predetermined output system (monitor 63, printer 64 or the like), the colour signals from the input system are temporarily converted (profiled) to signals in a colour space ( CIE (commission internationale de l'eclairage)/XYZ, CIE/L*a*b*, etc. ) which does not depend on a device, by using a predetermined conversion formula or conversion table (profile), and the converted colour signals are converted to the colour signals for the output system. For example, when the monitor is used as an input system, and the printer is used as an output system, as shown in Fig. 13, red, green and blue signals corresponding to the monitor are initially converted to colour signals CIE/XYZ or CIE/L*a*b* which do not depend on the device, by using a profile corresponding to the monitor. The converted colour signals which do not depend on the device are converted to printer colour signals CMY by using the profile corresponding to the printer. Concerning methods for profiling, a method using a physical model like a conversion matrix, a method using a lookup table (LUT), a method using a neural network, and so forth have been devised. In the above manner, the CMS converts colour signals from a predetermined input system to colour signals for a predetermined output system. When the gamut of the input system is broader than the gamut of the output system, it is impossible for the CMS to convert in identical colours the colour signals from the predetermined input system to the signals for the predetermined output system. For example, the monitor performs colour reproduction with an additive mixture of colours by causing three-primary-colour (red, green and blue) phosphors to produce colours. The printer performs colour reproduction at a predetermined gradation on a recording medium such as paper by a subtractive mixture of colours with four types of ink: cyan, magenta, yellow and black. As shown in Fig. 14, the gamut of the printer 64 is narrower than (different from) the gamut of the monitor 63. Consequently, in the figure the colours in hatched ranges on the monitor 63 cannot be reproduced by the printer 64. Accordingly, in such a case, colour signals from the monitor are converted to signals within the gamut of the printer by performing colour-gamut mapping (hereinafter referred to as "gamut mapping"), with the original image information (gradation, tones, and so forth) maintained as much as possible. The gamut mapping is performed in a colour space which does not depend on a device, and is normally performed, particularly in a CIE/L*C*h colour space (colour space formed by converting an L*a*b* colour space to polar co-ordinates) corresponding to human visual characteristics. In the colour space CIE/L*C*h, L*, C* and h represent lightness, chroma and hue, respectively. Conventionally, when gamut mapping is performed, hue is fixed in a CIE/L*C*h colour space, and lightness and chroma are compressed on a two-dimensional plane comprising lightness and chroma. For example, there are a number of methods: a method (as shown in Fig. 15) decreasing (compressing) only chroma while fixing lightness and chroma; a method (as shown in Fig. 16) determining the lightness and chroma of output colour signals so that the sum of the lightness-difference square and the chromadifference square in input colour signals and output colour signals is minimised while fixing hue. According to the above-described method in which gamut mapping is performed while fixing hue, lightness or chroma is greatly compressed, which causes problems in which compression of lightness decreases contrast and a stereoscopic effect of an image, and a deterioration in chroma decreases brightness to form an image from which an impression (e.g. printing) cannot be made. Therefore, when the above-described colour-gamut mapping is performed with respect to an image which has very high chroma and is stereoscopic, such as a CG (computer graphics) image, characteristics of the image are lost to a considerable extent. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide an image processing apparatus and method in which, when a gamut obtained by an output system differs from a gamut obtained by an input system, colour signals for the output system which arc recognised to have resemblance to colour signals in the input system are generated by performing gamut mapping in the direction along which the value of a colour-difference formula is minimised. According to a first aspect of the present invention, the foregoing object is achieved through provision of an image processing apparatus for converting an image in a predetermined input system to an image corresponding to a gamut obtained by a predetermined output system, wherein the image processing apparatus includes gamut-mapping means in which, when the gamut obtained by the output system differs from a gamut obtained by the input system, gamut mapping is performed with respect to colour signals outside the gamut of the output system in the direction along which the value of the following colour-difference formula is minimised: ΔE = {(ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where ΔL*, ΔC ab * and ΔH ab * represent a lightness difference, a chroma difference and a hue difference, respectively, and K L , K c and K H represent predetermined constants, respectively. Preferably, the constants K L , K c and K H have the following relationships: K c ≥ K H and K c ≥ K L . According to a second aspect of the present invention, the foregoing object is achieved through provision of an image processing method for converting an image in a predetermined input system to an image corresponding to a gamut obtained by a predetermined output system, wherein the image processing method includes a step in which, when the gamut obtained by the output system differs from a gamut obtained by the input system, gamut mapping is performed with respect to colour signals outside the gamut obtained by the output system in the direction along which the value of the following gamut formula is minimised: ΔE = { (ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where ΔL*, ΔC ab * and ΔH ab * represent a lightness difference, a chroma difference and a hue difference, respectively, and K L , K c and K H represent predetermined constants, respectively. According to the present invention, when a gamut obtained by an output system differs from a gamut obtained by an input system, gamut mapping is performed with respect to colour signals outside the gamut obtained by the output system in the direction along which the value of the following gamut formula is minimised: ΔE = { (ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where ΔL*, ΔC ab * and ΔH ab * represent a lightness difference, a chroma difference and a hue difference, respectively, and K L , K c and K H represent predetermined constants, respectively. Thus, colour signals for the output system recognisably correspond to those for the input system. Further features and advantages of the present invention will become clear from the following description of preferred embodiments thereof, given by way of example, illustrated in the accompanying drawings, in which: Fig. 1 is a block diagram showing an image processing apparatus according to an embodiment of the present invention. Fig. 2 is a flowchart illustrating a process performed by the image processing apparatus shown in Fig. 1. Fig. 3 is a flowchart illustrating a process for making a forward-direction table for use in colour conversion. Fig. 4 is a chart showing an example of a data point interpolated on an MY plane. Fig. 5 is a chart showing an example of a forward-direction table. Fig. 6 is a flowchart illustrating a process for making a lookup table. Fig. 7 is a flowchart illustrating a gamut mapping process. Fig. 8 is a chart showing an example of a lookup table. Fig. 9 is a chart showing an example of a data point interpolated on an a*-b* plane. Fig. 10 is a graph showing an example of correspondences between compression coefficients and psychologically physical amounts. Fig. 11 is a flowchart illustrating another process performed by the image processing apparatus shown in Fig. 1. Fig. 12 is a chart illustrating the concept of a colour management system. Fig. 13 is a chart illustrating a process for image processing in a colour management system. Fig. 14 is a chart showing an example of a monitor's colour-reproduction range and an ink-jet printer's colour-reproduction range on an a*-b* plane. Fig. 15 is a chart showing an example of the compression direction in a conventional gamut mapping method. Fig. 16 is a chart showing another example of the compression direction in the conventional gamut mapping method. DESCRIPTION OF THE PREFERRED EMBODIMENTS Fig. 1 shows an image processing apparatus according to an embodiment of the present invention. This image processing apparatus 1 stores predetermined image data as colour signals in a colour space which does not depend on a device, and converts the colour signals in the colour space which does not depend on the device to colour signals corresponding to an output device such as a monitor 2, a printer 3 or the like. In the image processing apparatus 1, a CPU (gamut-mapping means) 21 performs various types of processing in accordance with programs previously stored in a ROM 22. For example, colour-signal conversion between the colour space which does not depend on the device and the colour space of a predetermined device is performed. The ROM 22 holds programs in which the operation of the CPU 21 is described, a lookup table for use in colour-signal conversion, and so forth. The RAM 23 temporarily holds predetermined data and programs in accordance with processing by the CPU 21. An interface 24 is designed to output to a printer 3, signals supplied from the CPU 21. An interface 25 is designed to output to a monitor 2, signals supplied from the CPU 21. An interface 26 is designed to output to the CPU 21, signals supplied from another unit (not shown), and to output to the other unit, signals supplied from the CPU 21. Next, a process performed by the image processing apparatus 1 shown in Fig. 1 will be described with reference to a flowchart shown in Fig. 2. At first, in step S1, the CPU 21 in the image processing apparatus 1 receives red, green and blue signals from, for example, another unit via the interface 26. In the subsequent step S2, the CPU 21 converts the red, green and blue signals to signals (signals L*a*b*) in a colour space (CIE/L*a*b*) which does not depend on a device, and stores them in the RAM 23 in step S3. In step S4, the CPU 21 reads the signals L*a*b* stored in the RAM 23, and converts the read signals to signals CMY (signals consisting of cyan (C), magenta (M) and yellow (Y)) corresponding to the printer 3 while referring to a lookup table (profile) described below. In step S5, the CPU 21 outputs the converted signals CMY to the printer 3 via the interface 24. In the above manner, the CPU 21 converts signals in a colour space which does not depend on a device to signals corresponding to the device, and outputs the converted signals to the device. Next, the lookup table stored in the ROM 22 will be described. For making the lookup table used when signals L*a*b* are converted to signals CMY, a forward-direction table is initially made by calculating signals L*a*b* with respect to signals CMY in the colour space of signals CMY. Subsequently, an inverse mapping table (showing the values of signals CMY corresponding to the values of signals L*a*b* in the gamut of signals CMY) with respect to the forward-direction table is made. Finally, the lookup table used when signals L*a*b* are converted to signals CMY is made by utilising gamut mapping to determine signals CMY corresponding to signals L*a*b* which are not defined by the inverse mapping table, namely, the values of signals CMY corresponding to signals L*a*b*, which are inversely mapped outside the gamut of signals CMY. At first, the making of the forward-direction table will be described with reference to a flowchart in Fig. 3. In step S21, by changing the level of each component of signals CMY within the limits of 1 and N, N × N × N colour patches are made. The colour values (namely, the values of signals L*a*b*) of each colour patch are measured using a spectrophotometer or the like. In the subsequent step S22, conccming each colour patch, the correspondence between the value of each component of signals CMY and the values of signals L*a*b* is registered in the forward-direction table. In step S23, the process determines whether or not the number of data points (namely, the number of the correspondences between signals CMY and signals L*a*b*) is sufficient. If the process has determined that the number is sufficient, it ends the making of the forward-direction table. If it has determined that the number of data points is not sufficient, the number of data points is increased by interpolating the correspondence at a predetermined point from surrounding data points so as to form a new data point (as shown in Fig. 4) in step S24, and a forward-direction table as shown in Fig. 5 is made. In the forward-direction table shown in Fig. 5 there are registered the component values of signals L*a*b*, corresponding to signals CMY in which the value of each component is any of 1 to 255. Making of the lookup table used when signals L*a*b* are converted to signals CMY will be described with reference to flowcharts in Figs. 6 and 7. In step S41, an inverse mapping table is made from the above-described forward-direction table. In other words, a table which includes the values of signals CMY corresponding to the values of signals L*a*b* in the gamut of signals CMY is made. In the subsequent step S42, the lookup table is formed by adding to the inverse mapping table the values of signals CMY corresponding to signals L*a*b*, which values are mapped outside the gamut of signals CMY. In other words, gamut mapping is performed with respect to the values of signals CMY within the gamut thereof so that the values correspond to signals L*a*b* which are mapped outside the gamut of signals CMY. The flowchart in Fig. 7 shows the details of the gamut mapping process. At first, in step S61, a number assigned for any data point among the data points which are mapped outside the gamut of signals CMY is substituted for variable i. Subsequently, in step S62, 1 is substituted for the value of a counting variable j which is used for counting list numbers in the forward-direction table which is referred to, a predetermined large value as an initial value is substituted for variable Min which maintains the minimum value of a colour-difference formula mentioned below, and 1 as an initial value is substituted for variable MinJ which memorises the list number obtained when the value of the colour-difference formula is minimised. In step S63, the value E of a colour-difference formula expressed as the following numerical expression is calculated with reference to the j-th list of the forward-direction table. ΔE = {(ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where K L , K c and K H are predetermined constants (compression coefficients), and ΔL*, ΔC ab * and ΔH ab * represent the lightness difference, the chroma difference and the hue difference between signals L*a*b* at data point i and the signals L*a*b* registered on the j-th list of the forward-direction table, respectively. The lightness difference ΔL*, the chroma difference ΔC ab * and the hue difference ΔH ab * are calculated based on the following formulae, in which the values of signals L*a*b* at data point i are (L*out, a*out, b*out), and the values of signals L*a*b* registered on the j-th list of the forward-direction table are (L*in, a*in, b*in). ΔL* = L*out - L*in ΔC ab * = C*out - C*in ΔH ab * = s × {2 × (C*out×C*in - a*out×a*in - b*out×b*in)} 1/2 C*out = {(a*out) 2 + (b*out) 2 } 1/2 C*in = {(a*in) 2 + (b*in) 2 } 1/2 (When a*out×b*in ≥ a*in×b*out) s = +1 (When a*out×b*in ≥ a*in×b*out) s = -1 The smaller the value of the above colour-difference formula, the smaller the perceptible difference between two colours. Subsequently, in step S64, the process determines whether or not the value E of the colour-difference formula, calculated in step S63, is smaller than the value of variable Min. If the process has determined that the value ΔE is smaller, the value ΔE is substituted for variable Min, and the value of counter j at this time in step S65 is substituted for variable MinJ. If the process has determined that the value ΔE of the colour-difference formula is equal to or greater than the value of variable Min, step S65 is skipped. In step S66, the process determines whether or not the value ΔE of the colour-difference formula has been checked as to the last list (the n-th list) of the forward-direction table, with reference to the value of counter j. If the process has determined that the check did not reach the last list, the value of counter j is incremented by 1 in step S67. Subsequently, the process returns to step S63 in which the ΔE of the colour-difference formula is checked as to the subsequent list. In the above manner the ΔE of the colour-difference formula is checked as to all the lists of the forward-direction table. If, in step S66, the process has determined that the check reached the last list, it proceeds to step S68. In step S68, the values of signals CMY in the forward-direction-table list whose number is represented by the value of variable MinJ are registered as the values of signals CMY at data point i outside the gamut. In the subsequent step S69, the process determines whether or not the values of signals CMY have been registered as to all data points outside the gamut. If the process has determined that the values of signals CMY were registered as to all the data points, the making of the lookup table is completed, which terminates the process. If there is a data point at which the value of signals CMY have not been determined, the data point's number is set in variable i in step S70. Subsequently, the flow loops back to step S62 and the values of signals CMY at the data point are determined. In the above manner, gamut mapping is performed with respect to a data point at which the value of the above colour-difference formula is minimised. In addition, as described above, as shown in Fig. 8, in the lookup table are registered the values of signals CMY corresponding to signals L*a*b* in which, for example, the ranges of (L*, a*, b*) are 0 to 100, -128 to 128, and -128 to 128, respectively. If the lookup table has a small number of data points, the number of data points may be increased by interpolation from surrounding data points. The compression coefficients K L , K C and K H in the above-described colour-difference formula will be described below. The compression coefficients K L , K C and K H in the above-described colour-difference formula are used such that the lightness difference ΔL*, the chroma difference Δ*C ab and the hue difference ΔH* ab are multiplied by reciprocals 1/K L , 1/K C and 1/K H , respectively. Consequently, by increasing the values, the compression rate of the attribute (any of lightness, chroma and hue) corresponding to the compression coefficient can be increased. In other words, increasing any one of the compression coefficients is close to one-dimensional compression, and increasing any two of the three is close to two-dimensional compression. For example, increasing the value of K L causes the compression direction to be close to the lightness direction. Increasing the value of K C causes the compression direction to be close to the chroma direction. And, increasing the value of K L and the value of K C mainly causes compression of lightness and chroma without greatly compressing hue. In addition, giving 1 to all the values of the compression coefficients K L , K C and K H causes the above colour-difference formula to become a generally known colour difference ΔE*ab as shown by the following formula: ΔE*ab = { (ΔL*) 2 + (ΔC ab *) 2 + (ΔH ab *) 2 } 1/2 Evaluation based on a visual experiment was performed on various different values of compression coefficients K L , K C and K H . The evaluation will be described below. The visual experiment was performed such that a CG image obtained by successively changing the compression coefficients (K L , K C , K H ) to (1, 1, 1), (2, 1, 1), (2, 2, 1), (1, 2, 1), (1, 2, 2), (1, 1, 2) and (2, 1, 2) was displayed on a monitor and was outputted by an ink-jet printer, and the image printed by the ink-jet printer was placed in a dark room so as not to be affected by outside light, and was compared by a predetermined number of persons to be tested. In the visual experiment the monitor (GDM-2000TC produced by Sony Corporation) was disposed with respect to the person to be tested, and by centering the person to be tested, a light box was disposed at an angle of 90 degrees from the monitor. The white point of the monitor and the light source of the light box was set to D65. The brightness of the monitor was set to the reflection brightness of paper. In such a manner, by causing the absolute values of three stimulus values X, Y and Z to coincide under an identical light, conditions for causing colour perception with respect to the monitor and the paper to coincide were determined. The experiment was performed by a method of paired comparison in which, after an image displayed on the monitor was observed, two pictures disposed in the light box (which were outputted corresponding to different compression-coefficient values) were observed, and from the two pictures one looking like the image displayed on the monitor was selected. Fig. 10 shows correspondences between compression coefficients and psychologically perceived amounts, obtained when visual experiments were performed concerning three CG images for 24 persons to be tested (22 men and 2 women). On 46%, 33% and 75% of the whole CG images, colours outside the gamut of the printer were included. As the psychologically perceived amount increases, the person to be tested feels that the image displayed on the monitor looks like the picture outputted by the printer corresponding to its compression coefficients. In the correspondences shown in Fig. 10, when the values of compression coefficients K L , K c and K H are expressed as (K L , K c , K H ) = (1, 2, 1) or (1, 2, 2), the psychologically perceived amount is large. Thus, it is understood that the compression coefficients K L , K c and K H preferably maintain the relationships: K c ≥ K H and K c ≥ K L . In the above manner, by using the above-described colour-difference formula to perform optimal gamut mapping corresponding to a predetermined output device, colour signals can be outputted. In step S4 shown in Fig. 2, the image processing apparatus shown in Fig. 1 performs conversion (profile) by referring to the lookup table corresponding to the gamut mapping. However, as shown in Fig. 11, it is possible to perform gamut mapping in step S101 within a space which does not depend on a device with respect to the colour signals (obtained in step S3) which do not depend on the device, and in step S102, the colour signals with colour-gamut compressed are maintained. In addition, in the above-described embodiment the optimal gamut mapping is performed for the printer 3 of Fig. 1, however, gamut mapping may be similarly performed for other devices.

Claims: An image processing apparatus for converting an image in a predetermined input system to an image corresponding to a colour gamut obtained by a predetermined output system, wherein said image processing apparatus includes colour-gamut mapping means (21) in which, when the gamut obtained by said output system differs from a colour gamut obtained by said input system, colour-gamut mapping is performed with respect to colour signals outside the gamut obtained by said output system in the direction along which the value of the following colour-difference formula is minimised: ΔE = { (ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where ΔL*, ΔC ab * and ΔH ab * represent a lightness difference, a chroma difference and a hue difference, respectively, and K L , K c and K H represent predetermined constants, respectively. An image processing apparatus according to claim 1, wherein said constants K L , K c and K H have the following relationships: K c ≥ K H and K c ≥ K L . An image processing method for converting an image in a predetermined input system to an image corresponding to a colour gamut obtained by a predetermined output system, wherein said image processing method includes a step in which, when the gamut obtained by said predetermined output system differs from a colour gamut obtained by said input system, gamut mapping is performed with respect to colour signals outside the gamut obtained by said output system in the direction along which the value of the following colour-difference formula is minimised: ΔE = { (ΔL*/K L ) 2 + (ΔC ab */K c ) 2 + (ΔH ab */K H ) 2 } 1/2 where ΔL*, ΔC ab * and ΔH ab * represent a lightness difference, a chroma difference and a hue difference, respectively, and K L , K c and K H represent predetermined constants, respectively. An image processing method according to claim 3, wherein said constants K L , K c and K H have the following relationships: K c ≥ K H and K c ≥ K L .

Inventors: ITO MASAHIKO, KATO NAOYA, ITO, MASAHIKO, KATO, NAOYA
Applicants: SONY CORP, SONY CORPORATION
Application year: 1997
Main classification: H04N1
IPC codes: G06T1, H04N1, H04N9