Mobile terminal and image display method thereof

By determining the grayscale threshold based on the initial grayscale value of the pixel point of the grayscale image in the processor of the mobile terminal and updating the initial grayscale value, the problem of poor display effect after conversion of high grayscale series images is solved, and a more natural color transition and a better user experience is achieved.

CN115033199BActive Publication Date: 2025-03-18QINGDAO HISENSE MOBILE COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110237295.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-03
Publication Date
2025-03-18
Estimated Expiration
2041-03-03

AI Technical Summary

Technical Problem

When existing mobile terminals convert grayscale images with high grayscale levels to low grayscale levels, the display effect is poor, the color transition is unnatural, and the user experience is poor.

Method used

In the processor of the mobile terminal, the grayscale threshold is determined based on the initial grayscale values ​​of the multiple pixel points of the grayscale image, and the initial grayscale value of the untraversed pixel points is updated based on the threshold value and the initial grayscale value, and the electronic ink screen is then controlled to display the grayscale image with a low grayscale number.

Benefits of technology

Ensure that the converted low-grayscale grayscale image has a good display effect, and the color transition is natural, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033199B_ABST
    Figure CN115033199B_ABST
Patent Text Reader

Abstract

The present application discloses a mobile terminal and an image display method thereof, and relates to the field of image display technology. The mobile terminal can determine a grayscale threshold based on the initial grayscale values ​​of a plurality of pixels included in a grayscale image of a first grayscale level, and then can determine the grayscale value error of each pixel based on the grayscale threshold and the initial grayscale value, and update the initial grayscale value of the pixel located in the neighborhood of the pixel and not traversed based on the grayscale value error. Since the grayscale threshold is determined based on the initial grayscale values ​​of a plurality of pixels, the determined grayscale threshold can be adapted to the current grayscale image, thereby ensuring that the subsequent grayscale image of the second grayscale level converted based on the grayscale threshold has a better display effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and in particular to a mobile terminal and an image display method thereof. Background Art

[0002] The mobile terminal can convert a grayscale image with a higher grayscale level (also called a grayscale image) into a grayscale image with a lower grayscale level, and control its electronic ink screen to display the grayscale image with a lower grayscale level, so as to improve the efficiency of the mobile terminal in displaying images. Summary of the invention

[0003] The present application provides a mobile terminal and an image display method thereof, and the technical solution is as follows:

[0004] In one aspect, a mobile terminal is provided, the mobile terminal comprising a processor and an electronic ink screen; the processor is used to:

[0005] Determining a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in the grayscale image of the first grayscale level;

[0006] Traversing a plurality of pixel points of the grayscale image of the first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value of the pixel point and the grayscale threshold, wherein the second grayscale level is smaller than the first grayscale level;

[0007] Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0008] Based on the target grayscale value of each pixel, the electronic ink screen is controlled to display the grayscale image of the second grayscale level.

[0009] Optionally, the grayscale threshold is positively correlated with initial grayscale values ​​of the multiple pixel points.

[0010] Optionally, the processor is used to:

[0011] An average value of the initial grayscale values ​​of the plurality of pixels is determined as a grayscale threshold.

[0012] Optionally, the processor is used to:

[0013] The initial grayscale values ​​of the plurality of pixels are processed using the Otsu algorithm to obtain a grayscale threshold.

[0014] Optionally, the processor is used to:

[0015] Determining a grayscale threshold based on an initial grayscale value of each pixel point included in the grayscale image of the first grayscale level;

[0016] Alternatively, for each pixel among the multiple pixels, the grayscale threshold corresponding to the pixel is determined based on the initial grayscale values ​​of each pixel in the neighborhood of the pixel, and for each traversed pixel, the target grayscale value of the pixel at the second grayscale level is determined based on the initial grayscale value of the pixel and the grayscale threshold corresponding to the pixel.

[0017] Optionally, the second gray level number is 2; and the processor is used for:

[0018] If the initial grayscale value of the pixel is greater than or equal to the grayscale threshold, the first target value is determined as the target grayscale value of the pixel;

[0019] If the initial grayscale value of the pixel is less than the grayscale threshold, the second target value is determined as the target grayscale value of the pixel;

[0020] Wherein, the first target value is greater than the second target value.

[0021] Optionally, the grayscale image includes a plurality of pixels arranged in an array; and the processor is used for:

[0022] Traversing the pixels in the grayscale image row by row;

[0023] For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and a first proportion;

[0024] For a second target pixel located in the next row of the pixel and in the previous column of the pixel, increasing the initial grayscale value of the second target pixel by a second value, where the second value is the product of the grayscale value error of the pixel and a second proportion;

[0025] For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and a third proportion;

[0026] For a fourth target pixel located in the next row and next column of the pixel, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and a fourth proportion.

[0027] Optionally, the third proportion and the fourth proportion are both smaller than the first proportion, and the first proportion is smaller than the second proportion.

[0028] Optionally, the third proportion and the fourth proportion are both 2 / 16, the first proportion is 5 / 16, and the second proportion is 7 / 16.

[0029] In another aspect, a mobile terminal is provided, the mobile terminal comprising a processor and an electronic ink screen; the processor is used for:

[0030] Traversing a plurality of pixel points of a grayscale image of a first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the first grayscale level is 256, the second grayscale level is 2, and the grayscale threshold is greater than or equal to 144 and less than or equal to 240;

[0031] Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0032] Based on the target grayscale value of each pixel, the electronic ink screen is controlled to display the grayscale image of the second grayscale level.

[0033] In another aspect, a method for displaying an image in a mobile terminal is provided, wherein the mobile terminal includes an electronic ink screen; the method includes:

[0034] Determining a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in the grayscale image of the first grayscale level;

[0035] Traversing a plurality of pixel points of the grayscale image of the first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value of the pixel point and the grayscale threshold, wherein the second grayscale level is smaller than the first grayscale level;

[0036] Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0037] Based on the target grayscale value of each pixel, the grayscale image of the second grayscale level is displayed on the electronic ink screen.

[0038] In another aspect, a method for displaying an image of a mobile terminal is provided, wherein the mobile terminal includes an electronic ink screen; the method includes:

[0039] Traversing a plurality of pixel points of a grayscale image of a first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the first grayscale level is 256, the second grayscale level is 2, and the grayscale threshold is greater than or equal to 144 and less than or equal to 240;

[0040] Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0041] Based on the target grayscale value of each pixel, the grayscale image of the second grayscale level is displayed on the electronic ink screen.

[0042] On the other hand, a mobile terminal is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image display method of the mobile terminal as described in the above aspects when executing the computer program.

[0043] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the image display method of the mobile terminal as described in the above aspects is implemented.

[0044] On the other hand, a computer program product comprising instructions is provided, and when the computer program product is run on the computer, the computer is enabled to execute the image display of the mobile terminal described in the above aspect.

[0045] The beneficial effects of the technical solution provided by this application include at least:

[0046] The present application provides a mobile terminal and an image display method thereof, wherein the mobile terminal can determine a grayscale threshold based on the initial grayscale values ​​of a plurality of pixels included in a grayscale image of a first grayscale level, and then determine the grayscale value error of each pixel based on the grayscale threshold and the initial grayscale value, and update the initial grayscale values ​​of pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error. Since the grayscale threshold is determined based on the initial grayscale values ​​of a plurality of pixels, the determined grayscale threshold can be adapted to the current grayscale image, thereby ensuring that the display effect of the grayscale image of the second grayscale level obtained by subsequent conversion based on the grayscale threshold is better.

[0047] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 is a flow chart of an image display method for a mobile terminal provided in an embodiment of the present application;

[0050] Figure 2 is a flow chart of another image display method for a mobile terminal provided in an embodiment of the present application;

[0051] Figure 3 It is a flow chart of a method provided in an embodiment of the present application for updating the initial grayscale value of a target pixel point located in the neighborhood of the pixel point and being traversed based on the grayscale value error of the pixel point;

[0052] Figure 4 is a schematic diagram of the positional relationship of pixels in a grayscale image provided by an embodiment of the present application;

[0053] Figure 5 It is a schematic diagram of a 2-grayscale image converted from a 256-grayscale image in the related art;

[0054] Figure 6 is a schematic diagram of a 2-grayscale image provided in an embodiment of the present application;

[0055] Figure 7 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application;

[0056] Figure 8 is another schematic diagram of a 2-grayscale image converted from a 256-grayscale image in the related art;

[0057] Fig. 9 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application;

[0058] Fig.10 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application;

[0059] Fig.11 is a flowchart of another image display method for a mobile terminal provided in an embodiment of the present application;

[0060] Fig.12 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application;

[0061] Fig.13 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application;

[0062] Fig.14 is a structural schematic diagram of a mobile terminal provided in an embodiment of the present application;

[0063] Fig.15 It is a software structure block diagram of a mobile terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0065] In the related art, the process of converting a grayscale image with a higher grayscale level (e.g., a 256-level grayscale image, also referred to as a 256-grayscale image) into a grayscale image with a lower grayscale level (e.g., a 2-level grayscale image, also referred to as a 2-grayscale image) by a mobile terminal may include: for each pixel in the 256-grayscale image, if the mobile terminal determines that the grayscale value of the pixel is greater than or equal to a pre-stored fixed grayscale threshold of 128, the mobile terminal may update the grayscale value of the pixel to a first value. If the grayscale value of the pixel is less than 128, the mobile terminal may update the grayscale value of the pixel to a second value. Afterwards, after obtaining the updated grayscale value of each pixel, the mobile terminal can display the 2-grayscale image. Among them, the first value is greater than the second value, for example, the first value can be 255 or 1, and the second value can be 0.

[0066] However, there are a large number of black and white blocks in the 2-grayscale image converted by the method in the related art, resulting in no obvious transition between the various areas in the 2-grayscale image. In addition, after converting the 256-grayscale image to a 2-grayscale image, some areas in the obtained 2-grayscale image will have a black and white phenomenon, that is, there are jagged edges in some areas of the 2-grayscale image (for example, one side of a straight line is jagged). It can be seen that the 2-grayscale image obtained by the method in the related art is unnatural and has a poor display effect, which leads to a poor user experience for users of the mobile terminal.

[0067] The present application embodiment provides an image display method for a mobile terminal, which can be applied to a mobile terminal. The mobile terminal may include an electronic ink screen. Optionally, the mobile terminal may be a mobile phone, a tablet computer, a laptop computer, or a wearable device, for example, the mobile terminal may be a mobile phone. Figure 1 , the method may include:

[0068] Step 101: Determine a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in a grayscale image of a first grayscale level.

[0069] The mobile terminal may acquire a grayscale image of a first grayscale level to be displayed, the grayscale image may include a plurality of pixels, and the mobile terminal may determine a grayscale threshold based on initial grayscale values ​​of the plurality of pixels.

[0070] Since the grayscale threshold is determined based on the initial grayscale values ​​of multiple pixels included in the grayscale image of the first grayscale level, the grayscale threshold can change dynamically as the grayscale image changes. Compared with the grayscale threshold being a fixed value in the related art, the grayscale threshold determined by the mobile terminal provided in the embodiment of the present application can be adapted to the current grayscale image, thereby ensuring that the display effect of the grayscale image of the second grayscale level obtained by subsequent conversion based on the grayscale threshold is good, thereby effectively improving the user experience.

[0071] Step 102: traverse a plurality of pixel points of the grayscale image of the first grayscale level, and for each traversed pixel point, determine a target grayscale value of the pixel point at the second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point.

[0072] After determining the grayscale threshold, the mobile terminal can traverse multiple pixel points of the grayscale image of the first grayscale level. For each traversed pixel point, the mobile terminal can determine the target grayscale value of the pixel point at the second grayscale level based on the initial grayscale value and the grayscale threshold of the pixel point.

[0073] Among them, the second grayscale number can be smaller than the first grayscale number. For example, the first grayscale number can be 256, and the second grayscale number can be 2. The grayscale number of a grayscale image can refer to the number of different levels of grayscale that can be displayed by each pixel in the grayscale image. Therefore, the higher the grayscale number of a grayscale image, the more grayscale levels the grayscale image can display, and the better the display effect of the grayscale image. For example, if the grayscale number of a grayscale image is 256, each pixel in the grayscale image can display 256 different levels of grayscale, that is, the grayscale value of each pixel can range from 0 to 255. If the grayscale number of a grayscale image is 2, each pixel in the grayscale image can display 2 different levels of grayscale.

[0074] Step 103: Based on the gray value error of the pixel, the initial gray value of the target pixel that is located in the area of ​​the pixel and has not been traversed is updated.

[0075] After determining the target grayscale value of the pixel, the mobile terminal can determine the grayscale value error of the pixel based on the initial grayscale value and the target grayscale value of the pixel. Then, the mobile terminal can update the initial grayscale value of the target pixel that is located in the area of ​​the pixel and has not been traversed based on the grayscale value error.

[0076] The grayscale value error is the difference between the initial grayscale value and the target grayscale value.

[0077] Step 104: Based on the target grayscale value of each pixel, a grayscale image of a second grayscale level is displayed on the electronic ink screen.

[0078] After obtaining the target grayscale value in each pixel, the mobile terminal can display a grayscale image of the second grayscale level on its electronic ink screen.

[0079] In summary, the embodiment of the present application provides an image display method for a mobile terminal, wherein the mobile terminal can determine a grayscale threshold based on the initial grayscale values ​​of multiple pixels included in a grayscale image of a first grayscale level, and then determine the grayscale value error of each pixel based on the grayscale threshold and the initial grayscale value, and update the initial grayscale values ​​of pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error. Since the grayscale threshold is determined based on the initial grayscale values ​​of multiple pixels, the determined grayscale threshold can be adapted to the current grayscale image, thereby ensuring that the display effect of the grayscale image of the second grayscale level obtained by subsequent conversion based on the grayscale threshold is better.

[0080] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level.

[0081] In the embodiment of the present application, the first grayscale number may be greater than the second grayscale number, for example, the first grayscale number may be 256, 128 or 64, and the second grayscale number may be 16, 4 or 2. The embodiment of the present application takes the first grayscale number as 256 and the second grayscale number as 2 as an example to illustrate the image display method of the mobile terminal provided by the embodiment of the present application. The method can be applied to a mobile terminal, which may include an electronic ink screen. Figure 2 , the method may include:

[0082] Step 201: Determine a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in a grayscale image of a first grayscale level.

[0083] The mobile terminal may acquire a grayscale image of a first grayscale level to be displayed, the grayscale image may include a plurality of pixels, and the mobile terminal may determine a grayscale threshold based on initial grayscale values ​​of the plurality of pixels.

[0084] In an embodiment of the present application, there may be multiple ways for a mobile terminal to determine a grayscale threshold based on the initial grayscale values ​​of multiple pixel points. The embodiment of the present application takes the following optional implementation methods as examples to exemplify the process of a mobile terminal determining a grayscale threshold based on the initial grayscale values ​​of multiple pixel points.

[0085] In a first optional implementation, the mobile terminal may determine the average value of the initial grayscale values ​​of the plurality of pixels as the grayscale threshold. That is, the grayscale threshold T may satisfy the following formula:

[0086]

[0087] In formula (1), m is the number of rows of the grayscale image, n is the number of columns of the grayscale image, and V(i,j) is the initial grayscale value of the pixel in the i-th row and j-th column of the grayscale image.

[0088] In this case, the grayscale threshold determined by the mobile terminal is positively correlated with the initial grayscale values ​​of the multiple pixels. That is, if the initial grayscale values ​​of the multiple pixels are larger, the grayscale threshold is larger. If the initial grayscale values ​​of the multiple pixels are smaller, the grayscale threshold is smaller.

[0089] In a second optional implementation, the mobile terminal may use the sauvola algorithm to process the initial grayscale values ​​of the plurality of pixels, thereby obtaining a grayscale threshold. The process of the mobile terminal using the sauvola algorithm to determine the grayscale threshold may include:

[0090] The mobile terminal may traverse a plurality of pixel points of the grayscale image of the first grayscale level, and for each traversed pixel point, the mobile terminal determines the grayscale mean and grayscale standard deviation of the grayscale values ​​of all pixel points in the neighborhood of the pixel point with the pixel point as the center. Then, the mobile terminal determines the grayscale threshold of the pixel point based on the grayscale mean and grayscale standard deviation.

[0091] The neighborhood of the pixel point may refer to a rectangular area with the pixel point as the center, the first target number of pixels as the length of the long side, and the second target number of pixels as the length of the short side. The first target number of pixels and the second target number of pixels may be equal. The grayscale threshold T(x, y) satisfies the following formula:

[0092]

[0093] In formula (2), m(x, y) is the grayscale mean of all pixels in the domain of the pixel, and s(x, y) is the standard deviation of all pixels in the domain of the pixel. K is used to indicate the dynamic range of the standard deviation. R is a correction parameter. Both K and R can be pre-stored in the mobile terminal.

[0094] In this case, the mobile terminal can determine a grayscale threshold for each pixel in the grayscale image, and the grayscale threshold of the pixel is positively correlated with the initial grayscale values ​​of multiple pixels in the neighborhood of the pixel. That is, if the initial grayscale values ​​of multiple pixels in the neighborhood are larger, the grayscale threshold of the pixel is larger. If the initial grayscale values ​​of multiple pixels in the neighborhood are smaller, the grayscale threshold of the pixel is smaller.

[0095] In a third optional implementation, the mobile terminal may use the Otsu algorithm (also known as the maximum inter-class variance method) to process the initial grayscale values ​​of the multiple pixels, thereby obtaining a grayscale threshold.

[0096] In an embodiment of the present application, the process in which the mobile terminal uses the Otsu algorithm to process the initial grayscale values ​​of multiple pixels to obtain a grayscale threshold may include: the mobile terminal may use the multiple initial grayscale values ​​under the first grayscale level as a segmentation threshold, and divide the grayscale image of the first grayscale level into a foreground image and a background image. The initial grayscale value of each of the multiple pixels included in the foreground image may be less than or equal to the segmentation threshold, and the initial grayscale value of each of the multiple pixels included in the background image may be greater than the segmentation threshold.

[0097] Then, for the foreground image and the background image obtained by dividing based on each segmentation threshold, the mobile terminal can determine the inter-class variance of the background image and the foreground image, thereby obtaining multiple inter-class variances. Afterwards, the mobile terminal can determine the segmentation threshold corresponding to the largest inter-class variance among the multiple inter-class variances as the grayscale threshold.

[0098] Among them, the inter-class variance of the background image and the foreground image can satisfy the following formula:

[0099] G=w0×w1×(μ0-μ1) 2 Formula (3)

[0100] In formula (3), w0 is the ratio of the multiple pixels included in the foreground image to all the pixels included in the grayscale image, that is, the proportion of the multiple pixels included in the foreground image in the grayscale image. w1 is the ratio of the multiple pixels included in the background image to all the pixels included in the grayscale image, that is, the proportion of the multiple pixels included in the background image in the grayscale image. μ0 is the mean of the grayscale values ​​of the multiple pixels included in the foreground image. μ1 is the mean of the grayscale values ​​of the multiple pixels included in the background image.

[0101] Step 202: traverse a plurality of pixel points of the grayscale image of the first grayscale level, and for each traversed pixel point, detect whether the initial grayscale value of the pixel point is less than the grayscale threshold.

[0102] After determining the grayscale threshold, the mobile terminal may traverse a plurality of pixel points of the grayscale image of the first grayscale level, and for each traversed pixel point, the mobile terminal may detect whether the initial grayscale value of the pixel point is less than the grayscale threshold. If the mobile terminal determines that the initial grayscale value of the pixel point is greater than or equal to the grayscale threshold, the following step 203 may be executed. If the mobile terminal determines that the initial grayscale value of the pixel point is less than the grayscale threshold, the following step 204 may be executed.

[0103] Optionally, the grayscale image includes a plurality of pixels arranged in an array. The mobile terminal may traverse the grayscale image row by row, or may traverse the grayscale image column by column. For example, the mobile terminal may traverse the grayscale image row by row.

[0104] Step 203: determine the first target value as the target grayscale value of the pixel at the second grayscale level.

[0105] If the mobile terminal determines that the initial grayscale value of the pixel is greater than or equal to the grayscale threshold, the first target value may be determined as the target grayscale value of the pixel.

[0106] Among them, the second grayscale number can be less than the first grayscale number, and the second grayscale number and the first target value can be pre-stored in the mobile terminal. For example, the first grayscale number is 256, and the second grayscale number can be 2. The grayscale number of a grayscale image can refer to the number of different levels of grayscale that can be displayed by each pixel in the grayscale image. Therefore, the higher the grayscale number of a grayscale image, the more grayscale levels that can be displayed by the grayscale image, and the better the display effect of the grayscale image. For example, if the grayscale number of a grayscale image is 256, each pixel in the grayscale image can display 256 different levels of grayscale, that is, the grayscale value of each pixel can range from 0 to 255. If the grayscale number of a grayscale image is 2, each pixel in the grayscale image can display 2 different levels of grayscale.

[0107] For example, assuming that the second grayscale level is 2, the first target value is 255, the mobile terminal determines the grayscale threshold to be 190, and the initial grayscale value of a certain pixel point traversed is 220. Since 220 is greater than 190, the mobile terminal can determine that the initial grayscale value of the pixel point is greater than the grayscale threshold, and then can determine 255 as the target grayscale value of the pixel point.

[0108] Step 204: determine the second target value as the target grayscale value of the pixel at the second grayscale level.

[0109] If the mobile terminal determines that the initial grayscale value of the pixel is less than the grayscale threshold, the second target value may be determined as the target grayscale value of the pixel, wherein the second target value may be pre-stored in the mobile terminal and is less than the first target value.

[0110] For example, continuing with the example that the second grayscale level is 2 and the grayscale threshold is 190, assuming that the second target value is 0, the initial grayscale value of a certain pixel traversed by the mobile terminal is 180. Since 180 is less than 190, the mobile terminal can determine that the initial grayscale value of the pixel is less than the grayscale threshold, and then can determine 0 as the target grayscale value of the pixel.

[0111] Step 205: Based on the gray value error of the pixel, the initial gray value of the target pixel that is within the region of the pixel and has not been traversed is updated.

[0112] For each pixel point traversed, after obtaining the target grayscale value of the pixel point, the mobile terminal can determine the grayscale value error of the pixel point based on the target grayscale value of the pixel point. Afterwards, the mobile terminal can update the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed based on the grayscale value error of the pixel point. That is, the mobile terminal can transfer the error of the pixel point to the target pixel point that is adjacent to the pixel point and has not been traversed, so as to update the initial grayscale value of the target pixel point.

[0113] The grayscale value error can be the difference between the initial grayscale value of the pixel and the target grayscale value of the pixel. That is, the grayscale value error e satisfies the following formula:

[0114] e=XV Formula (4)

[0115] In formula (3), X is the initial gray value of the pixel, and V is the target gray value of the pixel.

[0116] In the embodiment of the present application, if the mobile terminal traverses the pixels in the grayscale image row by row, and for each row of pixels in the grayscale image, the mobile terminal can traverse the pixels in the row column by column, for example, it can traverse column by column from left to right, or it can traverse column by column from right to left, then refer to Figure 3 The process in which the mobile terminal updates the initial grayscale value of the target pixel point that is located in the neighborhood of the pixel point and has not been traversed based on the error of the pixel point may include:

[0117] Step 2051: For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increase the initial grayscale value of the first target pixel point by a first value.

[0118] For the first target pixel located in the same row of the pixel and in the next column of the pixel, that is, the pixel located to the right of the pixel, the mobile terminal can increase the initial grayscale value of the first target pixel by a first value, that is, the mobile terminal can update the initial grayscale value of the first target pixel to the sum of its previous initial grayscale value and the first value. The first value can be the product of the grayscale value error of the pixel and the first proportion. That is, the updated initial grayscale value X of the first target pixel satisfies the following formula:

[0119] X=X+c1×e Formula (5)

[0120] In formula (1), c1 is the first proportion.

[0121] Step 2052: For a second target pixel point located in the next row of pixels and in the previous column of pixels, increase the initial grayscale value of the second target pixel point by a second value.

[0122] For the second target pixel located in the next row of the pixel and in the previous column of the pixel, that is, the pixel located to the lower left of the pixel, the mobile terminal can increase the initial grayscale value of the second target pixel by the second value, that is, the mobile terminal can update the initial grayscale value of the second target pixel to the sum of the initial grayscale value before the period and the second value. Among them, the second value is the product of the grayscale value error of the pixel and the second proportion. That is, the updated initial grayscale value X of the second target pixel satisfies:

[0123] X=X+c2×e Formula (6)

[0124] In formula (2), c2 is the second proportion.

[0125] Step 2053: For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value.

[0126] For the third target pixel located in the next row of the pixel and in the same column of the pixel, that is, the pixel located below the pixel, the mobile terminal increases the initial grayscale value of the third target pixel by the third value. That is, the mobile terminal can update the initial grayscale value of the third target pixel to the sum of its previous initial grayscale value and the third value. Among them, the third value can be the product of the grayscale value error of the pixel and the third proportion. That is, the updated initial grayscale value X of the third target pixel satisfies the following formula:

[0127] X=X+c3×e Formula (7)

[0128] In formula (1), c3 is the third proportion.

[0129] Step 2054: For a fourth target pixel located in the next row of pixels and in the next column of pixels, increase the initial grayscale value of the fourth target pixel by a fourth value.

[0130] For the fourth target pixel located in the next row of the pixel and in the next column of the pixel, that is, the pixel located to the lower right of the pixel, the mobile terminal can increase the initial grayscale value of the fourth target pixel by the fourth value, that is, the mobile terminal can update the initial grayscale value of the fourth target pixel to the sum of the initial grayscale value before the period and the fourth value. Among them, the fourth value can be the product of the grayscale value error of the pixel and the fourth proportion. That is, the updated initial grayscale value X of the fourth target pixel satisfies the following formula:

[0131] X=X+c4×e Formula (8)

[0132] In formula (1), c4 is the fourth proportion.

[0133] In the embodiment of the present application, the first proportion c1 to the fourth proportion c4 may be equal. For example, the first proportion c1 to the fourth proportion c4 may all be 4 / 16. Alternatively, the fourth proportion c4 may be less than the third proportion c3, the third proportion c3 may be less than the first proportion c1, and the first proportion c1 may be less than the second proportion c2. For example, the fourth proportion c4 may be 1 / 16, the third proportion c3 may be 3 / 16, the second proportion c2 may be 7 / 16, and the first proportion c1 may be 5 / 16.

[0134] Alternatively, the third proportion c3 and the fourth proportion c4 may be equal and both smaller than the first proportion c1, and the first proportion c1 may be smaller than the second proportion c2. For example, the third proportion c3 and the fourth proportion c4 may both be 2 / 16, the second proportion c2 may be 7 / 16, and the first proportion c1 may be 5 / 16.

[0135] For example, see Figure 4 , Figure 4It is a schematic diagram of the positional relationship of pixels in a grayscale image provided by an embodiment of the present application. Among them, the straight line where pixel 1, pixel 2 and pixel 3 are located is the extension direction of the pixel row in the grayscale image, and pixel 1, pixel 4 and pixel 7 are the extension directions of the pixel column in the grayscale image. Assume that the grayscale threshold determined by the mobile terminal is 190, the pixel currently traversed by the mobile terminal is pixel 2, the initial grayscale value of pixel 2 is 222, the second grayscale level is 2, the error e of pixel 2 is the difference between the first target grayscale value of pixel 2 and its initial grayscale value 32, the first proportion c1 is 5 / 16, the second proportion c2 is 7 / 16, the third proportion c3 is 2 / 16, and the fourth proportion c4 is 2 / 16. Then the first target pixel is pixel 3, the second target pixel is pixel 4, the third target pixel is pixel 5, and the fourth target pixel is pixel 6. The initial grayscale value of pixel 3 is 125, the initial grayscale value of pixel 4 is 127, the initial grayscale value of pixel 5 is 134, and the initial grayscale value of pixel 6 is 128. Therefore, the mobile terminal can update the initial grayscale value of the first target pixel, that is, the initial grayscale value of pixel 3, to 125+10=135; update the initial grayscale value of the second target pixel, that is, the initial grayscale value of pixel 4, to 127+14=141; update the initial grayscale value of the third target pixel, that is, the initial grayscale value of pixel 5, to 134+4=138; and update the initial grayscale value of the fourth target pixel, that is, the initial grayscale value of pixel 6, to 128+4=132.

[0136] Step 206: Based on the target grayscale value of each pixel, a grayscale image of a second grayscale level is displayed on the electronic ink screen.

[0137] After the mobile terminal completes traversing the grayscale image of the first grayscale level to obtain the target grayscale value of each pixel, the mobile terminal can display the grayscale image of the second grayscale level on its electronic ink screen.

[0138] For example, Figure 5 It is a schematic diagram of a 2-grayscale image converted from a 256-grayscale image in the related art. Figure 6 It is a schematic diagram of a 2-grayscale image provided in an embodiment of the present application. The 2-grayscale image is obtained after the mobile terminal adopts the first optional implementation method to determine the grayscale threshold. Figure 7 It is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application. The 2-grayscale image is obtained after the mobile terminal adopts the third optional implementation method to determine the grayscale threshold.

[0139] from Figure 5 It can be seen from the figure that the 2-grayscale image converted by the method in the related art has obvious color blocks in most of the images, and the transition of the 2-grayscale image is unnatural (for example Figure 5The leaves in the image have more areas of the same color) and some details are lost, resulting in a poor image display.

[0140] contrast Figure 5 and Figure 6 ,as well as Figure 5 and Figure 7 It can be seen that Figure 6 and Figure 7 In the image shown, there are fewer areas on the leaves with the same color, the image transition is more natural, and the image detail loss is less, and the image display effect is better.

[0141] Figure 8 It is another schematic diagram of a 2-grayscale image converted from a 256-grayscale image in the related art. Fig. 9 It is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application. The 2-grayscale image is obtained after the mobile terminal determines the grayscale threshold using the first optional implementation method. Fig.10 It is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application. The 2-grayscale image is obtained after the mobile terminal adopts the third optional implementation method to determine the grayscale threshold.

[0142] from Figure 8 It can be seen that in the 2-grayscale image converted by the method in the related art, the straight line appears obviously jagged, and the display effect of the 2-grayscale image is poor. Fig. 9 and Figure 8 It can be seen that in the 2-grayscale image obtained by taking the mean grayscale value of all pixels of the grayscale image as the grayscale threshold, there are fewer jagged straight lines, and the display effect of the image is effectively improved.

[0143] contrast Fig.10 and Figure 8 It can be seen that in the 2-grayscale image obtained by using the grayscale threshold obtained by the Otsu algorithm, there are fewer jagged straight lines. Fig.10 Therefore, the display effect of 2 grayscale images is better.

[0144] It should be noted that the above embodiment is an exemplary description of the image display method of the mobile terminal provided by the embodiment of the present application, with the first grayscale number being 256 and the second grayscale number being 2. It is understandable that the second grayscale number can also be 4, 8 or 16. The method is described by taking the second grayscale number being 4 as an example. When the second grayscale number is 4, the mobile terminal can first divide the multiple pixels included in the 256 grayscale image into two pixel sets. The maximum grayscale value of the pixels included in the first pixel set of the two pixel sets is less than the minimum grayscale value of the pixels included in the second pixel set. Then, for each pixel set, the mobile terminal can use the method provided in the above embodiment to determine the grayscale threshold corresponding to the pixel set, and determine the grayscale value error of the pixel based on the grayscale threshold and the initial grayscale value of the pixel, so as to diffuse the grayscale value error to the target pixel points that have not been traversed in the neighborhood where the pixel point is located.

[0145] It should also be noted that the order of the steps of the image display method for a mobile terminal provided in the embodiment of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the situation. Any technician familiar with the technical field can easily think of a change within the technical scope disclosed in this application, and the change should be included in the protection scope of this application, so it will not be repeated.

[0146] In summary, the embodiment of the present application provides an image display method for a mobile terminal, wherein the mobile terminal can determine a grayscale threshold based on the initial grayscale values ​​of multiple pixels included in a grayscale image of a first grayscale level, and then determine the grayscale value error of each pixel based on the grayscale threshold and the initial grayscale value, and update the initial grayscale values ​​of pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error. Since the grayscale threshold is determined based on the initial grayscale values ​​of multiple pixels, the determined grayscale threshold can be adapted to the current grayscale image, thereby ensuring that the display effect of the grayscale image of the second grayscale level obtained by subsequent conversion based on the grayscale threshold is better.

[0147] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level.

[0148] Fig.11 is a flowchart of another method for displaying an image in a mobile terminal provided by an embodiment of the present application. The method can be applied to a mobile terminal, and the mobile terminal may include an electronic ink screen. Fig.11 , the method may include:

[0149] Step 301, traverse multiple pixel points of a grayscale image of a first grayscale level, and for each traversed pixel point, determine a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point.

[0150] The mobile terminal may obtain a grayscale image of a first grayscale level to be displayed, and the grayscale image may include a plurality of pixels. The mobile terminal may traverse the plurality of pixels of the grayscale image, and for each traversed pixel, the mobile terminal may determine a target grayscale value of the pixel at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel.

[0151] Among them, the grayscale threshold may be pre-stored in the mobile terminal, and the grayscale threshold may be greater than or equal to 144 and less than or equal to 240. Optionally, the grayscale threshold may be 192. The first grayscale level is 256, and the second grayscale level is 2. The grayscale level of a grayscale image may refer to the number of different levels of grayscale that can be displayed by each pixel in the grayscale image. Therefore, the higher the grayscale level of a grayscale image, the more grayscale levels the grayscale image can display, and the better the display effect of the grayscale image. For example, each pixel in a grayscale image with a first grayscale level of 256 (also referred to as a 256 grayscale image) can display 256 different levels of grayscale, that is, the grayscale value of each pixel can range from 0 to 255. Each pixel in a grayscale image with a second grayscale level of 2 (also referred to as a 2-grayscale image) can display 2 different levels of grayscale.

[0152] Step 302: Based on the gray value error of the pixel, update the initial gray value of the target pixel that is located in the area of ​​the pixel and has not been traversed.

[0153] After determining the target grayscale value of the pixel, the mobile terminal can determine the grayscale value error of the pixel based on the initial grayscale value and the target grayscale value of the pixel. Afterwards, the mobile terminal can update the initial grayscale value of the target pixel that is located in the area of ​​the pixel and has not been traversed based on the grayscale value error. The grayscale value error is the difference between the initial grayscale value and the target grayscale value.

[0154] Step 303: Based on the target grayscale value of each pixel, a grayscale image of a second grayscale level is displayed on the electronic ink screen.

[0155] After obtaining the target grayscale value in each pixel, the mobile terminal can display a grayscale image of the second grayscale level on its electronic ink screen.

[0156] For example, assuming the grayscale threshold is 192, see Fig.12 and Fig.13 , Fig.12is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application, Fig.12 is a schematic diagram of another 2-grayscale image provided in an embodiment of the present application, Fig.11 and Fig.12 Both are 2-grayscale images obtained with 192 as the grayscale threshold. Fig.11 and Figure 5 It can be seen that Fig.11 The image shown has a more natural transition, less loss of image details, a more natural image, and a better display effect. Fig.12 and Figure 8 It can be seen that there are fewer jagged straight lines and the image display effect is better.

[0157] In summary, the embodiment of the present application provides an image display method for a mobile terminal, wherein the mobile terminal can traverse a plurality of pixel points included in a grayscale image of a first grayscale level, and for each pixel point traversed, the mobile terminal can determine the grayscale value error of each pixel point based on the grayscale threshold and the initial grayscale value, and update the initial grayscale value of the pixel points located in the neighborhood of the pixel point and not traversed based on the grayscale value error. Compared with using 128 as the grayscale threshold, the grayscale threshold between 144 and 240 provided in the embodiment of the present application can ensure that the display effect of the grayscale image of the second grayscale level obtained by conversion is better.

[0158] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level.

[0159] The present application also provides a mobile terminal, which can be used to execute the image display method of the mobile terminal provided by the above method embodiment. Fig.14 , the mobile terminal may include a processor 1101 and an electronic ink screen 131. The processor 1101 may be used for:

[0160] Determining a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in the grayscale image of the first grayscale level;

[0161] Traversing a plurality of pixel points of a grayscale image of a first grayscale level, and for each traversed pixel point, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the second grayscale level is less than the first grayscale level;

[0162] Based on the grayscale value error of the pixel point, the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed is updated, and the grayscale value error is the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0163] Based on the target grayscale value of each pixel, the electronic ink screen is controlled to display a grayscale image of a second grayscale level.

[0164] Optionally, the grayscale threshold is positively correlated with initial grayscale values ​​of the plurality of pixels.

[0165] Optionally, the processor 1101 may be configured to:

[0166] The average value of the initial grayscale values ​​of multiple pixels is determined as the grayscale threshold.

[0167] Optionally, the processor 1101 may be configured to:

[0168] The initial grayscale values ​​of multiple pixels are processed using the Otsu algorithm to obtain the grayscale threshold.

[0169] Optionally, the processor 1101 may be configured to:

[0170] Determining a grayscale threshold based on an initial grayscale value of each pixel point included in the grayscale image of the first grayscale level;

[0171] Alternatively, for each pixel among multiple pixels, the grayscale threshold corresponding to the pixel is determined based on the initial grayscale values ​​of each pixel in the neighborhood of the pixel, and for each traversed pixel, the target grayscale value of the pixel under the second grayscale technology is determined based on the initial grayscale value of the pixel and the grayscale threshold corresponding to the pixel.

[0172] Optionally, the second gray level number is 2; the processor 1101 may be used for:

[0173] If the initial grayscale value of the pixel is greater than or equal to the grayscale threshold, the first target value is determined as the target grayscale value of the pixel;

[0174] If the initial grayscale value of the pixel is less than the grayscale threshold, the second target value is determined as the target grayscale value of the pixel;

[0175] Among them, the first target value is greater than the second target value.

[0176] Optionally, the grayscale image includes a plurality of pixels arranged in an array; the processor 1101 may be used for:

[0177] Traverse the pixels in the grayscale image row by row;

[0178] For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and the first proportion;

[0179] For a second target pixel located in the next row of pixels and in the previous column of pixels, the initial grayscale value of the second target pixel is increased by a second value, where the second value is the product of the grayscale value error of the pixel and the second proportion;

[0180] For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and the third proportion;

[0181] For a fourth target pixel located in the next row and next column of pixels, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and the fourth ratio.

[0182] Optionally, the third proportion and the fourth proportion are both smaller than the first proportion, and the first proportion is smaller than the second proportion.

[0183] Optionally, the third ratio and the fourth ratio are both 2 / 16, the first ratio is 5 / 16, and the second ratio is 7 / 16.

[0184] In summary, the mobile terminal can determine the grayscale threshold based on the initial grayscale values ​​of multiple pixels included in the grayscale image of the first grayscale level, and then determine the grayscale value error of each pixel based on the grayscale threshold and the initial grayscale value, and update the initial grayscale values ​​of pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error. Since the grayscale threshold is determined based on the initial grayscale values ​​of multiple pixels, the determined grayscale threshold can be adapted to the current grayscale image, thereby ensuring that the display effect of the grayscale image of the second grayscale level obtained by subsequent conversion based on the grayscale threshold is better.

[0185] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level.

[0186] The present application also provides a mobile terminal. Fig.14 , the mobile terminal may include a processor 1101 and an electronic ink screen 131. The processor 1101 may be used for:

[0187] Traversing a plurality of pixel points of a grayscale image of a first grayscale level, for each traversed pixel point, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the first grayscale level is 256, the second grayscale level is 2, and the grayscale threshold is greater than or equal to 144 and less than or equal to 240;

[0188] Based on the grayscale value error of the pixel point, the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed is updated, and the grayscale value error is the difference obtained by subtracting the target grayscale value from the initial grayscale value;

[0189] Based on the target grayscale value of each pixel, the electronic ink screen is controlled to display a grayscale image of a second grayscale level.

[0190] In summary, the embodiment of the present application provides a mobile terminal, which can traverse multiple pixel points included in the grayscale image of the first grayscale level. For each pixel point traversed, the mobile terminal can determine the grayscale value error of each pixel point based on the grayscale threshold and the initial grayscale value, and update the initial grayscale value of the pixel point located in the neighborhood of the pixel point and not traversed based on the grayscale value error. Compared with using 128 as the grayscale threshold, the grayscale threshold between 144 and 240 provided in the embodiment of the present application can ensure that the display effect of the grayscale image of the second grayscale level obtained by conversion is better.

[0191] Moreover, since the mobile terminal can also update the initial grayscale values ​​of other pixels located in the neighborhood of the pixel and not traversed based on the grayscale value error of each pixel, it can ensure that the color transition of the grayscale image of the second grayscale level obtained by conversion is more natural, thereby further ensuring the display effect of the grayscale image of the second grayscale level.

[0192] like Fig.14 As shown, the mobile terminal 110 may further include: a display unit 130, a radio frequency (RF) circuit 150, an audio circuit 160, a wireless fidelity (Wi-Fi) module 170, a Bluetooth module 180, a power supply 190, a camera 121 and other components.

[0193] Among them, the camera 121 can be used to capture static pictures or videos. The object generates an optical picture through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 1101 to convert it into a digital picture signal.

[0194] The processor 1101 is the control center of the mobile terminal 110. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the mobile terminal 110 and processes data by running or executing software programs stored in the memory 140 and calling data stored in the memory 140. In some embodiments, the processor 1101 may include one or more processing units; the processor 1101 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the baseband processor mainly processes wireless communication. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1101. In the present application, the processor 1101 can run an operating system and an application program, can control the user interface display, and can implement the image display method of the mobile terminal provided in the embodiment of the present application. In addition, the processor 1101 is coupled to the input unit and the display unit 130.

[0195] The display unit 130 may be used to receive input digital or character information, generate signal input related to user settings and function control of the mobile terminal 110, and optionally, the display unit 130 may also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the mobile terminal 110. The display unit 130 may include a display screen 131 disposed on the front of the mobile terminal 110. The display screen 131 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 130 may be used to display various graphical user interfaces described in this application.

[0196] The display unit 130 includes a touch screen 132 disposed on the front of the mobile terminal 110. The display screen 131 can be used to display preview images. The touch screen 132 can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc. The touch screen 132 can be covered on the electronic ink screen 131, or the touch screen 132 can be integrated with the electronic ink screen 131 to realize the input and output functions of the mobile terminal 110.

[0197] The memory 140 can be used to store software programs and data. The processor 1101 executes various functions and data processing of the mobile terminal 110 by running the software programs or data stored in the memory 140. The memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 140 stores an operating system that enables the mobile terminal 110 to run. In the present application, the memory 140 can store an operating system and various application programs, and can also store code for executing the image display method of the mobile terminal provided in the embodiment of the present application.

[0198] The RF circuit 150 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 1101 for processing; it can send uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices.

[0199] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile terminal 110. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output. The mobile terminal 110 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the RF circuit 150 to be sent to, for example, another terminal, or the audio data is output to the memory 140 for further processing. In this application, the microphone 162 can obtain the user's voice.

[0200] Wi-Fi is a short-range wireless transmission technology. The mobile terminal 110 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 170, which provides users with wireless broadband Internet access.

[0201] The Bluetooth module 180 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the mobile terminal 110 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 180 to exchange data.

[0202] The mobile terminal 110 also includes a power supply 190 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 1101 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption. The mobile terminal 110 can also be configured with a power button for turning on and off the terminal, as well as locking the screen and other functions.

[0203] The mobile terminal 110 may include at least one sensor 1110, such as a motion sensor 11101, a distance sensor 11102, a fingerprint sensor 11103, and a temperature sensor 11104. The mobile terminal 110 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.

[0204] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the mobile terminal and each device described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0205] Fig.15 It is a software structure diagram of the mobile terminal provided in the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime environment (android runtime, ART) and the system library, and the kernel layer.

[0206] The application layer can include a series of application packages. Fig.15 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0207] like Fig.15 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0208] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0209] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0210] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0211] The phone manager is used to provide communication functions of the mobile terminal 110, such as management of call status (including connection, disconnection, etc.).

[0212] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0213] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt tone is emitted, the communication terminal vibrates, and the indicator light flashes.

[0214] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0215] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0216] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0217] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc.

[0218] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0219] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0220] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.

[0221] A 2D graphics engine is a drawing engine for 2D drawings.

[0222] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0223] The present application embodiment provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the image display method of the mobile terminal provided in the above embodiment, for example Figure 1 , Figure 2 or Fig.11 The method shown.

[0224] The present application also provides a computer program product including instructions. When the computer program product is run on a computer, the computer executes the image display method for a mobile terminal provided by the above method embodiment. For example, Figure 1 , Figure 2 or Fig.11 The method shown.

[0225] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0226] It should be understood that the "and / or" mentioned in this article indicates that there may be three relationships. For example, A and / or B may indicate that A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. In addition, the term "at least one" in this application means one or more, and the term "plurality" in this application means two or more.

[0227] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A mobile terminal, characterized in that: The mobile terminal includes a processor and an electronic ink screen; the processor is used to: Determining a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in the grayscale image of the first grayscale level; Traversing a plurality of pixel points of the grayscale image of the first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value of the pixel point and the grayscale threshold, wherein the second grayscale level is smaller than the first grayscale level; Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value; Based on the target grayscale value of each pixel, controlling the electronic ink screen to display the grayscale image of the second grayscale level; The grayscale image includes a plurality of pixels arranged in an array; and the processor is used for: Traversing the pixels in the grayscale image row by row; For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and a first proportion; For a second target pixel located in the next row of the pixel and in the previous column of the pixel, increasing the initial grayscale value of the second target pixel by a second value, where the second value is the product of the grayscale value error of the pixel and a second proportion; For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and a third proportion; For a fourth target pixel located in the next row and next column of the pixel, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and a fourth proportion.

2. The mobile terminal according to claim 1, characterized in that: The grayscale threshold is positively correlated with the initial grayscale values ​​of the plurality of pixels.

3. The mobile terminal according to claim 2, characterized in that: The processor is used to: An average value of the initial grayscale values ​​of the plurality of pixels is determined as a grayscale threshold.

4. The mobile terminal according to claim 1, characterized in that: The processor is used to: The initial grayscale values ​​of the plurality of pixels are processed using the Otsu algorithm to obtain a grayscale threshold.

5. The mobile terminal according to any one of claims 1 to 4, characterized in that: The processor is used to: Determining a grayscale threshold based on an initial grayscale value of each pixel point included in the grayscale image of the first grayscale level; Alternatively, for each pixel among the multiple pixels, the grayscale threshold corresponding to the pixel is determined based on the initial grayscale values ​​of each pixel in the neighborhood of the pixel, and for each traversed pixel, the target grayscale value of the pixel at the second grayscale level is determined based on the initial grayscale value of the pixel and the grayscale threshold corresponding to the pixel.

6. The mobile terminal according to any one of claims 1 to 4, characterized in that: The second gray level number is 2; and the processor is used for: If the initial grayscale value of the pixel is greater than or equal to the grayscale threshold, the first target value is determined as the target grayscale value of the pixel; If the initial grayscale value of the pixel is less than the grayscale threshold, the second target value is determined as the target grayscale value of the pixel; Wherein, the first target value is greater than the second target value.

7. A mobile terminal, characterized in that: The mobile terminal includes a processor and an electronic ink screen; the processor is used to: Traversing a plurality of pixel points of a grayscale image of a first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the first grayscale level is 256, the second grayscale level is 2, and the grayscale threshold is greater than or equal to 144 and less than or equal to 240; Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value; Based on the target grayscale value of each pixel, controlling the electronic ink screen to display the grayscale image of the second grayscale level; The grayscale image includes a plurality of pixels arranged in an array; and the processor is used for: Traversing the pixels in the grayscale image row by row; For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and a first proportion; For a second target pixel located in the next row of the pixel and in the previous column of the pixel, increasing the initial grayscale value of the second target pixel by a second value, where the second value is the product of the grayscale value error of the pixel and a second proportion; For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and a third proportion; For a fourth target pixel located in the next row and next column of the pixel, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and a fourth proportion.

8. A method for displaying an image in a mobile terminal, characterized in that: The mobile terminal includes an electronic ink screen; the method includes: Determining a grayscale threshold based on initial grayscale values ​​of a plurality of pixels included in the grayscale image of the first grayscale level; Traversing a plurality of pixel points of the grayscale image of the first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value of the pixel point and the grayscale threshold, wherein the second grayscale level is smaller than the first grayscale level; Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value; Based on the target grayscale value of each pixel, displaying the grayscale image of the second grayscale level on the electronic ink screen; The grayscale image includes a plurality of pixels arranged in an array; and updating the initial grayscale value of a target pixel located in the region of the pixel and not traversed based on the grayscale value error of the pixel includes: Traversing the pixels in the grayscale image row by row; For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and a first proportion; For a second target pixel located in the next row of the pixel and in the previous column of the pixel, increasing the initial grayscale value of the second target pixel by a second value, where the second value is the product of the grayscale value error of the pixel and a second proportion; For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and a third proportion; For a fourth target pixel located in the next row and next column of the pixel, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and a fourth proportion.

9. A method for displaying an image in a mobile terminal, characterized in that: The mobile terminal includes an electronic ink screen; the method includes: Traversing a plurality of pixel points of a grayscale image of a first grayscale level, and for each of the traversed pixel points, determining a target grayscale value of the pixel point at a second grayscale level based on an initial grayscale value and a grayscale threshold of the pixel point, wherein the first grayscale level is 256, the second grayscale level is 2, and the grayscale threshold is greater than or equal to 144 and less than or equal to 240; Based on the grayscale value error of the pixel point, updating the initial grayscale value of the target pixel point that is located in the area of ​​the pixel point and has not been traversed, the grayscale value error being the difference obtained by subtracting the target grayscale value from the initial grayscale value; Based on the target grayscale value of each pixel, displaying the grayscale image of the second grayscale level on the electronic ink screen; The grayscale image includes a plurality of pixels arranged in an array; and updating the initial grayscale value of a target pixel located in the region of the pixel and not traversed based on the grayscale value error of the pixel includes: Traversing the pixels in the grayscale image row by row; For a first target pixel point located in the same row as the pixel point and in the next column of the pixel point, increasing the initial grayscale value of the first target pixel point by a first value, where the first value is the product of the grayscale value error of the pixel point and a first proportion; For a second target pixel located in the next row of the pixel and in the previous column of the pixel, increasing the initial grayscale value of the second target pixel by a second value, where the second value is the product of the grayscale value error of the pixel and a second proportion; For a third target pixel located in the next row of the pixel and in the same column as the pixel, increase the initial grayscale value of the third target pixel by a third value, where the third value is the product of the grayscale value error of the pixel and a third proportion; For a fourth target pixel located in the next row and next column of the pixel, the initial grayscale value of the fourth target pixel is increased by a fourth value, where the fourth value is the product of the grayscale value error of the pixel and a fourth proportion.

Citation Information

Patent Citations

  • Drowsy driver detection system using average local binary structure

    AU2020102438A4

  • Neighborhood-information-based method for segmentation of images with non-uniform gray levels for blurred active contour model

    CN103208116A