CN111833788B - Screen dimming method and device, terminal and storage medium - Google Patents

Screen dimming method and device, terminal and storage medium Download PDF

Info

Publication number
CN111833788B
CN111833788B CN201910319145.0A CN201910319145A CN111833788B CN 111833788 B CN111833788 B CN 111833788B CN 201910319145 A CN201910319145 A CN 201910319145A CN 111833788 B CN111833788 B CN 111833788B
Authority
CN
China
Prior art keywords
gray scale
gray level
gray
display unit
display
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.)
Active
Application number
CN201910319145.0A
Other languages
Chinese (zh)
Other versions
CN111833788A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201910319145.0A priority Critical patent/CN111833788B/en
Publication of CN111833788A publication Critical patent/CN111833788A/en
Application granted granted Critical
Publication of CN111833788B publication Critical patent/CN111833788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
    • G09G3/3208Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
    • G09G3/3225Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED] using an active matrix

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The disclosure relates to a screen dimming method, a device, a terminal and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: the first display interface of the current screen is compressed to obtain a second display interface, the second display interface is divided into a plurality of first display units, and for each first display unit, gray scales of partial pixel points in the first display unit are modified from the first gray scales originally displayed to second gray scales, and the second gray scales are adjacent gray scales of the first gray scales, so that the second display unit is obtained. The color depth bit number of the second display unit after adjustment is changed, so that the brightness of the displayed content can be correspondingly changed, the effect of adjusting the screen brightness is achieved, and the problem of uneven gray level transition caused by data compression is solved by modifying the display gray level of the pixel point.

Description

