CN114063945A - Mobile terminal and image display method thereof - Google Patents

Mobile terminal and image display method thereof Download PDF

Info

Publication number
CN114063945A
CN114063945A CN202010756823.2A CN202010756823A CN114063945A CN 114063945 A CN114063945 A CN 114063945A CN 202010756823 A CN202010756823 A CN 202010756823A CN 114063945 A CN114063945 A CN 114063945A
Authority
CN
China
Prior art keywords
pixel point
gray
value
target
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010756823.2A
Other languages
Chinese (zh)
Other versions
CN114063945B (en
Inventor
王续澎
徐晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN202010756823.2A priority Critical patent/CN114063945B/en
Publication of CN114063945A publication Critical patent/CN114063945A/en
Application granted granted Critical
Publication of CN114063945B publication Critical patent/CN114063945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1415Digital output to display device ; Cooperation and interconnection of the display device with other functional units with means for detecting differences between the image stored in the host and the images displayed on the displays
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The application discloses a mobile terminal and an image display method thereof, and relates to the technical field of image processing. The mobile terminal can transmit the error of each pixel point in the gray image of the first gray level number to the pixel points in the neighborhood of the pixel point, so that the error of the adjacent pixel points is reduced, the change of the gray value of the adjacent pixel points is smooth, and the displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.

Description

Mobile terminal and image display method thereof
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a mobile terminal and an image display method thereof.
Background
The mobile terminal can convert the gray scale image with higher gray scale number into the gray scale image with lower gray scale number, and the gray scale image with lower gray scale number is displayed on the electronic ink screen of the mobile terminal.
However, the gray-scale image with a lower gray-scale number has a poor display effect on the electronic ink screen.
Disclosure of Invention
The application provides a mobile terminal and an image display method thereof, which can solve the problem of poor display effect of a gray-scale image with lower gray scale number on an electronic ink screen in the related art. The technical scheme is as follows:
in one aspect, a mobile terminal is provided, the mobile terminal comprising a processor and an electronic ink screen; the processor is configured to:
traversing pixel points in a gray image with a first gray scale, and determining a first target gray scale value of each traversed pixel point under a second gray scale based on an initial gray scale value of the pixel point, and an error of the pixel point, wherein the second gray scale is smaller than the first gray scale, and the error of the pixel point is related to the initial gray scale value of the pixel point and the second gray scale;
updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed based on the error of the pixel point;
processing the traversed gray-scale image by adopting a contrast enhancement algorithm to obtain a target image;
and the electronic ink screen is used for displaying the target image.
Optionally, the first target gray value is proportional to a quotient of the initial gray value of the pixel point and the second gray level.
Optionally, the processor is configured to:
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is greater than or equal to the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure BDA0002611848260000021
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is smaller than the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure BDA0002611848260000022
wherein the content of the first and second substances,
Figure BDA0002611848260000023
and expressing a downward integer, wherein the remainder threshold is one half of the second gray scale, X is the initial gray value of the pixel point, and H is the second gray scale.
Optionally, the error of the pixel point is a remainder of division of the initial gray value of the pixel point and the second gray level number;
or the error of the pixel point is the difference value of the first target gray value of the pixel point and the initial gray value of the pixel point.
Optionally, the grayscale image includes a plurality of pixel points arranged in an array; the processor is configured to:
traversing pixel points in the gray level image line by line;
the processor is configured to:
for a first target pixel point which is positioned on the same row of the pixel point and is positioned in the next row of the pixel point, increasing the initial gray value of the first target pixel point by a first numerical value, wherein the first numerical value is the product of the error of the pixel point and a first ratio;
for a second target pixel point which is positioned in the next row of the pixel points and is positioned in the previous row of the pixel points, increasing the initial gray value of the second target pixel point by a second numerical value, wherein the second numerical value is the product of the error of the pixel point and a second ratio;
for a third target pixel point which is positioned in the next row of the pixel points and is positioned in the same column of the pixel points, increasing the initial gray value of the third target pixel point by a third numerical value, wherein the third numerical value is the product of the error of the pixel point and a third ratio;
for a fourth target pixel point which is positioned in the next row of the pixel points and is positioned in the next column of the pixel points, increasing the initial gray value of the fourth target pixel point by a fourth numerical value, wherein the fourth numerical value is the product of the error of the pixel point and a fourth ratio;
wherein the third and fourth ratios are both less than the first ratio, and the first ratio is less than the second ratio.
Optionally, the processor is further configured to:
acquiring a first maximum value and a first minimum value in initial gray values of pixel points of the gray image;
acquiring a second maximum value and a second minimum value in a first target gray value of a pixel point of the traversed gray image;
the processor is configured to:
updating a first target gray value of the pixel point of the traversed gray image to a second target gray value to obtain a target image;
for each pixel point in the traversed gray-scale image, if the initial gray-scale value of the pixel point is equal to the first minimum value, the second target gray-scale value of the pixel point is twice as large as the first target gray-scale value of the pixel point;
if the initial gray value of the pixel point is greater than the first minimum value and less than the first maximum value, the second target gray value W of the pixel point satisfies: w ═ r + (X-m) X (s-r)/(n-m);
if the initial gray value of the pixel point is equal to the first maximum value, the second target gray value W of the pixel point satisfies the following condition: w ═ s + r;
wherein m is the first minimum value, n is the first maximum value, r is the second minimum value, s is the second maximum value, and X is the initial gray value of the pixel point.
Optionally, the electronic ink screen is a color ink screen, the color ink screen includes a plurality of color-resisting blocks with different colors, and each color-resisting block corresponds to one pixel point in the grayscale image; the processor is configured to:
and updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed in the pixel point corresponding to the color block with the same color as the color block corresponding to the pixel point based on the error of the pixel point.
In another aspect, an image display method of a mobile terminal is provided, the mobile terminal including an electronic ink screen, the method including:
traversing pixel points in a gray image with a first gray scale, and determining a first target gray scale value of each traversed pixel point under a second gray scale based on an initial gray scale value of the pixel point, and an error of the pixel point, wherein the second gray scale is smaller than the first gray scale, and the error of the pixel point is related to the initial gray scale value of the pixel point and the second gray scale;
updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed based on the error of the pixel point;
processing the traversed gray-scale image by adopting a contrast enhancement algorithm to obtain a target image;
displaying the target image in the electronic ink screen.
Optionally, the first target gray value is proportional to a quotient of the initial gray value of the pixel point and the second gray level.
Optionally, the determining a first target gray value of the pixel point in a second gray scale level based on the initial gray value of the pixel point includes:
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is greater than or equal to the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure BDA0002611848260000041
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is smaller than the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure BDA0002611848260000042
wherein the content of the first and second substances,
Figure BDA0002611848260000043
and expressing a downward integer, wherein the remainder threshold is one half of the second gray scale, X is the initial gray value of the pixel point, and H is the second gray scale.
Optionally, the error of the pixel point is a remainder of division of the initial gray value of the pixel point and the second gray level number;
or the error of the pixel point is the difference value of the first target gray value of the pixel point and the initial gray value of the pixel point.
In still another aspect, there is provided a computer-readable storage medium having stored therein instructions that, when executed on a computer, cause the computer to execute the image display method of the mobile terminal according to the above aspect.
In still another aspect, a computer program product containing instructions is provided, which when run on the computer, causes the computer to execute the image display method of the mobile terminal according to the above aspect.
The beneficial effect that technical scheme that this application provided brought includes at least:
the application provides a mobile terminal and an image display method thereof, wherein the mobile terminal can transmit the error of each pixel point in a gray image of a first gray level number to the pixel points in the neighborhood of the pixel point, so that the error of the adjacent pixel points is reduced, the change of the gray level value of the adjacent pixel points is smooth, and the displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an image display method of a mobile terminal according to an embodiment of the present disclosure;
fig. 2 is a flowchart of an image display method of another mobile terminal according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a mobile terminal determining a first target gray value and an error of a pixel point in a gray image according to an embodiment of the present application;
fig. 4 is a schematic diagram of a position relationship between pixels of a gray image according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a gray image at a second gray scale level obtained after converting a gray image at a first gray scale level by using a method in the related art;
FIG. 6 is a schematic diagram of a target image provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of another target image provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of yet another target image provided by an embodiment of the present application;
fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another mobile terminal provided in an embodiment of the present application;
fig. 11 is a block diagram of a software structure of a mobile terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the related art, the process of converting the gray-scale image with a higher gray-scale level (for example, a 256 gray-scale image) into the gray-scale image with a lower gray-scale level (for example, a 16 gray-scale image) by the mobile terminal may include: for each pixel point in the 256-gray-scale image, the mobile terminal may divide the gray value of the pixel point by 16 and round the divided value to obtain an updated gray value. Thereafter, the mobile terminal may display a 16 gray scale image on its electronic ink screen based on the updated gray scale values of the pixel points.
However, if the gray-scale values of the pixels in a partial region are similar in the 256-gray-scale image, the gray-scale values of the pixels in the partial region are the same after the pixel is converted into the 16-gray-scale image. Further, transition among the regions in the 16-gray-scale image is unnatural, and a fault phenomenon occurs, that is, the display effect of the 16-gray-scale image is poor.
The embodiment of the application provides an image display method of a mobile terminal, which can be applied to the mobile terminal, wherein the mobile terminal comprises an electronic ink screen. Optionally, the mobile terminal may be a mobile phone or a tablet computer, and the electronic ink screen may be a black-and-white ink screen. Referring to fig. 1, the method may include:
step 101, traversing pixel points in the gray image of the first gray scale level, and determining a first target gray scale value of the pixel points in the second gray scale level and errors of the pixel points based on the initial gray scale value of the pixel points for each traversed pixel point.
In the embodiment of the present application, the second number of gray levels may be smaller than the first number of gray levels, and the second number of gray levels may be pre-stored in the mobile terminal. For example, the second number of gray levels may be 256 and the first number of gray levels may be 16. The error of a pixel may be related to the initial gray value and the second gray scale level of the pixel.
The number of gray levels of the gray image may be the number of gray levels of different levels that each pixel in the gray image can display. Therefore, the higher the number of gradation levels of the gradation image, the more gradation levels the gradation image can display, and the better the display effect of the gradation image. For example, if the number of gray levels of a certain gray image is 256, each pixel in the gray image can display 256 different levels of gray levels, that is, the gray level of each pixel may range from 0 to 255. If the number of gray levels of a certain gray image is 16, each pixel in the gray image can display 16 different levels of gray levels, that is, the gray level of each pixel can range from 0 to 15.
102, updating the initial gray value of the target pixel point which is located in the neighborhood of the pixel point and is not traversed based on the error of the pixel point.
After determining the error of the pixel point, the mobile terminal may update the initial gray value of the target pixel point that is located in the neighborhood of the pixel point and is not traversed based on the error of the pixel point. Namely, the mobile terminal can transmit the error of the pixel point to a target pixel point which is adjacent to the pixel point and is not traversed so as to update the initial gray value of the target pixel point.
And 103, processing the traversed gray level image by adopting a contrast enhancement algorithm to obtain a target image.
After obtaining the first target gray value of each pixel point of the gray image, the mobile terminal may process the traversed gray image by using a contrast enhancement algorithm, for example, the first target gray value of each pixel point of the gray image may be updated to the second target gray value, so as to obtain the target image.
And 104, displaying the target image in the electronic ink screen.
After obtaining the target image, the mobile terminal may display the target image in its electronic ink screen.
To sum up, the embodiment of the present application provides an image display method for a mobile terminal, where the mobile terminal may transmit an error of each pixel point in a gray image of a first gray scale to a pixel point in a neighborhood of the pixel point, so that the error of an adjacent pixel point is reduced, a change in a gray scale value of the adjacent pixel point is smooth, and a displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.
Fig. 2 is a flowchart of another image display method of a mobile terminal according to an embodiment of the present disclosure, where the method may be applied to a mobile terminal, and the mobile terminal may include an electronic ink screen. Optionally, the mobile terminal may be a mobile phone or a tablet computer, and the electronic ink screen may be a black-and-white ink screen. Referring to fig. 2, the method may include:
step 201, traversing pixel points in the gray image of the first gray scale level, and determining a first target gray scale value of the pixel point under the second gray scale level and an error of the pixel point based on an initial gray scale value of the pixel point for each traversed pixel point.
The mobile terminal can acquire a gray image of a first gray scale to be displayed and can traverse pixel points in the gray image of the first gray scale. For each pixel point in the traversed gray image, the mobile terminal may determine, based on the initial gray value of the pixel point, a first target gray value of the pixel point in a second gray scale level, and may determine an error of the pixel point. Optionally, the grayscale image may include a plurality of pixel points arranged in an array. The mobile terminal may traverse the grayscale image row-by-row or may traverse the grayscale image column-by-column.
The second gray scale number may be smaller than the first gray scale number, and the second gray scale number may be pre-stored in the mobile terminal. For example, the first number of gray levels is 256 and the second number of gray levels may be 16, 4 or 2. The error of the pixel may be related to the initial gray value of the pixel and the second gray scale level. The number of gray levels of the gray image may be the number of gray levels of different levels that each pixel point in the gray image can display. Therefore, the higher the number of gradation levels of the gradation image, the more gradation levels the gradation image can display, and the better the display effect of the gradation image. For example, if the number of gray levels of a certain gray image is 256, each pixel in the gray image can display 256 different levels of gray levels, that is, the gray level of each pixel may range from 0 to 255. If the number of gray levels of a certain gray image is 16, each pixel in the gray image can display 16 different levels of gray levels, that is, the gray level of each pixel can range from 0 to 15.
In this embodiment, for each pixel point in the gray image with the first gray scale, the first target gray scale value of the pixel point may be proportional to a quotient of the initial gray scale value of the pixel point and the second gray scale value. That is, the larger the quotient of the initial gray value of the pixel point and the second gray scale level is, the larger the first target gray value of the pixel point is. The smaller the quotient of the initial gray value of the pixel point and the second gray level number is, the smaller the first target gray value of the pixel point is.
The method includes that the mobile terminal determines a first target gray value of a pixel point under a second gray scale level based on an initial gray value of the pixel point, and the error of the pixel point can be in various manners.
In a first optional implementation manner, for each pixel traversed in the grayscale image of the first grayscale level, the mobile terminal may determine that a first target grayscale value V of the pixel at the second grayscale level satisfies:
Figure BDA0002611848260000081
and the mobile terminal can determine that the error of the pixel point is the difference value between the first target gray value of the pixel point and the initial gray value of the pixel point. Namely, the error e of the pixel point can satisfy: e-V-X. Wherein X is the initial gray value of the pixel point, H is the second gray level,
Figure BDA0002611848260000082
indicating a rounding down.
For example, assuming that the first gray scale number is 256, the second gray scale number is 16, and the initial gray scale value X of a certain pixel point is 225, the mobile terminal may determine that
Figure BDA0002611848260000083
To 14, a first target for the pixel point may then be determinedThe gray value V is 240, and the error e of the pixel point is 15.
In a second optional implementation manner, for each pixel traversed in the grayscale image of the first grayscale level, the mobile terminal may determine that a first target grayscale value V of the pixel at the second grayscale level satisfies:
Figure BDA0002611848260000084
moreover, the mobile terminal can determine that the error of the pixel point is a remainder obtained by dividing the initial gray value of the pixel point by the second gray level number, that is, the error e of the pixel point can satisfy: e ═ X% H. Wherein,% represents the remainder.
For example, assuming that the first gray scale number is 256, the second gray scale number is 16, and the initial gray scale value X of a certain pixel point is 225, the mobile terminal may determine that
Figure BDA0002611848260000085
And 14, then it may be determined that the first target gray value V of the mobile terminal is 210, and the error e of the pixel point is 1.
In a third optional implementation manner, referring to fig. 3, the determining, by the mobile terminal, the first target gray value of the pixel point in the second gray scale level, and the error of the pixel point may include:
and 2011, determining a remainder of division of the initial gray value of the pixel point by the second gray scale level.
For each pixel traversed in the gray image of the first gray scale level, the mobile terminal may first determine a remainder of the division of the initial gray value of the pixel by the second gray scale level.
Step 2012, it is checked whether the remainder is less than the remainder threshold.
After determining the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number, the mobile terminal may detect whether the remainder is smaller than a remainder threshold. If the mobile terminal determines that the remainder is greater than or equal to the remainder threshold, step 2013 may be performed. If the mobile terminal determines that the remainder is less than the remainder threshold, step 2015 can be performed.
The remainder threshold may be one-half of the second gray scale number. For example, if the second gray scale number is 16, the remainder threshold may be 8.
Step 2013, determining that the first target gray value V of the pixel point meets the following conditions:
Figure BDA0002611848260000091
if the mobile terminal determines that the remainder obtained by dividing the initial gray value of the traversed pixel point by the second gray scale number is greater than or equal to the remainder threshold, it may be determined that the first target gray value V of the pixel point satisfies:
Figure BDA0002611848260000092
step 2014, determining the error of the pixel point as a difference value between the first target gray value of the pixel point and the initial gray value of the pixel point.
In this embodiment, if the mobile terminal determines that a remainder obtained by dividing the traversed initial gray value of the pixel by the second gray scale number is greater than or equal to the remainder threshold, it may also determine that the error of the pixel is a difference between the first target gray value of the pixel and the initial gray value of the pixel.
Step 2015, determining that the first target gray value V of the pixel meets the following requirements:
Figure BDA0002611848260000093
if the mobile terminal determines that the remainder of the traversed pixel point after the division of the initial gray value and the second gray level number is smaller than the remainder threshold, it may be determined that the first target gray value V of the pixel point satisfies:
Figure BDA0002611848260000094
step 2016, determining that the error of the pixel point is a remainder of the division of the initial gray value of the pixel point by the second gray scale number.
In this embodiment, if the mobile terminal determines that the remainder obtained by dividing the original gray value of the traversed pixel by the second gray scale number is smaller than the remainder threshold, it may further determine that the error of the pixel is the remainder obtained by dividing the original gray value of the pixel by the second gray scale number.
For example, assume that the first gray scale number is 256, the second gray scale number is 16, and the remainder threshold is 8. If the initial gray value X of a certain pixel traversed by the mobile terminal is 225, the mobile terminal may determine that the remainder of the initial gray value X of the certain pixel 225 and the second gray scale 16 is 1. Since 1 is smaller than 8, the mobile terminal may determine that the first target gray value V of the pixel point is 224, and may determine that the error e of the pixel point is 1.
Assuming that the initial gray value X of the pixel traversed by the mobile terminal is 125, the mobile terminal may determine that the remainder of the initial gray value 125 of the pixel and the second gray scale number 16 is 13. Since 13 is greater than 8, the mobile terminal may determine that the first target gray value V of the pixel point is 128, and determine that the error e of the pixel point is 3.
Step 202, based on the error of the pixel point, updating the initial gray value of the target pixel point which is located in the neighborhood of the pixel point and is not traversed.
After determining the error of the pixel point, the mobile terminal may update the initial gray value of the target pixel point that is located in the neighborhood of the pixel point and is not traversed based on the error of the pixel point. Namely, the mobile terminal can transmit the error of the pixel point to a target pixel point which is adjacent to the pixel point and is not traversed so as to update the initial gray value of the target pixel point.
In this embodiment of the application, if the mobile terminal performs line-by-line traversal on the pixel points in the grayscale image, and for each line of pixel points in the grayscale image, the mobile terminal may traverse the line of pixel points line by line, for example, may perform line-by-line traversal according to a sequence from left to right, or may perform line-by-line traversal according to a sequence from right to left, and based on an error of the pixel point, the mobile terminal updates the initial grayscale value of the target pixel point that is located in the neighborhood of the pixel point and is not traversed, which may include:
step a, for a first target pixel point which is positioned on the same row of the pixel point and is positioned in the next row of the pixel point, increasing the initial gray value of the first target pixel point by a first numerical value.
For a first target pixel point located on the same row of the pixel points and located in the next column of the pixel point, that is, a pixel point located at the right of the pixel point, the mobile terminal may increase the initial gray value of the first target pixel point by a first numerical value, that is, the mobile terminal may update the initial gray value of the first target pixel point to the sum of the previous initial gray value and the first numerical value. The first value may be a product of an error of the pixel and the first ratio. That is, the updated initial gray value X of the first target pixel satisfies:
X=X+c1x e formula (1)
In the formula (1), c1Is the first percentage.
And b, increasing the initial gray value of the second target pixel point by a second numerical value for the second target pixel point which is positioned in the next row of the pixel points and is positioned in the previous row of the pixel points.
For a second target pixel point located in a next row of the pixel points and located in a previous column of the pixel points, that is, a pixel point located at the left lower side of the pixel point, the mobile terminal may increase the initial gray value of the second target pixel point by a second numerical value, that is, the mobile terminal may update the initial gray value of the second target pixel point to the sum of the previous initial gray value and the second numerical value. The second value may be a product of an error of the pixel and a second ratio. That is, the updated initial gray value X of the second target pixel satisfies:
X=X+c2x e formula (2)
In the formula (2), c2Is the second ratio.
And c, increasing the initial gray value of the third target pixel point by a third numerical value for the third target pixel point which is positioned in the next row of the pixel points and is positioned in the same column of the pixel points.
For a third target pixel point located in the next row of pixel points and in the same column of pixel points, that is, a pixel point located below the pixel point, the mobile terminal may increase the initial gray value of the third target pixel point by a third value, that is, the mobile terminal may update the initial gray value of the third target pixel point to the sum of the previous initial gray value and the third value. The third value may be a product of an error of the pixel and a third ratio. That is, the updated initial gray value X of the third target pixel satisfies:
X=X+c3x e formula (3)
In the formula (1), c3Is the third ratio.
And d, increasing the initial gray value of the fourth target pixel point by a fourth numerical value for the fourth target pixel point which is positioned in the next row of the pixel points and in the next column of the pixel points.
For a fourth target pixel point located in a next row of the pixel points and located in a next column of the pixel points, that is, a pixel point located at a lower right side of the pixel point, the mobile terminal may increase the initial gray value of the fourth target pixel point by a fourth numerical value, that is, the mobile terminal may update the initial gray value of the fourth target pixel point to be the sum of the previous initial gray value and the fourth numerical value. The fourth value may be a product of an error of the pixel and a fourth ratio. That is, the updated initial gray value X of the fourth target pixel satisfies:
X=X+c4x e formula (4)
In the formula (1), c4Is the fourth ratio.
In the embodiment of the present application, the third ratio c3And a fourth ratio c4May be less than the first ratio c1First ratio of c1May be smaller than the second ratio c2. For example, the third ratio c3And a fourth ratio c4Each may be 2/16, the first ratio c1May be 5/16, the second ratio c2May be 7/16. Wherein 7/16 represents seven sixteenths of a day.
For example, referring to fig. 5, fig. 5 is a positional relationship diagram of a pixel point in a grayscale image according to an embodiment of the present application. Wherein, pixel point 1, imageThe straight line of the pixel point 2 and the pixel point 3 is the extending direction of the pixel row in the gray scale image, and the pixel point 1, the pixel point 4 and the pixel point 7 are the extending direction of the pixel column in the gray scale image. Assuming that a pixel point traversed by the mobile terminal at present is a pixel point 2, an initial gray value of the pixel point 2 is 224, a second gray scale number is 16, an error e of the pixel point 2 is a difference value 16 between a first target gray value of the pixel point 2 and the initial gray value thereof, and a first proportion c15/16, the second ratio c27/16, the third ratio c32/16, fourth ratio c4Is 2/16. The first target pixel point is pixel point 3, the second target pixel point is pixel point 4, the third target pixel point is pixel point 5, and the fourth target pixel point is pixel point 6. The initial gray value of the pixel 3 is 125, the initial gray value of the pixel 4 is 127, the initial gray value of the pixel 5 is 134, and the initial gray value of the pixel 6 is 128. Therefore, the mobile terminal may update the initial gray value of the first target pixel point, that is, the initial gray value of the pixel point 3 to 125+5 — 130; updating the initial gray value of the second target pixel point, namely the initial gray value of the pixel point 4 to be 127+ 7-134; updating the initial gray value of the third target pixel point, namely the initial gray value of the pixel point 5 to 134+ 2-136; the initial gray value of the fourth target pixel, that is, the initial gray value of the pixel 6, is updated to 128+ 2-130.
Step 203, obtaining a first maximum value and a first minimum value in the initial gray value of the pixel point of the gray image.
In the embodiment of the application, after traversing the grayscale image of the first grayscale number, the mobile terminal may obtain a first maximum value and a first minimum value of initial grayscale values of each pixel point of the grayscale image.
And 204, acquiring a second maximum value and a second minimum value in the first target gray value of the pixel point of the traversed gray image.
After traversing the gray image of the first gray level number, the mobile terminal obtains the first target gray value of each pixel point of the gray image, and can obtain the second maximum value and the second minimum value in the first target gray values of each pixel point of the traversed gray image.
And step 205, processing the traversed gray-scale image by using a contrast enhancement algorithm to obtain a target image.
After the mobile terminal obtains the first maximum value and the first minimum value in the initial gray value of the pixel point of the gray image and the second maximum value and the second minimum value in the first target gray value of the pixel point in the traversed gray image, the traversed gray image can be processed by adopting a contrast enhancement algorithm to obtain a target image.
Optionally, the mobile terminal may update the first target gray value of the pixel point of the traversed gray image to the second target gray value to obtain the target image. Wherein, the second target gray value W of each pixel point in the traversed gray image satisfies the following conditions:
Figure BDA0002611848260000131
in the above formula (5), m is the first minimum value, n is the first maximum value, r is the second minimum value, and s is the second maximum value. As can be seen from the above formula (5), if the initial gray value X of the pixel is equal to the first minimum value m, the second target gray value W of the pixel may be twice the first target gray value V of the pixel. If the initial gray value X of the pixel point is greater than the first minimum value m and less than the first maximum value n, the second target gray value W of the pixel point may satisfy: w ═ r + (X-m) X (s-r)/(n-m). If the initial gray value X of the pixel point is equal to the first maximum value n, the second target gray value W of the pixel point may satisfy: and W is s + r, i.e. the sum of the second minimum value and the second maximum value.
For example, it is assumed that the minimum value of the initial gray scale value of a pixel point of the gray scale image before traversal is 12, that is, the first minimum value m is 12, and the maximum value of the initial gray scale value of the pixel point is 200, that is, the first maximum value n is 200. The minimum value of the first target gray value of the pixel point of the traversed gray image is 32, that is, the second minimum value r is 32, and the maximum value of the first target gray value is 208, that is, the second maximum value s is 208.
Assuming that the initial gray-scale value of a certain pixel is 12 and the first target gray-scale value is 32, since 12 is equal to 12, the mobile terminal may set the second target gray-scale value of the pixel to 64 and may update the first target gray-scale value 32 to 64. Assuming that the initial gray-scale value of a certain pixel is 180 and the first target gray-scale value is 192, since 180 is smaller than 200, the mobile terminal may determine that the second target gray-scale value W of the pixel is 32+ (180-12) (208-32)/(200-12) 189, and may update the first target gray-scale value 180 of the pixel to 189. Assuming that the initial gray-scale value of a certain pixel is 200, since 200 is equal to 200, the mobile terminal may determine that the second target gray-scale value W of the pixel is 32+ 208-240, and may update the first target gray-scale value 200 of the pixel to 240.
And step 206, displaying the target image in the electronic ink screen.
After the mobile terminal processes the traversed gray-scale image by adopting a contrast enhancement algorithm, the target image can be displayed on an electronic ink screen of the mobile terminal.
Fig. 5 is a schematic diagram of a gray image at a second gray scale level obtained by converting a gray image at a first gray scale level by using a method in the related art. Fig. 6 is a schematic diagram of a target image according to an embodiment of the present application, where the target image may be obtained after a mobile terminal determines a first target gray value and an error of a pixel of a gray image by using a first optional implementation manner. Fig. 7 is a schematic diagram of another target image provided in the embodiment of the present application, where the target image may be obtained after the mobile terminal determines the first target gray-scale value and the error of the pixel point of the gray-scale image by using a second optional implementation manner. Fig. 8 is a schematic diagram of another target image provided in the embodiment of the present application, where the target image may be obtained after the mobile terminal determines the first target gray-scale value and the error of the pixel point of the gray-scale image by using a third optional implementation manner.
As can be seen from fig. 5, after the gray scale image of the first gray scale is converted by the method in the related art, the obtained gray scale image of the second gray scale has obvious water ripples, for example, at the cup cover of the cup shown in fig. 5, i.e., the image has obvious tomography, the display effect of the image is poor, and the transition is not natural. Comparing fig. 5 and 6, fig. 5 and 7, and fig. 5 and 8, it can be seen that there is no obvious water ripple in fig. 6, 7, and 8, and the image has better display effect and is displayed more naturally.
It should be noted that the electronic ink screen may be a black-and-white ink screen, or may be a color ink screen. If the electronic ink screen is a color ink screen, the mobile terminal can also acquire the position of each color block in a plurality of color blocks with different colors in a color filter layer of the color ink screen. The color resistance blocks can be arranged in an array mode, and the color resistance blocks can correspond to the pixel points in the gray level image one by one. Then, for each pixel point in the gray image of the first gray scale number, the mobile terminal may update, based on the error of the pixel point, the initial gray value of the target pixel point that is located in the neighborhood of the pixel point and is not traversed, among the pixel points corresponding to the color blocking blocks having the same color as the color blocking block corresponding to the pixel point. That is, the mobile terminal can transmit the error of the pixel point to the pixel point which has the same color as the color of the color block corresponding to the pixel point and is not traversed in the pixel point corresponding to the color block adjacent to the color block. For example, if the color of the color block corresponding to a certain pixel point is red, the mobile terminal may transmit the error of the pixel point to the pixel points corresponding to other four red color blocks adjacent to the red color block, where the pixel points are not traversed.
It should be further noted that, the order of the steps of the image display method of the mobile terminal provided in the embodiment of the present application may be appropriately adjusted, and the steps may also be increased or decreased according to the situation. For example, step 203 may also be performed before step 201. Step 204 may also be optionally deleted, for example, in the process that the mobile terminal processes the traversed grayscale image by using the contrast enhancement algorithm, the traversed grayscale image may be processed by using the histogram normalization algorithm to enhance the contrast of the traversed grayscale image. In the histogram normalization algorithm, only the maximum value and the minimum value of the initial gray value of the gray image of the first gray level number, that is, the first maximum value and the first minimum value, need to be obtained. Any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application is covered by the protection scope of the present application, and thus the detailed description thereof is omitted.
To sum up, the embodiment of the present application provides an image display method for a mobile terminal, where the mobile terminal may transmit an error of each pixel point in a gray image of a first gray scale to a pixel point in a neighborhood of the pixel point, so that the error of an adjacent pixel point is reduced, a change in a gray scale value of the adjacent pixel point is smooth, and a displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.
Fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure, where the mobile terminal may include a processor 1101 and an electronic ink screen 1102. The processor 1101 may be configured to:
traversing pixel points in the gray image of the first gray level number, and determining a first target gray level of the pixel points under a second gray level number and errors of the pixel points based on an initial gray level of the pixel points for each traversed pixel point, wherein the second gray level number is smaller than the first gray level number, and the errors of the pixel points are related to the initial gray level of the pixel points and the second gray level number;
updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed based on the error of the pixel point;
processing the traversed gray level image by adopting a contrast enhancement algorithm to obtain a target image;
the electronic ink screen 1102 is used for displaying a target image.
To sum up, the embodiment of the present application provides a mobile terminal, where the mobile terminal can transmit the error of each pixel point in the grayscale image of the first grayscale to the pixel points in the neighborhood thereof, so that the error of the adjacent pixel points is reduced, the change of the grayscale value of the adjacent pixel points is smooth, and the displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.
Optionally, the first target gray value is proportional to a quotient of the initial gray value of the pixel point and the second gray level.
Optionally, the processor 1101 may be configured to:
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is greater than or equal to the remainder threshold, determining that the first target gray value V of the pixel point under the second gray scale number satisfies the following conditions:
Figure BDA0002611848260000151
if the remainder of the division of the initial gray value of the pixel point and the second gray scale number is less than the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure BDA0002611848260000152
wherein the content of the first and second substances,
Figure BDA0002611848260000153
and expressing rounding downwards, wherein the remainder threshold is one half of the second gray scale number, X is the initial gray value of the pixel point, and H is the second gray scale number.
Optionally, the error of the pixel point is a remainder obtained by dividing the initial gray value of the pixel point by the second gray level number; or the error of the pixel point is the difference value of the first target gray value of the pixel point and the initial gray value of the pixel point.
Optionally, the grayscale image includes a plurality of pixel points arranged in an array; the processor 1101 may be configured to: and traversing the pixel points in the gray level image line by line.
The processor 1101 may be configured to: for a first target pixel point which is positioned on the same row of the pixel points and is positioned in the next column of the pixel points, increasing the initial gray value of the first target pixel point by a first numerical value, wherein the first numerical value is the product of the error of the pixel point and a first ratio; for a second target pixel point which is positioned on the next row of the pixel points and is positioned on the previous column of the pixel points, increasing the initial gray value of the second target pixel point by a second numerical value, wherein the second numerical value is the product of the error of the pixel point and a second ratio; for a third target pixel point which is positioned in the next row of the pixel points and is positioned in the same column of the pixel points, increasing the initial gray value of the third target pixel point by a third numerical value, wherein the third numerical value is the product of the error of the pixel point and a third ratio; for a fourth target pixel point which is positioned in the next row of the pixel points and is positioned in the next column of the pixel points, increasing the initial gray value of the fourth target pixel point by a fourth numerical value, wherein the fourth numerical value is the product of the error of the pixel point and a fourth ratio; the third ratio and the fourth ratio are both smaller than the first ratio, and the first ratio is smaller than the second ratio.
Optionally, the processor 1101 may further be configured to:
acquiring a first maximum value and a first minimum value in initial gray values of pixel points of a gray image;
acquiring a second maximum value and a second minimum value in a first target gray value of a pixel point of the traversed gray image;
the processor 1101 may be configured to:
updating a first target gray value of a pixel point of the traversed gray image to a second target gray value to obtain a target image;
for each pixel point in the traversed gray image, if the initial gray value of the pixel point is equal to the first minimum value, the second target gray value of the pixel point is twice as large as the first target gray value of the pixel point;
if the initial gray value of the pixel point is greater than the first minimum value and less than the first maximum value, the second target gray value W of the pixel point satisfies the following conditions: w ═ r + (X-m) X (s-r)/(n-m);
if the initial gray value of the pixel point is equal to the first maximum value, the second target gray value W of the pixel point satisfies the following conditions: w ═ s + r;
wherein m is a first minimum value, n is a first maximum value, r is a second minimum value, s is a second maximum value, and X is an initial gray value of the pixel point.
Optionally, the electronic ink screen is a color ink screen, the color ink screen includes a plurality of color-blocking blocks with different colors, and each color-blocking block corresponds to one pixel point in the grayscale image. The processor 1101 may be configured to:
and updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed in the pixel point corresponding to the color block with the same color as the color block corresponding to the pixel point based on the error of the pixel point.
To sum up, the embodiment of the present application provides a mobile terminal, where the mobile terminal can transmit the error of each pixel point in the grayscale image of the first grayscale to the pixel points in the neighborhood thereof, so that the error of the adjacent pixel points is reduced, the change of the grayscale value of the adjacent pixel points is smooth, and the displayed image is natural. After traversing each pixel in the gray-scale image, the mobile terminal can also process the traversed gray-scale image by adopting a contrast enhancement algorithm, so that the contrast of the image is enhanced, and the display effect of the image is effectively improved.
Fig. 10 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application. As shown in fig. 10, 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 a processor 1101.
The camera 121 may be used to capture still pictures or video, among other things. The object generates an optical picture through the lens and projects the optical picture to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensitive elements convert the light signals into electrical signals which are then passed to the processor 1101 for conversion into digital picture signals.
The processor 1101 is a control center of the mobile terminal 110, connects various parts of the entire terminal using various interfaces and lines, and performs 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, processor 1101 may include one or more processing units; the processor 1101 may also integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a baseband processor, which mainly handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 1101. In the present application, the processor 1101 may run an operating system and an application program, may control a user interface to display, and may implement the image display method of the mobile terminal provided in the embodiment of the present application. Additionally, processor 1101 is coupled to input unit and display unit 130.
The display unit 130 may be used to receive input numeric or character information and generate signal inputs 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 surface of the mobile terminal 110. The display screen 131 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 130 may be used to display various graphical user interfaces described herein.
The display unit 130 includes: a display screen 131 and a touch screen 132 disposed on the front of the mobile terminal 110. The display screen 131 may be used to display preview pictures. Touch screen 132 may collect touch operations on or near by the user, such as clicking a button, dragging a scroll box, and the like. The touch screen 132 may be covered on the display screen 131, or the touch screen 132 and the display screen 131 may be integrated to implement the input and output functions of the mobile terminal 110, and after the integration, the touch screen may be referred to as a touch display screen for short.
Memory 140 may be used to store software programs and data. The processor 1101 executes various functions of the mobile terminal 110 and data processing by executing software programs or data stored in the memory 140. The memory 140 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Memory 140 stores an operating system that enables mobile terminal 110 to operate. The memory 140 may store an operating system and various application programs, and may also store codes for executing the image display method of the mobile terminal according to the embodiment of the present application.
The RF circuit 150 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink data of a base station and then deliver the received downlink data to the processor 1101 for processing; the uplink data may be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and mobile terminal 110. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161. The mobile terminal 110 may 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, converts the electrical signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the RF circuit 150 to be transmitted to, for example, another terminal or outputs the audio data to the memory 140 for further processing. In this application, the microphone 162 may capture the voice of the user.
Wi-Fi belongs to a short-distance wireless transmission technology, and the mobile terminal 110 may help a user to send and receive e-mails, browse webpages, access streaming media, and the like through the Wi-Fi module 170, which provides a wireless broadband internet access for the user.
And the Bluetooth module 180 is used for performing information interaction with other Bluetooth devices with Bluetooth modules through a Bluetooth protocol. For example, the mobile terminal 110 may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) also equipped with a bluetooth module through the bluetooth module 180, so as to perform data interaction.
Mobile terminal 110 also includes a power supply 190 (e.g., a battery) that powers the various components. The power supply may be logically coupled to the processor 1101 through a power management system to manage charging, discharging, and power consumption functions through the power management system. The mobile terminal 110 may also be configured with a power button for powering on and off the terminal, and locking the screen.
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. Mobile terminal 110 may also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the mobile terminal and each device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 11 is a block diagram of a software structure of a mobile terminal according to an embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the android system is divided into four layers, an application layer, an application framework layer, an android runtime (android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages. As shown in fig. 11, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc. The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 11, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the mobile terminal 110. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, text information is prompted in the status bar, a prompt tone is given, the communication terminal vibrates, and an indicator light flashes.
The android runtime comprises a core library and a virtual machine. The android runtime is responsible for scheduling and management of the android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., openGLES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still picture files, etc. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, picture rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
An embodiment of the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute an image display method of a mobile terminal provided in the above embodiment, for example, the method shown in fig. 1 or fig. 2.
Embodiments of the present application further provide a computer program product including instructions, which, when the computer program product runs on a computer, causes the computer to execute the image display method of the mobile terminal provided in the foregoing method embodiments, for example, the method shown in fig. 1 or fig. 2.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A mobile terminal, characterized in that the mobile terminal comprises a processor and an electronic ink screen; the processor is configured to:
traversing pixel points in a gray image with a first gray scale, and determining a first target gray scale value of each traversed pixel point under a second gray scale based on an initial gray scale value of the pixel point, and an error of the pixel point, wherein the second gray scale is smaller than the first gray scale, and the error of the pixel point is related to the initial gray scale value of the pixel point and the second gray scale;
updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed based on the error of the pixel point;
processing the traversed gray-scale image by adopting a contrast enhancement algorithm to obtain a target image;
and the electronic ink screen is used for displaying the target image.
2. The mobile terminal of claim 1, wherein the first target gray-level value is proportional to a quotient of the initial gray-level value of the pixel point and the second gray-level value.
3. The mobile terminal of claim 2, wherein the processor is configured to:
if the remainder of the division of the initial gray value of the pixel point and the second gray scale level is greater than or equal to the remainder thresholdAnd if so, determining that the first target gray value V of the pixel point under the second gray level number meets the following conditions:
Figure FDA0002611848250000011
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is smaller than the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure FDA0002611848250000012
wherein the content of the first and second substances,
Figure FDA0002611848250000013
and expressing a downward integer, wherein the remainder threshold is one half of the second gray scale, X is the initial gray value of the pixel point, and H is the second gray scale.
4. The mobile terminal according to claim 1, wherein the error of the pixel point is a remainder of division of the initial gray value of the pixel point by the second gray scale number;
or the error of the pixel point is the difference value of the first target gray value of the pixel point and the initial gray value of the pixel point.
5. The mobile terminal according to any one of claims 1 to 4, wherein the grayscale image includes a plurality of pixels arranged in an array; the processor is configured to:
traversing pixel points in the gray level image line by line;
the processor is configured to:
for a first target pixel point which is positioned on the same row of the pixel point and is positioned in the next row of the pixel point, increasing the initial gray value of the first target pixel point by a first numerical value, wherein the first numerical value is the product of the error of the pixel point and a first ratio;
for a second target pixel point which is positioned in the next row of the pixel points and is positioned in the previous row of the pixel points, increasing the initial gray value of the second target pixel point by a second numerical value, wherein the second numerical value is the product of the error of the pixel point and a second ratio;
for a third target pixel point which is positioned in the next row of the pixel points and is positioned in the same column of the pixel points, increasing the initial gray value of the third target pixel point by a third numerical value, wherein the third numerical value is the product of the error of the pixel point and a third ratio;
for a fourth target pixel point which is positioned in the next row of the pixel points and is positioned in the next column of the pixel points, increasing the initial gray value of the fourth target pixel point by a fourth numerical value, wherein the fourth numerical value is the product of the error of the pixel point and a fourth ratio;
wherein the third and fourth ratios are both less than the first ratio, and the first ratio is less than the second ratio.
6. The mobile terminal of any of claims 1 to 4, wherein the processor is further configured to:
acquiring a first maximum value and a first minimum value in initial gray values of pixel points of the gray image;
acquiring a second maximum value and a second minimum value in a first target gray value of a pixel point of the traversed gray image;
the processor is configured to:
updating a first target gray value of the pixel point of the traversed gray image to a second target gray value to obtain a target image;
for each pixel point in the traversed gray-scale image, if the initial gray-scale value of the pixel point is equal to the first minimum value, the second target gray-scale value of the pixel point is twice as large as the first target gray-scale value of the pixel point;
if the initial gray value of the pixel point is greater than the first minimum value and less than the first maximum value, the second target gray value W of the pixel point satisfies: w ═ r + (X-m) X (s-r)/(n-m);
if the initial gray value of the pixel point is equal to the first maximum value, the second target gray value W of the pixel point satisfies the following condition: w ═ s + r;
wherein m is the first minimum value, n is the first maximum value, r is the second minimum value, s is the second maximum value, and X is the initial gray value of the pixel point.
7. The mobile terminal according to any of claims 1 to 4, wherein the electronic ink screen is a color ink screen, the color ink screen comprises a plurality of color blocks with different colors, and each color block corresponds to one pixel point in the grayscale image; the processor is configured to:
and updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed in the pixel point corresponding to the color block with the same color as the color block corresponding to the pixel point based on the error of the pixel point.
8. An image display method of a mobile terminal, wherein the mobile terminal comprises an electronic ink screen, the method comprising:
traversing pixel points in a gray image with a first gray scale, and determining a first target gray scale value of each traversed pixel point under a second gray scale based on an initial gray scale value of the pixel point, and an error of the pixel point, wherein the second gray scale is smaller than the first gray scale, and the error of the pixel point is related to the initial gray scale value of the pixel point and the second gray scale;
updating the initial gray value of the target pixel point which is positioned in the neighborhood of the pixel point and is not traversed based on the error of the pixel point;
processing the traversed gray-scale image by adopting a contrast enhancement algorithm to obtain a target image;
displaying the target image in the electronic ink screen.
9. The method of claim 8, wherein the first target gray scale value is proportional to a quotient of the initial gray scale value of the pixel point and the second gray scale value.
10. The method of claim 9, wherein determining the first target gray scale value of the pixel point at the second gray scale level based on the initial gray scale value of the pixel point comprises:
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is greater than or equal to the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure FDA0002611848250000041
if the remainder obtained by dividing the initial gray value of the pixel point by the second gray scale number is smaller than the remainder threshold, determining that a first target gray value V of the pixel point under the second gray scale number satisfies:
Figure FDA0002611848250000042
wherein the content of the first and second substances,
Figure FDA0002611848250000043
and expressing a downward integer, wherein the remainder threshold is one half of the second gray scale, X is the initial gray value of the pixel point, and H is the second gray scale.
CN202010756823.2A 2020-07-31 2020-07-31 Mobile terminal and image display method thereof Active CN114063945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010756823.2A CN114063945B (en) 2020-07-31 2020-07-31 Mobile terminal and image display method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010756823.2A CN114063945B (en) 2020-07-31 2020-07-31 Mobile terminal and image display method thereof

Publications (2)

Publication Number Publication Date
CN114063945A true CN114063945A (en) 2022-02-18
CN114063945B CN114063945B (en) 2023-11-03

Family

ID=80227426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010756823.2A Active CN114063945B (en) 2020-07-31 2020-07-31 Mobile terminal and image display method thereof

Country Status (1)

Country Link
CN (1) CN114063945B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802056A (en) * 2023-01-31 2023-03-14 南通凯沃智能装备有限公司 User data compression storage method for mobile terminal

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001144961A (en) * 1999-11-18 2001-05-25 Minolta Co Ltd Image processing unit
CN1996384A (en) * 2006-12-25 2007-07-11 华中科技大学 Infrared image multistage mean contrast enhancement method
US20070216956A1 (en) * 2006-03-16 2007-09-20 Quanta Computer Inc. Method and apparatus for adjusting contrast of image
CN101742084A (en) * 2010-01-29 2010-06-16 昆山锐芯微电子有限公司 Contrast ratio enhancement processing method and processing device
US20110122272A1 (en) * 2003-03-10 2011-05-26 Fergason James L Apparatus and method for preparing, storing, transmitting and displaying images
US20120185752A1 (en) * 2010-12-14 2012-07-19 Cavium, Inc. Dram address protection
US20120243013A1 (en) * 2011-03-24 2012-09-27 Seiko Epson Corporation Image processing device, printing device, image processing method, and image processing program
CN103295545A (en) * 2012-02-27 2013-09-11 株式会社日本显示器西 Image display apparatus, method of driving image display apparatus, grayscale conversion program, and grayscale conversion apparatus
CN104092918A (en) * 2014-07-03 2014-10-08 苏州佳世达光电有限公司 Image transformation method and circuit for image transformation
CN104166969A (en) * 2014-08-25 2014-11-26 广东威创视讯科技股份有限公司 Digital image enhancement method and system
CN105391912A (en) * 2015-11-13 2016-03-09 西安诺瓦电子科技有限公司 Imaging processing method based on error diffusion
US20170094201A1 (en) * 2015-09-25 2017-03-30 Canon Kabushiki Kaisha Image sensor, imaging method, and imaging apparatus
CN107948462A (en) * 2017-11-24 2018-04-20 无锡祥生医疗科技股份有限公司 Ultrasound image optimization method and system
CN109191384A (en) * 2018-07-04 2019-01-11 青岛海信移动通信技术股份有限公司 Image processing method, device, mobile terminal and storage medium based on ink screen

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001144961A (en) * 1999-11-18 2001-05-25 Minolta Co Ltd Image processing unit
US20110122272A1 (en) * 2003-03-10 2011-05-26 Fergason James L Apparatus and method for preparing, storing, transmitting and displaying images
US20070216956A1 (en) * 2006-03-16 2007-09-20 Quanta Computer Inc. Method and apparatus for adjusting contrast of image
CN1996384A (en) * 2006-12-25 2007-07-11 华中科技大学 Infrared image multistage mean contrast enhancement method
CN101742084A (en) * 2010-01-29 2010-06-16 昆山锐芯微电子有限公司 Contrast ratio enhancement processing method and processing device
US20120185752A1 (en) * 2010-12-14 2012-07-19 Cavium, Inc. Dram address protection
US20120243013A1 (en) * 2011-03-24 2012-09-27 Seiko Epson Corporation Image processing device, printing device, image processing method, and image processing program
CN103295545A (en) * 2012-02-27 2013-09-11 株式会社日本显示器西 Image display apparatus, method of driving image display apparatus, grayscale conversion program, and grayscale conversion apparatus
CN104092918A (en) * 2014-07-03 2014-10-08 苏州佳世达光电有限公司 Image transformation method and circuit for image transformation
CN104166969A (en) * 2014-08-25 2014-11-26 广东威创视讯科技股份有限公司 Digital image enhancement method and system
US20170094201A1 (en) * 2015-09-25 2017-03-30 Canon Kabushiki Kaisha Image sensor, imaging method, and imaging apparatus
CN105391912A (en) * 2015-11-13 2016-03-09 西安诺瓦电子科技有限公司 Imaging processing method based on error diffusion
CN107948462A (en) * 2017-11-24 2018-04-20 无锡祥生医疗科技股份有限公司 Ultrasound image optimization method and system
CN109191384A (en) * 2018-07-04 2019-01-11 青岛海信移动通信技术股份有限公司 Image processing method, device, mobile terminal and storage medium based on ink screen

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾素云;林珊玲;林志贤;郭太良;唐彪;: "基于邻域灰度信息误差扩散算法的电润湿电子纸研究", 液晶与显示, no. 03 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115802056A (en) * 2023-01-31 2023-03-14 南通凯沃智能装备有限公司 User data compression storage method for mobile terminal

Also Published As

Publication number Publication date
CN114063945B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN111508039B (en) Word processing method of ink screen and communication terminal
CN111343339B (en) Mobile terminal and image display method thereof
CN112184595B (en) Mobile terminal and image display method thereof
CN112114929B (en) Display device and image display method thereof
CN112925596B (en) Mobile terminal and display method of display object thereof
CN113038141B (en) Video frame processing method and electronic equipment
CN114449243A (en) White balance method and terminal equipment
CN111193874B (en) Image display parameter adjusting method and mobile terminal
CN114063945B (en) Mobile terminal and image display method thereof
CN114067758B (en) Mobile terminal and image display method thereof
CN113360122B (en) Mobile terminal and text display method thereof
CN115033199A (en) Mobile terminal and image display method thereof
CN112799557B (en) Ink screen display control method, terminal and computer readable storage medium
CN114863432A (en) Terminal device, contrast adjusting method, device and medium
CN111399955B (en) Mobile terminal and interface display method of application program thereof
CN114639358A (en) Ink screen refreshing method, terminal device, storage medium and program product
CN113760164A (en) Display device and response method of control operation thereof
CN111988530B (en) Mobile terminal and photographing method thereof
CN111479075B (en) Photographing terminal and image processing method thereof
CN113259582B (en) Picture generation method and terminal
CN113179362B (en) Electronic device and image display method thereof
CN111414142B (en) Mobile terminal and display method of application interface thereof
CN115167796A (en) Display content acquisition method, device, terminal equipment and medium
CN111556249A (en) Image processing method based on ink screen, terminal and storage medium
CN113407135A (en) Display control method applied to ink screen and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant