CN105141934B - Method and device for analog-to-digital signal compensation - Google Patents
Method and device for analog-to-digital signal compensation Download PDFInfo
- Publication number
- CN105141934B CN105141934B CN201510623623.9A CN201510623623A CN105141934B CN 105141934 B CN105141934 B CN 105141934B CN 201510623623 A CN201510623623 A CN 201510623623A CN 105141934 B CN105141934 B CN 105141934B
- Authority
- CN
- China
- Prior art keywords
- gain value
- primary color
- color gain
- red
- value
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000001514 detection method Methods 0.000 claims description 11
- 239000003086 colorant Substances 0.000 claims description 5
- 238000005265 energy consumption Methods 0.000 abstract description 7
- 230000007423 decrease Effects 0.000 description 6
- 230000003247 decreasing effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
本发明公开了一种模数信号补偿的方法和装置,该方法包括:在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数;判断白平衡参数中的绿基色增益值是否小于第一信号源对应的第一阈值;当绿基色增益值小于第一阈值时,将绿基色增益值增大至第一阈值得第一红基色增益值,并将白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍得第一红基色增益值和第一蓝基色增益值,该第一数值为第一阈值与绿基色增益值的比值;将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值设置为终端第二信号源的白平衡参数。本发明不需要工厂对终端所有信号源进行费时、效率低的白平衡调整过程,也保证了终端能够顺利通过能耗测试。
The invention discloses a method and device for analog-to-digital signal compensation. The method includes: after the terminal adjusts the white balance of the first signal source, obtaining the white balance parameter of the first signal source of the terminal; judging the white balance parameter of the white balance parameter Whether the green primary color gain value is less than the first threshold value corresponding to the first signal source; when the green primary color gain value is less than the first threshold value, increase the green primary color gain value to the first threshold value and the first red primary color gain value, and set the white balance The red primary color gain value and the blue primary color gain value of the parameter are multiplied by the first value to obtain the first red primary color gain value and the first blue primary color gain value, and the first value is the ratio of the first threshold value to the green primary color gain value; A green primary color gain value, a first red primary color gain value and a first blue primary color gain value are set as white balance parameters of the second signal source of the terminal. The present invention does not require a factory to perform a time-consuming and inefficient white balance adjustment process on all signal sources of the terminal, and also ensures that the terminal can pass the energy consumption test smoothly.
Description
技术领域technical field
本发明涉及图像显示技术领域,尤其涉及一种模数信号补偿的方法及装置。The invention relates to the technical field of image display, in particular to a method and device for analog-to-digital signal compensation.
背景技术Background technique
白平衡是随着电子影像再现色彩真实而产生的,通过白平衡调节可以解决色彩还原和色调处理的一系列问题。由于不同终端,特别是电视终端,的显示屏之间存在硬件和软件等方面的差异,如果所有电视终端都使用相同的白平衡参数则很容易产生偏色,影响终端的显示画质。因此,在电视终端的生产过程中,工厂往往需要对每一台电视终端的白平衡参数进行调整,以达到更好的还原色彩、提升画质的目的。White balance is produced along with the reproduction of true color of electronic images, and a series of problems of color reproduction and tone processing can be solved through white balance adjustment. Due to differences in hardware and software between the display screens of different terminals, especially TV terminals, if all TV terminals use the same white balance parameters, color casts will easily occur, which will affect the display quality of the terminals. Therefore, in the production process of TV terminals, the factory often needs to adjust the white balance parameters of each TV terminal to achieve better color reproduction and image quality improvement.
在电视终端的生产过程中,对电视终端的白平衡参数调整有两种方式:一种是对电视终端所有信号源的白平衡参数进行逐个调整,但是这种方式非常耗费时间,白平衡参数调整效率低;另一种是只调整数字信号(例如HDMI信号(High Definition MultimediaInterface,高清晰度多媒体接口))或者只调整模拟信号的白平衡参数,然后其余信源全部采用与数字信号或模拟信号相同的白平衡参数,但是,根据亮度公式(例如,模拟信号下:Y1=0.3R+0.6G+0.1B;数字信号下:Y2=0.21R+0.72G+0.07B,其中Y1为模拟信号下的亮度,Y2为数字信号下的亮度,R为红基色增益值,G为绿基色增益值,B为蓝基色增益值)定义,同样的白平衡参数,得到的模拟信号与数字信号的亮度是有差异的,可能会导致模拟信号或数字信号成像偏暗,导致电视终端不能通过能耗测试。In the production process of the TV terminal, there are two ways to adjust the white balance parameters of the TV terminal: one is to adjust the white balance parameters of all signal sources of the TV terminal one by one, but this method is very time-consuming. Low efficiency; the other is to only adjust the digital signal (such as HDMI signal (High Definition Multimedia Interface, high-definition multimedia interface)) or only adjust the white balance parameters of the analog signal, and then all other sources use the same signal as the digital signal or analog signal. However, according to the brightness formula (for example, under the analog signal: Y1=0.3R+0.6G+0.1B; under the digital signal: Y2=0.21R+0.72G+0.07B, where Y1 is the Brightness, Y2 is the brightness under the digital signal, R is the gain value of the red primary color, G is the gain value of the green primary color, B is the gain value of the blue primary color), the same white balance parameters, the brightness of the obtained analog signal and digital signal are different The difference may cause the imaging of the analog signal or digital signal to be dark, causing the TV terminal to fail the energy consumption test.
发明内容Contents of the invention
本发明的主要目的在于提供一种模数信号补偿的方法及装置,旨在解决调整电视终端白平衡参数耗费时间长、效率低、导致电视终端不能测试的技术问题。The main purpose of the present invention is to provide a method and device for analog-to-digital signal compensation, aiming at solving the technical problems that adjusting the white balance parameters of a TV terminal takes a long time, is inefficient, and causes the TV terminal to fail to be tested.
为实现上述目的,本发明提供的一种模数信号补偿的方法,所述模数信号补偿的方法包括:In order to achieve the above object, the present invention provides a method of analog-to-digital signal compensation, the method of said analog-to-digital signal compensation includes:
在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,其中所述白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值;After the terminal adjusts the white balance of the first signal source, obtain the white balance parameters of the first signal source of the terminal, wherein the white balance parameters include a green primary color gain value, a red primary color gain value, and a blue primary color gain value;
判断所述白平衡参数中的绿基色增益值是否小于所述第一信号源对应的第一阈值;judging whether the green primary color gain value in the white balance parameter is smaller than a first threshold corresponding to the first signal source;
当所述绿基色增益值小于所述第一阈值时,将所述绿基色增益值增大至所述第一阈值,并将所述白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为所述第一阈值与所述绿基色增益值的比值;When the green primary color gain value is less than the first threshold value, increase the green primary color gain value to the first threshold value, and increase the red primary color gain value and the blue primary color gain value of the white balance parameter A first numerical multiple, where the first numerical multiple is the ratio of the first threshold to the green primary color gain value;
根据增大后的所述绿基色增益值、红基色增益值和蓝基色增益值设置为所述终端第二信号源的白平衡参数。Set the white balance parameter of the second signal source of the terminal according to the increased green primary color gain value, red primary color gain value, and blue primary color gain value.
优选地,将增大后的绿基色增益值作为第一绿基色增益值、增大后的红基色增益值作为第一红基色增益值、增大后的蓝基色增益值作为第一蓝基色增益值,所述根据增大后的所述绿基色增益值、红基色增益值和蓝基色增益值设置所述终端第二信号源的白平衡参数的步骤包括:Preferably, the increased green primary color gain value is used as the first green primary color gain value, the increased red primary color gain value is used as the first red primary color gain value, and the increased blue primary color gain value is used as the first blue primary color gain value value, the step of setting the white balance parameters of the terminal second signal source according to the increased green primary color gain value, red primary color gain value and blue primary color gain value includes:
判断所述第一红基色增益值是否小于所述第一信号源对应的第二阈值;judging whether the gain value of the first primary red color is smaller than a second threshold corresponding to the first signal source;
当所述第一红基色增益值小于所述第二阈值时,将所述第一红基色增益值增大至所述第二阈值,其中增大后的所述第一红基色增益值作为第二红基色增益值;When the gain value of the first primary red color is less than the second threshold, increase the gain value of the first primary red color to the second threshold, wherein the increased gain value of the first primary red color is used as the second threshold Gain value of two red primary colors;
将所述第一蓝基色增益值增大第二数值倍,该第二数值为所述第二阈值与所述第一红基色增益值的比值,其中增大后的所述第一蓝基色增益值作为第二蓝基色增益值;increasing the gain value of the first primary blue color by a second numerical value, the second numerical value being the ratio of the second threshold value to the gain value of the first primary red color, wherein the increased gain of the first primary blue color Value as the second blue primary color gain value;
根据所述第一绿基色增益值、所述第二红基色增益值以及所述第二蓝基色增益值设置所述终端第二信号源的白平衡参数。Setting a white balance parameter of a second signal source of the terminal according to the first green primary color gain value, the second red primary color gain value, and the second blue primary color gain value.
优选地,所述根据所述第一绿基色增益值、所述第二红基色增益值以及所述第二蓝基色增益值设置所述终端第二信号源的白平衡参数的步骤包括:Preferably, the step of setting the white balance parameter of the second signal source of the terminal according to the first green primary color gain value, the second red primary color gain value and the second blue primary color gain value includes:
判断所述第二红基色增益值是否大于所述第一信号源对应的红增益极值;judging whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source;
当所述第二红基色增益值大于所述第一信号源对应的红增益极值时,将所述第二红基色增益值减小至所述红增益极值而获取第三红基色增益值;When the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source, reduce the second red primary color gain value to the red gain extreme value to obtain a third red primary color gain value ;
将所述第一绿基色增益值、所述第三红基色增益值以及所述第二蓝基色增益值设置为所述终端第二信号源的白平衡参数。Setting the first green primary color gain value, the third red primary color gain value, and the second blue primary color gain value as white balance parameters of the second signal source of the terminal.
优选地,所述判断所述第二红基色增益值是否大于所述第一信号源对应的红增益极值的步骤之后还包括:Preferably, after the step of judging whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source, the step further includes:
当所述第二红基色增益值小于或等于所述第一信号源对应的红增益极值时,将所述第一绿基色增益值、所述第二红基色增益值以及所述第二蓝基色增益值设置为所述终端第二信号源的白平衡参数。When the second red primary color gain value is less than or equal to the red gain extreme value corresponding to the first signal source, the first green primary color gain value, the second red primary color gain value and the second blue The primary color gain value is set as a white balance parameter of the second signal source of the terminal.
优选地,所述模数信号补偿的方法还包括:Preferably, the method for analog-to-digital signal compensation also includes:
根据色度系统检测设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色;Detecting whether the image formed by the green primary color gain value, the red primary color gain value, and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast according to the chromaticity system;
若设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整所述第一阈值、第二阈值和/或红增益极值,以调整设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值。If the image formed by the green primary color gain value, the red primary color gain value, and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast, then adjust the first threshold, the second threshold and/or or red gain extreme value, so as to adjust the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal.
为实现上述目的,本发明还提供一种模数信号补偿的装置,所述模数信号补偿的装置包括:In order to achieve the above object, the present invention also provides a device for analog-to-digital signal compensation, which includes:
参数获取模块,用于在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,其中所述白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值;A parameter acquisition module, configured to acquire the white balance parameters of the first signal source of the terminal after the terminal adjusts the white balance of the first signal source, wherein the white balance parameters include the green primary color gain value, the red primary color gain value and the blue primary color gain value;
判断模块,用于判断所述白平衡参数中的绿基色增益值是否小于所述第一信号源对应的第一阈值;A judging module, configured to judge whether the green primary color gain value in the white balance parameter is smaller than the first threshold corresponding to the first signal source;
增大模块,用于当所述绿基色增益值小于所述第一阈值时,将所述绿基色增益值增大至所述第一阈值,并将所述白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为所述第一阈值与所述绿基色增益值的比值;an increasing module, configured to increase the green primary color gain value to the first threshold value when the green primary color gain value is less than the first threshold value, and increase the red primary color gain value and the red primary color gain value of the white balance parameter The blue primary color gain value is increased by a first numerical value, and the first numerical multiple is the ratio of the first threshold value to the green primary color gain value;
参数设置模块,用于根据增大后的所述绿基色增益值、红基色增益值和蓝基色增益值设置所述终端第二信号源的白平衡参数。A parameter setting module, configured to set the white balance parameters of the second signal source of the terminal according to the increased green primary color gain value, red primary color gain value and blue primary color gain value.
优选地,将增大后的绿基色增益值作为第一绿基色增益值、增大后的红基色增益值作为第一红基色增益值、增大后的蓝基色增益值作为第一蓝基色增益值,所述参数设置模块包括:Preferably, the increased green primary color gain value is used as the first green primary color gain value, the increased red primary color gain value is used as the first red primary color gain value, and the increased blue primary color gain value is used as the first blue primary color gain value value, the parameter setting module includes:
增益值判断单元,用于判断所述第一红基色增益值是否小于所述第一信号源对应的第二阈值;a gain value judging unit, configured to judge whether the first red primary color gain value is smaller than a second threshold corresponding to the first signal source;
第一增益增大单元,用于当所述第一红基色增益值小于所述第二阈值时,将所述第一红基色增益值增大至所述第二阈值,其中增大后的所述第一红基色增益值作为第二红基色增益值;A first gain increasing unit, configured to increase the first red primary color gain value to the second threshold value when the first red primary color gain value is smaller than the second threshold value, wherein the increased all The first red primary color gain value is used as the second red primary color gain value;
第二增益增大单元,用于将所述第一蓝基色增益值增大第二数值倍,该第二数值为所述第二阈值与所述第一红基色增益值的比值,其中增大后的所述第一蓝基色增益值作为第二蓝基色增益值;The second gain increasing unit is configured to increase the gain value of the first blue primary color by a second numerical value, and the second numerical value is the ratio of the second threshold value to the first red primary color gain value, wherein increasing The subsequent first blue primary color gain value is used as the second blue primary color gain value;
参数设置单元,用于根据所述第一绿基色增益值、所述第二红基色增益值以及所述第二蓝基色增益值设置所述终端第二信号源的白平衡参数。A parameter setting unit, configured to set a white balance parameter of the second signal source of the terminal according to the first green primary color gain value, the second red primary color gain value, and the second blue primary color gain value.
优选地,所述参数设置单元包括:Preferably, the parameter setting unit includes:
比值判断单元,用于判断所述第二红基色增益值是否大于所述第一信号源对应的红增益极值;A ratio judging unit, configured to judge whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source;
第一次级设置单元,用于当所述第二红基色增益值大于所述第一信号源对应的红增益极值时,将所述第二红基色增益值减小至所述红增益极值而获取第三红基色增益值,并将所述第一绿基色增益值、所述第三红基色增益值以及所述第二蓝基色增益值设置为所述终端第二信号源的白平衡参数。A first secondary setting unit, configured to reduce the second red primary color gain value to the red gain extreme value when the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source value to acquire a third primary color gain value of red, and set the gain value of the first primary color green, the gain value of the third primary color red, and the second primary color blue as the white balance of the second signal source of the terminal parameter.
优选地,所述参数设置单元还包括:Preferably, the parameter setting unit also includes:
第二次级设置单元,用于当所述第二红基色增益值小于或等于所述第一信号源对应的红增益极值时,将所述第一绿基色增益值、所述第二红基色增益值以及所述第二蓝基色增益值设置为所述终端第二信号源的白平衡参数。The second secondary setting unit is configured to set the first green primary color gain value, the second red primary color gain value, and the second red primary color gain value to The primary color gain value and the second blue primary color gain value are set as white balance parameters of the second signal source of the terminal.
优选地,所述模数信号补偿的装置还包括:Preferably, the device for analog-to-digital signal compensation further includes:
偏色检测模块,用于根据色度系统检测设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色;若设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整所述第一阈值、第二阈值和/或红增益极值,以调整设置为所述终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值。The color cast detection module is used to detect whether the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast according to the chromaticity system; if The image formed by the green primary color gain value, the red primary color gain value, and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast, then adjust the first threshold, the second threshold and/or The red gain extreme value is used to adjust the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal.
本发明通过在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,然后将获取的白平衡参数中的绿基色增益值与该第一信号源对应的第一阈值进行比较,若该绿基色增益值小于第一阈值,则将该绿基色增益值增大至第一阈值,并将获取的白平衡参数中红基色增益值和蓝基色增益值增大与绿基色增益值增大倍数相同的倍数,从而在检测到第一信号源的白平衡参数不合理时,对该白平衡参数进行调整,最后将调整后的白平衡参数作为第二信号源的白平衡参数,从而在保证第二信号源输出图像亮度的前提下,自动实现了对第二信号源白平衡参数的调整,而不需要工厂对终端第二信号源进行费时、效率低的白平衡调整过程,也保证了终端显示亮度不会偏小、能够顺利通过能耗测试。In the present invention, after the terminal adjusts the white balance of the first signal source, the white balance parameter of the first signal source of the terminal is obtained, and then the green primary color gain value in the obtained white balance parameter is A threshold value is compared, if the green primary color gain value is less than the first threshold value, the green primary color gain value is increased to the first threshold value, and the red primary color gain value and the blue primary color gain value in the obtained white balance parameters are increased by the same value as The green primary color gain value is increased by the same multiple, so that when the white balance parameter of the first signal source is detected to be unreasonable, the white balance parameter is adjusted, and finally the adjusted white balance parameter is used as the white balance parameter of the second signal source. Balance parameters, so that on the premise of ensuring the brightness of the output image of the second signal source, the adjustment of the white balance parameters of the second signal source is automatically realized, without the need for the factory to perform time-consuming and inefficient white balance adjustments on the second signal source of the terminal The process also ensures that the brightness of the terminal display will not be too small and can pass the energy consumption test smoothly.
附图说明Description of drawings
图1为本发明模数信号补偿的方法第一实施例的流程示意图;1 is a schematic flow chart of the first embodiment of the method for analog-to-digital signal compensation of the present invention;
图2为本发明模数信号补偿的方法中根据增大后的绿基色增益值、红基色增益值和蓝基色增益值设置终端第二信号源的白平衡参数的细化流程示意图;Fig. 2 is a schematic diagram of a refinement process for setting the white balance parameters of the second signal source of the terminal according to the increased green primary color gain value, red primary color gain value and blue primary color gain value in the method for analog-to-digital signal compensation of the present invention;
图3为本发明模数信号补偿的装置第一实施例的功能模块示意图;3 is a schematic diagram of the functional modules of the first embodiment of the device for analog-to-digital signal compensation of the present invention;
图4为本发明模数信号补偿的装置参数设置模块的细化功能模块示意图。FIG. 4 is a schematic diagram of a detailed functional module of the device parameter setting module for analog-to-digital signal compensation in the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明提供一种模数信号补偿的方法,在本发明模数信号补偿的方法的第一实施例中,参照图1,该模数信号补偿的方法包括:The present invention provides a method for analog-digital signal compensation. In the first embodiment of the method for analog-digital signal compensation of the present invention, referring to FIG. 1, the method for analog-digital signal compensation includes:
步骤S10,在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,其中白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值;Step S10, after the terminal adjusts the white balance of the first signal source, obtain the white balance parameters of the first signal source of the terminal, wherein the white balance parameters include the green primary color gain value, the red primary color gain value and the blue primary color gain value;
在本实施例中,终端为智能电视,第一信号源为数字信号源,第二信号源为模拟信号源,在工厂的技术人员完成了对电视终端的数字信号源的白平衡调整后,获取数字信号源的白平衡参数,该数字信号源的白平衡参数包括三基色的增益值,即该白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值。In this embodiment, the terminal is a smart TV, the first signal source is a digital signal source, and the second signal source is an analog signal source. After the technicians in the factory complete the white balance adjustment of the digital signal source of the TV terminal, obtain The white balance parameter of the digital signal source, the white balance parameter of the digital signal source includes the gain values of the three primary colors, that is, the white balance parameter includes the green primary color gain value, the red primary color gain value and the blue primary color gain value.
此外,终端也可为其它类型的终端,在本发明模数信号补偿的方法的其它实施例中,第一信号源可以为模拟信号源,第二信号源可以为数字信号源,先对终端的模拟信号源进行白平衡调整,然后获取该模拟信号源的白平衡参数,以根据该模拟信号的白平衡参数得到数字信号源对应的白平衡参数,执行过程与本实施例基本相同。In addition, the terminal can also be other types of terminals. In other embodiments of the analog-to-digital signal compensation method of the present invention, the first signal source can be an analog signal source, and the second signal source can be a digital signal source. The analog signal source performs white balance adjustment, and then obtains the white balance parameter of the analog signal source, so as to obtain the corresponding white balance parameter of the digital signal source according to the white balance parameter of the analog signal. The execution process is basically the same as that of this embodiment.
步骤S20,判断白平衡参数中的绿基色增益值是否小于第一信号源对应的第一阈值;Step S20, judging whether the green primary color gain value in the white balance parameter is smaller than the first threshold corresponding to the first signal source;
基于亮度公式(例如,模拟信号下:Y1=0.3R+0.6G+0.1B;数字信号下:Y2=0.21R+0.72G+0.07B,其中Y1为模拟信号下的亮度,Y2为数字信号下的亮度,R为红基色增益值,G为绿基色增益值,B为蓝基色增益值),绿基色增益值对数字信号的亮度贡献最大,红基色增益值贡献次之,蓝基色增益值贡献最小,故先判断获取的白平衡参数(第一信号源(在本实施例中第一信号源为数字信号源)的白平衡参数)中的绿基色增益值是否小于第一信号源对应的第一阈值(该第一阈值可以是用户设置或者终端自动设置),若第一信号源的绿基色增益值小于第一阈值,表明绿基色增益过小,第二信号源基于该绿基色增益所得到的亮度可能会偏小,故需要对该绿基色增益进行增大处理;若第一信号源的绿基色增益大于等于第一阈值,表明绿基色增益足够大,第二信号源基于该绿基色增益所得到的亮度不会偏小,故无需要对该绿基色增益进行增大处理。Based on the brightness formula (for example, under the analog signal: Y1=0.3R+0.6G+0.1B; under the digital signal: Y2=0.21R+0.72G+0.07B, where Y1 is the brightness under the analog signal, Y2 is the brightness under the digital signal luminance, R is the red primary color gain value, G is the green primary color gain value, B is the blue primary color gain value), the green primary color gain value contributes the most to the brightness of the digital signal, the red primary color gain value contributes second, and the blue primary color gain value contributes Therefore, it is first judged whether the green primary color gain value in the obtained white balance parameter (the white balance parameter of the first signal source (in this embodiment, the first signal source is a digital signal source)) is smaller than the first signal source corresponding to the first signal source. A threshold (the first threshold can be set by the user or automatically by the terminal), if the green primary color gain value of the first signal source is less than the first threshold, it indicates that the green primary color gain is too small, and the second signal source is based on the green primary color gain. The brightness of the primary color may be small, so it is necessary to increase the green primary color gain; if the green primary color gain of the first signal source is greater than or equal to the first threshold, it indicates that the green primary color gain is large enough, and the second signal source is based on the green primary color gain. The resulting brightness will not be too small, so there is no need to increase the gain of the green primary color.
为了更好的理解本方案,对第一阈值的确定进行解释,本发明中的第一阈值是基于亮度公式得到的,数字信号源的第一阈值基于数字信号下的亮度公式得到,模拟信号源的第一阈值基于模拟信号下的亮度公式(亮度公式是基于终端显示屏特性和各类芯片技术参数并经过多次试验或测试得到的)得到,例如数字信号下亮度公式为Y3=0.2126R+0.7152G+0.0722B(Y3为数字信号下的亮度,R为红基色增益值,G为绿基色增益值,B为蓝基色增益值),该数字信号的亮度公式对应的第一阈值为128,即绿基色增益值大于等于128时,包含该绿基色增益值的白平衡参数能够基本保证亮度不会偏小。In order to better understand this solution, the determination of the first threshold is explained. The first threshold in the present invention is obtained based on the brightness formula. The first threshold of the digital signal source is obtained based on the brightness formula under the digital signal. The analog signal source The first threshold value is obtained based on the luminance formula under the analog signal (the luminance formula is obtained based on the characteristics of the terminal display screen and various chip technical parameters and after many experiments or tests). For example, the luminance formula under the digital signal is Y3=0.2126R+ 0.7152G+0.0722B (Y3 is the brightness under the digital signal, R is the red primary color gain value, G is the green primary color gain value, B is the blue primary color gain value), the first threshold value corresponding to the brightness formula of the digital signal is 128, That is, when the green primary color gain value is greater than or equal to 128, the white balance parameters including the green primary color gain value can basically ensure that the brightness will not be too small.
步骤S30,当绿基色增益值小于第一阈值时,将绿基色增益值增大至第一阈值,并将白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为第一阈值与绿基色增益值的比值;Step S30, when the green primary color gain value is less than the first threshold value, increase the green primary color gain value to the first threshold value, and increase the red primary color gain value and the blue primary color gain value of the white balance parameter by a first numerical value, the first value One numerical value is the ratio of the first threshold value to the green primary color gain value;
步骤S40,根据增大后的绿基色增益值、红基色增益值和蓝基色增益值设置终端第二信号源的白平衡参数。Step S40, setting the white balance parameter of the second signal source of the terminal according to the increased green primary color gain value, red primary color gain value and blue primary color gain value.
在判定第一信号源的白平衡参数中绿基色增益值小于第一信号源对应的第一阈值时,表明第一信号源的白平衡参数应用到第二信号源可能会导致第二信号源显示的图像亮度偏低,故将该第一信号源的白平衡参数中绿基色增益值增大至第一阈值,同时将白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为第一阈值与绿基色增益值的比值。例如第一信号源的白平衡参数中红基色增益值R1=2、绿基色增益值G1=4,蓝基色增益值B1=1,第一信号源对应的第一阈值为8,则G1调整为8,第一数值为2,R1调整为4,B1调整为2,即增大后的红基色增益值R2=4,增大后的绿基色增益值G2=8,增大后的蓝基色增益值B2=2,然后将R2、G2、B2作为第二信号源的白平衡参数。在判定第一信号源的白平衡参数中绿基色增益值大于等于第一信号源对应的第一阈值时,表明第一信号源的白平衡参数应用到第二信号源不会导致第二信号源显示的图像亮度偏低,故可直接将第一信号源的白平衡参数作为第二信号源的白平衡参数。When it is determined that the green primary color gain value in the white balance parameters of the first signal source is less than the first threshold corresponding to the first signal source, it indicates that the white balance parameters of the first signal source applied to the second signal source may cause the second signal source to display The brightness of the image is low, so the green primary color gain value in the white balance parameter of the first signal source is increased to the first threshold value, and the red primary color gain value and the blue primary color gain value of the white balance parameter are increased by the first value times , the first numerical value is the ratio of the first threshold to the green primary color gain value. For example, in the white balance parameters of the first signal source, the red primary color gain value R1=2, the green primary color gain value G1=4, the blue primary color gain value B1=1, and the first threshold corresponding to the first signal source is 8, then G1 is adjusted to 8. The first value is 2, R1 is adjusted to 4, and B1 is adjusted to 2, that is, the increased red primary color gain value R2=4, the increased green primary color gain value G2=8, and the increased blue primary color gain value The value B2=2, and then R2, G2, and B2 are used as the white balance parameters of the second signal source. When it is determined that the green primary color gain value in the white balance parameters of the first signal source is greater than or equal to the first threshold corresponding to the first signal source, it indicates that the application of the white balance parameters of the first signal source to the second signal source will not cause the second signal source to The brightness of the displayed image is relatively low, so the white balance parameter of the first signal source can be directly used as the white balance parameter of the second signal source.
在本实施例中,通过在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,然后将获取的白平衡参数中的绿基色增益值与该第一信号源对应的第一阈值进行比较,若该绿基色增益值小于第一阈值,则将该绿基色增益值增大至第一阈值,并将获取的白平衡参数中红基色增益值和蓝基色增益值增大与绿基色增益值增大倍数相同的倍数,从而在检测到第一信号源的白平衡参数不合理时,对该白平衡参数进行调整,最后将调整后的白平衡参数作为第二信号源的白平衡参数,从而在保证第二信号源输出图像亮度的前提下,自动实现了对第二信号源白平衡参数的调整,而不需要工厂对终端第二信号源进行费时、效率低的白平衡调整过程,也保证了终端显示亮度不会偏小、能够顺利通过能耗测试。In this embodiment, after the terminal adjusts the white balance of the first signal source, obtain the white balance parameters of the first signal source of the terminal, and then combine the green primary color gain value in the obtained white balance parameters with the first signal The first threshold corresponding to the source is compared, if the green primary color gain value is less than the first threshold value, the green primary color gain value is increased to the first threshold value, and the red primary color gain value and the blue primary color gain value in the obtained white balance parameters are The value is increased by the same multiple as the green primary color gain value, so that when the white balance parameter of the first signal source is detected to be unreasonable, the white balance parameter is adjusted, and finally the adjusted white balance parameter is used as the second The white balance parameters of the signal source, so that on the premise of ensuring the brightness of the output image of the second signal source, the adjustment of the white balance parameters of the second signal source is automatically realized, without the need for the factory to perform time-consuming and inefficient adjustments to the second signal source of the terminal The white balance adjustment process of the terminal also ensures that the terminal display brightness will not be too small and can pass the energy consumption test smoothly.
进一步地,在本发明模数信号补偿的方法的第一实施例的基础上,提出模数信号补偿的方法的第二实施例,参照图2,在第二实施例中,将增大后的绿基色增益值作为第一绿基色增益值、增大后的红基色增益值作为第一红基色增益值、增大后的蓝基色增益值作为第一蓝基色增益值,步骤S40包括:Further, on the basis of the first embodiment of the method for analog-to-digital signal compensation of the present invention, a second embodiment of the method for analog-to-digital signal compensation is proposed. Referring to FIG. 2 , in the second embodiment, the increased The green primary color gain value is used as the first green primary color gain value, the increased red primary color gain value is used as the first red primary color gain value, and the increased blue primary color gain value is used as the first blue primary color gain value. Step S40 includes:
步骤S41,判断第一红基色增益值是否小于第一信号源对应的第二阈值;Step S41, judging whether the gain value of the first primary red color is smaller than a second threshold corresponding to the first signal source;
步骤S42,当第一红基色增益值小于第二阈值时,将第一红基色增益值增大至第二阈值,其中增大后的第一红基色增益值作为第二红基色增益值;Step S42, when the gain value of the first primary red color is less than the second threshold value, increase the gain value of the first primary red color to the second threshold value, wherein the increased gain value of the first primary red color is used as the second primary color gain value;
步骤S43,将第一蓝基色增益值增大第二数值倍,该第二数值为第二阈值与第一红基色增益值的比值,其中增大后的第一蓝基色增益值作为第二蓝基色增益值;Step S43, increasing the gain value of the first primary blue color by a second numerical value, the second numerical value being the ratio of the second threshold value to the gain value of the first primary red color, wherein the increased gain value of the first primary blue color is used as the second blue base color gain value;
步骤S44,根据第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置终端第二信号源的白平衡参数。Step S44, setting the white balance parameter of the second signal source of the terminal according to the first green primary color gain value, the second red primary color gain value and the second blue primary color gain value.
在判定第一信号源的白平衡参数中绿基色增益值小于第一阈值时,对绿基色增益增大至第一信号源对应的第一阈值得到第一绿基色增益值,并同比例增大对应的红基色增益值和蓝基色增益值后得到第一红基色增益值和第一蓝基色增益值,然后将第一红基色增益值与第一信号源对应的第二阈值(第二阈值的确定过程与第一阈值基本相同)进行比较,当第一红色增益值小于第二阈值时,表面将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源可能会导致第二信号源显示的图像亮度偏低,故将第一红色增益值增大至第二阈值得到第二红色增益值,同时将第一蓝色增益值增大第二数值倍得到第二蓝色增益值,该第二数值为第二阈值与第一红基色增益值的比,将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。当第一红色增益值大于等于第二阈值时,表明将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值应用到第二信号源不会导致第二信号源显示的图像亮度偏低,故可直接将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源的白平衡参数。When it is determined that the green primary color gain value in the white balance parameter of the first signal source is less than the first threshold value, the green primary color gain is increased to the first threshold value corresponding to the first signal source to obtain the first green primary color gain value, and increase in the same proportion Obtain the first red primary color gain value and the first blue primary color gain value after the corresponding red primary color gain value and the blue primary color gain value, then the first red primary color gain value and the second threshold corresponding to the first signal source (the second threshold value The determination process is basically the same as the first threshold), and when the first red gain value is less than the second threshold, the surface uses the first green primary color gain value, the first red primary color gain value and the first blue primary color gain value as the second signal The source may cause the brightness of the image displayed by the second signal source to be low, so increase the first red gain value to the second threshold to obtain the second red gain value, and at the same time increase the first blue gain value by the second value to obtain The second blue gain value, the second value is the ratio of the second threshold value to the first red primary color gain value, the first green primary color gain value, the second red primary color gain value and the second blue primary color gain value are set as the terminal first color gain value The white balance parameter of the second signal source. When the first red gain value is greater than or equal to the second threshold value, it indicates that applying the first green primary color gain value, the first red primary color gain value and the first blue primary color gain value to the second signal source will not cause the second signal source to display The brightness of the image is relatively low, so the first green primary color gain value, the first red primary color gain value, and the first blue primary color gain value can be directly used as the white balance parameters of the second signal source.
接上述步骤S40的例子,第一红基色增益值R2=4,第一绿基色增益值G2=8,第一蓝基色增益值B2=2,若第二阈值为6,则将R2调整至6,G2不变,B2调整为3,即第二红基色增益值R3=6,第二蓝基色增益值B3=3,并将R3、G2、B3作为第二信号源的白平衡参数。Following the example of step S40 above, the first red primary color gain value R2=4, the first green primary color gain value G2=8, the first blue primary color gain value B2=2, if the second threshold value is 6, adjust R2 to 6 , G2 remains unchanged, B2 is adjusted to 3, that is, the second red primary color gain value R3=6, the second blue primary color gain value B3=3, and R3, G2, and B3 are used as white balance parameters of the second signal source.
在本实施例中,通过进一步判断第一信号源的第一红基色增益值是否小于第二阈值,若第一红基色增益值小于第二阈值,则将第一红基色增益值增大至第二阈值得到第二红基色增益值,同时将第一蓝基色增益值增大第二数值倍得到第二蓝基色增益值,并将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源的白平衡参数,从而在保证绿基色增益值足够大时,进一步保证红基色增益值足够大,能辅助绿基色增益值来保证终端第二信号源的亮度,进一步保证终端通过能耗测试。In this embodiment, by further judging whether the first red primary color gain value of the first signal source is smaller than the second threshold value, if the first red primary color gain value is smaller than the second threshold value, the first red primary color gain value is increased to the second threshold value. The second threshold value is used to obtain the second red primary color gain value, and at the same time, the first blue primary color gain value is increased by the second numerical value to obtain the second blue primary color gain value, and the first green primary color gain value, the first red primary color gain value and the first The blue primary color gain value is used as the white balance parameter of the second signal source, so that when the green primary color gain value is ensured to be large enough, the red primary color gain value is further ensured to be sufficiently large, which can assist the green primary color gain value to ensure the brightness of the terminal second signal source, Further ensure that the terminal passes the energy consumption test.
进一步地,在本发明模数信号补偿的方法的第二实施例的基础上,提出模数信号补偿的方法的第三实施例,在第三实施例中,步骤S44包括:Further, on the basis of the second embodiment of the method for analog-to-digital signal compensation of the present invention, a third embodiment of the method for analog-to-digital signal compensation is proposed. In the third embodiment, step S44 includes:
步骤S441,判断第二红基色增益值是否大于第一信号源对应的红增益极值;Step S441, judging whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source;
步骤S442,当第二红基色增益值大于第一信号源对应的红增益极值时,将第二红基色增益值减小至红增益极值而获取第三红基色增益值;Step S442, when the gain value of the second primary red color is greater than the extreme value of red gain corresponding to the first signal source, reduce the gain value of the second primary red color to the extreme value of red gain to obtain a third primary color gain value of red;
步骤S443,将第一绿基色增益值、第三红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。Step S443, setting the first green primary color gain value, the third red primary color gain value, and the second blue primary color gain value as white balance parameters of the second signal source of the terminal.
在第一信号源的红基色增益值经过两次调整后得到第二红基色增益值时,判断该第二红基色增益值是否大于第一信号源对应的红增益极值,若第二红基色增益值大于红增益极值,表明包含第二红基色增益值的白平衡参数所显示的图像会偏红,将第二红基色增益值减小至红增益极值而将减小后的第二红基色增益值作为第三红基色增益值,第二蓝基色增益值不变,然后将第一绿基色增益值、第三红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。When the red primary color gain value of the first signal source is adjusted twice to obtain the second red primary color gain value, it is judged whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source, if the second red primary color If the gain value is greater than the extreme value of red gain, it means that the image displayed by the white balance parameters including the gain value of the second primary red color will be reddish. If the gain value of the second primary color red is reduced to the extreme value of red gain, the reduced second The red primary color gain value is used as the third red primary color gain value, the second blue primary color gain value remains unchanged, and then the first green primary color gain value, the third red primary color gain value, and the second blue primary color gain value are set as the terminal second signal source white balance parameters.
在本实施例中,在对绿基色增益值进行一次调整、对红基色增益值和蓝基色增益值进行二次调整后,进一步将经两次调整后得到的第二红基色增益值红增益极值进行比较,防止第二红基色增益值过大而导致包含第二红基色增益值的白平衡参数所显示的图像偏红,保证第二信号源获取的白平衡参数所显示的图像色度适中。In this embodiment, after the first adjustment of the green primary color gain value, the secondary adjustment of the red primary color gain value and the blue primary color gain value, the second red primary color gain value obtained after the two adjustments is further adjusted To prevent the image displayed by the white balance parameters containing the second red primary color gain value from being too red, and to ensure that the image displayed by the white balance parameters acquired by the second signal source is moderately chromatic .
进一步地,在本发明模数信号补偿的方法的第三实施例的基础上,提出模数信号补偿的方法的第四实施例,在第四实施例中,步骤S441之后还包括:Further, on the basis of the third embodiment of the method for analog-to-digital signal compensation of the present invention, a fourth embodiment of the method for analog-to-digital signal compensation is proposed. In the fourth embodiment, after step S441, it also includes:
步骤S444,当第二红基色增益值小于或等于第一信号源对应的红增益极值时,将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。Step S444, when the second red primary color gain value is less than or equal to the red gain extreme value corresponding to the first signal source, set the first green primary color gain value, the second red primary color gain value and the second blue primary color gain value as the terminal first color gain value The white balance parameter of the second signal source.
在第一信号源的红基色增益值经过两次调整后得到第二红基色增益值时,判断该第二红基色增益值是否大于第一信号源对应的红增益极值,若第二红基色增益值小于或等于红增益极值,表明包含第二红基色增益值的白平衡参数所显示的图像色度适中,无需对第二红基色增益值进行调整,进而将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。When the red primary color gain value of the first signal source is adjusted twice to obtain the second red primary color gain value, it is judged whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source, if the second red primary color If the gain value is less than or equal to the red gain extreme value, it indicates that the image displayed by the white balance parameters including the second red primary color gain value is moderate in chromaticity, and there is no need to adjust the second red primary color gain value, and then the first green primary color gain value, The second red primary color gain value and the second blue primary color gain value are set as white balance parameters of the second signal source of the terminal.
在本实施例中,在对绿基色增益值进行一次调整、对红基色增益值和蓝基色增益值进行二次调整后,进一步将经两次调整后得到的第二红基色增益值红增益极值进行比较,防止第二红基色增益值过大而导致包含第二红基色增益值的白平衡参数所显示的图像偏红,保证第二信号源获取的白平衡参数所显示的图像色度适中。In this embodiment, after the first adjustment of the green primary color gain value, the secondary adjustment of the red primary color gain value and the blue primary color gain value, the second red primary color gain value obtained after the two adjustments is further adjusted To prevent the image displayed by the white balance parameters containing the second red primary color gain value from being too red, and to ensure that the image displayed by the white balance parameters acquired by the second signal source is moderately chromatic .
进一步地,在本发明模数信号补偿的方法的第三或第四实施例的基础上,模数信号补偿的方法还包括:Further, on the basis of the third or fourth embodiment of the analog-to-digital signal compensation method of the present invention, the analog-to-digital signal compensation method further includes:
步骤S50,根据色度系统检测设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色;Step S50, according to the chromaticity system, detect whether the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the terminal second signal source has a color cast;
在本实施例中,步骤S50可以设置在步骤S443或步骤S444之后,色度系统可以采用1931CIE-XYZ标准色度系统(即CIE-XYZ色度系统),在第二信号源获取经过调整后的第一信号源对应白平衡参数后,获取调整后的白平衡参数中的绿基色增益值、红基色增益值以及蓝基色增益值,然后将第二信号源获取的绿基色增益值(G)、红基色增益值(R)以及蓝基色增益值(B)从CIE-RGB色度系统中的值转同转换为CIE-XYZ色度系统中的值,判断获取的绿基色增益值(G)、红基色增益值(R)以及蓝基色增益值(B)对应CIE-XYZ色度系统中的值是否达标,即基于CIE-XYZ色度系统判断设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色。In this embodiment, step S50 can be set after step S443 or step S444, the chromaticity system can adopt the 1931CIE-XYZ standard chromaticity system (that is, the CIE-XYZ chromaticity system), and the second signal source obtains the adjusted After the first signal source corresponds to the white balance parameter, the green primary color gain value, the red primary color gain value and the blue primary color gain value in the adjusted white balance parameter are obtained, and then the green primary color gain value (G) obtained by the second signal source, The red primary color gain value (R) and the blue primary color gain value (B) are converted from the value in the CIE-RGB chromaticity system to the value in the CIE-XYZ chromaticity system, and the obtained green primary color gain value (G), The red primary color gain value (R) and the blue primary color gain value (B) correspond to whether the values in the CIE-XYZ chromaticity system are up to standard, that is, based on the CIE-XYZ chromaticity system, it is judged that the green color that is set as the white balance parameter of the second signal source of the terminal Whether color cast occurs in the image formed by primary color gain value, red primary color gain value and blue primary color gain value.
步骤S60,若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整第一阈值、第二阈值和/或红增益极值,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值。Step S60, if the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast, adjust the first threshold, the second threshold and/or Red gain extreme value, to adjust the green primary color gain value, red primary color gain value and blue primary color gain value set as the white balance parameter of the second signal source of the terminal.
若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个,并在增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个后,重新执行本发明模数信号补偿的方法的第一、第二、第三或第四实施例中的步骤,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值,并再次根据色度系统(例如CIE-XYZ色度系统)检测当前设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色,若没有发生偏色,则保存当前设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值;若有发生偏色,则继续增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个,直至当前第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像不发生偏色。If the image formed by the green primary color gain value, red primary color gain value, and blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast, increase or decrease the first threshold, the second threshold, and the red One or more of the three values of the gain extreme value, and after increasing or decreasing one or more of the three values of the first threshold value, the second threshold value and the red gain extreme value, re-execute the analog-to-digital signal of the present invention The step in the first, second, third or fourth embodiment of the compensation method is to adjust the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal, And check again according to the chromaticity system (such as the CIE-XYZ chromaticity system) whether the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value currently set as the white balance parameter of the terminal second signal source is biased. If there is no color cast, save the green primary color gain value, red primary color gain value, and blue primary color gain value currently set as the white balance parameters of the second signal source of the terminal; if there is color cast, continue to increase or decrease One or more of the three values of the first threshold, the second threshold, and the red gain extreme value, until the green primary color gain value, the red primary color gain value, and the blue primary color gain value of the white balance parameter of the current second signal source form The image does not suffer from color cast.
此外,增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个的调整过程中,增大或减小对象的先后顺序、增大或减小的幅度大小均可根据实际需求设定,例如是先增大第一阈值、还是先增大第二阈值可以实际需求设定。In addition, during the adjustment process of increasing or decreasing one or more of the three values of the first threshold, the second threshold and the red gain extremum, the order of the objects, the magnitude of the increase or decrease are increased or decreased The size can be set according to actual needs, for example, whether to first increase the first threshold or first increase the second threshold can be set according to actual needs.
在本实施例中,通过在初步设置了终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值之后,根据色度系统检测设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色,若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整第一阈值、第二阈值和/或红增益极值,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值而避免显示偏色的图像,采用经验值(例如第一阈值、第二阈值或红增益极值)和实际色度检测相结合的方案,避免因终端硬件和软件的差异不适应经验值而使第二信号源基于所获取的白平衡参数显示图像发生偏色,也能够根据终端硬件和软件实际情况去调整经验值,使设置为第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像不发生偏色。In this embodiment, after preliminarily setting the green primary color gain value, red primary color gain value, and blue primary color gain value of the white balance parameter of the terminal second signal source, according to the chromaticity system detection, set the terminal second signal source Whether the image formed by the green primary color gain value, red primary color gain value, and blue primary color gain value of the white balance parameter has a color cast, if it is set as the green primary color gain value, red primary color gain value, and If there is color cast in the image formed by the blue primary color gain value, adjust the first threshold, the second threshold and/or the red gain extreme value to adjust the green primary color gain value, red primary color Gain value and blue primary color gain value to avoid displaying color cast images, using a combination of empirical values (such as the first threshold value, second threshold value or red gain extreme value) and actual chromaticity detection to avoid terminal hardware and software The difference does not adapt to the empirical value, so that the second signal source displays a color cast based on the obtained white balance parameters. It is also possible to adjust the empirical value according to the actual situation of the terminal hardware and software, so that the white balance parameter set as the second signal source The images formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value have no color cast.
本发明还提供一种模数信号补偿的装置,在模数信号补偿的装置的第一实施例中,参照图3,该模数信号补偿的装置包括:The present invention also provides a device for analog-to-digital signal compensation. In the first embodiment of the device for analog-to-digital signal compensation, referring to FIG. 3 , the device for analog-to-digital signal compensation includes:
参数获取模块10,用于在终端对第一信号源进行白平衡调整后,获取该终端第一信号源的白平衡参数,其中白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值;The parameter acquiring module 10 is configured to acquire the white balance parameters of the first signal source of the terminal after the terminal adjusts the white balance of the first signal source, wherein the white balance parameters include the green primary color gain value, the red primary color gain value and the blue primary color gain value value;
在本实施例中,终端为智能电视,第一信号源为数字信号源,第二信号源为模拟信号源,在工厂的技术人员完成了对电视终端的数字信号源的白平衡调整后,参数获取模块10获取数字信号源的白平衡参数,该数字信号源的白平衡参数包括三基色的增益值,即该白平衡参数包括绿基色增益值、红基色增益值和蓝基色增益值。In this embodiment, the terminal is a smart TV, the first signal source is a digital signal source, and the second signal source is an analog signal source. After the factory technicians complete the white balance adjustment of the digital signal source of the TV terminal, the parameter The obtaining module 10 obtains the white balance parameter of the digital signal source, and the white balance parameter of the digital signal source includes the gain values of the three primary colors, that is, the white balance parameter includes the green primary color gain value, the red primary color gain value and the blue primary color gain value.
此外,终端也可为其它类型的终端,在本发明模数信号补偿的方法的其它实施例中,第一信号源可以为模拟信号源,第二信号源可以为数字信号源,先对终端的模拟信号源进行白平衡调整,然后参数获取模块10获取该模拟信号源的白平衡参数,以根据该模拟信号的白平衡参数得到数字信号源对应的白平衡参数,执行过程与本实施例基本相同。In addition, the terminal can also be other types of terminals. In other embodiments of the analog-to-digital signal compensation method of the present invention, the first signal source can be an analog signal source, and the second signal source can be a digital signal source. The analog signal source performs white balance adjustment, and then the parameter acquisition module 10 obtains the white balance parameter of the analog signal source, so as to obtain the corresponding white balance parameter of the digital signal source according to the white balance parameter of the analog signal, and the execution process is basically the same as in this embodiment .
判断模块20,用于判断白平衡参数中的绿基色增益值是否小于第一信号源对应的第一阈值;A judging module 20, configured to judge whether the green primary color gain value in the white balance parameter is smaller than the first threshold corresponding to the first signal source;
基于亮度公式(例如,模拟信号下:Y1=0.3R+0.6G+0.1B;数字信号下:Y2=0.21R+0.72G+0.07B,其中Y1为模拟信号下的亮度,Y2为数字信号下的亮度,R为红基色增益值,G为绿基色增益值,B为蓝基色增益值),绿基色增益值对数字信号的亮度贡献最大,红基色增益值贡献次之,蓝基色增益值贡献最小,故判断模块20先判断获取的白平衡参数(第一信号源(在本实施例中第一信号源为数字信号源)的白平衡参数)中的绿基色增益值是否小于第一信号源对应的第一阈值(该第一阈值可以是用户设置或者终端自动设置),若第一信号源的绿基色增益值小于第一阈值,表明绿基色增益过小,第二信号源基于该绿基色增益所得到的亮度可能会偏小,故需要增大模块30对该绿基色增益进行增大处理;若第一信号源的绿基色增益大于等于第一阈值,表明绿基色增益足够大,第二信号源基于该绿基色增益所得到的亮度不会偏小,故无需要对该绿基色增益进行增大处理。Based on the brightness formula (for example, under the analog signal: Y1=0.3R+0.6G+0.1B; under the digital signal: Y2=0.21R+0.72G+0.07B, where Y1 is the brightness under the analog signal, Y2 is the brightness under the digital signal luminance, R is the red primary color gain value, G is the green primary color gain value, B is the blue primary color gain value), the green primary color gain value contributes the most to the brightness of the digital signal, the red primary color gain value contributes second, and the blue primary color gain value contributes Therefore, the judging module 20 first judges whether the green primary color gain value in the acquired white balance parameter (the white balance parameter of the first signal source (in this embodiment, the first signal source is a digital signal source)) is smaller than that of the first signal source Corresponding to the first threshold (the first threshold can be set by the user or automatically by the terminal), if the green primary color gain value of the first signal source is less than the first threshold, it indicates that the green primary color gain is too small, and the second signal source is based on the green primary color The brightness obtained by the gain may be relatively small, so the increase module 30 needs to increase the green primary color gain; if the green primary color gain of the first signal source is greater than or equal to the first threshold, it indicates that the green primary color gain is large enough, and the second The brightness obtained by the signal source based on the green primary color gain will not be too small, so there is no need to increase the green primary color gain.
为了更好的理解本方案,对第一阈值的确定进行解释,本发明中的第一阈值是基于亮度公式得到的,数字信号源的第一阈值基于数字信号下的亮度公式得到,模拟信号源的第一阈值基于模拟信号下的亮度公式(亮度公式是基于终端显示屏特性和各类芯片技术参数并经过多次试验或测试得到的)得到,例如数字信号下亮度公式为Y3=0.2126R+0.7152G+0.0722B(Y3为数字信号下的亮度,R为红基色增益值,G为绿基色增益值,B为蓝基色增益值),该数字信号的亮度公式对应的第一阈值为128,即绿基色增益值大于等于128时,包含该绿基色增益值的白平衡参数能够基本保证亮度不会偏小。In order to better understand this solution, the determination of the first threshold is explained. The first threshold in the present invention is obtained based on the brightness formula. The first threshold of the digital signal source is obtained based on the brightness formula under the digital signal. The analog signal source The first threshold value is obtained based on the luminance formula under the analog signal (the luminance formula is obtained based on the characteristics of the terminal display screen and various chip technical parameters and after many experiments or tests). For example, the luminance formula under the digital signal is Y3=0.2126R+ 0.7152G+0.0722B (Y3 is the brightness under the digital signal, R is the red primary color gain value, G is the green primary color gain value, B is the blue primary color gain value), the first threshold value corresponding to the brightness formula of the digital signal is 128, That is, when the green primary color gain value is greater than or equal to 128, the white balance parameters including the green primary color gain value can basically ensure that the brightness will not be too small.
增大模块30,用于当绿基色增益值小于第一阈值时,将绿基色增益值增大至第一阈值,并将白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为第一阈值与绿基色增益值的比值;An increasing module 30, configured to increase the green primary color gain value to the first threshold value when the green primary color gain value is less than the first threshold value, and increase the red primary color gain value and the blue primary color gain value of the white balance parameter by a first value times, the first numerical times is the ratio of the first threshold to the green primary color gain value;
参数设置模块40,用于根据增大后的绿基色增益值、红基色增益值和蓝基色增益值设置终端第二信号源的白平衡参数。The parameter setting module 40 is configured to set the white balance parameter of the second signal source of the terminal according to the increased green primary color gain value, red primary color gain value and blue primary color gain value.
在判断模块20判定第一信号源的白平衡参数中绿基色增益值小于第一信号源对应的第一阈值时,表明第一信号源的白平衡参数应用到第二信号源可能会导致第二信号源显示的图像亮度偏低,故增大模块30将该第一信号源的白平衡参数中绿基色增益值增大至第一阈值,同时将白平衡参数的红基色增益值和蓝基色增益值增大第一数值倍,该第一数值倍为第一阈值与绿基色增益值的比值。例如第一信号源的白平衡参数中红基色增益值R1=2、绿基色增益值G1=4,蓝基色增益值B1=1,第一信号源对应的第一阈值为8,则G1调整为8,第一数值倍为2,R1调整为4,B1调整为2,即增大后的红基色增益值R2=4,增大后的绿基色增益值G2=8,增大后的蓝基色增益值B2=2,然后将R2、G2、B2作为第二信号源的白平衡参数。在在判断模块20判定第一信号源的白平衡参数中绿基色增益值大于等于第一信号源对应的第一阈值时,表明第一信号源的白平衡参数应用到第二信号源不会导致第二信号源显示的图像亮度偏低,故参数设置模块40可直接将第一信号源的白平衡参数作为第二信号源的白平衡参数。When the judging module 20 determines that the green primary color gain value in the white balance parameter of the first signal source is less than the first threshold corresponding to the first signal source, it indicates that the application of the white balance parameter of the first signal source to the second signal source may cause the second The brightness of the image displayed by the signal source is low, so the increase module 30 increases the green primary color gain value in the white balance parameter of the first signal source to the first threshold value, and simultaneously increases the red primary color gain value and the blue primary color gain value of the white balance parameter The value is increased by a first numerical multiple, and the first numerical multiple is the ratio of the first threshold to the green primary color gain value. For example, in the white balance parameters of the first signal source, the red primary color gain value R1=2, the green primary color gain value G1=4, the blue primary color gain value B1=1, and the first threshold corresponding to the first signal source is 8, then G1 is adjusted to 8. The first numerical value is multiplied by 2, R1 is adjusted to 4, and B1 is adjusted to 2, that is, the increased red primary color gain value R2=4, the increased green primary color gain value G2=8, and the increased blue primary color gain value The gain value B2=2, and then R2, G2, and B2 are used as white balance parameters of the second signal source. When the judgment module 20 determines that the green primary color gain value in the white balance parameter of the first signal source is greater than or equal to the first threshold corresponding to the first signal source, it indicates that the application of the white balance parameter of the first signal source to the second signal source will not cause The brightness of the image displayed by the second signal source is relatively low, so the parameter setting module 40 can directly use the white balance parameter of the first signal source as the white balance parameter of the second signal source.
在本实施例中,通过在终端对第一信号源进行白平衡调整后,参数获取模块10获取该终端第一信号源的白平衡参数,然后判断模块20将获取的白平衡参数中的绿基色增益值与该第一信号源对应的第一阈值进行比较,若该绿基色增益值小于第一阈值,则增大模块30将该绿基色增益值增大至第一阈值,并将获取的白平衡参数中红基色增益值和蓝基色增益值增大与绿基色增益值增大倍数相同的倍数,从而在检测到第一信号源的白平衡参数不合理时,对该白平衡参数进行调整,最后参数设置模块40将调整后的白平衡参数作为第二信号源的白平衡参数,从而在保证第二信号源输出图像亮度的前提下,自动实现了对第二信号源白平衡参数的调整,而不需要工厂对终端第二信号源进行费时、效率低的白平衡调整过程,也保证了终端显示亮度不会偏小、能够顺利通过能耗测试。In this embodiment, after the terminal adjusts the white balance of the first signal source, the parameter acquisition module 10 acquires the white balance parameters of the first signal source of the terminal, and then the green primary color in the white balance parameters acquired by the judgment module 20 The gain value is compared with the first threshold value corresponding to the first signal source, and if the green primary color gain value is smaller than the first threshold value, the increasing module 30 increases the green primary color gain value to the first threshold value, and the obtained white In the balance parameter, the red primary color gain value and the blue primary color gain value are increased by the same multiple as the green primary color gain value, so that when the white balance parameter of the first signal source is detected to be unreasonable, the white balance parameter is adjusted. Finally, the parameter setting module 40 uses the adjusted white balance parameter as the white balance parameter of the second signal source, thereby automatically realizing the adjustment of the white balance parameter of the second signal source under the premise of ensuring the output image brightness of the second signal source, There is no need for the factory to perform a time-consuming and inefficient white balance adjustment process on the second signal source of the terminal, and it also ensures that the brightness of the terminal display will not be too small and can pass the energy consumption test smoothly.
进一步地,在本发明模数信号补偿的装置的第一实施例的基础上,提出模数信号补偿的装置的第二实施例,参照图4,在第二实施例中,参数设置模块40包括:Further, on the basis of the first embodiment of the device for analog-to-digital signal compensation of the present invention, a second embodiment of the device for analog-to-digital signal compensation is proposed. Referring to FIG. 4 , in the second embodiment, the parameter setting module 40 includes :
增益值判断单元41,用于判断第一红基色增益值是否小于第一信号源对应的第二阈值;A gain value judging unit 41, configured to judge whether the first red primary color gain value is smaller than a second threshold corresponding to the first signal source;
第一增益增大单元42,用于当第一红基色增益值小于第二阈值时,将第一红基色增益值增大至第二阈值,其中增大后的第一红基色增益值作为第二红基色增益值;The first gain increasing unit 42 is configured to increase the first red primary color gain value to the second threshold value when the first red primary color gain value is less than the second threshold value, wherein the increased first red primary color gain value is used as the first red primary color gain value Gain value of two red primary colors;
第二增益增大单元43,用于将第一蓝基色增益值增大第二数值倍,该第二数值为第二阈值与第一红基色增益值的比值,其中增大后的第一蓝基色增益值作为第二蓝基色增益值;The second gain increasing unit 43 is used to increase the gain value of the first blue primary color by a second numerical value, and the second numerical value is the ratio of the second threshold value to the first red primary color gain value, wherein the increased first blue The primary color gain value is used as the second blue primary color gain value;
参数设置单元44,用于根据第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置终端第二信号源的白平衡参数。The parameter setting unit 44 is configured to set the white balance parameter of the second signal source of the terminal according to the first green primary color gain value, the second red primary color gain value and the second blue primary color gain value.
在判定第一信号源的白平衡参数中绿基色增益值小于第一阈值时,对绿基色增益增大至第一信号源对应的第一阈值得到第一绿基色增益值,并同比例增大对应的红基色增益值和蓝基色增益值后得到第一红基色增益值和第一蓝基色增益值,然后增益值判断单元41将第一红基色增益值与第一信号源对应的第二阈值(第二阈值的确定过程与第一阈值基本相同)进行比较,当第一红色增益值小于第二阈值时,表明将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源可能会导致第二信号源显示的图像亮度偏低,故第一增益增大单元42将第一红色增益值增大至第二阈值得到第二红色增益值,同时第二增益增大单元43将第一蓝色增益值增大第二数值倍得到第二蓝色增益值,该第二数值为第二阈值与第一红基色增益值的比,参数设置单元44将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。当第一红色增益值大于等于第二阈值时,表明将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值应用到第二信号源不会导致第二信号源显示的图像亮度偏低,故参数设置单元44可直接将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源的白平衡参数。When it is determined that the green primary color gain value in the white balance parameter of the first signal source is less than the first threshold value, the green primary color gain is increased to the first threshold value corresponding to the first signal source to obtain the first green primary color gain value, and increase in the same proportion After the corresponding red primary color gain value and blue primary color gain value, the first red primary color gain value and the first blue primary color gain value are obtained, and then the gain value judging unit 41 compares the first red primary color gain value with the second threshold value corresponding to the first signal source (the determination process of the second threshold is basically the same as the first threshold) for comparison, when the first red gain value is less than the second threshold, it indicates that the first green primary color gain value, the first red primary color gain value and the first blue primary color gain value value as the second signal source may cause the brightness of the image displayed by the second signal source to be low, so the first gain increasing unit 42 increases the first red gain value to the second threshold to obtain the second red gain value, while the second The gain increasing unit 43 increases the first blue gain value by a second numerical value to obtain a second blue gain value, and the second numerical value is the ratio of the second threshold value to the first red primary color gain value, and the parameter setting unit 44 sets the first blue gain value to A green primary color gain value, a second red primary color gain value and a second blue primary color gain value are set as white balance parameters of the second signal source of the terminal. When the first red gain value is greater than or equal to the second threshold value, it indicates that applying the first green primary color gain value, the first red primary color gain value and the first blue primary color gain value to the second signal source will not cause the second signal source to display The brightness of the image is relatively low, so the parameter setting unit 44 can directly use the first green primary color gain value, the first red primary color gain value, and the first blue primary color gain value as white balance parameters of the second signal source.
接上述参数设置模块40的例子,第一红基色增益值R2=4,第一绿基色增益值G2=8,第一蓝基色增益值B2=2,若第二阈值为6,则将R2调整至6,G2不变,B2调整为3,即第二红基色增益值R3=6,第二蓝基色增益值B3=3,并将R3、G2、B3作为第二信号源的白平衡参数。Following the example of the above parameter setting module 40, the first red primary color gain value R2=4, the first green primary color gain value G2=8, the first blue primary color gain value B2=2, if the second threshold value is 6, then adjust R2 To 6, G2 remains unchanged, B2 is adjusted to 3, that is, the second red primary color gain value R3=6, the second blue primary color gain value B3=3, and R3, G2, and B3 are used as white balance parameters of the second signal source.
在本实施例中,通过增益值判断单元41进一步判断第一信号源的第一红基色增益值是否小于第二阈值,若第一红基色增益值小于第二阈值,则第一增益增大单元42将第一红基色增益值增大至第二阈值得到第二红基色增益值,同时第二增益增大单元43将第一蓝基色增益值增大第二数值倍得到第二蓝基色增益值,并参数设置单元44将第一绿基色增益值、第一红基色增益值和第一蓝基色增益值作为第二信号源的白平衡参数,从而在保证绿基色增益值足够大时,进一步保证红基色增益值足够大,能辅助绿基色增益值来保证终端第二信号源的亮度,进一步保证终端通过能耗测试。In this embodiment, the gain value judging unit 41 further judges whether the first red primary color gain value of the first signal source is smaller than the second threshold value, and if the first red primary color gain value is smaller than the second threshold value, the first gain increasing unit 42 increasing the gain value of the first primary red color to the second threshold to obtain a second primary color gain value of red, and at the same time, the second gain increasing unit 43 increases the gain value of the first primary color blue by a second numerical value to obtain a second primary color gain value of blue , and the parameter setting unit 44 uses the first green primary color gain value, the first red primary color gain value and the first blue primary color gain value as the white balance parameters of the second signal source, so as to further ensure that the green primary color gain value is large enough The red primary color gain value is large enough to assist the green primary color gain value to ensure the brightness of the second signal source of the terminal, and further ensure that the terminal passes the energy consumption test.
进一步地,在本发明模数信号补偿的装置的第二实施例的基础上,提出模数信号补偿的装置的第三实施例,在第三实施例中,Further, on the basis of the second embodiment of the device for analog-to-digital signal compensation of the present invention, a third embodiment of the device for analog-to-digital signal compensation is proposed. In the third embodiment,
参数设置单元44包括:Parameter setting unit 44 comprises:
比值判断单元441,用于判断第二红基色增益值是否大于第一信号源对应的红增益极值;A ratio judging unit 441, configured to judge whether the second red primary color gain value is greater than the red gain extreme value corresponding to the first signal source;
第一次级设置单元442,用于当第二红基色增益值大于第一信号源对应的红增益极值时,将第二红基色增益值减小至红增益极值而获取第三红基色增益值,并将第一绿基色增益值、第三红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。The first secondary setting unit 442 is used to reduce the gain value of the second primary red color to the extreme red gain value to obtain the third primary red color when the gain value of the second primary red color is greater than the extreme red gain value corresponding to the first signal source gain value, and set the first green primary color gain value, the third red primary color gain value, and the second blue primary color gain value as white balance parameters of the second signal source of the terminal.
在第一信号源的红基色增益值经过两次调整后得到第二红基色增益值时,比值判断单元441判断该第二红基色增益值是否大于第一信号源对应的红增益极值,若第二红基色增益值大于红增益极值,表明包含第二红基色增益值的白平衡参数所显示的图像会偏红,第一次级设置单元442将第二红基色增益值减小至红增益极值而将减小后的第二红基色增益值作为第三红基色增益值,第二蓝基色增益值不变,然后将第一绿基色增益值、第三红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。When the red primary color gain value of the first signal source is adjusted twice to obtain the second red primary color gain value, the ratio judging unit 441 judges whether the second red primary color gain value is greater than the corresponding red gain extreme value of the first signal source, if The second red primary color gain value is greater than the red gain extreme value, indicating that the image displayed by the white balance parameter including the second red primary color gain value will be reddish, and the first secondary setting unit 442 reduces the second red primary color gain value to red Gain extreme value and take the reduced second red primary color gain value as the third red primary color gain value, the second blue primary color gain value remains unchanged, and then use the first green primary color gain value, the third red primary color gain value and the second primary color gain value The blue primary color gain value is set as the white balance parameter of the second signal source of the terminal.
在本实施例中,在对绿基色增益值进行一次调整、对红基色增益值和蓝基色增益值进行二次调整后,比值判断单元441进一步将经两次调整后得到的第二红基色增益值红增益极值进行比较,防止第二红基色增益值过大而导致包含第二红基色增益值的白平衡参数所显示的图像偏红,保证第二信号源获取的白平衡参数所显示的图像色度适中。In this embodiment, after the first adjustment of the green primary color gain value and the secondary adjustment of the red primary color gain value and the blue primary color gain value, the ratio judging unit 441 further adjusts the second red primary color gain obtained after two adjustments Compared with the red gain extreme value, the image displayed by the white balance parameters including the second red primary color gain value will be reddish to prevent the second red primary color gain value from being too large, so as to ensure that the white balance parameters obtained by the second signal source are displayed. The color of the image is moderate.
进一步地,在本发明模数信号补偿的装置的第三实施例的基础上,提出模数信号补偿的装置的第四实施例,在第四实施例中,参数设置单元44还包括:Further, on the basis of the third embodiment of the device for analog-to-digital signal compensation of the present invention, a fourth embodiment of the device for analog-to-digital signal compensation is proposed. In the fourth embodiment, the parameter setting unit 44 further includes:
第二次级设置单元443,用于当第二红基色增益值小于或等于第一信号源对应的红增益极值时,将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。The second secondary setting unit 443 is configured to set the first green primary color gain value, the second red primary color gain value and the second blue The primary color gain value is set as the white balance parameter of the second signal source of the terminal.
在第一信号源的红基色增益值经过两次调整后得到第二红基色增益值时,比值判断单元441判断该第二红基色增益值是否大于第一信号源对应的红增益极值,若第二红基色增益值小于或等于红增益极值,表明包含第二红基色增益值的白平衡参数所显示的图像色度适中,无需对第二红基色增益值进行调整,进而第二次级设置单元443将第一绿基色增益值、第二红基色增益值以及第二蓝基色增益值设置为终端第二信号源的白平衡参数。When the red primary color gain value of the first signal source is adjusted twice to obtain the second red primary color gain value, the ratio judging unit 441 judges whether the second red primary color gain value is greater than the corresponding red gain extreme value of the first signal source, if The gain value of the second primary red color is less than or equal to the extreme value of the red primary color, indicating that the image chromaticity displayed by the white balance parameters including the gain value of the second primary red color is moderate, and there is no need to adjust the gain value of the second primary red color, and then the second secondary The setting unit 443 sets the first green primary color gain value, the second red primary color gain value, and the second blue primary color gain value as white balance parameters of the second signal source of the terminal.
在本实施例中,在对绿基色增益值进行一次调整、对红基色增益值和蓝基色增益值进行二次调整后,比值判断单元441进一步将经两次调整后得到的第二红基色增益值红增益极值进行比较,防止第二红基色增益值过大而导致包含第二红基色增益值的白平衡参数所显示的图像偏红,保证第二信号源获取的白平衡参数所显示的图像色度适中。In this embodiment, after the first adjustment of the green primary color gain value and the secondary adjustment of the red primary color gain value and the blue primary color gain value, the ratio judging unit 441 further adjusts the second red primary color gain obtained after two adjustments Compared with the red gain extreme value, the image displayed by the white balance parameters including the second red primary color gain value will be reddish to prevent the second red primary color gain value from being too large, so as to ensure that the white balance parameters obtained by the second signal source are displayed. The color of the image is moderate.
进一步地,在本发明模数信号补偿的装置的第三或第四实施例的基础上,模数信号补偿的装置还包括:Further, on the basis of the third or fourth embodiment of the device for analog-to-digital signal compensation of the present invention, the device for analog-to-digital signal compensation further includes:
偏色检测模块50,用于根据色度系统检测设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色;若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整第一阈值、第二阈值和/或红增益极值,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值。The color cast detection module 50 is used to detect whether color cast occurs in the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value set as the white balance parameter of the terminal second signal source according to the chromaticity system; if set If the image formed by the green primary color gain value, the red primary color gain value, and the blue primary color gain value of the white balance parameter of the second signal source of the terminal has a color cast, then adjust the first threshold, the second threshold and/or the extreme value of the red gain, To adjust the green primary color gain value, red primary color gain value and blue primary color gain value set as the white balance parameter of the terminal's second signal source.
在本实施例中,色度系统可以采用1931CIE-XYZ标准色度系统(即CIE-XYZ色度系统),在第二信号源获取经过调整后的第一信号源对应白平衡参数后,参数获取模块10获取调整后的白平衡参数中的绿基色增益值、红基色增益值以及蓝基色增益值,然后偏色检测模块50将第二信号源获取的绿基色增益值(G)、红基色增益值(R)以及蓝基色增益值(B)从CIE-RGB色度系统中的值转同转换为CIE-XYZ色度系统中的值,偏色检测模块50判断获取的绿基色增益值(G)、红基色增益值(R)以及蓝基色增益值(B)对应CIE-XYZ色度系统中的值是否达标,即基于CIE-XYZ色度系统判断设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色。In this embodiment, the chromaticity system can adopt the 1931CIE-XYZ standard chromaticity system (that is, the CIE-XYZ chromaticity system). After the second signal source obtains the adjusted white balance parameters of the first signal source, the parameter acquisition The module 10 acquires the green primary color gain value, the red primary color gain value, and the blue primary color gain value in the adjusted white balance parameters, and then the color cast detection module 50 obtains the green primary color gain value (G), red primary color gain value (G), and the red primary color gain value obtained by the second signal source. The value (R) and the blue primary color gain value (B) are converted from the value in the CIE-RGB chromaticity system to the value in the CIE-XYZ chromaticity system, and the color cast detection module 50 judges the green primary color gain value (G ), the red primary color gain value (R) and the blue primary color gain value (B) correspond to whether the values in the CIE-XYZ chromaticity system are up to standard, that is, based on the CIE-XYZ chromaticity system, it is judged that the white balance parameter set as the second signal source of the terminal Whether the image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value has a color cast.
若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则偏色检测模块50增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个,并在增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个后,重新执行本发明模数信号补偿的方法的第一、第二、第三或第四实施例中的步骤,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值,并再次根据色度系统(例如CIE-XYZ色度系统)检测当前设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色;若没有发生偏色,则保存当前设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值;若有发生偏色,则继续增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个,直至当前第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像不发生偏色。If the image formed by the green primary color gain value, the red primary color gain value, and the blue primary color gain value set as the white balance parameter of the second signal source of the terminal has a color cast, the color cast detection module 50 increases or decreases the first threshold, One or more of the three values of the second threshold and the red gain extremum, and after increasing or decreasing one or more of the three values of the first threshold, the second threshold and the red gain extremum, re-execute The steps in the first, second, third or fourth embodiment of the method for analog-to-digital signal compensation of the present invention are to adjust the green primary color gain value, the red primary color gain value and the white balance parameter set as the terminal second signal source. The gain value of the blue primary color, and again according to the chromaticity system (such as the CIE-XYZ chromaticity system), detects the green primary color gain value, the red primary color gain value and the blue primary color gain value that are currently set as the white balance parameters of the second signal source of the terminal. Whether color cast occurs in the image; if there is no color cast, save the green primary color gain value, red primary color gain value and blue primary color gain value currently set as the white balance parameter of the second signal source of the terminal; if there is color cast, then Continue to increase or decrease one or more of the three values of the first threshold, the second threshold and the red gain extreme value until the green primary color gain value, red primary color gain value and blue primary color gain value of the current white balance parameter of the second signal source. The image formed by the primary color gain value does not have a color cast.
此外,增大或减小第一阈值、第二阈值和红增益极值三个值中的一个或多个的调整过程中,增大或减小对象的先后顺序、增大或减小的幅度大小均可根据实际需求设定,例如是先增大第一阈值、还是先增大第二阈值可以实际需求设定。In addition, during the adjustment process of increasing or decreasing one or more of the three values of the first threshold, the second threshold and the red gain extremum, the order of the objects, the magnitude of the increase or decrease are increased or decreased The size can be set according to actual needs, for example, whether to first increase the first threshold or first increase the second threshold can be set according to actual needs.
在本实施例中,通过在初步设置了终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值之后,偏色检测模块50根据色度系统检测设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像是否发生偏色,若设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像发生偏色,则调整第一阈值、第二阈值和/或红增益极值,以调整设置为终端第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值而避免显示偏色的图像,采用经验值(例如第一阈值、第二阈值或红增益极值)和实际色度检测相结合的方案,避免因终端硬件和软件的差异不适应经验值而使第二信号源基于所获取的白平衡参数显示图像发生偏色,也能够根据终端硬件和软件实际情况去调整经验值,使设置为第二信号源的白平衡参数的绿基色增益值、红基色增益值以及蓝基色增益值所形成的图像不发生偏色。In this embodiment, after preliminarily setting the green primary color gain value, red primary color gain value, and blue primary color gain value of the white balance parameter of the second signal source of the terminal, the color cast detection module 50 is set as the terminal according to the chromaticity system detection. Whether the image formed by the green primary color gain value, red primary color gain value, and blue primary color gain value of the white balance parameter of the second signal source has a color cast, if it is set as the green primary color gain value of the white balance parameter of the second signal source of the terminal, If the image formed by the red primary color gain value and the blue primary color gain value has a color cast, then adjust the first threshold, the second threshold and/or the red gain extreme value to adjust the green primary color set as the white balance parameter of the second signal source of the terminal gain value, red primary color gain value, and blue primary color gain value to avoid displaying color cast images, and adopt a scheme that combines empirical values (such as the first threshold value, second threshold value, or red gain extreme value) with actual chromaticity detection to avoid The difference between the terminal hardware and software does not adapt to the empirical value, causing the second signal source to display a color cast based on the obtained white balance parameters. It is also possible to adjust the empirical value according to the actual situation of the terminal hardware and software, so that it is set as the second signal source. The image formed by the green primary color gain value, the red primary color gain value and the blue primary color gain value of the white balance parameter does not have color cast.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods of various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510623623.9A CN105141934B (en) | 2015-09-25 | 2015-09-25 | Method and device for analog-to-digital signal compensation |
PCT/CN2016/084290 WO2017049949A1 (en) | 2015-09-25 | 2016-06-01 | Analog/digital signal compensation method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510623623.9A CN105141934B (en) | 2015-09-25 | 2015-09-25 | Method and device for analog-to-digital signal compensation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105141934A CN105141934A (en) | 2015-12-09 |
CN105141934B true CN105141934B (en) | 2017-07-25 |
Family
ID=54727129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510623623.9A Active CN105141934B (en) | 2015-09-25 | 2015-09-25 | Method and device for analog-to-digital signal compensation |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105141934B (en) |
WO (1) | WO2017049949A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105141934B (en) * | 2015-09-25 | 2017-07-25 | 深圳Tcl数字技术有限公司 | Method and device for analog-to-digital signal compensation |
CN107610180B (en) * | 2017-09-12 | 2020-03-13 | 上海小蚁科技有限公司 | AWB calibration method and device, computer-readable storage medium and terminal |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3397436B2 (en) * | 1994-04-13 | 2003-04-14 | 富士写真フイルム株式会社 | Video camera white balance device |
JP3138152B2 (en) * | 1994-08-30 | 2001-02-26 | 三洋電機株式会社 | White balance adjustment device |
CN100477810C (en) * | 2004-12-30 | 2009-04-08 | 熊猫电子集团有限公司 | High definition color TV variable debugging method |
CN101340596A (en) * | 2007-07-04 | 2009-01-07 | 深圳Tcl新技术有限公司 | Apparatus and system for white balance debugging |
US20090160833A1 (en) * | 2007-12-21 | 2009-06-25 | Microvision, Inc. | Laser Projection White Balance Tracking |
CN201278571Y (en) * | 2008-10-31 | 2009-07-22 | 天津三星电子有限公司 | White balance automatic regulation system |
CN102572206B (en) * | 2010-12-31 | 2015-05-13 | 比亚迪股份有限公司 | Color correction method |
CN102164290B (en) * | 2011-04-22 | 2012-12-19 | 格科微电子(上海)有限公司 | Method and device for automatically compensating white balance dark area |
CN103414905B (en) * | 2013-08-08 | 2015-07-01 | 京东方科技集团股份有限公司 | White balance data adjusting method, device and system |
CN103501430B (en) * | 2013-09-29 | 2016-04-13 | 京东方科技集团股份有限公司 | The automatic white balance adjustment method of liquid crystal display and device |
CN104394392B (en) * | 2014-11-14 | 2016-09-28 | 广东欧珀移动通信有限公司 | A kind of white balance adjusting method, device and terminal |
CN104392696A (en) * | 2014-12-01 | 2015-03-04 | 苏州立瓷电子技术有限公司 | White balance adjusting method of LED display screen |
CN105141934B (en) * | 2015-09-25 | 2017-07-25 | 深圳Tcl数字技术有限公司 | Method and device for analog-to-digital signal compensation |
-
2015
- 2015-09-25 CN CN201510623623.9A patent/CN105141934B/en active Active
-
2016
- 2016-06-01 WO PCT/CN2016/084290 patent/WO2017049949A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2017049949A1 (en) | 2017-03-30 |
CN105141934A (en) | 2015-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11375128B2 (en) | Method for obtaining exposure compensation values of high dynamic range image, terminal device and non-transitory computer-readable storage medium | |
CN103106884B (en) | A kind of method and system improving the visual angle colour of skin colour cast of liquid crystal display | |
US9858895B2 (en) | Method for adjusting screen brightness and system thereof | |
TWI399100B (en) | Image processing method | |
WO2016149877A1 (en) | Method for correcting screen asymmetry and device and system thereof | |
CN106448612A (en) | Electronic device, processor and color compensation method | |
US20120062586A1 (en) | Projector and color improvement method of the projector | |
CN102158727B (en) | Method and system for detecting color reducibility of camera of mobile phone | |
CN101226731A (en) | Method for carrying out color adaptation during image display and corresponding display circuit and device | |
WO2021218603A1 (en) | Image processing method and projection system | |
US20110187891A1 (en) | Methods and Systems for Automatic White Balance | |
US9161000B2 (en) | Light parameter measurement method and device, screen adjustment method and electronic device | |
CN100468495C (en) | Display device capable of compensating ambient brightness | |
CN104200791A (en) | Fast adaptive white balance correction method | |
CN103763537A (en) | Method and device for dynamically regulating display image quality | |
US9305519B2 (en) | Image color adjusting method and electronic device using the same | |
CN110073431B (en) | Unevenness correction system, unevenness correction device, and panel drive circuit | |
CN105141934B (en) | Method and device for analog-to-digital signal compensation | |
TWI485694B (en) | Image color adjusting method and electronic apparatus thereof | |
CN107027017A (en) | A kind of method of adjustment, device, picture processing chip and the storage device of image white balance | |
CN109509161B (en) | Image enhancement device and image enhancement method | |
CN108668122A (en) | Color rendition method and equipment for spectral response curve | |
EP2802139B1 (en) | Image color adjusting method and electronic device using the same | |
US8284316B2 (en) | Real-time image processing circuit capable of enhancing brightness contrast and color saturation | |
CN104464604A (en) | Display panel parameter setting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |