Display method, electronic paper display device, electronic device and storage medium

By using dynamically changing error diffusion matrix and shrinkage factor processing in electronic paper display technology, the image quality problem of electronic paper when displaying non-template pictures is solved, achieving a more natural color transition and a higher display effect.

CN120279854APending Publication Date: 2025-07-08CHONGQING BOE SMART ELECTRONICS SYST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510518243.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When displaying non-template pictures, existing electronic paper technology is difficult to retain the original image details within a limited color range, resulting in poor image quality, especially in large flat areas that are prone to false textures.

Method used

The dynamically changing error diffusion matrix is used to convert multiple pixel points at different locations in the image using incomplete error diffusion matrix, and the color error is diffused into the surrounding pixel points through the error diffusion matrix, combining the reduction factor to reduce the error transfer intensity and avoid the occurrence of pseudo-texture.

Benefits of technology

Improves the quality of electronic paper image display, reduces pseudo-texture and particle feel, and enhances the natural transition effect and contrast of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279854A_ABST
    Figure CN120279854A_ABST
Patent Text Reader

Abstract

The invention provides a display method, electronic paper display equipment, electronic equipment and a storage medium, belongs to the technical field of image processing, and aims to improve the image display effect, the method comprises the following steps: obtaining an image to be displayed on a display panel; wherein the types of colors presented by the image are more than the types of colors capable of being displayed by the display panel; performing color conversion processing on the image, wherein the color conversion processing is used for converting an original color of each pixel point of the image into a color adaptive to the display panel; wherein the color conversion processing comprises error diffusion processing, and the error diffusion processing comprises the following steps: for the current pixel point, obtaining a color error between an original color and a converted color of the current pixel point, and diffusing the color error to a plurality of pixel points around the current pixel point by using an error diffusion matrix corresponding to the current pixel point; wherein the plurality of pixel points in the image correspond to incompletely identical error diffusion matrixes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of image processing, and specifically relates to a display method, an electronic paper display device, an electronic device, and a storage medium. Background Art

[0002] With the development of electronic paper-related businesses, electronic paper products have become increasingly diversified, and the requirements for the display effects of electronic paper in various application scenarios are also getting higher and higher. To further improve the final presentation effect of electronic paper, it is necessary to process the images to be displayed according to the characteristics of electronic paper, so as to improve the image display effect of electronic paper.

[0003] Currently, most electronic papers display template-like information images. When making templates, elements are selected according to the limited types of colors supported by the electronic paper. Images generated by such templates can better restore image information without algorithm processing. However, when non-template images (such as images with rich colors like meat, fruits, landscape pictures, ID photos, etc.) need to be displayed, it is difficult to retain the detail information of the original image within the color range supported by the electronic paper, resulting in poor quality of the finally displayed image and inability to better restore the details of the original picture. Summary of the Invention

[0004] This application provides a display method, an electronic paper display device, an electronic device, and a storage medium, which are used to solve the problem of poor image quality displayed by existing electronic paper technologies.

[0005] In the first aspect of the embodiments of this application, a display method is provided, and the method includes:

[0006] Obtain an image to be displayed on a display panel; wherein, the types of colors presented by the image are more than the types of colors that the display panel can display;

[0007] Perform color conversion processing on the image, and the color conversion processing is used to convert the original color of each pixel point of the image into a color adapted to the display panel;

[0008] Among them, the color conversion processing includes error diffusion processing, and the error diffusion processing includes: for the current pixel point, obtain the color error between the original color and the converted color of the current pixel point, and use the error diffusion matrix corresponding to the current pixel point to diffuse the color error to a plurality of pixel points around the current pixel point;

[0009] Among them, the plurality of pixel points in the image correspond to error diffusion matrices that are not completely the same.

[0010] In a second aspect of the embodiments of the present application, a color conversion device is further provided. The color conversion device is loaded on an electronic paper display device and is used to execute the display method described in the first aspect of the embodiments of the present application, including:

[0011] An image acquisition module, configured to acquire an image to be displayed on a display panel; wherein, the number of color types presented by the image is more than the number of color types that the display panel can display;

[0012] A color conversion module, configured to perform color conversion processing on the image, and the color conversion processing is used to convert the original color of each pixel point of the image into a color adapted to the display panel;

[0013] Wherein, the color conversion processing includes error diffusion processing, and the error diffusion processing includes: for a current pixel point, obtaining a color error between the original color and the converted color of the current pixel point, and using an error diffusion matrix corresponding to the current pixel point to diffuse the color error to a plurality of pixel points located around the current pixel point;

[0014] Wherein, a plurality of the pixel points in the image correspond to error diffusion matrices that are not completely the same.

[0015] In a third aspect of the embodiments of the present application, an electronic paper display device is further provided. The electronic paper display device is used to execute the steps of the display method described in the first aspect.

[0016] In a fourth aspect of the embodiments of the present application, an electronic device is further provided, including a processor and a memory. The memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the display method described in the first aspect are implemented.

[0017] In a fifth aspect of the embodiments of the present application, a readable storage medium is further provided. The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the display method described in the first aspect are implemented.

[0018] The beneficial effects of the present application are as follows: For the display method proposed by the present application, on the one hand, during the process of color conversion of the image to be displayed, error diffusion processing is performed on each pixel of the image (using the error diffusion matrix corresponding to the current pixel, the color error is diffused to multiple pixels around the current pixel), so as to achieve a natural transition of color conversion at various positions of the image to a certain extent; on the other hand, the present application uses a dynamically changing error diffusion matrix, that is, for multiple pixels at different positions in the image, different error diffusion matrices are used for error diffusion processing, so as to disrupt the regularity of the dynamic change of the error diffusion matrix and avoid generating pseudo-textures in large flat areas of the displayed image, so as to further improve the image display quality.

[0019] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the following specifically illustrates the specific embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts. It should be noted that the ratios in the drawings are only for illustration and do not represent the actual ratios.

[0021] Figure 1 is a flowchart of the steps of a display method in an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of an error diffusion matrix in an embodiment of the present application;

[0023] Figure 3 is a schematic flowchart of color conversion processing in an embodiment of the present application;

[0024] Figure 4 is a schematic flowchart of error diffusion processing in an embodiment of the present application;

[0025] Figure 5 is a schematic flowchart of image display in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of the architecture of a classification model in an embodiment of the present application;

[0027] Figure 7 is a schematic diagram of the structure of a display device in an embodiment of the present application;

[0028] Figure 8 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or at least two. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.

