A method, apparatus, terminal device, and storage medium for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm.

By calculating Euclidean distance and color error using a dithering algorithm, the three primary color values ​​of the full-color electronic paper are adjusted, solving the problem of data overflow in brightness adjustment and achieving error-free brightness adjustment.

CN119920208BActive Publication Date: 2025-11-14JIANGXI XINGTAI TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510175765.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-11-14
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

In existing technologies, when directly adjusting the brightness of the input image, pixels that have reached their maximum brightness will cause data overflow, resulting in color errors and making it impossible to further brighten the image.

Method used

By employing a dithering algorithm, the three primary color values ​​of the full-color electronic paper are adjusted by calculating Euclidean distance and color error, and the error is distributed to adjacent pixels to ensure that no data overflow occurs during the brightness adjustment process.

Benefits of technology

It achieves error-free brightness adjustment of full-color electronic paper, reduces color errors during brightness adjustment, and ensures the color accuracy of the output image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119920208B_ABST
    Figure CN119920208B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, terminal device, and storage medium for brightness adjustment optimization of full-color electronic paper based on a dithering algorithm. The method includes: acquiring all pixels of an image whose brightness needs to be adjusted; adjusting the original three primary color values ​​of each color of the full-color electronic paper according to the brightness adjustment requirements of the image, obtaining the adjusted three primary color values ​​of each color of the full-color electronic paper; repeatedly performing a target color determination operation until the target color corresponding to each pixel in the image after brightness adjustment is determined; determining the original three primary color values ​​corresponding to each target color, obtaining the required three primary color values ​​corresponding to each pixel in the image after brightness adjustment; and outputting the brightness-adjusted image through the full-color electronic paper according to the required three primary color values ​​corresponding to each pixel in the image after brightness adjustment. By implementing this invention, the brightness of an image to be adjusted can be adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and display technology, and in particular to a method, apparatus, terminal device and storage medium for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm. Background Technology

[0002] In existing technologies, the common method for adjusting image brightness is to directly adjust the brightness of the input image, increasing the brightness. However, this approach has obvious problems. If a point is already at its brightest, it cannot be made brighter, leading to color errors across the entire image. For example, if A = (200, 200, 200), increasing the brightness by 1.2 results in A = (240, 240, 240), which doesn't introduce error. However, if A = (220, 220, 220), increasing the brightness by 1.2 results in 220 * 1.2 = 264. Therefore, A is not (264, 264, 264) but (255, 255, 255), resulting in an error of 1 - 255 / 264 = 0.03, or 3%. Therefore, directly adjusting the brightness of the input image has limitations. If a point is already at its brightest, increasing the brightness can cause data overflow, and the overflowing data cannot be represented, leading to color errors across the entire image. Summary of the Invention

[0003] This invention provides a method, apparatus, terminal device, and storage medium for brightness adjustment optimization of full-color electronic paper based on a dithering algorithm. This invention can adjust the brightness of images to be adjusted using full-color electronic paper based on a dithering algorithm.

[0004] An embodiment of the present invention provides a method for optimizing the brightness adjustment of full-color electronic paper based on a dithering algorithm, comprising:

[0005] Obtain all pixels of the image whose brightness needs to be adjusted;

[0006] Based on the brightness adjustment requirements of the image to be adjusted, the original three primary color values ​​of each color of the full-color electronic paper are adjusted accordingly to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper.

[0007] Repeat the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined;

[0008] Determine the original three primary color values ​​corresponding to each target color, and obtain the three primary color values ​​required for each pixel in the image to be adjusted after brightness adjustment;

[0009] The full-color electronic paper outputs the image after brightness adjustment by adjusting the three primary color values ​​corresponding to each pixel in the image to be adjusted.

[0010] The target color determination operation includes: selecting a current pixel with an undetermined target color from the image to be adjusted;

[0011] Based on the current primary color values ​​of the current pixel and the adjusted primary color values ​​of each color of the full-color electronic paper, calculate the Euclidean distance between the current pixel and each color of the full-color electronic paper, and select the color with the smallest Euclidean distance as the target color.

[0012] When it is determined that there are pixels in the image to be adjusted with undetermined target colors, the color error is calculated based on the three primary color values ​​after the target color is adjusted and the current three primary color values ​​of the current pixel.

