CN104581102A - Color converting method and color converting system - Google Patents

Color converting method and color converting system Download PDF

Info

Publication number
CN104581102A
CN104581102A CN201310468854.8A CN201310468854A CN104581102A CN 104581102 A CN104581102 A CN 104581102A CN 201310468854 A CN201310468854 A CN 201310468854A CN 104581102 A CN104581102 A CN 104581102A
Authority
CN
China
Prior art keywords
color
source
values
color information
maximum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310468854.8A
Other languages
Chinese (zh)
Inventor
王健钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Novatek Microelectronics Corp
Original Assignee
Novatek Microelectronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Novatek Microelectronics Corp filed Critical Novatek Microelectronics Corp
Priority to CN201310468854.8A priority Critical patent/CN104581102A/en
Publication of CN104581102A publication Critical patent/CN104581102A/en
Pending legal-status Critical Current

Links

Abstract

The present invention discloses a color converting method and a color converting system, and is used to convert multiple source messages in a source color space to multiple target messages in a target color space. The color converting method comprises obtaining a first color value and multiple second color values of a pixel point; calculating at least a converting coefficient, the multiple second color value, and multiple maximum values and multiple minimum values corresponding to the multiple target messages, to obtain a source maximum value and a source minimum value; according to the first color value, the source maximum value and the source minimum value, generating an adjusting value; and according to the at least a converting coefficient, the adjusting value and the multiple second color values, calculating to obtain the multiple target color values of the pixel point.

Description

