Sub-pixel rendering method and system for RGBG type display panel
By establishing an interpolation algorithm and calculating weight factors in the RGBG structure display panel, the problem of image information loss and edge blur is solved, and the display quality and conversion speed are improved.
Patent Information
- Application Number
- CN202211411060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-11-11
AI Technical Summary
RGBG structure display panels cause image information loss, edge blur and display quality problems, which are difficult to effectively solve with existing technology.
By establishing an interpolation algorithm formula for the target sub-pixel value in the target pixel, the weight factor is calculated based on the gray value of the source pixel, and the sub-pixel value of the target pixel is weighted and calculated using sub-pixel borrowing to reduce information loss and edge blur.
Effectively reduce image information loss, eliminate color edge effects, reduce edge blur, increase conversion speed, and improve the image display quality of AMOLED display panels.
Smart Images

Figure CN116095398B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image display technology, and in particular to a sub-pixel rendering method and system for an RGBG type display panel. Background Art
[0002] The RGB (Red Green Blue) sub-pixels of the AMOLED (Active-matrix organic light-emitting diode) screen are made of red, green and blue self-luminous organic materials. Technicians in this field often solve the problems of high production cost and increased difficulty in driving circuit design by changing the sub-pixel arrangement and reducing the number of sub-pixels.
[0003] In the prior art, the sub-pixel arrangement structure includes many types such as RGB-stripe structure, RGB-delta structure, RGBG structure, etc. Among them, in the RGBG structure, each pixel unit is composed of two sub-pixels RG or BG. If a direct mapping method is adopted, serious information loss, color fringing and other problems will occur. If a weighted interpolation rendering method is adopted, there is a problem of slow pixel-by-pixel processing conversion speed; if the weight factor is fixed and the image texture information is not considered, it will cause problems such as blurred image edges. These problems will result in the inability to display RGB images normally. Therefore, it is necessary to render the sub-pixels to determine the grayscale value of each sub-pixel on the panel, obtain the processed image, and then drive the circuit to display it on the panel. Summary of the invention
[0004] One of the purposes of the present invention is to overcome the deficiencies in the prior art. Aiming at the problem that display panels arranged in an RGBG structure in the prior art are prone to image information loss and image edge blur, thereby affecting display quality, a sub-pixel rendering method and system for an RGBG display panel are provided.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0006] In a first aspect, the present invention provides a sub-pixel rendering method for an RGBG display panel, the method comprising:
[0007] According to the mapping relationship between the source pixel of the source image and the target pixel of the target image on the RGBG type display panel, an interpolation algorithm formula of the target sub-pixel value of the target image sub-pixel in the target pixel is established;
[0008] Based on the grayscale value of each of the source pixels, the weight factor in the interpolation algorithm formula is calculated by determining the magnitude relationship between the grayscale value deviation between two adjacent source pixels and a preset threshold condition;
[0009] According to the weight factor, the target sub-pixel value of each target image sub-pixel in each target pixel is weightedly calculated using the interpolation algorithm formula.
[0010] In a preferred embodiment of the present application, according to the mapping relationship between the source pixel of the source image and the target pixel of the target image on the RGBG type display panel, an interpolation algorithm formula for the target sub-pixel value of the target image sub-pixel in the target pixel is established, specifically including:
[0011] Acquire a source image and a target image of an RGBG type display panel, wherein the source image includes a plurality of source pixels, each of which includes source image sub-pixels of three color channels of red, green and blue; and the target image includes a plurality of target pixels, each of which includes target image sub-pixels of two color channels of red and green or two color channels of blue and green;
[0012] Establishing a rendering unit, selecting a source image window in the source image and a target image window in the target image respectively, wherein the source image window includes 4×2 source pixels and the target image window includes 4×2 target pixels;
[0013] Establishing a mapping relationship between the source pixels and the target pixels according to a ratio of the number of the source pixels to the target pixels in the rendering unit;
[0014] Based on the mapping relationship, an interpolation algorithm formula is established in a sub-pixel borrowing manner.
[0015] In a preferred embodiment of the present application, in establishing an interpolation algorithm formula in a sub-pixel borrowing manner based on the mapping relationship, specifically including:
[0016] Based on the mapping relationship, the mapping coordinates and the target sub-pixel value expression of the target pixel are obtained by direct mapping according to the original coordinates and the original sub-pixel value expression of the source pixel;
[0017] Based on the original sub-pixel value expression and the target sub-pixel value expression, for the even rows and odd rows of the target image window, determine the target image sub-pixel that each target pixel needs to borrow according to the sub-pixel borrowing method;
[0018] For the three color channels of red, green and blue, an interpolation algorithm formula for rendering the source image sub-pixel to the target image sub-pixel is established according to the source image sub-pixel, the target image sub-pixel and the borrowed target image sub-pixel.
[0019] In a preferred embodiment of the present application, the even-numbered rows of the target image window have a first target pixel, a second target pixel, a third target pixel and a fourth target pixel in sequence in the horizontal right direction, and the first target pixel includes a first blue target image sub-pixel B 2i-1,2j and the first green target image sub-pixel G 2i-1,2j , the second target pixel includes a first red target image sub-pixel R 2i,2j and the second green target image sub-pixel G 2i,2j , the third target pixel includes the second blue target image sub-pixel B 2i+1,2j and the third green target image sub-pixel G 2i+1,2j , the fourth target pixel includes the second red target image sub-pixel R 2i+2,2j and the fourth green target image sub-pixel G 2i+2,2j ;
[0020] There are a fifth target pixel, a sixth target pixel, a seventh target pixel and an eighth target pixel in the horizontal right direction of the odd-numbered rows of the target image window, and the fifth target pixel includes the third red target image sub-pixel R 2i-1,2j+1 and the fifth green target image subpixel G 2i-1,2j+1 , the sixth target pixel includes the third blue target image sub-pixel B 2i,2j+1 and the sixth green target image subpixel G 2i,2j+1 , the seventh target pixel includes the fourth red target image sub-pixel R 2i+1,2j+1 and the seventh green target image sub-pixel G 2i+1,2j+1 , the eighth target pixel includes the fourth blue target image sub-pixel B 2i+2,2j+1 and the eighth green target image sub-pixel G 2i+2,2j+1 ;
[0021] Based on the sub-pixel borrowing method, the first target pixel borrows the first red target image sub-pixel R 2i,2j , the second target pixel borrows the second blue target image sub-pixel B 2i+1,2j , the third target pixel borrows the second red target image sub-pixel R 2i+2,2j , the fifth target pixel borrows the third blue target image sub-pixel B 2i,2j+1 , the sixth target pixel borrows the fourth red target image sub-pixel R 2i+1,2j+1 , the seventh target pixel borrows the fourth blue target image sub-pixel B 2i+2,2j+1 .
[0022] In a preferred embodiment of the present application, in the interpolation algorithm formula, the even-numbered rows of the target image window correspond to the first conversion formula, and the odd-numbered rows of the target image window correspond to the second conversion formula.
[0023] In a preferred embodiment of the present application, based on the grayscale value of each of the source pixels, by determining the magnitude relationship between the grayscale value deviation between two adjacent source pixels and a preset threshold condition, the weight factor in the interpolation algorithm formula is calculated, specifically including:
[0024] Obtaining original sub-pixel values of source image sub-pixels of three color channels in each of the source pixels;
[0025] Obtaining the grayscale value of each source pixel according to the original sub-pixel value of the source image sub-pixel of the three color channels;
[0026] According to the grayscale value of each source pixel, respectively calculating the grayscale value deviation between each two adjacent source pixels located in the same odd row or even row;
[0027] Determine the magnitude relationship between the gray value deviation and the upper limit value and the lower limit value in the preset threshold condition;
[0028] When the gray value deviation is greater than the upper limit or less than the lower limit, the weight factor in the interpolation calculation formula is assigned a value of 1;
[0029] When the gray value deviation is not greater than the upper limit value and not less than the lower limit value, the weight factor in the interpolation calculation formula is calculated according to the positional relationship between the target image sub-pixel and the corresponding source pixel.
[0030] In a preferred embodiment of the present application, the weight factor in the interpolation calculation formula is calculated according to the positional relationship between the target image sub-pixel and the corresponding source pixel, specifically including:
[0031] Based on the mapping relationship, determining two adjacent source pixels for interpolating and calculating a target sub-pixel value of a target image sub-pixel through the interpolation algorithm formula;
[0032] Respectively obtain the target image sub-pixel center of the target image sub-pixel, and the source pixel center and source pixel side length of two corresponding adjacent source pixels;
[0033] Based on the side length of the source pixel, respectively calculating the distance between the center of the sub-pixel of the target image and the centers of the two source pixels to obtain a first distance and a second distance;
[0034] A weight factor in the interpolation calculation formula is calculated according to the first distance and the second distance.
[0035] In a second aspect, the present invention provides a sub-pixel rendering system for an RGBG type display panel, the system comprising a mapping module, a first calculation module and a second calculation module connected to each other;
[0036] The mapping module is used to establish an interpolation algorithm formula for a target sub-pixel value of a target image sub-pixel in the target pixel according to a mapping relationship between a source pixel of the source image and a target pixel of the target image on the RGBG type display panel;
[0037] The first calculation module is used to calculate the weight factor in the interpolation algorithm formula based on the gray value of each of the source pixels by determining the magnitude relationship between the gray value deviation between two adjacent source pixels and a preset threshold condition;
[0038] The second calculation module is used to calculate the target sub-pixel value of each target image sub-pixel in each target pixel by weighted calculation using the interpolation algorithm formula according to the weight factor.
[0039] In a third aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the sub-pixel rendering method of the RGBG display panel as described in the first aspect.
[0040] In a fourth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed on a computer, enables the computer to execute the sub-pixel rendering method of an RGBG type display panel as described in the first aspect.
[0041] The sub-pixel rendering method and system of the RGBG display panel disclosed in the present invention can reduce the image information loss before and after sub-pixel rendering, eliminate the color edge effect, reduce edge blur, and improve the conversion speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The present invention is described with the aid of the following drawings:
[0043] Figure 1 is a flow chart of a sub-pixel rendering method of an RGBG type display panel according to Embodiment 1 of the present invention;
[0044] Figure 2 It is a specific flow chart of Step 100 in the sub-pixel rendering method of the RGBG type display panel in Example 1 of the present invention;
[0045] Figure 3 is a schematic diagram of a source image in the sub-pixel rendering method of an RGBG type display panel in Example 1 of the present invention;
[0046] Figure 4is a schematic diagram of a target image in the sub-pixel rendering method of an RGBG type display panel in Example 1 of the present invention;
[0047] Figure 5 is a schematic diagram of a mapping relationship between source pixels and target pixels in a sub-pixel rendering method for an RGBG type display panel according to Embodiment 1 of the present invention;
[0048] Figure 6 It is a specific flow chart of Step 140 in the sub-pixel rendering method of the RGBG type display panel in Example 1 of the present invention;
[0049] Figure 7 It is a schematic diagram of sub-pixel borrowing in a target image window in a sub-pixel rendering method of an RGBG type display panel in Example 1 of the present invention;
[0050] Figure 8 It is a specific flow chart of Step 200 in the sub-pixel rendering method of the RGBG type display panel in Example 1 of the present invention;
[0051] Fig. 9 is a schematic diagram of two adjacent target pixels in the sub-pixel rendering method of the RGBG display panel of Example 1 of the present invention;
[0052] Fig.10 It is a specific flow chart of Step 300 in the sub-pixel rendering method of the RGBG type display panel in Example 1 of the present invention;
[0053] Fig.11 It is a schematic diagram of calculating the weight factor by position relationship in Step 300 in the sub-pixel rendering method of the RGBG type display panel in Example 1 of the present invention;
[0054] Fig.12 It is a schematic diagram of a sub-pixel rendering system of an RGBG display panel according to Example 2 of the present invention.
[0055] Reference numerals:
[0056] 10-rendering unit; 11-source image; 12-source pixel; 13-target image; 14-target pixel; 15-target image sub-pixel; 16-source image sub-pixel; 17-source image window; 18-target image window; 20-mapping module; 30-first calculation module; 40-second calculation module; R-red channel; G-green channel; B-blue channel. DETAILED DESCRIPTION
[0057] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0058] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0059] Example 1
[0060] Embodiment 1 of the present invention discloses a sub-pixel rendering method for an RGBG type display panel, which is used for a single pixel unit in an AMOLED display panel with an RGBG structure consisting of only two sub-pixels and unable to display RGB images normally. By analyzing the characteristics of the RGBG arrangement structure and rendering the sub-pixels, the blurring effect of the image edge is improved, thereby improving the image display quality of the AMOLED display panel.
[0061] See also Figure 1 , the sub-pixel rendering method of this embodiment 1 includes:
[0062] Step 100: establishing an interpolation algorithm formula of a target sub-pixel value of a sub-pixel of the target image in the target pixel according to a mapping relationship between a source pixel of the source image and a target pixel of the target image on the RGBG type display panel;
[0063] Step 200: Based on the grayscale value of each source pixel, the weight factor in the interpolation algorithm formula is calculated by judging the magnitude relationship between the grayscale value deviation between two adjacent source pixels and the preset threshold condition;
[0064] Step 300: According to the weight factor, the target sub-pixel value of each target image sub-pixel in each target pixel is weightedly calculated by the interpolation algorithm formula.
[0065] Specifically, in the process of executing Step 100 to Step 300, the total number of pixels of the source image 11 and the target image 13 is the same. Since the target image 13 is arranged in RGBG mode, each target pixel 14 in the target image 13 has one less target image sub-pixel 15 of a color channel compared to the source pixel 12. Compared to the source image sub-pixel 16, the total number of target image sub-pixels 15 is also 1 / 3 less, but the total number of target pixels 14 is the same as the total number of source pixels 12. Here, the target pixel 14 is not the actual pixel used for display on the target image 13, but the target image sub-pixel 15 of the three color channels R, G, and B arranged in sequence is artificially divided together to form a complete target pixel 14. Therefore, whether in the source image 11 or the target image 13, the pixel division method is the same. Since the number of source pixels 12 and target pixels 14 is the same, a one-to-one correspondence can be formed, and the correspondence is used as the mapping relationship between the source pixels 12 and the target pixels 14, so that the coordinates of the source pixels 12 are mapped to the target pixels 14 to form a corresponding sub-pixel value expression. Through the mapping relationship, a mathematical relationship is established between the target image sub-pixel 15 of the target pixel 14 in the target image 13 and the source image sub-pixel 16 of the source pixel 12 in the source image 11, which is an interpolation algorithm formula to calculate the target sub-pixel value of the target image sub-pixel 15 of the red channel R or the blue channel B missing in each target pixel 14. Since there is often a brightness value and color deviation between the target image 13 and the source image 11, a jump occurs between two adjacent target pixels 14, resulting in edge blurring of the target image 13. Since the target sub-pixel value of each target image sub-pixel 15 of the target pixel 14 in the target image 13 is obtained by interpolation calculation of the source image sub-pixel 16 in the source pixel 12, it is necessary to determine whether the grayscale value deviation between two adjacent source pixels 12 has reached the preset threshold condition, set a suitable weight factor in the area where there is a jump to reduce or even eliminate the edge blur phenomenon, and in the area where there is no jump, set a suitable weight factor for the source image sub-pixel 16 of the two adjacent source pixels 12 used to interpolate the target sub-pixel value of the target image sub-pixel 15 in each target pixel 14. Finally, the weight factor is substituted into the interpolation algorithm formula to obtain the target sub-pixel value of the target image sub-pixel 15 of the red channel R or the blue channel B borrowed in each target pixel 14.
[0066] See also Figure 2 In the sub-pixel rendering method of the first embodiment, step 100 specifically includes:
[0067] Step 110: Get the source image and the target image of the RGBG type display panel.
[0068] Step 120: Establish a rendering unit, select a source image window in the source image and a target image window in the target image, respectively. The source image window includes 4×2 source pixels, and the target image window includes 4×2 target pixels.
[0069] Step 130: Establish a mapping relationship between source pixels and target pixels based on the ratio of the number of source pixels to target pixels in the rendering unit.
[0070] Step 140: Based on the mapping relationship, an interpolation algorithm formula is established by using a sub-pixel borrowing method.
[0071] Specifically, the sub-pixel rendering method of this embodiment 1 is aimed at an RGBG display panel, and renders the image information of the source image 11 into the target image 13 by means of sub-pixel rendering. Figure 3 and Figure 4 As shown, the source image 11 includes a plurality of source pixels 12, each source pixel 12 includes a source image sub-pixel 16 of three color channels of red, green and blue R, G, and the target image 13 includes a plurality of target pixels 14, each target pixel 14 includes a target image sub-pixel 15 of two color channels of red and green R, G or two color channels of blue and green B, G. In the specific process of step Step100, sub-pixel rendering is performed step by step by dividing the source image 11 and the target image 13 into a plurality of regions, and the region is a rendering unit 10. By selecting a plurality of source pixels 12 in the source image 11 and a plurality of target pixels 14 in the target image 13, a source image window 17 and a target image window 18 of the same size are established as the minimum unit of sub-pixel rendering. In an RGBG display panel, the target image sub-pixel 15 of a single target pixel 14 is the same as the source image sub-pixel 16 of a single source pixel 12, and the number of target pixels 14 contained in the target image 13 is also the same as the number of source pixels 12 contained in the source image 11, as shown in FIG. Figure 3 and Figure 4 As shown, the source image window 17 includes 4×2 source pixels 12, and the target image window 18 includes 4×2 target pixels 14. Since the number of source pixels 12 and target pixels 14 is the same, the original coordinates of the source pixels 12 are directly mapped to the target pixels 14 as the mapping coordinates of the target pixels 14. Figure 5, the source pixels 12 on the even row 2j and the odd row 2j+1 are respectively mapped to the target pixels 14 also located on the even row 2j and the odd row 2j+1. On the same even row 2j or odd row 2j+1, there are 4 source pixels 12 in the source image window 17 and 4 target pixels 14 in the target image window 18. The mapping relationship between the source pixel 12 and the target pixel 14 is a direct mapping relationship, and the original coordinates of the source pixel 12 are the mapping coordinates of the target pixel 14. Based on the original coordinates (2i-1,2j), (2i,2j), (2i+1,2j), (2i+2,2j), (2i-1,2j+1), (2i,2j+1), (2i+1,2j+1), (2i+2,2j+1) of the 8 source pixels 12 in the source image window 17, the mapping coordinates (2i-1,2j), (2i,2j), (2i+1,2j), (2i+2,2j), (2i-1,2j+1), (2i,2j+1), (2i+1,2j+1), (2i+2,2j+1) of the 8 target pixels 14 in the target image window 18 can be obtained through a direct mapping relationship. Figure 3 and Figure 4 In the rendering unit 10, although the number of target pixels 14 included in the target image window 18 is the same as the number of source pixels 12 included in the source image window 17, each target pixel 14 only includes 2 target image sub-pixels 15, while the source pixel 12 includes 3 source image sub-pixels 16. Each target pixel 14 lacks one color channel, so it is necessary to borrow the target image sub-pixels 15 at the corresponding position of the adjacent source pixel 12 to form a complete pixel. When there are only target image sub-pixels 15 of the red and green color channels R and G, it is necessary to borrow the target image sub-pixels 15 of the blue channel B. When there are only target image sub-pixels 15 of the blue and green color channels B and G, it is necessary to borrow the target image sub-pixels 15 of the red channel R. The target image sub-pixel 15 of the missing color channel is supplemented for the position of the three color channels R, G, B corresponding to the source pixel 12 in the target image window 18 by the above-mentioned sub-pixel borrowing method, thereby supplementing the image information of the target image window 18; and the target sub-pixel value of the borrowed target image sub-pixel 15 is calculated by the source pixel 12 corresponding to the position of the borrowed target image sub-pixel 15 and the original sub-pixel value of the source pixel 12 corresponding to the target image sub-pixel 15 according to the three color channels R, G, B of red, green and blue respectively through the interpolation algorithm formula, and each original sub-pixel value is weighted in the interpolation algorithm formula to set the corresponding weight factor for the target sub-pixel value of the three color channels R, G, B of red, green and blue. The interpolation algorithm formula is established through steps Step110 to Step140 to calculate the weight factor corresponding to the target sub-pixel value of each color channel.
[0072] See also Figure 6In the sub-pixel rendering method of the first embodiment, Step 140 specifically includes:
[0073] Step 141: Based on the mapping relationship, the mapping coordinates and target sub-pixel value expressions of the target pixel are obtained by direct mapping according to the original coordinates and original sub-pixel value expressions of the source pixel.
[0074] Step 142: Based on the original sub-pixel value expression and the target sub-pixel value expression, for the even rows and odd rows of the target image window, determine the target image sub-pixel that each target pixel needs to borrow according to the sub-pixel borrowing method.
[0075] Step 143: For the three color channels of red, green and blue, an interpolation algorithm formula for rendering the source image sub-pixels to the target image sub-pixels is established according to the source image sub-pixels, the target image sub-pixels and the borrowed target image sub-pixels.
[0076] Specifically, based on the mapping coordinates of each target pixel 14 obtained in steps 110 to 140, the target sub-pixel value expression corresponding to the target sub-pixel value of the target image sub-pixel 15 of the red channel R, the green channel G, and the blue channel B in each target pixel 14 can be obtained. Figure 5 and Figure 7 As shown, in a source image window 17, 8 source pixels P 2i-1,2j , P 2i,2j , P 2i+1,2j , P 2i+2,2j , P 2i-1,2j+1 , P 2i,2j+1 , P 2i+1,2j+1 , P 2i+2,2j+1 The corresponding original sub-pixel values are expressed as (R 2i-1,2j , G 2i-1,2j , B 2i-1,2j )、(R 2i,2j , G 2i,2j , B 2i,2j )、(R 2i+1,2j , G 2i+1,2j , B 2i+1,2j )、(R 2i+2,2j , G 2i+2,2j , B 2i+2,2j )、(R 2i-1,2j+1 , G 2i-1,2j+1 , B 2i-1,2j+1 )、(R 2i,2j+1 , G 2i,2j+1 , B 2i,2j+1 )、(R 2i+1,2j+1 , G 2i+1,2j+1 , B 2i+1,2j+1 )、(R 2i+2,2j+1 , G 2i+2,2j+1 , B2i+2,2j+1 ); In a target image window 18, 8 target pixels P' 2i-1,2j , P' 2i,2j , P' 2i+1,2j , P' 2i+2,2j , P' 2i-1,2j+1 , P' 2i,2j+1 , P' 2i+1,2j+1 , P' 2i+2,2j+1 The corresponding target sub-pixel values are expressed as (B' 2i-1,2j , G' 2i-1,2j )、(R' 2i,2j , G' 2i,2j )、(B' 2i+1,2j , G' 2i+1,2j )、(R' 2i+2,2j , G' 2i+2,2j )、(R' 2i-1,2j+1 , G' 2i-1,2j+1 )、(B' 2i,2j+1 , G' 2i,2j+1 )、(R' 2i+1,2j+1 , G' 2i+1,2j+1 )、(B' 2i+2,2j+1 , G' 2i+2,2j+1 ).exist Figure 7 In the horizontal right direction of the even-numbered rows of the target image window 18, there are first target pixels P' in sequence. 2i-1,2j , the second target pixel P' 2i,2j , the third target pixel P' 2i+1,2j and the fourth target pixel P' 2i+2,2j , the first target pixel P' 2i-1,2j Including the first blue target image sub-pixel B' 2i-1,2j and the first green target image sub-pixel G' 2i-1,2j , the second target pixel P' 2i,2j Including the first red target image sub-pixel R' 2i,2j and the second green target image sub-pixel G' 2i,2j , the third target pixel P' 2i+1,2j Including the second blue target image sub-pixel B' 2i+1,2j and the third green target image sub-pixel G' 2i+1,2j , the fourth target pixel P' 2i+2,2j Including the second red target image sub-pixel R' 2i+2,2j and the fourth green target image sub-pixel G' 2i+2,2j In the horizontal right direction of the odd-numbered rows of the target image window 18, there are five target pixels P' 2i-1,2j+1 , the sixth target pixel P' 2i,2j+1 , the seventh target pixel P' 2i+1,2j+1 and the eighth target pixel P' 2i+2,2j+1, the fifth target pixel P' 2i-1,2j+1 Including the third red target image sub-pixel R' 2i-1,2j+1 and the fifth green target image sub-pixel G' 2i-1,2j+1 , the sixth target pixel P' 2i,2j+1 Including the third blue target image sub-pixel B' 2i,2j+1 and the sixth green target image sub-pixel G' 2i,2j+1 , the seventh target pixel P' 2i+1,2j+1 Including the fourth red target image sub-pixel R' 2i+1,2j+1 and the seventh green target image sub-pixel G' 2i+1,2j+1 , the eighth target pixel P' 2i+2,2j+1 Including the fourth blue target image sub-pixel B' 2i+2,2j+1 and the eighth green target image sub-pixel G' 2i+2,2j+1 Based on the sub-pixel borrowing method, the first target pixel P' 2i-1,2j Borrow the first red target image sub-pixel R' 2i,2j , the second target pixel P' 2i,2j Borrow the second blue target image sub-pixel B' 2i+1,2j , the third target pixel P' 2i+1,2j Borrow the second red target image sub-pixel R' 2i+2,2j , the fifth target pixel P' 2i-1,2j+1 Borrow the third blue target image sub-pixel B' 2i,2j+1 , the sixth target pixel P' 2i,2j+1 Borrow the fourth red target image sub-pixel R' 2i+1,2j+1 , the seventh target pixel P' 2i+1,2j+1 Borrow the fourth blue target image sub-pixel B' 2i+2,2j+1 . The six target image sub-pixels 15 that need to be interpolated according to the above borrowing relationship need to be obtained by weighted calculation using the original sub-pixel values of the source image sub-pixels 12 and the source image sub-pixels 16 in the source pixel 12 and its adjacent source pixel 12 in the source image 11 and the weight factor, thereby establishing an interpolation algorithm formula. The interpolation algorithm formula includes a first conversion formula and a second conversion formula. The even-numbered rows of the target image window 18 correspond to the first conversion formula, and the odd-numbered rows of the target image window 18 correspond to the second conversion formula.
[0077] Among them, the first conversion formula is:
[0078]
[0079] The second conversion formula is:
[0080]
[0081] Factors in the first and second conversion formulas Ris the weight factor corresponding to the sub-pixel 16 of the source image of the red channel R, factor B is the weight factor corresponding to the source image sub-pixel 16 of the blue channel B. Through steps Step141 to Step143, an interpolation algorithm formula with weight factors is established, through which the value of the weight factor can be substituted to calculate the target sub-pixel value of the target image sub-pixel 15, and then the gray value of the target pixel 14 is calculated.
[0082] See also Figure 8 In the sub-pixel rendering method of the first embodiment, Step 200 specifically includes:
[0083] Step 210: Obtain the original sub-pixel value of the source image sub-pixel of the three color channels in each source pixel;
[0084] Step 220: Obtain the grayscale value of each source pixel according to the original sub-pixel value of the source image sub-pixel of the three color channels;
[0085] Step 230: According to the gray value of each source pixel, the gray value deviation between each two adjacent source pixels in the same odd row or even row is calculated respectively;
[0086] Step 240: Determine the magnitude relationship between the grayscale value deviation and the upper limit value and the lower limit value in the preset threshold condition; when the grayscale value deviation is greater than the upper limit value or less than the lower limit value, execute step 250; when the grayscale value deviation is not greater than the upper limit value and not less than the lower limit value, execute step 260;
[0087] Step 250: Assign the weight factor in the interpolation calculation formula to 1;
[0088] Step 260: Calculate the weight factor in the interpolation calculation formula based on the positional relationship between the target image sub-pixel and the corresponding source pixel.
[0089] Specifically, since in the process of sub-pixel rendering, there is only a situation of sub-pixel borrowing between two adjacent target pixels 14 in the horizontal direction, the grayscale value deviation between two adjacent source pixels 12 in the same row directly affects the color deviation between the displayed image and the original image and the brightness value of the displayed image information. Therefore, it is necessary to determine whether the grayscale value deviation between two adjacent source pixels 12 in the same row meets the preset threshold condition to determine the position where the jump will occur, so as to determine the weight factor corresponding to the two source pixels 12 corresponding to the position where the jump occurs, so as to eliminate the blurring problem caused by directly interpolating the two adjacent source pixels 12. The preset threshold condition is used to determine the weight factor. If one of the preset threshold conditions is met, the weight factor will be calculated through the position relationship. If other conditions of the preset threshold conditions are met, the weight factor will be directly assigned. The grayscale value of the source pixel 12 is calculated by the grayscale value formula, and the grayscale value formula is: gray_P=0.299*R+0.578*G+0.114*B. Refer to the interpolation calculation formula and Figure 7 , the target sub-pixel value R' of the red channel R in the second target image sub-pixel 15 in the even row 2i,2j The original sub-pixel value R of the red channel R in the corresponding source image sub-pixel 13 2i,2j and the original sub-pixel value R of the red channel R in the adjacent source image sub-pixel 13 2i-1,2j The target sub-pixel value B' of the blue channel B in the third target image sub-pixel 15 in the even row is obtained by interpolation calculation; 2i+1,2j The original sub-pixel value B of the blue channel B in the corresponding source image sub-pixel 13 2i+1,2j and the original sub-pixel value B of the blue channel B in the adjacent source image sub-pixel 13 2i,2j The target sub-pixel value B' of the blue channel B in the second target image sub-pixel 15 in the odd row is obtained by interpolation calculation; 2i,2j+1 The original sub-pixel value B of the blue channel B in the corresponding source image sub-pixel 13 2i,2j+1 and the original sub-pixel value B of the blue channel B in the adjacent source image sub-pixel 13 2i-1,2j+1 The target sub-pixel value R' of the red channel R in the third target image sub-pixel 15 in the odd row is obtained by interpolation calculation; 2i+1,2j+1 The original sub-pixel value R of the red channel R in the corresponding source image sub-pixel 13 2i+1,2j+1 and the original sub-pixel value R of the red channel R in the adjacent source image sub-pixel 13 2i,2j+1 The interpolation calculation is performed. Figure 3 Take any pair of two source pixels a and b adjacent to each other in the horizontal direction in the source image window 17 as an example, Fig. 9As shown in the figure, the gray value of source pixel a is gray_a, the gray value of source pixel b is gray_b, and the gray value deviation of source pixel a and source pixel b is abs(gray_a-gray_b). Because the gray value deviation only represents the degree of brightness change between two adjacent source pixels a and b, the absolute value of the gray value deviation is kept as a positive number. The preset threshold condition includes an upper limit value th up and the lower limit th low , upper limit value th up and the lower limit th low It can be set according to actual needs, such as setting the upper limit value th up =230, lower limit th low = 20. Gray value deviation exceeds the upper limit th up Indicates that the black and white change or brightness change between two adjacent source pixels a and b is relatively large, forming a large brightness deviation area in the displayed image. Interpolation calculation between two adjacent source pixels a and b will cause edge blurring. In this case, directly adjust the weight factor R and factor B Just assign the value, that is, when abs(gray_a-gray_b)>th up When R =factor B =1.0. Gray value deviation is lower than the lower limit th low Indicates that the black and white change or brightness change between two adjacent source pixels a and b is relatively small, the image is relatively smooth, and an area with small brightness deviation is formed in the displayed image. Even if no interpolation calculation is performed between two adjacent source pixels a and b, there will be no loss of image information, and most areas of the displayed image are smooth areas. It can also improve the speed of sub-pixel rendering to a certain extent. At this time, the weight factor factor is directly R and factor B Just assign the value, that is, when abs(gray_a-gray_b)<th low When R =factor B =1.0. The gray value deviation is between the upper limit value th up and the lower limit th low When it is between , it means that there is a black and white change or brightness change between the two adjacent source pixels a and b, but interpolation calculation will not cause edge blurring. Not interpolating will cause information loss. In this case, the weight factor factor R and factor B Instead of assigning values directly, the grayscale values of source pixels a and b are interpolated using the values of the weight factors calculated through the positional relationship.
[0090] See also Fig.10 In the sub-pixel rendering method of the first embodiment, step 260 specifically includes:
[0091] Step 261: Based on the mapping relationship, determine two adjacent source pixels used to interpolate and calculate the sub-pixel of the target image through the interpolation algorithm formula.
[0092] Step 262: Obtain the target image sub-pixel center of the target image sub-pixel and the source pixel center and source pixel side length of the corresponding two adjacent source pixels respectively.
[0093] Step 263: Based on the side length of the source pixel, the distances between the center of the sub-pixel of the target image and the centers of the two source pixels are calculated respectively to obtain a first distance and a second distance.
[0094] Step 264: Calculate a weight factor in the interpolation calculation formula according to the first distance and the second distance.
[0095] Specifically, the sub-pixel rendering method of the first embodiment uses the positional relationship between the target image sub-pixel 15 and the source pixel 12 to calculate the weight factor in the interpolation algorithm formula. Fig.11 As shown, the black dot represents the source pixel center O1, the white dot represents the target image sub-pixel center O2, L represents the source pixel side length of a single source pixel 12, and the first target pixel P' 2i-1,2j Borrow the second target pixel P' 2i,2j The first red target image sub-pixel R' 2i,2j For example, the first target pixel P' 2i-1,2j Corresponding source pixel P 2i-1,2j , the second target pixel P' 2i,2j Corresponding source pixel P 2i,2j , the first red target image sub-pixel R' 2i,2j The target image sub-pixel center O2 and the source pixel P 2i,2j There is a first distance L1 between the source pixel center O1, the first distance L1 is 1 / 4L, and the first red target image sub-pixel R' 2i,2j The target image sub-pixel center O2 and the source pixel P 2i-1,2j There is a second distance L2 between the source pixel center O1, the second distance L2 is 3 / 4L, and the weight factor factor is set according to the first distance L1 and the second distance L2 R and factor B The size of the factor R =factor B=0.75. Through steps Step261 to Step264, the weight factor is set according to the positional relationship between the target image sub-pixel 15 and the two adjacent source pixels 12. When the grayscale value deviation between the two adjacent source pixels 12 is not large, the grayscale values of the two source pixels 12 are directly assigned without calculation, which can improve the conversion speed of sub-pixel rendering. The sub-pixel rendering method of this embodiment 1 performs sub-pixel rendering based on weights through the aforementioned step flow, improves the edge color edge effect of the displayed image, reduces the image information loss, introduces information judgment of grayscale value deviation, reduces the edge blur phenomenon of the displayed image, and improves the speed of sub-pixel rendering.
[0096] Example 2
[0097] Embodiment 2 of the present invention discloses a sub-pixel rendering system for an RGBG display panel. The sub-pixel rendering method for an RGBG display panel disclosed in Embodiment 1 is used to solve the problem that a single pixel unit in an AMOLED display panel with an RGBG structure is composed of only two sub-pixels and cannot display RGB images normally. By analyzing the characteristics of the RGBG arrangement structure and rendering the sub-pixels, the blurring effect of the image edge is improved, thereby improving the image display quality of the AMOLED display panel.
[0098] See also Fig.12 The sub-pixel rendering system of the present embodiment 2 includes a mapping module 20, a first calculation module 30 and a second calculation module 40 which are interconnected; wherein the mapping module 20 is used to establish an interpolation algorithm formula for a target sub-pixel value of a target image sub-pixel in a target pixel according to a mapping relationship between a source pixel of a source image and a target pixel of a target image on an RGBG display panel; the first calculation module 30 is used to calculate a weight factor in the interpolation algorithm formula based on the gray value of each source pixel by judging the size relationship between the gray value deviation between two adjacent source pixels and a preset threshold condition; the second calculation module 40 is used to calculate the target sub-pixel value of each target image sub-pixel in each target pixel by weighted calculation through the interpolation algorithm formula according to the weight factor.
[0099] Specifically, in the sub-pixel rendering system of the second embodiment, the total number of pixels of the source image and the target image is the same. Since the target image is arranged in RGBG, each target pixel in the target image has one less color channel than the source pixel. The total number of target image sub-pixels is also 1 / 3 less than the source image sub-pixels, but the total number of target pixels is the same as the total number of source pixels. The target pixel here is not the actual pixel used for display on the target image, but the target image sub-pixels of the three color channels R, G, and B arranged in sequence are artificially divided together to form a complete target pixel. Therefore, whether in the source image or the target image, the pixel division method is the same. Since the number of source pixels and target pixels is the same, a one-to-one correspondence can be formed. The mapping module 20 uses the corresponding relationship as the mapping relationship between the source pixel and the target pixel, thereby mapping the coordinates of the source pixel to the target pixel to form a corresponding sub-pixel value expression. Through the mapping relationship, a mathematical relationship is established between the target image sub-pixel of the target pixel in the target image and the source image sub-pixel of the source pixel in the source image, which is an interpolation algorithm formula to respectively calculate the target sub-pixel value of the target image sub-pixel of the red channel R or the blue channel B missing in each target pixel. Since there is often a brightness value and color deviation between the target image and the source image, a jump occurs between two adjacent target pixels, resulting in edge blurring of the target image. Since the target sub-pixel value of each target image sub-pixel of the target pixel in the target image is obtained by interpolating the source image sub-pixel in the source pixel, the first calculation module 30 determines whether the gray value deviation between two adjacent source pixels reaches a preset threshold condition, and sets a suitable weight factor in the area where there is a jump to reduce or even eliminate the edge blurring phenomenon, and in the area where there is no jump, a suitable weight factor is set for the source image sub-pixel of the adjacent two source pixels used to interpolate and calculate the target sub-pixel value of the target image sub-pixel in each target pixel. Finally, the weight factor is substituted into the interpolation algorithm formula by the second calculation module to obtain the target sub-pixel value of the target image sub-pixel of the red channel R or the blue channel B borrowed in each target pixel.
[0100] Example 3
[0101] Embodiment 3 of the present invention discloses a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the sub-pixel rendering method of the RGBG display panel disclosed in Embodiment 1.
[0102] Example 4
[0103] Embodiment 4 of the present invention discloses a computer program product, which includes a computer program. When the computer program is run on a computer, the computer executes the sub-pixel rendering method of the RGBG display panel disclosed in Embodiment 1.
[0104] The sub-pixel rendering method and system of the RGBG display panel disclosed in the present invention can reduce the image information loss before and after sub-pixel rendering, eliminate the color edge effect, reduce edge blur, and improve the conversion speed.
[0105] It should be understood that the above description of the specific embodiments of the present invention is only for illustrating the technical route and features of the present invention, and its purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly, but the present invention is not limited to the above specific implementation methods. Any changes or modifications made within the scope of the claims of the present invention should be included in the protection scope of the present invention.
Claims
1. A sub-pixel rendering method for an RGBG display panel, characterized in that: The method comprises: According to the mapping relationship between the source pixel of the source image and the target pixel of the target image on the RGBG type display panel, an interpolation algorithm formula of the target sub-pixel value of the target image sub-pixel in the target pixel is established; Based on the grayscale value of each of the source pixels, the weight factor in the interpolation algorithm formula is calculated by determining the magnitude relationship between the grayscale value deviation between two adjacent source pixels and a preset threshold condition; According to the weight factor, a target sub-pixel value of each target image sub-pixel in each target pixel is weightedly calculated by the interpolation algorithm formula; Based on the grayscale value of each of the source pixels, by determining the magnitude relationship between the grayscale value deviation between two adjacent source pixels and a preset threshold condition, the weight factor in the interpolation algorithm formula is calculated, specifically including: Obtaining original sub-pixel values of source image sub-pixels of three color channels in each of the source pixels; Obtaining the grayscale value of each source pixel according to the original sub-pixel value of the source image sub-pixel of the three color channels; According to the grayscale value of each source pixel, respectively calculating the grayscale value deviation between each two adjacent source pixels located in the same odd row or even row; Determine the magnitude relationship between the gray value deviation and the upper limit value and the lower limit value in the preset threshold condition; When the gray value deviation is greater than the upper limit or less than the lower limit, the weight factor in the interpolation algorithm formula is assigned a value of 1; When the gray value deviation is not greater than the upper limit and not less than the lower limit, a weight factor in the interpolation algorithm formula is calculated according to a positional relationship between a target image sub-pixel and a corresponding source pixel; Calculating the weight factor in the interpolation algorithm formula according to the positional relationship between the target image sub-pixel and the corresponding source pixel specifically includes: Based on the mapping relationship, determining two adjacent source pixels for interpolating and calculating sub-pixels of the target image using the interpolation algorithm formula; Respectively obtain the target image sub-pixel center of the target image sub-pixel, and the source pixel center and source pixel side length of two corresponding adjacent source pixels; Based on the side length of the source pixel, respectively calculating the distance between the center of the sub-pixel of the target image and the centers of the two source pixels to obtain a first distance and a second distance; A weight factor in the interpolation algorithm formula is calculated according to the first distance and the second distance.
2. The sub-pixel rendering method of the RGBG type display panel according to claim 1, characterized in that: In establishing the target sub-pixel value of the target image sub-pixel in the target pixel according to the mapping relationship between the source pixel of the source image and the target pixel of the target image on the RGBG type display panel, the interpolation algorithm formula specifically includes: Acquire a source image and a target image of an RGBG type display panel, wherein the source image includes a plurality of source pixels, each of which includes source image sub-pixels of three color channels of red, green and blue; and the target image includes a plurality of target pixels, each of which includes target image sub-pixels of two color channels of red and green or two color channels of blue and green; Establishing a rendering unit, selecting a source image window in the source image and a target image window in the target image respectively, wherein the source image window includes 4×2 source pixels and the target image window includes 4×2 target pixels; Establishing a mapping relationship between the source pixels and the target pixels according to a ratio of the number of the source pixels to the target pixels in the rendering unit; Based on the mapping relationship, an interpolation algorithm formula is established in a sub-pixel borrowing manner.
3. The sub-pixel rendering method of the RGBG type display panel according to claim 2, characterized in that: In establishing the interpolation algorithm formula in a sub-pixel borrowing manner based on the mapping relationship, the formula specifically includes: Based on the mapping relationship, the mapping coordinates and the target sub-pixel value expression of the target pixel are obtained by direct mapping according to the original coordinates and the original sub-pixel value expression of the source pixel; Based on the original sub-pixel value expression and the target sub-pixel value expression, for the even rows and odd rows of the target image window, determine the target image sub-pixel that each target pixel needs to borrow according to the sub-pixel borrowing method; For the three color channels of red, green and blue, an interpolation algorithm formula for rendering the source image sub-pixel to the target image sub-pixel is established according to the source image sub-pixel, the target image sub-pixel and the borrowed target image sub-pixel.
4. The sub-pixel rendering method of the RGBG type display panel according to claim 3, characterized in that: In the horizontal right direction of the even-numbered rows of the target image window, there are a first target pixel, a second target pixel, a third target pixel and a fourth target pixel in sequence, wherein the first target pixel includes a first blue target image sub-pixel B 2i-1,2j and the first green target image sub-pixel G 2i-1,2j , the second target pixel includes a first red target image sub-pixel R 2i,2j and the second green target image sub-pixel G 2i,2j , the third target pixel includes the second blue target image sub-pixel B 2i+1,2j and the third green target image sub-pixel G 2i+1,2j , the fourth target pixel includes the second red target image sub-pixel R 2i+2,2j and the fourth green target image sub-pixel G 2i+2,2j ; There are a fifth target pixel, a sixth target pixel, a seventh target pixel and an eighth target pixel in the horizontal right direction of the odd-numbered rows of the target image window, and the fifth target pixel includes the third red target image sub-pixel R 2i-1,2j+1 and the fifth green target image subpixel G 2i-1,2j+1 , the sixth target pixel includes the third blue target image sub-pixel B 2i,2j+1 and the sixth green target image subpixel G 2i,2j+1 , the seventh target pixel includes the fourth red target image sub-pixel R 2i+1,2j+1 and the seventh green target image sub-pixel G 2i+1,2j+1 , the eighth target pixel includes the fourth blue target image sub-pixel B 2i+2,2j+1 and the eighth green target image sub-pixel G 2i+2,2j+1 ; Based on the sub-pixel borrowing method, the first target pixel borrows the first red target image sub-pixel R 2i,2j , the second target pixel borrows the second blue target image sub-pixel B 2i+1,2j , the third target pixel borrows the second red target image sub-pixel R 2i+2,2j , the fifth target pixel borrows the third blue target image sub-pixel B 2i,2j+1 , the sixth target pixel borrows the fourth red target image sub-pixel R 2i+1,2j+1 , the seventh target pixel borrows the fourth blue target image sub-pixel B 2i+2,2j+1 .
5. The sub-pixel rendering method of the RGBG type display panel according to claim 2 or 3, characterized in that: In the interpolation algorithm formula, the even-numbered rows of the target image window correspond to the first conversion formula, and the odd-numbered rows of the target image window correspond to the second conversion formula.
6. A sub-pixel rendering system for an RGBG display panel, characterized in that: The system includes a mapping module, a first computing module, and a second computing module connected to each other; The mapping module is used to establish an interpolation algorithm formula for a target sub-pixel value of a target image sub-pixel in the target pixel according to a mapping relationship between a source pixel of the source image and a target pixel of the target image on the RGBG type display panel; The first calculation module is used to calculate the weight factor in the interpolation algorithm formula based on the gray value of each of the source pixels by determining the magnitude relationship between the gray value deviation between two adjacent source pixels and a preset threshold condition; The second calculation module is used to calculate the target sub-pixel value of each target image sub-pixel in each target pixel by weighted calculation using the interpolation algorithm formula according to the weight factor; Based on the grayscale value of each of the source pixels, by determining the magnitude relationship between the grayscale value deviation between two adjacent source pixels and a preset threshold condition, the weight factor in the interpolation algorithm formula is calculated, specifically including: Obtaining original sub-pixel values of source image sub-pixels of three color channels in each of the source pixels; Obtaining the grayscale value of each source pixel according to the original sub-pixel value of the source image sub-pixel of the three color channels; According to the grayscale value of each source pixel, respectively calculating the grayscale value deviation between each two adjacent source pixels located in the same odd row or even row; Determine the magnitude relationship between the gray value deviation and the upper limit value and the lower limit value in the preset threshold condition; When the gray value deviation is greater than the upper limit or less than the lower limit, the weight factor in the interpolation algorithm formula is assigned a value of 1; When the gray value deviation is not greater than the upper limit and not less than the lower limit, a weight factor in the interpolation algorithm formula is calculated according to a positional relationship between a target image sub-pixel and a corresponding source pixel; Calculating the weight factor in the interpolation algorithm formula according to the positional relationship between the target image sub-pixel and the corresponding source pixel specifically includes: Based on the mapping relationship, determining two adjacent source pixels for interpolating and calculating sub-pixels of the target image using the interpolation algorithm formula; Respectively obtain the target image sub-pixel center of the target image sub-pixel, and the source pixel center and source pixel side length of two corresponding adjacent source pixels; Based on the side length of the source pixel, respectively calculating the distance between the center of the sub-pixel of the target image and the centers of the two source pixels to obtain a first distance and a second distance; A weight factor in the interpolation algorithm formula is calculated according to the first distance and the second distance.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the sub-pixel rendering method for an RGBG display panel as described in any one of claims 1 to 5.
8. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed on a computer, enables the computer to execute the sub-pixel rendering method for an RGBG type display panel as claimed in any one of claims 1 to 5.
