Method for processing images and storage medium and device thereof

The method addresses the limitation of ink screens by converting color images into target images using alternative colors like red, white, and black, ensuring effective color representation on ink screens.

JP7607588B2Active Publication Date: 2024-12-27BOE TECHNOLOGY GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2021568078
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2019-12-19
Publication Date
2024-12-27
Estimated Expiration
2039-12-19

AI Technical Summary

Technical Problem

Ink screens, commonly used in devices like e-books and e-paper, are limited to displaying only a few colors, primarily black and white, making it challenging to effectively represent color images.

Method used

A method is provided to process images by determining weightings for alternative colors based on initial pixel colors, establishing a color transformation space in the HSV color space, and performing error diffusion to convert images into target images using a limited set of alternative colors, such as red, white, and black.

Benefits of technology

The method enables the representation of color images on ink screens by transforming them into target images using a limited number of alternative colors, achieving a visually continuous tone effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007607588000056
    Figure 0007607588000056
  • Figure 0007607588000057
    Figure 0007607588000057
  • Figure 0007607588000058
    Figure 0007607588000058
Patent Text Reader

Abstract

The method includes: determining weights corresponding to alternative colors to be used for the target color based on an initial color of a pixel in the image; selecting the target color of the pixel from the alternative colors based on the weights; and converting the initial color of the pixel to the target color to obtain the target image. According to an embodiment of the present disclosure, by determining the weights of the alternative colors, the image can be converted into a target image including only alternative colors, and the target image can be represented by a limited number of alternative colors.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of image processing, and specifically to a method for processing an image, and a storage medium and device thereof. [Background technology]

[0002] In recent years, ink screens have been widely used in the display area. Ink screens are used in e-books (such as Amazon's Kindle), e-paper, e-labels, e-table cards, etc. Unlike traditional liquid crystal displays, ink screens can only display a few colors (for example, they can only display black and white). Summary of the Invention [Means for solving the problem]

[0003] An embodiment of the present disclosure provides a method for processing an image, and a storage medium and device thereof.

[0004] According to a first aspect of the present disclosure, there is provided a method for processing an image, the method including: determining weights corresponding to alternative colors to be used for a target color based on initial colors of pixels in the image, selecting the target color for the pixel from the alternative colors based on the weights, and obtaining the target image by converting the initial colors of the pixels to the target colors.

[0005] In an embodiment of the present disclosure, selecting a target color for a pixel includes determining a weighting among the weightings that has a maximum value, and selecting an alternative color corresponding to the weighting with the maximum value as the target color. In an embodiment of the present disclosure, determining the weightings includes establishing a color transformation space in the HSV color space based on the alternative colors, and determining weightings corresponding to the alternative colors in the color transformation space.

[0006] In an embodiment of the present disclosure, the alternative colors include a hue color, white, or black, and the weighting includes a first weighting corresponding to the hue color, a second weighting corresponding to the white color, and a third weighting corresponding to the black color.

[0007] In an embodiment of the present disclosure, the color transformation space is established as follows: when the S component and the V component are at maximum values, the H component has multiple end points, including a first end point and a second end point representing white, a third end point representing a color having a hue, and an odd number of additional end points representing black or white, where the first end point and the second end point divide the entire H component into a first interval and a second interval that are consecutive with each other, the third end point is in the first interval, and the additional end point is in the second interval; when the number of the additional end points is 1, the additional end point is: represents black, and if the number of additional endpoints is greater than 1, one of the two additional endpoints that are most adjacent to each other represents white and the other represents black, and the two additional endpoints that are most adjacent to the first endpoint and the second endpoint, respectively, represent black, where the color between any two endpoints that are most adjacent to each other is a gradual transformation of the colors that represent the two endpoints, and as the S component becomes gradually smaller, the color in the color transformation space is gradually transformed to white, and as the V component becomes gradually smaller, the color in the color transformation space is gradually transformed to black.

[0008] In an embodiment of the present disclosure, determining the weightings includes: when the S component and the V component are at maximum values, determining a first ratio of the alternative colors based on the H component, where a sum of the first ratios of the alternative colors is 1; determining a second ratio of the alternative colors based on the first ratio and the S component, where a sum of the second ratios of the alternative colors is 1; and determining weightings of the alternative colors based on the second ratio and the V component, where a sum of the weightings of the alternative colors is 1. In the embodiment of the present disclosure, the hue of a color having a hue in the HSV space is expressed by the following formula: H = N x 60°, Here, N is an integer, and 0≦N≦5.

[0009] In the embodiment of the present disclosure, the end points include six end points, and the H coordinates of the end points are 0°, 60°, 120°, 180°, 240°, and 300°, respectively. The hue of the color having the hue is 0°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

number

number

number

number

number

number

number

number

number

number

number

number

number

number

number

[0010] According to a second aspect of the present disclosure, there is provided a storage medium having stored thereon computer instructions which, when executed by a processor, perform a method according to the first aspect of the present disclosure.

[0011] According to a third aspect of the present disclosure, there is provided a device, the device including one or more processors, the processors configured to perform the method according to the first aspect of the present disclosure by executing computer instructions. According to an embodiment of the present disclosure, by determining weightings of the alternative colors, an image can be transformed into a target image that contains only alternative colors, and the target image can be represented with a limited number of alternative colors.

[0012] Further aspects and scope of applicability will become apparent from the description provided herein. It should be understood that the various aspects of the present application can be implemented alone or in combination with one or more other aspects. It should also be understood that the description and specific examples herein are intended for illustrative purposes and are not intended to limit the scope of the present application. [Brief description of the drawings]

[0013] The drawings described herein are for the purpose of illustrating only selected examples rather than all possible embodiments and are not intended to limit the scope of the present application. [Figure 1] 1 is a schematic flowchart of a method for processing an image according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of a color transformation space according to one embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of a color transformation space according to another embodiment of the present disclosure. [Figure 4] FIG. 2 is a schematic diagram of error diffusion from one pixel to surrounding pixels according to an embodiment of the present disclosure. [Figure 5a] 1 illustrates a method for converting an image into a target image according to an embodiment of the present disclosure. [Figure 5b]1 illustrates a method for converting an image into a target image according to an embodiment of the present disclosure. [Figure 5c] 1 illustrates a method for converting an image into a target image according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings of the embodiments of the present disclosure. It is clear that the described embodiments are only some of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by those skilled in the art without creative labor based on the described embodiments of the present disclosure belong to the scope of protection of the present disclosure. Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the drawings and the embodiments. It should be noted that, if there is no contradiction, the features in the embodiments of the present disclosure can be combined with each other.

[0015] Typically, an ink screen can only display a few colors, so in order to display a color image on an ink screen, the color image needs to be converted into a target image that contains the colors supported by the ink screen.

[0016] 1 is a schematic flow chart of a method for processing an image according to an embodiment of the present disclosure. As shown in FIG. 1, first, in step 102, a weight corresponding to an alternative color used for a target color is determined based on an initial color of a pixel in an image, then in step 104, a target color of the pixel is selected from the alternative colors based on the weight of the alternative colors, and finally, in step 106, the initial color of the pixel is converted into the target color to obtain a target image.

[0017] As can be seen from the above, by employing the method according to the embodiment of the present disclosure, an image can be converted into a target image containing only alternative colors by determining the weighting of each alternative color, and the target image can be represented by a limited number of alternative colors.

[0018] In step 104, the process of selecting the target color of the pixel includes two steps: first, determine the weighting of the alternative colors with the maximum value, and then select the alternative color corresponding to the weighting with the maximum value as the target color of the pixel. By selecting the weighting with the maximum value, the target color of the pixel can be closer to its initial color.

[0019] In the embodiment of the present disclosure, the initial color of a pixel may be represented by components of a color space. For example, the initial color of a pixel may be represented by three components R, G, and B in an RGB color space. Alternatively, the initial color of a pixel may be represented by three components H, S, and V in an HSV color space.

[0020] Those skilled in the art should understand that the initial color of a pixel can be converted from R, G, and B components in RGB color space to H, S, and V components in HSV color space. In step 102, the process of determining the weighting corresponding to the alternative color includes the following two steps: firstly, establish a color conversion space in HSV color space according to the alternative color; then, determine the weighting corresponding to the alternative color in the color conversion space.

[0021] In the embodiment of the present disclosure, the alternative colors may include a color having a hue, a white color, and a black color. In the embodiment, the weightings corresponding to the alternative colors include a first weighting corresponding to a color having a hue, a second weighting corresponding to a white color, and a third weighting corresponding to a black color. In the following embodiment, the number of alternative colors is three.

[0022] It should be understood that the number of alternative colors is not limited to the above three, and may be, for example, four (two colors with different hues, white and black). Also, the color with a hue may be any color on the H component in the HSV color space, for example, red, yellow, green, cyan, blue or magenta.

[0023] The process of establishing a color transformation space is described in detail below. Figure 2 is a schematic diagram of a color transformation space according to an embodiment of the present disclosure, and the establishment of the color transformation space includes the following three steps. First, when the S and V components are at maximum values ​​(i.e., on the circumference at the top surface corresponding to the cone shown in Figure 2), the H component has multiple end points. The multiple end points include a first end point P1 and a second end point P2 representing white, a third end point P3 representing a color having a hue, and an odd number of additional end points P'1, P'2...P' representing black or white. 2n+1 (n is an integer equal to or greater than 0). As shown in FIG. 2, the first end point P1 and the second end point P2 divide the entire H component into a first interval and a second interval that are consecutive to each other, the third end point P3 is in the first interval, and the additional end points P'1, P'2, . . . P' 2n+1 is in the second interval. When the number of additional endpoints is 1 (i.e., n is equal to 0), the additional endpoint represents black, and when the number of additional endpoints is greater than 1 (i.e., n is an integer greater than 0), one of the two additional endpoints closest to each other represents white and the other represents black, and the two additional endpoints closest to the first endpoint P1 and the second endpoint P2, respectively, represent black. As shown in FIG. 2, the additional endpoint P' closest to the first endpoint P1 represents black. 2n+1 represents black, and the additional endpoint P'1 closest to the second endpoint P2 represents black. After limiting the colors represented by the endpoints, any color between the two endpoints closest to each other is a gradual transformation of the color represented by the two endpoints. Specifically, the color between the first endpoint P1 and the third endpoint P3 may be a gradual transformation from white to a toned color, the color between the third endpoint P3 and the second endpoint P2 may be a gradual transformation from a toned color to white, the color between the second endpoint P2 and the additional endpoint P'1 may be a gradual transformation from white to black, and the color between the additional endpoint P'1 and the additional endpoint P'2 may be a gradual transformation from black to white. Based on this, the additional endpoint P' 2n and an additional endpoint P' 2n+1 The colors between may be a gradual transition from white to black, with an additional endpoint P' 2n+1and the first endpoint P1 may be a gradual transformation from black to white.So far, we have described the first step in establishing a color transformation space.

[0024] After that, when the S component gradually becomes smaller (i.e., along the reverse direction of the S component arrow shown in FIG. 2), the color in the color conversion space gradually converts to white. This is because, in the HSV color space, the S component represents the degree to which the color is close to a spectral color, where the larger the S component is, the closer the color is to a spectral color (i.e., the smaller the white light component), and the smaller the S component is, the closer the color is to white (i.e., the larger the white light component).

[0025] Finally, when the V component becomes gradually smaller (i.e., along the reverse direction of the V component arrow shown in FIG. 2), the color in the color conversion space is gradually converted to black, because in the HSV color space, the V component represents the brightness of the color, where the smaller the V component is, the closer the color is to black, and the larger the V component is, the closer the color is to white.

[0026] So far, the process of establishing a color conversion space from HSV color space has been described.

[0027] Next, consider how to determine the weightings corresponding to the alternative colors in the established color conversion space. First, when the S component and the V component are at the maximum value, a first ratio of the alternative colors is determined based on the H component, where the sum of the first ratios of the alternative colors is 1, for example, the sum of the first ratio of the color having a hue, the first ratio of the white color, and the first ratio of the black color is 1. After this, a second ratio of the alternative colors is determined based on the determined first ratio and the S component, where the sum of the second ratios of the alternative colors is 1, for example, the sum of the second ratio of the color having a hue, the second ratio of the white color, and the second ratio of the black color is 1. Finally, a weighting corresponding to the alternative colors is determined based on the determined second ratio and the V component, where the sum of the weightings of the alternative colors is 1, for example, the sum of the first weighting corresponding to the color having a hue, the second weighting corresponding to the white color, and the third weighting corresponding to the black color is 1.

[0028] In an embodiment of the present disclosure, the hue of a color having a hue in the HSV space may be expressed by the following formula: H = N x 60°, Here, N is an integer, and 0≦N≦5. Specifically, when H is 0° (i.e., N=0), it represents red, when H is 60° (i.e., N=1), it represents yellow, when H is 120° (i.e., N=2), it represents green, when H is 180° (i.e., N=3), it represents cyan, when H is 240° (i.e., N=4), it represents blue, and when H is 300°, it represents magenta.

[0029] In the embodiment of the present disclosure, the endpoints may include six endpoints (e.g., P1, P2, P3, P'1, P'2, P'3), and the H coordinates of the six endpoints may be 0°, 60°, 120°, 180°, 240°, and 300°. Hereinafter, an example in which the endpoints include six endpoints will be taken for a detailed description.

[0030] In one embodiment of the present disclosure, the hue of the color having a hue is 0°, that is, the color having a hue is red. In this embodiment, the color conversion space shown in FIG. 3 can be established. Specifically, when the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 300° and 60°, respectively, the H coordinate of the third end point P3 representing red is 0°, the H coordinate of the additional end point P'1 representing black is 120°, the H coordinate of the additional end point P'2 representing white is 180°, and the H coordinate of the additional end point P'3 representing black is 240°, and the color between any two end points closest to each other is the gradual transformation of the color representing the two end points. When the S component is gradually reduced, the color in the color conversion space is gradually converted to white. When the V component is gradually reduced, the color in the color conversion space is gradually converted to black.

[0031] In this embodiment, a first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0032] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are red, white and black.

[0033] In another embodiment of the present disclosure, the hue of the color having a hue is 60°, that is, the color having a hue is yellow. In this embodiment, the color conversion space can be established as follows. When the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 0° and 120°, respectively, the H coordinate of the third end point P3 representing yellow is 60°, the H coordinate of the additional end point P'1 representing black is 180°, the H coordinate of the additional end point P'2 representing white is 240°, and the H coordinate of the additional end point P'3 representing black is 300°, and the color between any two end points closest to each other is a gradual transformation of the color representing the two end points. When the S component becomes gradually smaller, the color in the color conversion space is gradually transformed to white. When the V component becomes gradually smaller, the color in the color conversion space is gradually transformed to black.

[0034] In this embodiment, a first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0035] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are yellow, white and black.

