CN109859689B - Screen brightness adjusting method and related product - Google Patents

Screen brightness adjusting method and related product Download PDF

Info

Publication number
CN109859689B
CN109859689B CN201910281764.5A CN201910281764A CN109859689B CN 109859689 B CN109859689 B CN 109859689B CN 201910281764 A CN201910281764 A CN 201910281764A CN 109859689 B CN109859689 B CN 109859689B
Authority
CN
China
Prior art keywords
value
light sensation
brightness
sensation value
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910281764.5A
Other languages
Chinese (zh)
Other versions
CN109859689A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910281764.5A priority Critical patent/CN109859689B/en
Publication of CN109859689A publication Critical patent/CN109859689A/en
Application granted granted Critical
Publication of CN109859689B publication Critical patent/CN109859689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the application discloses a screen brightness adjusting method and a related product, which are applied to electronic equipment, wherein the method comprises the following steps: acquiring RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the accuracy of the electronic equipment for detecting the ambient light is improved, the brightness of the display screen which is matched with the electronic equipment is adjusted according to the ambient light, and the user experience is improved.

Description

Screen brightness adjusting method and related product
Technical Field
The application relates to the technical field of screen display, in particular to a display screen brightness adjusting method and a related product.
Background
With the progress of science and technology, more and more electronic devices are provided with display screens; usually, a light sensor is disposed near the display screen to detect the brightness of the ambient light, so as to intelligently adjust the screen brightness of the display screen. However, with the technical progress of display construction and the pursuit of users for large screens, more and more full-screen electronic devices, such as full-screen notebook computers, full-screen mobile phones, full-screen tablet computers and the like, appear. The front of the electronic device does not have more space to place the sensors, but only under the display screen. When the light sensor detects the brightness of the ambient light, part of the display screen can enter the light sensor by self-luminescence, which affects the accuracy of the light sensor for detecting the ambient light.
Disclosure of Invention
The embodiment of the application provides a screen brightness adjusting method and a related product, so as to improve the accuracy of electronic equipment for detecting ambient light.
In a first aspect, an embodiment of the present application provides a screen brightness adjusting method, which is applied to an electronic device, where the electronic device includes a display screen and a light sensor arranged in a preset area of the display screen, and the electronic device includes at least two dimming modes, and the method includes:
acquiring RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal and a first light sensation value currently detected by the light sensor;
determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy, wherein the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixel points in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area;
determining a target light sensation value according to the reference light sensation value and the dimming parameter;
determining a current ambient light sensation value according to the target light sensation value and the first light sensation value;
and adjusting the actual display brightness of the display screen according to the ambient light sensation value.
In a second aspect, an embodiment of the present application provides a screen brightness adjusting apparatus applied to an electronic device, where the electronic device includes a display screen and a light sensor disposed in a preset area of the display screen, the electronic device includes at least two dimming modes, the screen brightness adjusting apparatus includes a processing unit, where,
the processing unit is configured to obtain RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a current dimming mode adopted by the local terminal, and a first light sensation value currently detected by the light sensor; the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area; and for determining a target light sensation value from the reference light sensation value and the dimming parameter; the first light sensation value is used for determining a target light sensation value; and the display device is used for adjusting the actual display brightness of the display screen according to the ambient light sensation value.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods in the second aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in any one of the methods of the second aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a display module and a position of a light sensor of an electronic device according to an embodiment of the present disclosure;
fig. 2A is a schematic flowchart of a method for adjusting screen brightness according to an embodiment of the present disclosure;
FIG. 2B is a graph of FIG. 2B showing a possible mask value-light sensitivity value test curve provided by an embodiment of the present application;
FIG. 2C is a graph of measured data from the light sensor at different RGB color depth values for the reference device;
FIG. 3 is a schematic flowchart of another screen brightness adjustment method provided in the embodiments of the present application;
FIG. 4 is a schematic flowchart of another screen brightness adjustment method provided in the embodiments of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a screen brightness adjusting apparatus according to an embodiment of the present disclosure.
Detailed Description
The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic diagram of a display module and a position of an optical sensor of an electronic device according to an embodiment of the present disclosure, where the electronic device 100 includes a display screen 101 and an optical sensor 102; the display screen 101 is provided with a preset area 103. When the electronic device 100 adjusts the screen brightness, the electronic device 100 first obtains RGB color depth values of a first number of pixels included in the preset area 103, a dimming parameter of a dimming mode currently employed at the home terminal, and a first light sensation value currently detected by the light sensor, then calculates to obtain R, G and a color depth average value respectively associated with B according to the RGB color depth values of the first number of pixels, and obtains R, G and a light sensation value respectively associated with B according to R, G and the color depth average value respectively associated with B and a light sensation value calculation formula respectively associated with R, G and B; adding R, G and B respectively associated light sensation values to obtain an original screen light sensation value; calculating R, G gray values of the synthesized colors B according to the average values of the color depths respectively associated with R, G and B, and calculating light sensation error values according to the gray values of the synthesized colors; subtracting the light sensation error value from the original screen light sensation value to obtain a reference light sensation value; and secondly, determining a target light sensation value according to the light modulation parameter of the light modulation mode adopted by the local terminal and the reference light sensation value. Subtracting the target light sensation value from the first light sensation value to obtain a current ambient light sensation value; secondly, judging whether the actual display brightness of the display screen needs to be adjusted currently or not according to the current ambient light sensation value and the dimming parameter; if the actual display brightness of the display screen needs to be adjusted currently, the dimming mode to be adopted and the dimming parameter in the corresponding dimming mode are determined according to the ambient light sensitivity value, and the dimming mode and the dimming parameter of the electronic device are adjusted to adjust the actual display brightness of the display screen. The electronic device 100 may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal equipment (terminal device), and so on.
Referring to fig. 2A, fig. 2A is a schematic flowchart of a screen brightness adjusting method provided in an embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a display screen and a light sensor arranged in a preset region corresponding to the display screen, and the electronic device includes at least two dimming modes, as shown in the figure, the screen brightness adjusting method includes:
step 201, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a current dimming mode adopted by a home terminal, and a first light sensation value currently detected by the light sensor;
RGB represents an RGB color scheme, which is a color standard in the industry and obtains various colors by changing three color channels of red (R), green (G), and blue (B) and superimposing the three color channels on each other, where RGB represents three channels of red, green, and blue. Each pixel consists of a red R, green G and blue B chip. Where R, G and B each have 256 levels of color depth values, numerically represented as from 0, 1, 2.
The electronic device comprises a display screen, a DC dimming mode and a DC-like dimming mode, wherein the light-emitting material of the display screen can be an Organic light-emitting diode (Organic L light-emitting diode, O L ED), at least two dimming modes can comprise the DC dimming mode and the DC dimming mode, the DC dimming mode refers to changing the brightness of the screen by increasing or decreasing the circuit power, the power is equal to the voltage x current, so that the screen brightness can be changed by changing the voltage or the current, the DC dimming mode refers to setting a mask layer in a layer of a display picture under the condition of keeping the brightness of the screen unchanged, the actual display brightness of the display screen is adjusted by adjusting the mask value of the mask layer, when the mask value is 0, the actual display brightness is equal to the original brightness of the screen, along with the gradual increase of the mask value, the actual display brightness of the display screen is gradually reduced, and when the mask value is larger than a certain value, the actual display brightness of the display screen is 0.
And under the DC dimming mode, the dimming parameter comprises the screen brightness level of the current display screen, and under the DC dimming-like mode, the dimming parameter comprises a first mask value of the current mask layer and a preset brightness level.
The screen brightness level is preset according to the display brightness of the display screen of the electronic equipment. For example, if the screen brightness level of the electronic device has 1024 levels and is numerically represented as 0, 1, 2, and 3 … 1023, the screen brightness level corresponding to 1023 when the display brightness is maximum and 0, 1-1022 when the display brightness is minimum can be uniformly set according to the display brightness.
Wherein, first light sense value is the light sense value that light sensor detected, and the composition of light sense value can be divided into two parts: the light sensation value caused by the ambient light and the light sensation value caused by the light leakage of the display screen at the local end.
Step 202, the electronic equipment determines a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy;
in one possible implementation, the display screen is made of O L ED material, due to the light emitting characteristics of the O L ED material, the light sensing value of the mixed light W detected by the optical sensor is not equal to the light sensing value of the three monochromatic lights detected by the optical sensor, namely R + G + B > W, wherein the mixed light W refers to light composed of at least two colors of R, G and B, for example, the screen brightness level of the display screen is the reference brightness level, when only an R color channel emits light, and the color depth value of the R color channel is the X color depth value1When the temperature of the water is higher than the set temperature,the light sensing value detected by the light sensor is Y1(ii) a When only G color channel emits light and the color depth value of the G color channel is X2When the light sensing value detected by the light sensing is Y2(ii) a When only B color channel emits light and the color depth value of the B color channel is X3When the light sensing value detected by the light sensing is Y3;When the R color channel, the G color channel and the B color channel all emit light, and the color depth value of the R color channel is X1The color depth value of the G color channel is X2And the color depth value of the B color channel is X3The light sensor detects the light sensation value Y4<Y1+Y2+Y3(ii) a Wherein, X1、X2And X3Has a value in the range of 0 to 255, and X1、X2And X3At most one of them is 0; light sensitivity value Y in this example4Corresponding to the reference light sensitivity value; y is1+Y2+Y3Corresponding to the original screen light sensitivity value.
Step 203, the electronic device determines a target light sensation value according to the reference light sensation value and the dimming parameter;
step 204, the electronic device determines a current ambient light sensation value according to the target light sensation value and the first light sensation value;
wherein, the ambient light sensitivity value is the first light sensitivity value-the target light sensitivity value.
Step 205, the electronic device adjusts the actual display brightness of the display screen according to the ambient light sensation value.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
In one possible example, the current dimming mode of the electronic device is a first dimming mode, and when the electronic device is in the first dimming mode: the layer of the display picture of the display screen comprises a mask layer; the electronic equipment adjusts the actual display brightness of the display screen by adjusting the size of the mask value of the mask layer under the condition of keeping the screen brightness level at a preset brightness level; the determining a target light sensation value according to the reference light sensation value and the dimming parameter includes: substituting the first mask value into a parameter calculation formula to obtain a first mask parameter; according to the formula: and calculating the target light sensitivity value, namely the reference light sensitivity value, and the first mask parameter, namely a first preset ratio.
Wherein the first dimming mode refers to a DC-like dimming mode; the mask parameter represents the degree of masking the light leakage of the current display screen by the mask layer, and can be represented by a light sensation value, for example: under the same condition, when the mask parameter is equal to 1, the light sensation value is 100, when the mask parameter is equal to 0.5, the light sensation value is 50, when the mask parameter is 0.2, the light sensation value is 20, when the mask parameter is 0, the light sensation value is 0;
the method comprises the steps of obtaining a light sensation value of a light sensor under the condition that the brightness and the light sensation value are in positive proportion, determining a first ratio of the actual display brightness to the display brightness of a display screen under a reference brightness level, multiplying the first ratio by a reference light sensation value to obtain the light sensation value actually detected by the light sensor under the condition that the screen brightness level of an O L ED display screen is a reference brightness level, obtaining a first mask value when the actual display brightness is a first mask value, and obtaining a second mask value when the actual display brightness is a second mask value, wherein the first mask value is a first mask value, the first mask value is a second mask value, the second mask value is a first mask value, the first mask value is a second mask value, the first mask value is a first mask value, the second mask value is a mask value, the first mask value is a mask value, and the second mask value is a mask value, wherein the first mask value is a mask value corresponding to the first mask value when the actual display brightness level is a first mask value, and the first mask value is a mask value, and the second mask value is a mask value corresponding mask value, wherein the first mask value is a mask value when the actual display brightness level is a mask value, and the mask value is a mask value, and the first mask value is a mask value when the actual display parameter, the actual display brightness level is a mask value, and the mask value is a mask value, wherein the first mask value is a mask value under the mask value, and the mask value under the mask value is a mask value, and the mask value is a mask value under the mask value is a mask value, and the mask value is a mask value.
In this example, the electronic device may determine, in combination with the current dimming mode, a ratio between actual display brightness of the display screen and display brightness of the display screen at the reference brightness level, and further determine, in combination with the reference light sensation value, a light sensation value caused by self-luminescence of the display screen in the light sensation values detected by the current light sensing.
Optionally, the current dimming mode of the electronic device is a second dimming mode, that is, the DC dimming mode, and in the second dimming mode, if the display color of the preset region is not changed, the screen brightness level of the display screen and the light sensation value caused by light leakage of the display screen are in a direct proportion; for example, if the reference light sensitivity value is calculated at the maximum screen brightness level of 1023, and the screen brightness level of the current electronic device is 800, the target light sensitivity value is the reference light sensitivity value 800/1023; the determining a target light sensation value according to the reference light sensation value and the dimming parameter comprises: acquiring a current first screen brightness level of the display screen, and according to a formula: and substituting the target light sensation value into the first screen brightness level to calculate to obtain the target light sensation value.
In one possible example, before the substituting the first mask value into a parameter calculation formula to obtain a first mask parameter, the method further comprises: acquiring test data related to the mask value of the display screen at the preset brightness level, wherein the test data comprises a corresponding light sensitivity value when the mask value is 0 to a first numerical value, and the corresponding light sensitivity value is 0 when the mask value is the first numerical value; generating a test curve of the mask value according to the test data, and generating a functional relation formed by the mask value and the light sensation value according to the test curve; and performing normalization processing on the functional relation formed by the mask value and the light sensation value to obtain the parameter calculation formula.
For example, as shown in FIG. 2B, FIG. 2B is a test curve of mask value versus light sensitivity value; the relationship curve between the size of the mask value and the light sensation value detected by the light sensor when no ambient light interference exists and the display screen is at the preset brightness level is shown. The X-axis is the mask value, the Y-axis is the light sensation value, and when the mask value is 0, there is no masking by the mask layer, and the light sensation value is about 1778; the light sensation value gradually decreases as the mask value gradually increases, and is approximately equal to 0 when the mask value is as large as about 250. Generating a functional relation formed by the mask value and the light sensation value according to the test curve can comprise fitting the test curve by setting an equation of degree N, wherein N is more than or equal to 2; in this example, when N is 2, y is 0.028915x2-14.265527x+1777.952074; and (3) executing normalization processing on the interval with the light sensation value of 0-1777.9 according to the obtained functional relation to obtain a parameter calculation formula: alpha parameter (0.028915x2-14.265527x +1777.952074) 1777.9.
In this example, the electronic device may generate a parameter calculation formula according to the measured data, so as to determine the influence degree of different mask values on the photosensitive value through the parameter calculation formula.
In one possible example, the adjusting the actual display brightness of the display screen according to the ambient light sensation value includes: acquiring a first brightness interval corresponding to the first mask value; judging whether the ambient light sensitivity value is in the first brightness interval or not; if so, not executing screen brightness adjustment operation aiming at the display screen; if not, judging the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value; if the ambient light sensation value is judged to be less than or equal to the preset light sensation value, the brightness of the display screen is adjusted according to the dimming strategy associated with the first dimming mode; and if the ambient light sensation value is judged to be larger than the preset light sensation value, adjusting the brightness of the display screen according to a dimming strategy associated with a second dimming mode.
The first dimming mode is a DC-like dimming mode, and the second dimming mode is a DC dimming mode.
Wherein adjusting the brightness of the display screen according to the dimming strategy associated with the second dimming mode may comprise: and inquiring a second preset matching relationship by taking the ambient light sensitivity value as an inquiry identifier, acquiring a second screen brightness level corresponding to the inquiry identifier, and adjusting the screen brightness of the display screen to be the second screen brightness level, wherein the second preset matching relationship comprises a corresponding relationship between the light sensitivity value and the screen brightness level.
Therefore, in this example, the electronic device can select a suitable dimming mode according to the current ambient light sensation value, and the intelligence of the electronic device is improved.
In one possible example, the adjusting the actual display brightness of the display screen according to the dimming strategy associated with the first dimming mode includes: setting the screen brightness level of the display screen to be the preset brightness level; querying a preset matching relationship by taking the ambient light sensitivity value as a query identifier to obtain a second mask value corresponding to the query identifier, wherein the preset matching relationship comprises a corresponding relationship between the light sensitivity value and the mask value; and updating the mask value of the mask layer to be the second mask value.
Therefore, in this example, the electronic device avoids frequently adjusting the brightness of the display screen under the condition that the ambient light changes weakly, the intelligence of the electronic device is improved, and the user experience is improved.
In one possible example, the determining the reference light sensation value according to the RGB color depth values of the first number of pixels included in the preset area and the preset light sensation calculation policy includes: determining an average value of R color depth, an average value of G color depth and an average value of B color depth according to the RGB color depth values of the first number of pixel points; determining the R-perception value from the R-color depth average; determining the G light sensation value according to the G color depth average value; determining the B-ray sensitivity value according to the B-color depth average value; determining R, G a grayscale value of a color synthesized by B from the R color depth average, the G color depth average, and the B color depth average; determining the first difference value according to the gray scale value; and determining the reference light sensitivity value according to the R light sensitivity value, the G light sensitivity value, the B light sensitivity value and the first difference value.
The Gray scale value is a Gray scale value of the RGB composite color, and may be calculated according to a preset Gray scale value formula, for example, the standard formula is Gray-scale formula of R0.299 + G0.587 + B0.114; the Gray value calculation formula of the reference device provided by the embodiment of the application is Gray 0.42R + 0.38G + 0.2B; the gray value calculation formula can be set to different gray value calculation formulas according to specific electronic equipment, and is not limited uniquely here. The reference equipment is an electronic equipment product of the same type and the same model as those provided by the embodiment of the application. The data of the reference equipment is known, and the electronic equipment in the embodiment of the application can obtain the data required by the local terminal by combining the local terminal test data and the data of the reference equipment. Wherein the reference photosensitivity value is the R photosensitivity value + the G photosensitivity value + the B photosensitivity value-the first difference.
Wherein the R-perception value is determined from the R-color depth average; determining the G light sensation value according to the G color depth average value; determining the B-illuminant value from the B-color depth average, comprising: the electronic equipment acquires R, G and B light sensation value calculation formulas respectively associated with the B light sensation value calculation formulas; determining calibration coefficients corresponding to the local terminals R, G and B respectively; determining the R light sensation value according to the R color depth average value, the R-related light sensation value calculation formula and a calibration coefficient corresponding to R; determining the G light sensation value according to the G color depth average value, the G-related light sensation value calculation formula and a calibration coefficient corresponding to G; and determining the B light sensation value according to the B color depth average value, the B related light sensation value calculation formula and a calibration coefficient corresponding to B. The light sensation value calculation formula is calculated according to actual measurement data of the reference equipment. The light sensation value calculation formula comprises an R light sensation value calculation formula, a G light sensation value calculation formula and a B light sensation value calculation formula. For example, as shown in FIG. 2C, FIG. 2C is a plot of measured data for a light sensor at different RGB color depth values for a reference device. R corresponds to the R color depth average value; g corresponds to the average G color depth; b corresponds to the average value of the depth of the B color; where red, green, blue and white represent the light sensitivity values that the reference device can detect at the preset brightness level corresponding to the front R, G and the B value. Fig. 2C lists the light-sensitive values that can be detected by the light sensors when the display screen displays white light W when the display screen displays three monochromatic lights of red R, green G and blue B and R, G and B are equal. If the monochromatic light red R in fig. 2C corresponds to 255, the light sensor detects a light sensitivity value of 468. Since monochromatic red light R corresponds to different light sensation values when the monochromatic red light R is different in color depth value, an equation of N times is required to be set for calculation and fitting to obtain a light sensation value calculation formula so as to express a functional relation between the color depth value and the light sensation value, wherein N is more than or equal to 2, the higher the number of times of N is, the higher the obtained fitting degree is, and the more complicated the calculation is; taking N ═ 3 in this example, we obtained the R photopic value ═ R calibration factor [0.00002 ^ R ^3+0.001 ^ R ^2+0.4942 ^ R ]; the same principle can be obtained, G light sensation value is G calibration coefficient [ 0.00002G ^3+ 0.0009G ^2+ 0.3465G ]; b light sensitivity value is B calibration coefficient [ 0.000008B ^3+ 0.001B ^2+ 0.1564B ]. The calibration coefficient is obtained by comparing light sensation values detected by the light sensor according to the home equipment and the reference equipment under a first condition, wherein the first condition refers to the condition that the RGB color depth values are equal and the color is the same. For example, when the home device displays monochromatic red R and has a color depth of 255, the light sensitivity value is 430; referring to FIG. 2C, the reference device has a light sensitivity value of 468 when displaying monochromatic light, red R, and a color depth of 255; the R calibration factor is 430/468.
The electronic device determines the first difference value according to the gray scale value, the electronic device obtains reference data and actual test data of the local device, determines a difference calibration coefficient according to the reference data and the actual test data, obtains a preset difference calculation formula, determines the first difference value according to the gray scale value, the difference calibration coefficient and the difference calculation formula, detects a light sensation value of white light W not equal to a simple addition of three monochromatic light detected by the light sensor due to the light emitting characteristics of the O L ED material, but R + G + B > W, determines a light sensation value of light detected by the light sensor to be 468 when monochromatic light red G corresponds to 255, detects a light sensation value of monochromatic light to be 472 when monochromatic light red B corresponds to 255, detects a light sensation value of light detected to be 243 when light red B corresponds to 255, determines a light sensation value of light detected by the light sensor to be 930, i.e. 468+ G, 930, i.e. the first difference value generated by the first difference value is larger than M + G + C, and calculates a difference value of the gray scale value corresponding to be 930, and a reference gray scale value, and a difference value calculated by substituting the gray scale value of the gray scale value into a preset grey map C + G + C, and the actual gray scale value when white light values of the gray scale value of the gray scale map, and the gray scale value of the gray scale map, and the gray scale value of the gray scale map, and the gray scale value of the gray scale map, and the gray scale map, the gray scale value of the gray scale map, the gray scale value of the gray scale map.
Therefore, in this example, the electronic device may determine the reference light sensitivity value through the local RGB color depth value, so as to obtain the ambient light sensitivity value through subsequent calculation, thereby improving the detection accuracy of the electronic device on ambient light.
In one possible example, the determining R color depth average, G color depth average, and B color depth average according to the RGB color depth values of the first number of pixel points includes: acquiring a preset gamma curve, and determining R, G and B brightness values respectively corresponding to each pixel point in the first number of pixel points according to the gamma curve to obtain a first number of R brightness values, a first number of G brightness values and a first number of B brightness values; respectively calculating the average values of the first number of R brightness values, the first number of G brightness values and the first number of B brightness values to obtain R, G brightness average values respectively corresponding to B; determining the R color depth mean, the G color depth mean, and the B color depth mean according to the brightness mean and the gamma curve corresponding to R, G and B, respectively.
As can be seen, in this example, the electronic device may determine the color average values respectively corresponding to the preset regions R, G and B by combining the gamma curve, rather than directly taking the average value of the color depth values of each pixel point in the preset region to obtain the color depth average value, so that the obtained color average value better conforms to the actual situation, and the target light sensation value obtained by subsequent calculation according to the color depth average value is more accurate.
Optionally, the determining the R color depth average value, the G color depth average value, and the B color depth average value according to the RGB color depth values of the first number of pixel points includes: the electronic equipment acquires a preset gamma curve, and divides the gamma curve into N intervals, wherein N is more than or equal to 2; determining a weight value calculation formula corresponding to each interval in the N intervals, wherein the weight value calculation formula represents a functional relation between the weight value and the color depth; substituting the RGB color depth value of each pixel point into the weight value calculation formula to calculate weight values corresponding to R, G and B in each pixel point respectively; calculating to obtain weight average values respectively associated with R, G and B according to the weight values respectively corresponding to R, G and B in each pixel point; and calculating to obtain the R color depth average value, the G color depth average value and the B color depth average value according to the weight average values respectively associated with the R, G and the B and a weight value calculation formula corresponding to each interval. For example, the preset gamma curve is set to be a gamma curve with a gamma value of 2.2, the abscissa x is the RGB color depth value, y is the weight, the RGB color depth value 255 corresponds to a weight of 100, and 0 corresponds to a weight of 0; then, x may be divided into 5 sections according to the curve, and a weight value calculation formula corresponding to each section is determined according to the curve of each section, as shown below:
0=<(RGB)<50 [0,5.6) y=0.1123195*x
50<=(RGB)<100 [5.6,15) y=0.1892243*x-3.8452406
100<=(RGB)<150 [15,31) y=0.3238077*x-17.303583
150<=(RGB)<200 [31.2,57) y=0.5160697*x-46.142887
200<=(RGB)<=255 [57,100]y=0.7805262*x-99.034172。
therefore, the weight value can be calculated if the color depth value is known, and the color depth value can be calculated if the weight value is known.
Referring to fig. 3, fig. 3 is a schematic flowchart of a screen brightness adjusting method provided in an embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a display screen and a light sensor arranged in a preset area of the display screen, and the electronic device includes at least two dimming modes; as shown in the figure, the screen brightness adjusting method includes:
301, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the home terminal, and a first light sensation value currently detected by the light sensor;
step 302, the electronic device determines a reference light sensation value according to the RGB color depth values of the first number of pixels and a preset light sensation calculation strategy;
step 303, the electronic device acquires test data associated with a mask value of the display screen at a preset brightness level;
step 304, the electronic equipment generates a test curve of the mask value according to the test data, and generates a functional relation formed by the mask value and the light sensation value according to the test curve;
step 305, the electronic device performs normalization processing on the functional relation formed by the mask value and the light sensation value to obtain a parameter calculation formula;
step 306, the electronic equipment substitutes the first mask value into a parameter calculation formula to obtain a first mask parameter;
step 307, the electronic device: calculating a target light sensitivity value, namely the reference light sensitivity value, namely the first mask parameter, namely a first preset ratio to obtain the target light sensitivity value;
step 308, the electronic device determines a current ambient light sensation value according to the target light sensation value and the first light sensation value;
step 309, the electronic device adjusts the actual display brightness of the display screen according to the ambient light sensation value.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
In addition, the electronic device can determine the ratio of the actual display brightness of the display screen to the display brightness of the display screen at the reference brightness level by combining the current dimming mode, and further determine the light sensation value caused by self-luminescence of the display screen in the light sensation values detected by current light sensing by combining the reference light sensation value.
In addition, the electronic equipment can generate a parameter calculation formula according to the measured data so as to determine the influence degree of different mask values on the photosensitive value through the parameter calculation formula.
In addition, the electronic equipment can select a proper dimming mode according to the current ambient light sensation value, and the intelligence of the electronic equipment is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a screen brightness adjusting method provided in an embodiment of the present application, and the method is applied to an electronic device, where the electronic device includes a display screen and a light sensor arranged in a preset area of the display screen, and the electronic device includes at least two dimming modes; as shown in the figure, the screen brightness adjusting method includes:
step 401, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor;
step 402, the electronic device determines a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy;
in step 403, the electronic device determines a target light sensation value according to the reference light sensation value and the dimming parameter.
Step 404, the electronic device determines a current ambient light sensation value according to the target light sensation value and the first light sensation value;
step 405, the electronic device obtains a first brightness interval corresponding to a first mask value, and determines whether the ambient light sensation value is within the first brightness interval;
step 406, if not, the electronic device disconnects the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value;
step 407, if it is determined that the ambient light sensitivity value is less than or equal to the preset light sensitivity value, the electronic device sets the screen brightness level of the display screen to a preset brightness level;
step 408, the electronic device queries a preset matching relationship by using the ambient light sensitivity value as a query identifier, and obtains a second mask value corresponding to the query identifier;
in step 409, the electronic device updates the mask value of the mask layer to the second mask value.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
Consistent with the embodiments shown in fig. 2A, fig. 3, and fig. 4, please refer to fig. 5, and fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present application, as shown in the figure, the electronic device 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the memory 520 and configured to be executed by the application processor 510, and the one or more programs 521 include instructions for performing the following steps;
acquiring RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal and a first light sensation value currently detected by the light sensor;
determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy, wherein the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixel points in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area;
determining a target light sensation value according to the reference light sensation value and the dimming parameter;
determining a current ambient light sensation value according to the target light sensation value and the first light sensation value;
and adjusting the actual display brightness of the display screen according to the ambient light sensation value.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
In one possible example, the current dimming mode of the electronic device is a first dimming mode, and when the electronic device is in the first dimming mode: the layer of the display picture of the display screen comprises a mask layer; the electronic equipment adjusts the actual display brightness of the display screen by adjusting the size of the mask value of the mask layer under the condition of keeping the screen brightness level at a preset brightness level; the dimming parameter comprises a first mask value of the mask layer, and in the determining of the target light sensation value from the reference light sensation value and the dimming parameter, the instructions in the program are specifically configured to: substituting the first mask value into a parameter calculation formula to obtain a first mask parameter; according to the formula: and calculating the target light sensitivity value, namely the reference light sensitivity value, and the first mask parameter, namely a first preset ratio.
In one possible example, before said substituting said first mask value into a parameter calculation formula to obtain a first mask parameter, instructions in said program are further configured to: acquiring test data related to the mask value of the display screen at the preset brightness level, wherein the test data comprises a corresponding light sensitivity value when the mask value is 0 to a first numerical value, and the corresponding light sensitivity value is 0 when the mask value is the first numerical value; generating a test curve of the mask value according to the test data, and generating a functional relation formed by the mask value and the light sensation value according to the test curve; and performing normalization processing on the functional relation formed by the mask value and the light sensation value to obtain the parameter calculation formula.
In one possible example, in the aspect of adjusting the actual display brightness of the display screen according to the ambient light sensation value, the instructions in the program are specifically configured to: acquiring a first brightness interval corresponding to the first mask value; judging whether the ambient light sensitivity value is in the first brightness interval or not; if so, not executing screen brightness adjustment operation aiming at the display screen; if not, judging the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value; if the ambient light sensation value is judged to be less than or equal to the preset light sensation value, the brightness of the display screen is adjusted according to the dimming strategy associated with the first dimming mode; and if the ambient light sensation value is judged to be larger than the preset light sensation value, adjusting the brightness of the display screen according to a dimming strategy associated with a second dimming mode.
In one possible example, in terms of the adjusting the actual display brightness of the display screen according to the dimming strategy associated with the first dimming mode, the instructions in the program are specifically configured to: setting the screen brightness level of the display screen to be the preset brightness level; querying a preset matching relationship by taking the ambient light sensitivity value as a query identifier to obtain a second mask value corresponding to the query identifier, wherein the preset matching relationship comprises a corresponding relationship between the light sensitivity value and the mask value; and updating the mask value of the mask layer to be the second mask value.
In one possible example, in the aspect of determining the reference light sensation value according to the RGB color depth values of the first number of pixel points included in the preset area and the preset light sensation calculation policy, the instructions in the program are specifically configured to perform the following operations: determining an average value of R color depth, an average value of G color depth and an average value of B color depth according to the RGB color depth values of the first number of pixel points; determining the R-perception value from the R-color depth average; determining the G light sensation value according to the G color depth average value; determining the B-ray sensitivity value according to the B-color depth average value; determining R, G a grayscale value of a color synthesized by B from the R color depth average, the G color depth average, and the B color depth average; determining the first difference value according to the gray scale value; and determining the reference light sensitivity value according to the R light sensitivity value, the G light sensitivity value, the B light sensitivity value and the first difference value.
In one possible example, in the determining of the R color depth average value, the G color depth average value, and the B color depth average value according to the RGB color depth values of the first number of pixel points, the instructions in the program are specifically configured to perform the following operations: acquiring a preset gamma curve, and determining R, G and B brightness values respectively corresponding to each pixel point in the first number of pixel points according to the gamma curve to obtain a first number of R brightness values, a first number of G brightness values and a first number of B brightness values; respectively calculating the average values of the first number of R brightness values, the first number of G brightness values and the first number of B brightness values to obtain R, G brightness average values respectively corresponding to B; determining the R color depth mean, the G color depth mean, and the B color depth mean according to the brightness mean and the gamma curve corresponding to R, G and B, respectively.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram of functional units of a screen brightness adjustment device 600 according to an embodiment of the present application. The screen brightness adjusting apparatus 600 is applied to an electronic device including a display screen and a light sensor disposed opposite to a preset region of the display screen, the screen brightness adjusting apparatus 600 includes a processing unit 601, wherein,
the processing unit 601 is configured to obtain RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a current dimming mode adopted by a home terminal, and a first light sensation value currently detected by the light sensor; the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area; and for determining a target light sensation value from the reference light sensation value and the dimming parameter; the first light sensation value is used for determining a target light sensation value; and the display device is used for adjusting the actual display brightness of the display screen according to the ambient light sensation value.
The screen brightness adjusting apparatus 600 may further include a communication unit 602 and a storage unit 603, where the storage unit 603 is used for storing program codes and data of the electronic device. The processing unit 601 may be a processor, the communication unit 602 may be a touch display screen or a transceiver, and the storage unit 603 may be a memory.
It can be seen that, in the embodiment of the present application, the electronic device obtains RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal, and a first light sensation value currently detected by the light sensor; determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy; determining a target light sensation value according to the reference light sensation value and the dimming parameter; determining a current ambient light sensation value according to the target light sensation value and the first light sensation value; and adjusting the actual display brightness of the display screen according to the ambient light sensation value. The reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by light emitting characteristics of pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area. Therefore, the electronic equipment can calculate the ambient light according to the currently adopted dimming mode and the display color of the preset area, the intelligence of the electronic equipment is improved, the problem that the light sensor is influenced by the light emission of the display screen when the light sensor is placed under the display screen to detect the ambient light is solved, and the accuracy of ambient light detection is improved; meanwhile, the electronic equipment comprises at least two dimming modes, so that the use requirements of users in different scenes are met.
In one possible example, the current dimming mode of the electronic device is a first dimming mode, and when the electronic device is in the first dimming mode: the layer of the display picture of the display screen comprises a mask layer; the electronic equipment adjusts the actual display brightness of the display screen by adjusting the size of the mask value of the mask layer under the condition of keeping the screen brightness level at a preset brightness level; the dimming parameter includes a first mask value of the mask layer, and in the aspect of determining the target photosensitivity value according to the reference photosensitivity value and the dimming parameter, the processing unit 601 is specifically configured to: substituting the first mask value into a parameter calculation formula to obtain a first mask parameter; according to the formula: and calculating the target light sensitivity value, namely the reference light sensitivity value, and the first mask parameter, namely a first preset ratio.
In one possible example, before the substituting the first mask value into a parameter calculation formula to obtain a first mask parameter, the processing unit 601 is further configured to: acquiring test data related to the mask value of the display screen at the preset brightness level, wherein the test data comprises a corresponding light sensitivity value when the mask value is 0 to a first numerical value, and the corresponding light sensitivity value is 0 when the mask value is the first numerical value; generating a test curve of the mask value according to the test data, and generating a functional relation formed by the mask value and the light sensation value according to the test curve; and performing normalization processing on the functional relation formed by the mask value and the light sensation value to obtain the parameter calculation formula.
In one possible example, in terms of the adjusting the actual display brightness of the display screen according to the ambient light sensation value, the processing unit 601 is specifically configured to: acquiring a first brightness interval corresponding to the first mask value; judging whether the ambient light sensitivity value is in the first brightness interval or not; if so, not executing screen brightness adjustment operation aiming at the display screen; if not, judging the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value; if the ambient light sensation value is judged to be less than or equal to the preset light sensation value, the brightness of the display screen is adjusted according to the dimming strategy associated with the first dimming mode; and if the ambient light sensation value is judged to be larger than the preset light sensation value, adjusting the brightness of the display screen according to a dimming strategy associated with a second dimming mode.
In one possible example, in terms of the adjusting the actual display brightness of the display screen according to the dimming strategy associated with the first dimming mode, the processing unit 601 is specifically configured to: setting the screen brightness level of the display screen to be the preset brightness level; querying a preset matching relationship by taking the ambient light sensitivity value as a query identifier to obtain a second mask value corresponding to the query identifier, wherein the preset matching relationship comprises a corresponding relationship between the light sensitivity value and the mask value; and updating the mask value of the mask layer to be the second mask value.
In one possible example, in the aspect of determining the reference photosensitive value according to the RGB color depth values of the first number of pixel points included in the preset area and the preset photosensitive calculation strategy, the processing unit 601 is specifically configured to: determining an average value of R color depth, an average value of G color depth and an average value of B color depth according to the RGB color depth values of the first number of pixel points; determining the R-perception value from the R-color depth average; determining the G light sensation value according to the G color depth average value; determining the B-ray sensitivity value according to the B-color depth average value; determining R, G a grayscale value of a color synthesized by B from the R color depth average, the G color depth average, and the B color depth average; determining the first difference value according to the gray scale value; and determining the reference light sensitivity value according to the R light sensitivity value, the G light sensitivity value, the B light sensitivity value and the first difference value.
In one possible example, in the aspect of determining the R color depth average value, the G color depth average value, and the B color depth average value according to the RGB color depth values of the first number of pixel points, the processing unit 601 is specifically configured to: acquiring a preset gamma curve, and determining R, G and B brightness values respectively corresponding to each pixel point in the first number of pixel points according to the gamma curve to obtain a first number of R brightness values, a first number of G brightness values and a first number of B brightness values; respectively calculating the average values of the first number of R brightness values, the first number of G brightness values and the first number of B brightness values to obtain R, G brightness average values respectively corresponding to B; determining the R color depth mean, the G color depth mean, and the B color depth mean according to the brightness mean and the gamma curve corresponding to R, G and B, respectively.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A screen brightness adjusting method is applied to an electronic device, wherein the electronic device comprises a display screen and a light sensor arranged in a preset area of the display screen, and the electronic device comprises at least two dimming modes, and the method comprises the following steps:
acquiring RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a dimming mode currently adopted by the local terminal and a first light sensation value currently detected by the light sensor;
determining a reference light sensation value according to the RGB color depth values of the first number of pixel points and a preset light sensation calculation strategy, wherein the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixel points in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area;
determining a target light sensation value according to the reference light sensation value and the dimming parameter;
determining a current ambient light sensation value according to the target light sensation value and the first light sensation value;
and adjusting the actual display brightness of the display screen according to the ambient light sensation value.
2. The method of claim 1, wherein the current dimming mode of the electronic device is a first dimming mode, and when the electronic device is in the first dimming mode: the layer of the display picture of the display screen comprises a mask layer; the electronic equipment adjusts the actual display brightness of the display screen by adjusting the size of the mask value of the mask layer under the condition of keeping the screen brightness level at a preset brightness level; the determining a target light sensation value according to the reference light sensation value and the dimming parameter includes:
substituting the first mask value into a parameter calculation formula to obtain a first mask parameter;
according to the formula: and calculating the target light sensitivity value, namely the reference light sensitivity value, and the first mask parameter, namely a first preset ratio.
3. The method of claim 2, wherein before said substituting said first mask value into a parameter calculation formula to obtain a first mask parameter, said method further comprises:
acquiring test data related to the mask value of the display screen at the preset brightness level, wherein the test data comprises a corresponding light sensitivity value when the mask value is 0 to a first numerical value, and the corresponding light sensitivity value is 0 when the mask value is the first numerical value;
generating a test curve of the mask value according to the test data, and generating a functional relation formed by the mask value and the light sensation value according to the test curve;
and performing normalization processing on the functional relation formed by the mask value and the light sensation value to obtain the parameter calculation formula.
4. The method of claim 2, wherein said adjusting the actual display brightness of the display screen based on the ambient light sensation value comprises:
acquiring a first brightness interval corresponding to the first mask value, and judging whether the ambient light sensation value is in the first brightness interval;
if so, not executing screen brightness adjustment operation aiming at the display screen;
if not, judging the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value; if the ambient light sensation value is judged to be less than or equal to the preset light sensation value, the brightness of the display screen is adjusted according to the dimming strategy associated with the first dimming mode; and if the ambient light sensation value is judged to be larger than the preset light sensation value, adjusting the brightness of the display screen according to a dimming strategy associated with a second dimming mode.
5. The method of claim 3, wherein said adjusting the actual display brightness of the display screen based on the ambient light sensation value comprises:
acquiring a first brightness interval corresponding to the first mask value, and judging whether the ambient light sensation value is in the first brightness interval;
if so, not executing screen brightness adjustment operation aiming at the display screen;
if not, judging the magnitude relation between the ambient light sensitivity value and a preset light sensitivity value; if the ambient light sensation value is judged to be less than or equal to the preset light sensation value, the brightness of the display screen is adjusted according to the dimming strategy associated with the first dimming mode; and if the ambient light sensation value is judged to be larger than the preset light sensation value, adjusting the brightness of the display screen according to a dimming strategy associated with a second dimming mode.
6. The method of claim 4, wherein said adjusting the actual display brightness of the display screen according to the dimming strategy associated with the first dimming mode comprises:
setting the screen brightness level of the display screen to be the preset brightness level;
querying a preset matching relationship by taking the ambient light sensitivity value as a query identifier to obtain a second mask value corresponding to the query identifier, wherein the preset matching relationship comprises a corresponding relationship between the light sensitivity value and the mask value;
and updating the mask value of the mask layer to be the second mask value.
7. The method of claim 5, wherein said adjusting the actual display brightness of the display screen according to the dimming strategy associated with the first dimming mode comprises:
setting the screen brightness level of the display screen to be the preset brightness level;
querying a preset matching relationship by taking the ambient light sensitivity value as a query identifier to obtain a second mask value corresponding to the query identifier, wherein the preset matching relationship comprises a corresponding relationship between the light sensitivity value and the mask value;
and updating the mask value of the mask layer to be the second mask value.
8. The method according to any one of claims 1 to 7, wherein the determining the reference photosensitive value according to the RGB color depth values of the first number of pixels included in the preset region and a preset photosensitive calculation strategy comprises:
determining an average value of R color depth, an average value of G color depth and an average value of B color depth according to the RGB color depth values of the first number of pixel points;
determining the R-perception value from the R-color depth average; determining the G light sensation value according to the G color depth average value; determining the B-ray sensitivity value according to the B-color depth average value;
determining R, G a grayscale value of a color synthesized by B from the R color depth average, the G color depth average, and the B color depth average; determining the first difference value according to the gray scale value;
and determining the reference light sensitivity value according to the R light sensitivity value, the G light sensitivity value, the B light sensitivity value and the first difference value.
9. The method of claim 8, wherein determining the R color depth average, the G color depth average, and the B color depth average from the RGB color depth values of the first number of pixels comprises:
acquiring a preset gamma curve, and determining R, G and B brightness values respectively corresponding to each pixel point in the first number of pixel points according to the gamma curve to obtain a first number of R brightness values, a first number of G brightness values and a first number of B brightness values;
respectively calculating the average values of the first number of R brightness values, the first number of G brightness values and the first number of B brightness values to obtain R, G brightness average values respectively corresponding to B;
determining the R color depth mean, the G color depth mean, and the B color depth mean according to the brightness mean and the gamma curve corresponding to R, G and B, respectively.
10. A screen brightness adjusting device is applied to electronic equipment, the electronic equipment comprises a display screen and a light sensor arranged corresponding to a preset area of the display screen, the electronic equipment at least comprises two dimming modes, the screen brightness adjusting device comprises a processing unit, wherein,
the processing unit is configured to obtain RGB color depth values of a first number of pixel points included in the preset area, a dimming parameter of a current dimming mode adopted by the local terminal, and a first light sensation value currently detected by the light sensor; the reference light sensation value is a screen light sensation value after error compensation, the error is a first difference value between an actual screen light sensation value and an original screen light sensation value caused by the light emitting characteristics of the pixels in the preset area of the display screen, and the original screen light sensation value is obtained by adding and summing an R light sensation value, a G light sensation value and a B light sensation value corresponding to the preset area; and for determining a target light sensation value from the reference light sensation value and the dimming parameter; the first light sensation value is used for determining a target light sensation value; and the display device is used for adjusting the actual display brightness of the display screen according to the ambient light sensation value.
11. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-9.
12. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-9.
CN201910281764.5A 2019-04-09 2019-04-09 Screen brightness adjusting method and related product Active CN109859689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910281764.5A CN109859689B (en) 2019-04-09 2019-04-09 Screen brightness adjusting method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910281764.5A CN109859689B (en) 2019-04-09 2019-04-09 Screen brightness adjusting method and related product

