Embodiment
To describe the present invention more all sidedly with reference to accompanying drawing now, exemplary embodiment of the present invention be shown in said accompanying drawing.In the accompanying drawings, identical reference number is represented components identical.
Fig. 1 is the block diagram according to the colour temperature conversion equipment 100 of one exemplary embodiment of the present invention.With reference to Fig. 1, colour temperature conversion equipment 100 comprises: confirm unit 110, variable computing unit 120, memory cell 130, hue coordinate computing unit 140, look-up table and color coordinate conversion unit 160.
Confirm that unit 110 receives picture signal; The variable that is used for confirming conversion range that this picture signal comprises pixel and comes from variable computing unit 120 (hereinafter; Be called as the conversion range of confirming variable) and confirm that according to conversion range current pixel that variable confirms picture signal is whether within said conversion range; That is, whether the colour temperature of current pixel need be changed.Here, each pixel of said picture signal comprises luminance signal and color difference signal.In addition, said conversion range can be fastened by any conic section at hue coordinate, and particularly, ellipse is realized.Said conversion range is fastened at said hue coordinate and will be described to now to be implemented as an ellipse.
Variable computing unit 120 receives the picture signal that comes from external device (ED), receives the predetermined information that comes from memory cell 130, confirm that through using this predetermined information conversion range confirms variable, and output result of calculation is to confirming unit 110.
The various regulatory factors of memory cell 130 storages, that is, said conversion range is confirmed variable, and should output to variable calculator 120 by various regulatory factors.
Hue coordinate computing unit 140 according to the colour temperature of being set by the user (hereinafter; Be called as the colour temperature that the user sets); And the luminance signal of current pixel and color difference signal, calculate the hue coordinate of the impact point that the datum mark of conversion range will be moved to reference to look-up table 150.
Look-up table 150 a plurality of basic colour temperatures of storage and a plurality of basic brightness that provides by image display, and right with the corresponding sample hue coordinate of combination of the gentle a plurality of basic brightness of a plurality of Essential colour.
Colour temperature converting unit 160 moves to the colour temperature that impact point is changed current pixel through the datum mark with conversion range.
Fig. 2 is the flow chart according to the color temperature conversion method of one exemplary embodiment of the present invention.With reference to Fig. 1 and 2, in operating procedure S200, from the outside reception picture signal of colour temperature conversion equipment 100.This picture signal comprises a plurality of pixels, and in these a plurality of pixels each all has brightness signal Y and color difference signal Cb and Cr.In operating procedure S201, variable computing unit 120 receives the predetermined information that comes from memory cell 130 and through using predetermined information to confirm that conversion range confirms variable.Memory cell 130 storages are used for the various regulatory factors that definite conversion range is confirmed variable; That is regulatory factor, the X axle of color coordinate system and the angle and the brightness scale factor of this oval main shaft of length that, is used for length and this oval minor axis of oval main shaft.In the following table 1 this regulatory factor has been shown.
Table 1
Index |
Regulatory factor | Constant | |
1 |
The regulatory factor that is used for oval main axis length |
α |
2 |
The regulatory factor that is used for oval minor axis length |
β |
3 |
The angle of X axle and principal axis of ellipse |
θ |
4 |
The brightness scaling factor |
K |
Now operating procedure S201 will be described in further detail.
At first, use following formula (1) to calculate the fundamental length Base_Dist of said ellipse:
Base_Dist=k×Y ...(1)
Here, k representes to be used for confirming the constant of Base_Dist and the brightness that Y representes current pixel.
The second, calculate the length a of the main shaft of said ellipse through using following formula (2):
a=α×Base_Dist ...(2)
Here α representes to be used for confirming the constant of a.
The 3rd, the formula (3) below using calculates the length b of the minor axis of said ellipse:
b=β×a ...(3)
Here β representes to be used for confirming the constant of b.
The 4th, use the angle θ of X axle of main shaft and the hue coordinate system of said ellipse to confirm to be used for the Coefficient m of spin matrix
1And m
2, it is represented by following formula (4) and (5):
m
1=cos(-θ) ...(4)
m
2=sin(-θ) ...(5)
The 5th, the formula (6) below using calculate said long axis of ellipse length a square f reciprocal:
The the 6th and last, the formula (7) below using calculate said ellipse minor axis length b square g reciprocal:
In operating procedure S202, confirm that unit 110 confirms that according to conversion range variable confirms that current pixel is whether within conversion range.Now operating procedure S202 will be described in more detail.、
At first, receive picture signal, and each of the pixel of picture signal is all handled.The second, receive the conversion range of confirming by variable computing unit 120 and confirm variable m
1, m
2, f and g.The 3rd, suppose that (x y) is illustrated in the current location of the current pixel on the color coordinate system, P to P
1(p
1x,, p
1y) represent through the rotation point that P obtained, and through using formula (8) and (9) to obtain P respectively
1(p
1x,, p
1y) hue coordinate p
1xAnd p
1y:
p
1x=m
1×x-m
2×y ...(8)
p
1y=m
2×x-m
1×y ...(9)
The the 4th and last, confirm current pixel whether within conversion range, that is, whether the colour temperature of current pixel need use inequality (10) to change.In other words, if current pixel satisfies inequality (10), then current pixel just is determined to be within the conversion range.Otherwise current pixel is determined to be in outside the conversion range, thereby accomplishes whole color temperature conversion methods.After this, on pixel subsequently, carry out another colour temperature of taking turns conversion.
f×p
1x+g×p
1y≤1 ...(10)
In operating procedure S203; Hue coordinate computing unit 140 is according to the luminance signal and the color difference signal of current pixel; Calculate the hue coordinate (hereinafter, being called as the object color component coordinate) of the impact point that the center of said conversion range will move to reference to look-up table 150.Following table 2 is examples of look-up table 150.
Table 2
Index |
Brightness |
T
1 |
T
2 |
... |
T
M-1 |
T
M |
1 |
Y
1 |
Cb
1?T1,Cr
1?T1 |
Cb
1?T2,Cr
1?T2 |
... |
Cb
1?TM-1,Cr
1?TM-1 |
Cb
1?TM,Cr
1?TM |
2 |
Y
2 |
Cb
2?T1,Cr
2?T1 |
Cb
2?T2,Cr
2?T2 |
... |
Cb
2?TM-1,Cr
2?TM-1 |
Cb
2?TM,Cr
2?TM |
3 |
Y
3 |
Cb
3?T1,Cr
3?T1 |
Cb
3?T2,Cr
3?T2 |
... |
Cb
3?TM-1,Cr
3?TM-1 |
Cb
3?TM,Cr
3?TM |
4 |
Y
4 |
Cb
4?T1,Cr
4?T1 |
Cb
4?T2,Cr
4?T2 |
... |
Cb
4?TM-1,Cr
4?TM-1 |
Cb
4?TM,Cr
4?TM |
... |
... |
... |
... |
... |
... |
... |
N-1 |
Y
N-1 |
Cb
N-1?T1,Cr
N-1?T1 |
Cb
N-1?T2,Cr
N-1?T2 |
... |
Cb
N-1?TM-1,Cr
N-1?TM-1 |
Cb
N-1?TM,Cr
N-1?TM |
N |
Y
N |
Cb
N?T1,Cr
N?T1 |
Cb
N?T2,Cr
N?T2 |
... |
Cb
N?TM-1,Cr
N?TM-1 |
Cb
N?TM,Cr
N?TM |
Be described in more detail referring now to table 2 pair said object color component Coordinate Calculation.
At first, suppose that current pixel has a brightness Y, two sample brightness Y
lAnd Y
h,, the inequality 11 below they satisfy is selected in a plurality of sample brightness from be stored in first look-up table 150.
Y
l<Y≤Y
h ...(11)
Have between per two continuous brightness in a plurality of sample brightness one predetermined poor, and in these a plurality of sample brightness each all has a fixed value.If each in these a plurality of sample luminance signals all is 8 bit data, so a value can be set between 0 and 255.For example, look-up table 150 can have altogether that 16 sample luminance signals (that is, N=16), wherein have 16 difference.If these 16 sample luminance signals are 0,16,32,48,64,80 ..., 240 and the brightness signal Y of current pixel be 37, these two selected sample brightness signal Y then
lAnd Y
hBe respectively 32 and 48.
The second, two sample colour temperatures of inequality (12) below among a plurality of sample colour temperatures that provide by look-up table 150, selecting to satisfy.
T
l<T
u≤T
h ...(12)
The 3rd, if the brightness Y of current pixel is identical with one of a plurality of sample brightness, and therefore there is no need through using two sample brightness Y
lAnd Y
hThrough the brightness of interpolation acquisition current pixel, then from look-up table 150, obtain to correspond respectively to the brightness Y and the selected sample colour temperature T of current pixel
lAnd T
hThe sample hue coordinate of combination to (Cb
Tl, Cr
Tl) and (Cb
Th, Cr
Th).After this, corresponding to the brightness Y of current pixel and the colour temperature T of user's setting
uThe object color component coordinate (Cb of combination
Tu, Cr
Tu) be through using the sample hue coordinate to (Cb
Tl, Cr
Tl) and (Cb
Th, Cr
Th) and weighted value W
TlAnd W
ThObtain via interpolation.Weighted value W
TlAnd W
ThBe through utilizing T
uAnd T
lBetween and T
uAnd T
hBetween difference calculate, it is represented by equality (13) and (14).Hue coordinate Cb
TuAnd Cr
TuRespectively through using equality (15) and (16) to obtain.Fig. 3 shows this at two couples of sample hue coordinate (Cb
Tl, Cr
Tl) and (Cb
Th, Cr
Th) between object color component coordinate (Cb
Tu, Cr
Tu) the interpolation based on colour temperature.
Cb
Tu=W
tl×Cb
Tl+W
th×Cb
Th ...(15)
Cr
Tu=W
tl×Cr
Tl+W
th×Cr
Th ...(16)
On the other hand, if any one in the brightness Y of current pixel and a plurality of sample brightness is all inequality, and therefore need to use two sample brightness Y
lAnd Y
hThrough the brightness of interpolation acquisition current pixel, the colour temperature T that then is provided with corresponding to the user
uObject color component coordinate (Cb with the combination of the brightness Y of current pixel
Tu, Cr
Tu) can use the i.e. (Cb of two pairs of sample hue coordinates
Tu-yl, Cr
Tu-yl) and (Cb
Tu-yh, Cr
Tu-yh) and weights W
YlAnd W
YhObtain, wherein (Cb
Tu-yl, Cr
Tu-yl) the colour temperature T that is provided with corresponding to the user
uWith sample brightness Y
lCombination, (Cb
Tu-yh, Cr
Tu-yh) the colour temperature T that is provided with corresponding to the user
uWith sample brightness Y
hCombination.Weights W
YlAnd W
YhBe through utilizing Y and Y
lBetween and Y and Y
hBetween difference obtain.Weights W
YlAnd W
YhCalculate through use formula (17) and (18) respectively, and object color component coordinate Cb
TuAnd Cr
TuRespectively through using formula (19) and (20) to obtain.Illustrated at (Cb among Fig. 4
Tu-yl, Cr
Tu-yl) and (Cb
Tu-yh, Cr
Tu-yh) between object color component coordinate (Cb
Tu, Cr
Tu) interpolation.The hue coordinate Cb of equality (15) and (16) Shen
TuAnd Cr
TuBe different from their counterparts separately in equality (19) and (20).That is to say the hue coordinate Cb in equality (15) and (16)
TuAnd Cr
TuCome interpolation based on a brightness, and the hue coordinate Cb in equality (19) and (20)
TuAnd Cr
TuCome interpolation based on two brightness.
Cb
Tu=W
yl×Cb
Tu_yl+W
yh×Cb
Tu_yh ...(19)
Cr
Tu=W
yl×Cr
Tu_yl+W
yh×Cr
Tu_yh ...(20)
In operating procedure S204, colour temperature converting unit 160 is changed the colour temperature of current pixel to said impact point through the datum mark (for example, center) that moves said conversion range.Now operating procedure S204 will be described in more detail.
Whether two the hue coordinate x and the y that at first, confirm the some P at the current place of current pixel all are 0.If two hue coordinate x of current pixel and y are 0, that is, if x=y=0, the hue coordinate x ' of P ' and y ' are replaced by object color component coordinate T separately simply
u(Cb
Tu, Cr
Tu), said P ' is the point that current pixel will automatically move to along with the center of said conversion range.In other words, x '=Cb
Tu, and y '=Cr
TuAfter this, the whole color conversion process that are used for current pixel need not be done under the situation of carrying out additional treatments on the current pixel, on pixel afterwards, carry out another color conversion of taking turns then.
Second; Only if hue coordinate x and the y of some P are 0 value; Calculating between a borderline point of the center of said conversion range and said conversion range apart from the formula (21) of r below using, wherein from the center of said conversion range through rotating the some P that P obtains
1(p
1x, p
1y) a predetermined straight line that draws ends at the borderline some place of said conversion range:
Wherein B representes a gradient (gradient) of said predetermined straight line, and
And (x
c, y
c) be illustrated in the intersection point between said predetermined straight line and the said conversion range hue coordinate right.Here, said predetermined straight line can be represented by following formula y=Bx.If p
1X=0 and p
1Y ≠ 0, then
If p
1Y=0 and p
1X ≠ 0, then
The 3rd, weights W
mThrough using following formula (22) to calculate:
Wherein P representes the point at the current place of current pixel.
The 4th, hue coordinate x ' and the y ' of some P ' calculates through using following formula (23), and this P ' is a current pixel in its colour temperature by the point that will move to from a P after changing:
X wherein
tAnd y
tCorrespond respectively to object color component coordinate Cb
TuAnd Cr
Tu, in operating procedure S203, obtained.
In operating procedure S205, determine whether that all pixels of picture signal have all been carried out aforesaid operations, that is, operating procedure S200 is to S204.If all pixels of picture signal all are processed, then color conversion method is accomplished.Otherwise operating procedure S200 is repeated to carry out till all pixels of picture signal all have been processed to S204.
Fig. 5 is the block diagram according to the colour temperature conversion equipment 500 of another exemplary embodiment of the present invention.With reference to Fig. 5, colour temperature conversion equipment 500 comprises confirms unit 510, first look-up table 520, second look-up table 550 and color coordinate conversion unit 560.Colour temperature conversion equipment 500 is different from the colour temperature conversion equipment of Fig. 1, has no computing unit.Like this, colour temperature conversion equipment 500 has each data that need be stored in first and second look-up tables 520 and 550 rather than as colour temperature conversion equipment 100, obtains said data through calculating.
Confirm that unit 510 receives a set confirming variable from the conversion range of first look-up table 520.
One of set that a plurality of pixel intensity of first look-up table 520 storage and conversion range are separately confirmed the set of variable and will be confirmed variable corresponding to the conversion range of the brightness of current pixel is provided to definite unit 510.An example of first look-up table 520 is illustrated by following table 3.
Table 3
Index |
Brightness |
Conversion range is confirmed variable |
1 |
Y
1 |
m
1?1,m
1?2,f
1,g
1 |
2 |
Y
2 |
M
2?1,m
2?2,f
2,g
2 |
3 |
Y
3 |
M
3?1,m
3?2,f
3,g
3 |
4 |
Y
4 |
M
4?1,m
4?2,f
4,g
4 |
... |
... |
... |
N-1 |
Y
N-1 |
M
N-1?1,m
N-1?2,f
N-1,g
N-1 |
N |
Y
N |
M
N?1,m
N?2,f
N,g
N |
Because first look-up table 520 can not be stored each the set that all possible pixel intensity and conversion range are confirmed variable; So it can be searched for from a plurality of pixel intensity and immediate one of the brightness of current pixel; Then; Brightness with current pixel matches if be stored in a plurality of pixel intensity in the middle of first look-up table 520 not, then can send corresponding to the conversion range of the said pixel intensity that searches out and confirm that in the set of variable one is to confirming unit 510.
Color coordinate conversion unit 560 is the receiving target hue coordinate from second look-up table 550; Then through on the direction identical, moving the colour temperature of changing the input pixel with the proportional amount of said reference point displacement with the datum mark of the conversion range point indicated to the object color component coordinate, identical among this process and Fig. 1 and 2.
In brief; Colour temperature conversion equipment 500 obtains conversion range and confirms variable and object color component coordinate from first and second look-up tables 520 and 550, and colour temperature conversion equipment among Fig. 1 100 oneself calculates that said conversion range is confirmed variable and through using a plurality of sample hue coordinates to obtain the object color component coordinate via interpolation.Therefore, under the situation that colour temperature conversion equipment 100 is can be in the memory capacity of colorimetric temperature conversion device 500 littler and be implemented.Yet colour temperature conversion equipment 100 uses colorimetric temperature conversion device 500 more time to obtain the object color component coordinate, and this is because it must carry out a large amount of calculating.
Fig. 6 is the block diagram according to the colour temperature conversion equipment 600 of another exemplary embodiment of the present invention.With reference to Fig. 6, colour temperature conversion equipment 600 comprises: confirm unit 610, variable computing unit 620, first look-up table 630, hue coordinate computing unit 640, second look-up table 650, color coordinate conversion unit 660 and memory cell 670.
Colour temperature conversion equipment 600 comprises all elements of colour temperature conversion equipment 100 and comprises first look-up table 630.The hue coordinate computing unit 640 of Fig. 6 is also inequality with the operation that the hue coordinate computing unit of Fig. 1 140 is carried out.The example of first look-up table 630 has been shown in the following table 4.
Table 4
Index |
Brightness |
Colour temperature |
1 |
Y
1 |
T
1?t |
2 |
Y
2 |
T
2?t |
3 |
Y
3 |
T
3?t |
4 |
Y
4 |
T
4?t |
... |
... |
... |
N-1 |
Y
N-1 |
T
N-1?t |
N |
Y
N |
T
N t |
The operation of temperature conversion device 600 of will checking colors now is described in more detail.
At first, suppose that current pixel has a brightness Y, two sample brightness Y
lAnd Y
h, the inequality (24) below their relation satisfies, they are selected by in a plurality of sample brightness from be stored in first look-up table 630.
Y
l<Y≤Y
h ...(24)
Two sample brightness Y
lAnd Y
hIn each all have fixing value.If two sample brightness Y
lAnd Y
hAll be 8 bit data, they can have the value between 0 to 255 so.For example, first look-up table 630 can be stored the sample luminance signal that adds up to 16 and (that is, N=16), and between per two the continuous sample brightness in the middle of a plurality of sample brightness, can have a difference.If 16 sample luminance signals are 0,16,32,48,64,80 ..., 240 and the brightness signal Y of current pixel be 37, two selected sample brightness signal Y so
lAnd Y
hBe respectively 32 and 48.
The second, correspond respectively to two sample brightness Y
lAnd Y
hThe colour temperature T that sets of user
L_tAnd T
H_tFrom second look-up table 650, obtain.The colour temperature T that the user of inequality (25) sets below satisfying
L_tSample colour temperature T
L_lAnd T
L_hAnd the colour temperature T that the user of inequality (26) sets below satisfying
H_tSample colour temperature T
H_lAnd T
H_hFrom second look-up table 650, find.
T
L_l<T
L_t≤T
L_hBe used for Y
l... (25)
T
H_l<T
H_t≤T
H_hBe used for Y
h... (26)
The 3rd, obtain to correspond respectively to Y through using above-mentioned formula (13) to (16)
lAnd Y
L_tCombination and Y
hAnd Y
H_tTwo couples of sample hue coordinate (Cb of combination
Tu_l, Cr
Tu_l) and (Cb
Tu_h, Cr
Tu_h).
The the 4th and last, weights are through using brightness Y and two the sample brightness Y at current pixel
lAnd Y
hBetween difference obtain, shown in formula (17) and (18), the colour temperature T that sets corresponding to the brightness Y and the user of current pixel then
uThe object color component coordinate of combination to through using two couples of sample hue coordinate (Cb
Tu_l, Cr
Tu_l) and (Cb
Tu_h, Cr
Tu_h) and said weights obtain, shown in formula (19) and (20).
Colour temperature conversion equipment 600 obtains the colour temperature of user's setting rather than receives it from the outside from first look-up table 630.Therefore, colour temperature conversion equipment 600 can realize that the pixel of different brightness has different colour temperatures.In addition; Colour temperature conversion equipment 600 can be designed as and receives colour temperature that the user sets from the outside and then through utilizing the relation between the colour temperature that colour temperature that this user sets and other user set to make the pixel of different brightness have different colour temperatures, the colour temperature that said other user sets is stored in first look-up table 630 and corresponding to pixels with different brightness.
The figure of Fig. 7 motion that to be explanation input pixel fasten at hue coordinate; This motion is to use the motion (MMPE) that is called as a large amount of points in ellipse to carry out setting based on the user result of the colour temperature conversion of colour temperature; And Fig. 8 is the figure apart from the process of r between the borderline point of the explanation center R and the conversion range that obtain conversion range, from the center of conversion range through a some P
1(p
1X, p
1Y) a predetermined straight line that draws ends at the borderline point of conversion range.
The process of the hue coordinate of one P ' of acquisition on color coordinate system (x ', y ') will be described in more detail with reference to Fig. 8 now, and this point is that said input pixel will be by some P (x, the point that y) is sent to from its current place.
With reference to Fig. 8; All be present within the conversion range 700 if the datum mark R of said some P and conversion range 700 carries out the impact point R ' that will be sent to after the colour temperature conversion on the input pixel, the hue coordinate of the some P ' that calculation level P will automatically move to along with the datum mark R of conversion range 700 on said input pixel so is possible.
Through use following formula (27) obtain between datum mark R and the impact point R ' apart from s:
(P′P)=α(T′-R) ...(27)
Formula (27) can be rearranged in the following formula (28):
R=r wherein
1+ r
2=r
1+ || P-R||, correspondingly, some P ' can obtain through the formula (29) below using:
Shown in formula (29), P ' is confirmed by R, R ', P and r.Therefore, calculate r in order to calculate P ' needs.If conversion range 700 circulates, the radius with conversion range 700 is identical all the time for r so, and the calculating of P ' is more prone to.
With reference to Fig. 8; The center of conversion range 800 is moved to the initial point of hue coordinate system (810); Conversion range 800 is oval and tilts with predetermined angle θ, makes the major axis of conversion range 800 and minor axis can be parallel to X and Y axle respectively, then at the center and the intersection point (x of conversion range 800
c, y
c) between calculated (820) apart from r, said intersection point (x
c, y
c) between the border and straight line 821 of said conversion range.Straight line 821 passes the center of conversion range 800 and the some P that obtains with angle θ rotation P
1
Conversion range 800 can be by following formulate: fx
2+ gy
2=1 wherein
With
Can obtain through the formula (30) below using apart from r:
As stated, possibly realize any colour temperature of brightness of each pixel of the needed image of user through the color distortion of minimizing image.
Though at length illustrate and described the present invention with reference to example embodiment of the present invention; But skilled person will appreciate that; Under the situation that does not break away from the spirit and scope of the present invention; Can be made in form and the various variations on the details claims definition that the spirit and scope of the present invention are liked enclosed to it.