The invention relates to the input and output processing technology of chromatic images, and in particular to the technology for achieving color consistency between input and output chromatic images.
Along with the development of the computer science and the color input and output technology, the chromatic image, as an information carrier, has been more and more widely applied in multiple fields such as printing, screenage, advertising, film and television, electronic commerce, and digital entertainment, and the people also have higher and higher demands for the color reproduction quality. But due to the impacts of the factors such as the imaging mechanism, the color space, the element performance, the consumptive material characteristic, and the machining accuracy, the difference between the chromatic characteristics of the input and output devices is very significant, which makes it possible that a color deviation occurs when a cross-medium or cross-platform display of the chromatic image is performed.
For example, cameras of different brands produced by different manufacturers are used to shoot the same scene at the same time and at the same place. Due to the element performances and the consumptive material characteristics of the camera devices themselves, a color deviation occurs when the images of the pictures taken by the two cameras are displayed on the computer. That is to say, if the picture of the same scene is taken by different cameras, different color effects may be displayed on the computer.
Another example is that if the same picture stored in the computer is printed using printers of different brands produced by different manufacturers, different printing effects may occur, and two printed images with a color deviation are presented.
In order to remove the color deviation phenomenon caused by the device to achieve the object “what you see is what you get”, ICC (International Color Consortium) introduces a color space model (CIELab color space model) independent of the device to uniformly describe the chromatic characteristics of the device, performs a nonlinear correction by means of a gamut mapping and a relationship between the input and the output of the device, establishes a color mapping relationship with the relevant color space (RGB, CMY, etc.) of the device, and achieves an accurate conversion of color information from the input device to the color space independent of the device and then to the color space of the output device.
But the CIELab color space model adopted in the prior art is a color space model based on an opponent color space model, and the basis of dependency thereof is that red and green serve as the a axis of CIELab, yellow and blue serve as the b axis of CIELab, black and white serve as the L axis of CIELab, and the three axes a, b, L are perpendicular to one another. This basis of construction of the model just decides that CIELab has an nonuniformity, i.e., the perpendicular setting of the red and green axes to the yellow and blue axes makes the red-yellow hue difference, the yellow-green hue difference and the green-blue hue difference be forcibly set to 90 degrees. As we all know, according to the Munsell color space model recognized as the most uniform one, the hue difference among red (5R), green (10G) and blue (10B) is substantially 120°, and yellow (10YR) is between red (5R) and green (10G) and the difference among the three colors is 60°, so the construction of the CIELab color space model has a comparatively large nonuniformity, so that the color of the converted chromatic image based on the CIELab color space model also has a comparatively large nonuniformity.
The CIELAB color space and the color space and color appearance space JCh based on CIELAB all have the following defects:
1. The color adaptation and transformation are inaccurate;
2. The hue is nonuniform, in particular in the blue area, the Iso-hue plane is a complicated curved surface, and the curved surface equations at different hues are different; and the hue of HGlCl takes on a distribution similar to the Munsell hue ring, which is a recognized uniform hue distribution, and the Iso-hue plane is an absolute plane;
3. The luminance and chrominance are not independent.
The HSaIn color space and the color appearance space based on HSaIn have the following advantages of overcoming the defects of the CIEALB color space:
1. The Iso-hue plane is a plane passing through the HSaIn gray axis, and the hue angle is unique in the system of polar coordinates, so that it becomes possible that the color gamut transformation undergoes a one-dimensional change within the Iso-hue plane, and the color gamut mapping takes on a simple and accurate one-dimensional change;
2. The luminance In, the chromatic vector , and the gray Gl are all orthogonal to the hue, so that the one-dimensional color gamut mapping is simple and feasible.
In addition, when converting the chromatic image of the input device into a chromatic image based on a CIELab color space model, the calculating method is complicated, which renders the low conversion efficiency. The conversion of the chromatic image based on the CIEXYZ color space model of the input device into a chromatic image based on the CIELab color space model can be specifically performed according to the following formulae:
In the above formulae, X0, Y0 and Z0 are respectively the color deviation data of the input device, and X, Y and Z are the color data of the chromatic image based on the CIEXYZ color space model of the input device; L, a and b are the data of the pixels of the converted chromatic image based on the CIELab color space model.
It can be seen from the above formulae that there are several calculations of extracting a cube root, and on the contrary, there will be several calculations of obtaining a third power in the calculating process of the chromatic image based on the CIEXYZ color space model; further, it will be more complicated if the calculation for conversion is directly performed at the CIELab color space model and at the RGB color space model in the physical space by stepping over the CIEXYZ color space model. Thus, the method of the prior art is comparatively complicated in the calculating and is low in the conversion efficiency.
Further, the conversion formulae of CIELab and XYZ in the above formulae are results concluded by means of a test fitting, and thus will bring calculation errors in the image input, processing and output with high accuracies, which renders the low accuracy of the chromatic color data obtained by calculation comparatively.
To sum up, the method of adopting the CIELab color space model to remove such color deviation phenomenon caused by the device in the prior art will make the color of the converted chromatic image based on the CIELab color space model also have a comparatively large nonuniformity; further, the calculating method is comparatively complicated, which renders the low conversion efficiency, the low conversion speed, and the low accuracy of the result obtained by calculation.
The embodiments of the invention provide a management method of color data of a chromatic image, which has a better uniformity and is simple in calculation.
According to one aspect of the invention, a method of managing color data based on color data in an HSaIn format in an HSaIn color space is provided, the method comprising: acquiring color data in an XYZ format at an input device side; converting the acquired color data in the XYZ format at the input device side into color data in an HSaIn format.
According to another aspect of the invention, a method of managing color data based on color data in an HSaIn format in an HSaIn color space is provided, the method comprising: acquiring color data in an HSaIn format; converting the color data in the HSaIn format into color data in an XYZ format at an output device side.
In the above two methods provided by the invention, the HSaIn color space is a color space based on a CIEXYZ Cartesian color space, of a color appearance attribute, and described by a cylindrical coordinate system, and is composed of a chromatic plane and a gray axis passing through the origin of the chromatic plane and perpendicular to the chromatic plane;
wherein the chromatic plane is a plane of the CIEXYZ Cartesian color space X+Y+Z=K, where K is a real constant; an XYZ axis of the CIEXYZ Cartesian color space performs a projection along a direction of a straight line X=Y=Z on a plane X+Y+Z=K to obtain three projection axes that are 120° with respect to one another within the chromatic plane, and unit vectors in the directions of the projection axes are ,
and
;
wherein the gray axis is a number axis composed of the straight line X=Y=Z of the CIEXYZ Cartesian color space, a numerical value on the number axis represents a gray Gl value in the HSaIn color space, a length of a chromatic vector parallel to the chromatic plane represents a chromatic Cl value in the HSaIn color space, and a polar angle of the chromatic vector represents a hue angle H in the HSaIn color space;
wherein the color data in the HSaIn format is in a format of the color data in the HSaIn color space, and comprises a hue H, a saturation Sa, and an intensity In in the HSaIn color space.
According to another aspect of the invention, a method of managing color data based on color data in an HSaIn format in an HSaIn color appearance color space is further provided, the method comprising: acquiring color data in an XYZ format in a CIEXYZ color space at an input device side; converting the acquired color data in the XYZ format into color data in an XYZ format in a CIEXYZ color appearance color space; converting the color data in the XYZ format in the CIEXYZ color appearance color space into color data in an HSaIn format in an HSaIn color appearance color space at the input device side.
According to a further aspect of the invention, a method of managing color data based on color data in an HSaIn format in an HSaIn color appearance color space is provided, the method comprising: acquiring color data in an HSaIn format in an HSaIn color appearance color space at an output device side; converting the color data in the HSaIn format in the HSaIn color appearance color space into color data in an XYZ format in a CIEXYZ color appearance color space at the output device side; converting the color data in the XYZ format in the CIEXYZ color appearance color space into color image data in an XYZ format at the output device side.
In the above two methods provided by the invention, the HSaIn color appearance color space is a color space based on a CIEXYZ Cartesian color appearance color space, of a color appearance attribute, and described by a cylindrical coordinate system, and is composed of a chromatic plane and a gray axis passing through the origin of the chromatic plane and perpendicular to the chromatic plane;
wherein the chromatic plane is a plane of the CIEXYZ Cartesian color appearance color space X+Y+Z=K, where K is a real constant; an XYZ axis of the CIEXYZ Cartesian color appearance color space performs a projection along a direction of a straight line X=Y=Z on a plane X+Y+Z=K to obtain three projection axes that are 120° with respect to one another within the chromatic plane, and unit vectors in the directions of the projection axes are ,
and
;
wherein the gray axis is a number axis composed of the straight line X=Y=Z of the CIEXYZ Cartesian color appearance color space, a numerical value on the number axis represents a gray Gl value in the HSaIn color appearance color space, a length of a chromatic vector parallel to the chromatic plane represents a chromatic Cl value in the HSaIn color appearance color space, and a polar angle of the chromatic vector represents a hue angle H in the HSaIn color appearance color space;
wherein the color data in the HSaIn format is in a format of the color data in the HSaIn color appearance color space, and comprises a hue H, a saturation Sa, and an intensity In in the HSaIn color space.
According to another aspect of the invention, a method of managing color data between a color space of a device and a CIEXYZ Cartesian color space is provided, the method comprising:
acquiring color data of a chromatic image of a chromatic scene from an input device; converting the acquired color data into color data in an XYZ format at an input device side according to color characteristic data of the input device.
According to a further aspect of the invention, a method of managing color data between a CIEXYZ Cartesian color space and a color space of a device is provided, the method comprising: acquiring color data in an XYZ format; converting the acquired color data in the XYZ format into color data in an image format in a color space of an output device according to color characteristic data of the output device.
According to a further aspect of the invention, a method of performing a mapping based on color data in an HSaIn format between a color gamut of an input device and a color gamut of an output device is further provided, the method comprising:
acquiring the color data in the HSaIn format at the input device side;
mapping the color data in the HSaIn format at the input device side according to a mapping relationship between the color gamut of the input device and the color gamut of the output device to obtain the color data in the HSaIn format at the output device side, which comprises:
determining an intensity mapping relationship InLUT and a saturation mapping relationship SaLUT under an Iso-hue plane according to the gamuts of the input device and the output device, a color distribution range of an image and a color representation intention;
performing a color data mapping of the image from the input device side to the output device side according to the intensity mapping relationship InLUT and the saturation mapping relationship SaLUT to obtain the color data in the HSaIn format at the output device side.
Since the embodiments of the invention convert the chromatic image acquired from the input device into one in an XYZ format and then into one in an HSaIn format, in the case that the accuracies of the color characteristic data of the input and output devices are ensured, such conversion is a completely analyzing method, and removes the impacts of the input device on the chromatic image with a high accuracy in the conversion. Thus, the acquired chromatic image will not be influenced by the color attribute of the input device itself; further, the analytical matrix operation adopted in the calculating process for the conversion in the HSaIn format is easily achieved, which greatly simplifies the calculating process for the conversion, improves the conversion accuracy and efficiency, and accelerates the conversion speed.
Since the embodiments of the invention achieve the conversion from the chromatic color data independent of the device into chromatic color data dependent on a specific output device in the process of converting an HSaIn format into an XYZ format and then into an output format that can be identified and processed by the output device, the output chromatic image will be not influenced by the color characteristics of the output device itself; further, the analytical matrix operation adopted in the calculating process for the conversion of the color data from the HSaIn format into one in an output format is easily achieved, which greatly simplifies the calculating process for the conversion, improves the conversion accuracy and efficiency, and accelerates the conversion speed. Further, the conversion formulae for the conversion into color data in an HSaIn format provided in the embodiments of the invention are theoretical formulae and will not have accumulative errors in the multiple calculations, so the color data obtained by these calculations with the conversion formulae will provide higher accuracies of the color data than the conversion formulae in the prior art.
Especially, with respect to a color space of a new device that may appear in the future, the conversion between the color space of this new device and the HSaIn color space, and the conversion between the color space of this new device and the CIEXYZ color space can both undergo the processing of the data image according to the principle in the invention, and only the conversion angles of the color characteristics are different.
,
and
of an embodiment of the invention;
In order to make objects, technical solutions and advantages of the invention clearer, the invention is further described in detail below by referring to the figures and listing preferred embodiments. But it should be noted that many details are only listed in the Description for making the readers thoroughly understand one or more aspects of the invention, and these aspects of the invention can be also achieved even without these specific details.
The invention puts forward an HSaIn color space model of color data in an HSaIn format. The HSaIn color space is a color space based on a CIEXYZ Cartesian color space, of a color appearance attribute, and described by a cylindrical coordinate system, and is composed of a chromatic plane and a gray axis passing through the origin of the chromatic plane and perpendicular to the chromatic plane;
wherein the chromatic plane is a plane of the CIEXYZ Cartesian color space X+Y+Z=K, where K is a real constant; an XYZ axis of the CIEXYZ Cartesian color space performs a projection along a direction of a straight line X=Y=Z on a plane X+Y+Z=K to obtain three projection axes that are 120° with respect to one another within the chromatic plane, and unit vectors in the directions of the projection axes are ,
and
;
wherein the gray axis is a number axis composed of the straight line X=Y=Z of the CIEXYZ Cartesian color space, a numerical value on the number axis represents a gray Gl value in the HSaIn color space, a length of a chromatic vector parallel to the chromatic plane represents a chromatic Cl value in the HSaIn color space, and a polar angle of the chromatic vector represents a hue angle H in the HSaIn color space;
the HSaIn color space is an equivalent form of the HGlCl color space, and
As shown in ,
,
within the chromatic plane are unit vectors of three vector axes that are 120° with respect to one another obtained by three coordinate axes XYZ perpendicular to one another in the CIEXYZ space performing a projection along a direction of a straight line X=Y=Z on a plane X+Y+Z=K. After a normalized corresponding processing of the unit coordinates and the unit vectors
,
,
in the CIEXYZ color space one color C (X, Y, Z) in the CIEXYZ color space just corresponds to the data C(
,
,
) within the chromatic plane, wherein X, Y and Z are respectively the modules of
,
and
and the polar angles of
,
and
are respectively 0°, 120° and 240°.
The data format in the CIEXYZ color space is an XYZ data format, and is described by the tristimulus values X, Y, Z, which respectively represent numerical values on the X, Y and Z coordinate axes in the CIEXYZ color space.
The hue H in the HSaIn color space can be acquired by the following formula:
The saturation Sa and the intensity In in the HSaIn color space can be acquired by the following formulae:
Km and KM are positive real numbers, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, p and m are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 wherein X, Y and Z are color data in the XYZ format, i.e., the color data in the CIEXYZ Cartesian color space, and respectively represent numerical values on the X, Y and Z coordinate axes in the CIEXYZ Cartesian color space. In the process of converting the data in the CIEXYZ format into data in an HSaIn format, parameters, e.g., KM, Km, p, q, r, m, A, B, etc., in each acquiring manner can be selected within their defined ranges and are feasible in the implementation, but the preferred selection is that KM=Km=1, p=q=r=m−1, and A=B=0.
The color characteristic data of the device will be involved in the following embodiments, and are the hue deviations brought by the process accuracy problems of the color materials of the respective channels of the device and the like, and after the hue characteristics and the intensity data of these channels are characterized, these color data are represented as chromatic vectors within the chromatic plane, and the hue deviation angles between these chromatic vectors and the adjacent vectors ,
,
are represented as α, β and γ, i.e., the color characteristic data.
As shown in
In this embodiment, the acquiring color data in an XYZ format at in input device side can comprise: acquiring color data of a chromatic image of a chromatic scene from the input device; converting the acquired color data into color data in an XYZ format at the input device side according to color characteristic data of the input device (the step 2201). Another manner of acquiring color data in an XYZ format at an input side is to directly select color data in an XYZ format in a CIEXYZ color space at the input device side.
The input device can be a camera, a pickup camera, a video camera and the like, or the input device can be also a scanner and the like. A chromatic image stored in a digital format is acquired from the input device. Generally, the color data of the acquired chromatic image is stored in a manner of a pixel dot matrix. In the invention, color data in a UVW format of the device includes but is not limited to color data in an RGB format of the device and color data in a CMYe format of the device. With respect to the input device, the color data thereof is generally in an RGB format, and with respect to the output device such as a printer, the format of the color data of the chromatic image is generally CMYe.
The color data acquired from the input device can be in a three-channel format UVW or in a multichannel format.
If the color data is in the UVW format, in the step 2201, the color data in the UVW format acquired from the input device is converted into color data based on a CIEXYZ color space at the input device side.
Specifically, the color data of the chromatic image in the UVW format acquired from the input device is converted into color data of a chromatic image in an XYZ format according to color characteristic data of the input device. That is, the impacts of the input device on the chromatic image are removed in the conversion process according to color characteristic data of the input device.
The color data in the UVW format acquired from the input device is converted into color data in an XYZ format at the input device side according to color characteristic data α1, β1, γ1 of the input device and based on the following formulae 3-10, wherein the UVW format is a format represented by intensity numerical values after characterization of light intensity values perceived by a color sensor of the device at three different spectral sections:
in the formula 10, α1<0, β1<0, γ1<0;
wherein the values of U1, V1 and W1 in the above formulae 3-10 are the characterized color data in the UVW format of the input device; α1 is a hue deviation angle between , and
; β1 is a hue deviation angle between
; and
; γ1 is a hue deviation angle between
, and
;
,
and
are characterized UVW channel color data of the input device to represent chromatic vectors within the chromatic plane. The color characteristic data of the input device is obtained from the input device beforehand, e.g., the color deviation characteristic of the input device is acquired when installing the drive program of the input device, and the color characteristic data of the input device can be specifically stored in a profile header file. Wherein the schematic diagram of the deviation angles between the color characteristic data of the input device and
,
,
is as shown in
It can be seen from the above formulae 3-10 that the matrix that convers the chromatic image from the UVW format into the XYZ format further includes the deviation angles obtained according to the color characteristic data of the input device, so that the impacts of the input device on the chromatic image are removed by means of the deviation angles in the process of converting the color data in the UVW format into the color data in the XYZ format.
If the color data is in the multichannel format, in the step 2201, the color data in the multichannel format acquired from the input device is converted into color data based on a CIEXYZ color space at the input device side.
Specifically, color data of respective channels are obtained to represent chromatic vectors within the chromatic plane according to color characteristic data of the input device, i.e., characterized hue deviation angles of the respective channels, in combination with values of the color data of the respective channels; wherein the characterized hue deviation angles are respectively hue deviation angles of characterized hue angles of the respective channels of the device relative to adjacent polar angles ,
,
within the chromatic plane;
the chromatic vectors of the respective channels of the device within the chromatic plane are decomposed into ones in the directions ,
,
according to a vector decomposition rule and a linear addition is performed in the directions
,
,
respectively to thereby obtain data to serve as the color data in the XYZ format.
After the chromatic image which is not influenced by the color attribute of the input device itself is acquired, the chromatic image which is not influenced by the color attribute of the output device itself can be output through the output device for an output display or an output printing, projection and the like. The output device can specifically include a display, a printer, a printing machine, a projector and the like. The so-called chromatic image in an output format refers to a chromatic image in a storage format that can be identified and processed by the output device. For example, if the output device is a display, the output format of the chromatic image thereof is generally an RGB format; if the output device is a printer, the output format of the chromatic image thereof is generally a CMYe format. The specific method of converting the color data of the chromatic image in the HSaIn format into color data of a chromatic image in an output format, and removing impacts of the color attribute of the output device itself on the output chromatic image in the conversion process will be introduced in detail below.
Next, in the step 222, the color data in the HSaIn format in the HSaIn color space at the input device side is mapped according to a mapping relationship between a color gamut of the input device and a color gamut of the output device to obtain the color data in the HSaIn format in the HSaIn color space at the output device side. Specifically,
Within the chromatic plane, a pure chromatic vector of each channel of each device is represented according to the intensity numerical value of the channel and the characterized hue value of the spectrum of the channel, all possible intensity numerical values of all the channels are traversed, and the set of all the chromatic vectors obtained by these traversed intensity data undergoing a pure chromatic vector addition within the chromatic plane according to a vector addition rule is just the color gamut represented by this device within the chromatic plane. The white field position in the color gamut is a position where the chromatic vector obtained after the addition of the pure chromatic vectors corresponding to the XYZ values of the white field self-defined by the respective devices within the chromatic plane is located. If the XYZ values of the white field are equal, the white field position is on the origin of the polar coordinate. The color distribution range of the image is a set of the positions of the superimposed chromatic vectors obtained by the XYZ value data of all the pixels of this image by means of the vector addition rule within the chromatic plane, and the distribution formed by this set is just the color distribution range of this image within the chromatic plane. The color representation intention is preset one of the color management strategies of the color gamut mapping, and is generally divided into a perceptual color representation intention, a saturated color representation intention, a relative chrominance color representation intention and an absolute color representation intention according to the textbook, and more color representation intentions can be further defined according to specific requirements for the color management, and no unnecessary details are given herein.
Similarly, there is a further intensity mapping performed on the premise of a preset Sa curve of another rule according to the color representation intention to obtain the color data H, Sa, In at the output device side, and no unnecessary details are given herein.
Similarly, there is a further method of further performing a saturation Sa mapping after presetting the intensity In mapping according to the color representation intention on the premise of the iso-hue H to obtain the color data H, Sa, In at the output device side, and no unnecessary details are given herein.
In the stem 224, the color data in the HSaIn format at the output device side is converted into color data in an XYZ format. Specifically, if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, p and in are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0
the color data in the XYZ format at the output device side is acquired according to the following formulae:
the values of X and Y represented by In, Sa, H, p, q and r are obtained according to the specitic values of p, q and r, X>Y≧0,Y≦Z≧0, Z is a value satisfying the actual physical condition
the values of X and Y represented by In, Sa, H, p, q and r are obtained according to the specific values of p, q and r, X>Y≧0,Y≦Z≧0, Z is a value satis1ing the actual physical condition
the values of X and Y represented by In, Sa, H, p, q and r are obtained according to the specific values of p, q and r, X>Y≧0,Y≦Z≧0, Z is a value satis1ing the actual physical condition
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 the color data in the XYZ format at the output device side is acquired according to the following formulae:
The parameters, e.g., KM, Km, p, q, r, m, A, B, etc., in the respective converting manners from the data in the HGlCl format to the data in the CIEXYZ format should be selected by referring to the converting manners from the data in the CIEXYZ format to the data in the HGlCl format within the defined range of each parameter, and the parameters are preferably selected as follows: KM=Km=1, p=q=r=m−1, and A=B=0.
In the embodiment, the step 2241 can be further included after converting the color data in the HSaIn format at the output device side into color data in an XYZ format. In the step 2241, the color data in the XYZ format at the output device side is converted into color data of the output device.
If the color data at the output device side is in a UVW format, the color data in the XYZ format at the output device side is converted into color data in a UVW format according to the following formulae 21-28:
wherein in the formulae 21-28, α2 is a hue deviation angle between and
; β2 is a hue deviation angle between
and
; γ2 is a hue deviation angle between
and
, the values of U2, V2 and W2 are the color data in the UVW format of the output device obtained after the conversion; the values of X, Y and Z in the formulae 21-28 are the color data in the XYZ format;
,
and
are UVW channel color data of the output device to represent chromatic vectors within the chromatic plane.
If the color data of the output device is in a multichannel format, the color data C1, C2 . . . . , Cn in the multichannel format is obtained according to characterized hue data α1, α2, . . . , αn of the respective channels C1, C2, . . . , Cn in the color space of the multichannel device and a conversion relationship from predefined ,
and
of the output device to chromatic vectors
,
, L,
within the chromatic plane.
After the chromatic color data of the output device is obtained, it will be converted into a chromatic image of the output device to be sent to the output device for an image output. The output device, after receiving the chromatic image in the output format that can be identified and processed thereby, performs an image output, e.g., displaying, printing, projecting and the like.
Since the output device has undergone the corresponding processing of removing the color attribute of the output device itself before receiving the chromatic image of the output device and outputting the received chromatic image, when the same chromatic image based on the HSaIn color space model is output through the output devices of different color attributes, almost consistent images will be output. For example, when the printing is performed through the printers of different color attributes, almost consistent chromatic images will be printed to hereby achieve the object “what you see is what you get”.
In the embodiment, the management method of obtaining color data in an HSaIn format from color data in an XYZ format at the input device side and the management method of obtaining color data in an XYZ format at the output device side from color data in an HSaIn format at the output device side can be independent of each other.
The HSaIn color appearance color space describing the color data in the HSaIn format in the embodiment shown in
wherein the chromatic plane is a plane of the CIEXYZ Cartesian color appearance color space X+Y+Z=K, where K is a real constant; an XYZ axis of the CIEXYZ Cartesian color appearance color space performs a projection along a direction of a straight line X=Y=Z on a plane X+Y+Z=K to obtain three projection axes that are 120° with respect to one another within the chromatic plane, and unit vectors in the directions of the projection axes are ,
and
;
wherein the color data in the HSaIn format comprises a hue H, a saturation Sa, and an intensity In in the HSaIn color appearance color space; the hue H is described by a polar angle within the chromatic plane in the HSaIn color appearance color space, Sa is described by a proportion of the chromaticness to the intensity Cl/In, and m is described by the sum of the gray and the chromaticness Gl+Cl, Gl=min(X, Y, Z), and is described by the gray axis data of HSaIn,
m is a real number and is described by the mth power of the module of the chromatic vector parallel to the chromatic plane in the HSaIn space.
As shown in
Specially, the converting the acquired color data in the XYZ format into color data in an XYZ format in a CIEXYZ color appearance color space (the step 320) comprises: converting the color data in the XYZ format into color appearance color data Ra′, Ga′, Ba′ in an RGB format at the input device side under a predefined observation condition according to a technical standard CIECAM02; obtaining three color characteristic data Ra′, Ga′, Ba′, i.e., hue deviation angles αa, βa and γa within the chromatic plane, using characteristic hue values of cone response chromatograms of Ra′, Ga′ and Ba′; performing a conversion into color data Xa, Ya, Za in an XYZ format in a CIEXYZ color appearance color space according to Ra′, Ga′ and Ba′ and the hue deviation angles αa, βa and γa.
Specifically, the performing a conversion into color data Xa, Ya, Za in an XYZ format in a CIEXYZ color appearance color space according to Ra′, Ga′ and Ba′ and the hue deviation angles αa, βa and γa comprises:
converting Ra′, Ga′ and Ba′ into color data in an XYZ format in the CIEXYZ color appearance color space according to the following formulae 60-67:
in Formula 60, αa>0, βa>0, γa>0;
in Formula 61, αa>0, βa>0, γa<0;
in Formula 62, αa>0, βa<0, γa>0;
in Formula 63, αa>0, βa<0, γa<0;
in Formula 64, αa<0, βa>0, γa>0;
in Formula 65, αa<0. βa>0, γa<0;
in Formula 66, αa<0, βa<0, γa>0;
in Formula 67, αa<0, βa<0, γa<0;
wherein the values of Ra′, Ga′ and Ba′ in the above formulae 60-67 are the color data in the RGB format; the values of Xa, Ya and Za in the formulae 60-67 are the converted color data in the CIEXYZ color appearance color space; αa is a hue deviation angle between and
; βa is a hue deviation angle between
and
; γa is a hue deviation angle between
and
; Ra′, Ga′ and Ba′ are modules of the chromatic vectors
,
,
within the chromatic plane.
Specially, the converting the color data in the XYZ format in the CIEXYZ color appearance color space into color data in an HSaIn format in an HSaIn color appearance color space at the input device side (the step 3202) comprises:
acquiring the hue H in the color data in the HSaIn format at the input device side according to the following formula:
wherein the tristimulus values Xa, Ya, Za are the color data in the XYZ format, i.e., the color data in the CIEXYZ Cartesian color appearance color space, and respectively represent numerical values on the X, Y and Z coordinate axes in the CIEXYZ Cartesian color space.
The saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the following formulae and based on the color data in the XYZ format in the CIEXYZ color appearance color space:
Km and KM are positive real numbers, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, p and m are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0
In the process of converting the data in the CIEXYZ format into data in an HSaIn format, parameters, e.g., KM, Km, p, q, r, m, A, B, etc., in each acquiring manner can be selected within their defined ranges and are feasible in the implementation, but the preferred selection is that KM=Km=1, p=q=r=m−1, and A=B=0.
After the chromatic image independent of the impacts of the color characteristic of the device itself is acquired, the chromatic image independent of the impacts of the color characteristic of the device itself can be output through the output device for an output display or an output printing, projection and the like. The output device can specifically include a display, a printer, a printing machine, a projector and the like. The so-called chromatic image in an output format refers to a chromatic image in a storage format that can be identified and processed by the output device. For example, if the output device is a display, the output format of the chromatic image thereof is generally an RGB format; if the output device is a printer, the output format of the chromatic image thereof is generally a CMYe format. The specific method of converting the color data of the chromatic image in the HSaIn format into color data of a chromatic image in an output format, and removing the impacts of the color attribute of the output device itself on the output chromatic image in the conversion process will be introduced in detail below.
The embodiment shown in
Within the chromatic plane, a pure chromatic vector of each channel of each device is represented according to the intensity numerical value of the channel and the characterized hue value of the spectrum of the channel, all possible intensity numerical values of all the channels are traversed, and the set of all the chromatic vectors obtained by these traversed intensity data undergoing a pure chromatic vector addition within the chromatic plane according to a vector addition rule is just the color gamut represented by this device within the chromatic plane. The white field position in the color gamut is a position where the chromatic vector obtained after the addition of the pure chromatic vectors corresponding to the XYZ values of the white field self-defined by the respective devices within the chromatic plane is located. If the XYZ values of the white field are equal, the white field position is on the origin of the polar coordinate. The color distribution range of the image is a set of the positions of the superimposed chromatic vectors obtained by the XYZ value data of all the pixels of this image by means of the vector addition rule within the chromatic plane, and the distribution formed by this set is just the color distribution range of this image within the chromatic plane. The color representation intention is preset one of the color management strategies of the color gamut mapping, and is generally divided into a perceptual color representation intention, a saturated color representation intention, a relative chrominance color representation intention and an absolute color representation intention according to the textbook, and more color representation intentions can be further defined according to specific requirements for the color management, and no unnecessary details are given herein.
Similarly, there is a further intensity mapping performed on the premise of a preset Sa curve of another rule according to the color representation intention to obtain the color data H, Sa, In at the output device side, and no unnecessary details are given herein.
Similarly, there is a further method of further performing a saturation Sa mapping after presetting the intensity In mapping according to the color representation intention on the premise of the iso-hue H to obtain the color data H, Sa, In at the output device side, and no unnecessary details are given herein.
The embodiment shown in
Km and KM are positive real numbers, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers or
Km and KM are positive real numbers, p and m are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 or
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0
The color data in the XYZ format in the CIEXYZ color appearance color space at the output device side is obtained based on the following formulae:
if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km, In≧Gl≧0, A≧0, B≧0, p and q are nonzero real numbers the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, p and m are nonzero real numbers, In≧Gl≧0, A≧0, B≧0 the color data in the XYZ format at the output device side is acquired according to the following formulae:
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, KM>Km>0, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0
the color data in the XYZ format at the output device side is acquired according to the following formulae:
the values of X and Y represented by In, Sa, H, p, q and r, are obtained according to the specitic values of p, q and r, X>Y≧0,Y≦Z≧0, Z is a value satisfying the actual physical condition
the values of X and Y represented by In, Sa, H, p, q and r, are obtained according to the specific values of p, q and r, X>Y≧0,Y≦Z≧0, Z is a value satisfying the actual physical condition
the values of X and Y represented by In, Sa, H, p, q and r are obtained according to the specific values of p, q and r, X>Y≧0, Y>Z≧0, Z is a value satisfying the actual physical condition
or if the saturation Sa and the intensity In in the color data in the HSaIn format at the input device side are acquired according to the formulae below,
Km and KM are positive real numbers, p, q and r are nonzero real numbers, In≧Gl≧0, A≧0, B≧0
the color data in the XYZ format at the output device side is acquired according to the following formulae:
The parameters, e.g., KM, Km, p, q, r, m, A, B, etc., in the respective converting manners from the data in the HGlCl format to the data in the CIEXYZ format should be selected by referring to the converting manners from the data in the CIEXYZ format to the data in the HGlCl format within the defined range of each parameter, and the parameters are preferably selected as follows: KM=Km=1, p=q=r=m−1, and A=B=0.
In the step 324, the color data in the XYZ format in the CIEXYZ color appearance color space at the output device side is converted into color data in an image format in a color space of the output device. Specifically, the hue deviation angles αa, βa, γa of Ra′, Ga′ and Ba′ relative to ,
and
respectively are acquired using spectrum characteristic data of Ra′, Ga′ and Ba′, and color appearance color data Xa, Ya, Za is converted into color appearance color data Ra′, Ga′, Ba′ according to the following formulae 71-78:
in Formula 71, αa>0, βa>0, γa>0;
in Formula 72, αa>0, βa>0, γa<0;
in Formula 73, αa>0, βa<0, γa>0;
in Formula 74, αa>0, βa<0, γa<0;
in Formula 75, αa<0, βa>0, γa>0;
in Formula 76, αa<0, βa>0, γa<0;
in Formula 77, αa>0, βa<0, γa>0;
The color data of the cone response Ra′, Ga′, Ba is converted into color data in an XYZ format at the output device side according to a technical standard CIECAM02.
In the embodiment shown in
Further, the embodiment shown in
After the chromatic color data of the output device is obtained, it will be converted into a chromatic image of the output device to be sent to the output device for an image output. The output device, after receiving the chromatic image in the output format that can be identified and processed thereby, performs an image output, e.g., displaying, printing, projecting and the like.
Since the output device has undergone the corresponding processing of removing the color attribute of the output device itself before receiving the chromatic image of the output device and outputting the received chromatic image, when the same chromatic image based on the HSaIn color space model is output through the output devices of different color attributes, almost consistent images will be output. For example, when the printing is performed through the printers of different color attributes, almost consistent chromatic images will be printed to hereby achieve the object “what you see is what you get”.
As shown in
The color data acquired from the input device can be in a three-channel format UVW or in a multichannel format.
In the step 410, the color data acquired from the input device is converted into color data based on a CIEXYZ color space at the input device side. The specific process of converting the color data in the UVW format acquired from the input device into color data based on a CIEXYZ color space at the input device side in the step 410 is the same as that in the step 2201 in the embodiment shown in
In the step 422, the image data in the XYZ format at the input device side is mapped to color data in an XYZ format at the output device side. The mapping of the image data in the XYZ format at the input device side to color data in an XYZ format at the output device side belongs to the prior art, and no unnecessary details are further given herein.
In the step 412, the acquired color data in the XYZ format at the output device side is converted into color data in a color space of the device. The conversion of the acquired color data in the XYZ format at the output device side into color data in a color space of the device in the step 412 is the same as that in the step 2241 in the embodiment shown in
In the embodiment shown in
It can be seen from the management methods of the color data provided by the above respective embodiments that in the process of managing the color data between a color space dependent of the device and a color space independent of the device in the invention, the impacts of the input device on the chromatic image are removed according to color characteristic data of the device, and the calculations for the conversion are all matrix operations that are easily achieved, which greatly simplifies the calculating process for the conversion, improves the conversion accuracy and efficiency, and accelerates the conversion speed. Especially, the conversion formulae for the conversion into color data in an HSaIn format provided in the embodiments of the invention are theoretical formulae and will not have accumulative errors in the multiple calculations, so the color data obtained by these calculations with the conversion formulae will provide higher accuracies of the color data than the conversion formulae in the prior art.
It can be further seen from the management methods of the color data provided by the above respective embodiments that since the method of performing the color gamut mapping in the HSaIn color space is performed under the Iso-hue plane, the three-dimensional conversion is simplified as the one-dimensional repeated conversion, which improves the conversion efficiency and improves the conversion accuracy.
The chromatic image independent of the impacts of the color attribute of the input device itself can be acquired by the above method. That is to say, by the above method, the acquired pictures of the same scene taken by cameras of different brands will have a comparatively good consistency.
The formulae, especially the formulae containing trigonometric functions, involved in the above respective embodiments can further derive formulae in other forms, the essential meanings of which do not change, by means of mathematical operations, and since the derived formulae are essentially the same as those in the invention, they shall be deemed as ones within the scope of protection of the invention.
The above contents are only preferred implementation modes of the invention. It should be noted that those skilled in the art can further make some improvements and decorations in the case of not breaking away from the technical principle of the invention, and these improvements and decorations should also be deemed as ones within the scope of protection of the invention.
Number | Date | Country | Kind |
---|---|---|---|
201210073220.8 | Mar 2012 | CN | national |
201210236550.4 | Jul 2012 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2013/072711 | 3/15/2013 | WO | 00 |