[0031] With the development of e-paper related businesses, e-paper products are becoming more and more diversified, and the display effects of e-paper in various application scenarios are becoming more and more demanding. In order to further improve the final presentation effect of e-paper, the images to be displayed need to be processed specifically according to the characteristics of e-paper, thereby improving the display effect of e-paper images.

[0032] At present, most electronic papers display information images of template type. When making templates, elements are selected according to the limited number of color types supported by electronic paper. The images generated by such templates can restore image information well without algorithm processing. However, when it is necessary to display non-template images (such as meat, fruit, landscape pictures, ID photos and other images with rich colors), the original image needs to be specially processed to retain the original image details as much as possible within the color range supported by the electronic paper. At present, the relevant technology mainly adopts an ordered error diffusion algorithm, such as the Floyd-Steinberg dithering algorithm, which uses a fixed error diffusion matrix to perform pixel-by-pixel error diffusion processing on the image. This algorithm will produce pseudo-textures in large flat areas, presenting false details that do not exist in the original image, and the processed image has a very obvious particle feeling, and the details of the image cannot be restored well. Therefore, the current electronic paper image display technology is difficult to retain the original image details within the color range supported by the electronic paper, resulting in poor image quality in the final display.

[0033] In view of the above problems, the present application provides a display method, apparatus, device, and storage medium. On the one hand, during the process of performing color conversion on the image to be displayed, error diffusion processing is performed on each pixel of the image (using the error diffusion matrix corresponding to the current pixel to diffuse the color error into multiple pixels located around the current pixel), so as to achieve a natural transition of color conversion at various positions of the image to a certain extent. On the other hand, the present application uses a dynamically changing error diffusion matrix, that is, for multiple pixels at different positions in the image, different error diffusion matrices are used for error diffusion processing, so as to disrupt the regularity of the dynamic change of the error diffusion matrix and avoid generating pseudo-textures in large flat areas of the displayed image, thereby further improving the image display quality.

[0034] In the first aspect of the present application, a display method is proposed. Referring to Figure 1 , Figure 1 shows a flowchart of the steps of a display method. As Figure 1 shown, the method includes:

[0035] Step S101, obtain an image to be displayed on the display panel; wherein, the number of color types presented by the image is more than the number of color types that the display panel can display.

[0036] Step S102, perform color conversion processing on the image, and the color conversion processing is used to convert the original color of each pixel of the image into a color adapted to the display panel;

[0037] wherein, the color conversion processing includes error diffusion processing, and the error diffusion processing includes: for the current pixel, obtain the color error between the original color and the converted color of the current pixel, and use the error diffusion matrix corresponding to the current pixel to diffuse the color error into multiple pixels located around the current pixel;

[0038] wherein, multiple pixels in the image correspond to different error diffusion matrices.

[0039] Specifically, the display method proposed in the embodiments of the present application can be applied to an e-paper device, as a method for image display using e-paper technology. The image obtained in step S101 to be displayed on the display panel can be any type of image with rich colors, such as pictures of meat, fruits, landscapes, ID photos, etc. The display panel can be the display panel EPD of the e-paper device, or any display panel that can implement the image display function.

[0040] The number of color types presented by the image obtained in step S101 is greater than the number of color types that the display panel can display. Here, the number of color types presented by the image refers to the number of types of the original colors of all pixel points in the image. The number of color types that the display panel can display refers to all color types that can be presented in the image displayed by the display panel. In the related art, the number of display color types supported by the electronic paper technology is limited when displaying an image. Exemplarily, the image to be displayed obtained contains 10 colors, while the number of color types that the display panel can display (i.e., the color types supported by the electronic paper display technology) is only 3 color types, namely red, white, and black. In this case, the number of color types presented by the image obtained in step S101 is greater than the number of color types that the display panel can display. In order to enable the image to be displayed on the display panel, it is necessary to perform color conversion on the image through step S102, so as to convert the image containing multiple color types into a converted image that only contains the color types that the display panel can display, that is, to convert the original color of each pixel point in the image (such as any one of the 10 colors in the example) into the color supported by the display panel (such as one of the 3 colors, red, white, and black in the example), that is, to adapt to the color of the display panel.

[0041] In the process of performing color conversion processing on the image in step S102, color conversion processing is performed on each pixel point in the image one by one. Specifically, after performing color conversion processing on the first pixel point in the image, color conversion processing is performed on the second pixel point adjacent to the first pixel point, and so on, until the last pixel point is processed. Exemplarily, the color conversion processing can be performed in the order from left to right or from top to bottom along the pixel point arrangement direction. In this embodiment, the order of color conversion processing is not limited.

[0042] The color conversion processing performed in step S102 includes error diffusion processing. The error diffusion processing specifically includes:

[0043] Step S1021, for the current pixel point, obtain the color error between the original color and the converted color of the current pixel point. When the image is converted from a high color depth to a low color depth (such as the red, white, and black 3-color display supported by the electronic paper), the color of each pixel point will be approximated to the closest available color, and this process will introduce an error (i.e., color error). The color error is used to characterize the gap between the original color and the converted color of the current pixel point, and can be the difference between the original gray scale value of the current pixel point and the gray scale value of the converted color. The greater the color error, the greater the change that occurs after the color conversion of the current pixel point and the greater the difference from the original image.

[0044] Step S1022, after obtaining the color error, using the error diffusion matrix corresponding to the current pixel point, diffuse the color error into multiple pixel points located around the current pixel point. Among them, the multiple pixel points located around the current pixel point include the pixel points adjacent to the current pixel point and the pixel points within a first threshold distance from the current pixel point, and this first threshold can be defined according to actual requirements. Exemplarily, the first threshold can be 2, indicating that the multiple pixel points around the current pixel point include all pixel points within no more than 2 pixel points away from the current pixel point.

[0045] In a possible implementation manner, the color error is diffused into at least 5 pixel points located around the current pixel point.

[0046] Specifically, each time color error diffusion is performed, at least 5 pixel points around the current pixel point are selected for error diffusion. Exemplarily, 5, 7, or 10 pixel points around the current pixel point can be selected, and these pixel points are subjected to error diffusion (changing the original grayscale value of the pixel point to the diffused grayscale value), so that these pixel points are converted from the original color to the diffused color.

[0047] Moreover, the multiple pixel points located around the current pixel point refer to the pixel points that have not undergone color conversion around the current pixel point A, that is, the multiple pixel points do not include the pixel points that have already undergone the color conversion process of step S102. Exemplarily, after performing color conversion processing on the first pixel point in the image, color conversion processing is performed on the second pixel point adjacent to the first pixel point. During the process of performing color conversion processing on the second pixel point and performing color error diffusion, since the first pixel point has already undergone color conversion processing, when performing color error diffusion on the multiple pixel points around the second pixel point, the third pixel point adjacent to the second pixel point can be selected, but the first pixel point cannot be included.

