Image processing method, device and terminal
By generating and displaying the first target image and the second target image and using the grayscale values of sub-pixels for image processing, the problem in the prior art of requiring higher physical resolution to improve pixel display clarity is solved, and the user viewing experience is improved without increasing the resolution.
Patent Information
- Application Number
- CN202380008317.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-03-13
AI Technical Summary
In the existing technology, improving pixel display clarity requires higher physical resolution, which leads to blurred images and dazzle for users. In addition, the existing sub-pixel multiplexing technology has the problems of large modifications and high costs.
By generating a first target image and a second target image, performing image processing using the grayscale values of sub-pixels, and combining interpolation technology to display them cyclically on a display panel, sub-pixel resolution improvement is achieved without significantly increasing the physical resolution.
Without increasing the physical resolution of the display panel, two levels of intermediate interpolated frames are generated through image magnification and extraction, achieving a resolution increase from pixel level to sub-pixel level, reducing graininess and improving the user viewing experience.
Smart Images

Figure CN116529759B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image display technology, and in particular to an image processing method, device, and terminal. Background Art
[0002] In the prior art, when display panels involve improving pixel display clarity, a sub-pixel multiplexing method is used. However, in the prior art, when it comes to the sub-pixel multiplexing method, the current mainstream RGB arrangement display panel production process will be significantly modified. For example, four sub-pixels are combined into one pixel, but each pixel has two sub-pixels of the same color, or micro LED sub-pixel multiplexing technology is used. Although these technologies are helpful in improving the viewing effect, when using the method of combining four sub-pixels into one pixel, an image that is many times clearer than the physical resolution of the display needs to be input. When using micro LED sub-pixel multiplexing technology, not only a high-resolution image is required, but also the unequal distance between pixel centers can easily cause image blur and dazzle the user. Therefore, there is an urgent need for a method to improve pixel display clarity without significantly increasing the physical resolution of the actual panel.
[0003] Therefore, the existing technology needs to be improved and enhanced. Summary of the Invention
[0004] The present disclosure provides an image processing method, device and terminal, aiming to solve the problem in the prior art that a display panel with a higher physical resolution must be used to improve the pixel display clarity of the original image.
[0005] A first aspect of the present disclosure provides an image processing method, comprising:
[0006] Get the grayscale value of the sub-pixel in the original image;
[0007] Generate a first target image and a second target image and obtain the grayscale value of each sub-pixel point in the first target image and the second target image according to the grayscale value of the sub-pixel point in the original image;
[0008] The original image, the first target image, and the second target image are sequentially and cyclically displayed on the display panel based on the grayscale value of each sub-pixel point.
[0009] The image processing method, wherein each pixel in the display panel is composed of three sub-pixels, the three sub-pixels in each pixel form a square, and the spacing between each sub-pixel is the same;
[0010] The spacing between adjacent pixels in the display panel is the same as the spacing between adjacent sub-pixels;
[0011] The sub-pixel points in each row of the display panel are arranged in a circular manner such that the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence.
[0012] The image processing method, wherein each pixel point in the original image is the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point arranged in sequence;
[0013] Each pixel point in the first target image is the second sub-pixel point, the third sub-pixel point, and the first sub-pixel point arranged in sequence;
[0014] Each pixel point in the second target image is the third sub-pixel point, the first sub-pixel point, and the second sub-pixel point arranged in sequence.
[0015] The image processing method, wherein generating the first target image and the second target image comprises:
[0016] Extracting a first target pixel from the original image to generate the first target image, wherein the first target pixel is composed of the second sub-pixel and the third sub-pixel in the corresponding original pixel and the first sub-pixel in the right adjacent pixel of the original pixel;
[0017] A second target pixel point is extracted from the original image to generate the second target image, wherein the second target pixel point is composed of the third sub-pixel point in the corresponding original pixel point and the first sub-pixel point and the second sub-pixel point in the right adjacent pixel point of the original pixel point.
[0018] The image processing method, wherein the step of obtaining the grayscale value of each sub-pixel in the first target image based on the grayscale value of the sub-pixel in the original image, includes:
[0019] The grayscale value of each sub-pixel in the first target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel corresponding to the first target pixel and the pixel to the right of the original pixel.
[0020] The image processing method, wherein the step of obtaining the grayscale value of each sub-pixel in the second target image based on the grayscale value of the sub-pixel in the original image, comprises:
[0021] The grayscale value of each sub-pixel in the second target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel.
[0022] The image processing method, wherein obtaining the grayscale value of each sub-pixel in the first target pixel according to the grayscale value of the sub-pixel in the original pixel and the right-neighboring pixel corresponding to the first target pixel, includes:
[0023] Calculate the grayscale value of each sub-pixel in the first target pixel according to a first formula;
[0024] The first formula is:
[0025]
[0026]
[0027]
[0028] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are respectively the grayscale values of the original pixel corresponding to the first target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0029] The image processing method, wherein obtaining the grayscale value of each sub-pixel in the second target pixel according to the grayscale value of the sub-pixel in the original pixel and the right-neighboring pixel corresponding to the second target pixel, includes:
[0030] Calculate the grayscale value of each sub-pixel in the first target pixel according to a second formula;
[0031] The second formula is:
[0032]
[0033]
[0034]
[0035] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th second target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0036] The image processing method, wherein the number of real pixels in each row of the first target image is one less than that in the original image;
[0037] The leftmost side of each row in the first target image includes a first virtual pixel point;
[0038] The rightmost side of each row in the first target image includes a second virtual pixel point.
[0039] The image processing method, wherein the first virtual pixel point includes a virtual second sub-pixel point, a virtual third sub-pixel point and a real first sub-pixel point;
[0040] The second virtual pixel point includes a real second sub-pixel point, a real third sub-pixel point and a virtual first sub-pixel point.
[0041] The image processing method, wherein the grayscale value of the first sub-pixel point in the first virtual pixel point is calculated according to a third formula;
[0042] The third formula is:
[0043]
[0044] Among them, G r1 ′(x) is the grayscale value of the first sub-pixel point in the first virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image;
[0045] Calculate the grayscale values of the second sub-pixel and the third sub-pixel in the second virtual pixel according to a fourth formula;
[0046] The fourth formula is:
[0047]
[0048]
[0049] Among them, G g1 ′(x) is the grayscale value of the second sub-pixel point in the second virtual pixel point in the x-th row, G g (x n ) is the grayscale value of the second sub-pixel in the n-th pixel in the x-th row of the original image, G g (x n-1 ) is the grayscale value of the second sub-pixel in the n-1th pixel in the xth row in the original image, where each row in the original image has n pixels;
[0050] G b1 ′(x) is the grayscale value of the third sub-pixel point in the second virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0051] The image processing method, wherein the number of real pixels in each row of the second target image is one less than that of the original image;
[0052] The leftmost side of each row in the second target image includes a third virtual pixel point;
[0053] The rightmost side of each row in the second target image includes a fourth virtual pixel point.
[0054] The image processing method, wherein the third virtual pixel point includes a virtual third sub-pixel point, a real first sub-pixel point and a real second sub-pixel point;
[0055] The fourth virtual pixel point includes a real third sub-pixel point, a virtual first sub-pixel point and a virtual second sub-pixel point.
[0056] The image processing method, wherein the grayscale values of the first sub-pixel point and the second sub-pixel point in the third virtual pixel point are calculated according to a fifth formula;
[0057] The fifth formula is:
[0058]
[0059]
[0060] Among them, G r2 ′(x) is the grayscale value of the first sub-pixel point in the third virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image;
[0061] G g2′ (x) is the grayscale value of the second sub-pixel point in the third virtual pixel point in the x-th row, G g (x1) is the grayscale value of the second sub-pixel in the first pixel of the xth row in the original image, G g (x2) is the grayscale value of the second sub-pixel in the second pixel in the x-th row in the original image, where each row in the original image has n pixels;
[0062] Calculate the grayscale value of the third sub-pixel in the fourth virtual pixel according to a sixth formula;
[0063] The sixth formula is:
[0064]
[0065] Among them, G b2′ (x) is the grayscale value of the third sub-pixel point in the fourth virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0066] According to a second aspect of the present disclosure, an image processing apparatus is provided, comprising:
[0067] An original image acquisition module, configured to acquire grayscale values of sub-pixel points in an original image;
[0068] a target image acquisition module, the target image acquisition module being configured to generate a first target image and a second target image and to acquire the grayscale value of each sub-pixel point in the first target image and the second target image according to the grayscale value of the sub-pixel point in the original image;
[0069] An image display module is used to display the original image, the first target image, and the second target image on a display panel in a cyclic manner according to a frame rate based on the grayscale value of each sub-pixel point.
[0070] According to a third aspect of the present disclosure, a terminal is provided, wherein the terminal includes: a memory, a processor, and an image processing program stored in the memory and executable on the processor, wherein the image processing program implements the steps of the image processing method described above when executed by the processor.
[0071] Beneficial effects: Compared with the prior art, the present disclosure provides an image processing method, device and terminal. In the image processing method provided by the present disclosure, the grayscale value of the sub-pixel point in the original image is first obtained, and then a first target image and a second target image are generated and the grayscale value of each sub-pixel point in the first target image and the second target image is obtained according to the grayscale value of the sub-pixel point in the original image. Finally, the original image, the first target image and the second target image are cyclically displayed on the display panel based on the grayscale value of each sub-pixel point. The image processing method provided by the present disclosure generates two-level intermediate interpolation frames by amplifying and extracting the image through the reuse of the sub-pixel points on the display panel without significantly improving the physical resolution of the actual panel, and evenly distributes the original image and the interpolation frame to the reused pixels to achieve a smoother transition between pixels, thereby realizing the transition from pixel-level resolution effect to sub-pixel-level resolution effect, greatly improving the granularity caused by the large pixel spacing, improving the user's viewing experience, and bringing a new visual experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 A flowchart of an embodiment of the image processing method provided by the present disclosure;
[0073] Figure 2 A schematic diagram of RGB pixels of a display panel in an embodiment of the image processing method provided by the present disclosure;
[0074] Figure 3 A schematic diagram of the display panel structure in an embodiment of the image processing method provided by the present disclosure;
[0075] Figure 4 A schematic diagram of frame insertion in the horizontal direction in an embodiment of the image processing method provided by the present disclosure;
[0076] Figure 5 A schematic diagram of scanning in the horizontal direction according to an embodiment of the image processing method provided by the present disclosure;
[0077] Figure 6 A schematic diagram of the structure of an embodiment of the image processing device provided by the present disclosure;
[0078] Figure 7 A schematic structural diagram of an embodiment of a terminal provided by the present disclosure. DETAILED DESCRIPTION
[0079] To make the purpose, technical solutions and effects of the present disclosure more clear and explicit, the present disclosure is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure.
[0080] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0081] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which this disclosure belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0082] Example 1
[0083] The image processing method provided in this embodiment can be executed by a terminal, which can be, but is not limited to, a smart display panel, a computer, etc. The following description will be made using a smart display panel as an example. Figure 1 As shown, the image processing method provided in this embodiment includes the steps of:
[0084] S100: Obtain the grayscale value of a sub-pixel point in the original image.
[0085] Specifically, the original image is opened in a display panel, and the grayscale value of each sub-pixel in the original image is obtained.
[0086] Each pixel in the display panel is composed of three sub-pixels, the three sub-pixels in each pixel form a square, and the spacing between each sub-pixel is the same;
[0087] The spacing between adjacent pixels in the display panel is the same as the spacing between adjacent sub-pixels;
[0088] The sub-pixel points in each row of the display panel are arranged in a circular manner such that the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence.
[0089] Specifically, refer to Figure 2 , Figure 2 is a schematic diagram of an RGB pixel in the display panel, Figure 2 The pixel point in is a square pixel point composed of three R, G, and B sub-pixels, D is the side length of the square pixel point, d is the distance between each sub-pixel in the square pixel point, and the distance between sub-pixels in the square pixel point is d.
[0090] Reference Figure 3 , Figure 3 is a schematic diagram of the structure of the display panel, wherein the distance between each pixel in the display panel is the same as the distance between sub-pixels, which is also d. In other words, the distance between each sub-pixel in the display panel is d.
[0091] The sub-pixel points in each row of the display panel are arranged in a circular manner such that the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence.
[0092] That is to say, in the display panel, the first sub-pixel point in each row is the first, the second sub-pixel point is the second, and the third sub-pixel point is the third, and they are arranged in a cycle in sequence. At the same time, the last sub-pixel point in each row is the third.
[0093] In this embodiment, the first sub-pixel is a red sub-pixel, the second sub-pixel is a green sub-pixel, and the third sub-pixel is a blue sub-pixel.
[0094] S200 , generating a first target image and a second target image and obtaining the grayscale value of each sub-pixel in the first target image and the second target image according to the grayscale value of the sub-pixel in the original image.
[0095] The generating of the first target image and the second target image comprises:
[0096] Extracting a first target pixel from the original image to generate the first target image, wherein the first target pixel is composed of the second sub-pixel and the third sub-pixel in the corresponding original pixel and the first sub-pixel in the right adjacent pixel of the original pixel;
[0097] A second target pixel point is extracted from the original image to generate the second target image, wherein the second target pixel point is composed of the third sub-pixel point in the corresponding original pixel point and the first sub-pixel point and the second sub-pixel point in the right adjacent pixel point of the original pixel point.
[0098] Furthermore, the first target image and the second target image are interpolated images.
[0099] Specifically, when displaying the original image, a first interpolated image is inserted into the j+1th frame, and a second interpolated image is inserted into the j+2th frame of the display panel, wherein the sub-pixels of each pixel in the first interpolated image are arranged from left to right as the second target pixel, the third target sub-pixel, and the first target sub-pixel, and the sub-pixels of each pixel in the second interpolated image are arranged from left to right as the third target pixel, the first target sub-pixel, and the second target sub-pixel, wherein j is a positive integer and j+2 is a multiple of 3;
[0100] The grayscale value of each sub-pixel point in the first interpolated frame image and the second interpolated frame image is obtained according to the grayscale value of each sub-pixel point in the original image to generate the first target image and the second target image.
[0101] Specifically, refer to Figure 4 , Figure 4 is a schematic diagram of interpolated pixel points in the xth row of the original image. In this embodiment, the first target pixel point and the second target pixel point are interpolated pixel points corresponding to the first target image and the second target image, respectively. For example, Figure 4The interpolated frame 1 pixel 1 corresponds to the first target pixel 1 in the first target image, and the interpolated frame 2 pixel 1 corresponds to the second target pixel 1 in the second target image. The first target pixel and the second target pixel in the first target image and the second target image are interspersed between every two pixels in the original image. Specifically, the i-th pixel in the x-th row of the first target image and the second target image are interpolated between the i-th pixel and the i+1-th pixel in the x-th row of the original image, that is, there are two interpolated pixels between each original pixel. Assuming that there are n pixels in each row of the display panel, then there are 2*(n-1) interpolated pixels in the n original pixels in each row of the original image, that is, there are n-1 interpolated pixels in each row of the first target image and the second target image. The interpolation method can expand the pixels in the row direction of the original image by nearly 3 times without increasing the sub-pixels in the display panel to achieve image magnification.
[0102] Specifically, the following rules apply to the original image, the first target image, and the second target image:
[0103] Each pixel point in the original image is a first sub-pixel point, a second sub-pixel point, and a third sub-pixel point arranged in sequence;
[0104] Each pixel point in the first target image is a second sub-pixel point, a third sub-pixel point, and a first sub-pixel point arranged in sequence;
[0105] Each pixel point in the second target image is a third sub-pixel point, a first sub-pixel point, and a second sub-pixel point which are arranged in sequence.
[0106] Specifically, refer to Figure 5 It can be seen that each pixel in the original image is a first sub-pixel, a second sub-pixel, and a third sub-pixel arranged in sequence;
[0107] The first pixel of the xth row in the first target image, interpolated frame 1 pixel 1, is shifted one sub-pixel to the right compared to the first pixel of the xth row in the original image. Thus, each pixel in the first target image becomes the second sub-pixel, the third sub-pixel, and the first sub-pixel arranged in sequence.
[0108] At the same time, the first pixel point of the xth row in the second target image - interpolated frame 2 pixel 1 is moved 2 sub-pixels to the right compared to the first pixel point of the xth row in the original image. In this way, each pixel point in the second target image becomes the third sub-pixel point, the first sub-pixel point, and the second sub-pixel point arranged in sequence.
[0109] The obtaining, according to the grayscale values of the sub-pixel points in the original image, the grayscale value of each sub-pixel point in the first target image includes:
[0110] S210 , obtaining the grayscale value of each sub-pixel in the first target pixel according to the grayscale values of the sub-pixels in the original pixel corresponding to the first target pixel and the pixel to the right of the original pixel.
[0111] The acquiring the grayscale value of each sub-pixel in the first target pixel according to the grayscale values of the sub-pixels in the original pixel and the right-neighboring pixel corresponding to the first target pixel includes:
[0112] Calculate the grayscale value of each sub-pixel in the first target pixel according to a first formula;
[0113] The first formula is:
[0114]
[0115]
[0116]
[0117] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are respectively the grayscale values of the original pixel corresponding to the first target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0118] Specifically, the pixel in the first target image is the first target pixel. The grayscale values of each sub-pixel in the first target pixel are obtained according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the first target pixel in the original image.
[0119] Specifically, the sub-pixel in the i-th pixel of the first target pixel in the x-th row is calculated by subtracting one-third of the difference between the grayscale value of the same-color sub-pixel in the i-th pixel in the x-th row of the original image and the grayscale value of the same-color sub-pixel in the i+1-th pixel in the x-th row of the original image from the grayscale value of the same-color sub-pixel in the i-th pixel in the x-th row of the original image. The specific formula is:
[0120]
[0121]
[0122]
[0123] After simplification, we get the first formula:
[0124]
[0125]
[0126]
[0127] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right adjacent pixel of the original pixel.
[0128] The obtaining, according to the grayscale values of the sub-pixels in the original image, the grayscale values of the sub-pixels in the second target image includes:
[0129] S220 . Obtain the grayscale value of each sub-pixel in the second target pixel according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel.
[0130] The step of obtaining the grayscale value of each sub-pixel in the second target pixel according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel includes:
[0131] Calculate the grayscale value of each sub-pixel in the first target pixel according to a second formula;
[0132] The second formula is:
[0133]
[0134]
[0135]
[0136] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th second target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0137] Specifically, the pixel in the second target image is the second target pixel. The grayscale values of each sub-pixel in the second target pixel are obtained according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel of the original pixel in the original image corresponding to the second target pixel.
[0138] Specifically, the sub-pixel in the i-th second target pixel in the x-th row is calculated by subtracting two-thirds of the difference between the grayscale value of the same-color sub-pixel in the i-th pixel in the x-th row in the original image and the grayscale value of the same-color sub-pixel in the i+1-th pixel in the x-th row in the original image from the grayscale value of the same-color sub-pixel in the i-th pixel in the x-th row in the original image. The specific formula is:
[0139]
[0140]
[0141]
[0142] After simplification, we get the first formula:
[0143]
[0144]
[0145]
[0146] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th second target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0147] Through the above method, an enlarged image with m rows and (3n-2) columns of pixels is generated. Specifically, after interpolation, the original image is enlarged by nearly 3 times, including the original image with m rows and n columns of pixels and two interpolated images with m rows and (n-1) columns of interpolated pixels, which are the first target image and the second target image respectively.
[0148] pass Figure 5 It can also be seen that: the first sub-pixel point on the leftmost side of each row, the second sub-pixel point and the third sub-pixel point on the rightmost side of each row in the first target image do not form a complete pixel point with other sub-pixel points, and are independent sub-pixel points; the first sub-pixel point and the second sub-pixel point on the leftmost side of each row, and the third sub-pixel point on the rightmost side of each row in the second target image do not form a complete pixel point with other sub-pixel points, and are also independent sub-pixel points.
[0149] Specifically, since the pixels in the first target image are all moved one sub-pixel to the right relative to the original image, the first sub-pixel in the first column of each row in the first target image becomes an independent sub-pixel. At the same time, the second sub-pixel and the third sub-pixel in the last two columns of each row in the first target image also become independent sub-pixel points.
[0150] That is, the real pixel number in each row of the first target image is one less than that in the original image;
[0151] The leftmost side of each row in the first target image includes a first virtual pixel point;
[0152] The rightmost side of each row in the first target image includes a second virtual pixel point.
[0153] Furthermore, the first virtual pixel point includes a virtual second sub-pixel point, a virtual third sub-pixel point and a real first sub-pixel point;
[0154] The second virtual pixel point includes a real second sub-pixel point, a real third sub-pixel point and a virtual first sub-pixel point.
[0155] Specifically, the first sub-pixel point on the leftmost side of each row of the first target image, and the second sub-pixel point and the third sub-pixel point on the rightmost side of each row are independent sub-pixels. Two virtual sub-pixels are added to the leftmost side of each row of the first target image: a virtual second sub-pixel point and a virtual third sub-pixel point, which together with the leftmost independent sub-pixel point form the first virtual pixel point; and one virtual sub-pixel point is added to the left and right sides of each row of the first target image: a virtual first sub-pixel point, which together with the two rightmost independent sub-pixels form the second virtual pixel point.
[0156] That is, two virtual sub-pixels are added to the left side of each row of the first target image and the extra sub-pixel to form a virtual pixel, and one virtual sub-pixel is added to the right side of each row of the first target image and the extra two sub-pixels to form the first virtual pixel. This can reduce the loss of interpolated information. The virtual pixel on the left side of the first target image actually has only one physical sub-pixel, and the virtual pixel on the right side of the first target image actually has only two physical sub-pixels. The grayscale value of the physical sub-pixel of the left virtual pixel is defined as the average of the grayscale values of the adjacent upper and right sub-pixels; the grayscale value of the two physical sub-pixels of the right virtual pixel is defined as the average of the grayscale values of the adjacent upper and left sub-pixels.
[0157] Specifically, the grayscale value of the first sub-pixel in the first virtual pixel is calculated according to a third formula;
[0158] The third formula is:
[0159]
[0160] Among them, G r1′ (x) is the grayscale value of the first sub-pixel point in the first virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel in the xth row in the original image.
[0161] Calculate the grayscale values of the second sub-pixel and the third sub-pixel in the second virtual pixel according to a fourth formula;
[0162] The fourth formula is:
[0163]
[0164]
[0165] Among them, Gg1 ′(x) is the grayscale value of the second sub-pixel point in the second virtual pixel point in the x-th row, G g (x n ) is the grayscale value of the second sub-pixel in the n-th pixel in the x-th row of the original image, G g (x n-1 ) is the grayscale value of the second sub-pixel in the n-1th pixel in the xth row in the original image.
[0166] G b1 ′(x) is the grayscale value of the third sub-pixel point in the second virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0167] Furthermore, the pixels in the second target image are all moved 2 sub-pixels to the right relative to the original image. Therefore, the first sub-pixel and the second sub-pixel in the first two columns of each row in the second target image become independent sub-pixel points. At the same time, the third sub-pixel in the last column of each row in the second interpolated frame image also becomes an independent sub-pixel point.
[0168] That is, the real pixel point in each row of the second target image is one less than that in the original image;
[0169] The leftmost side of each row in the second target image includes a third virtual pixel point;
[0170] The rightmost side of each row in the second target image includes a fourth virtual pixel point.
[0171] The third virtual pixel point includes a virtual third sub-pixel point, a real first sub-pixel point and a real second sub-pixel point;
[0172] The fourth virtual pixel point includes a real third sub-pixel point, a virtual first sub-pixel point and a virtual second sub-pixel point.
[0173] Specifically, the first and second sub-pixel points on the leftmost side of each row of the second target image and the third sub-pixel point on the rightmost side of each row are independent sub-pixels. A virtual sub-pixel point is added to the leftmost side of each row of the second target image: a virtual third sub-pixel point, which together with the two independent sub-pixels on the leftmost side constitutes the third virtual pixel point; and two virtual sub-pixels are added to the left and right sides of each row of the second target image: a virtual first sub-pixel point and a virtual second sub-pixel point, which together with the independent sub-pixel point on the rightmost side constitute the second virtual pixel point.
[0174] That is, a virtual sub-pixel is added to the left side of each row of the second target image, and the two extra sub-pixels form a virtual pixel. Two virtual sub-pixels are added to the right side of each row of the second target image, and the extra sub-pixel forms a virtual pixel. This can reduce the loss of interpolated information. The virtual pixel on the left side of the second target image actually has only two physical sub-pixels, and the virtual pixel on the right side of the second target image actually has only one physical sub-pixel. The grayscale value of the two physical sub-pixels of the left virtual pixel is defined as the average of the grayscale values of the adjacent upper and right sub-pixels; the grayscale value of the physical sub-pixel of the right virtual pixel is defined as the average of the grayscale values of the adjacent upper and left sub-pixels.
[0175] Specifically, the grayscale values of the first sub-pixel and the second sub-pixel in the third virtual pixel are calculated according to the fifth formula;
[0176] The fifth formula is:
[0177]
[0178]
[0179] Among them, G r2′ (x) is the grayscale value of the first sub-pixel point in the third virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image;
[0180] G g2′ (x) is the grayscale value of the second sub-pixel point in the third virtual pixel point in the x-th row, G g (x1) is the grayscale value of the second sub-pixel in the first pixel of the xth row in the original image, G g(x2) is the grayscale value of the second sub-pixel in the second pixel in the x-th row in the original image, where each row in the original image has n pixels;
[0181] Calculate the grayscale value of the third sub-pixel in the fourth virtual pixel according to a sixth formula;
[0182] The sixth formula is:
[0183]
[0184] Among them, G b2′ (x) is the grayscale value of the third sub-pixel point in the fourth virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0185] Refer again Figure 1 , the image processing method described in this embodiment further includes the steps of:
[0186] S300 , displaying the original image, the first target image, and the second target image on the display panel in a cyclic manner based on the grayscale value of each sub-pixel.
[0187] Specifically, after obtaining the grayscale value of each sub-pixel, the first target image and the second target image are displayed at a frame rate based on the grayscale value of each sub-pixel. The first frame is the original image, the second frame is the first target image, and the third frame is the second target image. Circular display is performed on the display panel.
[0188] In summary, the present embodiment provides an image processing method, which first obtains the grayscale value of the sub-pixel point in the original image, then generates a first target image and a second target image and obtains the grayscale value of each sub-pixel point in the first target image and the second target image based on the grayscale value of the sub-pixel point in the original image, and finally, based on the grayscale value of each sub-pixel point, the original image, the first target image, and the second target image are cyclically displayed on the display panel in sequence. The image processing method provided in the present embodiment can generate two-level intermediate interpolation frames by amplifying and extracting the image without significantly improving the physical resolution of the actual panel by reusing the sub-pixel points on the display panel, and evenly distributes the original image and the interpolation frame to the reused pixels to achieve a smoother transition between pixels, thereby achieving a transition from pixel-level resolution to sub-pixel resolution, greatly improving the granularity caused by the large pixel spacing, enhancing the user's viewing experience, and bringing a new visual experience to the user.
[0189] It should be understood that, although the various steps in the flowcharts provided in the accompanying drawings of the present disclosure are shown in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps in the present disclosure is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps of the present disclosure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0190] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by signaling related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present disclosure can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0191] Example 2
[0192] Based on the above embodiments, the present disclosure further provides an image processing device, the functional module diagram of which is shown as follows: Figure 6 As shown, the image processing device includes:
[0193] An original image acquisition module, which is used to acquire grayscale values of sub-pixels in the original image, as specifically described in the first embodiment;
[0194] a target image acquisition module, the target image acquisition module being configured to generate a first target image and a second target image and to acquire the grayscale value of each sub-pixel in the first target image and the second target image according to the grayscale value of the sub-pixel in the original image, as specifically described in the first embodiment;
[0195] An image display module is used to display the original image, the first target image, and the second target image in sequence on the display panel in a circular manner based on the grayscale value of each sub-pixel point, as specifically described in the first embodiment.
[0196] Example 3
[0197] like Figure 7As shown, based on the above image processing method, the present disclosure also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 7 Only some of the components of the terminal are shown, but it should be understood that implementation of all of the shown components is not required, and more or fewer components may be implemented instead.
[0198] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code of the installation terminal, etc. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, an image processing program 40 is stored on the memory 20, and the image processing program 40 can be executed by the processor 10, thereby implementing the image processing method in the present application.
[0199] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes or process data stored in the memory 20, such as executing the image processing method.
[0200] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0201] In one embodiment, when the processor 10 executes the image processing program 40 in the memory 20, the following steps are implemented:
[0202] Get the grayscale value of the sub-pixel in the original image;
[0203] Generate a first target image and a second target image and obtain the grayscale value of each sub-pixel point in the first target image and the second target image according to the grayscale value of the sub-pixel point in the original image;
[0204] The original image, the first target image, and the second target image are sequentially and cyclically displayed on the display panel based on the grayscale value of each sub-pixel point.
[0205] Each pixel in the display panel is composed of three sub-pixels, the three sub-pixels in each pixel form a square, and the spacing between each sub-pixel is the same;
[0206] The spacing between adjacent pixels in the display panel is the same as the spacing between adjacent sub-pixels;
[0207] The sub-pixel points in each row of the display panel are arranged in a circular manner such that the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence.
[0208] Each pixel point in the original image is the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point arranged in sequence;
[0209] Each pixel point in the first target image is the second sub-pixel point, the third sub-pixel point, and the first sub-pixel point arranged in sequence;
[0210] Each pixel point in the second target image is the third sub-pixel point, the first sub-pixel point, and the second sub-pixel point arranged in sequence.
[0211] The generating of the first target image and the second target image includes:
[0212] Extracting a first target pixel from the original image to generate the first target image, wherein the first target pixel is composed of the second sub-pixel and the third sub-pixel in the corresponding original pixel and the first sub-pixel in the right adjacent pixel of the original pixel;
[0213] A second target pixel point is extracted from the original image to generate the second target image, wherein the second target pixel point is composed of the third sub-pixel point in the corresponding original pixel point and the first sub-pixel point and the second sub-pixel point in the right adjacent pixel point of the original pixel point.
[0214] The step of obtaining the grayscale value of each sub-pixel in the first target image according to the grayscale value of the sub-pixel in the original image includes:
[0215] The grayscale value of each sub-pixel in the first target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel corresponding to the first target pixel and the pixel to the right of the original pixel.
[0216] The step of obtaining the grayscale value of each sub-pixel in the second target image according to the grayscale value of the sub-pixel in the original image includes:
[0217] The grayscale value of each sub-pixel in the second target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel.
[0218] The step of obtaining the grayscale value of each sub-pixel in the first target pixel according to the grayscale value of the sub-pixel in the original pixel and the right-neighboring pixel corresponding to the first target pixel includes:
[0219] Calculate the grayscale value of each sub-pixel in the first target pixel according to a first formula;
[0220] The first formula is:
[0221]
[0222]
[0223]
[0224] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are respectively the grayscale values of the original pixel corresponding to the first target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0225] The step of obtaining the grayscale value of each sub-pixel in the second target pixel according to the grayscale value of the sub-pixel in the original pixel and the right-neighboring pixel corresponding to the second target pixel includes:
[0226] Calculate the grayscale value of each sub-pixel in the first target pixel according to a second formula;
[0227] The second formula is:
[0228]
[0229]
[0230]
[0231] Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th second target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
[0232] The number of real pixels in each row of the first target image is one less than that in the original image;
[0233] The leftmost side of each row in the first target image includes a first virtual pixel point;
[0234] The rightmost side of each row in the first target image includes a second virtual pixel point.
[0235] The first virtual pixel point includes a virtual second sub-pixel point, a virtual third sub-pixel point and a real first sub-pixel point;
[0236] The second virtual pixel point includes a real second sub-pixel point, a real third sub-pixel point and a virtual first sub-pixel point.
[0237] The grayscale value of the first sub-pixel in the first virtual pixel is calculated according to a third formula;
[0238] The third formula is:
[0239]
[0240] Among them, G r1′ (x) is the grayscale value of the first sub-pixel point in the first virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image;
[0241] Calculate the grayscale values of the second sub-pixel and the third sub-pixel in the second virtual pixel according to a fourth formula;
[0242] The fourth formula is:
[0243]
[0244]
[0245] Among them, G g1′ (x) is the grayscale value of the second sub-pixel point in the second virtual pixel point in the x-th row, G g (x n ) is the grayscale value of the second sub-pixel in the n-th pixel in the x-th row of the original image, G g (x n-1 ) is the grayscale value of the second sub-pixel in the n-1th pixel in the xth row in the original image, where each row in the original image has n pixels;
[0246] G b1′ (x) is the grayscale value of the third sub-pixel point in the second virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0247] The number of real pixels in each row of the second target image is one less than that in the original image;
[0248] The leftmost side of each row in the second target image includes a third virtual pixel point;
[0249] The rightmost side of each row in the second target image includes a fourth virtual pixel point.
[0250] The third virtual pixel point includes a virtual third sub-pixel point, a real first sub-pixel point and a real second sub-pixel point;
[0251] The fourth virtual pixel point includes a real third sub-pixel point, a virtual first sub-pixel point and a virtual second sub-pixel point.
[0252] The grayscale values of the first sub-pixel and the second sub-pixel in the third virtual pixel are calculated according to the fifth formula;
[0253] The fifth formula is:
[0254]
[0255]
[0256] Among them, G r2′ (x) is the grayscale value of the first sub-pixel point in the third virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image;
[0257] G g2′ (x) is the grayscale value of the second sub-pixel point in the third virtual pixel point in the x-th row, G g (x1) is the grayscale value of the second sub-pixel in the first pixel of the xth row in the original image, G g (x2) is the grayscale value of the second sub-pixel in the second pixel in the x-th row in the original image, where each row in the original image has n pixels;
[0258] Calculate the grayscale value of the third sub-pixel in the fourth virtual pixel according to a sixth formula;
[0259] The sixth formula is:
[0260]
[0261] Among them, G b2′ (x) is the grayscale value of the third sub-pixel point in the fourth virtual pixel point in the x-th row, G b (x n) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
[0262] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.
Claims
1. An image processing method, characterized in that: include: Get the grayscale value of the sub-pixel in the original image; Generate a first target image and a second target image and obtain the grayscale value of each sub-pixel point in the first target image and the second target image according to the grayscale value of the sub-pixel point in the original image; Based on the grayscale value of each sub-pixel point, the original image, the first target image, and the second target image are cyclically displayed on the display panel in sequence; Each pixel in the display panel is composed of three sub-pixels, the three sub-pixels in each pixel form a square, and the spacing between each sub-pixel is the same; The spacing between adjacent pixels in the display panel is the same as the spacing between adjacent sub-pixels; The sub-pixel points in each row of the display panel are arranged in a circular manner: the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence; Each pixel point in the original image is the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point arranged in sequence; Each pixel point in the first target image is the second sub-pixel point, the third sub-pixel point, and the first sub-pixel point arranged in sequence; Each pixel point in the second target image is the third sub-pixel point, the first sub-pixel point, and the second sub-pixel point arranged in sequence.
2. The image processing method according to claim 1, wherein: The generating of the first target image and the second target image comprises: Extracting a first target pixel from the original image to generate the first target image, wherein the first target pixel is composed of the second sub-pixel and the third sub-pixel in the corresponding original pixel and the first sub-pixel in the right adjacent pixel of the original pixel; A second target pixel point is extracted from the original image to generate the second target image, wherein the second target pixel point is composed of the third sub-pixel point in the corresponding original pixel point and the first sub-pixel point and the second sub-pixel point in the right adjacent pixel point of the original pixel point.
3. The image processing method according to claim 2, wherein: The obtaining, according to the grayscale values of the sub-pixel points in the original image, the grayscale value of each sub-pixel point in the first target image includes: The grayscale value of each sub-pixel in the first target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel corresponding to the first target pixel and the pixel to the right of the original pixel.
4. The image processing method according to claim 2, wherein: The obtaining, according to the grayscale values of the sub-pixels in the original image, the grayscale values of the sub-pixels in the second target image includes: The grayscale value of each sub-pixel in the second target pixel is obtained according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel.
5. The image processing method according to claim 3, wherein: The acquiring the grayscale value of each sub-pixel in the first target pixel according to the grayscale values of the sub-pixels in the original pixel and the right-neighboring pixel corresponding to the first target pixel includes: Calculate the grayscale value of each sub-pixel in the first target pixel according to a first formula; The first formula is: Among them, G r1 (x i ), G g1 (x i ), G b1 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the first target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are respectively the grayscale values of the original pixel corresponding to the first target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
6. The image processing method according to claim 4, wherein: The step of obtaining the grayscale value of each sub-pixel in the second target pixel according to the grayscale values of the sub-pixels in the original pixel and the right-adjacent pixel corresponding to the second target pixel includes: Calculate the grayscale value of each sub-pixel in the second target pixel according to a second formula; The second formula is: Among them, G r2 (x i ), G g2 (x i ), G b2 (x i ) are the grayscale values of the first, second and third sub-pixel points in the i-th second target pixel point in the x-th row, G r (x i ), G r (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the first sub-pixel in the right neighboring pixel of the original pixel, G g (x i ), G g (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the second sub-pixel in the right neighboring pixel of the original pixel, G b (x i ), G b (x i+1 ) are the grayscale values of the original pixel corresponding to the second target pixel and the third sub-pixel in the right adjacent pixel of the original pixel.
7. The image processing method according to claim 2, wherein: The number of real pixels in each row of the first target image is one less than that in the original image; The leftmost side of each row in the first target image includes a first virtual pixel point; The rightmost side of each row in the first target image includes a second virtual pixel point.
8. The image processing method according to claim 7, wherein: The first virtual pixel point includes a virtual second sub-pixel point, a virtual third sub-pixel point and a real first sub-pixel point; The second virtual pixel point includes a real second sub-pixel point, a real third sub-pixel point and a virtual first sub-pixel point.
9. The image processing method according to claim 7, wherein: Calculate the grayscale value of the first sub-pixel in the first virtual pixel according to a third formula; The third formula is: Among them, G r1′ (x) is the grayscale value of the first sub-pixel point in the first virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image; Calculate the grayscale values of the second sub-pixel and the third sub-pixel in the second virtual pixel according to a fourth formula; The fourth formula is: Among them, G g1′ (x) is the grayscale value of the second sub-pixel point in the second virtual pixel point in the x-th row, G g (x n ) is the grayscale value of the second sub-pixel in the n-th pixel in the x-th row of the original image, G g (x n-1 ) is the grayscale value of the second sub-pixel in the n-1th pixel in the xth row in the original image, where each row in the original image has n pixels; G b1′ (x) is the grayscale value of the third sub-pixel point in the second virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
10. The image processing method according to claim 2, wherein: The number of real pixels in each row of the second target image is one less than that in the original image; The leftmost side of each row in the second target image includes a third virtual pixel point; The rightmost side of each row in the second target image includes a fourth virtual pixel point.
11. The image processing method according to claim 10, wherein: The third virtual pixel point includes a virtual third sub-pixel point, a real first sub-pixel point and a real second sub-pixel point; The fourth virtual pixel point includes a real third sub-pixel point, a virtual first sub-pixel point and a virtual second sub-pixel point.
12. The image processing method according to claim 11, wherein: Calculate the grayscale values of the first sub-pixel and the second sub-pixel in the third virtual pixel according to a fifth formula; The fifth formula is: Among them, G r2′ (x) is the grayscale value of the first sub-pixel point in the third virtual pixel point in the x-th row, G r (x1) is the grayscale value of the first sub-pixel in the first pixel of the x-th row in the original image, G r (x2) is the grayscale value of the first sub-pixel in the second pixel of the x-th row in the original image; G g2′ (x) is the grayscale value of the second sub-pixel point in the third virtual pixel point in the x-th row, G g (x1) is the grayscale value of the second sub-pixel in the first pixel of the xth row in the original image, G g (x2) is the grayscale value of the second sub-pixel in the second pixel in the x-th row in the original image, where each row in the original image has n pixels; Calculate the grayscale value of the third sub-pixel in the fourth virtual pixel according to a sixth formula; The sixth formula is: Among them, G b2′ (x) is the grayscale value of the third sub-pixel point in the fourth virtual pixel point in the x-th row, G b (x n ) is the grayscale value of the third sub-pixel in the n-th pixel in the x-th row of the original image, G b (x n-1 ) is the grayscale value of the third sub-pixel in the n-1th pixel in the xth row in the original image.
13. An image processing device, characterized in that: The device comprises: An original image acquisition module, configured to acquire grayscale values of sub-pixel points in an original image; a target image acquisition module, the target image acquisition module being configured to generate a first target image and a second target image and to acquire the grayscale value of each sub-pixel point in the first target image and the second target image according to the grayscale value of the sub-pixel point in the original image; an image display module, configured to display the original image, the first target image, and the second target image on a display panel in a cyclic manner based on the grayscale value of each sub-pixel; Each pixel in the display panel is composed of three sub-pixels, the three sub-pixels in each pixel form a square, and the spacing between each sub-pixel is the same; The spacing between adjacent pixels in the display panel is the same as the spacing between adjacent sub-pixels; The sub-pixel points in each row of the display panel are arranged in a circular manner: the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point are arranged in sequence; Each pixel point in the original image is the first sub-pixel point, the second sub-pixel point, and the third sub-pixel point arranged in sequence; Each pixel point in the first target image is the second sub-pixel point, the third sub-pixel point, and the first sub-pixel point arranged in sequence; Each pixel point in the second target image is the third sub-pixel point, the first sub-pixel point, and the second sub-pixel point arranged in sequence.
14. A terminal, characterized in that: The terminal includes: a memory, a processor, and an image processing program stored in the memory and executable on the processor. When the image processing program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Pixel array driving method and display device
CN103886825A