Screen dimming method and device, terminal and storage medium
Technical Field
The disclosure relates to the technical field of terminals, and in particular relates to a screen dimming method, a device, a terminal and a storage medium.
Background
With the rapid development of OLED (Organic Light-Emitting Diode) technology, products using OLED screens are increasing. Since the OLED display technology has a self-luminous property, a very thin organic material coating and a glass substrate are used, and when a current is passed through the organic material emits light, the OLED screen has no backlight assembly.
Display brightness adjustment of a screen of a product using an OLED screen is generally performed in two ways, and when the screen brightness is higher than a brightness threshold value, the display brightness of the screen is adjusted by adjusting the Current magnitude of an input signal, which is called DC (Direct Current) dimming; another is to adjust the duty cycle of the bright light to indirectly adjust the display brightness of the screen when the screen brightness is below the brightness threshold, i.e., PWM (Pulse Width Modulation ) dimming.
Disclosure of Invention
The disclosure provides a screen dimming method, a device, a terminal and a storage medium. The technical scheme is as follows.
According to a first aspect of embodiments of the present disclosure, there is provided a screen dimming method, the method including:
compressing a first display interface of a current screen to obtain a second display interface, wherein the color depth of the second display interface is smaller than that of the first display interface;
dividing the second display interface into a plurality of first display units, wherein each first display unit comprises a plurality of pixel points;
and for each first display unit, modifying the gray scale of part of pixel points in the first display unit from the first gray scale originally displayed to a second gray scale, wherein the second gray scale is the adjacent gray scale of the first gray scale, and obtaining a second display unit.
In one possible implementation manner, for each first display unit, the modifying the gray scale of the part of the pixel points in the first display unit from the first gray scale originally displayed to the second gray scale includes:
for each first display unit, determining a target gray scale, wherein the target gray scale is a transition gray scale for enabling the second display interface to display smoothly;
selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale;
and modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
The number of the pixel points to be modified is determined through the target gray level, modification is performed, and the modification result is accurate and high in accuracy.
In another possible implementation manner, the selecting, according to the target gray level, a pixel point for displaying a second gray level from the first display unit includes:
determining a first proportion according to the target gray scale, the first gray scale and the second gray scale, wherein the first proportion is the proportion of the pixel points for displaying the second gray scale to the pixel points included in the first display unit;
and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
The number and the positions of the pixel points for displaying the second gray level can be conveniently and quickly determined by determining the first proportion and according to a preset selection rule.
In another possible implementation, the method further includes:
determining the actual gray scale displayed by each second display unit according to the gray scale of the pixel point in each second display unit;
determining a gray level difference between the actual gray level and the target gray level;
when the gray level difference between the actual gray level and the target gray level is larger than a preset difference value, alternately displaying the first gray level and the second gray level on the pixel point displaying the second gray level.
By alternately displaying the first gray level and the second gray level, the actual gray level can be made further closer to the target gray level.
In another possible implementation manner, the compressing the first display interface of the current screen to obtain the second display interface includes:
and for each pixel point in the first display interface, determining a fourth gray level of the pixel point according to the compression ratio and the third gray level of the pixel point, and modifying the gray level of the pixel point from the third gray level to the fourth gray level to obtain the second display interface.
By compressing the pixel points according to the compression ratio, the compressed gray scale can be more accurately determined.
In another possible implementation, the method further includes:
determining the screen brightness of the current screen;
and when the screen brightness is lower than the preset brightness, executing the step of compressing the first display interface of the current screen to obtain a second display interface.
By executing the corresponding steps when the screen brightness is lower than the preset brightness, the range is small and the operability is high.
In another possible implementation, the method further includes:
and when the brightness of the screen is not lower than the preset brightness, adjusting the brightness of the current screen by adopting a pulse width modulation mode.
When the brightness of the screen is not lower than the preset brightness, the brightness of the current screen is adjusted in a pulse width modulation mode, and the device is simple in structure and high in precision.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for screen dimming, the apparatus comprising:
the compression module is configured to compress a first display interface of a current screen to obtain a second display interface, and the color depth of the second display interface is smaller than that of the first display interface;
A dividing module configured to divide the second display interface into a plurality of first display units, each first display unit including a plurality of pixel points;
the modifying module is configured to modify the gray scale of part of pixel points in each first display unit from the first gray scale originally displayed to a second gray scale, wherein the second gray scale is the adjacent gray scale of the first gray scale, and the second display unit is obtained.
In a possible implementation manner, the modification module is further configured to determine, for each first display unit, a target gray level, where the target gray level is a transition gray level for making the second display interface display smooth; selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale; and modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
In another possible implementation manner, the modification module is further configured to determine a first proportion according to the target gray level, the first gray level and the second gray level, where the first proportion is a proportion of pixels used for displaying the second gray level to pixels included in the first display unit; and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
In another possible implementation, the apparatus further includes:
the first determining module is configured to determine the actual gray scale displayed by each second display unit according to the gray scale of the pixel point in each second display unit;
a second determination module configured to determine a gray level difference between the actual gray level and the target gray level;
and the display module is configured to alternately display the first gray scale and the second gray scale on the pixel point for displaying the second gray scale when the gray scale difference between the actual gray scale and the target gray scale is larger than a preset difference value.
In another possible implementation manner, the compression module is further configured to determine, for each pixel point in the first display interface, a fourth gray level of the pixel point according to a compression ratio and the third gray level of the pixel point, and modify the gray level of the pixel point from the third gray level to the fourth gray level, so as to obtain the second display interface.
In another possible implementation, the apparatus further includes:
a third determining module configured to determine a screen brightness of the current screen;
and the compression module is further configured to compress the first display interface of the current screen to obtain a second display interface when the screen brightness is lower than the preset brightness.
In another possible implementation, the apparatus further includes:
and the adjusting module is further configured to adjust the brightness of the current screen in a pulse width modulation mode when the brightness of the screen is not lower than the preset brightness.
According to a third aspect of embodiments of the present disclosure, there is provided a terminal comprising:
one or more processors;
a memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the method of screen dimming as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions stored thereon, the instructions being executable by a processor of the terminal to perform the method of screen dimming according to the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
the method comprises the steps of obtaining a second display interface by compressing a first display interface of a current screen, dividing the second display interface into a plurality of first display units, and for each first display unit, modifying gray scales of part of pixel points in the first display unit from first gray scales originally displayed to second gray scales, wherein the second gray scales are adjacent gray scales of the first gray scales, so as to obtain the second display unit. The color depth bit number of the second display unit after adjustment is changed, so that the brightness of the displayed content can be correspondingly changed, the effect of adjusting the screen brightness is achieved, and the problem of uneven gray level transition caused by data compression is solved by modifying the display gray level of the pixel point.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flowchart illustrating a screen dimming method according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating another screen dimming method according to an exemplary embodiment;
FIG. 3 is a schematic diagram of a second display unit shown according to an exemplary embodiment;
fig. 4 is a schematic diagram of another second display unit according to an exemplary embodiment;
fig. 5 is a schematic diagram of another second display unit according to an exemplary embodiment;
FIG. 6 is a schematic diagram of another second display unit shown according to an exemplary embodiment;
FIG. 7 is a block diagram of an apparatus for screen dimming, according to an example embodiment;
fig. 8 is a block diagram of a terminal according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
First, an application scenario of the method provided by the present disclosure will be described, and an application in a terminal will be described as an example. The terminal is a terminal using an OLED screen, and the OLED screen is without a backlight assembly due to the characteristics of the OLED display technology, and the adjustment of the display brightness of the screen is generally that the brightness of the screen is higher than a brightness threshold value by using DC dimming and the brightness of the screen is lower than the brightness threshold value by using PWM dimming. PWM dimming is to adjust the duty ratio of the bright light, that is, adjust the time ratio of the bright light to indirectly adjust the display brightness of the screen, and achieve the effect of controlling the brightness based on the characteristics of human eyes. However, this approach has a problem that the brightness is low and the frequency of the switching between on and off is low below the brightness threshold, which is already to the extent that the human eye can perceive, so that the display effect is poor although the scheme is low in cost. To realize that DC dimming is also used when the brightness of the screen is low, the display brightness of the screen can be adjusted by modifying the color data displayed by the screen, the data displayed by the screen is compressed, the number of bits of color depth is reduced, the brightness of displayed contents can be correspondingly changed, the effect of adjusting the brightness of the screen is achieved, and according to the method provided by the disclosure, the problem of uneven gray level transition caused by color depth reduction can be avoided by modifying the display gray level of the pixel point after the data displayed by the screen is compressed.
Fig. 1 is a flowchart illustrating a screen dimming method according to an exemplary embodiment, as shown in fig. 1, including the following steps.
In step S101, the terminal compresses a first display interface of a current screen to obtain a second display interface, where the color depth of the second display interface is smaller than that of the first display interface;
in step S102, the terminal divides the second display interface into a plurality of first display units, each of which includes a plurality of pixel points;
in step S103, for each first display unit, the terminal modifies the gray scale of a portion of the pixel points in the first display unit from the first gray scale originally displayed to a second gray scale, where the second gray scale is an adjacent gray scale of the first gray scale, to obtain a second display unit.
In one possible implementation manner, for each first display unit, modifying the gray scale of a part of pixel points in the first display unit from the first gray scale originally displayed to the second gray scale includes:
for each first display unit, determining a target gray scale, wherein the target gray scale is a transition gray scale for enabling the second display interface to display smoothly;
selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale;
And modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
The number of the pixel points to be modified is determined through the target gray level, modification is performed, and the modification result is accurate and high in accuracy.
In another possible implementation manner, selecting a pixel point for displaying the second gray level from the first display unit according to the target gray level includes:
determining a first proportion according to the target gray scale, the first gray scale and the second gray scale, wherein the first proportion is the proportion of the pixel points for displaying the second gray scale to the pixel points included in the first display unit;
and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
The number and the positions of the pixel points for displaying the second gray level can be conveniently and quickly determined by determining the first proportion and according to a preset selection rule.
In another possible implementation, the method further includes:
determining the actual gray scale displayed by each second display unit according to the gray scale of the pixel point in each second display unit;
determining a gray level difference between the actual gray level and the target gray level;
when the gray level difference between the actual gray level and the target gray level is larger than the preset difference value, alternately displaying the first gray level and the second gray level on the pixel point displaying the second gray level.
By alternately displaying the first gray level and the second gray level, the actual gray level can be made further closer to the target gray level.
In another possible implementation manner, compressing the first display interface of the current screen to obtain the second display interface includes:
and for each pixel point in the first display interface, determining a fourth gray level of the pixel point according to the compression ratio and the third gray level of the pixel point, and modifying the gray level of the pixel point from the third gray level to the fourth gray level to obtain a second display interface.
By compressing the pixel points according to the compression ratio, the compressed gray scale can be more accurately determined.
In another possible implementation, the method further includes:
determining the screen brightness of the current screen;
and when the screen brightness is lower than the preset brightness, executing the step of compressing the first display interface of the current screen to obtain a second display interface.
By executing the corresponding steps when the screen brightness is lower than the preset brightness, the range is small and the operability is high.
In another possible implementation, the method further includes:
when the brightness of the screen is not lower than the preset brightness, the brightness of the current screen is adjusted by adopting a pulse width modulation mode.
When the brightness of the screen is not lower than the preset brightness, the brightness of the current screen is adjusted in a pulse width modulation mode, and the screen brightness adjusting device is simple in structure and high in precision.
In the embodiment of the disclosure, a second display interface is obtained by compressing a first display interface of a current screen, the second display interface is divided into a plurality of first display units, and for each first display unit, gray scales of part of pixel points in the first display unit are modified from first gray scales originally displayed to second gray scales, and the second gray scales are adjacent gray scales of the first gray scales, so that the second display unit is obtained. The color depth bit number of the second display unit after adjustment is changed, so that the brightness of the displayed content can be correspondingly changed, the effect of adjusting the screen brightness is achieved, and the problem of uneven gray level transition caused by data compression is solved by modifying the display gray level of the pixel point.
Fig. 2 is a flowchart illustrating a screen dimming method according to an exemplary embodiment, as shown in fig. 2, including the following steps.
In step S201, the terminal determines the screen brightness of the current screen.
When the terminal receives the brightness adjustment instruction, firstly determining the screen brightness of the current screen, and when the terminal determines that the screen brightness of the current screen is not lower than the preset brightness, the terminal can adjust the screen brightness of the current screen in a pulse width modulation mode or adjust the brightness of the current screen in a current adjustment mode; when the terminal determines that the brightness of the current screen is lower than the preset brightness, the terminal performs steps S202 to S204 to achieve the purpose of adjusting the screen brightness of the current screen.
It should be noted that, when the terminal receives the brightness adjustment instruction, the terminal may also directly execute the step of compressing the first display interface of the current screen to obtain the second display interface in step 202.
In step S202, when the screen brightness is lower than the preset brightness, the terminal compresses the first display interface of the current screen to obtain a second display interface.
This step can be achieved by the following steps (1) to (2).
(1) When the terminal determines that the screen brightness is lower than the preset brightness, acquiring the target screen brightness to be adjusted, and determining the compression ratio according to the target screen brightness and the current screen brightness. In determining the compression ratio, the terminal may take a ratio of a color depth of the current screen brightness to a color depth of the target screen brightness as the compression ratio.
For example, the color depth of the current screen brightness is 8 bits, which means that 0 to 255 total 256 gray scales, the color depth of the target screen brightness is 6 bits, which means that 0 to 63 total 64 gray scales, and the ratio of the color depth of the current screen brightness to the color depth of the target screen brightness is 0.25, and the compression ratio is 0.25.
(2) After the terminal determines the compression ratio, for each pixel in the first display interface, the terminal determines a fourth gray level of the pixel according to the compression ratio and the third gray level of the pixel, and modifies the gray level of the pixel from the third gray level to the fourth gray level to obtain the second display interface. The first display interface is an interface currently displayed by a screen of the terminal, and the first interface can be a picture, a standby main interface, a frame of a video picture or a browser interface, which is not particularly limited in the disclosure; the second display interface is a display interface obtained by adjusting each pixel point of the first display interface, and the color depth of the second display interface is smaller than that of the first display interface.
The third gray level of the pixel point is the gray level displayed by the pixel point at the current screen brightness, and the fourth gray level of the pixel point is the gray level displayed by the pixel point at the target screen brightness. When the third gray level of the pixel point is adjusted to be the fourth gray level, the following steps are adopted: multiplying the third gray level of the pixel point by the compression ratio to obtain a seventh gray level, wherein the seventh gray level is the gray level after the theoretical third gray level adjustment, and the seventh gray level is taken as a fourth gray level when the seventh gray level is an integer because the displayed gray levels are all integers and no decimal is present; when the seventh gray level is not an integer, the fourth gray level is a whole number down to the seventh gray level.
For example, the gray scale of a certain pixel point is 240, the compression ratio is 0.25, the third gray scale of the pixel point is multiplied by the compression ratio to obtain the seventh gray scale of the pixel point is 60, and the seventh gray scale is taken as the fourth gray scale, namely the fourth gray scale of the pixel point is 60; the third gray level of the other pixel is 253, the compression ratio is 0.25, the third gray level of the pixel is multiplied by the compression ratio to obtain the seventh gray level 63.25 of the pixel, the integer gray level obtained by rounding the seventh gray level downwards is 63, and the fourth gray level of the pixel is 63.
In step S203, the terminal divides the second display interface into a plurality of first display units, each of which includes a plurality of pixel points.
The terminal divides the second display interface into a plurality of preset adjacent pixel points to form a first display unit, namely each first display unit comprises a plurality of pixel points. The number of the preset units may be four, six, or nine, which is not particularly limited in the present disclosure.
In step S204, for each first display unit, the terminal modifies the gray scale of a portion of the pixel points in the first display unit from the first gray scale originally displayed to a second gray scale, where the second gray scale is an adjacent gray scale of the first gray scale, to obtain a second display unit.
After the terminal divides the plurality of first display units, gray scales of pixel points in each first display unit need to be adjusted so as to enable the second display interface to be displayed smoothly. Accordingly, this step can be realized by the following steps (1) to (3).
(1) For each first display unit, the terminal determines a target gray level, which is a transition gray level for enabling the second display interface to display smoothly.
Since each pixel is adjusted from the third gray level to the fourth gray level, there may be a difference between the gray levels displayed by the adjacent first display units. Thus, the terminal can determine the target gray level based on the difference.
In one possible implementation, the terminal may determine the target gray level according to a difference between fourth gray levels of the adjacent two first display units; in another possible implementation, the target gray level may be determined according to a difference between third gray levels of adjacent two first display units.
For example, when the third gray level of the pixel point in a certain first display unit is 252, the fourth gray level of the adjusted pixel point is 63, the third gray level of the pixel point of another first display unit adjacent to the first display unit is 251, and the fourth gray level of the adjusted pixel point is 62, the target gray level is 62.875 when the target gray level is determined according to the third gray level; when the target gray level is determined according to the fourth gray level, the target gray level is 62.5.
(2) And the terminal selects a pixel point for displaying the second gray scale from the first display unit according to the target gray scale.
The terminal determines a first ratio according to the target gray level, the first gray level and the second gray level, wherein the first ratio is a ratio of pixels for displaying the second gray level to pixels included in the first display unit, and the first ratio= (first gray level-target gray level)/(first gray level-second gray level). Wherein the deriving step of the first ratio may be as follows: the number M of the pixels of the first display unit is determined, the first proportion is represented as P, the number of the pixels displaying the second gray scale is MxP, the number of the pixels displaying the first gray scale is Mx (1-P), and according to the target gray scale xM=the first gray scale xM× (1-P) +the second gray scale xM×P, the first proportion = (first gray scale-target gray scale)/(first gray scale-second gray scale) is obtained.
After the terminal determines the first proportion, the number of the pixel points for displaying the second gray scale can be determined according to the number of the pixel points of the first display unit, when the number of the pixel points for displaying the second gray scale determined according to the first proportion is not an integer, the terminal rounds down to obtain an integer number of the pixel points for displaying the second gray scale, and then the pixel points for displaying the second gray scale are selected from the pixel points included in the first display unit according to a preset selection rule. The preset selection rule may be a random selection or a selection mode based on uniform distribution.
(3) And the terminal modifies the gray scale of the determined pixel point from the first gray scale to the second gray scale to obtain a second display unit.
It should be noted that, the greater the above-mentioned preset number, that is, the more pixels each first display unit includes, the greater the target gray scale range that the second display unit can represent.
For example, fig. 3 is a schematic diagram of a second display unit shown according to an exemplary embodiment. In fig. 3, each small square represents a pixel, the second display unit includes 9 pixels, the first gray scale displayed by the pixels is 62, the second gray scale displayed by the pixels is 63, and the target gray scale determined according to the fourth gray scale is 62.5, so that the first ratio can be calculated to be 0.5. That is, 4.5 pixels are selected from the 9 pixels to display the second gray scale, and since there is no half of the pixels, 4 pixels are selected from the 9 pixels to display the second gray scale. According to the uniformly distributed selection mode, the gray scales of 4 selected pixel points from 9 pixel points are modified from the first gray scale to the second gray scale.
Fig. 4 is a schematic diagram illustrating another second display unit according to an exemplary embodiment, in fig. 4, the second display unit includes 9 pixels, the first gray level displayed by the pixels is 63, and the second gray level displayed by the pixels is 62. The third gray scales before the adjustment of the two adjacent second display units are 252 and 251 respectively, and the target gray scale determined according to the third gray scales is 62.875, so that the first ratio can be calculated to be 0.125. That is, 1.125 pixel points are selected from 9 pixel points to display the second gray level, and 1 pixel point is selected from 9 pixel points to display the second gray level because half pixel points do not exist.
Fig. 5 is a schematic diagram illustrating another second display unit according to an exemplary embodiment, and 3 pixel points are selected from 9 pixel points in fig. 5 to display a second gray level.
It should be noted that, since the target gray level and the gray level actually displayed are not identical, there is still a certain error, the source of the error is that the number of the pixels displaying the second gray level determined according to the first ratio is not an integer, and step S205 may be performed to further adjust the gray level actually displayed so as to be closer to the target gray level.
For example, taking fig. 5 as an example, the target gray level of the second display unit in fig. 5 is 62.125, and the actual gray level is 62.333 greater than the target gray level. Therefore, in order to improve the display effect, step S205 is performed.
In step S205, when the gray scale difference between the actual gray scale and the target gray scale displayed by the second display unit is greater than the preset difference, the terminal alternately displays the first gray scale and the second gray scale on the pixel point displaying the second gray scale.
For each second display unit, the terminal determines the actual gray scale displayed by the second display unit according to the gray scale of the pixel point in the second display unit. The step of determining the actual gray scale is to take the ratio of the sum of the gray scales of all the pixel points in the second display unit to the number of the pixel points in the second display unit as the actual gray scale displayed by the second display unit.
And determining the gray level difference between the actual gray level and the target gray level of the second display unit, and alternately displaying the first gray level and the second gray level on the pixel point displaying the second gray level when the gray level difference is larger than the preset difference value and the gray level displayed in practice is larger than the target gray level. The preset difference may be zero or a value greater than zero, which is not specifically limited in the present disclosure. The display interval of alternately displaying the first gray level and the second gray level by the pixel point displaying the second gray level may be 1/60ms, that is, once every frame is alternately performed, or may be 1/30ms, that is, once every two frames are alternately performed, which is not particularly limited in the present disclosure.
For example, fig. 6 is a schematic diagram of another second display unit shown according to an exemplary embodiment. As shown in fig. 6, the first gray level is 62, the second gray level is 63, and the display interval is 1/60ms, i.e., 16.67ms.
In the embodiment of the disclosure, a second display interface is obtained by compressing a first display interface of a current screen, the second display interface is divided into a plurality of first display units, and for each first display unit, gray scales of part of pixel points in the first display unit are modified from first gray scales originally displayed to second gray scales, and the second gray scales are adjacent gray scales of the first gray scales, so that the second display unit is obtained. The brightness of the displayed content can be reduced due to the reduction of the color depth digits of the adjusted second display unit, the effect of reducing the screen brightness is achieved, and the phenomenon of screen flashing does not exist.
Fig. 7 is a block diagram of an apparatus for screen dimming according to an exemplary embodiment. Referring to fig. 7, the apparatus includes a compression module 701, a division module 702, and a modification module 703.
The compression module 701 is configured to compress the first display interface of the current screen to obtain a second display interface, where the color depth of the second display interface is smaller than that of the first display interface;
A dividing module 702 configured to divide the second display interface into a plurality of first display units, each first display unit including a plurality of pixel points;
the modifying module 703 is configured to modify, for each first display unit, the gray scale of a portion of the pixel points in the first display unit from the first gray scale originally displayed to a second gray scale, where the second gray scale is an adjacent gray scale of the first gray scale, so as to obtain a second display unit.
In a possible implementation, the modifying module 703 is further configured to determine, for each first display unit, a target gray level, where the target gray level is a transition gray level for smoothing the display of the second display interface; selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale; and modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
In another possible implementation manner, the modifying module 703 is further configured to determine a first proportion according to the target gray level, the first gray level and the second gray level, where the first proportion is a proportion of the pixel points for displaying the second gray level to the pixel points included in the first display unit; and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
In another possible implementation, the apparatus further includes:
the first determining module is configured to determine the actual gray scale displayed by each second display unit according to the gray scale of the pixel point in each second display unit;
a second determination module configured to determine a gray level difference between the actual gray level and the target gray level;
the display module is configured to alternately display the first gray scale and the second gray scale on the pixel point for displaying the second gray scale when the gray scale difference between the actual gray scale and the target gray scale is larger than a preset difference value.
In another possible implementation manner, the compression module 701 is further configured to determine, for each pixel point in the first display interface, a fourth gray level of the pixel point according to the compression ratio and the third gray level of the pixel point, and modify the gray level of the pixel point from the third gray level to the fourth gray level, so as to obtain the second display interface.
In another possible implementation, the apparatus further includes:
a third determining module configured to determine a screen brightness of the current screen;
the compression module 701 is further configured to compress the first display interface of the current screen to obtain the second display interface when the brightness of the screen is lower than the preset brightness.
In another possible implementation, the apparatus further includes:
and the adjusting module is also configured to adjust the brightness of the current screen in a pulse width modulation mode when the brightness of the screen is not lower than the preset brightness.
In the embodiment of the disclosure, a second display interface is obtained by compressing a first display interface of a current screen, the second display interface is divided into a plurality of first display units, and for each first display unit, gray scales of part of pixel points in the first display unit are modified from first gray scales originally displayed to second gray scales, and the second gray scales are adjacent gray scales of the first gray scales, so that the second display unit is obtained. The color depth bit number of the second display unit after adjustment is changed, so that the brightness of the displayed content can be correspondingly changed, the effect of adjusting the screen brightness is achieved, and the problem of uneven gray level transition caused by data compression is solved by modifying the display gray level of the pixel point.
Fig. 8 is a block diagram of a terminal according to an exemplary embodiment. For example, the terminal 800 may be an intercom, mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 8, a terminal 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the terminal 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the terminal 800. Examples of such data include instructions for any application or method operating on the terminal 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 806 provides power to the various components of the terminal 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 800.
The multimedia component 808 includes a screen between the terminal 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 800 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the terminal 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the terminal 800. For example, the sensor assembly 814 may detect an on/off state of the terminal 800, a relative positioning of the components, such as a display and keypad of the terminal 800, a change in position of the terminal 800 or a component of the terminal 800, the presence or absence of user contact with the terminal 800, an orientation or acceleration/deceleration of the terminal 800, and a change in temperature of the terminal 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the terminal 800 and other devices, either wired or wireless. The terminal 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications.
In an exemplary embodiment, the terminal 800 can be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of terminal 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The present disclosure also provides a non-transitory computer readable storage medium having stored thereon at least one instruction, at least one program, a set of codes, or a set of instructions loaded and executed by a processor to implement the operations performed by the terminal in the method of screen dimming of the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method of screen dimming, the method comprising:
compressing a first display interface of a current screen to obtain a second display interface, wherein the color depth of the second display interface is smaller than that of the first display interface;
dividing the second display interface into a plurality of first display units, wherein each first display unit comprises a plurality of pixel points;
for each first display unit, modifying the gray scale of part of pixel points in the first display unit from the first gray scale originally displayed to a second gray scale, wherein the second gray scale is the adjacent gray scale of the first gray scale, and obtaining a second display unit;
determining the actual gray scale displayed by each second display unit according to the gray scale of the pixel point in each second display unit;
determining a gray level difference between the actual gray level and a target gray level, wherein the target gray level is a transition gray level for enabling the second display interface to display smoothly;
and when the gray level difference between the actual gray level and the target gray level is larger than a preset difference value, alternately displaying the first gray level and the second gray level on the pixel point displaying the second gray level.
2. The method of claim 1, wherein for each first display unit, modifying the gray scale of the partial pixel points in the first display unit from the first gray scale originally displayed to the second gray scale comprises:
Determining the target gray scale for each first display unit;
selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale;
and modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
3. The method according to claim 2, wherein selecting a pixel for displaying a second gray level from the first display unit according to the target gray level comprises:
determining a first proportion according to the target gray scale, the first gray scale and the second gray scale, wherein the first proportion is the proportion of the pixel points for displaying the second gray scale to the pixel points included in the first display unit;
and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
4. The method of claim 1, wherein compressing the first display interface of the current screen to obtain the second display interface comprises:
and for each pixel point in the first display interface, determining a fourth gray level of the pixel point according to the compression ratio and the third gray level of the pixel point, and modifying the gray level of the pixel point from the third gray level to the fourth gray level to obtain the second display interface.
5. The method according to claim 1, wherein the method further comprises:
determining the screen brightness of the current screen;
and when the screen brightness is lower than the preset brightness, executing the step of compressing the first display interface of the current screen to obtain a second display interface.
6. A device for screen dimming, the device comprising:
the compression module is configured to compress a first display interface of a current screen to obtain a second display interface, and the color depth of the second display interface is smaller than that of the first display interface;
a dividing module configured to divide the second display interface into a plurality of first display units, each first display unit including a plurality of pixel points;
the modification module is configured to modify the gray scale of part of pixel points in each first display unit from the first gray scale originally displayed to a second gray scale, wherein the second gray scale is the adjacent gray scale of the first gray scale, and a second display unit is obtained;
the modification module is further configured to determine an actual gray level displayed by each second display unit according to the gray level of the pixel point in each second display unit; determining a gray level difference between the actual gray level and a target gray level, wherein the target gray level is a transition gray level for enabling the second display interface to display smoothly; and when the gray level difference between the actual gray level and the target gray level is larger than a preset difference value, alternately displaying the first gray level and the second gray level on the pixel point displaying the second gray level.
7. The apparatus of claim 6, wherein the modification module is further configured to determine the target gray scale for each first display element; selecting a pixel point for displaying a second gray scale from the first display unit according to the target gray scale; and modifying the gray scale of the determined pixel point from the first gray scale to the second gray scale.
8. The apparatus of claim 7, wherein the modification module is further configured to determine a first ratio of pixels for displaying the second gray scale to pixels included in the first display unit according to the target gray scale, the first gray scale, and the second gray scale; and selecting a pixel point for displaying the second gray scale from the pixel points included in the first display unit according to the first proportion and a preset selection rule.
9. The apparatus of claim 6, wherein the compression module is further configured to determine, for each pixel in the first display interface, a fourth gray level of the pixel according to a compression ratio and a third gray level of the pixel, and modify the gray level of the pixel from the third gray level to the fourth gray level to obtain the second display interface.
10. The apparatus of claim 6, wherein the apparatus further comprises:
a third determining module configured to determine a screen brightness of the current screen;
and the compression module is further configured to compress the first display interface of the current screen to obtain a second display interface when the screen brightness is lower than the preset brightness.
11. A terminal, comprising:
one or more processors;
a memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the method of screen dimming of any of claims 1-5.
12. A non-transitory computer readable storage medium having instructions stored thereon that are executed by a processor to perform the method of screen dimming of any of claims 1-5.
CN201910319145.0A 2019-04-19 2019-04-19 Screen dimming method and device, terminal and storage medium Active CN111833788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910319145.0A CN111833788B (en) 2019-04-19 2019-04-19 Screen dimming method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910319145.0A CN111833788B (en) 2019-04-19 2019-04-19 Screen dimming method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111833788A CN111833788A (en) 2020-10-27
CN111833788B true CN111833788B (en) 2023-08-04