Publications (2)

Publication Number Publication Date
CN109859689A CN109859689A (en) 2019-06-07
CN109859689B true CN109859689B (en) 2020-07-31

Family

ID=66903592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910281764.5A Active CN109859689B (en) 2019-04-09 2019-04-09 Screen brightness adjusting method and related product

Country Status (1)

Country Link
CN (1) CN109859689B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110475017A (en) * 2019-07-18 2019-11-19 深圳传音控股股份有限公司 Smart machine and its display lightness regulating method
CN110730262A (en) * 2019-10-30 2020-01-24 北京字节跳动网络技术有限公司 Environment brightness value detection method and device and electronic equipment
CN112825232B (en) * 2019-11-20 2023-01-06 华为技术有限公司 Compensation method and electronic equipment
CN111343321B (en) * 2020-02-28 2021-08-10 Oppo广东移动通信有限公司 Backlight brightness adjusting method and related product
CN111179882B (en) * 2020-03-04 2021-07-16 Oppo(重庆)智能科技有限公司 Display screen brightness adjusting method and device, electronic equipment and storage medium
CN111798796A (en) * 2020-07-23 2020-10-20 欧菲微电子技术有限公司 Display screen brightness adjusting method and display device
CN111968560B (en) * 2020-08-31 2023-10-24 维沃移动通信有限公司 Display parameter adjustment method and device and electronic equipment
CN112073656A (en) * 2020-09-08 2020-12-11 深圳创维-Rgb电子有限公司 Picture display control method, television and computer readable storage medium
CN112506455B (en) * 2020-11-18 2024-10-18 Oppo广东移动通信有限公司 Display method and device of screen to be projected, electronic equipment and readable storage medium
CN115248652B (en) * 2021-04-25 2024-01-12 极米科技股份有限公司 Image self-adaption method, device, equipment and storage medium
CN113391779B (en) * 2021-06-17 2023-08-04 广东小天才科技有限公司 Parameter adjusting method, device and equipment for paper-like screen
CN114038443B (en) * 2021-11-23 2023-02-14 杭州逗酷软件科技有限公司 Brightness adjusting method and related device
CN114120868B (en) * 2021-11-26 2024-09-20 努比亚技术有限公司 Under-screen light sensation compensation calibration method, equipment and computer readable storage medium
CN115512673B (en) * 2022-10-25 2023-09-05 青岛海信移动通信技术有限公司 Light intensity value adjusting method, device, terminal equipment and medium
CN116453457B (en) * 2023-06-16 2023-09-05 广东保伦电子股份有限公司 Color correction method and system for LED display screen
CN118155551B (en) * 2024-05-09 2024-07-30 歌尔股份有限公司 Display control method, device, equipment and storage medium for LED display screen

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7312779B1 (en) * 2003-09-23 2007-12-25 Northrop Grumman Corporation Method of color calibration for transmissive displays
CN101145332A (en) * 2006-09-14 2008-03-19 英华达(上海)科技有限公司 Screen brightness regulating device and method for regulating electronic device screen brightness
CN103033262A (en) * 2012-12-14 2013-04-10 京东方科技集团股份有限公司 Light sensor element, display unit and brightness detection method thereof
US9633607B1 (en) * 2013-12-02 2017-04-25 Amazon Technologies, Inc. Adaptive RGBW conversion
CN106875922A (en) * 2017-03-17 2017-06-20 深圳Tcl数字技术有限公司 Display terminal display brightness method of adjustment and device
CN106875920A (en) * 2016-08-09 2017-06-20 阿里巴巴集团控股有限公司 A kind of parameter regulation means and device
CN107004390A (en) * 2014-11-10 2017-08-01 索尼公司 Display brightness is controlled
CN108205998A (en) * 2015-12-21 2018-06-26 联发科技股份有限公司 The controller and corresponding control methods of transparence display
CN108600546A (en) * 2018-04-28 2018-09-28 维沃移动通信有限公司 A kind of environment light detection method and mobile terminal
CN108737661A (en) * 2018-06-06 2018-11-02 Oppo广东移动通信有限公司 Control method, control device, electronic device, storage medium and computer equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7312779B1 (en) * 2003-09-23 2007-12-25 Northrop Grumman Corporation Method of color calibration for transmissive displays
CN101145332A (en) * 2006-09-14 2008-03-19 英华达(上海)科技有限公司 Screen brightness regulating device and method for regulating electronic device screen brightness
CN103033262A (en) * 2012-12-14 2013-04-10 京东方科技集团股份有限公司 Light sensor element, display unit and brightness detection method thereof
US9633607B1 (en) * 2013-12-02 2017-04-25 Amazon Technologies, Inc. Adaptive RGBW conversion
CN107004390A (en) * 2014-11-10 2017-08-01 索尼公司 Display brightness is controlled
CN108205998A (en) * 2015-12-21 2018-06-26 联发科技股份有限公司 The controller and corresponding control methods of transparence display
CN106875920A (en) * 2016-08-09 2017-06-20 阿里巴巴集团控股有限公司 A kind of parameter regulation means and device
CN106875922A (en) * 2017-03-17 2017-06-20 深圳Tcl数字技术有限公司 Display terminal display brightness method of adjustment and device
CN108600546A (en) * 2018-04-28 2018-09-28 维沃移动通信有限公司 A kind of environment light detection method and mobile terminal
CN108737661A (en) * 2018-06-06 2018-11-02 Oppo广东移动通信有限公司 Control method, control device, electronic device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN109859689A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN109859689B (en) Screen brightness adjusting method and related product
CN109817152B (en) Screen brightness adjusting method and related product
US7710433B2 (en) Methods and apparatus for calibrating a color display
CN105741771A (en) Light emitting element brightness determining method, brightness determining device and mobile terminal
KR101428366B1 (en) Method and apparatus for adaptive display calibration
US20200098333A1 (en) Method and System for Display Color Calibration
CN109246405B (en) Method and system for adjusting uniformity of image tone
KR20170128573A (en) Display myra calibration method, apparatus, and system
CN109785792B (en) Display panel driving method and device and display device
JP2016157098A (en) Image display unit and control method of the same
JP2008116850A (en) Liquid crystal display device and method for controlling liquid crystal display device
CN112700746B (en) Brightness adjusting method of display device, terminal device and storage medium
CN113316711B (en) Method and apparatus for estimating ambient light
CN116164837A (en) Ambient light detection method, device, equipment and storage medium
WO2022040889A1 (en) Display method and apparatus, and electronic device
CN116860143A (en) Image display processing method and device
US10382733B2 (en) Image processing device and method thereof
JP2015158626A (en) Calibration device, calibration method and program
CN115979419B (en) Ambient light detection method, device, equipment and storage medium
WO2022120799A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN110896466B (en) White balance adjustment method and system of display device
JP6338391B2 (en) Calibration apparatus, calibration apparatus control method, and program
CN115588405A (en) Display parameter adjusting method, device, equipment and storage medium
US9679531B2 (en) Correcting method, correcting apparatus and method for establishing color performance database for display apparatus
CN116309886A (en) Display control method, display control device, electronic equipment and 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