Method for converting RGB (Red Green blue) into RGBW (Red Green blue white)

文档序号:1674017 发布日期:2019-12-31 浏览:30次 中文

阅读说明:本技术 一种rgb转rgbw的转换方法 (Method for converting RGB (Red Green blue) into RGBW (Red Green blue white) ) 是由 赵国才 帅杰 于 2019-09-18 设计创作,主要内容包括:本发明公开了一种RGB转RGBW的转换方法,涉及图像显示技术领域。包括以下步骤:S1:获取当前R、G、B图像中每帧画面的各个像素点的R、G、B信号的灰阶值;S2:将S1中的灰阶值转化成亮度值;S3:将S2中的亮度值进行归一化处理,得到归一化处理后的各个像素点的R、G、B原始分量值;S4:根据各个像素点的R、G、B原始分量值,和各个像素点的R、G、B原始分量值中的最大值,计算当前像素的R、G、B、W分量值。解决了现有将RGB转为RGBW的计算方式,虽然实现了RGBW的转换,但是由于添加了W信号,使得亮度增加,却导致了对比度的下降的问题。(The invention discloses a conversion method for converting RGB (red, green and blue) into RGBW (red, green and blue), and relates to the technical field of image display. The method comprises the following steps: s1: acquiring a gray-scale value of R, G, B signals of each pixel point of each frame of picture in a current R, G, B image; s2: converting the gray scale value in S1 into a brightness value; s3: normalizing the brightness value in the S2 to obtain R, G, B original component values of each pixel point after normalization; s4: and calculating the R, G, B, W component value of the current pixel according to the R, G, B original component values of the pixels and the maximum value in the R, G, B original component values of the pixels. The method solves the problem that although the conversion of the RGBW is realized in the existing calculation mode of converting RGB into the RGBW, the contrast is reduced due to the fact that the brightness is increased because the W signal is added.)

1. A conversion method for converting RGB into RGBW is characterized by comprising the following steps:

s1: acquiring a gray scale value of R, G, B signals of each pixel point in the current RGB image;

s2: converting the gray scale value in S1 into a brightness value;

s3: normalizing the brightness value in the S2 to obtain R, G, B original component values of each pixel point after normalization;

s4: calculating a R, G, B, W component value of the current pixel according to the R, G, B original component values of the pixels and the maximum value of the R, G, B original component values of the pixels; the R, G, B, W component value of the current pixel is specifically:

Wo=Wt α;0<α≤10;

Figure FDA0002205505700000011

Figure FDA0002205505700000012

the Rin is a red channel original component value of each pixel point, Gin is a green channel original component value of each pixel point, and Bin is a blue channel original component value of each pixel point; MAX is the maximum value in R, G, B original component values of each pixel point; w0For the current component value, R, of the white channel of each pixel0Is the current component value, G, of the red channel of each pixel0Is the current component value, B, of the green channel of each pixel0Is the current component value, W, of the blue channel of each pixel pointtIs the luminance physical value of R, G, B image.

2. The method as claimed in claim 1, wherein the method comprises:the brightness physical value Wt=0.299×Rin+0.587×Gin+0.114×Bin。

3. The method as claimed in claim 1, wherein the method comprises: the brightness physical value Wt=0.306×Rin+0.601×Gin+0.117×Bin。

4. The method as claimed in claim 1, wherein the method comprises: the R, G, B, W component value of the current pixel is specifically:

Wo=Wt α;α=2;

Figure RE-FDA0002249453620000014

Figure RE-FDA0002249453620000015

Figure RE-FDA0002249453620000016

Technical Field

The invention relates to the technical field of image display, in particular to a conversion method for converting RGB into RGBW.

Background

The electronic paper display, as a reflective display device, has great advantages over the LED display in protecting human eyes, and is theoretically the closest electronic display to paper books. Since the electronic paper display does not emit light, the electronic paper display displays a color image by reflecting light from four color resists of R (red), G (green), B (blue), and W (white). The existing images are synthesized by R, G, B three signals, and no W-containing signal exists, so that the light transmittance and the light mixing efficiency are low, and the color rendering performance of white light formed by mixing is weak. And because the electronic paper display does not emit light, increasing the W signal can improve the brightness, but the improvement of the brightness inevitably reduces the contrast.