[0036] In yet another embodiment of the present disclosure, the hue of the color having a hue is 120°, that is, the color having a hue is green. In this embodiment, the color conversion space can be established as follows. When the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 60° and 180°, respectively, the H coordinate of the third end point P3 representing green is 120°, the H coordinate of the additional end point P'1 representing black is 240°, the H coordinate of the additional end point P'2 representing white is 300°, and the H coordinate of the additional end point P'3 representing black is 0°, and the color between any two end points closest to each other is a gradual transformation of the color representing the two end points. When the S component becomes gradually smaller, the color in the color conversion space is gradually transformed to white. When the V component becomes gradually smaller, the color in the color conversion space is gradually transformed to black.

[0037] In this embodiment, a first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0038] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are green, white and black.

[0039] In yet another embodiment of the present disclosure, the hue of the color having a hue is 180°, that is, the color having a hue is cyan. In this embodiment, the color conversion space can be established as follows. When the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 120° and 240°, respectively, the H coordinate of the third end point P3 representing green is 180°, the H coordinate of the additional end point P'1 representing black is 300°, the H coordinate of the additional end point P'2 representing white is 0°, and the H coordinate of the additional end point P'3 representing black is 60°, and the color between any two end points closest to each other is a gradual transformation of the color representing the two end points. When the S component becomes gradually smaller, the color in the color conversion space is gradually transformed to white. When the V component becomes gradually smaller, the color in the color conversion space is gradually transformed to black.

