Color adjusting method and device of color electronic paper image, terminal equipment and computer readable storage medium

By performing color adjustment on electronic paper images and jitter processing of Floyd-Steinberg algorithm, the problem of limited color performance range and distortion of electronic paper is solved, and the color performance ability and visual experience of the image are improved.

CN119495273AInactive Publication Date: 2025-02-21JIANGXI XINGTAI TECH INC

Patent Information

Application Number
CN202411768650.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-02-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When displaying images, the color performance range of electronic paper is limited and distorted, affecting the user's visual experience.

Method used

By obtaining the display image and color adjustment instructions to be processed by electronic paper, after color adjustment, the image is shaken by using the Floyd-Steinberg algorithm, calculating the color distance and selecting the closest display color.

Benefits of technology

It effectively solves the problem of limited color expression range and distortion of electronic paper, and improves the image's color expression ability and visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119495273A_ABST
    Figure CN119495273A_ABST
Patent Text Reader

Abstract

The invention discloses a color adjustment method and device for a color electronic paper image, terminal equipment and a computer readable storage medium. The method comprises the steps of obtaining a to-be-processed display image of electronic paper; obtaining a color adjustment instruction; performing corresponding color adjustment on the to-be-processed display image according to the color adjustment instruction to obtain a pre-adjusted display image; a Floyd-Steinberg algorithm is adopted to carry out jitter processing on each pixel point in the pre-adjusted display image, and the updated pixel value of each pixel point is obtained; and for each pixel point, according to the updated pixel value and a preset color mapping table in the electronic paper, calculating a color distance to obtain a color distance set, and taking a color corresponding to a minimum value in the color distance set as a display color of the pixel point. By implementing the method and the device, the problems of limited color expression range and distortion when the electronic paper displays the image can be solved, and the visual experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic paper display technology, and in particular to a color adjustment method, device, terminal equipment and computer-readable storage medium for a color electronic paper image. Background Art

[0002] As a low-power, highly readable display technology, electronic paper has been widely used in the fields of electronic books, electronic labels, etc. Electronic paper usually uses charged particles (such as electronic ink) to display images. The luminescent properties of these particles are not completely stable, and as the use time increases, these particles may age, causing the luminescent wavelength to shift, which in turn affects the accuracy of the color. Traditional electronic paper technology usually uses a limited number of color particles, which limits its color expression range, making it difficult to achieve high saturation and rich color levels, and resulting in color distortion. This color distortion affects the user's perception of the image and reduces the visual quality of the electronic paper. Summary of the invention

[0003] The embodiments of the present invention provide a color adjustment method, device, terminal device and computer-readable storage medium for a color electronic paper image, which can solve the problem of limited color expression range and distortion when the electronic paper displays images, and improve the user's visual experience.

[0004] An embodiment of the present invention provides a color adjustment method for a color electronic paper image, comprising:

[0005] Acquire the display image to be processed by the electronic paper;

[0006] Obtaining color adjustment instructions; the color adjustment instructions include any one of the following and their combination: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment, and gamma correction;

[0007] According to the color adjustment instruction, corresponding color adjustment is performed on the display image to be processed to obtain a pre-adjusted display image;

[0008] The Floyd-Steinberg algorithm is used to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel;

[0009] For each pixel, the color distance is calculated according to the updated pixel value and the color mapping table preset in the electronic paper to obtain a color distance set, and the color corresponding to the minimum value in the color distance set is used as the display color of the pixel.

[0010] Furthermore, the format of the display image to be processed by the electronic paper is RGB format.

[0011] Further, according to the color adjustment instruction, the display image to be processed is subjected to corresponding color adjustment to obtain a pre-adjusted display image, including:

[0012] Parsing the color adjustment instruction to obtain one or more timing adjustment instructions;

[0013] The first cycle process is executed until all adjustment instructions are completed to obtain a pre-adjusted display image; the first cycle process includes:

[0014] Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction;

[0015] The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

[0016] Furthermore, the Floyd-Steinberg algorithm is used to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel, including:

[0017] The second loop process is executed until all pixels of the pre-adjusted display image are traversed to obtain the updated pixel value of each pixel; the second loop process includes:

[0018] According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel;

[0019] The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained;

[0020] The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