[0048] When performing step S102, based on the error diffusion matrix corresponding to the current pixel point, the color error is diffused into multiple pixel points located around the current pixel point. The role of the error diffusion matrix is to distribute the color error of the current pixel point to the surrounding pixel points according to a certain ratio (the elements of the error diffusion matrix), so as to compensate for the error in the local area and avoid the loss of color information. Exemplarily, the color error between the original color and the converted color of the current pixel point is +5. Based on the diffusion ratio represented by the error diffusion matrix, +3 is assigned to pixel point A on the right side of the current pixel point, +1 is assigned to pixel point B below the current pixel point, and +1 is assigned to pixel point C in the lower right of the current pixel point, thus completing the error diffusion.

[0049] Refer toFigure 2 , Figure 2 shows a schematic diagram of an error diffusion matrix, as Figure 2 shown, the error diffusion matrix may include four types a, b, c, and d as Figure 2 shown in. Specifically, color conversion needs to convert the original grayscale value of the pixel point x in the original image obtained in step S101 into the grayscale value displayed on the display panel (i.e., the converted grayscale). For example, the original grayscale value of the pixel point x is 110, and the display colors supported by the display panel are red, black, and white. After conversion according to the corresponding standard, the converted grayscale value is 102, with a difference of 8 between the two. Then, multiple pixel points around the pixel point x need to share this error (i.e., color error). Taking the error diffusion matrix a as an example, 7 pixel points located around the pixel point x are selected. The relative positions between these 7 pixel points and the pixel point x are as shown in the error diffusion matrix a (respectively located on the right, below, bottom left, and bottom right of the pixel point x). The grayscale values of these 7 pixel points need to be increased by 8 / 32 of the color error 8, 4 / 32 of 8, 2 / 32 of 8, 4 / 32 of 8, 8 / 32 of 8, 4 / 32 of 8, and 2 / 32 of 8 in sequence. Therefore, the x + 1 pixel point increases by 8 / 32 of the color error 8 on the basis of the original grayscale value. After completing the color conversion process for the pixel point x, when performing the color conversion process for the x + 1 pixel point, it is necessary to perform the color conversion process on the basis of having already increased by 8 / 32 of the color error 8.

[0050] Among them, multiple pixel points in the image correspond to error diffusion matrices that are not completely the same. Further, the error diffusion matrices corresponding to adjacent two pixel points are different. Exemplarily, for pixel point A, after obtaining the color error a, the corresponding error diffusion matrix 1 is used to diffuse the color error a to multiple pixel points located around the pixel point A; for pixel point B, after obtaining the color error b, the corresponding error diffusion matrix 2 is used to diffuse the color error b to multiple pixel points located around the pixel point B. Thus, different error diffusion matrices are used for error diffusion processing of different pixel points, thereby disrupting the regularity of the dynamic change of the error diffusion matrix and avoiding the generation of pseudo-textures in large flat areas of the displayed image, so as to further improve the image display quality.

[0051] In a possible implementation manner, the error diffusion matrix includes diffusion coefficients respectively corresponding to multiple pixel points around the current pixel point;

[0052] Among them, in the color conversion of multiple pixel points in the image, the error diffusion matrix is not completely the same in at least one of the number of the diffusion coefficients and the coefficient values of the diffusion coefficients;

[0053] Among them, the number of the diffusion coefficients corresponds to the number of pixel points to which the color error diffuses.

[0054] As Figure 2 shown, each error diffusion matrix includes diffusion coefficients corresponding to respective multiple pixel points. Multiple pixel points in the image correspond to error diffusion matrices that are not completely the same. The fact that the error diffusion matrices are not completely the same means that the coefficient values of the diffusion coefficients in the error diffusion matrix are different and / or the number of diffusion coefficients is different. The diffusion coefficient represents each element in the error diffusion matrix, and the coefficient value of the diffusion coefficient refers to the value of each element, indicating the influence degree of diffusing the color error to the pixel point at the corresponding position. The number of diffusion coefficients refers to the number of elements in the error diffusion matrix. Taking Figure 2 the error diffusion matrix a shown as an example, except for the pixel point x, a includes 7 pixel points around the pixel point x. The number of diffusion coefficients is 7, indicating that 7 pixel points around the pixel point x are selected. The values of each element in a are successively 8 / 32, 4 / 32, 2 / 32, 4 / 32, 8 / 32, 4 / 32, 2 / 32, representing the diffusion ratio when diffusing the color error. In this embodiment, making the error diffusion matrices of different pixel points not completely the same (the coefficient values of the diffusion coefficients are different or the number of diffusion coefficients is different) realizes the dynamic change of the error diffusion matrix, avoiding the generation of pseudo-textures in large flat areas of the displayed image due to using a fixed error diffusion matrix for the whole image, so as to further improve the image display quality.

[0055] In a possible implementation manner, the error diffusion matrix includes diffusion coefficients respectively corresponding to multiple pixel points around the current pixel point. The obtaining of the error diffusion matrix corresponding to the current pixel point includes:

[0056] Obtaining a previous error diffusion matrix used in the previous error diffusion process before the current error diffusion process;

[0057] Transforming the coefficient values of at least some of the diffusion coefficients in the previous error diffusion matrix to obtain the error diffusion matrix corresponding to the current pixel point;

[0058] Among them, the transformation includes randomly increasing or decreasing the coefficient values of the diffusion coefficients.

[0059] In this embodiment, for the pixel points at various positions in the image, the error diffusion matrices corresponding to any two adjacent pixel points are not exactly the same. Specifically, the error diffusion matrix used when the previous pixel point performs error diffusion processing can be obtained, and then an adjustment transformation is performed on the basis of this error diffusion matrix (changing the values of at least some elements in the matrix, that is, randomly increasing or decreasing the coefficient values of some diffusion coefficients) to obtain a new and not exactly the same error diffusion matrix for performing the error diffusion processing of the current pixel point, thereby ensuring that the error diffusion matrices corresponding to two adjacent pixel points are not exactly the same and realizing the dynamic transformation of the error diffusion matrix.

[0060] In a possible implementation manner, the obtaining of the error diffusion matrix corresponding to the current pixel point includes:

[0061] Obtain the currently generated random number;

[0062] Based on the random number, obtain the error diffusion matrix corresponding to the current pixel point from multiple preset gray-scale error diffusion matrices.