[0040] In this embodiment, the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0041] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are cyan, white and black.

[0042] In yet another embodiment of the present disclosure, the hue of the color having a hue is 240°, that is, the color having a hue is blue. In this embodiment, the color conversion space can be established as follows. When the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 180° and 300°, respectively, the H coordinate of the third end point P3 representing blue is 240°, the H coordinate of the additional end point P'1 representing black is 0°, the H coordinate of the additional end point P'2 representing white is 60°, and the H coordinate of the additional end point P'3 representing black is 120°, and the color between any two end points closest to each other is a gradual transformation of the color representing the two end points. When the S component becomes gradually smaller, the color in the color conversion space is gradually transformed to white. When the V component becomes gradually smaller, the color in the color conversion space is gradually transformed to black.

[0043] In this embodiment, the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0044] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are blue, white and black.

[0045] In yet another embodiment of the present disclosure, the hue of the color having a hue is 300°, that is, the color having a hue is magenta. In this embodiment, the color conversion space can be established as follows. When the S component and the V component are at the maximum value, the H coordinates of the first end point P1 and the second end point P2 representing white are 0° and 240°, respectively, the H coordinate of the third end point P3 representing magenta is 300°, the H coordinate of the additional end point P'1 representing black is 60°, the H coordinate of the additional end point P'2 representing white is 120°, and the H coordinate of the additional end point P'3 representing black is 180°, and the color between any two end points closest to each other is a gradual transformation of the color representing the two end points. When the S component becomes gradually smaller, the color in the color conversion space is gradually transformed to white. When the V component becomes gradually smaller, the color in the color conversion space is gradually transformed to black.

