CN114078452B - Method for adjusting content contrast, electronic device and storage medium - Google Patents

Method for adjusting content contrast, electronic device and storage medium Download PDF

Info

Publication number
CN114078452B
CN114078452B CN202010819733.3A CN202010819733A CN114078452B CN 114078452 B CN114078452 B CN 114078452B CN 202010819733 A CN202010819733 A CN 202010819733A CN 114078452 B CN114078452 B CN 114078452B
Authority
CN
China
Prior art keywords
color
color value
picture
value
channel
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
CN202010819733.3A
Other languages
Chinese (zh)
Other versions
CN114078452A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010819733.3A priority Critical patent/CN114078452B/en
Publication of CN114078452A publication Critical patent/CN114078452A/en
Application granted granted Critical
Publication of CN114078452B publication Critical patent/CN114078452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G09G3/34Control 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 by control of light from an independent source
    • G09G3/36Control 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 by control of light from an independent source using liquid crystals
    • G09G3/3607Control 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 by control of light from an independent source using liquid crystals for displaying colours or for displaying grey scales with a specific pixel layout, e.g. using sub-pixels
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/02Improving the quality of display appearance
    • G09G2320/0271Adjustment of the gradation levels within the range of the gradation scale, e.g. by redistribution or clipping
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/0666Adjustment of display parameters for control of colour parameters, e.g. colour temperature

Landscapes

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

Abstract

The application provides a method for adjusting content contrast, electronic equipment and a storage medium, relates to the technical field of liquid crystal display, and can solve the problem of image smear through adjusting the content contrast in an image. The method for adjusting the content contrast of the picture to be displayed comprises the following steps: periodically adjusting the content contrast of the picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps: acquiring a color value distribution histogram of at least one frame of picture, wherein the color value distribution histogram is used for reflecting the corresponding relation between color values and the number; obtaining a color value of a foreground color and a color value of a background color corresponding to a picture to be displayed based on the acquired color value distribution histogram of at least one frame of picture; if the color value of the foreground color and the color value of the background color do not meet the preset liquid crystal response condition, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed; and displaying the picture to be displayed after the content contrast is adjusted.

Description