[0013] The color error is distributed to the pixels directly adjacent to the current pixel according to a preset ratio, and the three primary color values ​​of the directly adjacent pixels are adjusted.

[0014] Furthermore, based on the brightness adjustment requirements of the image to be adjusted, the original three primary color values ​​of each color of the full-color electronic paper are adjusted accordingly to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper, including:

[0015] Obtain the original three primary color values ​​of each color in the full-color electronic paper;

[0016] Based on the brightness adjustment requirements of the image to be adjusted, determine the brightness adjustment factor and brightness adjustment value;

[0017] Multiply the original three primary color values ​​of each color of the full-color electronic paper by the brightness adjustment factor to obtain the preliminary adjusted three primary color values ​​of each color of the full-color electronic paper.

[0018] Based on the initial adjustment of the three primary color values ​​and brightness adjustment values ​​of each color in the full-color electronic paper, the adjusted three primary color values ​​of each color in the full-color electronic paper are obtained.

[0019] Furthermore, the Euclidean distance between the current pixel and each color of the full-color electronic paper is calculated using the following formula:

[0020] d=((R P -R r ) 2 +(G P -G r ) 2 +(B P -B r ) 2 ) 1 / 2 ;

[0021] In the formula, d is the Euclidean distance, and R is the distance between the two sides. P R is the red component value among the current three primary color values ​​of the current pixel. rG represents the red component value in the three primary colors of the full-color electronic paper after adjustment. P G represents the green component value among the current three primary color values ​​of the current pixel. r B represents the green component value in the adjusted primary color values ​​of the full-color electronic paper. P B represents the blue component value among the current three primary color values ​​of the current pixel. r This refers to the blue component value in the three primary color values ​​of the full-color electronic paper after adjustment.

[0022] Furthermore, the color error is calculated using the following formula:

[0023] Color error = Current primary color value of pixel - Primary color value after target color adjustment.

[0024] Furthermore, the primary color values ​​of directly adjacent pixels are adjusted through the following steps:

[0025] The color error assigned to each of the directly adjacent pixels of the current pixel is calculated according to the preset allocation ratio.

[0026] Add the corresponding assigned color error to the three primary color values ​​of each directly adjacent pixel;

[0027] The adjusted primary color values ​​of each directly adjacent pixel are obtained.

[0028] Another embodiment of the present invention provides a full-color electronic paper brightness adjustment and optimization device based on a dithering algorithm, comprising: a pixel acquisition module, a three-primary-color value adjustment module, a target color determination module, a target color three-primary-color value determination module, and an image output module;

[0029] The pixel acquisition module is used to acquire all pixels of the image whose brightness needs to be adjusted;

[0030] The three primary color value adjustment module is used to adjust the original three primary color values ​​of each color of the full-color electronic paper according to the brightness adjustment requirements of the image to be adjusted, so as to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper.

[0031] The target color determination module is used to repeatedly perform the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined. The target color determination operation includes: selecting a current pixel in the image to be adjusted whose target color is not yet determined; calculating the Euclidean distance between the current pixel and each color of the full-color electronic paper based on the current primary color values ​​of the current pixel and the adjusted primary color values ​​of each color; selecting the color with the smallest Euclidean distance as the target color; when it is determined that there is a pixel in the image to be adjusted whose target color is not yet determined, calculating the color error based on the adjusted primary color values ​​of the target color and the current primary color values ​​of the current pixel; distributing the color error to pixels directly adjacent to the current pixel according to a preset ratio, and adjusting the primary color values ​​of the directly adjacent pixels.

[0032] The target color primary color value determination module is used to determine the original primary color value corresponding to each target color, so as to obtain the primary color value required for each pixel in the image to be adjusted after brightness adjustment.

[0033] The image output module is used to output the brightness-adjusted image by using full-color electronic paper to adjust the brightness of each pixel in the image and then outputting the corresponding three primary color values.

[0034] Furthermore, the three primary color value adjustment module includes: an original value acquisition unit, an adjustment parameter determination unit, a preliminary adjustment unit, and a final adjustment unit;

[0035] The original value acquisition unit is used to acquire the original three primary color values ​​of each color of the full-color electronic paper;

[0036] The adjustment parameter determination unit is used to determine the brightness adjustment factor and the brightness adjustment value based on the brightness adjustment requirements of the image to be adjusted.

[0037] The preliminary adjustment unit is used to multiply the original three primary color values ​​of each color of the full-color electronic paper by the brightness adjustment factor to obtain the preliminary adjusted three primary color values ​​of each color of the full-color electronic paper.

[0038] The final adjustment unit is used to obtain the adjusted primary color values ​​of each color of the full-color electronic paper based on the three primary color values ​​and brightness adjustment values ​​after the initial adjustment of each color of the full-color electronic paper.

[0039] Furthermore, the Euclidean distance between the current pixel and each color of the full-color electronic paper is calculated using the following formula:

[0040] d=((R P -R r ) 2 +(G P -G r) 2 +(B P -B r ) 2 ) 1 / 2 ;

[0041] In the formula, d is the Euclidean distance, and R is the distance between the two sides. P R is the red component value among the current three primary color values ​​of the current pixel. r G represents the red component value in the three primary colors of the full-color electronic paper after adjustment. P G represents the green component value among the current three primary color values ​​of the current pixel. r B represents the green component value in the adjusted primary color values ​​of the full-color electronic paper. P B represents the blue component value among the current three primary color values ​​of the current pixel. r This refers to the blue component value in the three primary color values ​​of the full-color electronic paper after adjustment.

[0042] 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. When the processor executes the computer program, it implements a full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any of the embodiments.

[0043] 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 full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any of the above embodiments.

[0044] The following benefits can be obtained by implementing the present invention:

[0045] This invention discloses a method, apparatus, terminal device, and storage medium for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm. The method involves: acquiring all pixels of an image whose brightness needs to be adjusted; adjusting the original primary color values ​​of each color in the full-color electronic paper according to the brightness adjustment requirements of the image; repeatedly performing a target color determination operation until the target color corresponding to each pixel in the image after brightness adjustment is determined; determining the original primary color value corresponding to each target color to obtain the required primary color value for each pixel in the image after brightness adjustment; and outputting the brightness-adjusted image through the full-color electronic paper based on the required primary color values ​​for each pixel after brightness adjustment. In this invention, the primary color values ​​of all colors of the full-color electronic paper are adjusted according to the brightness adjustment requirements. Based on the adjusted primary color values ​​of all colors of the full-color electronic paper, the target color of the image to be adjusted is determined using a dithering algorithm. Finally, the image with adjusted brightness is output using the original primary color values ​​corresponding to the target color. The output image with adjusted brightness uses the original primary color values ​​of the full-color electronic paper. Therefore, the brightness adjustment of this invention will not cause data overflow, reducing errors in the brightness adjustment process. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating a method for optimizing the brightness adjustment of full-color electronic paper based on a dithering algorithm, according to an embodiment of the present invention.

[0047] Figure 2 This is a schematic diagram of adjusting image brightness using a numerical method according to an embodiment of the present invention.

[0048] Figure 3 This is a schematic diagram comparing the dithering algorithm and the numerical method for adjusting image brightness according to an embodiment of the present invention.

[0049] Figure 4 This is a schematic diagram of a full-color electronic paper brightness adjustment optimization method based on a dithering algorithm provided in an embodiment of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0052] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0053] like Figure 1 The diagram shown is a flowchart illustrating a method for optimizing the brightness adjustment of full-color electronic paper based on a dithering algorithm, according to an embodiment of the present invention, comprising the following steps:

[0054] Step S1: Obtain all pixels of the image whose brightness needs to be adjusted;

[0055] In this invention, all pixels in the image whose brightness needs to be adjusted, as well as the three primary color values ​​corresponding to all pixels, are obtained to provide a data basis for subsequent brightness adjustment calculations.

[0056] To illustrate, consider an image where the entire screen is orange and the brightness needs to be adjusted. The three primary color values ​​of all pixels in the image are P(x,y) = RGB(255-128-0).

[0057] Step S2: Based on the brightness adjustment requirements of the image to be adjusted, the original three primary color values ​​of each color of the full-color electronic paper are adjusted accordingly to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper.

[0058] In this invention, based on the brightness adjustment requirements of the image to be adjusted, the brightness adjustment factor and brightness adjustment value corresponding to the brightness adjustment requirements are determined. The original three primary color values ​​of all colors of the full-color electronic paper are adjusted according to the brightness adjustment factor and brightness adjustment value to obtain the adjusted three primary color values ​​of all colors of the full-color electronic paper.