[0046] In this embodiment, the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows:

number

number

number

[0047] Thus far, the embodiment can obtain the first weighting, the second weighting and the third weighting when the alternative colors are magenta, white and black.

[0048] For the HSV color space, max and V max It should be understood that the values ​​of may all be 1.

[0049] After obtaining the first weighting, the second weighting, and the third weighting, the weighting having the maximum value is determined, and the alternative color corresponding to the weighting having the maximum value is selected as the target color. It should be understood that after determining the target color of a pixel, the value of the RGB components of the pixel can be set to the value of the RGB components corresponding to the target color. For example, in an embodiment where the alternative colors are red, white, and black, if the value of the first weighting corresponding to red is the maximum, red is selected as the target color of the pixel, and the value of the RGB components of the pixel is set to (255, 0, 0).

[0050] In the embodiment of the present disclosure, after the target color of a pixel is determined, error diffusion is performed on the pixel. Figure 4 is a schematic diagram of error diffusion from one pixel to surrounding pixels according to the embodiment of the present disclosure, and the error diffusion is based on the Floyd-Steinberg filter. As shown in Figure 4, the error value between the initial color of the pixel 110 and the target color is diffused to the surrounding pixels 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132 and 134. As shown in FIG. 4 , pixel 112 receives 7 / 48 of the error value from pixel 110, pixel 114 receives 5 / 48 of the error value from pixel 110, pixel 116 receives 3 / 48 of the error value from pixel 110, pixel 118 receives 5 / 48 of the error value from pixel 110, pixel 120 receives 7 / 48 of the error value from pixel 110, pixel 122 receives 5 / 48 of the error value from pixel 110, pixel 124 receives 3 / 48 of the error value from pixel 110, pixel 126 receives 1 / 48 of the error value from pixel 110, pixel 128 receives 3 / 48 of the error value from pixel 110, pixel 130 receives 5 / 48 of the error value from pixel 110, pixel 132 receives 3 / 48 of the error value from pixel 110, and pixel 134 receives 1 / 48 of the error value from pixel 110. By performing error diffusion on the pixels, the target image has a better visual effect. Note that, when performing error diffusion, the initial color of each pixel described above in this disclosure is an initial color that takes into account the diffusion error from the surrounding pixels, for example, using error diffusion to modify the initial color of the pending pixel before determining the target color of the pending pixel.

[0051] Those skilled in the art should also understand that error diffusion can also be based on a JF Jarvis filter, a Burkes filter or a Stucki filter.

[0052] 5a to 5c show a method of converting an image into a target image according to an embodiment of the present disclosure. The left side of FIG. 5a to 5c shows the image before processing, and the right side shows the target image after processing. The colors of the target image include red, black and white, and the pixels in the target image undergo error diffusion based on the Floyd-Steinberg filter. As shown in FIG. 5a to 5c, by expressing the target image with a limited number of alternative colors, the target image can achieve a visually continuous tone effect, which results in a good visual effect.

[0053] In another embodiment of the present disclosure, there is further provided a storage medium having stored thereon computer instructions, which, when executed by a processor, perform a method for processing an image according to the present disclosure.

[0054] In another embodiment of the present disclosure, there is further provided a device, which may include one or more processors, where the processors are configured to perform a method for processing an image according to the present disclosure by executing computer instructions.

[0055] Although the specific examples of the present disclosure have been described above, the scope of the present disclosure is not limited thereto. Various modifications and changes can be made to the present disclosure by those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure are intended to be included in the scope of the present disclosure. [Explanation of symbols]

[0056] P1 first end point P2 second end point P3 third end point H H component in HSV color space S S component in HSV color space V V component in HSV color space

Claims

1. 1. A method for processing an image, comprising: determining weights corresponding to alternative colors to be used for a target color based on initial colors of pixels in the image; selecting a target color for the pixel from the alternative colors based on the weighting; and and obtaining a target image by converting the initial colors of the pixels to the target colors; Selecting the target color for the pixel comprises: determining the weighting having the largest value among said weightings; selecting the alternative color corresponding to the weighting having the maximum value as the target color; Including, Determining the weightings includes: establishing a color transformation space in HSV color space based on the alternative colors; determining the weightings corresponding to the alternative colors in the color transformation space; Including, the alternative color includes a color having a hue, white, or black, and the weighting includes a first weighting corresponding to the color having the hue, a second weighting corresponding to the white, and a third weighting corresponding to the black; The color transformation space is established as follows: When the S and V components are at their maximum values, the H component has a plurality of endpoints, including a first endpoint and a second endpoint representing a white color, a third endpoint representing a color having the hue, and an odd number of additional endpoints representing black or white, where the first endpoint and the second endpoint are: dividing an entire H component into a first interval and a second interval that are consecutive with each other, the third end point being in the first interval and the additional end point being in the second interval, when the number of the additional end points is 1, the additional end point represents a black color, when the number of the additional end points is greater than 1, one of the two additional end points that are most adjacent to each other represents a white color and the other represents a black color, and the two additional end points that are most adjacent to the first end point and the second end point, respectively, represent a black color, wherein a color between any two end points that are most adjacent to each other is a gradual transformation of the colors that represent the two end points; When the S component becomes gradually smaller, the color in the color conversion space is gradually converted to white, When the V component becomes gradually smaller, the color in the color conversion space is gradually converted to black; Determining the weightings includes: determining a first ratio of the alternative colors based on the H component when the S component and the V component are at a maximum value, where the sum of the first ratios of the alternative colors is 1; determining second ratios of the alternative colors based on the first ratios and an S component, where a sum of the second ratios of the alternative colors is 1; determining the weights of the alternative colors based on the second ratio and a V component, where the sum of the weights of the alternative colors is 1; A method for processing an image.

2. The H in the HSV space of a color having the above hue is expressed by the following formula: H = N x 60°, where N is an integer and 0≦N≦5. The method of claim 1.

3. The method of claim 2 , wherein the end points include six end points, and the H coordinates of the end points are 0°, 60°, 120°, 180°, 240°, and 300°, respectively.

4. In the HSV space, H of the color having the hue is 0°, and the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: [0010] where the second ratio r 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, [0025] and Here, the first weighting r corresponding to red 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, [0030] and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

5. The H in the HSV space of the color having the hue is 60°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: [0045] where the second ratio r 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, [0050] and Here, the first weighting r corresponding to yellow 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, [006] and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

6. The H in the HSV space of the color having the hue is 120°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: [0070] where the second ratio r 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, [0080] and Here, the first weighting r corresponding to green 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, [0090] and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

7. In the HSV space, H of the color having the hue is 180°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: [0089] where the second ratio r corresponding to cyan is 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, ##EQU00011## and Here, the first weighting r corresponding to cyan 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, ##EQU00012## and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

8. In the HSV space, H of the color having the hue is 240°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: ##EQU00013## where the second ratio r 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, ##EQU14## and Here, the first weighting r corresponding to blue 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, ##EQU00015## and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

9. The H of the color having the hue in the HSV space is 300°, where the first ratio r 11 , the first ratio r corresponding to white 21 , and the first ratio r corresponding to black 31 is expressed as follows: ##EQU00016## where the second ratio r corresponding to magenta is 12 , the second ratio r corresponding to white 22 , the second ratio r corresponding to black 32 is expressed by the following formula, that is, ##EQU00017## and Here, the first weighting r corresponding to magenta 13 , the second weighting r corresponding to white 23 , the third weighting r corresponding to black 33 is expressed by the following formula, that is, [0018] and Here, the S max represents the maximum value of the S component, and V max represents the maximum value of the V component, The method according to claim 3.

10. and performing error diffusion on the pixel after determining the target color for the pixel.

10. The method according to any one of claims 4 to 9.

11. The method of claim 10, wherein the error diffusion is based on a Floyd-Steinberg filter.

12. A storage medium having stored thereon computer instructions which, when executed by a processor, perform the method of any one of claims 1 to 11.

13. A device comprising one or more processors, the processors being configured to carry out the method of any one of claims 1 to 11 by executing computer instructions.

Citation Information

Patent Citations

  • Page color adjusting method and device and electronic equipment

    CN110377860A

  • Image processing method and device for electronic ink screen and electronic ink screen

    CN110570380A

  • Methods and systems for controlling interferometric modulators of reflective display devices

    US20160335943A1