Family

ID=72911415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910319145.0A Active CN111833788B (en) 2019-04-19 2019-04-19 Screen dimming method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111833788B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5489918A (en) * 1991-06-14 1996-02-06 Rockwell International Corporation Method and apparatus for dynamically and adjustably generating active matrix liquid crystal display gray level voltages
GB0022250D0 (en) * 2000-09-12 2000-10-25 Pace Micro Tech Plc Bitmap graphics compression for image data
CN1839618A (en) * 2003-05-13 2006-09-27 丹麦医疗探测有限公司 Method and system for remote and adaptive visualization of graphical image data
CN101256751A (en) * 2008-04-03 2008-09-03 上海广电光电子有限公司 Method for improving color depth of LCD device
CN101630501A (en) * 2008-07-14 2010-01-20 比亚迪股份有限公司 Method and system for displaying image
KR20110135085A (en) * 2010-06-10 2011-12-16 엘지디스플레이 주식회사 Method of controlling picture quality and display device using the same
WO2016163314A1 (en) * 2015-04-10 2016-10-13 シャープ株式会社 Liquid crystal display device and method for driving same
WO2016165357A1 (en) * 2015-04-15 2016-10-20 深圳市中兴微电子技术有限公司 Image processing method and apparatus, terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040240752A1 (en) * 2003-05-13 2004-12-02 Dobbs Andrew Bruno Method and system for remote and adaptive visualization of graphical image data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5489918A (en) * 1991-06-14 1996-02-06 Rockwell International Corporation Method and apparatus for dynamically and adjustably generating active matrix liquid crystal display gray level voltages
GB0022250D0 (en) * 2000-09-12 2000-10-25 Pace Micro Tech Plc Bitmap graphics compression for image data
CN1839618A (en) * 2003-05-13 2006-09-27 丹麦医疗探测有限公司 Method and system for remote and adaptive visualization of graphical image data
CN101256751A (en) * 2008-04-03 2008-09-03 上海广电光电子有限公司 Method for improving color depth of LCD device
CN101630501A (en) * 2008-07-14 2010-01-20 比亚迪股份有限公司 Method and system for displaying image
KR20110135085A (en) * 2010-06-10 2011-12-16 엘지디스플레이 주식회사 Method of controlling picture quality and display device using the same
WO2016163314A1 (en) * 2015-04-10 2016-10-13 シャープ株式会社 Liquid crystal display device and method for driving same
WO2016165357A1 (en) * 2015-04-15 2016-10-20 深圳市中兴微电子技术有限公司 Image processing method and apparatus, terminal and storage medium