[0059] In a preferred embodiment, the step of adjusting the original primary color values ​​of each color of the full-color electronic paper according to the brightness adjustment requirements of the image to be adjusted, to obtain the adjusted primary color values ​​of each color of the full-color electronic paper, includes:

[0060] Obtain the original three primary color values ​​of each color in the full-color electronic paper;

[0061] Based on the brightness adjustment requirements of the image to be adjusted, determine the brightness adjustment factor and brightness adjustment value;

[0062] Multiply the original three primary color values ​​of each color of the full-color electronic paper by the brightness adjustment factor to obtain the preliminary adjusted three primary color values ​​of each color of the full-color electronic paper.

[0063] Based on the initial adjustment of the three primary color values ​​and brightness adjustment values ​​of each color in the full-color electronic paper, the adjusted three primary color values ​​of each color in the full-color electronic paper are obtained.

[0064] Specifically, when the brightness adjustment value is an increase, the brightness adjustment value is added to the three primary color values ​​of the full-color electronic paper after the initial adjustment of each color to obtain the three primary color values ​​of the full-color electronic paper after the adjustment; when the brightness adjustment value is a decrease, the brightness adjustment value is subtracted from the three primary color values ​​of the full-color electronic paper after the initial adjustment of each color to obtain the three primary color values ​​of the full-color electronic paper after the adjustment.

[0065] Indicatively, full-color electronic paper can represent A colors. 黑 A 白 A 红 A 绿 A 蓝 A 青 A 洋 A 黄 , where A 红 =(255-0-0), A 黄 = (255-255-0), A 白 = (255-255-255);

[0066] Based on the brightness adjustment requirements, adjust the above three primary color values ​​to A. 红 =(200-0-0), A 黄 = (200-200-0), A 白 = (255-200-200), adjust the other colors accordingly as well.

[0067] Step S3: Repeat the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined; wherein, the target color determination operation includes: selecting a current pixel in the image to be adjusted whose target color has not been determined; calculating the Euclidean distance between the current pixel and each color of the full-color electronic paper based on the current three primary color values ​​of the current pixel and the adjusted three primary color values ​​of each color of the full-color electronic paper, and selecting the color with the smallest Euclidean distance as the target color; when it is determined that there is a pixel in the image to be adjusted whose target color has not been determined, calculating the color error based on the adjusted three primary color values ​​of the target color and the current three primary color values ​​of the current pixel; distributing the color error to the pixels directly adjacent to the current pixel according to a preset ratio, and adjusting the three primary color values ​​of the directly adjacent pixels;

[0068] In this invention, a pixel with an undetermined target color is selected from the image whose brightness is to be adjusted. Based on the current primary color values ​​of the pixel and the adjusted primary color values ​​of each color on the full-color electronic paper, the Euclidean distance between the current pixel and each color on the full-color electronic paper is calculated. All Euclidean distances are compared, and the color of the full-color electronic paper corresponding to the smallest Euclidean distance is selected as the target color. The color error after determining the target color is calculated. When there are still pixels with undetermined target colors in the image whose brightness is to be adjusted, the color error between the target color and the current pixel is distributed to the pixels directly adjacent to the current pixel according to a preset ratio. The primary color values ​​of these adjacent pixels are adjusted accordingly. This completes the color determination operation for one pixel. The above color determination operation steps are repeated until all pixels in the image whose brightness is to be adjusted have determined target colors.

[0069] In a preferred embodiment, the Euclidean distance between the current pixel and each color of the full-color electronic paper is calculated using the following formula:

[0070] d=((R P -R r ) 2 +(G P -G r ) 2 +(B P -B r ) 2 ) 1 / 2 ;

[0071] In the formula, d is the Euclidean distance, and R is the distance between the two sides. P R is the red component value among the current three primary color values ​​of the current pixel. r G represents the red component value in the three primary colors of the full-color electronic paper after adjustment. P G represents the green component value among the current three primary color values ​​of the current pixel. rB represents the green component value in the adjusted primary color values ​​of the full-color electronic paper. P B represents the blue component value among the current three primary color values ​​of the current pixel. r This refers to the blue component value in the three primary color values ​​of the full-color electronic paper after adjustment.

[0072] In another preferred embodiment, the color error is calculated using the following formula:

[0073] Color error = Current primary color value of pixel - Primary color value after target color adjustment.

[0074] In another preferred embodiment, the primary color values ​​of directly adjacent pixels are adjusted through the following steps:

[0075] The color error assigned to each of the directly adjacent pixels of the current pixel is calculated according to the preset allocation ratio.

[0076] Add the corresponding assigned color error to the three primary color values ​​of each directly adjacent pixel;

[0077] The adjusted primary color values ​​of each directly adjacent pixel are obtained.

[0078] To illustrate, we select pixel P(x, y) = RGB(255-128-0), calculate the Euclidean distance between pixel P(x, y) and each color of the adjusted full-color e-paper, and find that the color with the smallest Euclidean distance corresponds to A. 红 Choose A 红 As the target color;

[0079] Calculate the color error after determining the target color: DeltaE = P(x, y) - A 红 =RGB(55-128-0), where DeltaE represents the color error. The error is distributed to adjacent points according to a certain proportion. For example, if all the error is given to the right side, the right pixel is also P1(x,y)=RGB(255-128-0). The two are added together, P1+DeltaE=RGB(310-256-0), to obtain the adjusted three primary color values ​​of the adjacent pixels.

[0080] Select P1 to continue determining the color, and select A through the steps above. 黄 As the target color, the color error at this point is DeltaE1 = RGB(110 - 56 - 0). Continuing to determine the target color for P2, P2 + DeltaE1 = RGB(365 - 184 - 0). After calculation, A is selected. 白 As the target color.

[0081] Without adjusting the primary color values ​​of each color on the full-color e-paper, the calculated color representation of the image is red + yellow + red + yellow + red + yellow. After adjustment, the calculated representation is red + yellow + white + red + yellow + white. The addition of white makes the e-paper display brighter. Moreover, because there is no overflow in the calculation process, the error is reduced.

[0082] Step S4: Determine the original three primary color values ​​corresponding to each target color, and obtain the three primary color values ​​required for each pixel in the image to be adjusted after brightness adjustment;

[0083] In this invention, for all pixels in the image to be adjusted that have a known target color, the original three primary color values ​​of the full-color electronic paper corresponding to the target color are determined, and the original three primary color values ​​of the full-color electronic paper corresponding to the target color are used as the three primary color values ​​required for all pixels in the image to be adjusted.

[0084] Step S5: Using full-color electronic paper, output the image after brightness adjustment based on the three primary color values ​​required for brightness adjustment of each pixel in the image to be adjusted;

[0085] In this invention, the original three primary color values ​​of all pixels in the image whose brightness is to be adjusted are replaced with the original three primary color values ​​of the full-color electronic paper corresponding to the target color, and the image with adjusted brightness is output.

[0086] Preferably, in the brightness-adjusted image output by this invention, all pixels are represented using the original three primary color values ​​of full-color electronic paper, preventing data overflow of the three primary color values ​​and reducing color errors during the image brightness adjustment process. For example... Figure 2 As shown, a is the image whose brightness needs to be adjusted, and b is the image whose brightness is adjusted numerically. It is evident that numerical brightness adjustment leads to overexposure and whitening, resulting in information loss. Figure 3 As shown, c is the normal jitter image, d is the brightness adjustment image based on the jitter algorithm, and e is the brightness adjustment image using the numerical method. By comparing the brightness adjustment using the jitter algorithm with the numerical brightness adjustment, it can be seen that the jitter algorithm can ensure less loss of image information after brightness adjustment. For example, for white and yellow grapes, the overall brightness of the jittered pixels is brighter, but the grapes themselves lose less data.

[0087] like Figure 4 The diagram shown is a structural schematic of a full-color electronic paper brightness adjustment optimization device based on a dithering algorithm according to an embodiment of the present invention, comprising:

[0088] Pixel acquisition module, three primary color value adjustment module, target color determination module, target color three primary color value determination module, image output module;

[0089] The pixel acquisition module is used to acquire all pixels of the image whose brightness needs to be adjusted;

[0090] The three primary color value adjustment module is used to adjust the original three primary color values ​​of each color of the full-color electronic paper according to the brightness adjustment requirements of the image to be adjusted, so as to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper.

