CN114078452A - 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
CN114078452A
CN114078452A CN202010819733.3A CN202010819733A CN114078452A CN 114078452 A CN114078452 A CN 114078452A CN 202010819733 A CN202010819733 A CN 202010819733A CN 114078452 A CN114078452 A CN 114078452A
Authority
CN
China
Prior art keywords
color
color value
picture
value
foreground
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010819733.3A
Other languages
Chinese (zh)
Other versions
CN114078452B (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)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Controls And Circuits For Display Device (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 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.
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 with the maximum 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, two color values which reach the preset number and meet the requirement of foreground application calling color are respectively used as the color values of the foreground color and 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, 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, in the process of displaying the picture to be displayed, the corresponding liquid crystal response speed during conversion of at least partial pixel colors is increased, and the problem of smear 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 page of a graphic reading application;
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 corresponding to a color value varying 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 disclosure;
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 the scenario referred to 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), the LCD can use 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, 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 liquid crystal display displays a video being played, a rolling bullet screen is arranged in the video playing interface, and the rolling of the bullet screen can also cause the change of the content displayed by the liquid crystal display. 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 an 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 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. 6, fig. 6 is a color value distribution histogram of a picture in the embodiment of the present application, 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, an ordinate is a distribution number of the color value in a display picture, the color value distribution histogram reflects a distribution situation of colors in the picture, for example, in the text reading scenario shown in fig. 1, the two colors most distributed in the page are the text color and the text ground color, when the page is scrolled, the more color change is the change between the text color and the text ground color, and the color with more distribution in the picture can be determined according to the color value distribution histogram, namely the character color and the character 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 1 st frame 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 analogically, the color value of the corresponding frame foreground color and the color value of the frame background color are determined based on each frame 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 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, … and R20a, R channel color values of 20 frame background colors of R1B, R2B, … and R20B, G channel color values of 20 frame foreground colors of G1a, G2a, … and G20a, G channel color values of 20 frame background colors of G1B, G2B, … and G20B, B channel color values of 20 frame foreground colors of B1 539 1a, B2a, … and B20a, and B channel color values of 20 frame background colors of B1B, B2B, … and B20B. Then, color values of the foreground color 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 be given taking the average value as a value reflecting the overall level as an example, the R channel color value of the background color is Rb, and Rb is an average value of the R channel color values of the background colors of 20 frames, and similarly, 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 pictures of the liquid crystal display screen, the color display of each channel is realized by matching a color filter layer with the inversion of liquid crystal, wherein the inversion degree of the liquid crystal is used for controlling the brightness of emergent light, namely, 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, namely, the change of the channel color value is positively correlated with the liquid crystal inversion speed. During the display process of a text or graphics page, a picture has a more obvious foreground color and background color, for example, during the use process of a news application, the picture mainly consists of the background (ground color) and the foreground (text), and during the page scrolling process, most 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 picture 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 picture is small, the foreground color and the background color obtained in step 102 may also reflect the character color and the character background color in the picture to be displayed, for example, in the picture mainly composed of characters and a pure background, the foreground color and the background color respectively correspond to the character color and the character background color, and although the picture may change during the picture rolling process, the foreground color and the background color may not change generally, that is, the color may change between the foreground color and the background color in most pixels during the picture rolling process, so for the liquid crystal display panel, the turning angle of the liquid crystal in most pixels may be 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 color value of the foreground color and the color value of the background color, and the difference between the color value of the foreground color and the color value of the background color are determined, that is, if the difference between the color value of the foreground color corresponding to a certain channel and the color value of the background color is too small, the color value variation of the channel corresponding to most of the pixels in two adjacent frames is small, which may cause that the liquid crystal corresponding to the channel of the pixels is not turned to a required angle in the process of refreshing the picture, and thus the phenomenon of smear may be caused. 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, 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 color channel color value of the foreground color and a 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 flipping speed corresponding to the channel is fast, i.e., 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 step 103 satisfy the preset liquid crystal response condition The crystal response condition indicates that no smear is caused in the conversion process between the foreground color and the background color in the display process of the frames 1 to 20, and then the step 105 is performed to directly display the corresponding to-be-displayed picture, and the displayed picture does not cause smear or the phenomenon of smear is not obvious. 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 the RGB of the foreground color and each channel color value of the 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 the picture to be displayed, so that the color difference between each channel color value of the RGB of the foreground color and each channel color value of the RGB of the background color is increased, so as to reduce the liquid crystal response time when the picture to be displayed is displayed, 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, the content contrast adjustment is performed on the picture to be displayed, 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;
step 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, includes: based on the color value distribution histogram of the frame of picture to be displayed, the two color values with the maximum number are respectively used as the color values of the foreground color and the background color, or based on the color value distribution histogram of the frame of picture to be displayed, the two color values which reach the preset number and meet the requirement of foreground application calling color are respectively used as the color values of the foreground color and the background color.
Specifically, for example, the above process of adjusting the content contrast of the picture to be displayed is triggered in a frame period, for example, after the 1 st picture is finished and before the 2 nd picture is displayed, the process of adjusting the content contrast of the picture to be displayed is triggered, a color value distribution histogram of the 2 nd picture is obtained, two color values with the maximum number in the color value distribution histogram of the 2 nd 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 a preset number and satisfy the foreground application calling color in the color value distribution histogram of the 2 nd 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 satisfy the preset liquid crystal response condition is determined, if not, the content contrast of the 2 nd picture is adjusted, so that the color difference between the color value of the foreground color in the 2 nd picture and the color value of the background color is increased, ending the process of adjusting the content contrast of the picture to be displayed at this time, and displaying the picture of the 2 nd frame according to the adjusted result; 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, two color values which reach the preset number and satisfy the foreground application calling color in the color value distribution histogram of the 3 rd frame picture are respectively used as the color value of the foreground color and the color value of the background color, and judging whether the color value of the foreground color and the color value of the background color satisfy the liquid crystal response adjustment or not, 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, ending the adjustment, and displaying the 3 rd frame picture according to the result after 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.
Wherein, in the process of respectively 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, for example, in the scene of image-text display, if there are more pictures, it may result in the obtained color value distribution histogram having more similar peak values, the color value of the foreground color and the color value of the background color may not be accurately determined, and therefore, the color value of the foreground color and the color value of the background color may be assisted to be determined by using colors called by some Application interfaces (e.g., color parameters of Application Programming Interfaces (APIs) provided by a calling system, which are used for setting the foreground color and the background color, and recording the colors set by the APIs), the color value of the color called by the Application interfaces is compared with a peak value in a color value distribution histogram, and the color value called by the Application interfaces and having a larger peak value is selected as the color value of the foreground color and the color value of the background color.
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;
step 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, includes:
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 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 an average value, taking a weighted average value or taking a 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 picture of the 20 th frame is displayed and the picture of the 21 st frame 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 picture of the 1 st to 20 th frames are obtained, wherein the picture of the 1 st to 20 th frames is the displayed picture, color value distribution histograms corresponding to original pictures of the pictures are obtained, color values of a foreground color and a background color of the frame corresponding to each of the pictures of the 1 st to 20 th frames are determined, for example, two color values having the maximum number in each color value distribution histogram are respectively used as the color value of the foreground color and the color value of the background color of the frame, or two color values which reach a preset number and satisfy the calling color in each color value distribution histogram are respectively used as the color of the foreground color of the frame Color values of a scene and color values of a frame background color, wherein the color values of 20 frame foreground colors and the color values of 20 frame background colors are totally used, an average value, a weighted average value or a median value of the color values of the 20 frame foreground colors is used as the color values of the foreground colors, the average value, the weighted average value or the median value of the color values of the 20 frame background colors is used as the color values of the background colors, whether the color values of the foreground colors and the color values of the background colors meet preset liquid crystal response conditions or not is determined, if not, an adjusting mode of a to-be-displayed picture is determined, the adjusting mode comprises an adjusting quantity of the color values of the foreground colors and an adjusting quantity of the color values of the background colors, then the 21 st to 40 th frame pictures are displayed according to the adjusting result, and in the displaying process of the 21 st to 40 th frame pictures, the color difference between the color values of the foreground colors of each frame and the color values of the background colors is increased relative to the original pictures; 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 frame foreground color and the R-channel color value of the frame background color, respectively, that is, the color values of most pixels in the picture 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, which are the G-channel color value of the frame foreground color and the G-channel color value of the frame background color, respectively, 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, which are the B-channel color value of the frame foreground color and the B-channel color value of the frame background color, respectively, that is, the B-channel color value of most pixels in the picture is 203 and 255.
Wherein, in the process of respectively using two color values which reach the preset number and meet the 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, for example, in the scene of image-text display, if there are more pictures, it may result in the obtained color value distribution histogram having more similar peak values, it may not be able to accurately determine the frame foreground color and the frame background color, and therefore, colors called by some Application interfaces (for example, color parameters of Application Programming Interfaces (APIs) provided by a calling system and used for setting the foreground color and the background color, and colors set by these APIs) may be used to assist in determining the color value of the frame foreground color and the color value of the frame background color, compare the color value of the color called by the Application interfaces with peak values in a color value distribution histogram, and select the color value called by the Application interfaces and having a larger peak value as the color value of the frame foreground color and the color value of the frame background color.
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 and an ordinate is an output color value, 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 140 obtained before step 104, 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 an 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 the two points, so that a color difference between the color value of the foreground color and the color value of the background color increases, and the color values near the foreground color and the color values near the background color are adjusted based on curve adaptability, so that the adjustment of the whole color is smooth. The manner of adjustment of the tone curve and the display effect after the content contrast adjustment by the embodiment 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 adjustment by a content contrast adjustment 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 text ground color are (133, 195, 203), it can be seen that color difference of G channel and color difference of B channel 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 of these positions is long, which easily causes a smear phenomenon, and therefore, the technical solution in the embodiment of the present application can be applied, in the technical solution in the embodiment of the present application, through the above step 102, it can be determined that the RGB color value of the foreground color is (133, 195, 203), the RGB color value of the background color is (255, 255, 255), and it is determined in step 103 that (133, 195, 203) and (255, 255, 255) do not satisfy the liquid crystal response condition, so that it is necessary to adjust the tone curve in the frame to be displayed, for example, to adjust the G channel tone curve therein, before adjustment, the G channel color value of the background color is 255, and the G channel color value of the background color is 195, that is, adjusting the color difference between the G channel color value of the previous foreground color and the G channel color value of the background color to be 255 and 195 to be 60, 60 can reflect the content contrast of the G channel before adjustment, and assuming that fig. 10 is a diagram corresponding to the G channel tone curve, where 255 is already at the maximum value, the color value cannot be raised any more, that is the background color G channel color is unchanged, still is 255, the tone curve is pulled down at 195, the G channel color value of the foreground color is reduced to 130, namely the G channel color value of the foreground color is reduced, the G channel color value of the foreground color after adjustment is 130, namely the color difference between the G channel color value of the foreground color and the G channel color value of the background color after adjustment is 255-125, 125 can reflect the content contrast of the G channel after adjustment, it can be seen that after the color tone curve is adjusted, 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, namely the adjustment of the content contrast of the G channel is realized, namely, the G channel color values originally 195 in the picture are all changed to 130, similarly, if the R channel color tone curve is reduced to 100 at 133, the color difference between the R channel color value of the foreground color and the R channel color value of the background color can be increased from 122 to 155, namely the adjustment of the content contrast of the R channel is realized, the B channel color tone curve is reduced to 130 at 203, the color difference between the color values of the B channel of the foreground color and the color values 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 picture is adjusted, the display effect of the picture is as shown in fig. 11, as can be seen from the comparison between fig. 1 and fig. 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 adjustment of the picture to be displayed, during the page scrolling process, more pixels are in the areas of (100, 130, 130) and (255, 255, 255), the difference value of color value change is large, the response speed of the liquid crystal is high, 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 values are gray scale color values obtained by weighted conversion of R channel color values, G channel color values, and B channel color values, the color value distribution histogram is a gray scale color value distribution histogram, that is, the R channel color values, G channel color values, and B channel color values corresponding to each pixel are converted into corresponding gray scale color values, the gray scale color values and the number of pixels in the picture are counted, 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 at 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 an embodiment where at least two frames of the picture are obtained at each adjustment, 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, the gray scale color value of the foreground color and the gray scale color value of the background color can be further obtained, when the picture is 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 and the color value of the background color of the corresponding color channel 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 converted from 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 converted from the R channel color value R2, the G channel color value G2, and the B channel color value B2, in an embodiment where only one frame of picture to be displayed is acquired per adjustment, the color values of the foreground color and the background color are respectively taken as P1 and P2, in an embodiment where at least two frames of pictures are acquired per adjustment, it is necessary to determine whether the color values of the foreground color and the background color finally confirmed are respectively P1 and P2, in step 103, whether the preset liquid crystal response conditions are satisfied by R1 and R2, whether the preset liquid crystal response conditions are satisfied by G1 and G2, whether the preset liquid crystal response conditions are satisfied by B1 and B2, if one of the preset liquid crystal response conditions are not satisfied, adjustment is required, for example, if only R1 and R2 do not satisfy the corresponding preset liquid crystal response condition and the other channels all satisfy the preset liquid crystal response condition, in step 104, P1 is converted to (R1, G1, B1), P2 is converted to (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 yet another 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, each color value includes a corresponding R channel color value, a corresponding G channel color value, and a corresponding B channel color value, an abscissa in the pixel color distribution histogram is a pixel color, an ordinate is a number of pixel colors, and each pixel color distribution histogram is used to represent a relationship between the pixel color and the number in a picture, for example, in the pixel color distribution histogram, a pixel color (R1, G1, B1) and a pixel color (R2, B1), G2, B2), in an embodiment where only one frame of picture to be displayed is obtained at each adjustment, it is possible to take (R1, G1, B1) as color values of a foreground color and (R2, G2, B2) as color values of a background color, in an embodiment where at least two frames of pictures are obtained at each adjustment, assuming that (R1, G1, B1) are color values of a foreground color and (R2, G2, B2) are color values of a background color, in step 103, it is necessary to determine whether R1 and R2 satisfy a preset liquid crystal response condition, whether G1 and G2 satisfy a preset liquid crystal response condition, whether B1 and B2 satisfy a preset liquid crystal response condition, if one of them does not satisfy a preset liquid crystal response condition, for example, if only R1 and R2 do not satisfy a preset liquid crystal response condition, the other channels all satisfy a preset liquid crystal response condition, in step 104, in a color tone curve in step 103, 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 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, mailbox, shopping, takeaway, movie ticketing, travel 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 displaying process, for example, as shown in fig. 5, 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, for example, when the picture of the 20 th frame is displayed, step 201 is entered to obtain the consecutive 20 frames of pictures from 1 st to 20 th, where each two adjacent frames of pictures are a group of pictures, each group of pictures has a color value pair distribution histogram correspondingly, all color value distribution histograms corresponding to the 20 frames of pictures are obtained, in one possible embodiment, the color values include R channel color values, G channel color values and B channel color values, for example, as shown in fig. 14, fig. 14 is a color value pair distribution histogram in the embodiment of the present application, the color value pair distribution histogram includes R channel color value pair distribution histogram, G channel color value pair distribution histogram and B channel color value pair distribution histogram, the first color values comprise an R channel first color value, a G channel first color value and a B channel first color value, the second color values comprise an R channel second color value, a G channel second color value and a B channel second color value, in the color value pair distribution histogram, the abscissa represents a color value pair, the ordinate represents the number of the color value pair corresponding, and the color value pair distribution histogram reflects the distribution situation of color value changes when two adjacent frames of pictures change.
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 color value pair distribution histogram of two or more groups of pictures as an example, 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 color values of the group foreground color and 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, and 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, and 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, and 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, 248 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.
The foregoing embodiment only describes an example of obtaining color value distribution histograms corresponding to two or more groups of pictures at a time, and in a possible implementation manner, the step 201 of obtaining the color value 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 adjustment is finished, and the 3 rd frame is displayed according to the adjusted result, A 4 th frame picture; when the 4 th frame picture is displayed, and the 5 th frame 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 pictures, respectively taking the first color value and the second color value in the color value pair distribution histogram with the maximum number of color value pairs of the 3 rd and 4 th frames pictures 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 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, increasing the color difference between the color value of the foreground color and the color value of the background color in the 5 th and 6 th frames pictures, ending the content contrast adjustment at this time, and displaying the 7 th frame picture according to the result after the adjustment; by analogy, the content contrast can be adjusted in the dynamic picture display process.
For 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 taken 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 and the color value of the background color in the 2 nd frame picture is increased, and the current adjustment is finished, displaying the 2 nd frame picture 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 obtained includes:
based on the acquired color value pair distribution histogram, regarding the first color value and the second color value in the color value pair having the largest number as 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 the content contrast of the picture to be displayed as an example of adjusting the content contrast of the picture to be displayed in a period of 20 frames, triggering the adjustment of the content contrast of the picture to be displayed every 20 frames, when the 20 th frame of picture is displayed and the 21 st frame of picture is not displayed, executing step 201, acquiring the 1 st to 20 th frames of pictures, the 1 st to 20 th frames of pictures being displayed, acquiring the original pictures of the pictures, taking the two frames of the 1 st frame and the 2 nd frame as a first group of pictures, taking the 2 nd frame, the 3 rd frame and the two frames of pictures as a second group of pictures, and so on, taking the 19 th frame of picture and the 20 th frame of picture as a nineteenth group of pictures, acquiring the color value pair distribution histogram of each group of the pictures, then executing step 202, respectively taking the first color value and the second color value in the color value pair with the largest number as the color value of the background color in the foreground of the group and the color of the group based on each color pair distribution histogram of the color, if there are two color values in a distribution histogram corresponding to the same number, one of the two color values may be selected according to a preset logic, and 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, so that the color values of the group foreground colors and the color values of the group background colors are determined, and 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 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 of picture is displayed and the 21 st frame of picture is not displayed, step 201 is executed to obtain 2 nd to 21 st frames of pictures, the 2 nd to 20 th frames of pictures are displayed pictures, the original pictures of the pictures are obtained, the 21 st frame of picture is a picture to be displayed, the two frames of pictures of the 2 nd and 3 rd frames are taken as a first group of pictures, the 3 rd and 4 th frames are taken as a second group of pictures, and so on, the 20 th and 21 st frames of pictures are taken as a nineteenth group of pictures, a color value pair distribution histogram of each group of the nineteenth group of pictures is obtained, then step 202 is executed to obtain, based on each color value pair distribution histogram, the first color value and the second color value in the color value pair having the largest number are taken as the color value of the group foreground color and the color value of the group background color, if the two color values in a certain distribution histogram have the same number corresponding to the group background color value, then one of them may be selected according to a preset logic, and for each group of pictures, the color value of the corresponding group foreground color and the color value of the group background color are determined, and the color values of the 19 group foreground colors and the color values of the 19 group background colors are determined, and 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 foreground color, and the average value, the weighted average value or the median value of the 19 group background colors 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 and adjusting 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, thereby realizing the content contrast adjustment in the dynamic picture display process.
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, no statistics is performed, only the color value pair in which the difference value of the color value pair reaches a preset difference value is counted, for example, the color value pair in which the absolute value of the difference value between the first color value and the second color value is greater than or equal to 50 is counted for the R channel color value histogram, only the color value pair in which the absolute value of the difference value between the first color value and the second color value is greater than or equal to 50 is counted for the G channel color value histogram, only the color value pair in which the absolute value of the difference value between the first color value and the second color value is greater than or equal to 50 is counted for the B channel color value histogram, so that some interference terms with a larger number but smaller difference value, for example, a pixel as a background in a picture has a small color change, but in practice this is not due to the alternation between foreground and background colors and so this pixel interference 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 picture through the tone curve are the same as those of the above embodiments, and are not described herein again.
In one possible embodiment, the color values comprise R-channel color values, G-channel color values and B-channel color values, the color value pair distribution histogram comprises 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 comprises an R-channel first color value, a G-channel first color value and a B-channel first color value, the second color value comprises 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 R-channel color values, G-channel color values and B-channel color values for analysis respectively, the color value pairs are split into R-channel color value pairs, G-channel color values and B-channel color value pairs, each color channel color value pair distribution histogram is used to represent the relationship of color value pairs and number in the picture, that is, in determining the color value of the foreground color and the color value of the background color, specific procedures and principles that need to determine the R channel color value of the foreground color, the R channel color value of the background color, the G channel color value of the foreground color, the G channel color value of the background color, the B channel color value of the foreground color, and the B channel color value of the background color have been exemplified in the above embodiments.
In another possible embodiment, the color values are gray-scale color values obtained by weighted conversion of R-channel color values, G-channel color values and B-channel color values, the color value distribution histogram is a gray-scale color value 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 certain pixel is P1-P1 ', wherein 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 ', B1'), and another pixel corresponds to a gray-scale color value pair of P2-P2 ', wherein 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), and P3626 'can be obtained by conversion of three channel color values (R2, G2, B675392, B2', g2 ', B2'), and so on, the gray-scale color value pair distribution histogram can reflect the relationship between the gray-scale color value pairs and the distribution quantity of the gray-scale color value pairs in the picture. In the embodiment that only one group of pictures are 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 values of the foreground color and the gray-scale color values 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 used as the gray-scale color value of the foreground color, and P1' is used as the gray-scale color value of the background color; in the embodiment of obtaining two or more groups of pictures each time, that is, obtaining at least three continuous frames of pictures, the gray-scale color value of the foreground color of a group and the gray-scale color value of the background color of a group 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 used as the gray-scale color value of the foreground color of a group, P1 ' is used as the gray-scale color value of the background color of a group, 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 adjusting a picture, it is necessary to convert P1 into three channel color values (R1, G1, B1), convert P1 ' into three channel color values (R1 ', G1 ', B1 '), it is necessary to determine whether R1 and R1 ' satisfy preset liquid crystal response conditions, whether G1 and G1 ' satisfy preset liquid crystal corresponding conditions, whether B1 and B1 ' satisfy preset liquid crystal corresponding conditions, and if one of them does not satisfy corresponding preset liquid crystal response conditions, content contrast adjustment needs to be performed, for example, only if B1 and B1 ' do not satisfy preset liquid crystal response conditions, content contrast is adjusted, so that the 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, a certain pixel color in a previous frame picture is (R1, G1, B1), and a corresponding pixel color in a next frame picture is (R1 ', G1', B1 '), then the pixel color pair corresponding to the pixel in the group of pictures is (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, i.e., only two consecutive frames of pictures are obtained, it is possible to take (R1, G1, B1) as the color value of the foreground color and (R1 ', G1', B1 ') as the color value of the background color, in an embodiment where two or more groups of pictures are obtained at a time, i.e., at least three consecutive frames of pictures are obtained at a time, it is assumed that (R1, G1, B1) as the color value of the foreground color, G1', B1 ', as the color value of the background color, and the R1' 1, respectively determine whether the liquid crystal response condition is satisfied, whether G1 and G1 'satisfy the preset liquid crystal corresponding conditions, whether B1 and B1' satisfy the preset liquid crystal corresponding conditions, and if one does not satisfy the corresponding preset liquid crystal response conditions, adjustment is required, for example, only B1 and B1 'do not satisfy the preset liquid crystal response conditions, the content contrast is adjusted, and the color difference between B1 and B1' is increased.
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 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 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 the 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, 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, "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 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 (13)

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 obtained color value distribution histogram of the at least one frame of picture comprises:
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; or,
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; 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 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 an average value, taking a weighted average value or taking a median value.
4. The method according to any one of claims 1 to 3,
the color values comprise R channel color values, G channel color values and B channel color values, and the color value distribution histogram comprises 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 obtaining 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 includes:
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 a 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 includes:
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 an average value, taking a weighted average value or taking a 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 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.
10. The method according to any one of claims 1 to 9,
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.
11. The method according to any one of claims 1 to 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.
12. 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-11.
13. A computer-readable storage medium, having stored thereon a computer program comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-11.
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 true CN114078452A (en) 2022-02-22
CN114078452B 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)

Cited By (2)

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

Citations (9)

* 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
US20150248775A1 (en) * 2012-10-03 2015-09-03 Holition Limited Image processing
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
US20200020108A1 (en) * 2018-07-13 2020-01-16 Adobe Inc. Automatic Trimap Generation and Image Segmentation

Patent Citations (9)

* 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
US20150248775A1 (en) * 2012-10-03 2015-09-03 Holition Limited Image processing
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
US20200020108A1 (en) * 2018-07-13 2020-01-16 Adobe Inc. Automatic Trimap Generation and Image Segmentation
CN109447086A (en) * 2018-09-19 2019-03-08 浙江口碑网络技术有限公司 A kind of extracting method and device of picture character color

Cited By (3)

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

Also Published As

Publication number Publication date
CN114078452B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
KR101138852B1 (en) Smart clipper for mobile displays
US20210049977A1 (en) Pixel rendering method, image rendering method, rendering apparatus, and display apparatus
KR102615596B1 (en) A display apparatus and a control method thereof
US10825408B2 (en) Display driving method, device and apparatus
US10783837B2 (en) Driving method and driving device of display device, and related device
US9311696B2 (en) Color enhancement for graphic images
CN109686342B (en) Image processing method and device
CN114078452B (en) Method for adjusting content contrast, electronic device and storage medium
CN107665681B (en) Liquid crystal display driving method, system and computer readable medium
US11735147B1 (en) Foveated display burn-in statistics and burn-in compensation systems and methods
WO2020001176A1 (en) Display method and device, visible light communication transmission method and device
KR102344334B1 (en) Display apparatus and method for processing image
KR20190114057A (en) Image processing device, display device having the same, and image processing method of the same
US9311688B1 (en) Rendering pipeline for color electrophoretic displays
CN102859573A (en) Method and apparatus for adaptive main back-light blanking in liquid crystal displays
US10068549B2 (en) Cursor handling in a variable refresh rate environment
CN116825039A (en) Backlight brightness calculating method, display device and computer readable storage medium
US20240257710A1 (en) Foveated display burn-in statistics and burn-in compensation systems and methods
WO2020098624A1 (en) Display method and apparatus, vr display apparatus, device, and storage medium
US11605332B1 (en) Moving picture response time (MPRT) techniques for liquid crystal displays (LCDs)
JP2010048958A (en) Image processing device, processing method therefor and image display system
US20230410706A1 (en) Method for image rendering, terminal device and non-transitory computer-readable storage medium
CN112992052B (en) Power consumption control method of display panel and display panel
CN112669768B (en) LED display screen brightness adjusting method, device and equipment and readable storage medium
CN115115503A (en) Image display method, device, processor and nonvolatile 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