Color conversion method and hue conversion system
Technical field
The present invention relates to a kind of color conversion method and hue conversion system, particularly relate to a kind of avoid the color-values after changing to exceed the color space institute range of definition after conversion color conversion method and hue conversion system.
Background technology
In general, the definition of color space describes color to be used for, such as, in the rgb color space formed at red (R), green (G) and blueness (B) three kinds of different colours, can describe color for a spatial coordinate position in the solid space that is made up of R, G, B reference axis, be R, G, B color-values corresponding to R, G, B color information by color representation.In addition, conveniently pack processing is containing the multiple kenel data of color information, and industry also makes many different color spaces accordingly, and that is wherein comparatively widely known by the people has YCbCr color space, YIQ color space or YUV color space etc.
In addition, for image processing, what focus on due to image processing major part is the calculation process of brightness and chroma composition in image data, and Y color information is the luminance components of color in YCbCr color space, Cb and Cr color information is then for color is relevant to blue and red chroma composition, therefore YCbCr color space usually can be utilized to describe the image data of image processing, color by pixel in image data utilizes and corresponds to Y, Cb, the Y of Cr color information, Cb, Cr color-values represents, follow-up luminance components (Y color-values) and the chroma composition (Cb of being relevant to is carried out to facilitate, Cr color-values) the calculation process such as adjustment and compression.And for image display; operation principles due to display screen demonstrates corresponding color by control R, G, B color information; therefore usually rgb color space can be utilized describe the display data for being presented at screen; the color being about to pixel in display data represents with R, G, B color-values corresponding to R, G, B color information, goes out corresponding color to facilitate screen display.
Whereby, produce Y, Cb, Cr color-values of pixel in image data institute after process computing of YCbCr color space, separately need be converted to R, G, B color-values of rgb color space further, just can become and show data and be sent to screen display.Wherein, the translation operation that YCbCr color space is converted to rgb color space is that computing is to obtain R, G, B color-values in rgb color space mutually by Y, Cb, Cr color-values in YCbCr color space and conversion coefficient (i.e. the coefficient of transition matrix), and the formula of translation operation is as follows:
Formula 1:I_R=(P0*I_Y)+(P1*I_Cb)+(P2*I_Cr)
Formula 2:I_G=(P3*I_Y)+(P4*I_Cb)+(P5*I_Cr)
Formula 3:I_B=(P6*I_Y)+(P7*I_Cb)+(P8*I_Cr)
Wherein, I_Y represents that Y color-values adds constant const_1, and I_Cb represents that Cb color-values adds constant const_2, and I_Cr is for representing that Cr color-values adds constant const_3; Constant const_1 ~ const_3 is fixed constant and the transformational relation in foundation different color space, have the fixed constant of corresponding different color information, and fixed constant can be positive number, negative or zero.P0 ~ P8 is the conversion coefficient of YCbCr color space to rgb color space, and the transformational relation similarly according to different color space also has different conversion coefficients accordingly.I_R, I_G, I_B are by being obtained R, G, B color-values after computing.
But, the maximum defined when R, G, B color-values in rgb color space be 255 and minimum value be 0, and the color-values that Y, Cb, Cr color-values of pixel obtains R, G, B after translation operation is when being greater than 255, just the scope that in rgb color space, color-values can represent can be exceeded, the color-values of R, G, B of producing automatically to change with limited to maximum that is 255, makes pixel can produce color in the color conversion of YCbCr color space to rgb color space and changes.If when the scope that R, G, B color-values defines is not 0 ~ 255, also have identical situation.Given this, the method for the scope that color space defines after being necessary to propose to avoid the color-values after changing to exceed conversion in fact.
Summary of the invention
Therefore, the invention provides a kind of color conversion method and hue conversion system, the scope that after it can avoid the color-values after changing to exceed conversion, color space defines.
The present invention discloses a kind of color conversion method, be used for carrying out a plurality of sources color information in source color space by one and be converted to a plurality of object color information in an object color space, described color conversion method comprises a pixel in acquisition one image in the described a plurality of sources color-values corresponding to described a plurality of sources color information in source color space, and wherein said a plurality of sources color-values comprises one first source color-values and a plurality of second source color-values; To at least one conversion coefficient, described a plurality of second source color-values, described object color space define a plurality of maximum of corresponding to described a plurality of object color information and a plurality of minimum value performs computing, to originate minimum value to obtain a source maximum and; According to described first source color-values, described source maximum and described source minimum value, produce a source adjusted value; And according to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform computing to obtain a plurality of object color-values that described pixel corresponds to described a plurality of object color information in described object color space.
The present invention discloses a kind of hue conversion system in addition, and be used for carrying out a plurality of sources color information in source color space by one and be converted to a plurality of object color information in an object color space, described hue conversion system comprises a processor; And a storage device, store a program code, described program code is used to refer to described processor and performs a color conversion method, described color conversion method comprises: obtain a pixel in an image in the described a plurality of sources color-values corresponding to described a plurality of sources color information in source color space, wherein said a plurality of sources color-values comprises one first source color-values and a plurality of second source color-values; To at least one conversion coefficient, described a plurality of second source color-values, described object color space define a plurality of maximum of corresponding to described a plurality of object color information and a plurality of minimum value performs computing, to originate minimum value to obtain a source maximum and; According to described first source color-values, described source maximum and described source minimum value, produce a source adjusted value; And according to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform computing to obtain a plurality of object color-values that described pixel corresponds to described a plurality of object color information in described object color space.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of embodiment of the present invention one hue conversion system.
Fig. 2 is the schematic diagram of embodiment of the present invention one color flow path switch.
Wherein, description of reference numerals is as follows:
10 hue conversion system
100 processors
102 storage devices
104 program codes
110,112 derived data, destination data
SRC pixel
DST pixel
20 flow processs
200 ~ 210 steps
Embodiment
Please refer to Fig. 1, Fig. 1 is the schematic diagram of embodiment of the present invention one hue conversion system 10.As shown in Figure 1, hue conversion system 10 comprises processor 100 and a storage device 102.Hue conversion system 10 is used in the electronic installations such as computer, TV, digital camera, display or display panel, is used for reading one derived data 110 to carry out color conversion, and produces a destination data 112.Derived data 110 and destination data 112 are the photo of static state or the image data such as picture frame of dynamic video signal, and the application of visible electronic device and changing according to this.Derived data 110 comprises pixel carrys out source color space color-values one.Destination data 112 comprises the color-values of pixel at an object color space.Coming source color space and object color space can as rgb color space, YCbCr color space, YIQ color space or YUV color space etc., not limited.A pixel SRC in derived data 110 can be converted to the color-values of a pixel DST corresponding in destination data 112 at object color space in the color-values carrying out source color space by hue conversion system 10.Meanwhile, hue conversion system 10 separately can carry out color conversion to other all pixel in derived data 110 more in order and produce other all pixel corresponding in destination data 112, and completes the color conversion of all pixels in derived data 110.
Specifically, processor 100 can utilize Application Specific Integrated Circuit (application-specificintegrated circuit, ASIC) to realize.Storage device 102 can be read-only internal memory (read-onlymemory, ROM), random access memory (random-access memory, RAM), compact disc read-only memory (CD-ROMs), tape (magnetic tapes), floppy disk (floppy disks), optical data storage device (optical data storage devices) etc., be not limited to this.Wherein, storage device 102 is used for store program code 104 with instruction processorunit 100 execution reading derived data 110 to carry out color conversion and to produce destination data 112.It should be noted that hue conversion system 10 separately also can be utilized Application Specific Integrated Circuit directly to realize or be realized by the combination of multiple circuit module, be not limited to this.
Specifically, hue conversion system 10 reads the color-values of pixel SRC in derived data 110 to carry out color conversion, and produce the flow process of the color-values of corresponding pixel DST in destination data 112, can be the schematic diagram of embodiment of the present invention one color flow path switch 20 with reference to figure 2, Fig. 2.In the present embodiment, color conversion flow process 20 can be compiled as program code 104 and be stored in storage device 102, performs and reads derived data 110 to carry out color conversion, and produce destination data 112 with control processor 100.As shown in Figure 2, color conversion flow process 20 comprises the following step:
Step 200: start;
Step 202: obtain pixel SRC in derived data 110 and carrying out to correspond in source color space a plurality of sources color-values of a plurality of sources color information, wherein a plurality of sources color-values comprises one first source color-values and a plurality of second source color-values;
Step 204: at least one conversion coefficient, a plurality of second source color-values, object color space define a plurality of maximum of corresponding to a plurality of object color information and a plurality of minimum value performs computing, to obtain source maximum and source minimum value;
Step 206: according to the first source color-values, source maximum and source minimum value, produce source adjusted value;
Step 208: according at least one conversion coefficient, source adjusted value and a plurality of second source color-values, performs computing to obtain a plurality of object color-values that pixel DST corresponding in destination data 112 corresponds to a plurality of object color information in object color space;
Step 210: terminate.
By the running of color conversion flow process 20 except pixel SRC being converted to corresponding pixel DST except a plurality of object color-values of object color space in a plurality of sources color-values carrying out source color space, other all pixel in derived data 110 also can be carried out color conversion in a plurality of sources color-values carrying out source color space and obtain a plurality of object color-values of other all pixel corresponding in destination data 112 at object color space by hue conversion system 10 in order again.
For ease of explanation, below, source color space is YCbCr color space and object color space is rgb color space is example, then in color conversion flow process 20, a plurality of sources color information is Y, Cb, Cr color information in YCbCr color space, and a plurality of object color information is R, G, B color information in rgb color space, and hypothesis performs at least one conversion coefficient needed for color conversion flow process 20 for YCbCr color space is converted to the coefficient changing FACTOR P 0 ~ P8(and transition matrix in the translation operation that rgb color space defines).In this case, suppose that the color-values that pixel SRC corresponds to Y, Cb, Cr color information in YCbCr color space (namely carrying out source color space) is S_Y, S_Cb, S_Cr, and the color-values that pixel DST corresponds to R, G, B color information in rgb color space (i.e. object color space) is D_R, D_G, D_B.Therefore, in step 202., hue conversion system 10 first reads color-values S_Y, S_Cb, the S_Cr of pixel SRC in derived data 110.Wherein the first source color-values is the color-values S_Y of pixel SRC, and a plurality of second source color-values is color-values S_Cb, the S_Cr of pixel SRC.
Then, suppose rgb color space define the color-values corresponding to R, G, B color information maximum be Max_R, Max_G, Max_B(such as 255,255,255), and minimum value is Min_R, Min_G, Min_B(such as 0,0,0), and YCbCr color space to be converted in the translation operation of rgb color space to define the fixed constant being relevant to Y, Cb, Cr color information be const_1 ~ const_3.Therefore, according to step 204, hue conversion system 10 by color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, pixel SRC, Color Maximum Value Max_R, Max_G, Max_B and color minimum M in_R, Min_G, Min_B, can substitute into following formula to obtain first to the 6th calculated value Val1 ~ Val6:
Formula 1:Val1=(Max_R-(P1*S1)-(P2*S2))/P0
Formula 2:Val2=(Max_G-(P4*S1)-(P5*S2))/P3
Formula 3:Val3=(Max_B-(P7*S1)-(P8*S2))/P6
Formula 4:Val4=(Min_R-(P1*S1)-(P2*S2))/P0
Formula 5:Val5=(Min_G-(P4*S1)-(P5*S2))/P3
Formula 6:Val6=(Min_B-(P7*S1)-(P8*S2))/P6
Wherein, S1 is that the color-values S_Cb of pixel SRC adds constant const_2, and S2 is that the color-values S_Cr of pixel SRC adds constant const_3.
Further, hue conversion system 10 can compare the first calculated value Val1, the second calculated value Val2 and the 3rd calculated value Val3, and to obtain the minimum value in three values, and the value obtained deducts constant const_1 is again source maximum.Similarly, compare the 4th calculated value Val4, the 5th calculated value Val5 and the 6th calculated value Val6, to obtain the maximum in three values, the value obtained deducts constant const_1 again and is source minimum value.
In step 206, hue conversion system 10, when the color-values S_Y of pixel SRC is greater than source maximum, produces source adjusted value for source maximum; When the color-values S_Y of pixel SRC is less than source minimum value, produce source adjusted value for source minimum value; And when the color-values S_Y size of pixel SRC is in time originating between maximum and source minimum value, produce the color-values S_Y that source adjusted value is pixel SRC.
Finally, in a step 208, hue conversion system 10, by color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, source adjusted value and pixel SRC, substitutes into following formula to obtain color-values D_R, D_G, D_B of pixel DST:
Formula 7:D_R=(P0*S0)+(P1*S1)+(P2*S2)
Formula 8:D_G=(P3*S0)+(P4*S1)+(P5*S2)
Formula 9:D_B=(P6*S0)+(P7*S1)+(P8*S2)
Wherein, S0 is that source adjusted value adds constant const_1, and S1 is that the color-values S_Cb of pixel SRC adds constant const_2, and S2 is that the color-values S_Cr of pixel SRC adds constant const_3.
Thus, hue conversion system 10 can avoid when the color-values S_Y of pixel SRC, S_Cb, S_Cr make to change because of excessive or too small calculate after (i.e. formula 1 ~ 3) produce the color-values D_R of pixel DST, D_G, D_B exceed the scope that rgb color space defines, and produce color change.Whereby, the hue conversion system 10 Color Maximum Value Max_R that foundation rgb color space defines in color conversion flow process 20, Max_G, Max_B and color minimum M in_R, Min_G, Min_B, and utilize the color-values S_Cb of pixel SRC, under the fixed condition of S_Cr, via the anti-scope (between maximum of namely originating and source minimum value) extrapolating the required restriction of color-values S_Y of conversion computing formula (i.e. formula 1 ~ 3), and then perform translation operation again to obtain the color-values D_R of corresponding pixel DST after the color-values S_Y first adjusting pixel SRC, D_G, D_B.Because Y color information in YCbCr color space is the luminance components of color, therefore adjusting color-values S_Y that pixel SRC corresponds to Y color information only can affect the luminance components of pixel SRC and can not change the chroma composition of pixel SRC.In this case, guarantee to change the color-values D_R of rear pixel DST by the color-values S_Y of adjustment pixel SRC, D_G, D_B can not exceed the scope that rgb color space defines, and also can avoid pixel SRC after color conversion, produce color changing simultaneously.
On the other hand, hue conversion system 10 can be used in the related electronic devices such as computer, TV or digital camera, and according to the difference of electronic installation kind or the difference of translation data kenel, has corresponding different conversion coefficient.In one embodiment, when hue conversion system 10 with to perform source color space be in computer systems, which YCbCr color space and object color space be the color conversion of rgb color space time, corresponding conversion coefficient P0 ~ P8 is respectively 1.164,0,1.596,1.164 ,-0.391 ,-0.813,1.164,2.018 and 0.When the color-values S_Y of pixel SRC, S_Cb, S_Cr are respectively 136,96 and 222, and constant const_1, const_2, const_3 are when being respectively-16 ,-128 and-128, according to the conversion formula 1 of translation operation, and the value rounding-off method after decimal point carrys out carry, the color-values D_R that can obtain conversion pixel DST is:
D_R=((136-16)*1.164)+((96-128)*0)+((222-128)*1.596)=290。
In this case, because the color-values D_R of pixel DST has been greater than Color Maximum Value Max_R(that rgb color space defines that is 255 for 290) make color-values D_R limitedly can produce color to 255 to change, therefore, first color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, pixel SRC, Color Maximum Value Max_R, Max_G, Max_B and color minimum M in_R, Min_G, Min_B are substituted into formula 1 ~ 6 to obtain first to the 6th calculated value Val1 ~ Val6 by color conversion flow process 20, are respectively as follows:
Val1=(255-((96-128)*0)-((222-128)*1.596))/1.164=90;
Val2=(255-((96-128)*(-0.391))-((222-128)*(-0.813)))/1.164=274;
Val3=(255-((96-128)*2.018)-((222-128)*0))/1.164=275;
Val4=(0-((96-128)*0)-((222-128)*1.596))/1.164=-128;
Val5=(0-((96-128)*(-0.391))-((222-128)*(-0.813)))/1.164=55;
Val6=(0-((96-128)*2.018)-((222-128)*0))/1.164=55。
Then, compare, be 90 with the minimum value obtained in three values to the first calculated value Val1, the second calculated value Val2 and the 3rd calculated value Val3, the value obtained deducts constant const_1(value again for-16) after can to obtain source maximum be 106.Compare the 4th calculated value Val4, the 5th calculated value Val5 and the 6th calculated value Val6, be 55 with the maximum obtained in three values, the value obtained deducts constant const_1(value again for-16) after can to obtain source minimum value be 71.Color-values S_Y due to pixel SRC 136 is greater than 106, therefore produces source adjusted value for source maximum and is 106.
Finally, by color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, source adjusted value and pixel SRC, substitute into formula 7 ~ 9 to obtain color-values D_R, D_G, D_B of pixel DST:
D_R=(1.164*(106-16))+(0*(96-128))+(1.596*(222-128))=255;
D_G=(1.164*(106-16))+((-0.391)*(96-128))+((-0.813)*(222-128))=41;
D_B=(1.164*(106-16))+(2.018*(96-128))+(0*(222-128))=40。
Thus, in this embodiment, due to the color-values S_Y of pixel SRC, S_Cb, S_Cr is respectively 136, 96, 222 the color-values D_R changing rear produced pixel DST can be made to overrun and limited produce to Color Maximum Value Max_R color change, therefore hue conversion system 10 is first according to the Color Maximum Value Max_R that rgb color space defines, Max_G, Max_B and color minimum M in_R, Min_G, Min_B, and utilize the color-values S_Cb of pixel SRC, under the fixed condition of S_Cr, after calculating source maximum and source minimum value, adjust the color-values S_Y of pixel SRC again with between source maximum and source minimum value.Whereby, under only adjusting pixel SRC and corresponding to the color-values S_Y of Y color information (luminance components), hue conversion system 10 changes that institute obtains the color-values D_R of pixel DST, D_G, D_B are respectively 255,41,40, and it can not exceed scope that rgb color space defines and makes the chroma composition variations of pixel SRC after avoiding changing simultaneously and produce color change.
In addition, in another embodiment, hue conversion system 10 can be used on the color conversion performing in the TV with high image quality ability to play and be relevant to high image quality image data, when come source color space be YCbCr color space to be converted to object color space be rgb color space time, corresponding conversion coefficient P0 ~ P8 is respectively 1.164,0,1.793,1.164 ,-0.534,0.213,1.164,2.115 and 0.Similarly, when the color-values S_Y of pixel SRC, S_Cb, S_Cr are respectively 136,96 and 222, first color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, pixel SRC, Color Maximum Value Max_R, Max_G, Max_B and color minimum M in_R, Min_G, Min_B are substituted into formula 1 ~ 6 to obtain first to the 6th calculated value Val1 ~ Val6 by color conversion flow process 20, are respectively as follows:
Val1=(255-((96-128)*0)-((222-128)*1.793))/1.164=74;
Val2=(255-((96-128)*(-0.534))-((222-128)*0.213))/1.164=187;
Val3=(255-((96-128)*2.115)-((222-128)*0))/1.164=277;
Val4=(0-((96-128)*0)-((222-128)*1.793))/1.164=-144;
Val5=(0-((96-128)*(-0.534))-((222-128)*0.213))/1.164=-31;
Val6=(0-((96-128)*2.115)-((222-128)*0))/1.164=58。
Then, compare, be 74 with the minimum value obtained in three values to the first calculated value Val1, the second calculated value Val2 and the 3rd calculated value Val3, the value obtained deducts constant const_1(value again for-16) after can to obtain source maximum be 90.Compare the 4th calculated value Val4, the 5th calculated value Val5 and the 6th calculated value Val6, be 58 with the maximum obtained in three values, the value obtained deducts constant const_1(value again for-16) after can to obtain source minimum value be 74.And 136 be greater than 90 due to the color-values S_Y of pixel SRC, therefore produce source adjusted value for source maximum and be 90.
Finally, by color-values S_Cb, the S_Cr of conversion coefficient P0 ~ P8, source adjusted value and pixel SRC, substitute into formula 7 ~ 9 to obtain color-values D_R, D_G, D_B of pixel DST:
D_R=(1.164*(90-16))+(0*(96-128))+(1.793*(222-128))=255;
D_G=(1.164*(90-16))+((-0.534)*(96-128))+(0.213*(222-128))=123;
D_B=(1.164*(90-16))+(2.115*(96-128))+(0*(222-128))=18。
Thus, in this embodiment, because hue conversion system 10 is used in TV to carry out the color conversion of high image quality image data, therefore after hue conversion system 10 need first calculate source maximum and source minimum value according to defined conversion coefficient, then the color-values S_Y adjusting pixel SRC is with between source maximum and source minimum value.Whereby, hue conversion system corresponds to the color-values S_Y of Y color information (luminance components) via adjustment pixel SRC, and to guarantee to change the color-values D_R of institute acquisitions pixel DST, D_G, D_B can not exceed scope that rgb color space defines and make the chroma composition variations of pixel SRC after can avoiding changing and produce color change.
Specifically, when origin source color space of the present invention performs color conversion to object color space, first according to object color space define maximum and the minimum value of color-values, obtain in advance in object color space for the maximum of the required restriction of the color information of adjustment and minimum value, and the scope that the color-values adjusting this color information according to this defines to avoid the color-values after color conversion to exceed object color space, those skilled in the art is when carrying out according to this modifying or changing.For example, in the present embodiment, since source color space be YCbCr color space, object color space is that rgb color space is to illustrate the running of hue conversion system 10.But in other embodiments, also YUV color space is converted to rgb color space by hue conversion system 10, YIQ color space is converted to rgb color space or rgb color space is converted to YCbCr color space etc., not limited when changing according to this.
Moreover, in the present embodiment, because Y color information in YCbCr color space is the luminance components of color, therefore by the scope that the color-values of adjustment Y color information can make R, G, B color-values after color conversion can not exceed rgb color space to make the chroma not change of color to define simultaneously, and color can not be produced after guaranteeing conversion change.But in other embodiments, also the demand of other application visual adjusts any one color information in source color space, the scope that after can not exceeding conversion to make the color-values after color conversion, color space defines, as when being converted to YCbCr color space by rgb color space, the scope that the color-values that also only can adjust R color information can not define more than YCbCr color space to make the color-values after conversion.The color-values of a color information in color space before all adjustment conversions, with the application making the color-values after conversion can not exceed the color space institute range of definition after conversion, it is all applicable to the present invention, can change according to this and not limited.
In sum, prior art directly by the color-values of pixel perform translation operation, when the color-values obtained after computing be greater than conversion after color space define maximum time, color-values can automatically change and limited produce to maximum color change.In comparison, the scope of the required restriction of the color-values of any one color information in color space before the present invention first calculates conversion also adjusts the color-values of this color information according to this, the scope that after can not exceeding conversion with the color-values produced after making color conversion, color space defines.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1. a color conversion method, be used for carrying out a plurality of sources color information in source color space by one and be converted to a plurality of object color information in an object color space, described color conversion method comprises:
Obtain a pixel in an image in the described a plurality of sources color-values corresponding to described a plurality of sources color information in source color space, wherein said a plurality of sources color-values comprises one first source color-values and a plurality of second source color-values;
To at least one conversion coefficient, described a plurality of second source color-values, described object color space define a plurality of maximum of corresponding to described a plurality of object color information and a plurality of minimum value performs computing, to originate minimum value to obtain a source maximum and;
According to described first source color-values, described source maximum and described source minimum value, produce a source adjusted value; And
According to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform computing to obtain a plurality of object color-values that described pixel corresponds to described a plurality of object color information in described object color space.
2. color conversion method as claimed in claim 1, it is characterized in that, described a plurality of sources color information comprises one first to the 3rd source color information, described a plurality of object color information comprises one first to the 3rd object color information, described at least one conversion coefficient comprises one first to the 9th conversion coefficient, described object color space define the described a plurality of maximum corresponding to described a plurality of object color information and comprise one first to the 3rd object maximum; Described object color space define the described a plurality of minimum value corresponding to described a plurality of object color information and comprise one first to the 3rd object minimum value, described first source color-values is the color-values that described pixel corresponds to described first source color information, and described a plurality of second source color-values comprises described pixel and corresponds to the originate second source color-values and the 3rd of color information of described second source color information and the described 3rd and to originate color-values.
3. color conversion method as claimed in claim 2, it is characterized in that, described come source color space be a YCbCr color space and the described first to the 3rd source color information is respectively a Y color information, a Cb color information and a Cr color information, and described object color space is a rgb color space and the described first to the 3rd object color information is a R color information, a G color information and a B color information.
4. color conversion method as claimed in claim 3, it is characterized in that, described first source color-values, described second source color-values and the described 3rd originate color-values for corresponding to the color-values of described Y color information, described Cb color information and described Cr color information in YCbCr color space described in described pixel place respectively.
5. color conversion method as claimed in claim 3, it is characterized in that, described first to the 3rd object maximum by described rgb color space definition correspond to the maximum of the maximum of described R color information, the maximum of described G color information and described B color information, and be respectively 255,255,255, and described first to the 3rd object minimum value by described rgb color space definition correspond to the minimum value of the minimum value of described R color information, the minimum value of described G color information and described B color information, and be respectively 0,0,0.
6. color conversion method as claimed in claim 2, it is characterized in that, to described at least one conversion coefficient, described a plurality of second source color-values, described object color space define described a plurality of object maximum of corresponding to described a plurality of object color information and described a plurality of object minimum value performs computing, to obtain the step of described source maximum and described source minimum value, comprise:
Perform (Max_0-(P1*S1)-(P2*S2))/P0, to obtain one first calculated value;
Perform (Max_1-(P4*S1)-(P5*S2))/P3, to obtain one second calculated value;
Perform (Max_2-(P7*S1)-(P8*S2))/P6, to obtain one the 3rd calculated value;
Perform (Min_0-(P1*S1)-(P2*S2))/P0, to obtain one the 4th calculated value;
Perform (Min_1-(P4*S1)-(P5*S2))/P3, to obtain one the 5th calculated value;
Perform (Min_2-(P7*S1)-(P8*S2))/P6, to obtain one the 6th calculated value;
Described first calculated value, described second calculated value and described 3rd calculated value are compared, described source maximum are described first calculated value to obtain, described second calculated value and described 3rd calculated value minimum value wherein deduct one first constant; And
Described 4th calculated value, described 5th calculated value and described 6th calculated value are compared, described source minimum value are described 4th calculated value to obtain, described 5th calculated value and described 6th calculated value maximum wherein deduct described first constant;
Wherein, P0, P1, P2, P3, P4, P5, P6, P7, P8 represent the described first to the 9th conversion coefficient;
Wherein, S1, S2 are that described second source color-values and the described 3rd color-values of originating adds one second constant and a three constant respectively;
Wherein, Max_0, Max_1, Max_2 represent the described first to the 3rd object maximum;
Wherein, Min_0, Min_1, Min_2 represent the described first to the 3rd object minimum value.
7. color conversion method as claimed in claim 2, it is characterized in that, according to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform color conversion computing to obtain in object color space described in described pixel place the step of a plurality of object color-values corresponding to described a plurality of object color information, comprise:
Perform (P0*S0)+(P1*S1)+(P2*S2), to obtain one first object color-values of described a plurality of object color-values;
Perform (P3*S0)+(P4*S1)+(P5*S2), to obtain one second object color-values of described a plurality of object color-values; And
Perform (P6*S0)+(P7*S1)+(P8*S2), to obtain one the 3rd object color-values of described a plurality of object color-values;
Wherein, P0, P1, P2, P3, P4, P5, P6, P7, P8 represent the described first to the 9th conversion coefficient;
Wherein, S0 is that described source adjusted value adds one first constant;
Wherein, S1, S2 are that described second source color-values and the described 3rd color-values of originating adds one second constant and a three constant respectively.
8. color conversion method as claimed in claim 1, is characterized in that, according to described first source color-values, described source maximum and described source minimum value, produces the step of described source adjusted value, comprises:
When described first source color-values is greater than described source maximum, producing described source adjusted value is described source maximum; Or
When described first source color-values is less than described source minimum value, producing described source adjusted value is described source minimum value; Or
When described first source color-values non-be greater than described source maximum and non-be less than described source minimum value time, produce described source adjusted value be described first source color-values.
9. a hue conversion system, be used for carrying out a plurality of sources color information in source color space by one and be converted to a plurality of object color information in an object color space, described hue conversion system comprises:
One processor; And
One storage device, stores a program code, and described program code is used to refer to described processor and performs a color conversion method, and described color conversion method comprises:
Obtain a pixel in an image in the described a plurality of sources color-values corresponding to described a plurality of sources color information in source color space, wherein said a plurality of sources color-values comprises one first source color-values and a plurality of second source color-values;
To at least one conversion coefficient, described a plurality of second source color-values, described object color space define a plurality of maximum of corresponding to described a plurality of object color information and a plurality of minimum value performs computing, to originate minimum value to obtain a source maximum and;
According to described first source color-values, described source maximum and described source minimum value, produce a source adjusted value; And
According to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform computing to obtain a plurality of object color-values that described pixel corresponds to described a plurality of object color information in described object color space.
10. hue conversion system as claimed in claim 9, it is characterized in that, described a plurality of sources color information comprises one first to the 3rd source color information, described a plurality of object color information comprises one first to the 3rd object color information, described at least one conversion coefficient comprises one first to the 9th conversion coefficient, described object color space define the described a plurality of maximum corresponding to described a plurality of object color information and comprise one first to the 3rd object maximum; Described object color space define the described a plurality of minimum value corresponding to described a plurality of object color information and comprise one first to the 3rd object minimum value, described first source color-values is the color-values that described pixel corresponds to described first source color information, and described a plurality of second source color-values comprises described pixel and corresponds to the originate second source color-values and the 3rd of color information of described second source color information and the described 3rd and to originate color-values.
11. hue conversion system as claimed in claim 10, it is characterized in that, described come source color space be a YCbCr color space and the described first to the 3rd source color information is respectively a Y color information, a Cb color information and a Cr color information, and described object color space is a rgb color space and the described first to the 3rd object color information is a R color information, a G color information and a B color information.
12. hue conversion system as claimed in claim 11, it is characterized in that, described first source color-values, described second source color-values and the described 3rd originate color-values for corresponding to the color-values of described Y color information, described Cb color information and described Cr color information in YCbCr color space described in described pixel place respectively.
13. hue conversion system as claimed in claim 11, it is characterized in that, described first to the 3rd object maximum by described rgb color space definition correspond to the maximum of the maximum of described R color information, the maximum of described G color information and described B color information, and be respectively 255,255,255, and described first to the 3rd object minimum value by described rgb color space definition correspond to the minimum value of the minimum value of described R color information, the minimum value of described G color information and described B color information, and be respectively 0,0,0.
14. hue conversion system as claimed in claim 10, it is characterized in that, to described at least one conversion coefficient, described a plurality of second source color-values, described object color space define described a plurality of object maximum of corresponding to described a plurality of object color information and described a plurality of object minimum value performs computing, to obtain the step of described source maximum and described source minimum value, comprise:
Perform (Max_0-(P1*S1)-(P2*S2))/P0, to obtain one first calculated value;
Perform (Max_1-(P4*S1)-(P5*S2))/P3, to obtain one second calculated value;
Perform (Max_2-(P7*S1)-(P8*S2))/P6, to obtain one the 3rd calculated value;
Perform (Min_0-(P1*S1)-(P2*S2))/P0, to obtain one the 4th calculated value;
Perform (Min_1-(P4*S1)-(P5*S2))/P3, to obtain one the 5th calculated value;
Perform (Min_2-(P7*S1)-(P8*S2))/P6, to obtain one the 6th calculated value;
Described first calculated value, described second calculated value and described 3rd calculated value are compared, described source maximum are described first calculated value to obtain, described second calculated value and described 3rd calculated value minimum value wherein deduct one first constant; And
Described 4th calculated value, described 5th calculated value and described 6th calculated value are compared, described source minimum value are described 4th calculated value to obtain, described 5th calculated value and described 6th calculated value maximum wherein deduct described first constant;
Wherein, P0, P1, P2, P3, P4, P5, P6, P7, P8 represent the described first to the 9th conversion coefficient;
Wherein, S1, S2 are that described second source color-values and the described 3rd color-values of originating adds one second constant and a three constant respectively;
Wherein, Max_0, Max_1, Max_2 represent the described first to the 3rd object maximum;
Wherein, Min_0, Min_1, Min_2 represent the described first to the 3rd object minimum value.
15. hue conversion system as claimed in claim 10, it is characterized in that, according to described at least one conversion coefficient, described source adjusted value and described a plurality of second source color-values, perform color conversion computing to obtain in object color space described in described pixel place the step of a plurality of object color-values corresponding to described a plurality of object color information, comprise:
Perform (P0*S0)+(P1*S1)+(P2*S2), to obtain one first object color-values of described a plurality of object color-values;
Perform (P3*S0)+(P4*S1)+(P5*S2), to obtain one second object color-values of described a plurality of object color-values; And
Perform (P6*S0)+(P7*S1)+(P8*S2), to obtain one the 3rd object color-values of described a plurality of object color-values;
Wherein, P0, P1, P2, P3, P4, P5, P6, P7, P8 represent the described first to the 9th conversion coefficient;
Wherein, S0 is that described source adjusted value adds one first constant;
Wherein, S1, S2 are that described second source color-values and the described 3rd color-values of originating adds one second constant and a three constant respectively.
16. hue conversion system as claimed in claim 9, is characterized in that, according to described first source color-values, described source maximum and described source minimum value, produce the step of described source adjusted value, comprise:
When described first source color-values is greater than described source maximum, producing described source adjusted value is described source maximum; Or
When described first source color-values is less than described source minimum value, producing described source adjusted value is described source minimum value; Or
When described first source color-values non-be greater than described source maximum and non-be less than described source minimum value time, produce described source adjusted value be described first source color-values.
CN201310468854.8A 2013-10-09 2013-10-09 Color converting method and color converting system Pending CN104581102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310468854.8A CN104581102A (en) 2013-10-09 2013-10-09 Color converting method and color converting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310468854.8A CN104581102A (en) 2013-10-09 2013-10-09 Color converting method and color converting system

