Summary of the invention
The object of the invention is to overcome above-mentioned technological deficiency, a kind of color domain expanding system and method that can realize regulating and can protecting continuously important color is provided.
For achieving the above object, color domain expanding system provided by the invention comprises: signal input unit, positive-going transition unit, important color management unit, gamut extension unit, reverse transformation unit and signal output unit;
Described signal input unit is used for the input pixel color information;
Described positive-going transition unit is used for described pixel color information is converted to L, a, the b value of linear Lab color space;
Described important color management unit is used for judging whether current color belongs to important color gamut, and calculates the reduction coefficient according to judged result;
Described gamut extension unit is used for receiving gamut extension coefficient and the reduction coefficient that arranges, according to gamut extension coefficient and the reduction coefficient of described setting, L, a, b value that described positive-going transition unit is provided expand to new L, a, b value in linear Lab color space;
L, a after described reverse transformation unit is used for expanding, the pixel color information that the b value is converted to large colour gamut;
Described signal output unit is used for exporting the pixel color information of described large colour gamut.
In the technique scheme, described color domain expanding system also comprises gamut extension coefficient input unit, (form of input is not limit here for the gamut extension coefficient of inputting setting for the user, such as: can freely be inputted by the user, also can preset a series of numerical value, be selected by the user).
In the technique scheme, described color domain expanding system also comprises the colour temperature selected cell, is used for for the user selection color temperature value, and this color temperature value is as the input parameter of described positive-going transition unit and reverse transformation unit.
In the technique scheme, described important color management unit comprises chromaticity coordinate computing unit and reduction coefficient calculation unit, described chromaticity coordinate computing unit calculates the current color chromaticity coordinate, described reduction coefficient calculation unit judges according to the current color chromaticity coordinate whether current color belongs to important color gamut, and calculates the reduction coefficient according to judged result.
In the technique scheme, described pixel color information is rgb signal.
In the technique scheme, described positive-going transition unit comprises XYZ colorimeter system positive-going transition unit and linear Lab color space positive-going transition unit; Described XYZ colorimeter system positive-going transition unit is used for R, the G of RGB system, X, Y, the Z tristimulus specifications that the B tristimulus specifications is transformed into the XYZ colorimeter system; Described linear Lab color space positive-going transition unit is used for X, Y, Z tristimulus specifications are transformed to L, a, the b value of linear Lab color space;
Described reverse transformation unit comprises linear Lab color space inverse transformation block and large colour gamut XYZ inverse transformation block; It is large colour gamut X, Y, the Z excitation value of XYZ colorimeter system that described linear Lab color space inverse transformation block is used for the L after the gamut extension, a, b value transform; Described large colour gamut XYZ inverse transformation block is used for described large colour gamut X, Y, Z excitation value are transformed to R, G, the B excitation value of large colour gamut RGB system.
For achieving the above object, color domain expanding method provided by the invention comprises the steps:
1) input pixel color information;
2) described pixel color information is converted to L, a, b value in the linear Lab color space;
3) chromaticity coordinate of calculating current color is differentiated current color and whether is belonged to important color gamut, calculates the reduction coefficient according to judged result, receives the gamut extension coefficient of setting; And obtain revised gamut extension coefficient according to gamut extension coefficient and the described reduction coefficient of described setting;
4) in linear Lab color space, according to revised gamut extension coefficient, with described step 2) L, a, the b value that provide expand to new L, a, b value;
5) L, a after will expanding, the pixel color information that the b value is converted to large colour gamut;
6) pixel color information of the described large colour gamut of output.
In the technique scheme, described step 3) in, the gamut extension coefficient of described setting is inputted by the user.
In the technique scheme, described step 2) in, also comprises by the user selection color temperature value, according to this color temperature value pixel color information is converted to L, a, b value in the linear Lab color space; Described step 5) in, equally according to described color temperature value, with L, a after the expansion, the pixel color information that the b value is converted to large colour gamut.
In the technique scheme, described pixel color information is rgb signal.
In the technique scheme, described step 2) comprise following substep:
21) with R, the G of RGB system, X, Y, the Z tristimulus specifications that the B tristimulus specifications is transformed into the XYZ colorimeter system;
22) X, Y, Z tristimulus specifications are transformed to L, a, b value in the linear Lab color space;
Described step 5) comprise following substep:
51) with the L after the gamut extension, a, b value transform be large colour gamut X, Y, the Z excitation value of XYZ colorimeter system;
52) described large colour gamut X, Y, Z excitation value are transformed to R, G, the B excitation value of large colour gamut RGB system.
In the technique scheme, described step 3) in, the method whether the differentiation current color belongs to important color gamut is as follows:
31) set the chromaticity coordinate fiducial value of all important colors;
32) in chromaticity coordinates, when the current color chromaticity coordinate drops in the geometric figure with certain size centered by any one described chromaticity coordinate fiducial value, judge that current color belongs to important color gamut; Otherwise, judge that current color does not belong to important color gamut; Described geometric size is limited by predefined threshold value.
In the technique scheme, described step 32) in, described geometric figure is square, and this foursquare limit is parallel or vertical with the reference axis of chromaticity coordinates.
In the technique scheme, described step 32) in, described geometric figure is square, and the reference axis of this foursquare limit and chromaticity coordinates is 45 degree angles.
In the technique scheme, described step 3) in, the method for described calculating reduction coefficient and the revised gamut extension coefficient of calculating is as follows:
33) when current color does not belong to important color gamut, reduction COEFFICIENT K=1; When current color belongs to important color gamut, then for each chromaticity coordinate fiducial value, centered by described chromaticity coordinate fiducial value, make the square through current color chromaticity coordinate point, with the ratio of the wherein minimum foursquare length of side and the foursquare length of side that described threshold value limits as the COEFFICIENT K that weakens;
34) the gamut extension coefficient VGE by reduction COEFFICIENT K and setting calculates revised gamut extension coefficient VGE
New=(VGE-1) * K+1.
The useful technique effect that the present invention has comprises:
1, color domain expanding system of the present invention and method can realize the continuous adjusting of gamut extension coefficient;
2, color domain expanding system of the present invention and method have been introduced the process of important color management, so that important color can not cause excessive distortion in the process of gamut extension;
3, the algorithm computational efficiency of color domain expanding method of the present invention is high, and is low to the system resource requirement, satisfies better the in real time requirement of processing of vision signal of high data volume;
4, the present invention carries out the gamut extension processing at linear Lab color space, and it is the fine approximate of standard Lab color space, and standard Lab color space is the homogeneous color space of the CIE of Commission Internationale De L'Eclairage definition, is the standard operation space in the color management flow process.So-called homogeneous color space refers to a kind of like this color space, and the color-aware difference of human eye is identical in the district of all kinds in this space.But the algorithm that the color signal of video is transformed into standard Lab color space is very complicated, be unfavorable for real-time processing, so just greatly simplify transfer algorithm on the linear Lab color space so color domain expanding method of the present invention is defined in working space, reduced amount of calculation; And because the present invention carries out the gamut extension computing at the linear Lab color space that is similar to homogeneous color space, so relative method of adjustment based on color difference signal, the present invention can avoid the generation of form and aspect bias phenomenon preferably, has higher precision and accuracy.
Embodiment
Embodiment 1
Below in conjunction with Figure of description, describe the present embodiment in detail.Fig. 1 has represented the device schematic diagram of continuously adjustable gamut extension of the present invention.What this device was total is comprised of user selection unit 2 and control system 1, and this control system 1 receives the signal of user selection unit 2 transmissions and finishes gamut extension.Wherein, user selection unit 2 comprises can be for the colour temperature selected cell 21 of user selection color temperature value and the gamut extension coefficient input unit 22 that the gamut extension coefficient can freely be set by the user, wherein colour temperature selected cell 21 provides several color temperature values to select to the user, such as 5400K, 6500K, 9300K etc.; The important color management unit 3 that control system 1 comprises rgb signal input unit 11, XYZ colorimeter system positive-going transition unit 12, linear Lab color space positive-going transition unit 13, is comprised of chromaticity coordinate computing unit 15 and reduction coefficient calculation unit 16, gamut extension unit 14, linear Lab color space inverse transformation block 17, greatly colour gamut XYZ inverse transformation block 18 and rgb signal output unit 19.Described rgb signal refers to represent the digital signal of video data pixel color information.Rgb signal input unit 11 receives the vision signal that meets certain color-code standard (such as Rec.ITU-R BT.709 standard), each picture element in this signal comprises the excitation value information of red-green-blue, be made as R, G and B, XYZ colorimeter system positive-going transition unit 12 is transformed into R, G, B tristimulus specifications the tristimulus specifications of XYZ colorimeter system, wherein conversion process Yin Sewen is different and different, and color temperature value is selected by colour temperature selected cell 21 by the user.Linear Lab color space positive-going transition unit 13 transforms to L in the linear Lab color space with the XYZ tristimulus specifications, a and b, this conversion process is also determined by color temperature value, the definition of above-mentioned linear Lab color space and and the transfer process that transformed in the linear Lab color space by the XYZ tristimulus specifications be disclosed in the scientific and technical literature of " Evaluation of smoothness tonal change reproduction on multi-primarydisplay:Comparison of color conversion algorithm; Proc.SPIE; Vol.5289, pp:275-283 (2004) ".Simultaneously, chromaticity coordinate computing unit 15 transforms to chromaticity coordinate (x in the chromaticity coordinate system with the XYZ tristimulus specifications, y), reduction coefficient calculation unit 16 is judged chromaticity coordinate (x, whether y) belong in the important color gamut, and calculate the reduction coefficient according to judged result, gamut extension unit 14 receives the value that the user utilizes gamut extension coefficient input unit 22 free settings, receive simultaneously the reduction coefficient, a and b are carried out the gamut extension computing obtain a
NewAnd b
NewThen linear Lab color space inverse transformation block 17 is with a after the gamut extension
NewAnd b
NewAnd the excitation value X of XYZ colorimeter system is returned in the L conversion
New, Y
NewAnd Z
NewLarge colour gamut XYZ inverse transformation block 18 is with X
New, Y
NewAnd Z
NewTransform to the R of large colour gamut RGB system
New, G
NewAnd B
New, and through rgb signal output unit 19 output R
New, G
NewAnd B
NewSignal.
Embodiment 2
Realize the method for continuously adjustable gamut extension below in conjunction with specific embodiment explanation the present invention, the method comprises:
The vision signal of step 201:RGB signal input unit 11 input pre-color coding standards, wherein each picture element in the vision signal comprises the information of red-green-blue excitation value, is R, G and B;
Step 202: the user selects one of them by the colour temperature selected cell 21 on the user selection unit 2 from several color temperature values;
Step 203:XYZ colorimeter system positive-going transition unit 12 becomes X, Y and Z with B according to corresponding color-code canonical transformation with R, G according to the color temperature value of user selection;
Wherein the concrete steps of above-mentioned steps 203 are:
Step 2031: three one dimension look-up tables by corresponding redgreenblue are transformed into linear color data Rs, Gs and Bs with R, G and B, and transformation relation depends on the color-code standard that adopts, and for example to the BT.709 standard, adopt formula (1)
Wherein, M is the normalization signal strength signal intensity, and V is the linearisation data result.Represent with the n bit binary data such as the RGB color signal, then work as M=R/2
nThe time, corresponding V=Rs; Work as M=G/2
nThe time, corresponding V=Gs; Work as M=B/2
nThe time, corresponding V=Bs, wherein the span of R, G, B is 0~(2
n-1), and all V value calculated in advance are complete, are stored in the memory of XYZ colorimeter system positive-going transition unit 12 in the mode of look-up table.
There is the positive-going transition matrix corresponding with all color temperature values that can select by colour temperature selected cell 21 in the step 2032:XYZ colorimeter system positive-going transition unit 12, by the color temperature value of user selection, XYZ colorimeter system positive-going transition unit 12 can find the positive-going transition matrix corresponding with this color temperature value
Obtain X, Y and Z by formula (2).
Formula (2)
For example, if the colour temperature that the user arranges is 6500K, then its positive-going transition is closed and is:
Formula (2-1)
Step 204: linear Lab color space positive-going transition unit 13 according to formula (3) with L, a and b in X, Y and the linear Lab color space of Z-transformation.
Formula (3)
Wherein, T corresponding to different colour temperatures
Lab, the user selects each corresponding T of all color temperature values of setting by colour temperature selected cell 21
Lab, all T
LabAll be stored in the linear Lab color space positive-going transition unit, linear Lab color space positive-going transition unit 13 can find the T corresponding with it easily by the color temperature value that reads user's setting
LabT
LabIn X
n, Y
nAnd Z
nBe to determine like this, the user sets each color temperature value and has corresponding chromaticity coordinate, for example the user to set color temperature value be T
A, T then
ACorresponding chromaticity coordinate is (x
A, y
A, z
A), X then
n, Y
nAnd Z
nCalculate with formula (4).
Formula (4)
For example, be 6500K if the user sets colour temperature, its chromaticity coordinate is (0.3127,0.3290,0.3583), can get (X by formula (4)
n, Y
n, Z
n)=(95.05,100,108.91); Thereby by formula (3) can be under this colour temperature the XYZ colorimeter system to the transformation for mula of linear Lab color space:
Formula (4-1)
The present invention carries out gamut extension at linear Lab color space and processes, and it is the fine approximate of standard Lab color space, and standard Lab color space is the homogeneous color space of the CIE of Commission Internationale De L'Eclairage definition, is the standard operation space in the color management flow process.So-called homogeneous color space refers to a kind of like this color space, and the color-aware difference of human eye is identical in the district of all kinds in this space.But the algorithm that the color signal of video is transformed into the Lab color space is very complicated, be unfavorable for real-time processing, so color domain expanding method of the present invention is defined in working space on the linear Lab color space, has so just greatly simplified transfer algorithm, has reduced amount of calculation; And because the present invention carries out the gamut extension computing at the linear Lab color space that is similar to homogeneous color space, so relative method of adjustment based on color difference signal, the present invention can avoid the generation of form and aspect bias phenomenon preferably, has higher precision and accuracy.
Step 205: chromaticity coordinate computing unit 15 calculates corresponding RGB chromaticity coordinate (x, y) from X, Y and Z simultaneously, and wherein x and y calculate by formula (5).
Formula (5)
Step 206: reduction coefficient calculation unit 16 receives x and y, judges whether this RGB chromaticity coordinate (x, y) belongs in the corresponding chromaticity coordinate of important color and near the scope (being important color gamut) thereof, and calculates the reduction COEFFICIENT K according to judged result.
Above-mentioned steps 206 can adopt (but being not limited to) following process implementation:
Judge at first whether RGB chromaticity coordinate (x, y) belongs in the important color gamut, wherein important color gamut can be the model of following two kinds of important color gamuts, supposes that important color chromaticity coordinate comprises three, be designated as respectively (x1, y1) (x2, y2), (x3, y3):
Model 1: take the chromaticity coordinate of important color as foursquare center, the square scope definition of the certain distance that stretches out is important color gamut, and wherein foursquare border is all parallel or vertical with the reference axis of chromaticity coordinate system, as shown in Figure 2.
Model 2: take the chromaticity coordinate of important color as foursquare center, the square scope definition of the certain distance that stretches out is important color gamut, and wherein foursquare border all is 45 degree angles with the reference axis of chromaticity coordinate system, as shown in Figure 3.
Below take model 1 as example, then step 206 can adopt (but being not limited to) following process implementation:
Step 2061: as shown in Figure 4, the square centered by important color chromaticity coordinate that is represented by solid line has defined the scope of important color, and these foursquare length of sides all equal a, half that choose the length of side is defined as threshold value, namely this threshold value is a/2, can say that also these foursquare physical dimensions that define important color gamut are limited by this threshold value.
Step 2062: find the RGB chromaticity coordinate (x, y) (being P among Fig. 4) that calculates in the step 205 in the position of chromaticity coordinate system, to be designated as P, then calculate respectively P to the horizontal and vertical distance of the chromaticity coordinate of all important colors.As shown in Figure 4, might as well comprise three as example take important color chromaticity coordinate, then calculate and adopt formula (6).
Formula (6)
Step 2063: adopt formula (7) to calculate d1, d2 and d3.
D1=max (dx1, dy1); D2=max (dx2, dy2); D3=max (dx3, dy3) formula (7)
In conjunction with Fig. 4, can draw that d1, d2 and d3 equal respectively centered by the chromaticity coordinate of three important colors, external boundary all is parallel or perpendicular to half of the length of side of three squares (being illustrated by the broken lines in Fig. 4) of the reference axis of chromaticity coordinate system through current RGB chromaticity coordinate (x, y) and border.
Step 2064: compare d1, d2 and d3, and take out minimum one, be made as d, then d=min (d1, d2, d3).This shows, 2d just equals minimum in the length of side value in three squares in the step 2,063 one, has namely selected a shortest square of the length of side, might as well suppose d1<d2<d3, as shown in Figure 4, this moment, 2d equaled the square length of side 2d1 that the dotted line centered by C1 represents among Fig. 4.The purpose of this step is to determine the reduction COEFFICIENT K that current RGB chromaticity coordinate (x, y) on earth should be take the chromaticity coordinate of which important color as the benchmark subsequent step.
Step 2065: calculate the reduction COEFFICIENT K, the process of calculating is: judge whether d whether greater than threshold value, namely judges d>a/2, if d>a/2, then the RGB chromaticity coordinate does not belong to important color gamut, and K=1; If d≤a/2, then the RGB chromaticity coordinate belongs to important color gamut, and K=2d/a, as seen the coefficient that weakens is to calculate according to a square of length of side minimum in three squares in the step 2063 (i.e. minimum square), and the computing formula of reduction coefficient can draw when belonging to important color gamut by the RGB chromaticity coordinate: this reduction coefficient equals the ratio of the foursquare length of side that the described threshold value of the foursquare length of side minimum in the step 2063 and the important color gamut of sign limits.
Judge RGB chromaticity coordinate (x in the step 206, y) method that whether belongs to important color gamut and calculating reduction coefficient can also adopt the important color gamut model that model 2 defines among Fig. 3, then only needs the step of step 2061-step 2065 alternative with following concrete steps:
Step 20611: as shown in Figure 5, the square centered by important color chromaticity coordinate that is represented by solid line has defined the scope of important color, and these foursquare cornerwise length all equal b, half that choose catercorner length is defined as threshold value, namely this threshold value is b/2, can say that equally also these foursquare physical dimensions that define important color gamut are limited by this threshold value.
Step 20621: identical with the process of above-mentioned step 2062.
Step 20631: adopt formula (7-1) to calculate l1, l2 and l3:
L1=dx1+dy1; L2=dx2+dy2; L3=dx3+dy3 (formula 7-1)
As shown in Figure 5, can draw that l1, l2 and l3 equal respectively centered by the chromaticity coordinate of three important colors, external boundary through current RGB chromaticity coordinate (x, y) (be P among Fig. 5) and border all with the reference axis of chromaticity coordinate system be 45 spend angles three squares (in Fig. 5, being illustrated by the broken lines) cornerwise half.
Step 20641: compare l1, l2 and l3, and take out minimum one, be made as l, then l=min (l1, l2, l3).This shows, 2l just equals minimum in the catercorner length in three squares in the step 20,631 one, namely selected a shortest square of diagonal, might as well suppose l1<l2<l3, as shown in Figure 5, this moment, 2l equaled foursquare cornerwise length 2l1 that the dotted line centered by C1 represents among Fig. 5.The purpose of this step is to determine that current RGB chromaticity coordinate (x, y) should be the reduction COEFFICIENT K of benchmark subsequent step with which chromaticity coordinate on earth.
Step 20651: calculate the reduction COEFFICIENT K, the process of calculating is: whether judge l>b/2, if l>b/2, then the RGB chromaticity coordinate does not belong to important color gamut, and K=1; If l≤b/2, then the RGB chromaticity coordinate belongs to important color gamut, and K=2l/b.As seen the COEFFICIENT K that weakens is to calculate according to a shortest square of catercorner length in three squares in the step 20631 (i.e. minimum square), and according to geometry knowledge, the ratio of square catercorner length and the square length of side is fixed, and the computing formula of reduction coefficient when belonging to important color gamut in conjunction with the RGB chromaticity coordinate, can obtain as drawing a conclusion: the coefficient that weakens when the RGB chromaticity coordinate belongs to important color gamut equals foursquare catercorner length minimum in the step 20631 and the ratio of the foursquare catercorner length of threshold value restriction as described in the important color gamut of sign, also just equals the ratio of the foursquare length of side with the foursquare length of side of the described threshold value restriction that characterizes important color gamut of minimum in the step 20631.
Step 207: gamut extension unit 14 receives the gamut extension coefficient VGE that the user freely arranges by gamut extension coefficient input unit 22, and the reduction COEFFICIENT K that calculates in the comprehensive step 206, obtains revised VGE
New, VGE wherein
NewThen=(VGE-1) * K+1 carries out extension process to a and b in linear Lab color space, obtain a
NewAnd b
New, computational methods adopt formula (8):
Formula (8)
Like this, for the color that does not belong to important color gamut, therefore K=1 is VGE
NewDo not compare with VGE and to change; And for the color in the important color gamut, because K<1, so VGE
New<VGE, and along with chromaticity coordinate the closer to important color chromaticity coordinate, VGE
NewMore level off to 1, thereby the expansion of the important color of reduction in the gamut extension process can reduce the distortion level of important color in the gamut extension process, plays the effect of the important color of protection.
Step 208: linear Lab color space inverse transformation block 17 is with L, a
NewAnd b
NewConversion is returned in the XYZ colorimeter system, obtains X
New, Y
NewAnd Z
New, the formula (9) below conversion process adopts:
Formula (9)
Wherein, T
Lab -1Be the T in the step 204
LabInverse matrix, therefore also corresponding different T of different color temperature values
Lab -1, all T
Lab -1Be stored in the memory of linear Lab color space inverse transformation block 17, linear Lab color space inverse transformation block 17 reads out corresponding T according to the color temperature value that the user sets
Lab -1, utilize formula (9) to obtain setting X under the colour temperature
New, Y
NewAnd Z
New
Step 209: large colour gamut XYZ inverse transformation block 18 is with X
New, Y
NewAnd Z
NewThe excitation value R in the RGB system is returned in conversion
New, G
NewAnd B
New
Above-mentioned steps 209 can adopt (but being not limited to) following process implementation:
Step 2091: utilize large colour gamut display device XYZ colorimeter system reverse transformation matrix
With X
New, Y
NewAnd Z
NewBe transformed into linear color space R
Snew, G
SnewAnd B
Snew, conversion process adopts formula (10).This large colour gamut display device XYZ colorimeter system reverse transformation matrix
Colour temperature by the brilliant white field of the three primary colors chromaticity coordinate of large colour gamut display device and this display device correspondence determines, its computational methods can be gained knowledge from relevant colourity and be obtained.
Formula (10)
Step 2092: by the look-up table from linear Lab color space excitation value to RGB system incentive value of setting up in advance, with R
Snew, G
SnewAnd B
SnewTransform to the excitation value R in the RGB system
New, G
NewAnd B
New
In the above-mentioned conversion process, also step 208 and the synthetic step of step 209 can be finished.
Step 210:RGB signal output unit 19 is with R
New, G
NewAnd B
NewOutput.
Because the matrix that all conversion processes in the color domain expanding system of the present embodiment and the method need all is by precalculated, and be deposited in the memory, therefore relate to the multiplication of matrices computing and only need carry out several linear calculating, and there is not nonlinear calculating in the algorithm that the present invention adopts, therefore computational efficiency is very high, satisfies the requirement of the real-time processing of big data quantity video.
In the present embodiment, the pixel color information of input is rgb signal, but the present invention also can adopt other signal as pixel color information, and such as the YCbCr signal, this is that those skilled in the art can understand.
Above-described specific embodiment has been described in detail purpose of the present invention, technical scheme and beneficial effect.Institute's foregoing that it should be understood that is not limited to the present invention only for specific embodiments of the invention.All within spirit of the present invention and principle, any modification of making, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.