[0021] Based on the above method embodiment, the present invention provides a corresponding device embodiment, including: an electronic paper image acquisition module, a color adjustment instruction acquisition module, a color adjustment module, a dithering processing module and a display module;

[0022] An electronic paper image acquisition module, used to acquire a display image to be processed by the electronic paper;

[0023] A color adjustment instruction acquisition module is used to acquire color adjustment instructions; the color adjustment instructions include any one of the following and their combination: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction;

[0024] A color adjustment module, used to perform corresponding color adjustment on the display image to be processed according to the color adjustment instruction to obtain a pre-adjusted display image;

[0025] A dithering processing module, used for performing dithering processing on each pixel point in the pre-adjusted display image by using a Floyd-Steinberg algorithm to obtain an updated pixel value of each pixel point;

[0026] The display module is used to calculate the color distance for each pixel according to the updated pixel value and the color mapping table preset in the electronic paper, obtain a color distance set, and use the color corresponding to the minimum value in the color distance set as the display color of the pixel.

[0027] Furthermore, the format of the display image to be processed by the electronic paper is RGB format.

[0028] Further, the color adjustment module includes: an instruction parsing unit and a first circulation unit;

[0029] An instruction parsing unit, used for parsing the color adjustment instruction to obtain one or more timing adjustment instructions;

[0030] The first loop unit is used to execute the first loop process until all adjustment instructions are completed to obtain a pre-adjusted display image; the first loop process includes:

[0031] Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction;

[0032] The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

[0033] Further, the jitter processing module includes: a second cycle unit;

[0034] The second loop unit is used to execute the second loop process until all pixels of the pre-adjusted display image are traversed to obtain the updated pixel value of each pixel; the second loop process includes:

[0035] According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel;

[0036] The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained;

[0037] The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

[0038] Based on the above-mentioned method embodiment, the present invention provides a corresponding terminal device embodiment, 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, the steps of the color adjustment method of the color electronic paper image as described in the present invention are implemented.

[0039] Based on the above-mentioned method embodiment, the present invention provides a corresponding computer-readable storage medium embodiment, including: a stored computer program, which controls the device where the computer-readable storage medium is located to execute the steps of the color adjustment method of the color electronic paper image as described in the present invention when the computer program is running.

[0040] Compared with the prior art, the beneficial effects of the embodiment of this solution are:

[0041] The present invention obtains a display image to be processed by an electronic paper, obtains a color adjustment instruction, wherein the color adjustment instruction includes any one of the following and a combination thereof: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction. According to the color adjustment instruction, the display image to be processed is subjected to corresponding color adjustment to enrich the color level of the display image, and a pre-adjusted display image is obtained. The pixel value of the display image after color adjustment will change, and the electronic paper may not be able to directly display the adjusted pixel value due to hardware limitations and characteristics of display technology. Therefore, the Floyd-Steinberg algorithm is used to perform dithering processing on each pixel point in the pre-adjusted display image, and the color error of the current pixel point can be distributed to the adjacent pixel points around it, so as to avoid the appearance of obvious color bands and color blocks, thereby maintaining the color balance of the image as a whole, and obtaining the updated pixel value of each pixel point. For each pixel point, the color distance is calculated according to the updated pixel value and a color mapping table preset in the electronic paper, and a color distance set is obtained, and the color corresponding to the minimum value in the color distance set is used as the display color of the pixel point, so that it can be ensured that within the limited color range of the electronic paper, the color closest to the original pixel color is selected for display, thereby reducing distortion.

[0042] To sum up, the present invention effectively solves the problems of limited color performance range and distortion when electronic paper displays images through color adjustment, dithering processing and color mapping. It not only improves the color performance ability of electronic paper when displaying images, but also makes the image more full and rich in color, thereby enhancing the user's visual experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a schematic flow chart of a method for adjusting the color of a color electronic paper image provided by an embodiment of the present invention;

[0044] Figure 2 It is a schematic structural diagram of a color adjustment device for a color electronic paper image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0047] like Figure 1 As shown, an embodiment of the present invention provides a method for adjusting the color of a color electronic paper image, the method comprising at least the following steps:

[0048] Step S1: Acquire the display image to be processed of the electronic paper;

[0049] In a preferred embodiment, the format of the display image to be processed by the electronic paper is RGB format.