Method for adjusting content contrast, electronic device and storage medium
Technical Field
The present disclosure relates to the field of liquid crystal display technologies, and in particular, to a method for adjusting content contrast, an electronic device, and a storage medium.
Background
The Liquid Crystal Display (LCD) controls the backlight emission amount by the different turning angles of the Liquid Crystal, the different backlight emission amounts cooperate with the color filter layers of different colors to form corresponding colors, the turning of the Liquid Crystal is controlled by the electric field, the strength of the electric field is related to the driving voltage applied on the pixel electrode, the higher the driving voltage value is, the faster the corresponding Liquid Crystal turning speed is, the Display of the Liquid Crystal turning, i.e. the screen pixel is changed from one color to another color, the turning process of the Liquid Crystal needs a certain time, if the picture refreshing rate is higher, the user may see the residue of the previous frame color, and the new color of the next frame is not displayed completely, i.e. the user may see the 'smear' in the continuous picture.
Disclosure of Invention
The technical scheme of the application provides a method for adjusting content contrast, electronic equipment and a storage medium, and the problem of image smear can be improved by adjusting the content contrast in an image.
A first aspect provides a method for adjusting content contrast of a picture to be displayed, including: periodically adjusting the content contrast of the picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps: acquiring a color value distribution histogram of at least one frame of picture, wherein the color value distribution histogram is used for reflecting the corresponding relation between color values and the number; obtaining a color value of a foreground color and a color value of a background color corresponding to the picture to be displayed based on the acquired color value distribution histogram of the at least one frame of picture; if the color value of the foreground color and the color value of the background color do not meet the preset liquid crystal response condition, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed; and displaying the picture to be displayed after the content contrast is adjusted.
In a possible embodiment, obtaining a color value distribution histogram of at least one frame of picture includes: acquiring a color value distribution histogram of a frame of picture to be displayed; the process of obtaining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the acquired color value distribution histogram of at least one frame of picture comprises the following steps: based on a color value distribution histogram of a frame of picture to be displayed, taking two color values having the largest number as color values of a foreground color and a background color, respectively; or based on the color value distribution histogram of the frame of picture to be displayed, respectively using two color values which reach the preset number and meet the color called by the foreground application as the color value of the foreground color and the color value of the background color.
In a possible embodiment, obtaining a color value distribution histogram of at least one frame of picture includes: acquiring a color value distribution histogram of at least two frames of continuous pictures, wherein the at least two frames of continuous pictures comprise displayed pictures adjacent to pictures to be displayed; the process of obtaining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the acquired color value distribution histogram of the at least one frame of picture comprises the following steps: based on the color value distribution histogram of each frame of the acquired picture, respectively taking the two color values with the maximum number as the color values of the foreground color of the frame and the background color of the frame; color values obtained after the color values of all the frame foreground colors are processed by a preset algorithm are used as color values of the foreground colors, color values obtained after the color values of all the frame background colors are processed by the preset algorithm are used as color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, a weighted average value or a median value; or based on the acquired color value distribution histogram of each frame of picture, respectively taking two color values which reach a preset number and meet the requirement of foreground application calling color as the color value of the foreground color of the frame and the color value of the background color of the frame; the color values obtained after the color values of all the frame foreground colors are processed by a preset algorithm are used as the color values of the foreground colors, the color values obtained after the color values of all the frame background colors are processed by the preset algorithm are used as the color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, taking a weighted average value or taking a median value.
In one possible embodiment, the color values include an R channel color value, a G channel color value, and a B channel color value, and the color value distribution histogram includes an R channel color value distribution histogram, a G channel color value distribution histogram, and a B channel color value distribution histogram; or the color value is a gray scale color value obtained by weighted conversion of the R channel color value, the G channel color value and the B channel color value, and the color value distribution histogram is a gray scale color value distribution histogram; alternatively, the color value is a pixel color in which an R channel color value, a G channel color value, and a B channel color value are combined, and the color value distribution histogram is a pixel color distribution histogram.
In a possible implementation manner, before periodically adjusting the content contrast of the picture to be displayed, the method further includes: and responding to a page scrolling instruction, and triggering the periodical adjustment of the content contrast of the picture to be displayed.
In a possible implementation manner, before periodically adjusting the content contrast of the picture to be displayed, the method further includes: and acquiring the type of the application program operated by the foreground, and triggering the periodical adjustment of the content contrast of the picture to be displayed if the type of the application program operated by the foreground belongs to a preset type.
A second aspect provides a method for adjusting content contrast of a picture to be displayed, comprising: periodically adjusting the content contrast of the picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps: acquiring a color value pair distribution histogram of at least one group of pictures, wherein each group of pictures comprises two adjacent frames of pictures, the color value pair distribution histogram is used for reflecting the corresponding relation between a color value pair and the number, the color value pair comprises a first color value and a second color value, the two adjacent frames of pictures are respectively used as a previous frame of picture and a next frame of picture, and the first color value and the second color value are respectively the color values of the previous frame of picture and the next frame of picture at the same position; obtaining a color value of a foreground color and a color value of a background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures; if the color value of the foreground color and the color value of the background color do not meet the preset liquid crystal response condition, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed; and displaying the picture to be displayed after the content contrast is adjusted.
In a possible embodiment, the process of obtaining a distribution histogram of color value pairs for at least one group of pictures comprises: acquiring two continuous frames of pictures, wherein the two continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed; taking the obtained two continuous frames of pictures as a group of pictures, and obtaining a corresponding color value pair distribution histogram;
the process of obtaining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures comprises the following steps: based on the obtained color value pair distribution histogram, the first color value and the second color value in the color value pair having the largest number are respectively taken as the color value of the foreground color and the color value of the background color.
In one possible embodiment, obtaining a color value pair distribution histogram for at least one group of pictures comprises: acquiring at least three continuous frames of pictures, wherein the at least three continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed; taking any two adjacent frames of pictures in at least three continuous frames of pictures as a group of pictures, and acquiring a color value pair distribution histogram of each group of pictures;
obtaining a color value of a foreground color and a color value of a background color corresponding to a picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures, wherein the color value pair distribution histogram comprises: based on the color value pair distribution histogram of each group of acquired pictures, respectively taking a first color value and a second color value in the color value pair with the largest number as a color value of a group foreground color and a color value of a group background color; color values obtained after the color values of all groups of foreground colors are processed by a preset algorithm are used as color values of the foreground colors, color values obtained after the color values of all groups of background colors are processed by the preset algorithm are used as color values of the foreground colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, taking a weighted average value or taking a median value.
In one possible embodiment, the absolute value of the difference between the first color value and the second color value of each color value pair in the color value pair distribution map is greater than a preset difference value.
In one possible embodiment, the color values include an R channel color value, a G channel color value, and a B channel color value, the color value pair distribution histogram includes an R channel color value pair distribution histogram, a G channel color value pair distribution histogram, and a B channel color value pair distribution histogram, the first color value includes an R channel first color value, a G channel first color value, and a B channel first color value, the second color value includes an R channel second color value, a G channel second color value, and a B channel second color value; or the color value is a gray scale color value obtained by weighted conversion of the R channel color value, the G channel color value and the B channel color value, the color value pair distribution histogram is a gray scale color value pair distribution histogram, the first color value is a first gray scale color value, and the second color value is a second gray scale color value; or the color value is a pixel color of a combination of the R channel color value, the G channel color value, and the B channel color value, the color value pair distribution histogram is a pixel color pair distribution histogram, the first color value is a first pixel color, and the second color value is a second pixel color.
In a possible implementation manner, before periodically adjusting the content contrast of the picture to be displayed, the method further includes: and responding to a page scrolling instruction, and triggering the periodical adjustment of the content contrast of the picture to be displayed.
In a possible implementation manner, before periodically adjusting the content contrast of the picture to be displayed, the method further includes: and acquiring the type of the application program operated by the foreground, and triggering the periodical adjustment of the content contrast of the picture to be displayed if the type of the application program operated by the foreground belongs to a preset type.
A third aspect provides an electronic device comprising: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform any of the methods described above.
A fifth aspect provides a computer readable storage medium, the computer program comprising instructions which, when executed by an electronic device, cause the electronic device to perform any of the methods described above.
According to the method for adjusting the content contrast, the electronic device and the storage medium in the embodiment of the application, firstly, the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed are determined, then, whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition is judged, if not, the content contrast of the picture to be displayed is adjusted, and therefore the color difference between the color value of the foreground color and the color value of the background color of the picture to be displayed is increased, so that in the process of displaying the picture to be displayed, the corresponding liquid crystal response speed during at least partial pixel color conversion is increased, and the smear problem is improved.
Drawings
FIG. 1 is a diagram illustrating a state of a text reading application page when scrolling;
FIG. 2 is a diagram illustrating a scrolling state of a teletext application page;
FIG. 3 is a schematic view of a video playing state;
FIG. 4 is a flowchart illustrating a method for adjusting a content contrast of a to-be-displayed frame according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a frame refresh timing state according to an embodiment of the present application;
FIG. 6 is a color value distribution histogram of a frame according to an embodiment of the present application;
FIG. 7 is a diagram illustrating a liquid crystal response test curve when the color value changes from small to large;
FIG. 8 is a diagram illustrating a liquid crystal response test curve when a color value changes from large to small;
FIG. 9 is a schematic representation of a tone curve before and after adjustment in an embodiment of the present application;
FIG. 10 is a schematic representation of another tone curve of an embodiment of the present application before and after adjustment;
FIG. 11 is a diagram illustrating a state of a page scrolling of a text-reading application after adjustment by an adjustment method according to an embodiment of the present application;
FIG. 12 is a flowchart illustrating another method for adjusting the content contrast of a frame to be displayed according to an embodiment of the present application;
FIG. 13 is a flowchart illustrating another method for adjusting the content contrast of a frame to be displayed according to an embodiment of the present disclosure;
FIG. 14 is a color value pair distribution histogram according to an embodiment of the present application;
fig. 15 is a flowchart of another method for adjusting content contrast of a to-be-displayed frame in an embodiment of the present application.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
Before specifically describing the embodiments of the present application, a brief description will be given of a scenario involved in the present application. The electronic device may be a mobile phone, a tablet computer, a Personal Computer (PC), a Personal Digital Assistant (PDA), a smart watch, a netbook, a wearable electronic device, an Augmented Reality (AR) device, a Virtual Reality (VR) device, an in-vehicle device, a smart car, a smart audio, a robot, smart glasses, or the like. The terminal has a Liquid Crystal Display (LCD), where the LCD can apply the technical solution of the embodiment of the present application in a scene of displaying a dynamic picture, as shown in fig. 1, fig. 1 is a schematic diagram of a state when a page of a text reading application is scrolled, when a user slides the page, the page is scrolled, that is, a text displayed by the LCD changes, as shown in fig. 2, fig. 2 is a schematic diagram of a state when a page of an image-text reading application is scrolled, the page includes a text and a picture, when the user slides the page, the page is scrolled, then the text and the picture displayed by the LCD change, and it should be noted that, if the application has an automatic page scrolling function, when the page is automatically scrolled, a content displayed by the LCD changes, as shown in fig. 3, fig. 3 is a schematic diagram of a video playing state, when the LCD displays a video being played, a pop-up screen is provided in the video playing interface, and the scrolling of the pop-up screen also causes a change of the content displayed by the LCD. When the content displayed by the liquid crystal display screen changes, for example, a pixel at a certain position in the liquid crystal display screen is used for displaying black characters in a previous frame, and the pixel may become used for displaying gray background color in a next frame, that is, the liquid crystal corresponding to the pixel in the liquid crystal display screen is turned over to realize the change of the content in the liquid crystal display screen. The technical solution of the embodiment of the present application is used to improve the above-mentioned image smear problem, and is introduced below.
As shown in fig. 4, fig. 4 is a flowchart of a method for adjusting content contrast of a to-be-displayed picture in an embodiment of the present application, and the embodiment of the present application provides a method for adjusting content contrast of a to-be-displayed picture, including: periodically adjusting the content contrast of the picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps:
step 101, acquiring a color value distribution histogram of at least one frame of picture, wherein the color value distribution histogram is used for reflecting the corresponding relation between color values and the number;
specifically, in the process of displaying the picture, for example, as shown in fig. 5, fig. 5 is a schematic diagram of a picture refreshing time sequence state in this embodiment, the content contrast of the picture to be displayed is adjusted by taking 20 frames as a period, that is, the process of adjusting the content contrast of the picture to be displayed is triggered once every 20 frames, for example, when the picture of the 20 th frame is displayed, step 101 is entered to obtain a color value distribution histogram corresponding to each frame in 20 consecutive frames from the 1 st frame to the 20 th frame, it should be noted that the color value distribution histograms obtained in this embodiment are all color value distribution histograms corresponding to displayed pictures, but in other realizable implementation manners, the obtained color value distribution histograms may also include color value distribution histograms corresponding to the picture to be displayed. In a possible implementation manner, the color values include an R channel color value, a G channel color value, and a B channel color value, for example, as shown in fig. 6, fig. 6 is a color value distribution histogram of a screen in an embodiment of the present application, where the color value distribution histogram includes an R channel color value distribution histogram, a G channel color value distribution histogram, and a B channel color value distribution histogram, an abscissa is a color value, and an ordinate is a distribution number of the color value in a display screen, and the color value distribution histogram reflects a distribution condition of colors in the screen, for example, in a text reading scenario shown in fig. 1, two colors distributed most in a page are a text color and a text ground color, when the page is scrolled, a large color change is a change between the text color and the text ground color, and a large color distribution in the screen can be determined according to the color value distribution histogram, that is, i.e., the text color and the text ground color can be further determined.
102, obtaining color values of a foreground color and a background color corresponding to a picture to be displayed based on the obtained color value distribution histogram of at least one frame of picture, wherein the color values of the foreground color and the background color obtained in the step are used for reflecting the foreground color and the background color in the picture to be displayed;
specifically, taking the color value distribution histogram of the obtained two or more frames as an example, because the color value distribution histogram reflects the relationship between the color values and the color value distribution number in the frame, two color values meeting the preset condition can be respectively used as the color value of the frame foreground color and the color value of the frame background color according to the color value distribution histogram, for example, the two color values with the largest distribution number can be respectively used as the color value of the frame foreground color and the color value of the frame background color, and in a text reading scene, the color value of the frame foreground color and the color value of the frame background color can reflect the text color and the text ground color in the frame image. For example, based on the color value distribution histogram corresponding to the frame 1 st picture, it is determined that the R channel color value of the frame foreground color is R1a, the R channel color value of the frame background color is R1B, the G channel color value of the frame foreground color is G1a, the G channel color value of the frame background color is G1B, the B channel color value of the frame foreground color is B1a, and the B channel color value of the frame background color is B1B; similarly, based on the color value distribution histogram corresponding to the 2 nd frame picture, determining that the R channel color value of the frame foreground color is R2a, the R channel color value of the frame background color is R2B, the G channel color value of the frame foreground color is G2a, the G channel color value of the frame background color is G2B, the B channel color value of the frame foreground color is B2a, and the B channel color value of the frame background color is B2B; and by analogy, the color value of the corresponding frame foreground color and the color value of the frame background color are determined based on each frame of the pictures from 1 to 20 frames, the R channel color value of the frame foreground color determined based on the color value distribution histogram corresponding to the picture of the 20 th frame is R20a, the R channel color value of the frame background color is R20B, the G channel color value of the frame foreground color is G20a, the G channel color value of the frame background color is G20B, the B channel color value of the frame foreground color is B20a, and the B channel color value of the frame background color is B20B. That is, from the 1 st to 20 th frame pictures, it can be determined that: r channel color values of 20 frame foreground colors of R1a, R2a, …, R20a, R channel color values of 20 frame background colors of R1B, R2B, …, R20B, G channel color values of 20 frame foreground colors of G1a, G2a, …, G20a, G channel color values of 20 frame background colors of G1B, G2B, …, G20B, B channel color values of 20 frame background colors of B1a, B2a, …, B20a, B channel color values of 20 frame foreground colors of B1B, B2B, …, B20B. Then, color values of foreground colors are obtained according to color values of all the frame foreground colors, for example, the obtained R channel color value of the foreground color is Ra, where Ra is used to reflect the overall level of the R channel color values of the foreground colors of 20 frames, the R channel color value of the foreground color may be, for example, an average value, a weighted average value, or a median value of the R channel color values of the foreground colors of 20 frames, which can reflect the overall level, and the following description will take the average value as an example of the value reflecting the overall level, the R channel color value of the background color is Rb, and Rb may be, for example, an average value of the R channel color values of the background colors of 20 frames, and in a similar manner, the obtained G channel color value of the foreground color is Ga, the G channel color value of the background color is Gb, the B channel color value of the foreground color is Ba, and the B channel color value of the background color is Bb.
Step 103, determining whether the color values of the foreground color and the background color meet a preset liquid crystal response condition, if not, determining that the color values of the foreground color and the background color do not meet the preset liquid crystal response condition, then entering step 104, and if so, then entering step 105;
104, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed, and displaying the adjusted picture to be displayed; after step 104, re-entering step 101 in the next period to execute the process of next adjusting the content contrast of the picture to be displayed;
and 105, displaying the original picture to be displayed, and after the step 105, re-entering the step 101 in the next period to execute the process of adjusting the content contrast of the picture to be displayed next time.
Specifically, the minimum display unit of the liquid crystal display screen is a pixel, each pixel is composed of channels of different colors, for example, one pixel is composed of channels of three colors of red R, green G and blue B, each color channel has 0 to 255 gray scales, or 0 to 255 color values, each color value represents the brightness of the color, in the process of displaying a picture on the liquid crystal display screen, the color display of each channel is realized by matching a color filter layer with the inversion of the liquid crystal, wherein the inversion degree of the liquid crystal is used for controlling the brightness of emitted light, that is, the liquid crystal is inverted under the control of the driving voltage, the larger the change of the driving voltage value is, the faster the liquid crystal is inverted, that is, the change of the channel color value is positively correlated with the liquid crystal inversion speed. During the display of a text or text page, the picture has a relatively obvious foreground color and background color, for example, during the use of a news application, the picture is mainly composed of the background (ground color) and the foreground (text), and during the page scrolling process, most of the pixels are converted between the background color and the foreground color. For example, the foreground color and the background color obtained in step 102 are used to reflect the foreground color and the background color of the whole all the pictures corresponding to the obtained color value distribution histogram, and since the difference between the foreground color and the background color corresponding to the adjacent or close-frame pictures is small, the foreground color and the background color obtained in step 102 may also reflect the text color and the text background color in the picture to be displayed, for example, in a picture mainly composed of text and a pure background, the foreground color and the background color respectively correspond to the text color and the text background color, while the picture is rolling, the foreground color and the background color are generally not changed, that is, while the picture is rolling, the color in most of the pixels is changed between the foreground color and the background color, for the liquid crystal display panel, the turning angle of the liquid crystal in most of the pixels is determined by the difference between the R channel color value of the foreground color and the R channel color value of the background color, the difference between the G channel color value of the foreground color and the G channel color value of the background color, that is determined by the difference between the B channel color value of the foreground color and the background color, that the difference between the B channel color value, and the background color, and the change of the adjacent pixels, which may cause the corresponding change of the adjacent frame, if the liquid crystal display panel is not refreshed. Therefore, in step 102, firstly, the color value of the foreground color and the color value of the background color are determined, and then, in step 103, whether the color value of the foreground color and the color value of the background color satisfy the corresponding preset liquid crystal response condition, which is described in detail below with reference to step 103, the liquid crystal response condition can be obtained by testing the liquid crystal display in advance, for example, as shown in tables 1, 2 and 3:
TABLE 1
Figure BDA0002634024710000061
Figure BDA0002634024710000071
TABLE 2
To\From 0 36 73 109 146 182 219 255
0 0 8.967 9.035 9.11 9.349 9.746 10.39 11.64
36 26.78 0 16.53 14.81 13.98 13.75 13.94 14.91
73 28.5 25.92 0 19.31 18.01 17.17 16.94 17.66
109 28.54 26.51 24.15 0 19.41 18.69 18.36 19.1
146 26.19 24.75 23.12 21.31 0 18.51 18.31 19.33
182 22.7 21.74 20.35 19.22 18.41 0 17.26 18.5
219 18.23 17.42 16.52 15.76 15.24 15.03 0 17.03
255 10.66 10.15 9.663 9.275 9.07 9.143 10.05 0
TABLE 3
To\From 0 36 73 109 146 182 219 255
0 0 7.766 7.71 7.835 8.043 8.385 8.911 9.96
36 22.14 0 14.16 12.65 11.88 11.6 11.75 12.58
73 24.52 22.29 0 16.92 15.43 14.66 14.43 15
109 24.74 22.98 20.73 0 17.2 16.27 15.86 16.3
146 22.82 21.7 20.22 18.55 0 16.33 15.97 16.6
182 19.63 18.91 17.79 16.79 16.02 0 14.92 15.91
219 15.78 15.22 14.44 13.78 13.35 13.19 0 14.36
255 9.39 9.003 8.545 8.23 8.05 8.064 8.681 0
Table 1 shows the response test result of the R-channel liquid crystal in the embodiment of the present application, table 2 shows the response test result of the G-channel liquid crystal in the embodiment of the present application, table 3 shows the response test result of the B-channel liquid crystal in the embodiment of the present application, in each table, the first row From represents the source color value, i.e., the corresponding color value before the screen change, the first column To represents the target color value, i.e., the corresponding color value after the screen change, the other tables represent the liquid crystal response time in ms, the liquid crystal response time refers To the time for the liquid crystal To flip From the source color value To the target color value, i.e., the table represents the liquid crystal response time corresponding To the color value change, and taking table 1 as an example, it can be known that the liquid crystal response time corresponding To the pixel R-channel color value change From 73 To 36 is 15.84ms according To the corresponding relationship between the fourth column and the third row of data. As shown in fig. 7 and 8, fig. 7 is a schematic diagram of a liquid crystal response test curve corresponding to a color value change from small to large, fig. 8 is a schematic diagram of a liquid crystal response test curve corresponding to a color value change from large to small, the ordinate in fig. 7 and 8 is a liquid crystal response time in ms, the abscissa in fig. 7 and 8 is a source color value, that is, a color value before the change, the target color value corresponding to fig. 7 is 255, and the target color value corresponding to fig. 8 is 0, that is, fig. 7 reflects a corresponding liquid crystal response time curve when the change from a different source color value to 255, and fig. 8 reflects a corresponding liquid crystal response time curve when the change from a different source color value to 0. As can be seen from fig. 7 and 8 and tables 1, 2 and 3, under certain conditions, the larger the front-back color difference, the shorter the liquid crystal response time, and the smaller the front-back color difference, the longer the liquid crystal response time. For the liquid crystal display screen, the liquid crystal response time has requirements, and if the liquid crystal response time is too long, the picture may not reach the corresponding refresh rate, so that the liquid crystal response condition corresponding to each color channel can be obtained according to the requirements on the liquid crystal response time and the liquid crystal response test result. For example, if the color value of the 60Hz LCD screen satisfying the liquid crystal response time condition is a color value with a response time less than 16.67ms, and the color value not satisfying the liquid crystal response time condition is a color value with a response time reaching or exceeding 16.67ms, the liquid crystal response condition refers to a condition that the liquid crystal response time does not cause a smear, if it is determined in step 103 that a certain color channel color value of the foreground color and a certain color channel color value of the background color satisfy the liquid crystal response condition of the channel, it indicates that the difference between the color value of the foreground color and the color value of the background color in the picture is large, and when the picture is switched between the foreground color and the background color, the liquid crystal turnover speed corresponding to the channel is fast, that is, the liquid crystal response speed is low, and no smear is caused, for example, if each channel color value of the foreground color and each channel color value of the background color satisfy the preset liquid crystal response condition of the corresponding channel, it indicates that each channel color value of the foreground color and each channel color value of the background color in the step 103 both satisfy the preset liquid crystal response time, it indicates that the liquid crystal response time the picture is not displayed, and no smear is caused by the smear, and the phenomenon can be directly displayed. It should be noted that in the above table, from represents the color values before conversion, to represents the color values after conversion, for example, in table 1, the response time for conversion From 182 To 146 is 18.65ms, and the response time for conversion From 146 To 182 is 18.31ms, which may be different, but are approximately equal, and errors can be ignored, and when two color values are set To be converted To each other, the same liquid crystal response time condition is provided regardless of the sequence; if the color values of the foreground color and the background color corresponding to one or more channels do not satisfy the liquid crystal response condition of the channel, it is indicated that the difference between the color values of the foreground color and the background color is small, and a smear is caused when the foreground color and the background color are converted, for example, each channel color value of RGB of the foreground color and each channel color value of RGB of the background color do not satisfy the preset liquid crystal response condition, the process proceeds to step 104, a content contrast adjustment is performed on a picture to be displayed, so that the color difference between each channel color value of RGB of the foreground color and each channel color value of RGB of the background color is increased, so as to reduce the liquid crystal response time when the picture to be displayed is displayed, and improve the smear problem, and for example, only the R channel color value of the foreground color and the R channel color value of the background color do not satisfy the preset liquid crystal response condition, the process proceeds to step 104, and the content contrast adjustment is performed on the picture to be displayed, so that the color difference between the R channel color value of the foreground color and the R channel color value of the background color is increased. After the adjustment in step 104 is completed, the image after the adjustment may be displayed, and until the display of the 40 th frame is finished, the next process of adjusting the content contrast of the picture to be displayed is triggered, it should be noted that, in step 101, the obtained picture is the original picture before the adjustment is not performed, so that the process of determining whether the liquid crystal response condition is satisfied in step 103 makes sense.
The method for adjusting the content contrast of the picture to be displayed in the embodiment of the application comprises the steps of firstly determining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed, then judging whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition, and if not, adjusting the content contrast of the picture to be displayed, so that the color difference between the color value of the foreground color and the color value of the background color of the picture to be displayed is increased, the liquid crystal response speed corresponding to conversion when at least part of pixel colors are converted is improved in the process of displaying the picture to be displayed, and the problem of smear is solved.
The foregoing embodiment is only described by taking the example of acquiring color value distribution histograms of more than two pictures at a time, and in a possible implementation manner, the step 101 of acquiring the color value distribution histogram of at least one frame of picture includes: acquiring a color value distribution histogram of a frame of picture to be displayed;
102, obtaining a color value of a foreground color and a color value of a background color corresponding to a picture to be displayed based on the obtained color value distribution histogram of the at least one frame of picture, the process comprising: based on a color value distribution histogram of a frame of picture to be displayed, two color values with the maximum number are respectively used as color values of a foreground color and a background color, or based on the color value distribution histogram of the frame of picture to be displayed, two color values which reach a preset number and meet the requirement of foreground application calling color are respectively used as color values of the foreground color and the background color.
Specifically, for example, the process of adjusting the content contrast of the to-be-displayed picture is triggered by taking a frame as a cycle, for example, after the 1 st frame picture is ended and before the 2 nd frame picture is displayed, the process of adjusting the content contrast of the to-be-displayed picture is triggered, a color value distribution histogram of the 2 nd frame picture is obtained, two color values with the maximum number in the color value distribution histogram of the 2 nd frame picture are respectively used as the color value of the foreground color and the color value of the background color, or two color values which reach the preset number and meet the foreground application calling color in the color value distribution histogram of the 2 nd frame picture are respectively used as the color value of the foreground color and the color value of the background color, whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition is determined, if not, the content contrast of the 2 nd frame picture is adjusted, so that the color difference between the color value of the foreground color value in the 2 nd frame picture and the color value of the background color is increased, the process of adjusting the content contrast of the to-be-displayed picture is ended, and the 2 nd frame is displayed according to the result after adjustment; when the 2 nd frame picture is displayed and the 3 rd frame picture is not displayed, triggering a new process of adjusting the content contrast of the picture to be displayed for one time, acquiring a color value distribution histogram of the 3 rd frame picture, respectively taking two color values with the maximum number in the color value distribution histogram of the 3 rd frame picture as the color value of the foreground color and the color value of the background color, or respectively taking two color values which reach the preset number and meet the requirements of foreground application calling color in the color value distribution histogram of the 3 rd frame picture as the color value of the foreground color and the color value of the background color, judging whether the color value of the foreground color and the color value of the background color meet the requirements of liquid crystal response adjustment, if not, adjusting the content contrast of the 3 rd frame picture to increase the color difference between the color value of the foreground color and the color value of the background color in the 3 rd frame picture, finishing the adjustment, and displaying the 3 rd frame picture according to the result of the adjustment; by analogy, contrast adjustment in the dynamic picture display process can be realized.
In the process of using the two color values with the maximum number as the color values of the foreground color and the background color, respectively, for example, in the picture shown in fig. 1, assuming that the text is black, the corresponding RGB color value is (255, 255, 255), and assuming that the RGB color value corresponding to the text ground color is (133, 195, 203), the most content displayed in the picture is the text and the text ground color, so that the number of (255, 255, 255) and (133, 195, 203) in the color value distribution histogram corresponding to the picture is the largest, and therefore, the color value of the foreground color and the color value of the background color in the picture can be determined according to the number in the color value distribution histogram, and then, the content contrast of the picture to be displayed is adjusted to increase the color difference between the color value of the foreground color and the color value of the background color, so as to improve the smear phenomenon. For example, as shown in fig. 6, in the R-channel color value distribution histogram, there are two maximum peak values of 133 and 255, which can be taken as the R-channel color values of the foreground color and the R-channel color values of the background color, respectively, that is, the color values of most pixels in the screen in the R-channel are 133 and 255, in the G-channel color value distribution histogram, there are two maximum peak values of 195 and 255, respectively, the G-channel color values of the foreground color and the G-channel color values of the background color, that is, the color values of most pixels in the screen in the G-channel are 195 and 255, in the B-channel color value distribution histogram, there are two maximum peak values of 203 and 255, respectively, the B-channel color values of the foreground color and the B-channel color values of the background color, that is, the B-channel color values of most pixels in the screen are 203 and 255.
In the process of using two color values which reach the preset number and meet the foreground Application calling color as the color value of the foreground color and the color value of the background color respectively, for example, in a scene of image-text display, if a lot of pictures exist, a lot of similar peak values may be caused in the obtained color value distribution histogram, and the color value of the foreground color and the color value of the background color may not be accurately determined.
Optionally, the step 101 of obtaining the color value distribution histogram of at least one frame of picture includes: acquiring a color value distribution histogram of at least two frames of continuous pictures, wherein the at least two frames of continuous pictures comprise displayed pictures adjacent to pictures to be displayed;
102, obtaining a color value of a foreground color and a color value of a background color corresponding to a picture to be displayed based on the obtained color value distribution histogram of the at least one frame of picture, the process comprising:
based on the color value distribution histogram of each frame of the acquired picture, respectively taking the two color values with the maximum number as the color values of the foreground color of the frame and the background color of the frame;
the color values of all the frame foreground colors after being processed by a preset algorithm are used as the color values of the foreground colors, the color values of all the frame background colors after being processed by the preset algorithm are used as the color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, a weighted average value or a median value; alternatively, the first and second electrodes may be,
based on the acquired color value distribution histogram of each frame of picture, respectively taking two color values which reach a preset number and meet the requirement of foreground application calling color as a color value of a frame foreground color and a color value of a frame background color;
the color values obtained after the color values of all the frame foreground colors are processed by a preset algorithm are used as the color values of the foreground colors, the color values obtained after the color values of all the frame background colors are processed by the preset algorithm are used as the color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking the average value, taking the weighted average value or taking the median value.
Specifically, for example, in an implementable embodiment, the content contrast of the picture to be displayed is adjusted in a period of 20 frames, that is, the process of adjusting the content contrast of the picture to be displayed is triggered once every 20 frames, when the 20 th frame picture is displayed and the 21 st frame picture is not displayed, the process of adjusting the content contrast of the picture to be displayed is triggered once, color value distribution histograms of the 20 frames of the 1 st to 20 th frames are obtained, wherein the 1 st to 20 th frames are already displayed pictures, color value distribution histograms corresponding to original pictures of the pictures are obtained, the color value of the frame foreground color and the color value of the frame background color corresponding to each frame of the 1 st to 20 th frames are determined, for example, two color values with the maximum number in each color value distribution histogram are respectively used as the color value of the frame foreground color and the color value of the frame background color, or using two color values which reach the preset number and meet the foreground application calling color in each color value distribution histogram as the color value of the foreground color and the color value of the background color of the frame, totally 20 color values of the foreground color of the frame and the color value of the background color of the frame, using the average value, weighted average value or median value of the color values of the foreground color of the 20 frames as the color value of the foreground color, using the average value, weighted average value or median value of the color values of the background color of the 20 frames as the color value of the background color, determining whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition, if not, determining the adjusting mode of the picture to be displayed, wherein the adjusting mode comprises the adjusting quantity of the color value of the foreground color and the adjusting quantity of the color value of the background color, then displaying the 21 st to 40 th frame pictures according to the adjusted result, and in the displaying process of the 21 st to 40 th frame pictures, relative to the original pictures, wherein the color difference between the color value of the foreground color and the color value of the background color of each frame of the picture is increased; when the 40 th frame of picture is displayed and the 41 th frame of picture is not displayed, triggering a new process for adjusting the content contrast of the picture to be displayed for one time, acquiring a color value distribution histogram of an original picture of the displayed pictures of the 21 st to 40 th frames, determining a color value of a foreground color and a color value of a background color according to the color value distribution histogram acquired at this time, judging whether the color value of the foreground color and the color value of the background color meet a liquid crystal response condition, if not, determining a color value adjustment quantity of the foreground color and a color value adjustment quantity of the background color of the picture to be displayed, and then displaying the pictures of the 41 th to 60 th frames according to the result after the current adjustment; by analogy, the content contrast adjustment in the dynamic picture display process can be realized. By determining the color values of the foreground color and the background color based on at least two consecutive frames of pictures, the variation of the pictures can be made smoother during the display of the whole picture.
In the process of using the two color values with the maximum number as the color value of the foreground color of the frame and the color value of the background color of the frame, for example, in the picture shown in fig. 1, assuming that the text is black, the corresponding RGB color value is (255, 255, 255), and assuming that the RGB color value corresponding to the background color is (133, 195, 203), the most displayed content in the picture is the text and the background color, therefore, the number of (255, 255, 255) and (133, 195, 203) in the color value distribution histogram corresponding to the picture is the largest, so that the color value of the foreground color and the color value of the background color in the picture can be determined according to the number in the color value distribution histogram, and then the content contrast of the picture to be displayed is adjusted to increase the color difference between the color value of the foreground color and the color value of the background color, thereby improving the smear phenomenon. For example, as shown in fig. 6, in the R channel color value distribution histogram, there are two maximum peak values of 133 and 255, which can be taken as the R channel color value of the foreground color of the frame and the R channel color value of the background color of the frame, that is, the color values of most pixels in the picture in the R channel are 133 and 255, respectively, in the G channel color value distribution histogram, there are two maximum peak values of 195 and 255, that is, the G channel color value of the foreground color of the frame and the G channel color value of the background color of the frame, that is, the G channel color value of most pixels in the picture is 195 and 255, in the B channel color value distribution histogram, there are two maximum peak values of 203 and 255, that is, the B channel color value of the foreground color of the frame and the B channel color value of the background color of the frame, that is, the B channel color value of most pixels in the picture is 203 and 255.
In the process of using two color values which reach the preset number and meet the foreground Application calling color as the color value of the frame foreground color and the color value of the frame background color respectively, for example, in a scene of image-text display, if a number of pictures are large, the obtained color value distribution histogram may have a large number of similar peak values, and the frame foreground color and the frame background color therein may not be accurately judged.
In a possible implementation manner, the step 104 of adjusting the content contrast of the to-be-displayed picture to increase the color difference between the color value of the foreground color and the color value of the background color in the to-be-displayed picture includes: the tone curve of the picture to be displayed is adjusted such that the tone curve is pulled high at the greater one of the color value position of the foreground color and the color value position of the background color, and/or such that the tone curve is pulled low at the smaller one of the color value position of the foreground color and the color value position of the background color.
Specifically, as shown in fig. 9, fig. 9 is a schematic diagram of a tone curve before and after adjustment in an embodiment of the present application, where an abscissa is an input color value, an ordinate is an output color value, and the tone curve is used to adjust a color of a picture to be displayed, for example, fig. 9 is used to represent a tone curve of an R channel, before the adjustment, the input color value and the output color value are the same, after the adjustment, the color values are converted according to a mapping relationship corresponding to the tone curve and then output, that is, content contrast adjustment is implemented, assuming that an R channel color value of a foreground color is obtained as 140 before step 104 and an R channel color value of a background color is 200, after the adjustment, the R channel color value of the foreground color is pulled down from 140 to 80, and the R channel color value of the background color is pulled up from 200 to 220, that is, the tone curve is pulled up to an S-type curve based on these two points, so that a color value near the foreground color value and a color value near the background color value are adjusted based on the curve, so that the adjustment of the overall color is smooth. The manner of adjustment of the tone curve and the display effect after the content contrast adjustment by the embodiments of the present application are explained below by another specific example. As shown in fig. 10 and fig. 11, fig. 10 is a schematic diagram of another tone curve before and after adjustment in the embodiment of the present application, fig. 11 is a schematic diagram of a state when a page of a text reading application is scrolled after being adjusted by a content contrast adjusting method in the embodiment of the present application, and it is assumed that fig. 1 is a schematic diagram before content contrast adjustment in the present example, where RGB color values corresponding to text are (255, 255, 255) and RGB color values corresponding to background color are (133, 195, 203), it can be seen that a G channel color value difference and a B channel color value difference in text and background are both small, that is, in a dynamic picture display process, a large number of channels are switched between small color value differences, liquid crystal response time at these positions is long, which easily causes a smear phenomenon, and therefore, the technical solution in the embodiment of the present application may be applied, in the technical solution of the embodiment of the present application, through the foregoing step 102, it may be determined that the RGB color values of the foreground color are (133, 195, 203) and the RGB color values of the background color are (255, 255, 255), and it is determined that (133, 195, 203) and (255, 255, 255) do not satisfy the liquid crystal response condition in step 103, and therefore, it is necessary to adjust the tone curve in the picture to be displayed, so as to adjust the G channel tone curve therein as an example, before the adjustment, the G channel color value of the background color is 255, the G channel color value of the background color is 195, that is, the color difference between the G channel color value of the foreground color before the adjustment and the G channel color value of the background color before the adjustment is 255-195=60, 60 may reflect the content contrast of the G channel before the adjustment, and it is assumed that fig. 10 is a schematic diagram corresponding to the G channel tone curve, where, 255 is already at the maximum value and can no longer be raised, i.e. the background color G channel color value is unchanged, still 255, the tone curve is pulled down at 195, down to 130, i.e. the G channel color value of the foreground color is reduced, the G channel color value of the foreground color after adjustment is 130, i.e. the color difference between the G channel color value of the foreground color after adjustment and the G channel color value of the background color is 255-130=125, 125, which can reflect the content contrast of the G channel after adjustment, it can be seen that after adjustment of the tone curve, the color difference between the G channel color value of the foreground color and the G channel color value of the background color is increased from 60 to 125, i.e. adjustment of the content contrast of the G channel is achieved, i.e. the G channel color values originally 195 in the picture will all become 130, similarly, if the R channel tone curve is pulled down to 100 at 133, the color difference between the color value of the R channel of the foreground color and the color value of the R channel of the background color can be increased from 122 to 155, that is, the adjustment of the content contrast of the R channel is realized, the tone curve of the B channel is reduced to 130 at 203, and the color difference between the color value of the B channel of the foreground color and the color value of the B channel of the background color can be increased from 52 to 125, that is, the adjustment of the content contrast of the B channel is realized, then the original RGB color values (133, 195, 203) in the picture can be changed to (100, 130, 130), that is, the adjustment of the content contrast of each channel of RGB is realized, after the adjustment of the picture, the display effect of the picture is as shown in fig. 11, as can be known from the contrast of fig. 1 and 11, before the content contrast adjustment of the picture to be displayed, the text ground color (133, 195, 203) is a darker filling color, after the content contrast adjustment of the picture to be displayed, the text ground color (100, 130, 130) is a lighter filling color, that is, after the content contrast of the picture to be displayed is adjusted, in the process of page scrolling, more pixels can change between (100, 130, 130) and (255, 255, 255), the difference value of color value change is larger, the liquid crystal response speed is higher, and the phenomenon of smear is not easy to generate.
In a possible implementation manner, the color values include an R channel color value, a G channel color value, and a B channel color value, and the color value distribution histogram includes an R channel color value distribution histogram, a G channel color value distribution histogram, and a B channel color value distribution histogram, that is, when determining the foreground color and the background color, the foreground color and the background color corresponding to each color channel are determined, which is taken as an example in the description manner of the above embodiment. For example, in the embodiment in which two color values with the largest number are respectively used as the color values of the foreground color and the background color, the overall scheme may be understood as finding the two color values with the largest number respectively based on each color channel in the picture, and if the color difference corresponding to the two color values is small, the content contrast of the picture to be displayed is adjusted, and the color difference between the two color values is increased, so as to improve the response speed of the liquid crystal when switching between the two color values in the picture.
In another possible embodiment, the color value is a gray scale color value obtained by weighted conversion of an R channel color value, a G channel color value, and a B channel color value, the color value distribution histogram is a gray scale color value distribution histogram, that is, the R channel color value, the G channel color value, and the B channel color value corresponding to each pixel are converted into corresponding gray scale color values, statistics is performed on the gray scale color values and the number of pixels in the picture, the abscissa of the gray scale color value distribution histogram is the gray scale color value, the ordinate is the number corresponding to the gray scale color value, each gray scale color value distribution histogram is used to represent the relationship between the gray scale color value and the number in the picture, in an embodiment where only one frame of the picture to be displayed is obtained by each adjustment, the gray scale background color value of the foreground color and the gray scale color value of the background color can be directly obtained according to the gray scale color value distribution histogram, in the embodiment of obtaining at least two frames of pictures by adjustment each time, the gray scale color value of the frame foreground color and the gray scale color value of the frame background color can be obtained according to the gray scale color value distribution histogram, and further the gray scale color value of the foreground color and the gray scale color value of the background color can be obtained, when the pictures are adjusted in step 104, the gray scale color value of the foreground color is converted into the R channel color value of the corresponding foreground color, the G channel color value of the foreground color and the B channel color value of the foreground color, the gray scale color value of the background color is converted into the R channel color value of the corresponding background color, the G channel color value of the background color and the B channel color value of the background color, and the difference between the color value of the foreground color of the corresponding color channel and the color value of the background color is increased. For example, the grayscale color values P1 and P2 are the maximum number of two grayscale color values in the grayscale color value distribution histogram, the grayscale color value P1 is obtained by converting the R channel color value R1, the G channel color value G1, and the B channel color value B1, the grayscale color value P2 is obtained by converting the R channel color value R2, the G channel color value G2, and the B channel color value B2, in the embodiment where only one frame of picture to be displayed is obtained by each adjustment, P1 and P2 are respectively used as the color value of the foreground color and the color value of the background color, in the embodiment where at least two frames of picture are obtained by each adjustment, it is assumed that the color value of the foreground color and the color value of the background color finally confirmed are respectively P1 and P2, in step 103, it is determined whether R1 and R2 satisfy the preset liquid crystal response condition, whether G1 and G2 satisfy the preset liquid crystal response condition, and whether B1 and B2 satisfy the preset liquid crystal response condition, and if one of them does not satisfy the preset liquid crystal response condition, an adjustment is required, for example, if only R1 and R2 do not satisfy the corresponding preset liquid crystal response condition and the other channels satisfy the preset liquid crystal response condition, in step 104, P1 is converted into (R1, G1, B1), P2 is converted into (R2, G2, B2), and in the R channel tone curve, the color difference between R1 and R2 is increased. For example, in the embodiment in which two color values with the largest number are respectively used as the color values of the foreground color and the background color, the overall scheme may be understood as finding the two gray-scale color values with the largest number in the picture, and if the color difference corresponding to the color value of a certain color channel in the two gray-scale color values is smaller, adjusting the content contrast of the picture to be displayed, and increasing the color difference of the color values of the two color channels, so as to improve the response speed of the liquid crystal when switching between the two gray-scale color values in the picture.
In a further possible embodiment, the color value is a pixel color of a combination of an R channel color value, a G channel color value and a B channel color value, the color value distribution histogram is a pixel color distribution histogram, one combination represents one pixel color, the color value distribution histogram is a pixel color distribution histogram, that is, the R channel color value, the G channel color value and the B channel color value corresponding to each pixel are combined into a pixel color to be counted, each color value includes a corresponding R channel color value, a G channel color value and a B channel color value, the abscissa in the pixel color distribution histogram is the pixel color and the ordinate is the number of pixel colors, each pixel color distribution histogram is used to represent the relationship between the pixel colors and the number in the picture, for example, in the pixel color distribution histogram, the number of pixel colors (R1, G1, B1) and pixel colors (R2, G2, B2) is the largest, in an embodiment where each adjustment obtains only one frame of the picture to be displayed, it may be determined whether or not (R1, G1, B1) is the foreground color value, G2) as the background color value, and the liquid crystal color value (R2, B2) as the response condition, if the preset liquid crystal response condition is satisfied, and if the preset liquid crystal response condition is satisfied, if the other channels satisfy the predetermined liquid crystal response condition, the color difference between R1 and R2 is increased in the R channel tone curve in step 104. For example, in the embodiment in which two color values with the largest number are respectively used as the color values of the foreground color and the background color, the overall scheme may be understood as finding the two pixels with the largest number in the picture, and if the color difference corresponding to a certain color channel in the two pixels is small, the content contrast of the picture to be displayed is adjusted, and the color difference of the color values of the two color channels is increased, so as to improve the response speed of the liquid crystal when switching between the two pixels in the picture.
Optionally, as shown in fig. 12, fig. 12 is a flowchart of another method for adjusting content contrast of a picture to be displayed in this embodiment of the application, before periodically adjusting the content contrast of the picture to be displayed, the method further includes: step 301, judging whether a page scrolling instruction is received, if so, responding to the page instruction, triggering to periodically adjust the content contrast of the picture to be displayed, namely, entering step 101, and if not, entering step 301 again to monitor whether the page scrolling instruction is received.
Specifically, in a scene of displaying an image-text page, if the page is not scrolled, the picture is not changed, and the problem of smear is not caused, so that content contrast adjustment is not needed, the process of adjusting the picture is only started when a page scrolling instruction is received, for example, when a user slides a screen, and in addition, the page scrolling instruction can also be a page automatic scrolling instruction, namely when the page enters an automatic scrolling mode, the process of adjusting the content contrast is executed.
Optionally, as shown in fig. 12, before periodically adjusting the content contrast of the to-be-displayed picture, the method further includes:
step 401, acquiring the type of an application program operated by a foreground;
step 402, determining whether the application type running in the foreground belongs to a preset type, if so, that is, if the application type running in the foreground belongs to the preset type, triggering to periodically adjust the content contrast of the picture to be displayed, that is, entering step 101, in the flow shown in fig. 12, when determining that the application type running in the foreground belongs to the preset type, entering step 301, and then determining whether to enter step 101, if the application type running in the foreground does not belong to the preset type, indicating that the picture is not suitable to be adjusted by the above method, and entering step 401 again for continuous monitoring.
Specifically, the preset category may include, for example: instant messaging, friend making, mail box, shopping, taking out, movie ticket, travel ticket booking, information, reading, dictionary translation, education and the like.
As shown in fig. 13, fig. 13 is a flowchart of another method for adjusting content contrast of a to-be-displayed picture in an embodiment of the present application, and an embodiment of the present application further provides a method for adjusting content contrast of a to-be-displayed picture, including: periodically adjusting the content contrast of the picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps:
step 201, obtaining a color value pair distribution histogram of at least one group of pictures, wherein each group of pictures comprises two adjacent frames of pictures, the color value pair distribution histogram is used for reflecting a corresponding relation between a color value pair and the number, the color value pair comprises a first color value and a second color value, the two adjacent frames of pictures are respectively used as a previous frame of picture and a next frame of picture, and the first color value and the second color value are respectively color values of the previous frame of picture and the next frame of picture at the same position;
specifically, during the picture display process, for example, as shown in fig. 5, the process of adjusting the content contrast of the picture to be displayed is triggered every 20 frames, that is, the process of adjusting the content contrast of the picture to be displayed is triggered every 20 frames, for example, when the picture display of the 20 th frame is finished, step 201 is performed to obtain 20 frames of pictures in succession from 1 st to 20 th, where each two adjacent frames of pictures are a group of pictures, each group of pictures corresponds to one color value pair distribution histogram, and all color value distribution histograms corresponding to the 20 frames of pictures are obtained, in one possible embodiment, the color values include an R channel color value, a G channel color value, and a B channel color value, for example, as shown in fig. 14, fig. 14 is a color value pair distribution histogram in the present embodiment, the color value pair histogram includes an R channel color value pair histogram, a G channel color value pair distribution histogram, and a B channel color value pair distribution histogram, the first color value includes an R channel first color value, a G channel first color value, and a B channel color value pair distribution histogram, the second color value includes an R channel second color value, and a B channel color value pair distribution histogram, and when the color value pair distribution histogram is determined, the color value in the page, the background color value is changed, and the color value of the background color value is changed, and the background color value of the change is determined in the page.
Step 202, obtaining a color value of a foreground color and a color value of a background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures;
specifically, taking the example of obtaining the color value pair distribution histogram of more than two groups of pictures, based on one color value pair distribution histogram, two color values in the color value pair with the largest distribution number may be respectively used as the color value of the group foreground color and the color value of the group background color, for example, the 1 st frame picture and the 2 nd frame picture are the first group picture, the 2 nd frame picture and the 3 rd frame picture are the second group picture, and so on, the 1 st frame to the 20 th frame picture may include 19 groups of pictures. Based on the color value pair distribution histogram corresponding to the first group of pictures, in the R channel color value pair distribution histogram, the number of color value pairs (52-248) is the largest, wherein the R channel first color value is 52, the R channel second color value is 248, so that 52 can be used as the R channel color value of the group foreground color, 248 can be used as the R channel color value of the group background color, in the G channel color value pair distribution histogram, the number of color value pairs (24-248) is the largest, wherein the G channel first color value is 24, the G channel second color value is 248, so that 24 can be used as the G channel color value of the group foreground color, 248 can be used as the G channel color value of the group background color, in the B channel color value pair distribution histogram, the number of color value pairs (52-248) is the largest, wherein the B channel first color value is 52, the B channel second color value is 248, so that 52 can be used as the B channel color value of the group foreground color, and 248 can be used as the B channel color value of the group background color. In a similar way, color values of the group foreground color and color values of the group background color corresponding to the distribution histogram are determined for each group of pictures, and then, R channel color values of the foreground color reflecting the overall level of the R channel color values of all the group foreground colors may be obtained based on the R channel color values of all the group foreground colors, for example, R channel color values of the foreground color may be obtained by averaging R channel color values of all the group foreground colors, in other realizable embodiments, R channel color values of the foreground color may also be obtained by averaging median values of R channel color values of all the group foreground colors, or by determining R channel color values of the foreground color by taking a weighted average or other means, but in any way, the R channel color values of the foreground color reflect the overall level of the R channel color values of all the group foreground colors; in a similar manner, R channel color values of the background color, G channel color values of the foreground color, G channel color values of the background color, B channel color values of the foreground color, and B channel color values of the background color are obtained.
Step 203, determining whether the color values of the foreground color and the background color meet the preset liquid crystal response condition, if not, entering step 204, if so, entering step 205;
step 204, adjusting the content contrast of the picture to be displayed, increasing the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed, and displaying the picture to be displayed after the content contrast is adjusted; after step 204, step 201 is re-entered in the next period to perform the next content contrast adjustment.
And step 205, displaying the original picture to be displayed, and after the step 205, re-entering the step 201 in the next period to execute the next content contrast adjustment.
Specifically, the specific process and principle of step 203 are the same as those of step 103 in the above embodiment, the specific process and principle of step 204 are the same as those of step 204 in the above embodiment, and the specific process and principle of step 205 are the same as those of step 105, which are not described herein again. The main difference between the content contrast adjustment method in this embodiment (i.e., the content contrast adjustment method shown in fig. 13) and the content contrast adjustment method in the other embodiments described above is how to determine the color value of the foreground color and the color value of the background color.
In the above embodiment, only the example of obtaining the color value pair distribution histogram corresponding to more than two groups of pictures each time is taken as an example, in a possible implementation manner, the step 201 of obtaining the color value pair distribution histogram of at least one group of pictures includes: acquiring two continuous frames of pictures, wherein the two continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed; taking the obtained two continuous frames of pictures as a group of pictures, and obtaining a corresponding color value pair distribution histogram;
the step 202, obtaining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures obtained includes:
based on the obtained color value pair distribution histogram, the first color value and the second color value in the color value pair having the largest number are respectively taken as the color value of the foreground color and the color value of the background color.
Specifically, for example, after the 1 st and 2 nd frames are finished and before the 3 rd frame is displayed, the content contrast of the to-be-displayed frame is triggered and adjusted, the 1 st and 2 nd frames are used as a group of frames, a color value pair distribution histogram of the 1 st and 2 nd frames is obtained, a first color value and a second color value in a color value pair with the largest number in the color value pair distribution histogram of the 1 st and 2 nd frames are respectively used as a color value of a foreground color and a color value of a background color, whether the color value of the foreground color and the color value of the background color meet a preset liquid crystal response condition is determined, if not, the colors of the 3 rd and 4 th frames are adjusted, the color difference between the color value of the foreground color and the color value of the background color in the 3 rd and 4 th frames is increased, the current adjustment is finished, and the 3 rd and 4 th frames are displayed according to the adjusted result; when the 4 th frame of picture is displayed and the 5 th frame of picture is not displayed, triggering a new process of adjusting the content contrast of the picture to be displayed, acquiring color value pair distribution histograms of the 3 rd and 4 th frames of pictures, respectively taking a first color value and a second color value in the color value pair distribution histogram with the maximum number in the 3 rd and 4 th frames of pictures as a color value of a foreground color and a color value of a background color, judging whether the color values of the foreground color and the background color obtained in the process of adjusting the content contrast of the picture to be displayed at this time meet the liquid crystal response adjustment, if not, adjusting the colors of the 5 th and 6 th frames of pictures to increase the color difference between the color values of the foreground color and the background color in the 5 th and 6 th frames of pictures, ending the content contrast adjustment at this time, and displaying the 7 th frame of picture according to the result after the adjustment at this time; by analogy, the content contrast can be adjusted in the dynamic picture display process.
For another example, the content contrast of the picture to be displayed is triggered and adjusted by taking a frame as a period, after the 1 st frame picture is finished and before the 2 nd frame picture is displayed, the content contrast of the picture to be displayed is triggered and adjusted, the 1 st frame picture is a displayed picture, the 2 nd frame picture is a group of pictures, the color value pair distribution histogram of the 1 st frame picture and the 2 nd frame picture is obtained, the first color value and the second color value in the color value pair with the maximum number in the color value pair distribution histogram of the 1 st frame picture and the 2 nd frame picture are respectively used as the color value of the foreground color and the color value of the background color, whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition or not is determined, if not, the content contrast of the 2 nd frame picture is adjusted, the color difference between the color value of the foreground color in the 2 nd frame picture and the color value of the background color is increased, the current adjustment is finished, and the 2 nd frame picture is displayed according to the adjusted result; when the 2 nd frame picture is displayed, when the 3 rd frame picture is not displayed, triggering and adjusting the content contrast of the picture to be displayed, taking the original picture and the 3 rd frame picture of the 2 nd frame picture as a group of pictures, acquiring color value pair distribution histograms of the 2 nd frame picture and the 3 rd frame picture, respectively taking a first color value and a second color value in a color value pair with the maximum number as a color value of a foreground color and a color value of a background color, determining whether the color value of the foreground color and the color value of the background color obtained at this time meet preset liquid crystal response conditions, if not, adjusting the content contrast of the 3 rd frame picture, increasing the color difference between the color value of the foreground color and the color value of the background color in the 3 rd frame picture, ending the adjustment, and displaying the 3 rd frame picture according to the adjusted result; by analogy, the content contrast can be adjusted in the dynamic picture display process.
Optionally, the step 201 of obtaining the distribution histogram of color value pairs of at least one group of pictures includes: acquiring at least three continuous frames of pictures, wherein the at least three continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed; taking any two adjacent frames of pictures in the at least three continuous frames of pictures as a group of pictures, and acquiring a color value pair distribution histogram of each group of pictures;
the step 202, obtaining the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures includes:
distributing histograms based on the acquired color value pairs, the first color value and the second color value in the color value pair having the largest number being the color value of the group foreground color and the color value of the group background color, respectively; color values obtained after the color values of all groups of foreground colors are processed by a preset algorithm are used as color values of the foreground colors, color values obtained after the color values of all groups of background colors are processed by the preset algorithm are used as color values of the foreground colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, taking a weighted average value or taking a median value.
Specifically, in an implementable embodiment, for example, as shown in fig. 5, taking an example of adjusting the content contrast of the to-be-displayed picture in a period of 20 frames as an example, adjusting the content contrast of the to-be-displayed picture every 20 frames, when the 20 th frame is displayed and the 21 st frame is not displayed, executing step 201, acquiring the 1 st to 20 th frames, the 1 st to 20 th frames being displayed pictures, acquiring the original pictures of the pictures, regarding two frames, namely the 1 st frame and the 2 nd frame, as a first group of pictures, regarding the 2 nd frame, the 3 rd frame and two frames as a second group of pictures, and so on, regarding the 19 th frame and the 20 th frame as a nineteenth group of pictures, acquiring the color value pair distribution histogram of each group of pictures in the nineteenth group of pictures, and then executing step 202, based on each color value pair distribution histogram, the first color value and the second color value in the color value pair with the largest number are respectively used as the color value of the group foreground color and the color value of the group background color, if there are two color values in a certain distribution histogram with the same number corresponding to the two color values, one of them can be selected according to a preset logic, the corresponding color value of the group foreground color and the color value of the group background color are determined for each group of pictures, the color values of the group foreground color and the color values of the group background color are totally 19, then the average value, the weighted average value or the median value of the color values of the 19 group foreground colors is used as the color value of the foreground color, and the average value, the weighted average value or the median value of the color values of the 19 group background colors is used as the color value of the background color. Then, step 203 is executed, whether the color value of the foreground color and the color value of the background color meet the preset liquid crystal response condition is determined, if not, the content contrast of the 21 st to 40 th frames of pictures is adjusted, the 21 st to 40 th frames of pictures are displayed according to the adjusted result, and if yes, the original pictures of the 21 st to 40 th frames are directly displayed; and when the 40 th frame of picture is displayed and the 41 th frame of picture is not displayed, triggering and adjusting the content contrast of the picture to be displayed, and so on, and realizing the content contrast adjustment in the dynamic picture display process by periodically adjusting the content contrast of the picture to be displayed. In another practical implementation, for example, when the 20 th frame is displayed and the 21 st frame is not displayed, step 201 is executed to obtain 2 nd to 21 st frames, the 2 nd to 20 th frames are displayed, the original frames of these frames are obtained, the 21 st frame is a frame to be displayed, the two frames of the 2 nd and 3 rd frames are used as the first group, the 3 rd and 4 th frames are used as the second group, and so on, the 20 th and 21 st frames are used as the nineteenth group, the color value pair distribution histogram of each group of the nineteenth group is obtained, then step 202 is executed to obtain the color value pair distribution histogram based on each color value pair, if the number of the color values in a certain distribution histogram is the same as the corresponding number of the color values in the two color value pairs, one of the color values can be selected according to preset logic, the color value of the corresponding group foreground color and the color value of the group background color are determined for each group of pictures, the color values of the group foreground color and the color value of the group background color are determined, the color values of the group foreground color and the color values of the group background color are determined for 19 groups, the average value, the weighted average value or the median value of the color values of the group foreground colors are used as the foreground color, and the average value, the weighted average value or the median value of the group background color is used as the color value of the background color. Then, step 203 is executed, whether preset liquid crystal response conditions are met is judged according to the color values of the foreground color and the background color, if not, the content contrast of the 21 st frame to the 40 th frame is adjusted, the 21 st frame to the 40 th frame are displayed according to the adjusted result, and if yes, the original frames of the 21 st frame to the 40 th frame are directly displayed; and when the 40 th frame of picture is displayed and the 41 th frame of picture is not displayed, triggering to adjust the content contrast of the picture to be displayed, and so on, and adjusting the content contrast of the picture to be displayed through periodic triggering, so that the content contrast adjustment in the dynamic picture display process can be realized.
Optionally, the absolute value of the difference between the first color value and the second color value of each color value pair in the color value pair profile is greater than a preset difference value.
Specifically, in the process of obtaining the color value pair distribution histogram, the magnitude of the difference value of the color value pair is determined, and for the color value pair with a smaller difference value, statistics is not performed, and only the color value pair with a difference value of the color value pair reaching a preset difference value is counted, for example, the color value pair with a color value including an R channel color value, a G channel color value and a B channel color value, for the R channel color value histogram, statistics is performed only for the color value pair with an absolute value of a difference value between a first color value and a second color value being equal to or greater than 50, for the G channel color value histogram, statistics is performed only for the color value pair with an absolute value of a difference value between a first color value and a second color value being equal to or greater than 50, for the B channel color value histogram, so that some interference terms with a larger number and a smaller difference value can be excluded, for example, a pixel serving as a background in a picture has a small color change, but is not actually caused by alternation between a foreground color and a background color, and therefore, such interference of the pixel needs to be excluded.
In a possible implementation manner, the step 204 of adjusting the content contrast of the to-be-displayed picture to increase the color difference between the color value of the foreground color and the color value of the background color in the to-be-displayed picture includes: the tone curve of the picture to be displayed is adjusted such that the tone curve is pulled high at the greater one of the color value position of the foreground color and the color value position of the background color, and/or such that the tone curve is pulled low at the smaller one of the color value position of the foreground color and the color value position of the background color. The specific process and principle of adjusting the color of the image by the tone curve are the same as those of the above embodiments, and are not described herein again.
In a possible embodiment, the color values include an R channel color value, a G channel color value, and a B channel color value, the color value pair distribution histogram includes an R channel color value pair distribution histogram, a G channel color value pair distribution histogram, and a B channel color value pair distribution histogram, the first color value includes an R channel first color value, a G channel first color value, and a B channel first color value, and the second color value includes an R channel second color value, a G channel second color value, and a B channel second color value, that is, the color values are split into the R channel color value, the G channel color value, and the B channel color value, and the color value pair is split into an R channel color value pair, a G channel color value, and a B channel color value pair, and each color channel color value pair distribution histogram is used to represent a relationship between a color value pair and a quantity in a picture, that is, in determining the color value of the foreground color value and the color value of the background color, the G channel color value of the foreground color, the B channel color value, and the B channel color value of the background color, and the background color are described in the above embodiments.
In another possible embodiment, the color value is a gray-scale color value obtained by weighted conversion of an R channel color value, a G channel color value and a B channel color value, the color value pair distribution histogram is a gray-scale color value pair distribution histogram, the first color value is a first gray-scale color value, the second color value is a second gray-scale color value, for example, a gray-scale color value pair corresponding to a pixel is P1-P1', where P1 is a first gray-scale color value and P1' is a second gray-scale color value, P1 can be obtained by conversion of three channel color values (R1 ', G1', B1 '), P1' can be obtained by conversion of three channel color values (R1 ', G1 '), and another pixel is a gray-scale color value pair corresponding to a pixel is P2-P2', where P2 is a first gray-scale color value, P2' is a second gray-scale color value, P2 can be obtained by conversion of three channel color values (R2, G2, B2 '), P2' can be obtained by conversion of three channel color values (R2 ', G2', B2 '), and so on, the distribution color value pair distribution histogram can reflect the number of gray-scale color values in the gray-scale color value pair distribution and the gray-scale distribution. In the embodiment that only one group of pictures is obtained in the process of adjusting the content contrast of the picture to be displayed each time, namely only two continuous frames of pictures are obtained, the gray scale color value of the foreground color and the gray scale color value of the background color can be directly obtained according to the gray scale color value pair distribution histogram, for example, the gray scale color value pair with the largest number in the gray scale color value pair distribution histogram is P1-P1', P1 is taken as the gray scale color value of the foreground color, and P1' is taken as the gray scale color value of the background color; in the embodiment of obtaining more than two groups of pictures each time, that is, obtaining at least three continuous frames of pictures, the gray scale color value of the group foreground color and the gray scale color value of the group background color can be obtained according to the gray scale color value pair distribution histogram, for example, the gray scale color value pair with the largest number in the gray scale color value pair distribution histogram is P1-P1', P1 is taken as the gray scale color value of the group foreground color, P1' is taken as the gray scale color value of the group background color, and further the gray scale color value of the foreground color and the gray scale color value of the background color can be obtained, assuming that the obtained gray scale color value of the foreground color is P1, and the gray scale color value of the background color is P1'. When a picture is adjusted, P1 needs to be converted into three channel color values (R1, G1, B1), P1' needs to be converted into three channel color values (R1 ', G1', B1 '), it needs to be determined whether R1 and R1' meet preset liquid crystal response conditions, G1 and G1' meet corresponding preset liquid crystal conditions, and B1' meet corresponding preset liquid crystal conditions, respectively, if one of the conditions does not meet the corresponding preset liquid crystal response condition, content contrast adjustment needs to be performed, for example, only if B1 and B1' do not meet the preset liquid crystal response conditions, content contrast is adjusted, so that color difference between B1 and B1' is increased.
In a further possible embodiment, the color value is a pixel color of a combination of the R channel color value, the G channel color value and the B channel color value, the color value pair distribution histogram is a pixel color pair distribution histogram, the first color value is a first pixel color, and the second color value is a second pixel color. For example, for a group of pictures, if a certain pixel color in a previous frame picture is (R1, G1, B1), and a corresponding pixel color in a subsequent frame picture is (R1 ', G1', B1 '), then the group of pictures has a pixel color pair corresponding to the pixel as (R1, G1, B1) - (R1 ', G1', B1 '), assuming that the number of the pixel color pair in the pixel color pair distribution histogram is the largest, in an embodiment where only one group of pictures is obtained at a time of adjustment, i.e., only two consecutive frames of pictures are obtained, it is possible to use (R1, G1, B1) as the color value of the foreground color, use (R1 ', G1', B1 ') as the color value of the background color, and use (R1 ', G1', B1 ') as the color value of the foreground color in an embodiment where two or more groups of pictures are obtained at a time of adjustment, i.e., at least three consecutive frames of pictures are obtained, it is assumed that whether the color values of the foreground color values of the (R1, G1, B1 ') as the background color value are used, it is necessary to determine whether the liquid crystal response conditions are satisfied, whether the liquid crystal response conditions and whether the color difference between the liquid crystal response conditions are satisfied, and the liquid crystal response conditions are preset, and the liquid crystal response conditions are satisfied, and the liquid crystal response conditions are preset, and the liquid crystal response conditions are increased, if the liquid crystal response conditions are satisfied, for example, and the liquid crystal response conditions are increased, and the liquid crystal response conditions are satisfied.
Optionally, as shown in fig. 15, fig. 15 is a flowchart of another method for adjusting content contrast of a to-be-displayed picture in this embodiment of the application, before periodically adjusting the content contrast of the to-be-displayed picture, the method further includes: step 301, judging whether a page scrolling instruction is received, if so, responding to the page instruction, triggering to periodically adjust the content contrast of the picture to be displayed, namely, entering step 201, and if not, entering step 301 again to monitor whether the page scrolling instruction is received.
Specifically, in a scene of displaying an image-text page, if the page is not scrolled, the picture is not changed, and the problem of smear is not caused, so that content contrast adjustment is not needed, and the adjustment of the content contrast of the picture to be displayed is triggered only when a page scrolling instruction is received, for example, when a user slides a screen.
Optionally, as shown in fig. 15, before periodically adjusting the content contrast of the picture to be displayed, the method further includes:
step 401, acquiring the type of an application program operated by a foreground;
step 402, determining whether the application type running in the foreground belongs to a preset type, if so, that is, if the application type running in the foreground belongs to the preset type, triggering a process of periodically adjusting the content contrast of the picture to be displayed, that is, entering step 201, in the flow shown in fig. 12, when determining that the application type running in the foreground belongs to the preset type, entering step 301, and then determining whether to enter step 201, if not, indicating that the picture is not suitable to be adjusted by the above method, and entering step 401 again for continuous monitoring.
Specifically, the preset category may include, for example: instant messaging, friend making, mailbox, shopping, takeaway, movie ticketing, travel booking, information, reading, dictionary translation, education and the like. Table 4 below specifically illustrates examples of whether various types of applications belong to the preset categories.
TABLE 4
Figure BDA0002634024710000191
Figure BDA0002634024710000201
An embodiment of the present application further provides an electronic device, which includes: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the methods of the above embodiments. The electronic device may be any electronic device with a display function, such as a mobile phone, a tablet computer, and a notebook computer.
Wherein the processor and memory may be connected by a bus or other means. The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, and the processor executes the non-transitory software programs, instructions, and modules stored in the memory to execute various functional applications and data processing, i.e., implement the methods in any of the above method embodiments. The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; and necessary data, etc. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, where the computer program includes instructions, and when the instructions are executed by an electronic device, the electronic device is caused to execute the method in the foregoing embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), among others.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A method for adjusting content contrast of a picture to be displayed is characterized by comprising the following steps:
periodically adjusting the content contrast of a picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps:
acquiring a color value distribution histogram of at least one frame of picture, wherein the color value distribution histogram is used for reflecting the corresponding relation between color values and the number;
obtaining a color value of a foreground color and a color value of a background color corresponding to the picture to be displayed based on the acquired color value distribution histogram of the at least one frame of picture;
if the color value of the foreground color and the color value of the background color do not meet the preset liquid crystal response condition, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color of the picture to be displayed;
and displaying the picture to be displayed after the content contrast is adjusted.
2. The method of claim 1,
the process of acquiring the color value distribution histogram of at least one frame of picture comprises the following steps:
acquiring a color value distribution histogram of a frame of picture to be displayed;
the obtaining of the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value distribution histogram of the at least one frame of picture includes:
based on the color value distribution histogram of the frame of picture to be displayed, respectively taking the two color values with the maximum number as the color values of the foreground color and the background color; alternatively, the first and second electrodes may be,
and based on the color value distribution histogram of the frame of picture to be displayed, respectively taking two color values which reach a preset number and meet the requirement of foreground application calling color as the color value of the foreground color and the color value of the background color.
3. The method of claim 1,
the acquiring a color value distribution histogram of at least one frame of picture comprises the following steps:
acquiring a color value distribution histogram of at least two frames of continuous pictures, wherein the at least two frames of continuous pictures comprise displayed pictures adjacent to pictures to be displayed;
the obtaining of the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the obtained color value distribution histogram of the at least one frame of picture comprises:
based on the color value distribution histogram of each frame of the acquired picture, respectively taking the two color values with the maximum number as the color values of the foreground color of the frame and the background color of the frame;
color values obtained after color values of all frame foreground colors are processed by a preset algorithm are used as color values of the foreground colors, color values obtained after color values of all frame background colors are processed by the preset algorithm are used as color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking an average value, a weighted average value or a median value; alternatively, the first and second electrodes may be,
based on the acquired color value distribution histogram of each frame of picture, respectively taking two color values which reach a preset number and meet the requirement of foreground application calling color as a color value of a frame foreground color and a color value of a frame background color;
the color values obtained after the color values of all the obtained foreground colors of the frames are processed by a preset algorithm are used as the color values of the foreground colors, the color values obtained after the color values of all the obtained background colors of the frames are processed by the preset algorithm are used as the color values of the background colors, and the preset algorithm processing comprises any one of the following steps: taking the average value, taking the weighted average value or taking the median value.
4. The method according to any one of claims 1 to 3,
the color values include an R channel color value, a G channel color value and a B channel color value, and the color value distribution histogram includes an R channel color value distribution histogram, a G channel color value distribution histogram and a B channel color value distribution histogram;
or the color value is a gray scale color value obtained by weighted conversion of an R channel color value, a G channel color value and a B channel color value, and the color value distribution histogram is a gray scale color value distribution histogram;
or, the color value is a color value of a pixel color, and the color value distribution histogram is a pixel color distribution histogram.
5. A method for adjusting content contrast of a picture to be displayed is characterized by comprising the following steps:
periodically adjusting the content contrast of a picture to be displayed, wherein the adjusting the content contrast of the picture to be displayed comprises the following steps:
acquiring a color value pair distribution histogram of at least one group of pictures, wherein each group of pictures comprises two adjacent frames of pictures, the color value pair distribution histogram is used for reflecting the corresponding relation between a color value pair and the number, the color value pair comprises a first color value and a second color value, the two adjacent frames of pictures are respectively used as a previous frame of picture and a next frame of picture, and the first color value and the second color value are respectively the color values of the previous frame of picture and the next frame of picture at the same position;
obtaining a color value of a foreground color and a color value of a background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures;
if the color value of the foreground color and the color value of the background color do not meet the preset liquid crystal response condition, adjusting the content contrast of the picture to be displayed to increase the color difference between the color value of the foreground color and the color value of the background color in the picture to be displayed;
and displaying the picture to be displayed after the content contrast is adjusted.
6. The method of claim 5,
the process of acquiring the color value pair distribution histogram of at least one group of pictures comprises the following steps:
acquiring two continuous frames of pictures, wherein the two continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed;
taking the obtained two continuous frames of pictures as a group of pictures, and obtaining a corresponding color value pair distribution histogram;
the obtaining of the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures comprises:
based on the obtained color value pair distribution histogram, a first color value and a second color value in the color value pair having the largest number are respectively taken as the color value of the foreground color and the color value of the background color.
7. The method of claim 5,
the acquiring color value pair distribution histogram of at least one group of pictures comprises the following steps:
acquiring at least three continuous frames of pictures, wherein the at least three continuous frames of pictures comprise displayed pictures adjacent to pictures to be displayed;
taking any two adjacent frames of pictures in the at least three continuous frames of pictures as a group of pictures, and acquiring a color value pair distribution histogram of each group of pictures;
the obtaining of the color value of the foreground color and the color value of the background color corresponding to the picture to be displayed based on the color value pair distribution histogram of the at least one group of pictures comprises:
based on the color value pair distribution histogram of each group of acquired pictures, respectively taking a first color value and a second color value in the color value pair with the largest number as a color value of a group foreground color and a color value of a group background color;
color values obtained after color values of all groups of foreground colors are processed by a preset algorithm are used as color values of the foreground colors, color values obtained after color values of all groups of background colors are processed by the preset algorithm are used as color values of the foreground colors, and the preset algorithm processing comprises any one of the following steps: taking the average value, taking the weighted average value or taking the median value.
8. The method according to any one of claims 5 to 7,
the absolute value of the difference between the first color value and the second color value of each color value pair in the color value pair distribution map is greater than a preset difference value.
9. The method according to any one of claims 5 to 7,
the color values include an R-channel color value, a G-channel color value, and a B-channel color value, the color value pair distribution histogram includes an R-channel color value pair distribution histogram, a G-channel color value pair distribution histogram, and a B-channel color value pair distribution histogram, the first color value includes an R-channel first color value, a G-channel first color value, and a B-channel first color value, the second color value includes an R-channel second color value, a G-channel second color value, and a B-channel second color value;
or the color value is a gray scale color value obtained by performing weighted conversion on an R channel color value, a G channel color value and a B channel color value, the color value distribution histogram is a gray scale color value distribution histogram, the first color value is a first gray scale color value, and the second color value is a second gray scale color value;
or, the color value is a color value of a pixel color, the color value pair distribution histogram is a pixel color pair distribution histogram, the first color value is a first pixel color, and the second color value is a second pixel color.
10. The method of claim 8,
the color values include an R-channel color value, a G-channel color value, and a B-channel color value, the color value pair distribution histogram includes an R-channel color value pair distribution histogram, a G-channel color value pair distribution histogram, and a B-channel color value pair distribution histogram, the first color value includes an R-channel first color value, a G-channel first color value, and a B-channel first color value, the second color value includes an R-channel second color value, a G-channel second color value, and a B-channel second color value;
or the color value is a gray scale color value obtained by performing weighted conversion on an R channel color value, a G channel color value and a B channel color value, the color value distribution histogram is a gray scale color value distribution histogram, the first color value is a first gray scale color value, and the second color value is a second gray scale color value;
or, the color value is a color value of a pixel color, the color value pair distribution histogram is a pixel color pair distribution histogram, the first color value is a first pixel color, and the second color value is a second pixel color.
11. The method according to any one of claims 1 to 3, 5 to 7, 10,
before the periodically adjusting the content contrast of the picture to be displayed, the method further comprises the following steps:
and responding to a page scrolling instruction, and triggering the periodical adjustment of the content contrast of the picture to be displayed.
12. The method according to any one of claims 1 to 3, 5 to 7, 10,
before the periodically adjusting the content contrast of the picture to be displayed, the method further comprises the following steps:
acquiring the type of an application program operated by a foreground, and triggering the periodical adjustment of the content contrast of the picture to be displayed if the type of the application program operated by the foreground belongs to a preset type.
13. An electronic device, comprising:
one or more processors;
one or more memories; and
one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-12.
14. A computer-readable storage medium, in which a computer program is stored, the computer program comprising instructions which, when executed by an electronic device, cause the electronic device to carry out the method according to any one of claims 1 to 12.
CN202010819733.3A 2020-08-14 2020-08-14 Method for adjusting content contrast, electronic device and storage medium Active CN114078452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010819733.3A CN114078452B (en) 2020-08-14 2020-08-14 Method for adjusting content contrast, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010819733.3A CN114078452B (en) 2020-08-14 2020-08-14 Method for adjusting content contrast, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114078452A CN114078452A (en) 2022-02-22
CN114078452B true CN114078452B (en) 2022-12-27

Family

ID=80279502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010819733.3A Active CN114078452B (en) 2020-08-14 2020-08-14 Method for adjusting content contrast, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114078452B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827484B (en) * 2022-04-22 2023-10-20 咪咕视讯科技有限公司 Video image quality enhancement method, device, equipment and storage medium
CN115357166B (en) * 2022-08-26 2023-07-07 重庆尚优科技有限公司 Intelligent management system for intelligent city map color matching

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4727414A (en) * 1984-12-07 1988-02-23 Ncr Corporation Circuit for converting digital signals representing color information into analog voltage level signals with enhanced contrast between foreground and background
JP2004348151A (en) * 2001-11-09 2004-12-09 Sharp Corp Liquid crystal display method
CN101609658A (en) * 2009-07-14 2009-12-23 昆山龙腾光电有限公司 Liquid crystal indicator and driving method thereof
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method
CN106710551A (en) * 2016-12-30 2017-05-24 广东欧珀移动通信有限公司 Method and device for controlling display screen driving voltage as well as terminal equipment
CN107665681A (en) * 2017-09-26 2018-02-06 武汉华星光电技术有限公司 Liquid crystal display driving method, system and computer-readable medium
CN109447086A (en) * 2018-09-19 2019-03-08 浙江口碑网络技术有限公司 A kind of extracting method and device of picture character color

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201217721D0 (en) * 2012-10-03 2012-11-14 Holition Ltd Video image processing
US10692221B2 (en) * 2018-07-13 2020-06-23 Adobe Inc. Automatic trimap generation and image segmentation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4727414A (en) * 1984-12-07 1988-02-23 Ncr Corporation Circuit for converting digital signals representing color information into analog voltage level signals with enhanced contrast between foreground and background
JP2004348151A (en) * 2001-11-09 2004-12-09 Sharp Corp Liquid crystal display method
CN101609658A (en) * 2009-07-14 2009-12-23 昆山龙腾光电有限公司 Liquid crystal indicator and driving method thereof
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method
CN106710551A (en) * 2016-12-30 2017-05-24 广东欧珀移动通信有限公司 Method and device for controlling display screen driving voltage as well as terminal equipment
CN107665681A (en) * 2017-09-26 2018-02-06 武汉华星光电技术有限公司 Liquid crystal display driving method, system and computer-readable medium
CN109447086A (en) * 2018-09-19 2019-03-08 浙江口碑网络技术有限公司 A kind of extracting method and device of picture character color

Also Published As

Publication number Publication date
CN114078452A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
US20210049977A1 (en) Pixel rendering method, image rendering method, rendering apparatus, and display apparatus
KR101138852B1 (en) Smart clipper for mobile displays
US10825408B2 (en) Display driving method, device and apparatus
CN108766372B (en) Method for improving mura phenomenon of display panel
CN114078452B (en) Method for adjusting content contrast, electronic device and storage medium
US10783837B2 (en) Driving method and driving device of display device, and related device
CN107665681B (en) Liquid crystal display driving method, system and computer readable medium
CN109686342B (en) Image processing method and device
CN101707666A (en) Adjusting method and device with high dynamic range
CN112965678A (en) Display, device, storage medium and method based on electronic ink screen
WO2020001176A1 (en) Display method and device, visible light communication transmission method and device
KR102344334B1 (en) Display apparatus and method for processing image
CN116825039B (en) Backlight brightness calculating method, display device and computer readable storage medium
US11735147B1 (en) Foveated display burn-in statistics and burn-in compensation systems and methods
US11436994B2 (en) Method for adjusting white balance of pixel, display panel and computer readable storage medium
CN102859573A (en) Method and apparatus for adaptive main back-light blanking in liquid crystal displays
WO2020098624A1 (en) Display method and apparatus, vr display apparatus, device, and storage medium
CN112565909B (en) Video playing method and device, electronic equipment and readable storage medium
CN113096592B (en) Method and device for eliminating ghost shadow of display screen and display device
CN112435634A (en) Image display method, image display apparatus, and readable storage medium
US10068549B2 (en) Cursor handling in a variable refresh rate environment
US11605332B1 (en) Moving picture response time (MPRT) techniques for liquid crystal displays (LCDs)
CN112669768B (en) LED display screen brightness adjusting method, device and equipment and readable storage medium
CN113808515B (en) Common electrode structure, driving method and display device
US11558577B2 (en) Method for adjusting wide view angle, display panel and computer readable storage medium

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