[0063] In this embodiment, multiple preset gray-scale error diffusion matrices are preset in advance (such as Figure 2 the multiple matrices shown), and these multiple preset gray-scale error diffusion matrices are different from each other. For example, the values of the elements in the matrix are not exactly the same (the coefficient values of the diffusion coefficients are different), or the number of elements in the matrix is different (the number of diffusion coefficients is different). Each preset gray-scale error diffusion matrix has a corresponding matrix index value. Exemplarily, if there are a total of 4 matrices, the matrix index values are 1, 2, 3, and 4 respectively. When performing error diffusion processing on the current pixel point, first obtain a random number, and this random number needs to be within the value range of the matrix index value (the value range shown in the above example is 1-4). Use this random number as the current matrix index value, so as to select the currently used error diffusion matrix from multiple preset gray-scale error diffusion matrices based on the random number.

[0064] In this embodiment, a random generator can be used to obtain a random number. The Random generator is a random number generator that can be applied to various programming languages. It can expand or shrink the generated random number and limit the range, and can obtain any interval random number that meets the requirements.

[0065] Moreover, by caching the matrix index value (i.e., the previous random number) used when performing error diffusion processing on the previous pixel point, it is ensured that the error diffusion matrix used for the current pixel point is different from that used for the previous pixel point. When processing a large area of an image with similar colors, since the error diffusion matrix selected each time is different, there will be no continuous points or continuous blanks in the same direction, thus avoiding the generation of pseudo-textures in large flat areas of the displayed image.

[0066] In a possible implementation, after obtaining the color error, the error diffusion processing further includes:

[0067] Reducing the color error;

[0068] The step of spreading the color error to a plurality of pixel points around the current pixel point by using the error diffusion matrix corresponding to the current pixel point includes:

[0069] Spreading the reduced color error to a plurality of pixel points around the current pixel point by using the error diffusion matrix corresponding to the current pixel point.

[0070] Specifically, in this embodiment, it is proposed that before spreading the color error, the color error is reduced to a certain extent, thereby reducing the influence of the pixel point on the surrounding pixels and reducing the number of particles in the overall picture. The appropriate reduction in the number of particles can improve the contrast of the image while maintaining the details of the original image.

[0071] In a possible implementation, the reducing the color error includes:

[0072] Obtaining a currently randomly generated reduction factor, where the reduction factor is any value in the range of 0.8 to 0.96;

[0073] Reducing the color error based on the reduction factor.

[0074] In this embodiment, the reduction factor Factor is a float-type random number belonging to the interval [0.8, 0.96], which is used to randomly reduce the diffusion error value. Multiply the color error obtained in step S101 by the reduction factor. Exemplarily, if the color error is 10 and the selected reduction factor is 0.9, then the color error reduced based on the reduction factor is 9. Then, the reduced color error 9 is spread to a plurality of surrounding pixel points according to the error diffusion matrix. This embodiment uses the reduction factor to reduce the color error to be spread to a certain extent, reducing the intensity of error transmission, thereby reducing the graininess of the image.

[0075] In a possible implementation, each pixel point in the image includes the original gray-scale values in multiple color channels, and the color error includes the gray-scale errors corresponding to each of the multiple color channels;

[0076] Among them, reducing the color error based on the reduction factor includes:

[0077] Based on the reduction factor, reducing the gray-scale error corresponding to the current pixel point in at least some of the color channels.

[0078] In this embodiment, the original color of each pixel point includes the original gray-scale values of each color channel. Performing color conversion processing on each pixel point includes performing conversion processing on the original gray-scale values of each color channel of the pixel point. The color error of the current pixel point obtained in step S101 includes the gray-scale errors of the current pixel point in each color channel respectively, that is, the error between the original gray-scale value of each color channel and the gray-scale value after conversion of this color channel.

[0079] In the process of reducing the color error of the current pixel point by using the reduction factor, it is possible to reduce the gray-scale errors of all color channels of the current pixel point, or to reduce the gray-scale errors of some color channels. Exemplarily, the current pixel point includes the gray-scale errors X, Y, Z of the red, blue, and green color channels. The obtained reduction factor is 0.9. Reducing the red color channel and the blue color channel of the current pixel point, the reduced color error can be obtained including the gray-scale error 0.9X of the red color channel, the gray-scale error 0.9Y of the blue color channel, and the gray-scale error Z of the green color channel. This embodiment proposes that only the gray-scale errors of some color channels of the current pixel point can be reduced according to the reduction factor, so as to achieve more flexible error diffusion and avoid generating pseudo-textures in large flat areas of the displayed image.

[0080] In a possible implementation, the current pixel point corresponds to different reduction factors in different color channels.

[0081] Specifically, the reduction factors of different color channels are different. Exemplarily, the reduction factor of the red color channel is 0.9, the reduction factor of the blue color channel is 0.85, and the reduction factor of the green color channel is 0.88, so as to reduce the errors of each color channel according to different reduction ratios of the reduction factor.

[0082] In a possible implementation, each pixel point in the image includes the original gray-scale values in multiple color channels, and the color error includes the gray-scale errors corresponding to each of the multiple color channels; the process of obtaining the gray-scale error includes:

[0083] Step S201: Based on the display color of the display panel, convert the current gray-scale value of the current pixel point in each color channel multiple times to obtain the converted gray-scale values respectively corresponding to each color channel in multiple conversions; wherein, the same color channel corresponds to different converted gray-scale values in different conversions.

[0084] Refer to Figure 3 and Figure 4 , Figure 3 which shows a schematic flow chart of a color conversion process, Figure 4 shows a schematic flow chart of an error diffusion process. As shown in Figure 3 and Figure 4 , after obtaining the image Src, input the image and obtain the color error of the first pixel point (as the current pixel point) in the image Src. In this process, obtaining the color error of the current pixel point includes obtaining the gray-scale error corresponding to each color channel of the current pixel point. This gray-scale error represents the error between the original gray-scale value and the converted gray-scale value of each color channel. Specifically, based on the display colors supported by the display panel (such as the color List shown in Figure 3 ), perform multiple color conversions on the current pixel point (that is, convert the current gray-scale value of each color channel multiple times) to obtain multiple different converted colors (that is, multiple different converted gray-scale values of the color channels). Obtain the color list supported by the display panel, which includes multiple colors that the display panel can display, and select the color that is the same as or similar to the original color (R, G, B) of the current pixel point as the converted color (R i , G i , B i ) of the current pixel point.

[0085] Exemplarily, for the first color conversion of pixel point X, the converted gray-scale values of the R, G, and B color channels of pixel point X are R1, G1, and B1 in sequence; for the second color conversion of pixel point X, the converted gray-scale values of the R, G, and B color channels of pixel point X are R2, G2, and B2 in sequence... For the nth color conversion of pixel point X, the converted gray-scale values of the R, G, and B color channels of pixel point X are R n , G n , B n . The results after each color conversion are different.