Publications (1)

Publication Number Publication Date
CN104581102A true CN104581102A (en) 2015-04-29

Family

ID=53096178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310468854.8A Pending CN104581102A (en) 2013-10-09 2013-10-09 Color converting method and color converting system

Country Status (1)

Country Link
CN (1) CN104581102A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060176313A1 (en) * 2005-02-10 2006-08-10 Samsung Electronics Co., Ltd. Luminance preserving color conversion from YUV to RGB
CN101292534A (en) * 2005-10-18 2008-10-22 Nxp股份有限公司 Methods of storing colour pixel data and driving a display, means for performing such methods, and display apparatus using the same
CN101562684A (en) * 2008-04-17 2009-10-21 凌阳科技股份有限公司 Adaptive color space switching system and method
CN101873502A (en) * 2009-04-24 2010-10-27 晨星软件研发(深圳)有限公司 Color space converting circuit and method thereof
CN102750116A (en) * 2011-11-21 2012-10-24 新奥特(北京)视频技术有限公司 Method for processing over-range signal of luma and chroma (YUV) color space
CN103096092A (en) * 2013-02-07 2013-05-08 上海国茂数字技术有限公司 Method and system of conducting coding and decoding error correction based on color space transformation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060176313A1 (en) * 2005-02-10 2006-08-10 Samsung Electronics Co., Ltd. Luminance preserving color conversion from YUV to RGB
CN101292534A (en) * 2005-10-18 2008-10-22 Nxp股份有限公司 Methods of storing colour pixel data and driving a display, means for performing such methods, and display apparatus using the same
CN101562684A (en) * 2008-04-17 2009-10-21 凌阳科技股份有限公司 Adaptive color space switching system and method
CN101873502A (en) * 2009-04-24 2010-10-27 晨星软件研发(深圳)有限公司 Color space converting circuit and method thereof
CN102750116A (en) * 2011-11-21 2012-10-24 新奥特(北京)视频技术有限公司 Method for processing over-range signal of luma and chroma (YUV) color space
CN103096092A (en) * 2013-02-07 2013-05-08 上海国茂数字技术有限公司 Method and system of conducting coding and decoding error correction based on color space transformation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
穆荣等: "可配置精度的YCbCr到RGB解码器", 《现代电子技术》 *