[0050] For step S1, a display image to be processed is obtained from the electronic paper device through the image input interface of the device or other communication methods, wherein the format of the display image to be processed is RGB format, that is, each pixel is composed of the values ​​of three color channels: red (R), green (G) and blue (B).

[0051] For an image in RGB format, this embodiment uses a two-dimensional array to represent the image. Assuming that the width of the image is W and the height is H, the image can be represented as a matrix of size W×H, where each matrix element T[x,y] represents the color information of the pixel at the coordinate (x,y), including the value r of the red channel, the value g of the green channel, and the value b of the blue channel, that is, T[x,y]=[r,g,b]. These values ​​are represented in the form of 8-bit unsigned integers ranging from 0 to 255, where 0 represents the minimum brightness and 255 represents the maximum brightness. By combining the values ​​of these three channels, a color image can be displayed.

[0052] Step S2: obtaining a color adjustment instruction; the color adjustment instruction includes any one of the following and a combination thereof: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction;

[0053] For step S2, the color adjustment instruction issued by the user is obtained, which is used to adjust the display image in the electronic paper device, wherein the color adjustment instruction includes any one of the following adjustment instructions or a combination thereof: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction. The user can issue these adjustment instructions in sequence according to his or her preferences and needs to obtain a satisfactory visual effect.

[0054] For example, the user can first issue a hue adjustment command to adjust the image's hue to be more blue to create a cool atmosphere. Next, the user can issue a saturation adjustment command to increase the image's saturation to make the colors more vivid. Then, the user can issue a contrast adjustment command to enhance the image's light and dark contrast and improve the image's layering. Next, the user can issue a brightness adjustment command to adjust the image's overall brightness to make it brighter or darker. Finally, the user can also issue a gamma correction command to adjust the image's brightness response curve to affect the image's light and dark distribution.

[0055] By acquiring and applying these color adjustment instructions, electronic paper devices can meet the diverse needs of users. Users can flexibly adjust the color effects of images according to their preferences and needs to obtain a satisfactory visual experience. The purpose of such color adjustment instructions is to provide more free and flexible image display options to meet the personalized needs of users. Whether pursuing fresh and cool tones or a warm and romantic atmosphere, users can achieve their desired image effects through these adjustment instructions.

[0056] Step S3: performing corresponding color adjustment on the display image to be processed according to the color adjustment instruction to obtain a pre-adjusted display image;

[0057] In a preferred embodiment, according to the color adjustment instruction, the color adjustment is performed on the display image to be processed to obtain the pre-adjusted display image, including:

[0058] Parsing the color adjustment instruction to obtain one or more timing adjustment instructions;

[0059] The first cycle process is executed until all adjustment instructions are completed to obtain a pre-adjusted display image; the first cycle process includes:

[0060] Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction;

[0061] The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

[0062] For step S3, the color adjustment instruction obtained in step S2 is parsed, and the color adjustment instruction may include one or more adjustment instructions. If only one adjustment instruction is obtained, the type of the adjustment instruction is first determined. If the type of the adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment, an appropriate algorithm or function library is used to convert the display image to be processed from RGB format to HSV format. The HSV format represents hue, saturation and brightness, which is more suitable for corresponding adjustment. Then, the display image to be processed in HSV format is subjected to corresponding color adjustment according to the specific adjustment instruction.

[0063] The following is the detailed process of each type of adjustment:

[0064] Hue adjustment step: First, determine the hue value that needs to be adjusted according to the hue adjustment amount set by the user in the color adjustment instruction obtained in step S2, which is usually expressed in degrees, such as +30°, -45°, etc. Next, traverse each pixel of the HSV image and apply the adjustment amount to the hue value of each pixel. It should be noted that if the adjusted hue value exceeds the range of 0° to 360°, it will be adjusted to the valid range according to the cyclic nature of the hue. After completing the hue adjustment, use an appropriate algorithm or function library to convert the display image in HSV format back to RGB format to obtain a pre-adjusted display image.

[0065] Saturation adjustment step: First, traverse each pixel in the display image and obtain its HSV value (H, S, V). Next, determine the increased or decreased saturation value ΔS according to the saturation adjustment amount set by the user in the color adjustment instruction obtained in step S2. Update the saturation value S of each pixel, increase the ΔS value to increase the saturation, and decrease the ΔS value to decrease the saturation, thereby adjusting the color vividness of the display image. Finally, convert the updated HSV value back to RGB format to obtain the adjusted pixel value, and combine all the adjusted pixel values ​​into a new image to obtain the pre-adjusted display image.