However, although the conventional computing method for converting RGB into RGBW realizes the conversion of RGBW, the luminance is increased due to the addition of the W signal, which results in the decrease of contrast.

Disclosure of Invention

The invention aims to: the method for converting RGB into RGBW is provided, and solves the problem that although the conversion of RGBW is realized in the existing calculation mode for converting RGB into RGBW, the brightness is increased due to the addition of a W signal, but the contrast is reduced.

The technical scheme adopted by the invention is as follows:

a conversion method for converting RGB into RGBW comprises the following steps:

s1: acquiring a gray scale value of R, G, B signals of each pixel point in the current RGB image;

s2: converting the gray scale value in S1 into a brightness value;

s3: normalizing the brightness value in the S2 to obtain R, G, B original component values of each pixel point after normalization;

s4: calculating R of the current pixel according to R, G, B original component values of all the pixel points and the maximum value of R, G, B original component values of all the pixel pointso、Go、Bo、WoA component value; wherein R of the current pixelo、Go、Bo、WoThe component values are specifically:

Wo=Wt α;0<α≤10;

Figure BDA0002205505710000012

Figure BDA0002205505710000013

the Rin is a red channel original component value of each pixel point, Gin is a green channel original component value of each pixel point, and Bin is a blue channel original component value of each pixel point; MAX is the maximum value in R, G, B original component values of each pixel point; woFor the current component value, R, of the white channel of each pixeloIs the current component value, G, of the red channel of each pixeloIs the current component value, B, of the green channel of each pixeloIs the current component value, W, of the blue channel of each pixel pointtIs the luminance physical value of R, G, B image.

Since all colors in nature can be obtained by combining different intensities of three color wavelengths of red (R), green (G) and blue (B), this is what is commonly referred to as the three primary color principle. In digital images, 8-bit encoding of each of the three RGB primaries constitutes about 16.7 ten thousand colors, and most displays create their colors based on the RGB color pattern. That is, when an image is opened, the RGB value of each pixel point of the image is actually obtained.

To realize the conversion from RGB to RGBW, firstly, a gray scale value of R, G, B signals of each pixel point in a current RGB image needs to be acquired, the acquired gray scale value is converted into a brightness value, then normalization processing is performed on the brightness value, and the brightness value of R, G, B signals, which originally ranges from 0 to 255, is mapped between 0 and 1 to obtain R, G, B original component values of each pixel point after normalization processing; then, according to R, G, B original component values of all the pixel points and the maximum value in R, G, B original component values of all the pixel points, R of the current pixel is calculatedo、Go、Bo、WoThe component values.

The W component value must satisfy the brightness value of 0 in black and the maximum value in white to ensure that the maximum contrast difference is constant. The RGB signal must be properly signal enhanced based on the W signal to ensure that the contrast is not degraded.

Further, the luminance physical value Wt=0.299×Rin+0.587×Gin+0.114×Bin。

Further, the luminance physical value Wt=0.306×Rin+0.601×Gin+0.117×Bin。

Further, R of the current pixelo、Go、Bo、WoThe component values are specifically:

Wo=Wt α;α=2;

Figure BDA0002205505710000023

when α is 2, the best effect can be obtained. From the experimental results, it can be known that the brightness is increased after appropriate signal enhancement is performed according to the W signal, and the original contrast is not changed.

In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:

1. the invention relates to a conversion method for converting RGB into RGBW, WoThe signal is calculated according to the input original R, G, B signal to obtain brightness, the input original R, G, B signal is subjected to signal enhancement processing according to a certain algorithm, and the output current R iso、Go、Bo、WoThe signal achieves the purposes of increasing the brightness and keeping the original contrast.

Drawings

The invention will now be described, by way of example, with reference to the accompanying drawings, in which:

FIG. 1 is a flow chart of the method of the present invention.

Detailed Description

All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.

It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The present invention will be described in detail with reference to fig. 1.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:家用电器显示屏的亮度调节方法、家用电器和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类