[0086] Among them, the group with the smallest error can be selected from the three groups of [R1, G1, B1], [R2, G2, B2], and [R1, G1, B1] as the converted result.

[0087] Step S202: Obtain the total grayscale difference corresponding to the current pixel point in each conversion. The total grayscale difference represents the overall difference between the current grayscale values of multiple color channels and the grayscale values after conversion. The smaller the value of the total grayscale difference, the smaller the overall difference between the current grayscale values of each color channel and the grayscale values after conversion, and the closer the original color of the pixel point is to the color after conversion.

[0088] In a possible implementation manner, step S202: Obtain the total grayscale difference corresponding to the current pixel point in each conversion, includes:

[0089] Step S2021: Determine the squared value of the difference between the current grayscale value and the grayscale value after conversion of the current pixel point in each color channel in each conversion. As Figure 4 shown, calculate the difference between the color supported by the display panel (such as EPD) and the original color of the current pixel point (i.e., the current pixel color), and square it.

[0090] Step S2022: Use the sum of the squared values of the current pixel point in multiple color channels as the total grayscale difference.

[0091] As Figure 3 shown, calculate the total grayscale difference D i The formula is as follows:

[0092] D i =(R - R i ) 2 +(G - G i ) 2 +(B - B i ) 2 .

[0093] The current pixel point has three color channels: red, green, and blue. In the above formula, R, G, and B represent the current grayscale values of the current pixel point in the red, green, and blue color channels respectively, and R i , G i , B i represent the grayscale values after conversion of the current pixel point in the red, green, and blue color channels respectively.

[0094] Step S203: Based on the total grayscale difference, determine the grayscale error corresponding to the current pixel point in each color channel.

[0095] In a possible implementation manner, step S203: Based on the total grayscale difference, determine the grayscale error corresponding to the current pixel point in each color channel, includes:

[0096] Step S2031: Determine the minimum total grayscale difference with the smallest value from among the multiple total grayscale differences.

[0097] Step S2032: Determine the grayscale error as the difference between the current grayscale value and the converted grayscale value for each color channel corresponding to the formation of the minimum total grayscale difference.

[0098] As Figure 3 and Figure 4 shown, take the minimum value (i.e., i the smallest difference found as shown in Figure 4 ) among the multiple total grayscale differences D, and use the grayscale values R i , G i , B i of each color channel corresponding thereto as the converted grayscale values to obtain the converted color of the current pixel point, and further obtain the grayscale error corresponding to each color channel of the current pixel point, which is also the color error between the original color and the converted color of the current pixel point obtained in step S102. In this embodiment, each color channel of each pixel point has its corresponding grayscale error. By performing multiple color conversions and selecting the minimum total grayscale difference D i with the smallest value, that is, finding the converted color closest to the original color of the pixel point, as Figure 4 shown, thereby setting the current pixel point to the EPD minimum difference color (i.e., the converted color of the current pixel point) and determining the grayscale error of each color channel at this pixel point.

[0099] As Figure 3 and Figure 4 shown, after determining the converted colors R i , G i , B i for the current pixel point, performing a color conversion on the current pixel point is equivalent to Figure 3 Src(x, y) = (R i , G i , B i ) in Figure 3 , and then confirming whether the current pixel point is the last pixel point, that is, Figure 3 and Figure 4 shown, determining whether the image traversal is over. If it has not ended, it means that the current pixel point is not the last pixel point in the image and there are still pixel points that have not undergone color conversion, then error diffusion processing needs to be performed on one or more pixel points around the current pixel point. The specific process of this error diffusion processing has been described in the above embodiment and will not be elaborated here. Exemplarily, as Figure 3 and Figure 4 shown, through a Random generator, randomly obtain an error diffusion matrix Matrics from among multiple pre-configured error diffusion matrices, and calculate the error diffusion value according to the matrix, asFigure 3 Shown as Error(R,G,B) = [(R,G,B) - (R i ,G i ,B i )]*Matrics*Factor, where Matrics represents the error diffusion matrix, and Factor represents a numerically random reduction factor within the range [0.8, 0.96], that is, the color error (R,G,B) - (R i ,G i ,B i ) is reduced by a certain proportion according to the reduction factor Factor (i.e., Figure 4 shown as randomly attenuating the error value), and then diffused to multiple surrounding pixel points according to the error diffusion matrix Matrics. Select the next pixel point. At this time, the color (R,G,B) of the next pixel point includes its own original color Src(x,y) and the error diffusion Error(R,G,B). Repeat the above process until the last pixel point is processed, and output and display the finally processed image.

[0100] In a possible implementation, before performing color conversion processing on the image, the method further includes:

[0101] Determine whether the image belongs to a template class image, where the color difference and / or contour difference between different elements within the template class image is higher than the color difference and / or contour difference between different elements within a non-template class image;

[0102] Performing the color conversion processing on the image includes:

[0103] If the image belongs to the template class image, perform region segmentation on the image, and respectively convert the gray levels of the pixel points within the multiple segmented regions; where the different segmented regions correspond to different elements, and at least some of the pixel points within the same region are converted to the same gray level value;

[0104] If the image belongs to the non-template class image, perform the error diffusion processing on each pixel point in the image.

[0105] Specifically, in this embodiment, before performing step S102, that is, performing color conversion processing on the image, it is determined whether the image belongs to a template type image (i.e., the image is a template type image or a non-template type image). The color difference and / or contour difference between different elements in a template type image is higher than the color difference and / or contour difference between different elements in a non-template type image. Specifically, a template type image usually only contains a few colors (such as 3 - 5 colors), does not contain color gradients, so the number of color types is limited. There are clear color boundaries between different regions, the color change is discrete, and there is a lack of smooth gradient transition. A non-template type image may contain thousands of colors (a 24-bit true color image can accommodate 16.77 million colors), and contains a large number of gradient colors. The color change is continuous, and the color distribution is more natural, without obvious artificially divided boundaries. Therefore, the color difference between different elements in a template type image is higher than the color difference between different elements in a non-template type image. The shapes of each region in a template type image are regular, usually including geometric shapes such as rectangles and circles, the edges are clear and sharp, and the boundaries between different elements are very clear, without blurred transition contours, and the design is simple, without complex textures or details. In contrast, a non-template type image reflects the natural shape of real objects, the shapes of each region in the image are irregular, and due to factors such as light and depth of field, the boundary contours may not be very clear, with complex textures and subtle changes. Therefore, the contour difference between different elements in a template type image is higher than the contour difference between different elements in a non-template type image.