Also Published As

Publication number Publication date
CN111833788A (en) 2020-10-27

Similar Documents

Publication Publication Date Title
JP7166171B2 (en) INTERFACE IMAGE DISPLAY METHOD, APPARATUS AND PROGRAM
WO2017024728A1 (en) Method and device for reducing display brightness
CN108492767A (en) Prevent the method, apparatus and storage medium of display burn-in
CN113257162B (en) Screen brightness adjusting method and device and storage medium
CN112201211B (en) Ambient light collection method and device, terminal and storage medium
CN112562609B (en) Brightness adjusting method, electronic device, display panel and electronic equipment
JP2019514031A (en) Viewing angle switching method, apparatus, program, and recording medium
CN113450713A (en) Screen display method and device and gray scale mapping information generation method and device
CN106775235B (en) Screen wallpaper display method and device
CN111341254A (en) Brightness adjusting method and device of display screen
CN114639342A (en) Display panel brightness control method and device, display equipment and electronic equipment
CN108877700B (en) Method and device for displaying image
CN114067733B (en) Display screen correction method, display screen correction device and display chip
CN111131596B (en) Screen brightness adjusting method and device
CN113257177B (en) Brightness control method and device and electronic equipment
CN111833788B (en) Screen dimming method and device, terminal and storage medium
CN112019680A (en) Screen brightness adjusting method and device
CN111383608A (en) Display control method and apparatus, electronic device, and computer-readable storage medium
CN111383583B (en) Display control method and apparatus, electronic device, and computer-readable storage medium
CN111383568B (en) Display control method and device, electronic equipment and computer readable storage medium
CN116453459A (en) Screen display method and device, readable storage medium and electronic equipment
CN114913818A (en) Backlight brightness adjusting method and device, electronic equipment and storage medium
CN106601165B (en) Screen display method and device
CN108538261B (en) Display control method and device and display equipment
CN112669741B (en) Light emission control method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant