Method, apparatus, terminal device and storage medium for improving image display uniformity
Patent Information
- Application Number
- CN202311165162.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-09-11
AI Technical Summary
采用这种处理方法会使得图像中各点的能量集中在右侧,使得所得到的处理后的图像在画面显示时,存在左右两侧能量不均匀的问题,导致最终显示在电子纸显示屏中的图像显示亮度不均匀,电子纸所呈现的显示效果较差
[0056] This invention provides a method, apparatus, terminal device, and storage medium for improving image display uniformity. The method involves acquiring an image to be processed and the target grayscale level to be displayed in the image. A first brightness matrix of the image to be processed is determined using the coordinates and brightness of all pixels in the image. A grayscale uniformity matrix of the image to be processed is determined using the target grayscale level. The first brightness matrix is adjusted using the grayscale uniformity matrix to generate a second brightness matrix. The display brightness of each pixel in the image to be processed is then adjusted using the second brightness matrix. As a result, the brightness of each pixel in the generated image is not concentrated under the action of the grayscale uniformity matrix, resulting in a better and more uniform display effect.
Smart Images

Figure CN117253460B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic paper module display technology, and in particular to a method, apparatus, terminal device and storage medium for improving image display uniformity. Background Technology
[0002] Grayscale represents different levels of brightness from the darkest to the brightest. The more grayscale levels there are, the more delicate the image effect can be presented.
[0003] In the field of electronic paper module displays, the number of gray levels used for display is limited, typically a maximum of 16 gray levels, and as few as 8 or 4 gray levels. Current technologies usually employ a dithering algorithm to process the input image before displaying it on an electronic paper screen. This method causes the energy of each point in the image to concentrate on the right side, resulting in uneven energy distribution between the left and right sides of the processed image. This leads to uneven brightness in the final image displayed on the electronic paper screen, resulting in a poor display effect. Summary of the Invention
[0004] This invention provides a method, apparatus, terminal device, and storage medium for improving image display uniformity, thereby enhancing the image display effect of electronic paper.
[0005] An embodiment of the present invention provides a method for improving image display uniformity, comprising:
[0006] Obtain the image to be processed and its target grayscale, and determine the coordinates and brightness of all pixels in the image to be processed;
[0007] Generate the first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed;
[0008] The grayscale uniformity matrix of the image to be processed is determined based on the image to be processed and the target grayscale of the image to be processed.
[0009] A second brightness matrix of the image to be processed is generated based on the first brightness matrix and the grayscale uniformity matrix.
[0010] The brightness of each pixel in the image to be processed is adjusted using the second brightness matrix to generate a uniform image.
[0011] Further, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0012] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0013] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0014] For each matrix cell in the initial gray-scale uniform matrix, the first repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-scale uniform matrix is maximized, thus generating the gray-scale uniform matrix.
[0015] The first relocation operation of the matrix unit includes:
[0016] Select two adjacent numbered matrix units one by one from the initial gray-scale uniform matrix;
[0017] Select one matrix unit as a fixed matrix unit from two adjacent numbered matrix units, and select the other matrix unit as a moving matrix unit;
[0018] The moving matrix unit is moved, and its position in the initial gray-scale uniform matrix is determined when the relative distance between the moving matrix unit and the fixed matrix unit is at its maximum.
[0019] Further, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0020] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0021] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0022] For each matrix cell in the initial gray-level uniform matrix, the second repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-level uniform matrix is maximized, thus generating the gray-level uniform matrix.
[0023] The second repositioning operation of the matrix unit includes:
[0024] Four consecutively numbered matrix units are selected from the initial uniform gray-scale matrix;
[0025] In the initial gray-scale uniform matrix, four consecutively numbered matrix cells are randomly positioned, and the relative distance between any one of the four consecutively numbered matrix cells and the other matrix cells is calculated. When the relative distance between any two matrix cells is the maximum, the position of the four consecutively numbered matrix cells in the initial gray-scale uniform matrix is determined.
[0026] Furthermore, after acquiring the image to be processed and its target grayscale, and determining the coordinates and brightness of all pixels in the image to be processed, the process also includes:
[0027] When a change in brightness is detected in any pixel in the image to be processed, if the brightness of the pixel decreases, the brightness of the pixels surrounding the pixel is increased.
[0028] If the brightness of a pixel increases, the brightness of the pixels surrounding that pixel decreases.
[0029] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments;
[0030] One embodiment of the present invention provides an apparatus for improving the uniformity of image display, comprising: a data acquisition module, a first brightness matrix generation module, a grayscale uniformity matrix generation module, a second brightness matrix generation module, and an image adjustment module;
[0031] The data acquisition module is used to acquire the image to be processed and the target grayscale of the image to be processed, and to determine the coordinates and brightness of all pixels in the image to be processed.
[0032] The first brightness matrix generation module is used to generate a first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed.
[0033] The grayscale uniform matrix generation module is used to determine the grayscale uniform matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed.
[0034] The second brightness matrix generation module is used to generate a second brightness matrix of the image to be processed based on the first brightness matrix and the grayscale uniformity matrix;
[0035] The image adjustment module is used to adjust the brightness of each pixel in the image to be processed using the second brightness matrix to generate a uniform image.
[0036] Further, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0037] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0038] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0039] For each matrix cell in the initial gray-scale uniform matrix, the first repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-scale uniform matrix is maximized, thus generating the gray-scale uniform matrix.
[0040] The first relocation operation of the matrix unit includes:
[0041] Select two adjacent numbered matrix units one by one from the initial gray-scale uniform matrix;
[0042] Select one matrix unit as a fixed matrix unit from two adjacent numbered matrix units, and select the other matrix unit as a moving matrix unit;
[0043] The moving matrix unit is moved, and its position in the initial gray-scale uniform matrix is determined when the relative distance between the moving matrix unit and the fixed matrix unit is at its maximum.
[0044] Further, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0045] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0046] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0047] For each matrix cell in the initial gray-level uniform matrix, the second repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-level uniform matrix is maximized, thus generating the gray-level uniform matrix.
[0048] The second repositioning operation of the matrix unit includes:
[0049] Four consecutively numbered matrix units are selected from the initial uniform gray-scale matrix;
[0050] In the initial gray-scale uniform matrix, four consecutively numbered matrix cells are randomly positioned, and the relative distance between any one of the four consecutively numbered matrix cells and the other matrix cells is calculated. When the relative distance between any two matrix cells is the maximum, the position of the four consecutively numbered matrix cells in the initial gray-scale uniform matrix is determined.
[0051] Furthermore, it also includes: an energy distribution module;
[0052] The energy distribution module is used to, when a change in the brightness of any pixel in the image to be processed is detected, increase the brightness of the pixels surrounding the pixel if the brightness of the pixel decreases, and decrease the brightness of the pixels surrounding the pixel if the brightness of the pixel increases.
[0053] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a method for improving image display uniformity as described in the above embodiments of the invention.
[0054] Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform a method for improving image display uniformity as described in the above-described embodiment of the invention.
[0055] The following benefits can be obtained by implementing the present invention:
[0056] This invention provides a method, apparatus, terminal device, and storage medium for improving image display uniformity. The method involves acquiring an image to be processed and the target grayscale level to be displayed in the image. A first brightness matrix of the image to be processed is determined using the coordinates and brightness of all pixels in the image. A grayscale uniformity matrix of the image to be processed is determined using the target grayscale level. The first brightness matrix is adjusted using the grayscale uniformity matrix to generate a second brightness matrix. The display brightness of each pixel in the image to be processed is then adjusted using the second brightness matrix. As a result, the brightness of each pixel in the generated image is not concentrated under the action of the grayscale uniformity matrix, resulting in a better and more uniform display effect. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating a method for improving image display uniformity according to an embodiment of the present invention.
[0058] Figure 2 This is a schematic diagram of a device for improving the uniformity of image display according to an embodiment of the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] To better demonstrate the technical effects achievable by this invention, it should be noted before describing the embodiments of this invention that, in the existing electronic paper industry, the image processing algorithms used often result in energy accumulation, causing energy to concentrate on the right side of the displayed image. This leads to a visually brighter right side of the image, resulting in poor display quality. For example:
[0061] The following table shows an image with a grayscale value of 100:
[0062] 100 100 100 100 100 100 100 100 100 100 100 100
[0063] Since energy accumulates from left to right, a white dot will appear when the accumulated energy exceeds 255, which is the third 100 in the table above; the resulting image after energy accumulation is shown in the table below:
[0064] 0 0 255 0 0 0 255 0 0 0 255 0
[0065] When the image corresponding to the table above is displayed, a white line will appear in the third column, which is different from the first, second and fourth columns. This makes the image display abrupt, with uneven brightness and poor display effect.
[0066] To address the aforementioned display problems, this invention proposes a method for improving image display uniformity.
[0067] like Figure 1 The image shown is a method for improving image display uniformity according to an embodiment of the present invention, comprising:
[0068] Step S1: Obtain the image to be processed and the target grayscale of the image to be processed, and determine the coordinates and brightness of all pixels in the image to be processed;
[0069] Step S2: Generate the first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed;
[0070] Step S3: Determine the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed.
[0071] Step S4: Generate a second brightness matrix of the image to be processed based on the first brightness matrix and the grayscale uniformity matrix;
[0072] Step S5: Adjust the brightness of each pixel in the image to be processed using the second brightness matrix to generate a uniform image.
[0073] For step S1, obtain the image to be processed and the target grayscale to be displayed in the image to be processed, and determine the number of pixels contained in the image to be processed and the coordinates of each pixel in the image to be processed based on the obtained image.
[0074] In a preferred embodiment, after acquiring the image to be processed and the target grayscale of the image to be processed, and determining the coordinates and brightness of all pixels in the image to be processed, the method further includes: when a change in the brightness of any pixel in the image to be processed is detected, if the brightness of the pixel decreases, the brightness of the pixels surrounding the pixel is increased; if the brightness of the pixel increases, the brightness of the pixels surrounding the pixel is decreased.
[0075] Specifically, in the field of electronic paper displays, the energy of each pixel in an image changes during the process from input to display on the screen. The final image displayed on the electronic paper screen consists only of black pixels (0 brightness) and white pixels (255 brightness). For example, if the brightness of a pixel is 120, and the threshold set during image processing is 128, pixels with a brightness below 128 will be set as black pixels (0 brightness), while pixels with a brightness above 128 will be set as white pixels (255 brightness). In the process of converting pixels to black or white pixels according to the set threshold, there is energy loss or gain. To ensure energy conservation, a preset energy radiation table is used to distribute the energy lost or gained by any pixel, ensuring no energy is lost and that black and white pixels can still reflect the grayscale of the image.
[0076] For example, an image has 16 pixels as shown in the table below:
[0077] 200 30 80 60 250 240 190 150 220 214 24 35
[0078] The energy radiation table for a non-edge is shown below:
[0079] 3 / 8 1 / 8 1 / 8
[0080] The energy radiation table for a left boundary is shown in the table below:
[0081]
[0082]
[0083] The energy radiation table for a right boundary is shown in the table below:
[0084] 1 / 8 3 / 8
[0085] The energy radiation table for the boundary conditions is shown in the table below:
[0086] 0 current point 3 / 8
[0087] When the brightness value of a pixel in the image changes, the changed energy is distributed according to the energy radiation table mentioned above, so that the display effect is uniform and conforms to the principle of energy conservation.
[0088] For example: when the brightness of the second pixel in the first row changes from 120 to 0, and the changed brightness is distributed to the surrounding pixels, then from the original:
[0089] 200 30 80
[0090] Transformed into:
[0091] 200+45 30+15 80+15
[0092] Similarly, when the brightness of the second pixel in the third row changes from 240 to 255, the change in brightness is obtained from the surrounding pixels, thus changing from the original:
[0093] 220 214 24
[0094] Change to:
[0095] 220-6 214-2 24-2
[0096] The above method ensures that the brightness of any pixel is not lost by following the principle of energy conservation, and also allows black and white dots to reflect the grayscale of the image.
[0097] For step S2, a first brightness matrix is generated based on the coordinates and brightness of each pixel in the image to be processed. For example, if the image to be processed is a 4x4 image with 16 pixels, and each pixel is a solid color image with a brightness of 100, then the coordinate matrix of the image to be processed is shown in the table below:
[0098] N[x][y+1] N[x+1][y+1] N[x+2][y+1] N[x+3][y+1] N[x][y+2] N[x+1][y+2] N[x+2][y+2] N[x+3][y+2] N[x][y+3] N[x+1][y+3] N[x+2][y+3] N[x+3][y+3]
[0099] The first brightness matrix of the image to be processed is shown in the table below:
[0100]
[0101] For step S3, in a preferred embodiment, determining the grayscale uniform matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes: determining an initial grayscale uniform matrix based on the image to be processed and the target grayscale of the image to be processed; wherein the initial grayscale uniform matrix includes a plurality of matrix units, each matrix unit corresponding to a pixel in the image to be processed; numbering each matrix unit in the initial grayscale uniform matrix from left to right; for each matrix unit in the initial grayscale uniform matrix, repeatedly performing the first repositioning operation of the matrix unit until the relative distance between adjacent numbered matrix units in the initial grayscale uniform matrix is maximized, thereby generating a grayscale uniform matrix; wherein the first repositioning operation of the matrix unit includes: selecting two adjacent numbered matrix units one by one from the initial grayscale uniform matrix; selecting one matrix unit as a fixed matrix unit and selecting another matrix unit as a moving matrix unit from the two adjacent numbered matrix units; moving the moving matrix unit and determining the position of the moving matrix unit in the initial grayscale uniform matrix when the relative distance between the moving matrix unit and the fixed matrix unit is maximized.
[0102] In another preferred embodiment, determining the grayscale uniform matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes: determining an initial grayscale uniform matrix based on the image to be processed and the target grayscale of the image to be processed; wherein the initial grayscale uniform matrix includes a plurality of matrix units, each matrix unit corresponding to a pixel in the image to be processed; numbering each matrix unit in the initial grayscale uniform matrix from left to right; for each matrix unit in the initial grayscale uniform matrix, repeatedly performing a second repositioning operation of the matrix unit until the relative distance between adjacent numbered matrix units in the initial grayscale uniform matrix is maximized, thereby generating a grayscale uniform matrix; wherein the second repositioning operation of the matrix unit includes: selecting four consecutively numbered matrix units from the initial grayscale uniform matrix; randomly positioning the four consecutively numbered matrix units in the initial grayscale uniform matrix, calculating the relative distance between any one of the four consecutively numbered matrix units and each of the remaining matrix units, and determining the position of the four consecutively numbered matrix units in the initial grayscale uniform matrix when the relative distance between any two matrix units is maximized.
[0103] Specifically, the target grayscale level determines the size of the final generated uniform grayscale matrix. For example, if the target grayscale level is 16 grayscale levels, the generated uniform grayscale matrix will be a 4x4 matrix; if the target grayscale level is 64 grayscale levels, the generated uniform grayscale matrix will be 8x8; and if the target grayscale level is 96 grayscale levels, the generated uniform grayscale matrix will be 18x8. It should be noted that regardless of the number of target grayscale levels selected, the final generated uniform grayscale matrix maintains a proportional relationship with the first brightness matrix of the image to be processed. In this embodiment, a target grayscale level of 16 grayscale levels is selected for illustrative purposes.
[0104] The initial uniform grayscale matrix generated from 16 gray levels is a 4x4 matrix. Numbering it from left to right yields the initial uniform grayscale matrix shown in the figure below:
[0105] 5 6 7 8 9 10 11 12 13 14 15 16
[0106] In the table above, each number represents the number of each matrix unit, which corresponds one-to-one with the coordinate matrix in the image to be processed. That is, the coordinates corresponding to the matrix unit numbered 1 are N[x][y], which will not be elaborated here.
[0107] To determine the uniform grayscale matrix, this embodiment provides two methods. One method is to calculate the distances between matrix unit 1 and matrix unit 2, matrix unit 2 and matrix unit 3, ..., matrix unit 15 and matrix unit 16 using the Euclidean distance calculation formula or the urban-rural distance calculation formula, and then sum them up sequentially. At the same time, the location of each pair of adjacent matrix units in the uniform grayscale matrix is determined based on the obtained distances. By repeatedly calculating the distances between each pair of adjacent matrix units, the corresponding uniform grayscale matrix is generated when the relative distances between each pair of adjacent matrix units in the uniform grayscale matrix are all maximized.
[0108] Another method involves calculating the distances from matrix cell 1 to matrix cells 2, 3, and 4; the distances from matrix cell 2 to matrix cells 1, 3, and 4; and the distances from matrix cell 3 to matrix cells 2, 4, and 5. These distances are then summed to determine the optimal grayscale uniform matrix. The method generates the grayscale uniform matrix when the relative distance between each matrix cell and its three adjacent matrix cells is maximized within the grayscale uniform matrix. Essentially, this method ensures that no matrix cell 1 is surrounded by matrix cells numbered less than 5, thus preventing the clustering of neighboring matrix cells.
[0109] In this embodiment, the generated 4x4 grayscale uniform matrix is shown below:
[0110] 13 1 6 10 4 12 15 7 16 8 3 11
[0111] It should be noted that the generated uniform matrix generally includes two types, one of which is a square matrix, as shown in the table below:
[0112] 3 4
[0113] Another type is the rectangular uniform matrix shown in the table below:
[0114] 4 5 6
[0115] The 4x4 uniform matrix used in this embodiment of the invention is a square matrix. If a rectangular uniform matrix is used, the resulting grayscale uniform matrix is shown in the table below:
[0116] 25 1 18 10 27 3 4 12 23 7 22 6 29 5 16 24 31 15 30 14 21 13 32 8
[0117] The generation of this table also depends on the 4-neighborhood calculation method or Euclidean distance calculation method used in the embodiments of the present invention, which will not be elaborated here.
[0118] It should be added that, in order to achieve a better uniform display effect in the generated grayscale uniform matrix, when two relatively close matrix units are detected in a local area of the final generated grayscale uniform matrix, the matrix units in the selected area can be randomly scattered, so that the final generated grayscale uniform matrix has a better uniform display effect.
[0119] For step S4, after determining the first brightness matrix and the grayscale uniformity matrix, based on the brightness values in the first brightness matrix, determine which numbered matrix cells in the grayscale uniformity matrix should be set to white points and which should be set to black points, thereby generating the corresponding second brightness matrix. For example: if the brightness of each pixel in the first brightness matrix is 100, dividing 100 brightness into 16 equal parts is approximately equal to 6. Then, according to the grayscale uniformity matrix, set the matrix cells numbered 1-6 to 255, and set the remaining matrix cells to 0, thus obtaining the second brightness matrix as shown in the table below:
[0120] 0 255 255 10 255 0 0 0 0 0 255 0
[0121] For step S5, the brightness values of each pixel in the image to be processed are reset according to the second brightness matrix determined in step S4, so that an image with uniform display brightness can be obtained.
[0122] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0123] like Figure 2As shown, an embodiment of the present invention provides an apparatus for improving the uniformity of image display, comprising: a data acquisition module, a first brightness matrix generation module, a grayscale uniformity matrix generation module, a second brightness matrix generation module, and an image adjustment module;
[0124] The data acquisition module is used to acquire the image to be processed and the target grayscale of the image to be processed, and to determine the coordinates and brightness of all pixels in the image to be processed.
[0125] The first brightness matrix generation module is used to generate a first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed.
[0126] The grayscale uniform matrix generation module is used to determine the grayscale uniform matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed.
[0127] The second brightness matrix generation module is used to generate a second brightness matrix of the image to be processed based on the first brightness matrix and the grayscale uniformity matrix;
[0128] The image adjustment module is used to adjust the brightness of each pixel in the image to be processed using the second brightness matrix to generate a uniform image.
[0129] In a preferred embodiment, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0130] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0131] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0132] For each matrix cell in the initial gray-scale uniform matrix, the first repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-scale uniform matrix is maximized, thus generating the gray-scale uniform matrix.
[0133] The first relocation operation of the matrix unit includes:
[0134] Select two adjacent numbered matrix units one by one from the initial gray-scale uniform matrix;
[0135] Select one matrix unit as a fixed matrix unit from two adjacent numbered matrix units, and select the other matrix unit as a moving matrix unit;
[0136] The moving matrix unit is moved, and its position in the initial gray-scale uniform matrix is determined when the relative distance between the moving matrix unit and the fixed matrix unit is at its maximum.
[0137] In another preferred embodiment, determining the grayscale uniformity matrix of the image to be processed based on the image to be processed and the target grayscale of the image to be processed includes:
[0138] An initial grayscale uniformity matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniformity matrix includes a number of matrix units, and each matrix unit corresponds to a pixel in the image to be processed;
[0139] Each matrix element in the initial uniform gray-level matrix is numbered sequentially from left to right;
[0140] For each matrix cell in the initial gray-level uniform matrix, the second repositioning operation of the matrix cell is repeated until the relative distance between adjacent numbered matrix cells in the initial gray-level uniform matrix is maximized, thus generating the gray-level uniform matrix.
[0141] The second repositioning operation of the matrix unit includes:
[0142] Four consecutively numbered matrix units are selected from the initial uniform gray-scale matrix;
[0143] In the initial gray-scale uniform matrix, four consecutively numbered matrix cells are randomly positioned, and the relative distance between any one of the four consecutively numbered matrix cells and the other matrix cells is calculated. When the relative distance between any two matrix cells is the maximum, the position of the four consecutively numbered matrix cells in the initial gray-scale uniform matrix is determined.
[0144] In a preferred embodiment, it further includes: an energy distribution module;
[0145] The energy distribution module is used to, when a change in the brightness of any pixel in the image to be processed is detected, increase the brightness of the pixels surrounding the pixel if the brightness of the pixel decreases, and decrease the brightness of the pixels surrounding the pixel if the brightness of the pixel increases.
[0146] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0147] Those skilled in the art will clearly understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0148] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0149] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a method for improving image display uniformity as described in any one of the present invention.
[0150] The terminal device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0151] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0152] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0153] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0154] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute a method for improving image display uniformity as described in any one of the present invention.
[0155] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0156] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for improving image display uniformity, characterized in that, include: Obtain the image to be processed and the target grayscale of the image to be processed, and determine the coordinates and brightness of all pixels in the image to be processed; Generate the first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed; An initial grayscale uniform matrix is determined based on the image to be processed and the target grayscale of the image to be processed; wherein, the initial grayscale uniform matrix includes a number of matrix units, each of which corresponds to a pixel in the image to be processed; each matrix unit in the initial grayscale uniform matrix is numbered from left to right. For each matrix cell in the initial grayscale uniform matrix, the first repositioning operation of the matrix cell is repeatedly performed until the relative distance between adjacent numbered matrix cells in the initial grayscale uniform matrix is maximized, thus generating the grayscale uniform matrix. The first repositioning operation of the matrix cell includes: selecting two adjacent numbered matrix cells one by one from the initial grayscale uniform matrix; selecting one matrix cell as a fixed matrix cell and the other matrix cell as a moving matrix cell from the two adjacent numbered matrix cells; moving the moving matrix cell and determining the position of the moving matrix cell in the initial grayscale uniform matrix when the relative distance between the moving matrix cell and the fixed matrix cell is maximized. Alternatively, for each matrix cell in the initial grayscale uniform matrix, the second repositioning operation of the matrix cells is repeatedly performed until the relative distance between adjacent numbered matrix cells in the initial grayscale uniform matrix is maximized, thereby generating a grayscale uniform matrix; wherein, the second repositioning operation of the matrix cells includes: selecting four consecutively numbered matrix cells from the initial grayscale uniform matrix; randomly positioning the four consecutively numbered matrix cells in the initial grayscale uniform matrix, calculating the relative distance between any one of the four consecutively numbered matrix cells and each of the remaining matrix cells, and determining the position of the four consecutively numbered matrix cells in the initial grayscale uniform matrix when the relative distance between any two matrix cells is maximized; After determining the first brightness matrix and the grayscale uniformity matrix, the matrix units that need to be set as white points and the matrix units that need to be set as black points in the grayscale uniformity matrix are determined according to the brightness values in the first brightness matrix, and the second brightness matrix of the image to be processed is generated. The brightness of each pixel in the image to be processed is adjusted using the second brightness matrix to generate a uniform image.
2. The method for improving image display uniformity as described in claim 1, characterized in that, After acquiring the image to be processed and its target grayscale, and determining the coordinates and brightness of all pixels in the image to be processed, the process also includes: When a change in brightness is detected in any pixel in the image to be processed, if the brightness of the pixel decreases, the brightness of the pixels surrounding the pixel is increased. If the brightness of a pixel increases, the brightness of the pixels surrounding that pixel decreases.
3. An apparatus for improving the uniformity of image display, characterized in that, include: The system includes a data acquisition module, a first brightness matrix generation module, a grayscale uniformity matrix generation module, a second brightness matrix generation module, and an image adjustment module. The data acquisition module is used to acquire the image to be processed and the target grayscale of the image to be processed, and to determine the coordinates and brightness of all pixels in the image to be processed. The first brightness matrix generation module is used to generate a first brightness matrix of the image to be processed based on the coordinates and brightness of all pixels in the image to be processed. The grayscale uniform matrix generation module is used to determine an initial grayscale uniform matrix based on the image to be processed and the target grayscale of the image to be processed. The initial grayscale uniform matrix includes several matrix units, each matrix unit corresponding to a pixel in the image to be processed. Each matrix unit in the initial grayscale uniform matrix is numbered sequentially from left to right. For each matrix unit in the initial grayscale uniform matrix, a first repositioning operation of the matrix unit is repeatedly performed until the relative distance between adjacent numbered matrix units in the initial grayscale uniform matrix is maximized, thus generating the grayscale uniform matrix. The first repositioning operation of the matrix unit includes: selecting two adjacent numbered matrix units sequentially from the initial grayscale uniform matrix; selecting one matrix unit as a fixed matrix unit and the other matrix unit as a moving matrix unit from the two adjacent numbered matrix units; moving the matrix unit... The process involves moving matrix units and determining their position in an initial grayscale uniform matrix when the relative distance between the moving matrix unit and the fixed matrix unit is maximized; or, for each matrix unit in the initial grayscale uniform matrix, repeating the second repositioning operation until the relative distance between adjacent numbered matrix units in the initial grayscale uniform matrix is maximized, thereby generating a grayscale uniform matrix; wherein, the second repositioning operation of the matrix units includes: selecting four consecutively numbered matrix units from the initial grayscale uniform matrix; randomly positioning the four consecutively numbered matrix units in the initial grayscale uniform matrix, calculating the relative distance between any one of the four consecutively numbered matrix units and all other matrix units, and determining the position of the four consecutively numbered matrix units in the initial grayscale uniform matrix when the relative distance between any two matrix units is maximized; The second brightness matrix generation module is used to determine the matrix units that need to be set as white points and the matrix units that need to be set as black points in the gray-level uniform matrix according to the brightness values in the first brightness matrix after determining the first brightness matrix and the gray-level uniform matrix, and generate the second brightness matrix of the image to be processed. The image adjustment module is used to adjust the brightness of each pixel in the image to be processed using the second brightness matrix to generate a uniform image.
4. The apparatus for improving image display uniformity as described in claim 1, characterized in that, Also includes: Energy distribution module; The energy distribution module is used to, when a change in the brightness of any pixel in the image to be processed is detected, increase the brightness of the pixels surrounding the pixel if the brightness of the pixel decreases, and decrease the brightness of the pixels surrounding the pixel if the brightness of the pixel increases.
5. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a method for improving image display uniformity as described in any one of claims 1 to 2.
6. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform a method for improving image display uniformity as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Method and device for improving display brightness uniformity of OLED (organic light emitting diode)
CN104599632A