[0106] Template type images have an obvious artificial design style. They contain few gradient colors, have obvious color partitions, a limited number of color types, regular shapes of each region in the image, and less details. Therefore, template type images are not suitable for error diffusion optimization processing, and better results can be achieved by using the multi-color threshold segmentation method. Non-template type images refer to images that are closer to nature, mostly from camera shooting. They have a wide variety of color types, rich details, a large number of gradient colors, and no obvious color partitions or color blocks. Therefore, such images are suitable for error diffusion algorithm processing and optimization. Using the ordinary multi-color threshold segmentation algorithm cannot restore the details and gradient regions of the image.

[0107] If the image belongs to a template type image, the multi-color threshold segmentation method is used for processing; if the image belongs to a non-template type image, the color conversion processing described in step S102 is performed. Among them, the multi-color threshold segmentation method specifically means: First, the image is segmented according to the regions where different elements in the image are located, and each segmented region corresponds to one element. Then, the gray levels of the pixel points in the multiple segmented regions are respectively converted, and the original colors of each pixel point are converted into the colors supported by the display panel. Among them, at least some pixel points in the same region are converted into the same gray level value.

[0108] In a possible implementation, determining whether the image belongs to the template class image includes:

[0109] Inputting the image into a classification model to obtain the result of whether the image belongs to the template class image output by the classification model;

[0110] Wherein, the classification model is obtained by training a preset model with a plurality of different first image samples and a plurality of different second image samples as training samples, and a plurality of the first image samples belong to the template class image, and a plurality of the second image samples belong to the non-template class image.

[0111] Refer to Figure 5 , Figure 5 which shows a schematic flowchart of image display. As Figure 5 shown, for the acquired image, it is first input into a classification model (the classification model can be the binary classification model shown as Figure 5 ), and the classification model is used to determine whether the image belongs to the template class image or the non-template class image. The classification model analyzes the features of the input image and outputs the classification result for the image (i.e., the probability that the image belongs to the template class image). Exemplarily, the classification result indicates that the output value (the probability that the image belongs to the template class image) > 0.5, indicating that the input picture belongs to the template class picture. If it is determined according to the classification result that the image belongs to the template class image, the multi-color threshold segmentation method is used for processing, and then it is sent to a display device for display (as Figure 5 shown, it can be sent to an e-paper device); if the image belongs to the non-template class image, the color conversion process described in step S102 is performed. As Figure 5 shown, error diffusion processing is performed using a random matrix (i.e., a dynamically transformed error diffusion matrix), and then it is sent to a display device for display.

[0112] Refer to Figure 6 , Figure 6 which shows a schematic architecture diagram of a classification model. As Figure 6 shown, after the image is input into the classification model, it sequentially passes through the input layer, convolutional layer, ReLu activation function, max pooling layer, convolutional layer, ReLu activation function, max pooling layer, flattening layer, fully connected layer, ReLu activation function, output layer, and Sigmoid activation function of the classification model, and finally obtains the probability that the image belongs to the template class image.

[0113] The model training process of the classification model is as follows:

[0114] Step S301, create a sample data set. The sample data set includes multiple training sample data. Each training sample data includes an image pair composed of a first image sample and a second image sample. Perform a unified resize operation on the first image sample and the second image sample, and perform normalization processing on the pixel values. The obtained data and the corresponding labels are used as the input information of the model. Among them, the label carried by each training sample data is used to indicate that the first image sample belongs to the template class image, and the second image sample belongs to the non-template class image.

[0115] Step S302, input the training sample data into the classification model under training to obtain a classification result;

[0116] Step S303, calculate the loss function according to the classification result and the label of the training sample data; The loss function is used to calculate the difference between the model prediction value (classification result) and the actual value (the label carried by the training sample data, 1 for the template class image and 0 for the non-template class image). The classification model outputs the probability value that the image belongs to the template class image, and its range belongs to the interval [0, 1]. This model uses binary cross-entropy as the loss function, and the calculation formula of this loss function is as follows:

[0117]

[0118] Among them, y is the label value 0 or 1 indicating whether the input image is a template class image. 0 represents that the input image is a non-template class image, and 1 represents that the input image is a template class image. P(y) is the probability of belonging to the y label (that is, the probability that the image belongs to the template class image). N represents the current training times, and y i represents the label value 0 or 1 indicating whether the input image is a template class image during the i-th model training. As a loss function, binary cross-entropy is used to evaluate the quality of the prediction result of a binary classification model. For example, for the case where the label y is 1, if the prediction value P(y) approaches 1, then the value of the loss function approaches 0. On the contrary, if the prediction value P(y) approaches 0 at this time, then the value of the loss function will be very large. When the label y is 0, if the prediction value is close to 0, Loss = approaches 0, otherwise Loss tends to positive infinity.

[0119] Step S304, update the parameters of the classification model according to the value of the loss function.

[0120] By repeatedly executing the above steps S302 - S304, perform multiple rounds of iterative training on the classification model until the preset training times or the value of the loss function converges. In this embodiment, by training the neural network (i.e., the classification model), it is determined whether the image needs to be subjected to error diffusion processing, avoiding negative optimization of the template class image and improving the image display processing efficiency.

[0121] In summary, this application proposes that error diffusion processing is a process of performing color reduction on an input image. Taking a 3-color e-paper as an example, each pixel of the 3-color e-paper can only display one of the colors black, white, and red. However, a non-template image may contain tens of millions of colors (a 24-bit true color image can accommodate 256 * 256 * 256 = 16,777,216 colors). To display an original image with such rich colors on a display device that only supports 3 colors, it is necessary to perform a color reduction algorithm on the original image. The error diffusion algorithm can perform color reduction on the image. The selection of the error diffusion matrix has a great impact on the effect of the image. Related algorithms use the same diffusion matrix to process any pixel point of the entire image, which results in pseudo-textures in large flat areas of the image. Because of the fixed error transfer coefficient, the processed image will also contain too many particles. This application proposes to use a non-fixed error diffusion matrix (the multiple pixel points correspond to non-identical error diffusion matrices) and a lower transfer coefficient (using a reduction factor to reduce color errors) to solve the problems of pseudo-textures and insufficient contrast caused by too many particles, and improve the image display quality.

[0122] In a second aspect of the embodiments of this application, a color conversion device is further provided. The color conversion device is loaded on an e-paper display device and is used to execute the display method described in the first aspect of the embodiments of this application. Refer to Figure 7 , Figure 7 FIG. shows a schematic structural diagram of a color conversion device. As Figure 7 shown, the device includes:

[0123] An image acquisition module, configured to acquire an image to be displayed on a display panel; wherein, the number of color types presented by the image is more than the number of color types that the display panel can display;

[0124] A color conversion module, configured to perform color conversion processing on the image. The color conversion processing is used to convert the original color of each pixel point of the image into a color adapted to the display panel;

[0125] Wherein, the color conversion processing includes error diffusion processing. The error diffusion processing includes: for a current pixel point, obtaining a color error between the original color and the converted color of the current pixel point, and using the error diffusion matrix corresponding to the current pixel point to diffuse the color error into multiple pixel points located around the current pixel point;

[0126] Wherein, the multiple pixel points in the image correspond to non-identical error diffusion matrices.

[0127] In a possible implementation manner, the error diffusion matrix includes diffusion coefficients respectively corresponding to multiple pixel points around the current pixel point;

[0128] Among them, in the color conversion of a plurality of pixel points in the image, the error diffusion matrix is not completely the same in at least one of the number of the diffusion coefficients and the coefficient values of the diffusion coefficients;

[0129] Among them, the number of the diffusion coefficients corresponds to the number of pixel points to which the color error diffuses.

[0130] In a possible implementation manner, the color error diffuses into at least 5 pixel points located around the current pixel point.

[0131] In a possible implementation manner, the error diffusion matrix includes diffusion coefficients respectively corresponding to a plurality of pixel points around the current pixel point. The acquisition of the error diffusion matrix corresponding to the current pixel point includes:

[0132] Acquire a previous error diffusion matrix used in the previous error diffusion process before the current error diffusion process;

[0133] Transform the coefficient values of at least part of the diffusion coefficients in the previous error diffusion matrix to obtain the error diffusion matrix corresponding to the current pixel point;

[0134] Among them, the transformation includes randomly increasing or decreasing the coefficient values of the diffusion coefficients.

[0135] In a possible implementation manner, the acquisition of the error diffusion matrix corresponding to the current pixel point includes:

[0136] Acquire a currently generated random number;

[0137] Based on the random number, acquire the error diffusion matrix corresponding to the current pixel point from a plurality of preset grayscale error diffusion matrices.

[0138] In a possible implementation manner, after acquiring the color error, the error diffusion process further includes:

[0139] Reduce the color error;

[0140] The use of the error diffusion matrix corresponding to the current pixel point to diffuse the color error into a plurality of pixel points located around the current pixel point includes:

[0141] Use the error diffusion matrix corresponding to the current pixel point to diffuse the reduced color error into a plurality of pixel points located around the current pixel point.

[0142] In a possible implementation manner, the reduction of the color error includes:

[0143] Obtain the currently randomly generated reduction factor, where the reduction factor is any value in the range of 0.8 to 0.96;

[0144] Reduce the color error based on the reduction factor.

[0145] In a possible implementation, each pixel point in the image includes the original grayscale values in multiple color channels, and the color error includes the grayscale errors corresponding to each of the multiple color channels;

[0146] Among them, the reducing the color error based on the reduction factor includes:

[0147] Reduce the grayscale error corresponding to the current pixel point in at least some of the color channels based on the reduction factor.

[0148] In a possible implementation, the current pixel point corresponds to different reduction factors in different color channels.

[0149] In a possible implementation, each pixel point in the image includes the original grayscale values in multiple color channels, and the color error includes the grayscale errors corresponding to each of the multiple color channels; the process of obtaining the grayscale error includes:

[0150] Based on the display color of the display panel, convert the current grayscale value of the current pixel point in each color channel multiple times to obtain the converted grayscale values respectively corresponding to each color channel in multiple conversions; among them, the same color channel corresponds to different converted grayscale values in different conversions;

[0151] Obtain the total grayscale difference corresponding to the current pixel point in each conversion, where the total grayscale difference represents the overall difference between the current grayscale values of multiple color channels and the converted grayscale values;

[0152] Based on the total grayscale difference, determine the grayscale error corresponding to the current pixel point in each color channel.

[0153] In a possible implementation, the determining the grayscale error corresponding to the current pixel point in each color channel based on the total grayscale difference includes:

[0154] Determine the minimum total grayscale difference with the smallest value from multiple total grayscale differences;

[0155] Determine the difference between the current grayscale value and the converted grayscale value of each color channel corresponding to the minimum total grayscale difference as the grayscale error.

[0156] In a possible implementation, obtaining the total gray-scale difference corresponding to the current pixel point in each conversion includes:

[0157] Determining, in each conversion, the square value of the difference between the current gray-scale value and the converted gray-scale value of the current pixel point in each color channel;

[0158] Taking the sum of the square values of the current pixel point in multiple color channels as the total gray-scale difference.

[0159] In a possible implementation, the device further includes a classification module, which is used to determine whether the image belongs to a template-class image before performing color conversion processing on the image. The color difference and / or contour difference between different elements in the template-class image are higher than those between different elements in the non-template-class image;

[0160] The color conversion module performing the color conversion processing on the image includes:

[0161] If the image belongs to the template-class image, performing region segmentation on the image and respectively converting the gray-scale values of the pixel points in multiple segmented regions; wherein, different segmented regions correspond to different elements, and at least some of the pixel points in the same region are converted into the same gray-scale value;

[0162] If the image belongs to the non-template-class image, performing the error diffusion processing on each pixel point in the image.

[0163] In a possible implementation, determining whether the image belongs to a template-class image includes:

[0164] Inputting the image into the classification model to obtain the result of whether the image belongs to the template-class image output by the classification model;

[0165] Wherein, the classification model is obtained by training a preset model with multiple different first image samples and multiple different second image samples. Multiple first image samples belong to the template-class image, and multiple second image samples belong to the non-template-class image.

[0166] The third aspect of the embodiments of the present application further provides an electronic paper display device, which is used to execute the steps of the display method described in the first aspect.

[0167] The embodiments of the present application also provide an electronic device. Refer to Figure 8 , Figure 8 is a schematic diagram of the electronic device proposed by the embodiments of the present application. AsFigure 8 As shown in Figure 8 , the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are communicatively connected via a bus. A computer program is stored in the memory 110 and can run on the processor 120, thereby implementing the steps of the display method described in the first aspect disclosed in the embodiments of the present application.

[0168] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, the steps of the display method described in the first aspect disclosed in the embodiments of the present application are implemented.

[0169] The embodiments of the present application also provide a computer program product. When the computer program product runs on an electronic device, it causes the processor to implement the steps of the display method described in the first aspect disclosed in the embodiments of the present application. Each embodiment in this specification is described in a progressive manner, and the key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.

[0170] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the said element.