[0091] The target color determination module is used to repeatedly perform the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined. The target color determination operation includes: selecting a current pixel in the image to be adjusted whose target color is not yet determined; calculating the Euclidean distance between the current pixel and each color of the full-color electronic paper based on the current primary color values ​​of the current pixel and the adjusted primary color values ​​of each color; selecting the color with the smallest Euclidean distance as the target color; when it is determined that there is a pixel in the image to be adjusted whose target color is not yet determined, calculating the color error based on the adjusted primary color values ​​of the target color and the current primary color values ​​of the current pixel; distributing the color error to pixels directly adjacent to the current pixel according to a preset ratio, and adjusting the primary color values ​​of the directly adjacent pixels.

[0092] The target color primary color value determination module is used to determine the original primary color value corresponding to each target color, so as to obtain the primary color value required for each pixel in the image to be adjusted after brightness adjustment.

[0093] The image output module is used to output the brightness-adjusted image by using full-color electronic paper to adjust the brightness of each pixel in the image and then outputting the corresponding three primary color values.

[0094] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and are capable of implementing the full-color electronic paper brightness adjustment optimization method based on dithering algorithm provided by any of the above-described method embodiments of the present invention.

[0095] 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.

[0096] 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.

[0097] Another preferred 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 full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any of the above embodiments.

[0098] It should be noted that the terminal devices mentioned herein can be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. Terminal devices may include, but are not limited to, processors and memory. Those skilled in the art will understand that, for example, they may also include input / output devices, network access devices, buses, etc.

[0099] 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.

[0100] 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.

[0101] Another preferred embodiment of the present invention provides a storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute a full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any one of the present invention.

[0102] 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.

[0103] 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 optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm, characterized in that, include: Obtain all pixels of the image whose brightness needs to be adjusted; Based on the brightness adjustment requirements of the image to be adjusted, the original three primary color values ​​of each color of the full-color electronic paper are adjusted accordingly to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper. Repeat the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined; Determine the original three primary color values ​​corresponding to each target color, and obtain the three primary color values ​​required for each pixel in the image to be adjusted after brightness adjustment; The full-color electronic paper outputs the image after brightness adjustment by adjusting the three primary color values ​​corresponding to each pixel in the image to be adjusted. The target color determination operation includes: selecting a current pixel with an undetermined target color from the image to be adjusted; Based on the current primary color values ​​of the current pixel and the adjusted primary color values ​​of each color of the full-color electronic paper, calculate the Euclidean distance between the current pixel and each color of the full-color electronic paper, and select the color with the smallest Euclidean distance as the target color. When it is determined that there are pixels in the image to be adjusted with undetermined target colors, the color error is calculated based on the three primary color values ​​after the target color is adjusted and the current three primary color values ​​of the current pixel. The color error is distributed to the pixels directly adjacent to the current pixel according to a preset ratio, and the three primary color values ​​of the directly adjacent pixels are adjusted.

2. The method for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm as described in claim 1, characterized in that, Based on the brightness adjustment requirements of the image to be adjusted, the original three primary color values ​​of each color of the full-color electronic paper are adjusted accordingly to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper, including: Obtain the original three primary color values ​​of each color in the full-color electronic paper; Based on the brightness adjustment requirements of the image to be adjusted, determine the brightness adjustment factor and brightness adjustment value; Multiply the original three primary color values ​​of each color of the full-color electronic paper by the brightness adjustment factor to obtain the preliminary adjusted three primary color values ​​of each color of the full-color electronic paper. Based on the initial adjustment of the three primary color values ​​and brightness adjustment values ​​of each color in the full-color electronic paper, the adjusted three primary color values ​​of each color in the full-color electronic paper are obtained.

3. The method for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm as described in claim 1, characterized in that, The Euclidean distance between the current pixel and each color of the full-color electronic paper is calculated using the following formula: d=((R P -R r ) 2 +(G P -G r ) 2 +(B P -B r ) 2 ) 1 / 2 ; In the formula, d is the Euclidean distance, and R is the distance between the two sides. P R is the red component value among the current three primary color values ​​of the current pixel. r G represents the red component value in the three primary colors of the full-color electronic paper after adjustment. P G represents the green component value among the current three primary color values ​​of the current pixel. r B represents the green component value in the adjusted primary color values ​​of the full-color electronic paper. P B represents the blue component value among the current three primary color values ​​of the current pixel. r This refers to the blue component value in the three primary color values ​​of the full-color electronic paper after adjustment.