[0066] Brightness adjustment step: First, traverse each pixel in the display image and obtain its HSV value (H, S, V). Next, determine the increased or decreased brightness value ΔV according to the brightness adjustment amount set by the user in the color adjustment instruction obtained in step S2. Update the brightness value V of each pixel, increase the ΔV value to increase the brightness, and decrease the ΔV value to decrease the brightness, thereby adjusting the overall brightness of the display image. Finally, convert the updated HSV value back to RGB format to obtain the adjusted pixel value, and combine all the adjusted pixel values ​​into a new image to obtain the pre-adjusted display image.

[0067] In addition, if the type of the adjustment instruction is contrast adjustment or gamma correction, the color adjustment of the corresponding adjustment instruction is directly performed on the display image to be processed in RGB format. The specific color adjustment process of each type of adjustment is as follows:

[0068] Contrast adjustment step: First, traverse each pixel in the display image and obtain its RGB value. For each pixel, calculate its brightness value, which is usually obtained by taking the maximum value of the three channels of R, G, and B, or summing according to a certain weight. Add the brightness values ​​of all pixels and then divide it by the total number of pixels to obtain the average brightness. Next, according to the contrast enhancement or reduction degree set by the user in the color adjustment instruction obtained in step S2, determine a contrast adjustment coefficient. This coefficient is usually a positive number greater than 1 (enhanced contrast) or less than 1 (reduced contrast). For each pixel in the image, calculate a new brightness value based on the difference between its brightness value and the average brightness, and the contrast adjustment coefficient. If the contrast is enhanced, the bright part becomes brighter and the dark part becomes darker; if the contrast is reduced, the difference between the bright part and the dark part is reduced. Finally, combine all adjusted pixel values ​​into a new image matrix to obtain a pre-adjusted display image.

[0069] Gamma correction step: First, according to the gamma correction degree set by the user in the color adjustment instruction obtained in step S2, a gamma value is determined. This value is usually a positive number and is used to control the intensity of nonlinear adjustment. Then, for each pixel in the image, the gamma correction formula is applied to the values ​​of its three channels R, G, and B respectively. Finally, all the corrected pixel values ​​are combined into a new image matrix to obtain a pre-adjusted display image.

[0070] In addition, if the color adjustment instruction contains multiple adjustment instructions, it means that the user has issued multiple adjustment instructions, then the corresponding color adjustment steps can be executed according to the time sequence in which the user issues the adjustment instructions. The execution of a single adjustment instruction can be performed according to the above hue adjustment step, saturation adjustment step, brightness adjustment step, contrast adjustment step or gamma correction step.

[0071] According to the order in which the user issues the adjustment instructions, the corresponding color adjustment steps are executed in sequence. In this way, the displayed image can be personalized with the color adjustment according to the user's needs to meet the user's specific requirements and expectations for the image.

[0072] Step S4: using the Floyd-Steinberg algorithm to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel;

[0073] In a preferred embodiment, the Floyd-Steinberg algorithm is used to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel, including:

[0074] The second loop process is executed until all pixels of the pre-adjusted display image are traversed to obtain the updated pixel value of each pixel; the second loop process includes:

[0075] According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel;

[0076] The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained;

[0077] The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

[0078] Regarding step S4, it should be noted that electronic paper devices usually use a technology called ink layer, which contains different color particles. By applying a specific electric field in the ink layer, the position of these color particles can be accurately controlled to display the desired color. However, electronic paper devices face an inherent technical limitation when displaying images, namely the limitation of their color types or depth. This limitation causes electronic paper to often produce obvious color bands and color patches when displaying complex images. These color bands and color patches will destroy the continuity of the image, making it difficult to maintain the overall visual color balance. Therefore, the present invention performs dithering processing on the displayed image through the Floyd-Steinberg algorithm to reduce the obvious color bands and color patches and improve the image quality.

[0079] Specifically, first, the pre-adjusted display image obtained in step S3 is obtained, the initial display image is set as the pre-adjusted display image, the initial target pixel point is set as the first pixel point in the image, and the following operations are performed for each target pixel point until all pixels are traversed:

[0080] Get the color value of the target pixel from the current display image [r x,y ,g x,y ,b x,y ], obtain the color mapping table of the actual image corresponding to the displayed image. The color mapping table of the actual image usually contains many mapping relationships between color values ​​and display colors. These mapping relationships define how to convert the pixel values ​​of the image into specific colors to achieve visualization of the image. Its complexity and size depend on the color complexity of the actual image.

[0081] Next, according to the color value of the target pixel and the color value of each color in the color mapping table of the actual image, the distance measurement method in the color space, such as Euclidean distance, is used to calculate the error value between the target pixel and each color in the color mapping table of the actual image, and the color with the smallest error value is selected as the target display color of the target pixel. This color is closest to the original color, so it can provide better visual effects or more accurate color representation. However, in order to further improve the smoothness and coherence of the image, the error diffusion algorithm is used to propagate the calculated error value to adjacent pixels according to a specific weight ratio (such as 7 / 16, 3 / 16, 5 / 16 and 1 / 16):

[0082] Adjacent pixel (x+1, y) = adjacent pixel (x+1, y) + error × 7 / 16

[0083] Adjacent pixel (x-1, y+1) = adjacent pixel (x-1, y+1) + error × 3 / 16

[0084] Adjacent pixel (x, y+1) = adjacent pixel (x, y+1) + error × 5 / 16

[0085] Adjacent pixel (x+1, y+1) = adjacent pixel (x+1, y+1) + error × 1 / 16

[0086] The above steps are repeated multiple times for each pixel. In each iteration, the display color is updated according to the current pixel value and the color mapping table, and the calculated error is diffused to the adjacent pixels according to the above weight ratio.

[0087] Through such an error diffusion process, the error of the current pixel is dispersed to the surrounding pixels, making the color transition in the displayed image smoother and more natural, reducing the color blocks and jaggedness in the image, and greatly improving the visual quality of the displayed image. It is particularly suitable for color electronic paper display devices with limited color types. Although the color expression of color electronic paper devices may be relatively limited, through the combination of dithering processing and error diffusion technology, it can visually present a more delicate and rich color effect. This processing method not only significantly improves the overall quality of the color electronic paper display image, but also makes the displayed image show a more natural color transition and higher visual coherence within a limited color range.

[0088] For example, when displaying the black-white boundary, error diffusion and dithering can cleverly insert a gray transition zone between black and white, thus avoiding the harsh feeling caused by direct color jumps. This processing method makes the black-white boundary visually softer and more natural, bringing a more comfortable visual experience to users.

[0089] It should be noted that step S4 can also directly perform dithering on the electronic paper display image to be processed obtained in step S1. In addition, the dithering technology is not limited to color electronic paper display images, it can also be applied to grayscale electronic paper display images. When processing grayscale electronic paper display images, our focus will shift to dithering the grayscale value rather than the color value. This means that dithering is an effective technology for both color and grayscale electronic paper display images, which can significantly improve the visual quality of the image.

[0090] Step S5: For each pixel, the color distance is calculated according to the updated pixel value and the color mapping table preset in the electronic paper to obtain a color distance set, and the color corresponding to the minimum value in the color distance set is used as the display color of the pixel.

[0091] For step S5, after error diffusion in step S4, the color value of each pixel in the displayed image changes. Since these changed color values ​​may not directly correspond to the colors in the color mapping table preset in the color electronic paper device, it is necessary to execute step S5 to perform corresponding color gamut mapping processing to ensure that each pixel in the color electronic paper device can display the color correctly.

[0092] Specifically, a color mapping table preset in the electronic paper is obtained. This color mapping table is used to map color values ​​in the RGB color space to specific colors displayed by the electronic paper. In this embodiment, the color mapping table of the color electronic paper device is shown in Table 1 below.

[0093] Table 1: Color mapping table for color e-paper devices

[0094] RGB color value Color electronic paper display color [255,0,0] red [0,255,0] green [0,0,255] blue [255,255,0] yellow [0,255,255] blue [255,0,255] Magenta [128,128,128] Gray (medium gray) [0,0,0] black [255,255,255] White

[0095] Take a specific pixel point for illustration. After the error diffusion in step S4, the updated color value is [150, 100, 250]. This color value does not directly correspond to any color in the color mapping table of the color electronic paper device. Next, according to the updated pixel value and the preset color mapping table in the electronic paper, the color distance is calculated using the Euclidean distance, that is, the distance between the updated color value and each preset color in the RGB space is calculated. Then, the minimum distance value is found in the color distance set. In this embodiment, after calculation, it is found that the distance between the updated color value and gray (medium gray) is the smallest. Therefore, gray (medium gray) is used as the display color of the pixel point. This means that although the original color value of the pixel point or the color value after error diffusion does not directly correspond to gray (medium gray), according to the calculation of the color distance, gray (medium gray) is the color closest to the color of the pixel point in the color mapping table.

[0096] The above color mapping operation is performed on each pixel to obtain the final display image of the color electronic paper device. Through this processing process, it can be ensured that each pixel can be mapped to the closest color in the color mapping table, thereby ensuring the smoothness and coherence of the image while maintaining the color accuracy and consistency of the image as much as possible.

[0097] like Figure 2 As shown, based on the above method embodiment, a corresponding device embodiment is provided;

[0098] An embodiment of the present invention provides a color adjustment device for a color electronic paper image, comprising: an electronic paper image acquisition module, a color adjustment instruction acquisition module, a color adjustment module, a dithering processing module, and a display module;

[0099] An electronic paper image acquisition module, used to acquire a display image to be processed by the electronic paper;

[0100] A color adjustment instruction acquisition module is used to acquire color adjustment instructions; the color adjustment instructions include any one of the following and their combination: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction;

[0101] A color adjustment module, used to perform corresponding color adjustment on the display image to be processed according to the color adjustment instruction to obtain a pre-adjusted display image;

[0102] A dithering processing module, used for performing dithering processing on each pixel point in the pre-adjusted display image by using a Floyd-Steinberg algorithm to obtain an updated pixel value of each pixel point;

[0103] The display module is used to calculate the color distance for each pixel according to the updated pixel value and the color mapping table preset in the electronic paper, obtain a color distance set, and use the color corresponding to the minimum value in the color distance set as the display color of the pixel.

[0104] In a preferred embodiment, the format of the display image to be processed by the electronic paper is RGB format.

[0105] In a preferred embodiment, the color adjustment module includes: an instruction parsing unit and a first circulation unit;

[0106] An instruction parsing unit, used for parsing the color adjustment instruction to obtain one or more timing adjustment instructions;

[0107] The first loop unit is used to execute the first loop process until all adjustment instructions are completed to obtain a pre-adjusted display image; the first loop process includes:

[0108] Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction;

[0109] The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

[0110] In a preferred embodiment, the jitter processing module includes: a second cycle unit;

[0111] The second loop unit is used to execute the second loop process until all pixels of the pre-adjusted display image are traversed to obtain the updated pixel value of each pixel; the second loop process includes:

[0112] According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel;

[0113] The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained;

[0114] The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

[0115] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention, and can implement the color adjustment method of the color electronic paper image provided by any one of the above-mentioned method embodiments of the present invention.

[0116] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art may understand and implement the present invention without creative work.

[0117] Based on the above-mentioned embodiment of the color adjustment method of the color electronic paper image, another embodiment of the present invention provides a terminal device, which includes 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, the color adjustment method of the color electronic paper image of any embodiment of the present invention is implemented.

[0118] Exemplarily, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more module elements may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.

[0119] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0120] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0121] Based on the above method embodiment, another embodiment is provided: another embodiment of the present invention provides a computer-readable storage medium, including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the color adjustment method of the color electronic paper image described in any one of the above method embodiments of the present invention.

[0122] Wherein, the module / unit integrated in the color adjustment device / terminal device of the color electronic paper image, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0123] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A color adjustment method for a color electronic paper image, characterized in that: include: Acquire the display image to be processed by the electronic paper; Get color adjustment instructions; The color adjustment instruction includes any one of the following and a combination thereof: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction; According to the color adjustment instruction, corresponding color adjustment is performed on the display image to be processed to obtain a pre-adjusted display image; Using the Floyd-Steinberg algorithm to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel; For each pixel, the color distance is calculated according to the updated pixel value and the color mapping table preset in the electronic paper to obtain a color distance set, and the color corresponding to the minimum value in the color distance set is used as the display color of the pixel.

2. The color adjustment method of a color electronic paper image according to claim 1, characterized in that: The format of the display image to be processed by the electronic paper is RGB format.