[0171] The above has introduced in detail a display method, an electronic paper display device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

[0172] Other embodiments of the present application will be readily contemplated by those skilled in the art after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include well-known knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only illustrative, and the true scope and spirit of the present application are pointed out by the following claims.

[0173] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

[0174] As used herein, the terms "one embodiment", "an embodiment", or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. In addition, note that the examples of the phrase "in one embodiment" herein do not necessarily all refer to the same embodiment.

[0175] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and technologies are not shown in detail so as not to obscure the understanding of this specification.

[0176] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A display method, characterized in that, The method includes: Obtaining an image to be displayed on a display panel; wherein, the number of color types presented by the image is more than the number of color types that the display panel can display; Performing color conversion processing on the image, where the color conversion processing is used to convert the original color of each pixel point of the image into a color adapted to the display panel; Wherein, the color conversion processing includes error diffusion processing, and the error diffusion processing includes: for a current pixel point, obtaining a color error between the original color and the converted color of the current pixel point, and using an error diffusion matrix corresponding to the current pixel point to diffuse the color error into a plurality of pixel points located around the current pixel point; Wherein, a plurality of the pixel points in the image correspond to error diffusion matrices that are not completely the same.

2. The display method according to claim 1, wherein The error diffusion matrix includes diffusion coefficients respectively corresponding to a plurality of pixel points around the current pixel point; Wherein, in the color conversion of a plurality of the pixel points in the image, the error diffusion matrix is not completely the same in at least one of the number of the diffusion coefficients and the coefficient values of the diffusion coefficients; Wherein, the number of the diffusion coefficients corresponds to the number of pixel points to which the color error is diffused.

3. The display method according to claim 1, characterized in that, The color error is diffused into at least 5 pixel points located around the current pixel point.

4. The display method according to any one of claims 1 to 3, characterized in that The error diffusion matrix includes diffusion coefficients respectively corresponding to a plurality of pixel points around the current pixel point, and the obtaining of the error diffusion matrix corresponding to the current pixel point includes: Obtaining a previous error diffusion matrix used in the previous error diffusion processing before the current error diffusion processing; Transforming the coefficient values of at least part of the diffusion coefficients in the previous error diffusion matrix to obtain the error diffusion matrix corresponding to the current pixel point; Wherein, the transformation includes randomly increasing or decreasing the coefficient values of the diffusion coefficients.

5. The display method according to any one of claims 1-3, characterized in that The obtaining of the error diffusion matrix corresponding to the current pixel point includes: Obtaining a currently generated random number; Based on the random number, obtaining the error diffusion matrix corresponding to the current pixel point from a plurality of preset grayscale error diffusion matrices.

6. The display method according to claim 1, wherein After obtaining the color error, the error diffusion processing further includes: Reducing the color error; The using the error diffusion matrix corresponding to the current pixel point to diffuse the color error into a plurality of pixel points located around the current pixel point includes: Using the error diffusion matrix corresponding to the current pixel point to diffuse the reduced color error into a plurality of pixel points located around the current pixel point.

7. The display method according to claim 6, characterized in that, The reducing the color error includes: Obtaining a currently randomly generated reduction factor, where the reduction factor is any value between 0.8 and 0.96; Based on the reduction factor, reducing the color error.

8. The display method according to claim 7, wherein Each of the pixel points in the image includes original grayscale values in a plurality of color channels, and the color error includes grayscale errors respectively corresponding to the plurality of color channels; Wherein, the based on the reduction factor, reducing the color error includes: Based on the reduction factor, reducing the grayscale errors corresponding to the current pixel point in at least part of the color channels.

9. The display method according to claim 8, wherein The current pixel has different reduction factors corresponding to different ones of the color channels.

10. The display method according to claim 1, characterized in that, Each pixel in the image includes original gray-scale values in a plurality of color channels, and the color error includes gray-scale errors respectively corresponding to the plurality of color channels; the process of obtaining the gray-scale errors includes: Based on the display color of the display panel, the current gray-scale value of the current pixel in each color channel is converted multiple times to obtain converted gray-scale values respectively corresponding to each color channel in multiple conversions; wherein, the same color channel corresponds to different converted gray-scale values in different conversions; Obtain, in each conversion, the total gray-scale difference corresponding to the current pixel, where the total gray-scale difference characterizes the overall difference between the current gray-scale values of the plurality of color channels and the converted gray-scale values; Based on the total gray-scale difference, determine the gray-scale error corresponding to the current pixel in each color channel.

11. The display method according to claim 10, wherein The determining, based on the total gray-scale difference, the gray-scale error corresponding to the current pixel in each color channel includes: Determine, from the plurality of total gray-scale differences, the minimum total gray-scale difference with the smallest value; Determine the difference between the current gray-scale value and the converted gray-scale value of each color channel corresponding to the minimum total gray-scale difference as the gray-scale error.

12. The display method according to claim 10, wherein The obtaining, in each conversion, the total gray-scale difference corresponding to the current pixel includes: Determine, in each conversion, the squared value of the difference between the current gray-scale value and the converted gray-scale value of the current pixel in each color channel; Take the sum of the squared values of the current pixel in the plurality of color channels as the total gray-scale difference.

13. The display method according to claim 1, wherein Before performing color conversion processing on the image, the method further includes: Determine whether the image belongs to a template-type image, where the color difference and / or contour difference between different elements within the template-type image is higher than the color difference and / or contour difference between different elements within a non-template-type image; Performing the color conversion processing on the image includes: If the image belongs to the template-type image, perform region segmentation on the image, and respectively convert the gray-scale levels of the pixels in the multiple regions obtained by segmentation; wherein, different regions obtained by segmentation correspond to different elements, and at least some of the pixels in the same region are converted to the same gray-scale value; If the image belongs to the non-template-type image, perform the error diffusion processing on each pixel in the image.

14. The display method according to claim 13, wherein The determining whether the image belongs to the template-type image includes: Input the image into a classification model to obtain the result of whether the image belongs to the template-type image output by the classification model; Wherein, the classification model is obtained by training a preset model with a plurality of different first image samples and a plurality of different second image samples, and the plurality of first image samples belong to the template-type image, and the plurality of second image samples belong to the non-template-type image.

15. An electronic paper display device, characterized in that, The electronic paper display device is configured to perform the steps of the display method according to any one of claims 1-14.

16. An electronic device, characterized in that, It includes a processor and a memory. The memory stores programs or instructions that can run on the processor. When the programs or instructions are executed by the processor, the steps of the display method described in any one of claims 1-14 are implemented.

17. A readable storage medium, characterized in that, Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the display method described in any one of claims 1-14 are implemented.