A sub-pixel rendering method and display device based on frequency domain analysis
Through the subpixel rendering method based on frequency domain analysis, an anti-aliasing filter is designed for the RGBG square arrangement method, which solves the problem of image blurring caused by anti-aliasing in the prior art, and achieves the effect of suppressing color aliasing without decreasing clarity.
Patent Information
- Application Number
- CN202411449113.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Existing subpixel downsampling rendering algorithms lose high-frequency details when anti-aliasing, resulting in blurred images and unable to effectively suppress color aliasing.
A sub-pixel rendering method based on frequency domain analysis is adopted, and an anti-aliasing filter is designed for the RGBG square arrangement method. The spectrum amplitude is fitted through the Fourier transform and Laplace distribution model, and the cutoff frequency of the anti-aliasing filter of each primary color is determined to realize sub-pixel rendering.
While maintaining image clarity, it effectively suppresses color aliasing, retains more details, and improves the rendering effect of sub-pixels.
Smart Images

Figure CN118967507B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of LED display, and in particular to a sub-pixel rendering method and a display device based on frequency domain analysis. Background Art
[0002] Pixel multiplexing technology is an important technology for improving the perceived resolution of LED displays. It makes each sub-pixel light point shared by several surrounding virtual pixels, similar to the method of smoothing and filtering the original video image data and then downsampling it. It can display images that exceed the physical resolution of the display on the LED display, thereby increasing the perceived resolution and enhancing the display effect.
[0003] The unweighted average algorithm of pixel reuse is equivalent to a mean filter. The cutoff frequency in the frequency domain is only half of the full frequency band, so a lot of details will be lost. In the case of loss of details, color information will be distorted, which is the problem of edge color cast.
[0004] In addition to pixel reuse, there is another sub-pixel rendering algorithm, which is sub-pixel downsampling, such as Figure 1 shown.
[0005] However, direct sub-pixel downsampling will cause serious aliasing due to the Nyquist frequency limit. The most extreme case is the white line of a single pixel. The white color of the RGB mixture will be directly downsampled to R / G / B monochrome, such as Figure 2 shown.
[0006] Such color cast is not tolerated by users, so low-pass filtering is usually performed before sub-pixel downsampling to prevent aliasing, such as Figure 3 As shown, all frequencies that may cause aliasing are filtered out, so that no color error will occur.
[0007] In traditional anti-aliasing methods, all high-frequency frequency components that may cause aliasing are filtered out. Although there is no aliasing during the downsampling process, many details of the high-frequency part are lost, resulting in the final sampled display image being severely blurred, which does not reflect the advantages of sub-pixel displays. Summary of the invention
[0008] In order to solve the problem of image blur caused by anti-aliasing in the existing sub-pixel downsampling rendering algorithm, the present invention proposes a sub-pixel rendering method based on frequency domain analysis.
[0009] The present invention mainly focuses on the arrangement of RGBG squares, designs an anti-aliasing filter in the frequency domain for display images, and performs sub-pixel rendering display. The specific technical solution is as follows:
[0010] A sub-pixel rendering method based on frequency domain analysis, the sub-pixel rendering method is applicable to an RGBG square arrangement mode, and the sub-pixel rendering method comprises the following steps:
[0011] S1, decompose the original image into RGB three-channel information;
[0012] S2. Design three reference components according to the three-channel information, perform Fourier transform on the three reference components to obtain three amplitude spectra, sample the middle row and the middle column of the amplitude spectrum to obtain a one-dimensional array in the row direction and a one-dimensional array in the column direction;
[0013] S3, fitting the one-dimensional array obtained in step S2 with a Laplace distribution model, and calculating the horizontal cutoff frequency uh and the vertical cutoff frequency vv of the spectrum amplitude valley point by formula;
[0014] S4. Design a box filter with a horizontal cutoff frequency of uh and a vertical cutoff frequency of vv, apply it to the red and blue components of the original image, perform anti-aliasing filtering, and obtain an anti-aliasing image; then perform two-fold downsampling to obtain a red / blue sub-pixel rendered image;
[0015] S5. For the cutoff frequency of the green component, take the inscribed circle / ellipse of the outer frame rectangle of the spectrum graph, make a circular / elliptical low-pass filter, apply it to the green component of the original image, and then perform green sub-pixel downsampling to obtain a green sub-pixel rendered image;
[0016] S6. Combining the red / blue sub-pixel rendering components obtained in step S4 and the green sub-pixel rendering components obtained in step S5 into a three-primary-color rendering image.
[0017] Preferably, the process of solving the cut-off frequency is as follows:
[0018] The three reference components are Y = R + B + 2G, C1 = R - B, C2 = R + B - 2G; their Fourier transforms are: Y(u,v)=R(u,v)+B(u,v)+2G(u,v), C1(u,v)=R(u,v)-B(u,v), C2(u,v)=R(u,v)+B(u,v)-2G(u,v); wherein u and v represent the index of each frequency position in the matrix obtained by Fourier transform of the image respectively;
[0019] When calculating the cutoff frequencies of the R and B components, the one-dimensional arrays in the row direction are Y(u,v0) and C1(u,v0), and the one-dimensional arrays in the column direction are Y(u0,v) and C1(u0,v), where u0 is 1 / 2 of the number of columns of the original image, and v0 is 1 / 2 of the number of rows of the original image.
[0020] Preferably, the Laplace distribution model is fitted to a one-dimensional array, and the fitting result obtained is:
[0021]
[0022]
[0023] in, , , , are the total energies of four one-dimensional arrays, , , , They are the variances of four one-dimensional arrays respectively;
[0024] By fitting the formula, the equation is listed to find the cutoff frequency value of the valley point:
[0025] Horizontal , vertically ,
[0026] Among them, umax is the width of the image, vmax is the height of the image;
[0027] The transverse cutoff frequency uh and the longitudinal cutoff frequency vv are obtained by solving the problem.
[0028] The present invention also provides a display device, which applies the sub-pixel rendering method based on frequency domain analysis as described above.
[0029] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program executes the sub-pixel rendering method based on frequency domain analysis as described above.
[0030] The present invention also provides an electronic device, including a processor and a memory, wherein the processor and the memory communicate with each other via a communication bus; the memory is used to store computer programs; the processor is used to implement the sub-pixel rendering method based on frequency domain analysis as described above when executing the computer program stored in the memory.
[0031] Compared with the prior art, the specific beneficial effects of the present invention are:
[0032] The present invention designs a direct sub-pixel downsampling algorithm for an LED sub-pixel display with a square arrangement of RGBG. By analyzing the spectrum of the auxiliary brightness component, the cutoff frequency of the anti-aliasing filter of each primary color is determined to obtain the optimal filter for sub-pixel rendering. It has been verified that the method of the present invention can suppress color aliasing while maintaining clarity during sub-pixel rendering. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of sub-pixel downsampling described in the background technology;
[0034] Figure 2 A schematic diagram of the aliasing phenomenon of direct sub-pixel downsampling described in the background technology;
[0035] Figure 3 Schematic diagram of low-pass filtering and anti-aliasing method described in the background technology;
[0036] Figure 4 This is a schematic diagram of the spectrum amplitude diagram in a specific implementation manner;
[0037] Figure 5 A schematic diagram of the position for selecting the cut-off frequency in a specific implementation manner;
[0038] Figure 6 The figure is a schematic diagram comparing the effects of the method of the present invention and a common sub-pixel downsampling method. DETAILED DESCRIPTION
[0039] In order to make the technical solution of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the specification of the present invention. It should be noted that the following embodiments are only used to better understand the technical solution of the present invention and should not be understood as a limitation to the present invention.
[0040] Example 1.
[0041] This embodiment describes in detail the process and principle of the sub-pixel rendering method provided by the present application. The sub-pixel rendering method is applicable to the RGBG square arrangement mode. The sub-pixel rendering method includes the following steps:
[0042] S1. Perform sub-pixel sampling on the original image to obtain a sub-pixel sampled image.
[0043] S2. Designing an auxiliary brightness component for the sub-pixel sampling image.
[0044] S3, performing Fourier transform on the auxiliary brightness component to obtain a spectrum amplitude diagram;
[0045] Specifically, the auxiliary brightness component is , where R(m,n), G(m,n), and B(m,n) represent the three primary color components of the original image.
[0046]
[0047] ,
[0048]
[0049] ,
[0050]
[0051] , Represents the sampling pulses of the three primary colors. m and n are the position indexes of the pixels in the sub-sampled image; m' and n' are positive integers. j Is an imaginary unit.
[0052] Their Fourier transforms are:
[0053] ,
[0054]
[0055] ,
[0056]
[0057] ;
[0058] Therefore, the Fourier transform of the auxiliary brightness component is:
[0059] It can be seen from the above formula that the present application divides the spectrum of the brightness auxiliary component into three sub-components:
[0060] The reason why Y(u,v)=R(u,v)+B(u,v)+2G(u,v), C1(u,v)=R(u,v)-B(u,v), C2(u,v)=R(u,v)+B(u,v)-2G(u,v) is the spectral distribution of the auxiliary brightness component.
[0061] so, , that is, the spectrum amplitude is divided into three sub-components, four parts. Figure 4 It can be seen that the energy of the main component Y covers a wide range, and the junction of Y and C1, C2 (the spectrum valley of the auxiliary component I (u, v)) is not in the spectrum Figure 1 / 2 frequency, so the cutoff frequency design of the anti-aliasing filter can be expanded outward on the basis of 1 / 2 to the spectrum valley of the auxiliary component I (u, v), so that more details can be retained under the premise of effectively reducing brightness aliasing.
[0062] S4. The specific calculation method of the cutoff frequency at the valley value of the spectrum is: take the middle row Y(u,v0), C1(u,v0) and the middle column Y(u0,v), C1(u0,v) of Y(u,v) and C1(u,v). Among them, u0=1 / 2umax, v0=1 / 2vmax, umax and vmax are the width and height of the image respectively.
[0063] The one-dimensional array obtained in step S3 is fitted with a Laplace distribution model to obtain the horizontal cutoff frequency uh and the vertical cutoff frequency vv of the spectrum amplitude valley point.
[0064] Specifically, the Laplace distribution model is fitted to a one-dimensional array, and the fitting result obtained is:
[0065]
[0066]
[0067] in, , , , are the total energies of four one-dimensional arrays, , , , They are the variances of four one-dimensional arrays respectively;
[0068] By fitting the formula, the equation is listed to find the cutoff frequency value of the valley point:
[0069] Horizontal , vertically ,
[0070] Where umax is the width of the image and vmax is the height of the image;
[0071] The transverse cutoff frequency uh and the longitudinal cutoff frequency vv are obtained by solving the problem.
[0072] S5. Design a box filter with a horizontal cutoff frequency of uh and a vertical cutoff frequency of vv, apply it to the red and blue components of the original image, perform anti-aliasing filtering, and obtain an anti-aliasing image; then perform two-fold downsampling to obtain a red / blue sub-pixel rendered image;
[0073] S6. For the cutoff frequency of the green component, directly take the inscribed circle / ellipse of the outer frame rectangle of the spectrum graph, make a circular / elliptical low-pass filter, apply it to the green component of the original image, and then perform green sub-pixel downsampling to obtain a green sub-pixel rendered image;
[0074] S7. Combine the red / blue sub-pixel rendering components obtained in step S5 and the green sub-pixel rendering components obtained in step S6 into a three-primary-color rendering image.
[0075] Example 2.
[0076] This embodiment provides a sub-pixel rendering method based on frequency domain analysis. First, the original image is sub-pixel sampled to obtain a sub-pixel sampled image. Then, an auxiliary brightness component is designed for the sub-pixel sampled image (where m and n are the position indexes of the pixels in the image, respectively). ;
[0077] Perform Fourier transform on it and get the spectrum amplitude diagram, such as Figure 4 For ease of viewing, the I spectrum in the lower right corner is moved 1 / 4 of the spectrum period to the lower right. The actual spectrum diagram should be when the main component (the large halo in the lower right part) is in the center.
[0078] To design the filter, Figure 5 It can be seen that the main frequency part is in the center of the figure, which contains more details. The remaining three transferred spectra have the operation of subtracting the primary color spectrum (each primary color spectrum shows a strong similarity in high frequency), so the high-frequency information is offset by the operation of subtracting the primary color, and the transferred spectrum appears more shrunk. Therefore, in order to maintain higher clarity and avoid aliasing as much as possible, the spectrum amplitude valley between the main spectrum part and the other three transferred spectrum parts can be taken, that is, Figure 5 The cutoff frequency selection position is shown.
[0079] exist Figure 5 In the figure, the upper part is the cutoff frequency selection for the red and blue components, while the lower part is the selection for the green component. Because the red and blue components are downsampled by 2 times in both the horizontal and vertical directions, the components at the upper, lower, left, and right boundaries on the auxiliary brightness component spectrum will affect the aliasing caused by the sampling of the red and blue components. Since the green component is sampled diagonally, only the components on the diagonal will affect its sampling aliasing. The components at the upper, lower, left, and right boundaries can be ignored, and the passband can be designed to rub the border of the spectrum. Therefore, the anti-aliasing filter of the green component can be directly set to the inscribed ellipse of the spectrum (when the image aspect ratio is 1:1, it can be set to the inscribed circle). For the anti-aliasing filter of the red and blue components, its cutoff frequency needs to be determined by calculation.
[0080] The specific calculation steps are:
[0081]
[0082] Note that in the above spectrum formula, the main frequency part (the part with larger halo) is:
[0083]
[0084] The vertical displacement is:
[0085]
[0086] The diagonal shift component is:
[0087]
[0088] Therefore, the specific steps of this embodiment are:
[0089] 1. Input image and design three components: Y=R+B+2G, C1=RB, C2=R+B-2G;
[0090] 2. Perform Fourier transform on these three components to obtain their spectrum amplitude diagrams Y(u,v), C1(u,v), and C2(u,v);
[0091] 3. First, divide the process of solving the cutoff frequency of the red and blue components into horizontal and vertical directions, convert Y(u,v) and C1(u,v) into one dimension, take the middle row of all rows, and get the one-dimensional arrays Y(u,v0) and C1(u,v0) in the row direction; and take the middle column of all columns to get the one-dimensional arrays Y(u0,v) and C1(u0,v) in the column direction;
[0092] 4. Use the Laplace distribution model to fit the four components obtained in step 3, and first calculate the total energy of the four components respectively. , , , and variance , , , The fitting result is:
[0093]
[0094]
[0095] 5. Use the fitting formula to list the equation to find the cutoff frequency value of the valley point:
[0096] Horizontal , vertically: ,
[0097] Where, umax is the width of the image, and vmax is the height of the image. Solve to get the horizontal cutoff frequency uh and the vertical cutoff frequency vv;
[0098] 6. Design a box filter with a horizontal cutoff frequency of uh and a vertical cutoff frequency of vv; apply the designed box filter to the red and blue components of the original image for anti-aliasing filtering; obtain the anti-aliased image and then perform double downsampling of the RGBG arrangement, and the final image is the red / blue sub-pixel rendered image;
[0099] 7. For the cutoff frequency of the green component, directly take the inscribed ellipse of the outer frame rectangle of the spectrum graph, make an elliptical low-pass filter, apply it to the green component of the original image, and then perform green sub-pixel downsampling in the RGBG-square arrangement to obtain a green sub-pixel rendered image;
[0100] 8. Combine the red / blue sub-pixel rendering components obtained in step 6 and the green sub-pixel rendering components obtained in step 7 into a three-primary color image to form a rendered image.
[0101] The display effect of sub-pixel downsampling after the above rendering method is as follows Figure 6 As shown on the right side of the figure, the left side is the result of direct sub-pixel downsampling, and the color edge is very serious. It can be proved that the present invention obtains the best filter for sub-pixel rendering for the LED sub-pixel display with RGBG square arrangement, and can suppress color aliasing while maintaining clarity during sub-pixel rendering.
Claims
1. A sub-pixel rendering method based on frequency domain analysis, characterized in that: The sub-pixel rendering method is applicable to the RGBG square arrangement mode, and the sub-pixel rendering method comprises the following steps: S1, performing sub-pixel sampling on the original image to obtain a sub-pixel sampling image; S2. Design auxiliary brightness components for the sub-pixel sampling image, which are Y=R+B+2G, C1=RB, and C2=R+B-2G respectively; S3. Perform Fourier transform on the auxiliary brightness component to obtain a spectrum amplitude diagram; the Fourier transforms of the auxiliary brightness component are: Y(u,v)=R(u,v)+B(u,v)+2G(u,v), C1(u,v)=R(u,v)-B(u,v), C2(u,v)=R(u,v)+B(u,v)-2G(u,v), where u and v represent the index of each frequency position in the matrix obtained by Fourier transform of the image; the obtained spectrum amplitude is: , that is, the spectrum amplitude is divided into three sub-components, four one-dimensional arrays; S4. Calculate the cutoff frequency at the specific valley of the spectrum: take the middle row Y(u,v0), C1(u,v0) and the middle column Y(u0,v), C1(u0,v) of Y(u,v) and C1(u,v), where u0=1 / 2umax, v0=1 / 2vmax, where umax and vmax are the width and height of the image respectively; The one-dimensional array obtained in step S3 is fitted using a Laplace distribution model, and a formula is used to calculate the horizontal cutoff frequency uh and the vertical cutoff frequency vv of the spectrum amplitude valley point; S5. Design a box filter with a horizontal cutoff frequency of uh and a vertical cutoff frequency of vv, apply it to the red and blue components of the original image, perform anti-aliasing filtering, and obtain an anti-aliasing image; then perform two-fold downsampling to obtain a red / blue sub-pixel rendered image; S6. For the cutoff frequency of the green component, take the inscribed circle / ellipse of the outer frame rectangle of the amplitude spectrum of the green component of the original image, make a circular / elliptical low-pass filter, apply it to the green component of the original image, and then perform green sub-pixel downsampling to obtain a green sub-pixel rendered image; S7, combining the red / blue sub-pixel rendering image obtained in step S5 and the green sub-pixel rendering image obtained in step S6 into a three-primary color rendering image.
2. The sub-pixel rendering method based on frequency domain analysis according to claim 1, characterized in that: The Laplace distribution model is fitted to the one-dimensional array, and the fitting result obtained is: in, , , , are the total energies of four one-dimensional arrays, , , , They are the variances of four one-dimensional arrays respectively; By fitting the formula, the equation is listed to find the cutoff frequency value of the valley point: Horizontal , vertically , Among them, umax is the width of the image, vmax is the height of the image; The transverse cutoff frequency uh and the longitudinal cutoff frequency vv are obtained by solving the problem.
3. A display device, characterized in that: The display device applies the sub-pixel rendering method based on frequency domain analysis as described in claim 1 or 2.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program executes the sub-pixel rendering method based on frequency domain analysis as claimed in claim 1 or 2.
5. An electronic device, characterized in that: It includes a processor and a memory, wherein the processor and the memory communicate with each other via a communication bus; the memory is used to store computer programs; the processor is used to implement the sub-pixel rendering method based on frequency domain analysis as claimed in claim 1 or 2 when executing the computer program stored in the memory.
Citation Information
Patent Citations
Down sampling method and device
CN104658488A
Image texture processing method and device
CN117527986A