3. The color adjustment method of a color electronic paper image according to claim 2, characterized in that: According to the color adjustment instruction, corresponding color adjustment is performed on the display image to be processed to obtain a pre-adjusted display image, including: Parsing the color adjustment instruction to obtain one or more timing adjustment instructions; The first cycle process is executed until all adjustment instructions are completed to obtain a pre-adjusted display image; the first cycle process includes: Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction; The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

4. The color adjustment method of a color electronic paper image according to claim 3, characterized in that: The Floyd-Steinberg algorithm is used to perform dithering processing on each pixel in the pre-adjusted display image to obtain an updated pixel value of each pixel, including: The second loop process is executed until all pixels of the pre-adjusted display image are traversed to obtain an updated pixel value of each pixel; the second loop process includes: According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel; The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained; The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

5. A color adjustment device for a color electronic paper image, characterized in that: include: Electronic paper image acquisition module, color adjustment instruction acquisition module, color adjustment module, dithering processing module and display module; The electronic paper image acquisition module is used to acquire the display image to be processed by the electronic paper; The color adjustment instruction acquisition module is used to acquire color adjustment instructions; the color adjustment instructions include any one of the following and their combination: hue adjustment, saturation adjustment, contrast adjustment, brightness adjustment and gamma correction; The color adjustment module is used to perform corresponding color adjustment on the display image to be processed according to the color adjustment instruction to obtain a pre-adjusted display image; The dither processing module is used to perform dither processing on each pixel in the pre-adjusted display image using a Floyd-Steinberg algorithm to obtain an updated pixel value of each pixel; The display module is used to calculate the color distance for each pixel according to the updated pixel value and the color mapping table preset in the electronic paper, obtain a color distance set, and use the color corresponding to the minimum value in the color distance set as the display color of the pixel.

6. The color adjustment device for color electronic paper images according to claim 5, characterized in that: The format of the display image to be processed by the electronic paper is RGB format.

7. The color adjustment device for color electronic paper images according to claim 6, characterized in that: The color adjustment module includes: an instruction parsing unit and a first circulation unit; The instruction parsing unit is used to parse the color adjustment instruction to obtain one or more timing adjustment instructions; The first loop unit is used to execute the first loop process until all adjustment instructions are completed to obtain a pre-adjusted display image; the first loop process includes: Determine whether the target adjustment instruction is hue adjustment, saturation adjustment or brightness adjustment. If so, convert the display image to be processed in RGB format into the display image to be processed in HSV format, and perform corresponding color adjustment on the display image to be processed in HSV format to obtain a pre-adjusted display image; if not, perform color adjustment of the corresponding adjustment instruction on the display image to be processed to obtain a pre-adjusted display image; wherein the initial target adjustment instruction is the first adjustment instruction; The pre-adjusted display image is used as the display image to be processed in the next first cycle process, and the adjustment instruction of the next timing is used as the target adjustment instruction of the next first cycle process.

8. The color adjustment device for color electronic paper images according to claim 7, characterized in that: The jitter processing module includes: a second circulation unit; The second loop unit is used to execute the second loop process until all pixels of the pre-adjusted display image are traversed to obtain the updated pixel value of each pixel; the second loop process includes: According to the color value of the target pixel in the current display image and the color mapping table of the actual image, the error value between the target pixel and each color in the color mapping table is calculated; wherein the initial display image is the pre-adjusted display image, and the initial target pixel is the first pixel; The minimum error value is transmitted to the neighboring pixels of the target pixel in the current display image according to a preset ratio, so that the neighboring pixels update their own color values ​​according to the minimum error value, and the updated pixel value of each pixel is obtained; The set of updated pixel values ​​of each pixel point is used as the current display image of the next second cycle process, and the next pixel point is used as the target pixel point of the next second cycle process.

9. A terminal device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the color adjustment method for a color electronic paper image as described in any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium, characterized in that: include: A stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the color adjustment method for a color electronic paper image as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image processing method, image processor and display device

    CN111161683A

  • Color image processing method and device, electronic ink screen and storage medium

    CN112598585A

  • Image adjusting method and device, electronic device and storage medium

    CN113344803A

  • Saturation adjusting method and device, storage medium and color ink screen equipment

    CN116825038A

  • Mark display method and device for ink screen, equipment and storage medium

    CN117238253A

Cited By

  • Electronic paper display method and equipment

    CN120148425A