4. The method for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm as described in claim 1, characterized in that, The color error is calculated using the following formula: Color error = Current primary color value of pixel - Primary color value after target color adjustment.

5. The method for optimizing brightness adjustment of full-color electronic paper based on a dithering algorithm as described in claim 1, characterized in that, The following steps adjust the primary color values ​​of directly adjacent pixels: The color error assigned to each of the directly adjacent pixels of the current pixel is calculated according to the preset allocation ratio. Add the corresponding assigned color error to the three primary color values ​​of each directly adjacent pixel; The adjusted primary color values ​​of each directly adjacent pixel are obtained.

6. A full-color electronic paper brightness adjustment optimization device based on a dithering algorithm, characterized in that, include: Pixel acquisition module, three primary color value adjustment module, target color determination module, target color three primary color value determination module, image output module; The pixel acquisition module is used to acquire all pixels of the image whose brightness needs to be adjusted; The three primary color value adjustment module is used to adjust the original three primary color values ​​of each color of the full-color electronic paper according to the brightness adjustment requirements of the image to be adjusted, so as to obtain the adjusted three primary color values ​​of each color of the full-color electronic paper. The target color determination module is used to repeatedly perform the target color determination operation until the target color corresponding to each pixel in the image to be adjusted after brightness adjustment is determined. The target color determination operation includes: selecting a current pixel in the image to be adjusted whose target color is not yet determined; calculating the Euclidean distance between the current pixel and each color of the full-color electronic paper based on the current primary color values ​​of the current pixel and the adjusted primary color values ​​of each color; selecting the color with the smallest Euclidean distance as the target color; when it is determined that there is a pixel in the image to be adjusted whose target color is not yet determined, calculating the color error based on the adjusted primary color values ​​of the target color and the current primary color values ​​of the current pixel; distributing the color error to pixels directly adjacent to the current pixel according to a preset ratio, and adjusting the primary color values ​​of the directly adjacent pixels. The target color primary color value determination module is used to determine the original primary color value corresponding to each target color, so as to obtain the primary color value required for each pixel in the image to be adjusted after brightness adjustment. The image output module is used to output the brightness-adjusted image by using full-color electronic paper to adjust the brightness of each pixel in the image and then outputting the corresponding three primary color values.

7. The full-color electronic paper brightness adjustment optimization device based on dithering algorithm as described in claim 6, characterized in that, The three primary color value adjustment module includes: an original value acquisition unit, an adjustment parameter determination unit, a preliminary adjustment unit, and a final adjustment unit; The original value acquisition unit is used to acquire the original three primary color values ​​of each color of the full-color electronic paper; The adjustment parameter determination unit is used to determine the brightness adjustment factor and the brightness adjustment value based on the brightness adjustment requirements of the image to be adjusted. The preliminary adjustment unit is used to multiply the original three primary color values ​​of each color of the full-color electronic paper by the brightness adjustment factor to obtain the preliminary adjusted three primary color values ​​of each color of the full-color electronic paper. The final adjustment unit is used to obtain the adjusted primary color values ​​of each color of the full-color electronic paper based on the initially adjusted primary color values ​​and brightness adjustment values ​​of each color of the full-color electronic paper.

8. The full-color electronic paper brightness adjustment optimization device based on dithering algorithm as described in claim 6, characterized in that, The Euclidean distance between the current pixel and each color of the full-color electronic paper is calculated using the following formula: d=((R P -R r ) 2 +(G P -G r ) 2 +(B P -B r ) 2 ) 1 / 2 ; In the formula, d is the Euclidean distance, and R is the distance between the two sides. P R is the red component value among the current three primary color values ​​of the current pixel. r G represents the red component value in the three primary colors of the full-color electronic paper after adjustment. P G represents the green component value among the current three primary color values ​​of the current pixel. r B represents the green component value in the adjusted primary color values ​​of the full-color electronic paper. P B represents the blue component value among the current three primary color values ​​of the current pixel. r This refers to the blue component value in the three primary color values ​​of the full-color electronic paper after adjustment.

9. 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 full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any one of claims 1 to 5.

10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute a full-color electronic paper brightness adjustment optimization method based on a dithering algorithm as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Display brightness adjusting method and device, electronic equipment and storage medium

    CN112863457A

  • Display screen brightness compensation method and device and electronic equipment

    CN113241030A