Similar Documents

Publication Publication Date Title
US10896634B2 (en) Image signal processing apparatus and control method therefor
EP3595322B1 (en) Display method and display device
KR100843089B1 (en) Apparatus and method for improving visibility for images
KR101927968B1 (en) METHOD AND DEVICE FOR DISPLAYING IMAGE BASED ON METADATA, AND RECORDING MEDIUM THEREFOR
CN115242992B (en) Video processing method, device, electronic equipment and storage medium
CN111161188B (en) Method for reducing image color noise, computer device and readable storage medium
US20180352263A1 (en) Method and device for processing color image data representing colors of a color gamut
US20070216812A1 (en) Color correction method, color correction device, and color correction program
CN111970432A (en) Image processing method and image processing device
CN103731608A (en) Character superimposition display method capable of supporting multiple colors and automatic color inverting
US11348553B2 (en) Color gamut mapping in the CIE 1931 color space
JP7266179B2 (en) Image processing device and imaging device
CN104539922A (en) Processing method and device for projection fusion dark field
WO2023016040A1 (en) Video processing method and apparatus, electronic device, and storage medium
EP4287604A1 (en) Video processing method and apparatus, electronic device, and storage medium
US8929652B2 (en) Method and apparatus for processing image
CN104581102A (en) Color converting method and color converting system
US8284316B2 (en) Real-time image processing circuit capable of enhancing brightness contrast and color saturation
CN113473101B (en) Color correction method, device, electronic equipment and storage medium
US8922835B1 (en) Color conversion method and color conversion system
CN108711176B (en) Method and device for determining gain value of panoramic fisheye camera and adjusting imaging color, terminal and fisheye camera
CN113012051A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US20190028639A1 (en) Image processing apparatus and image processing method
CN109151416A (en) The multi-functional fusion processing system of laser projection and method
WO2023035943A1 (en) Color card generating method, image processing method, and apparatuses, and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150429