Ambient light detection method, device, equipment and storage medium
By determining the brightness and display information of the display screen and calculating the ambient light adjustment amount, the problem of the ambient light sensor being interfered with by the OLED display is solved, and the accuracy of the ambient light detection results is achieved.
Patent Information
- Application Number
- CN202310339475.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-03-28
AI Technical Summary
When the ambient light sensor is moved from the border of the terminal device to under the organic light-emitting semiconductor display, it is interfered with by the screen light of the OLED display, resulting in inaccurate ambient light detection results.
By determining the brightness of the display screen, the first display information and the second display information, the ambient light adjustment amount is calculated, and the detection value of the ambient light sensor is adjusted according to the adjustment amount to eliminate the influence of the display screen light and improve the detection accuracy.
Accurately estimating the amount of light leakage from the display screen improves the accuracy of the detection results of the ambient light sensor, and can achieve accurate ambient light intensity measurement when the display screen displays pure color or non-pure color content.
Smart Images

Figure CN116164837B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and is related to, but not limited to, an ambient light detection method, device, equipment, and storage medium. Background Art
[0002] The ambient light sensor (ALS) detects ambient light, including its intensity and correlated color temperature (CCT). When the ALS is moved from the edge of a device to under an organic electroluminescence display (OLED), the ALS receives not only ambient light but also interference from the OLED screen light, resulting in inaccurate ambient light detection. Summary of the Invention
[0003] The embodiments of the present application provide an ambient light detection method, apparatus, device, and storage medium, which can improve the accuracy of the ambient light detection results of the ALS.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides an ambient light detection method, applied to an electronic device, the method comprising:
[0006] determining the brightness of a display screen, first display information, and second display information, wherein the first display information represents display content in a first area of the display screen, and the second display information represents display content in a second area of the display screen, the first area being an area of the display screen where light emitted from the display screen can enter an ambient light sensor, and the second area being an area of the display screen other than the first area;
[0007] determining an ambient light adjustment amount based on the brightness, the first display information, and the second display information, the ambient light adjustment amount representing a response value of the ambient light sensor to light emitted by the display screen;
[0008] The detection value of the ambient light sensor is adjusted according to the ambient light adjustment amount to obtain an ambient light intensity value.
[0009] In a second aspect, an embodiment of the present application provides an ambient light detection device, which is applied to an electronic device, and the device includes:
[0010] a first determining module, configured to determine the brightness of a display screen, first display information, and second display information, wherein the first display information represents display content in a first area of the display screen, and the second display information represents display content in a second area of the display screen, the first area being an area of the display screen where light emitted from the display screen can enter the ambient light sensor, and the second area being an area of the display screen other than the first area;
[0011] a second determining module, configured to determine an ambient light adjustment amount based on the brightness, the first display information, and the second display information, wherein the ambient light adjustment amount represents a response value of the ambient light sensor to light emitted by the display screen;
[0012] The adjustment module is configured to adjust the detection value of the ambient light sensor according to the ambient light adjustment amount to obtain an ambient light intensity value.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, at least two vibration components, and a computer program stored in a memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned ambient light detection method are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, i.e., a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned ambient light detection method is implemented.
[0015] The ambient light detection method, apparatus, and device provided in the embodiments of the present application determine the brightness, first display information, and second display information of a display screen, wherein the first display information represents the display content of a first area of the display screen, and the second display information represents the display content of a second area of the display screen, the first area being the area where light emitted from the display screen can be incident on the ambient light sensor, and the second area being the area of the display screen other than the first area; based on the brightness, the first display information, and the second display information, an ambient light adjustment amount is determined, wherein the ambient light adjustment amount represents the response value of the ambient light sensor to the light emitted from the display screen; according to the The ambient light adjustment amount adjusts the detection value of the ambient light sensor to obtain an ambient light intensity value; here, the influence of the light emitted by the display screen on the detection value of the ALS, i.e., the ambient light adjustment amount, is determined by the brightness of the display screen and the display information displayed on the display screen, and the light emitted from the display screen that can be incident on the first area of the ALS and the second area outside the first area of the display screen are used as independent elements affecting the detection value of the ALS to estimate the influence of the light emitted by the display screen on the detection value of the ALS, thereby accurately estimating the amount of light leakage from the display screen, accurately measuring the detection amount of the ALS based on ambient light based on the brightness of the leakage light of the display screen, and improving the accuracy of the ambient light detection result of the ALS. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is an optional structural diagram of an electronic device provided in an embodiment of the present application. Figure 1 ;
[0017] Figure 2 This is an optional process diagram of the ambient light detection method provided in the embodiment of the present application. Figure 1 ;
[0018] Figure 3 This is an optional schematic diagram of the division of the display area provided in the embodiment of the present application. Figure 1 ;
[0019] Figure 4A This is an optional structural diagram of the ambient light adjustment amount prediction model provided in the embodiment of the present application. Figure 1 ;
[0020] Figure 4B This is an optional structural diagram of the ambient light adjustment amount prediction model provided in the embodiment of the present application. Figure 2 ;
[0021] Figure 4C This is an optional structural diagram of the ambient light adjustment amount prediction model provided in the embodiment of the present application. Figure 3
[0022] Figure 5 This is an optional structural diagram of an electronic device provided in an embodiment of the present application. Figure 2 ;
[0023] Figure 6 This is an optional schematic diagram of the ambient light sensor light receiving provided in the embodiment of the present application. Figure 1 ;
[0024] Figure 7 This is a schematic diagram of the pixel arrangement provided in the embodiment of the present application. Figure 1 ;
[0025] Figure 8 This is a schematic diagram of the pixel arrangement provided in the embodiment of the present application. Figure 2 ;
[0026] Figure 9 This is an optional schematic diagram of the division of the display area provided in the embodiment of the present application. Figure 2 ;
[0027] Figure 10 This is an optional structural diagram of the first area provided in an embodiment of the present application;
[0028] Figure 11 is a schematic diagram of an optional network model structure of the second prediction model provided in an embodiment of the present application;
[0029] Figure 12 This is an optional structural diagram of the ambient light detection device provided in an embodiment of the present application;
[0030] Figure 13 This is an optional structural diagram of the electronic device provided in the embodiment of the present application. Figure 3 . DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0032] The embodiments of the present application can provide an ambient light detection method, apparatus, device, and storage medium. In practical applications, the ambient light detection method can be implemented by an ambient light detection device, and the various functional entities in the ambient light detection device can be collaboratively implemented by hardware resources of an electronic device (such as a terminal device), such as computing resources such as a processor, and communication resources (such as those used to support various communication methods such as optical cables and cellular communications).
[0033] Of course, the embodiments of the present application are not limited to being provided as methods and hardware, and can also be implemented in various ways, such as being provided as a storage medium (storing instructions for executing the ambient light detection method provided by the embodiments of the present application).
[0034] The electronic device 100 implementing the ambient light detection method provided in the embodiment of the present application is as follows: Figure 1 As shown, it includes: a display screen 101 and an ALS 102, wherein ambient light 103 enters the ALS 102 through the display screen 101. When the display screen 101 is working, screen light 104 emitted by the display screen 101 enters the ALS 102. The detection result of the ALS includes two parts of light: ambient light 103 and screen light 104.
[0035] The electronic device 100 for implementing the ambient light detection method provided in an embodiment of the present application also includes a processor, which is capable of performing the following processing: determining the brightness of the display screen, first display information, and second display information, wherein the first display information represents the display content of a first area in the display screen, and the second display information represents the display content of a second area in the display screen, the first area being the area in which light emitted from the display screen can be incident on the ambient light sensor, and the second area being the area in the display screen other than the first area; determining an ambient light adjustment amount based on the brightness, the first display information, and the second display information, wherein the ambient light adjustment amount represents the response value of the ambient light sensor to the light emitted by the display screen; and adjusting the detection value of the ambient light sensor according to the ambient light adjustment amount to obtain an ambient light intensity value.
[0036] In the embodiment of the present application, the ALS 102 may be a single-channel ALS or a multi-channel ALS, wherein different channels are used to detect light of different wavelength bands.
[0037] Next, combine Figure 1 The schematic diagram of the electronic device shown in FIG2 illustrates various embodiments of the ambient light detection method, apparatus, device, and storage medium provided in the embodiments of the present application. The ambient light detection method provided in the embodiments of the present application can be applied to electronic devices including multiple vibration components.
[0038] The present invention provides an ambient light detection method. Figure 2 This is a schematic diagram of the implementation process of the ambient light detection method of the embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:
[0039] S201. The electronic device determines the brightness of the display screen, first display information, and second display information, where the first display information represents display content of a first area in the display screen, and the second display information represents display content of a second area in the display screen. The first area is an area in the display screen where light emitted from the display screen can be incident on an ambient light sensor, and the second area is an area in the display screen other than the first area.
[0040] In an embodiment of the present application, the display screen of the electronic device includes a first area, where the first area is an area where light emitted from the display screen can be incident on the ALS, and the first display information represents the display content of the first area.
[0041] In an embodiment of the present application, the second display information represents the display content of the second area. The area of the display area of the display screen other than the first area is referred to as the second area. In one example, the second display information only includes display information of the display content of the second area. In another example, the second display information includes display information of the display area, where the display area includes the first area and the second area.
[0042] like Figure 3 As shown, the display area 301 of the display screen is divided into a first area 302 and a second area 303. The first display information is the display information of the first area 302, and the second display information includes the display information of the second area 303. In one example, the second display information is the display information of the display area 301. In another example, the second display information is the display information of the second area 303.
[0043] In this embodiment of the present application, the first display information may include the color information and position information of each pixel in the first area, and the second display information may include the color information and position information of each pixel in the second area or the display area. The color information may be represented as (r, g, b), where r, g, and b respectively represent the grayscale of the red color channel (R), the green color channel (G), and the blue color channel (B).
[0044] If the size of the first region is M*N, i.e., it includes M*N pixels, then the first display information can be represented as a first vector, where the first vector is a three-dimensional vector of M*N*3 or a two-dimensional vector of M*N. The arrangement of the elements in the first vector is related to the position of the pixels in the first region. If the first vector is a two-dimensional vector of M*N, then the value of each element is the chromaticity calculated from the grayscale of the R, G, and B channels of the corresponding pixel. If the first vector is a three-dimensional vector of M*N*3, then each element represents the grayscale of the corresponding color channel of the corresponding pixel.
[0045] If the size of the display area in the display screen is H*W, that is, it includes H*W pixels, the second display information can be represented as a second vector, and the second vector is a three-dimensional vector of H*W*3 or a two-dimensional vector of H*W. Among them, the arrangement of the elements in the second vector is related to the position of the pixels in the display area. If the second vector is a two-dimensional vector of H*W, the value of each element is the chromaticity calculated from the grayscale of the three channels R, G, and B of the corresponding pixel. If the second vector is a three-dimensional vector of H*W*3, each element represents the grayscale of the corresponding color channel of the corresponding pixel. It can be understood that if the second display information includes the display information of the display content of the display area, then the values of the elements corresponding to the M*N pixels corresponding to the first area in the second vector are determined based on the display content of the first area; if the second display information only includes the display information of the display content of the second area, then the values of the elements corresponding to the M*N pixels corresponding to the first area in the second vector are marked as 0.
[0046] The brightness of the display screen is independent of the content displayed on the display screen and is used to control the intensity of the display screen's backlight. The brightness of the display screen is a data value that is greater than or equal to the minimum brightness and less than or equal to the maximum brightness. In one example, the minimum brightness is 0 and the maximum brightness is 4095.
[0047] When the display screen displays the current display content, the electronic device obtains the brightness of the display screen, the first display information, and the second display information.
[0048] In the embodiment of the present application, when the display screen displays the current display content, the colors of different pixels may be the same or different. If the colors of different pixels are the same, the color of the display area is a pure color. If the display area includes pixels of different colors, the color of the display area is a non-pure color.
[0049] S202: The electronic device determines an ambient light adjustment amount based on the brightness, the first display information, and the second display information, where the ambient light adjustment amount represents a response value of the ambient light sensor to the light emitted by the display screen.
[0050] After determining the brightness, the first display information, and the second display information, the electronic device determines, based on the brightness, the first display information, and the second display information, an ambient light adjustment amount corresponding to a case where the display area displays the current display content.
[0051] In the embodiment of the present application, for the currently displayed content, the brightness refers to the brightness of the current frame image displayed on the display screen. The first display information is determined based on the current frame image. The second display information is also determined based on the current frame image, or based on an image set of a first number of consecutive frame images including the current frame image, where the first number is an integer greater than or equal to 2. When the second display information is determined based on the image set, a weighted summation of the display information of multiple frames of images in the image set can be performed, where the weights corresponding to different frame images can be the same or different.
[0052] When an electronic device displays current content on its display screen, ambient light and light emitted by the display screen simultaneously strike the ambient light sensor. At this point, the detection value of the ambient light sensor includes a response value of the ambient light on the ambient light sensor and a response value of the screen light emitted by the display area on the ambient light sensor, i.e., an ambient light adjustment amount. In an embodiment of the present application, the electronic device determines the ambient light adjustment amount based on the brightness, the first display information, and the second display information. When determining the ambient light adjustment amount based on the brightness and the first display information representing the display content of the first area, the effect of the brightness of the display area and the content displayed by each pixel in the first area on the response value of the screen light emitted by the display area on the ambient light sensor is taken into account. Here, when the light emitted from the second area cannot be incident on the ambient light sensor, the factors determining the ambient light adjustment amount also include the display content of the second area, thereby taking into account the influence of the light from the second area outside the first area in the display area on the light from the first area incident on the ambient light sensor. Therefore, in the embodiment of the present application, the brightness of the display screen and the first display information and the second display information are respectively used as independent influencing factors to determine the response value of the ambient light sensor to the light emitted by the screen, thereby taking the second display information that indirectly affects the response value of the screen light on the ambient light sensor as an estimation factor to accurately estimate the response value of the ambient light sensor to the light emitted by the screen.
[0053] It is understandable that the brightness, the first display information and the second display information have different weights on the response value of the ambient light sensor to the light emitted by the screen. Therefore, different weights can be used for the brightness, the first display information and the second display information to predict the response value of the ambient light sensor to the light emitted by the screen.
[0054] In addition, in the embodiment of the present application, the first display information and the second display information are display information of the content displayed in the first area and the second area respectively, and there is no limitation on the color of the content displayed in the display area. Therefore, the display area in the embodiment of the present application can display pure color or non-pure color display content.
[0055] S203: The electronic device adjusts the ambient light according to the ambient light adjustment amount and the detection value of the ambient light sensor to obtain an ambient light intensity value.
[0056] After the electronic device determines the response value of the screen light emitted by the display screen on the ambient light sensor, that is, the ambient light adjustment amount, it removes the ambient light adjustment amount from the detection value of the ambient light sensor when the display screen displays the current display content to obtain the response value of the ambient light on the ambient light sensor, that is, the ambient light intensity value.
[0057] In an embodiment of the present application, the ambient light adjustment amount can be understood as the screen light leakage value. The screen light leakage value is subtracted from the detection value actually measured by the ambient light sensor to obtain the ambient light intensity value. When the accurate screen light leakage value is calculated, the accurate ambient light intensity value can be obtained.
[0058] The ambient light detection method provided by the embodiment of the present application determines the brightness of the display screen, first display information, and second display information, wherein the first display information represents the display content of a first area in the display screen, and the second display information represents the display content of a second area in the display screen, the first area is the area where light emitted from the display screen can be incident on the ambient light sensor, and the second area includes the area of the display area of the display screen other than the first area; based on the brightness, the first display information, and the second display information, an ambient light adjustment amount is determined, the ambient light adjustment amount represents the response value of the ambient light sensor to the light emitted by the display screen; the ambient light sensor is adjusted according to the ambient light adjustment amount. The detection value of the sensor is adjusted to obtain the ambient light intensity value; here, the influence of the light emitted by the display screen on the detection value of the ALS, that is, the ambient light adjustment amount, is determined by the brightness of the display screen and the display information displayed on the display screen, and the light emitted from the display screen can be incident on the first area of the ALS and the second area outside the first area of the display screen are used as independent elements affecting the detection value of the ALS to estimate the influence of the light emitted by the display screen on the detection value of the ALS, thereby accurately estimating the amount of light leakage from the display screen, and accurately measuring the detection amount of the ALS based on ambient light based on the brightness of the leakage light of the display screen, thereby improving the accuracy of the ambient light detection result of the ALS, and the content displayed in the display area is not limited to pure color, and can be non-pure color display content.
[0059] In some embodiments, the electronic device includes an ambient light adjustment amount prediction model, and determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes:
[0060] The brightness, the first display information, and the second display information are input into the ambient light adjustment amount prediction model to obtain the ambient light adjustment amount output by the ambient light adjustment amount prediction model.
[0061] Here, the ambient light adjustment amount prediction model may include one or more models, and each model may be one of the following: an equation, a deep learning model, a neural network model, and other various models. Among them, if a model is expressed as an equation, the model may be a fitted quadratic polynomial, a cubic polynomial, or a higher-order polynomial.
[0062] Taking the ambient light adjustment amount prediction model as an ambient light adjustment amount prediction function as an example, the electronic device obtains the ambient light adjustment amount prediction function, inputs the brightness, the first display information, and the second display information into the ambient light adjustment amount prediction function, that is, uses the brightness, the first display information, and the second display information as parameters of the ambient light adjustment amount prediction function, and calculates the ambient light adjustment amount under the current brightness, the first display information, and the second display information using the prediction function. The ambient light adjustment amount prediction function may be a function including one or more polynomials with the brightness, the first display information, and the second display information as variables.
[0063] Taking the ambient light adjustment amount prediction model neural network model as an example, the electronic device inputs the brightness, the first display information and the second display information into the ambient light adjustment amount prediction model to obtain the ambient light adjustment amount output by the ambient light adjustment amount prediction model.
[0064] The electronic device can use an ambient light adjustment amount prediction model to predict the ambient light response value under the current brightness, first display information, and second display information. The ambient light adjustment amount prediction model is a neural network model including one or more models that predicts the corresponding non-ambient light adjustment amount based on the brightness, first display information, and second display information.
[0065] In the embodiment of the present application, the ambient light adjustment amount prediction model can be obtained by the electronic device from other devices, or can be trained by the electronic device based on a sample data set under no ambient light conditions.
[0066] When the ambient light adjustment amount prediction model is trained by the electronic device based on a sample data set under no ambient light conditions, the electronic device further performs the following processing:
[0067] Determine a sample data set for the display screen in a scene without ambient light, the sample data set including at least two groups of sample data and labels corresponding to each group of sample data, one group of sample data including: a reference brightness, a first reference display information, and a second reference display information, if the first area displays display content represented by the first reference display information, then the second area displays display content represented by the second reference display information; the label corresponding to the training sample is a response value of the ambient light sensor to the light emitted by the display screen with the sample data; the ambient light adjustment amount prediction model is trained based on the sample data set.
[0068] The sample data set under no ambient light conditions includes multiple sets of sample data under no ambient light conditions, wherein one set of sample data includes a reference brightness, first reference display information, and second reference display information. The labels corresponding to the sample data include a reference ambient light adjustment amount, which represents the detection value of the ambient light sensor when the display screen displays the first reference display information in a first area and the second reference display information in a second area at the reference brightness. It is understood that at least one of the reference brightness, the first reference display information, and the second reference display information may be different in different sets of data.
[0069] Electronic devices can control the display screen to display at different reference brightnesses between minimum brightness and maximum brightness under different environments. For a reference brightness, the electronic device can display image content of scenes such as scenery, weather, office, movie, and outdoor in the display area. The image content can be pure color or non-pure color, and the response value detected by the ambient light sensor under different display contents, namely the reference ambient light adjustment amount, is collected.
[0070] In the embodiment of the present application, the electronic device determines the ambient light adjustment amount based on the brightness, the first display information, and the second display information in a manner including but not limited to at least one of the following:
[0071] Method 1: The brightness, the first display information, and the second display information are fused to obtain a first fusion result, and the ambient light adjustment amount is determined based on the first fusion result.
[0072] Method 2: Use part of the brightness, first display information, and second display information as first information to determine a reference response value, and use another part of the brightness, first display information, and second display information as second information to correct the reference response value to obtain an ambient light adjustment amount.
[0073] Method three: determining a target brightness level corresponding to the brightness, and determining an ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information, and determining an ambient light adjustment amount based on the ambient light adjustment component.
[0074] For method one, S202 determines the ambient light adjustment amount based on the brightness, the first display information and the second display information, including: performing feature extraction on the first display information and the second display information respectively to obtain a first feature and a second feature; fusing the first feature, the second feature and the brightness to obtain a first fused feature; and determining the ambient light adjustment amount based on the first fused feature.
[0075] Here, brightness is data, and the first display information and the second display information are vectors of different sizes. Before fusing the brightness, the first display information and the second display information, feature extraction may be performed on the first display information and the second display information to obtain first features and second features.
[0076] In an embodiment of the present application, the first display information is a three-dimensional vector determined based on the size of the first area, and the second display information is a three-dimensional vector determined based on the size of the second area. The first feature and the second feature can be obtained by performing feature extraction on the first display information and the second display information respectively, and the sizes of the first feature and the second feature can be the same or different. The first feature and the second feature can be one-dimensional features or multi-dimensional features.
[0077] In an embodiment of the present application, the electronic device can perform feature extraction on the first display information and the second display information using a first feature extraction model and a second feature extraction model, respectively, to obtain a first feature and a second feature. The first feature is the display feature of the display content of the first area, and the first feature can affect the light emitted by the first area, i.e., the characteristics of the light. The second feature is the display feature of the display content of the second area. When the display content of the first area is fixed, the light emitted by the second area can affect the light emitted by the first area. Therefore, the second feature indirectly affects the light emitted by the first area. At this time, the electronic device inputs the first display information into the first feature extraction model to obtain the first feature output by the first feature extraction model, and inputs the second display information into the second feature extraction model to obtain the second feature output by the second feature extraction model.
[0078] In an embodiment of the present application, the first feature includes the color feature and / or position feature of the pixels in the first area. The color feature may include at least one of the following: the mean color of the pixels in the first area, the histogram distribution of the color of the pixels in the first area, the feature map of the display content in the first area, etc. The position feature may be indirectly represented by the feature map, or it may be a distance weight, wherein the distance weight characterizes the size of the distance from different pixels to the center position of the first area. Similarly, the second feature may include the color feature and / or position feature of the pixels in the second area. The color feature may include at least one of the following: the mean color of the pixels in the second area, the histogram distribution of the color of the pixels in the second area, the feature map of the display content in the second area, etc. The position feature may be indirectly represented by the feature map, or it may be a distance weight, wherein the distance weight characterizes the size of the distance from different pixels to the center position of the second area.
[0079] After determining the first feature and the second feature, the electronic device fuses the brightness, the first feature, and the second feature. The method for fusing the brightness, the first feature, and the second feature includes, but is not limited to, concatenation, weighting, and multiplication. In the embodiments of the present application, the method for fusing the brightness, the first feature, and the second feature is not limited in any way.
[0080] After determining the first fusion feature, the electronic device determines the ambient light adjustment amount based on the first fusion feature.
[0081] In one example, an electronic device calculates a first feature on first display information through a first statistical function, and calculates a second feature on second display information through a second statistical function, and inputs a first fusion feature after the first feature, the second feature and brightness are fused into a first prediction function corresponding to the first fusion feature to obtain an ambient light adjustment amount, wherein the first prediction function is a relationship formula for predicting the ambient light adjustment amount corresponding to the first fusion feature based on the first fusion feature.
[0082] In one example, an electronic device calculates a first feature on first display information through a first statistical function, and calculates a second feature on second display information through a second statistical function, and inputs a first fusion feature after the first feature, the second feature and the brightness are fused into a first prediction model to obtain an ambient light adjustment amount output by the first prediction model. The first prediction model is used to predict the ambient light adjustment amount corresponding to the first fusion feature based on the first fusion feature.
[0083] In one example, the electronic device inputs the first display information into a first feature extraction model to obtain a first feature, and inputs the second display information into a second feature extraction model to obtain a second feature, and inputs the first fusion feature after the first feature, the second feature and the brightness are fused into a first prediction model to obtain the ambient light adjustment amount output by the first prediction model.
[0084] In one example, the ambient light adjustment amount prediction model in the electronic device can be as follows: Figure 4A As shown, it includes: a first feature extraction model 401, a second feature extraction model 402, a first fusion model 403 and a first prediction model 404. The electronic device inputs the first display information into the first feature extraction model 401 to obtain the first feature, and inputs the second display information into the second feature extraction model 402 to obtain the second feature. The first feature, the second feature and the brightness are input into the first fusion model 403 to obtain the spliced first fusion feature. The first fusion feature is input into the first prediction model 404 to obtain the ambient light adjustment amount output by the first prediction model. Among them, the first prediction model is used to predict the ambient light adjustment amount corresponding to the first fusion feature based on the first fusion feature. It can be understood that Figure 4A The ambient light adjustment amount prediction model shown can be trained using a sample data set.
[0085] For method two, S202 determines the ambient light adjustment amount based on the brightness, the first display information, and the second display information, including: determining a reference response value based on at least one first information, the at least one first information including the brightness, the first display information, and part of the second display information; and correcting the reference response value based on at least one second information to obtain the ambient light adjustment amount, the at least one second information including information of the brightness, the first display information, and the second display information other than the at least one first information.
[0086] In the second method, the screen light leakage value preliminarily predicted by the electronic device based on the first information is a reference response value, and the reference response value is corrected based on the second information to obtain the ambient light adjustment amount. Among them, one or two of the brightness, the first display information, and the second display information are the first information, and the information other than the first information among the brightness, the first display information, and the second display information is the second information. The reference response value can be understood as the response value of the ALS predicted by the electronic device based on at least one first information to the screen light emitted by the display screen based on at least one first information. The electronic device corrects the reference response value through the second information to obtain the response value of the ALS to the screen light emitted by the display screen based on the brightness, the first display information, and the second display information, which is a more accurate ambient light adjustment amount.
[0087] In one example, at least one first information includes brightness, and at least one second information includes: first display information and second display information. At this time, the electronic device determines a reference response value based on the brightness and modifies the reference response value based on the first display information and the second display information.
[0088] In one example, at least one first information includes first display information, and at least one second information includes brightness and second display information. At this time, the electronic device determines a reference response value based on the first display information and modifies the reference response value based on the brightness and second display information.
[0089] In one example, at least one first information includes brightness and first display information, and at least one second information includes second display information. At this time, the electronic device determines a reference response value based on the brightness and the first display information, and modifies the reference response value based on the second display information.
[0090] In one example, at least one first information includes brightness and second display information, and at least one second information includes first display information. In this case, the electronic device determines a reference response value based on the brightness and the second display information, and modifies the reference response value based on the first display information.
[0091] In one example, at least one first information includes first display information and second display information, and at least one second information includes brightness. In this case, the electronic device determines a reference response value based on the first display information and the second display information, and modifies the reference response value based on the brightness.
[0092] In an embodiment of the present application, part of the information in the brightness, the first display information, and the second display information is used to determine a reference response value, and the remaining input is used for correction. For example, the first display information and the second display information are used as input to train the ambient light adjustment amount prediction model at a fixed brightness (for example, 1000). In this way, the training sample data only needs to collect data of different display screens at a brightness of 1000 in a dark room. The amount of data is small, the fluctuation range of the label is small, the model is small, and the training is simpler and faster. It is then expanded to different brightness levels (for example, under the same screen, the adjustment amount at a brightness of 1000 can be determined to be 100. When the actual brightness is 2000, the adjustment amount is corrected to 200, and then corrected to 300 at a brightness of 3000).
[0093] In some embodiments, the at least one first information includes: the first display information, the at least one second information includes: the brightness and the second display information, and the correcting the reference response value based on the at least one second information to obtain the ambient light adjustment amount includes: extracting features from the second display information to obtain the second feature; and correcting the reference response value based on the brightness and the second feature to obtain the ambient light adjustment amount.
[0094] Here, the electronic device determines a reference response value based on the first display information and modifies the reference response value based on the brightness and the second display information. Where the brightness is a numerical value and the second display information is a three-dimensional vector, before modifying the reference response value based on the brightness and the second display information, the electronic device may first extract features from the second display information to obtain a second feature. The reference response value is then modified based on the second feature and the brightness to obtain the ambient light adjustment amount.
[0095] When correcting the reference response value based on the second characteristic and brightness, the correction can be performed sequentially using the second characteristic and brightness. Here, the calibrated brightness and the correction amount for the calibrated second display information can be determined, and the current correction amount can be determined based on the relationship between the brightness and the calibrated brightness, and the relationship between the second characteristic and the calibrated second characteristic, so as to correct the current reference response value and obtain the ambient light adjustment amount corresponding to the current brightness and the second characteristic.
[0096] In one example, the calibrated brightness is 1000, the second feature of the calibrated second display information is the RGB mean of (0, 0, 0), the correction amount for the calibrated brightness and the calibrated second display information is 100, assuming that the current brightness is 5000, first use the brightness value to correct to 100 / 1000*5000=500, and then use the second feature (for example, the full image mean of 125, 125, 125) to correct to 500*0.5=250; add the correction amount to the reference response value.
[0097] In an embodiment of the present application, the correction method for correcting the reference response value based on the calibrated brightness and the calibrated second display information may be a correction formula, function or model calibrated in advance, and the specific revision method is not limited here.
[0098] It should be noted that the electronic device can input the first display information into the second prediction model corresponding to the first display information, and obtain the second prediction model to output a reference response value corresponding to the first display information based on the input first display information, wherein the second prediction model is used to predict the ambient light adjustment amount corresponding to the first display information based on the first display information.
[0099] In one example, Figure 4B As shown, the ambient light adjustment amount prediction model includes a second prediction model 405, a second feature extraction model 402, and a first correction model 406. The electronic device inputs the first display information into the second prediction model 405 to obtain the reference response value output by the second prediction model 405, and inputs the second display information into the second feature extraction model 402 to obtain the second feature output by the second feature extraction model 402, and inputs the brightness, the second feature and the reference response value into the first correction model 406 to obtain the ambient light adjustment amount output by the first correction model 406.
[0100] In an embodiment of the present application, the first display information is the most important factor affecting the light leakage value. A second prediction model is trained based on the first display information to determine a screen light leakage value to be corrected. In this case, the second display information and brightness are fixed first, and only the relationship between the light leakage value and the first display information is studied. The training sample data requirements are small, the model is simple, and the training speed is faster; the relationship between the remaining second display information, brightness and light leakage value can be analyzed and modeled separately.
[0101] It is understandable that when at least one second information includes first display information and / or second display information, feature extraction can be performed on the first display information and / or the second display information to obtain the first feature and / or the second feature, and the reference response value can be corrected based on the first feature and / or the second feature.
[0102] In some embodiments, the at least one first information includes: the first display information and the second display information, the at least one second information includes: the brightness, and determining the reference response value based on the at least one first information includes: performing feature extraction on the first display information and the second display information respectively to obtain a first feature and a second feature; fusing the first feature and the second feature to obtain a second fused feature; and determining the reference response value based on the second fused feature.
[0103] Here, the electronic device determines a reference response value based on the first display information and the second display information, and modifies the reference response value based on the brightness. The electronic device extracts features from the first display information to obtain a first feature, extracts features from the second display information to obtain a second feature, fuses the first feature and the second feature to obtain a second fused feature, determines a corresponding reference response value based on the second fused feature, and modifies the reference response value based on the brightness to obtain an ambient light adjustment amount.
[0104] In the embodiment of the present application, the method for correcting the reference response value based on brightness is not limited. In one example, a conversion formula representing the relationship between the ambient light adjustment amount and brightness can be determined by fitting, and the ambient light adjustment amount at the current brightness can be determined based on the conversion formula.
[0105] It should be noted that the electronic device can input the second fusion feature into the third prediction model corresponding to the second fusion feature, and obtain the reference response value corresponding to the first display information and the second display information output by the third prediction model based on the input second fusion feature.
[0106] In one example, Figure 4C As shown, the ambient light adjustment amount prediction model includes a first feature extraction model 401, a second feature extraction model 402, a second fusion model 407, a third prediction model 408, and a second correction model 409. The electronic device inputs the first display information into the first feature extraction model 401 to obtain the first feature output by the first feature extraction model 401, and inputs the second display information into the second feature extraction model 402 to obtain the second feature output by the second feature extraction model 402, inputs the first feature and the second feature into the second fusion model 407 to obtain the second fusion feature, inputs the second fusion feature into the third prediction model 408 to obtain the reference response value output by the third prediction model, and inputs the brightness and the reference response value into the second correction model 409 to obtain the ambient light adjustment amount output by the second correction model 409.
[0107] It is understandable that when at least one first information includes first display information and / or second display information, feature extraction can be performed on the first display information and / or the second display information to obtain the first feature and / or the second feature, and the corresponding reference response value can be determined based on the first feature and / or the second feature.
[0108] In method three, S202 determines the ambient light adjustment amount based on the brightness, the first display information and the second display information, including: determining at least one target brightness level corresponding to the brightness in at least two brightness levels, the response value of the ambient light sensor to the light emitted by the display screen displaying the same display content at different brightness levels is different; based on the at least one target brightness level, determining the ambient light adjustment amount corresponding to the first display information and the second display information.
[0109] In the third approach, in an embodiment of the present application, multiple brightness thresholds are selected from the brightness range that the display screen can display. The brightness thresholds can be uniformly or unevenly selected based on the brightness range, and the brightness thresholds selected from the brightness range constitute a brightness threshold set. Different brightness thresholds can be understood as different brightness levels, and the brightness threshold set can be understood as a brightness level set.
[0110] The electronic device determines at least one target brightness level corresponding to the current brightness of at least two brightness levels based on the current brightness and the brightness levels in the brightness level set. In one example, the current brightness corresponds to one target brightness level. In another example, the current brightness corresponds to at least two target brightness levels.
[0111] The electronic device determines an ambient light adjustment amount based on at least one target brightness level and the first display information and the second display information. The ambient light adjustment amount represents a response value of the ambient light sensor to light emitted when the display screen displays the first display information in the first area and the second display information in the second area at the current brightness.
[0112] For each target brightness level, the electronic device may determine a reference ambient light adjustment amount corresponding to each target brightness level based on the display information, and predict the ambient light adjustment amount based on the ambient light adjustment component.
[0113] For a target brightness level, the electronic device may determine an ambient light adjustment component corresponding to the target brightness level based on a fourth prediction model corresponding to the brightness level. The fourth prediction model used for different target brightness levels may be the same or different. Input parameters of the fourth prediction model may include: the first display information, the second display information, and the target brightness level.
[0114] In one example, the prediction models used for different target brightness levels are the same fourth prediction model. In this case, the input parameters of the fourth prediction model include: the target brightness level.
[0115] In one example, different fourth prediction models are used for different target brightness levels. In this case, input parameters of the fourth prediction model include: first display information and second display information.
[0116] Here, no direct correlation is established between the current brightness, the first display information, the second display information and the ambient light adjustment amount. Instead, multiple target brightness levels corresponding to the current brightness are determined, and the ambient light adjustment amount is determined based on the multiple target brightness levels, thereby accurately predicting the ambient light adjustment amount corresponding to the display screen.
[0117] Based on the number of target brightness levels, the determination of the ambient light adjustment amount includes the following two cases:
[0118] Case 1: at least one target brightness level includes a target brightness level;
[0119] Case 2: the at least one target brightness level includes at least two target brightness levels.
[0120] For case 1, determining the ambient light adjustment amount corresponding to the first display information and the second display information based on the at least one target brightness level includes: when the brightness corresponds to a target brightness level, determining the ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information; the ambient light adjustment component corresponding to the target brightness level is the ambient light adjustment amount corresponding to the first display information and the second display information.
[0121] Here, the electronic device directly determines the ambient light adjustment component corresponding to the target brightness level as the ambient light adjustment amount.
[0122] In one example, the current brightness is i', the brightness range is divided into 10 brightness levels, and the determined target brightness level is brightness level 4. Then, the reference ambient light adjustment component 1 is determined when the display screen displays the current display content at brightness level 4, and the electronic device determines the reference ambient light adjustment component 1 as the ambient light adjustment amount.
[0123] For situation 2, the implementation of determining the ambient light adjustment amount corresponding to the first display information and the second display information based on at least one target brightness level includes: when the brightness corresponds to at least two target brightness levels, for each target brightness level of the at least two target brightness levels, determining the ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information; and determining the ambient light adjustment amount based on the ambient light adjustment component corresponding to each target brightness level of the at least two target brightness levels.
[0124] The electronic device determines at least two target brightness levels corresponding to a current brightness among a plurality of brightness levels, and determines ambient light adjustment components corresponding to the different target brightness levels, wherein the ambient light adjustment components represent a response value of the display screen to an ambient light sensor based on the corresponding target brightness levels and light emitted by the current displayed content. After determining each ambient light adjustment component, the electronic device performs linear or nonlinear processing on the determined ambient light adjustment components to obtain a response value representing a response value of the display area to the ambient light sensor based on the current brightness and the current displayed content.
[0125] In one example, the current brightness is i', the brightness range is divided into 10 brightness levels, and the determined target brightness levels include brightness level 4 and brightness level 5. Then, the ambient light adjustment component 1 when the display screen displays the current display content at brightness level 4 and the ambient light adjustment component 2 when the display screen displays the current display content at brightness level 5 are determined. The electronic device determines the final ambient light adjustment component based on the ambient light adjustment component 1 and the ambient light adjustment component 2.
[0126] The ambient light detection method provided in the embodiment of the present application divides the display brightness into multiple different brightness levels, and determines the target brightness level corresponding to the current brightness. Based on the first display information and the second display information of the display screen, the response value of the ambient light sensor, i.e., the ambient light adjustment component, is determined when the display screen displays the current display content at different target brightness levels. Based on the determined multiple ambient light adjustment components, the response value of the ambient light sensor, i.e., the ambient light adjustment amount, is determined when the display screen displays the current display content at the current display brightness, thereby accurately predicting the response value of the ambient light sensor when the display screen displays the current display content at the current display brightness, thereby improving the detection accuracy of the ambient light sensor.
[0127] In some embodiments, determining at least one target brightness level corresponding to the brightness in at least two brightness levels includes: when the brightness is included in the at least two brightness levels, determining the brightness as the target brightness level; when the brightness is not included in the at least two brightness levels, determining at least two target brightness levels in at least two brightness levels based on the brightness difference between the brightness and each brightness level in the at least two brightness levels.
[0128] The number of target brightness levels determined by the electronic device is greater than or equal to one.
[0129] In the case that the brightness is included in the at least two brightness levels, and the brightness is one of the at least two brightness levels, the brightness is determined as the target brightness level. In this case, the number of the target brightness levels is 1.
[0130] If the brightness is not included in the at least two brightness levels, the electronic device may determine a brightness difference between the current brightness and each of the at least two brightness levels, and determine a target brightness level based on the determined brightness difference. The electronic device may determine the target brightness level based on a set number or a set brightness difference threshold.
[0131] Taking determining the target brightness level based on a set number as an example, the electronic device determines the brightness levels corresponding to the set number of smaller brightness difference values as the target brightness level.
[0132] In one example, the current brightness is i', and the brightness range is divided into 10 brightness levels: i1, i2, i3, to i 10 , the set number is 2, i' is between i4 and i5, then the determined target brightness level includes i4 and i5.
[0133] Taking determining the target brightness level based on a set brightness difference threshold as an example, the electronic device determines the brightness level corresponding to the brightness difference value that is set to be smaller than the brightness difference threshold as the target brightness level.
[0134] In one example, the current brightness is i', and the brightness range is divided into 10 brightness levels: i1, i2, i3, to i 10 , then, the brightness difference threshold is Δi, and the brightness difference between i3, i4, i5 and i' is less than Δi, then the determined target brightness levels include i3, i4, i5, and at this time, the number of target brightness levels is 3.
[0135] In an embodiment of the present application, the electronic device determines a value range of the display brightness of the display screen; determines a minimum value and a maximum value of the value range; and determines the at least two brightness levels at equal or unequal intervals from the value range based on the minimum value and the maximum value.
[0136] The electronic device determines at least two brightness levels based on the maximum and minimum values of the display brightness range of the display screen. The brightness range is 0 to 10,000 or 0 to 4,095. The brightness range that the display screen can display can be divided into N levels, with level 1 being the lowest display brightness and level N being the highest display brightness. The remaining brightness levels can be selected at equal or unequal intervals between the lowest and highest brightness levels. The number of brightness levels N can be set based on needs, such as 8 or 10.
[0137] In the embodiment of the present application, the value range of brightness and the size of the divided brightness level N can be set according to needs, and the embodiment of the present application does not limit this.
[0138] When the at least two brightness levels are determined at equal intervals from the value range based on the minimum value and the maximum value, the brightness intervals between different brightness levels are the same; when the at least two brightness levels are determined at unequal intervals from the value range based on the minimum value and the maximum value, the brightness intervals between different brightness levels are the same or different.
[0139] In some embodiments, determining the ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information includes: inputting the first display information and the second display information into a fourth prediction model corresponding to the target brightness level, obtaining the ambient light adjustment component corresponding to the target brightness level output by the fourth prediction model, and the fourth prediction model corresponding to the target brightness level is used to predict the response value of the ambient light sensor to the light emitted by the display screen based on the target brightness level.
[0140] In an embodiment of the present application, different brightness levels correspond to different fourth prediction models, and different fourth prediction models are used to predict the response of the ambient light sensor to the screen light emitted by the display screen based on the corresponding target brightness level.
[0141] When the fourth prediction model inputs the first display information and the second display information, the fourth prediction model is used to predict the response value of light emitted when the display screen displays the first display information in the first area and the second display information in the second area at the corresponding target brightness level based on the input first display information and the second display information.
[0142] In some embodiments, determining the ambient light adjustment amount based on the ambient light adjustment component corresponding to each of the at least two target brightness levels includes:
[0143] The ambient light adjustment amount is determined based on a relationship between the at least two target brightness levels and the at least two ambient light adjustment components, and the brightness.
[0144] In an embodiment of the present application, the electronic device may obtain an ambient light adjustment amount through linear or nonlinear interpolation based on a relationship between current brightness and at least two target brightness levels.
[0145] In an embodiment of the present application, a relationship between a target brightness level and an ambient light adjustment amount is established, and the brightness is then substituted into the relationship to obtain the ambient light adjustment amount. The relationship between the target brightness level and the ambient light adjustment amount can be obtained by fitting at least two target brightness levels and the ambient light adjustment component corresponding to each of the at least two target brightness levels.
[0146] In one example, a functional relationship is fitted based on at least two target brightness levels and the ambient light adjustment components corresponding to each of the at least two target brightness levels, the relationship between the target brightness levels and the ambient light adjustment components is represented based on the functional relationship, and the unknown parameter ambient light adjustment amount is determined by using brightness as a known parameter of the fitted function.
[0147] In an embodiment of the present application, the relationship between the target brightness level and the environmental adjustment component may be a linear relationship or a nonlinear relationship, wherein if the at least two target brightness levels include two target brightness levels, the relationship is a linear relationship. If the at least two target brightness levels include three or more target brightness levels, the relationship is a nonlinear relationship. In the case where the relationship between the target brightness level and the environmental adjustment component is a linear relationship, the ambient light adjustment amount is obtained by linear interpolation. In the case where the relationship between the target brightness level and the environmental adjustment component is a nonlinear relationship, the ambient light adjustment amount is obtained by nonlinear interpolation.
[0148] In the embodiment of the present application, a functional relationship between brightness level and ambient light adjustment amount is established based on multiple target brightness levels corresponding to the current brightness, and multiple ambient light adjustment components corresponding to the current display information at these target brightness levels. The current brightness is then substituted into the functional relationship to obtain a predicted ambient light adjustment amount. Because this functional relationship is established based on the ambient light adjustment amount for the current display information at these multiple target brightness levels, it can further improve the accuracy of the prediction of the ambient light adjustment amount for the current brightness under the current display information, thereby further improving the accuracy of the ambient light detection results of the ALS.
[0149] In the embodiment of the present application, the fourth prediction model corresponding to each brightness level in the multiple brightness levels can be trained by the electronic device itself, or obtained from other devices.
[0150] Below, the ambient light detection method provided in the embodiment of the present application is further described.
[0151] When the ALS is located under the OLED screen, in addition to receiving ambient light, the ALS will also be interfered with by the light from the OLED screen. It can be understood that the response value of the ALS under the screen is equal to the sum of the response value of the ambient light on the ALS and the response value of the screen light on the ALS. When the ambient light remains unchanged, when the content displayed on the screen is different, the screen light emission is different, and the detection value of the ALS is also different. In order to accurately detect the parameters of the ambient light, it is necessary to use an algorithm to estimate the response value of the screen light on the ALS, and subtract the response value of the screen light on the ALS from the detection value of the ALS to obtain the response value of the ambient light on the ALS, so as to predict the intensity of the ambient light and CCT based on the response value of the ambient light on the ALS, so as to assist the terminal device in adjusting the screen display brightness and hue, etc. Figure 5 Schematic diagram of the position information relationship between the ALS and the display screen. There is a cover glass 501 on the OLED 502, and the ALS 503 is located under the OLED 502. Figure 6 This is a schematic diagram of the ambient light passing through the OLED screen and the screen's self-luminescence superimposed on the incident ALS, as shown in Figure 6 As shown, ambient light 601 passes through OLED screen 502 and reaches ALS 503. Meanwhile, screen light 602 reaches ALS 503. Here, the screen light reaching the ALS is the light emitted from the back of the OLED screen. OLED screen 502 includes an opaque OLED backplane 5021, an OLED display panel 5022, and a pixel layer 5023, where pixels are arranged in the pixel layer.
[0152] OLED screens can self-luminesce. There is a very thin layer of organic material (the light-emitting layer) between the positive and negative electrodes. When electricity is supplied to an appropriate voltage, the positive electrode holes and the cathode charges will combine in the light-emitting layer to produce light. The color of the light depends on the type of organic molecules. Depending on their formula, they produce the three primary colors of red (R), green (G) and blue (B), which constitute the basic colors.
[0153] OLED screens display images composed of individual pixels, each of which is composed of three sub-pixels (RGB). Different colors are created by adjusting the voltage to control the sub-pixels to emit light at different brightness levels. Any combination of the three RGB colors creates the color of a pixel. Each RGB color has 256 levels of brightness (from 0 to 255), and the RGB brightness is also called grayscale.
[0154] The arrangement of pixels includes standard pixel arrangement, Figure 7 The Pentile arrangement (P arrangement for short) shown in Figure 8 In the standard pixel arrangement, each pixel consists of three closely adjacent red, green and blue sub-pixels arranged neatly. Figure 7In the Pentile arrangement 700 shown, each pixel is composed of red and green sub-pixels or blue and green sub-pixels, and the area of the red sub-pixels and blue sub-pixels is twice the area of the green sub-pixels. Pixel 701 is composed of blue sub-pixels and green sub-pixels, and pixel 702 is composed of red sub-pixels and green sub-pixels. Figure 8 In the diamond arrangement shown, each pixel is composed of half a red sub-pixel, half a blue sub-pixel and one green sub-pixel, wherein pixel 801 is composed of half a red sub-pixel, half a blue sub-pixel and one green sub-pixel.
[0155] In the related technology, the algorithms for determining the ambient light detected by ALS include three directions: a time domain-based method, a frequency domain-based method, and a screen display content-based method. Among them, the time domain-based method has very high requirements for hardware (the sensitivity of the display screen and ALS), the frequency domain-based method is easily affected by noise and ambient light, resulting in measurement accuracy that cannot meet the requirements, and the screen display content-based algorithm predicts the response value of the screen light on the ALS through the screen display image and display brightness in a certain area above the ALS (only the screen pixels in this area will emit light that will be incident on the ALS, hereinafter referred to as the specific area, i.e., the first area).
[0156] In the related art, the solution based on screen display content assumes that when the screen display grayscale value, i.e., the displayed color, is fixed, the response value of the screen light on the ASL (hereinafter referred to as the screen light leakage value) is linearly related to the screen brightness. When the screen display brightness is fixed, the screen light leakage value is linearly related to the screen grayscale value after gamma calibration. Therefore, by building a relationship model between the screen light leakage value and the brightness value and the grayscale value after gamma calibration and training the model parameters, it can be used to estimate the screen light leakage value. The established relationship model can be shown as formula (3):
[0157] rawDN=β1*bright+β2*gray γ +β3*bright*gray γ Formula (3);
[0158] Among them, rawDN is the screen light leakage value, bright is the brightness value, gray γ is the grayscale value after gamma calibration, and β1, β2, and β3 are model parameters. The grayscale values include: a first current grayscale value corresponding to red monochromatic light, a second current grayscale value corresponding to green monochromatic light, and a third current grayscale value corresponding to blue monochromatic light. The calibration coefficients include: a first calibration coefficient for performing gamma calibration on the first current grayscale value, a second calibration coefficient for performing gamma calibration on the second current grayscale value, and a third calibration coefficient for performing gamma calibration on the third current grayscale value.
[0159] The above-mentioned solution based on screen display content has the following technical problems:
[0160] Problem 1: Grayscale values are divided into R, G, and B values, and each of these values is calibrated using three fixed gamma coefficients. However, for R, G, or B, the gamma coefficients vary when the screen brightness is different, and when the R, G, or B values are different, the gamma coefficients also vary. Using fixed gamma coefficients reduces accuracy.
[0161] Problem 2: The grayscale values (R, G, B values) displayed on the screen will affect each other, but this solution does not take this into account;
[0162] Problem 3: The relationship between light leakage value, brightness, and grayscale value is fitted by a relationship model expressed as a linear polynomial. The relationship model is too simple and it is not easy to achieve good accuracy.
[0163] Problem 4: The display image within a specific area is considered a pure color image, without considering the situation when the pixels in the specific area have non-single grayscale values. This is not applicable to measurements in non-pure color scenes.
[0164] Question 5: It is believed that only the content in the specific area above the ALS in the display screen will affect the response value of the screen light on the ALS (screen light leakage value). Therefore, only the display content in the specific area is considered.
[0165] The ambient light detection method provided in the embodiments of the present application provides an under-screen ambient light detection method based on the screen display content, including but not limited to the following embodiments, which can accurately estimate the response value of the screen light on the ALS when the screen displays any picture content at any brightness, thereby improving the detection accuracy of the ambient light under the screen.
[0166] like Figure 9 As shown, 901 represents the ALS placed under the OLED screen. The light emitted by the screen pixels in the specific area 902 above it, that is, the first area, will be incident on the ALS to form a response value (screen light leakage value). The light emitted by the pixels in the background area 903 (the screen area outside the specific area 902), that is, the second area, will not be incident on the ALS. Assume that the size of the specific area 902 above the ALS is M*N (as shown in the figure). Figure 10Taking the 9*9 shown as an example, it includes pixels P11 to P99, where the pixels in the first area include: p54, p55 and p56), that is, M*N pixels, and each pixel contains three RGB sub-pixels. When the screen displays a picture, all pixels in the specific area 902 emit light and form a response value on the ALS. It can be understood that the screen light leakage value is equal to the accumulation of the response values of the light emitted by all pixels (M*N) in the specific area on the ALS. In addition, the screen leakage value C here can be a single value such as 1000, or it can be a vector of size 1*Q (for example: C = [100, 200, 400, 3000]). The dimension Q of the vector represents the number of channels of the ALS. Each channel has a different meaning, and the specific dimension is not limited.
[0167] When an image is displayed on the display screen, the following phenomena exist:
[0168] 1. When the screen displays the same image at different brightness levels, there is a linear relationship between the screen light leakage value C and the brightness value. The greater the brightness, the greater the light leakage value.
[0169] 2. When the screen brightness is fixed and the displayed image in the background area is fixed (for example, pure white, pure black, etc.), the light leakage value is different when the displayed image in a specific area is different, that is, the screen light leakage value C in the specific area is related to the displayed image Image0 in the specific area; there is a certain relationship between the response value formed by the light emission of a certain pixel in Image0 on the ALS and the color value of the pixel (including three components of R, G, and B, and the RGB value range can be 0-255). The larger the color value, the larger the response value; and it is found that when pixels at different positions in Image0, such as p11 and p55, display the same color value, their respective response values on the ALS are different. It is found that the closer the pixel is to the ALS, the larger the response value, and the farther the pixel is, the smaller the response value, that is, the response value of a single pixel is related to the pixel position coordinates (i, j); the grayscale value of the neighboring pixel will affect the pixel's luminous response value.
[0170] 3. When the screen brightness is fixed and the image displayed in a specific area is fixed, the light leakage value will also vary when the background image displayed is different. In other words, the image in the background area has an impact on the light leakage value, and the degree of influence can be as much as 40% or more. For example, the light leakage value is the largest when the background image is pure white, and the light leakage value is the smallest when it is pure black. Here, the reason why the background image affects the screen light leakage value is that when the screen displays the full-screen image Image, the image's color value is adjusted based on certain characteristics of the full-screen image (such as the full-image R, G, B mean, histogram distribution, etc.), resulting in the color value of the image displayed in the specific area image0 being changed.
[0171] Based on the above phenomenon, it can be determined that the screen light leakage value C is related to the screen display brightness, the display image Image0 of the specific area, and the full-screen image Image. That is, the model for predicting the screen light leakage value can be expressed as C = f(brightness, Image0, Image), where the brightness information brightness is a numerical value (for example, 1000), Image0 is the display image of the specific area, and the size is M*N*3. Assuming that the full-screen size is H*W, the size of Image is H*W*3. The three inputs are of different types (image data, numerical data) and sizes, and together affect the final screen light leakage value.
[0172] In the related art, only the influence of brightness and pictures (color values) in a specific area on the light leakage value is considered, and the influence of the full image information on the light leakage value is ignored, which reduces the accuracy of the predicted light leakage value; in addition, if each factor is modeled separately, for example, a relationship model between the picture and the light leakage value in a specific area is first established, and then a relationship model between the brightness value and the light leakage value is established, and then the models are connected in series to predict the screen leakage value, the disadvantage of the scheme is that multiple models need to be established, the modeling process is time-consuming, the number of model parameters and the amount of calculation are large, and the series connection method will lead to error accumulation and reduced accuracy; in addition, it is believed that each factor is independent of each other and has no influence. In practice, it is found that when the screen displays a bright picture in high brightness (such as a pure white picture), the actual brightness displayed on the screen will be lower than the set brightness value, that is, there is also a certain correlation between the brightness value and the full-screen picture, so it is necessary to combine and consider each factor comprehensively. The embodiment of the present application constructs a multimodal neural network structure through a multimodal fusion method, which can more accurately predict the screen leakage value.
[0173] The ambient light detection method provided in the embodiment of the present application can be implemented as follows:
[0174] 1. Build a sample data set.
[0175] In a scene without ambient light (for example, in a dark room), the mobile phone is controlled to display different random pictures with different brightness. The random pictures may include common scenes such as scenery, weather, office, movie, outdoor, etc., which may be pure color scenes or non-pure color scenes. The brightness can be evenly spaced or randomly selected between the lowest brightness and the highest brightness (for example, 0-4095). The corresponding display brightness value brightness, the image Image0 in the specific area, the full-screen image Image, and the ALS response value C are recorded in sequence to construct a training sample set, where a training sample includes the response value C and its corresponding brightness, Image0, and Image.
[0176] 2. Train the light leakage value prediction network based on the training samples.
[0177] Construct a multimodal network structure and use the sample data set constructed in step 1 to train the multimodal network structure to obtain the light leakage value prediction network, and save the network model and parameters.
[0178] In one example, the multimodal network structure can be as follows Figure 11 As shown, the input includes: brightness value brightness, full-screen image Image, specific area image Image0, Image is input to Convolutional Neural Network (CNN) 1, Image0 is input to CNN2, and CNN1 and CNN2 include multiple feature extraction layers, each feature extraction layer includes a convolution layer, an activation layer and a downsampling layer, and a fully connected layer is connected after the last feature extraction layer. Here, the output of CNN1 is the first feature, and the output of CNN2 is the second feature. The brightness value, the first feature output by CNN1, and the second feature output by CNN2 are input to the feature fusion network, and the first fused feature after the fusion of the brightness value, the first feature and the second feature is output, wherein the feature fusion network includes multiple fully connected layers. The first fused feature output by the feature fusion network is output to the output layer, wherein the output layer outputs the ambient light adjustment amount, i.e., the screen light leakage value C, based on the first fused feature.
[0179] 3. Determine the screen light leakage value based on the light leakage value prediction network.
[0180] The current screen display brightness, full-screen image, and specific area image are obtained and input into the light leakage value prediction network, which outputs the predicted screen light leakage value.
[0181] In actual use, under ambient light of any intensity and type, the screen displays any image at any brightness. The ALS can capture the response value M. Then, based on known information: screen brightness, full-screen display image, and image within a specific area, it inputs the trained light leakage value prediction network. The predicted screen light leakage value is O', and O' is subtracted from M. A = M - O' is the current ambient light response value on the ALS. As you can understand, O' and M are both vectors. Then, based on the pre-calibrated calculation formulas for brightness Lux and CCT, the ambient light Lux and CCT can be calculated based on A, which can be used to assist the mobile phone in adjusting display brightness, color rendering scheme, AWB and other applications.
[0182] Figure 11 It shows the general framework of the multimodal network structure. Figure 11The specific structure of the network is not limited. The full-screen image can be the currently displayed frame or the current frame and the collection of previous frames. In practical applications, the design of the network structure and the fusion method can be adjusted according to actual needs. Among them, the fusion methods of screen brightness, full-screen display image, and image display in a specific area include but are not limited to the following methods:
[0183] 1. Different convolutional neural networks (sub-network CNN1 and sub-network CNN2) can be designed separately to extract features f1 and f2 from the image Image0 of a specific area and the full-screen image Image. The extracted features can be one-dimensional or multi-dimensional. Features f1, f2 and brightness are fused. There is no limit on the fusion method (splicing, addition, multiplication and division). Then, a sub-network is designed based on the fused features to perform regression prediction on the screen light leakage value. There are no specific restrictions on the number of layers and network types of the sub-network, and they can be adjusted according to the image size, accuracy, etc.
[0184] Second, a model is first built based on the image Image0 in a specific area to predict the screen light leakage value O1'. Then, feature f1 (such as the full image mean, histogram distribution, etc.) is extracted based on the full-screen image Image. O1' is corrected by combining the brightness value and feature f1 to obtain the final predicted light leakage value O'.
[0185] 3. Different convolutional neural networks (sub-network CNN1 and sub-network CNN2) can be designed separately to extract features f1 and f2 from the image Image0 in the specific area and the full-screen image Image, fuse the features f1 and f2, and design a regression network based on the fused features to predict the preliminary light leakage value O2'; then, brightness information brightness is introduced to correct the preliminary light leakage value O2' to obtain the final predicted light leakage value O'. The correction method may include: calibrating the relationship between the light leakage value and the screen brightness in advance (which may be a linear relationship, a piecewise linear relationship, etc.), and correcting the predicted light leakage value O2' by looking up a table or formula.
[0186] Fourth, the displayable brightness is divided into 1 to N levels, where level 1 corresponds to the lowest display brightness, and level N corresponds to the highest display brightness. The remaining display brightnesses can be selected at equal intervals between the lowest brightness and the highest brightness, or can be selected in a non-equal interval manner. This is not limited here, and all brightnesses constitute a brightness set; for data collected at the same brightness, the input is the image Image0 in the specific area and the full-screen image Image, and the output is the ALS response value. As in Example 2, a multimodal network is designed and trained to predict light leakage values; N brightness levels correspond to N multimodal neural networks; then, according to the current display brightness i', two brightness levels i and i+1 can be found, where i is the maximum brightness level in the brightness set that is less than i^', and i+1 is the minimum brightness level in the set that is greater than i^'; using N multimodal network models, the ALS response values 0 corresponding to brightness levels i and i+1 can be predicted respectively. i ' and O (i+1) ', and then according to the relationship between the display brightness i' and the calibrated display brightness, O is obtained by linear or nonlinear interpolation. i` 'That is, the value of O'.
[0187] The ambient light detection method provided in the embodiments of the present application includes the following technical features:
[0188] 1) Use a model that is closer to the real phenomenon, rather than a simple linear model or lookup table to express the relationship between screen light leakage value and grayscale value;
[0189] 2) It takes into account the scenarios where the grayscale values of pixels in a specific area of the screen are different;
[0190] 3) The influence of the characteristics of full-screen display images (such as mean, color value, etc.) on the final display of the image in a specific area was analyzed. The designed network framework can fuse full-screen features, specific area features, and brightness information to predict screen light leakage values. The introduction of full-screen features can further improve the prediction accuracy of light leakage values.
[0191] 4) The relationship between various influencing factors (display brightness, full-screen image, and specific area image) is taken into account, and the designed model can take into account the influence of various factors, thereby improving the prediction accuracy.
[0192] In order to implement the above-mentioned ambient light detection method, the embodiment of the present application provides an ambient light detection device, such as Figure 12 As shown, the apparatus 1200 includes:
[0193] A first determining module 1201 is configured to determine the brightness of a display screen, first display information, and second display information, wherein the first display information represents display content in a first area of the display screen, and the second display information represents display content in a second area of the display screen, wherein the first area is an area of the display screen where light emitted from the display screen can enter the ambient light sensor, and the second area is an area of the display area of the display screen excluding the first area.
[0194] a second determining module 1202, configured to determine an ambient light adjustment amount based on the brightness, the first display information, and the second display information, wherein the ambient light adjustment amount represents a response value of the ambient light sensor to light emitted by the display screen;
[0195] The adjustment module 1203 is configured to adjust the detection value of the ambient light sensor according to the ambient light adjustment amount to obtain an ambient light intensity value.
[0196] In some embodiments, the second determining module 1202 is further configured to input the brightness, the first display information, and the second display information into the ambient light adjustment amount prediction model to obtain the ambient light adjustment amount output by the ambient light adjustment amount prediction model.
[0197] In some embodiments, the second determining module 1202 is further configured to:
[0198] The determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes:
[0199] performing feature extraction on the first display information and the second display information respectively to obtain a first feature and a second feature;
[0200] Fusing the first feature, the second feature, and the brightness to obtain a first fused feature;
[0201] The ambient light adjustment amount is determined based on the first fusion feature.
[0202] In some embodiments, the second determining module 1202 is further configured to:
[0203] determining a reference response value according to at least one item of first information, wherein the at least one item of first information includes the brightness, the first display information, and part of the second display information;
[0204] The reference response value is corrected according to at least one second information to obtain the ambient light adjustment amount, wherein the at least one second information includes information of the brightness, the first display information, and the second display information other than the at least one first information.
[0205] In some embodiments, the second determination module 1202 is further used to: if the at least one first information includes: the first display information, and the at least one second information includes: the brightness and the second display information, perform feature extraction on the second display information to obtain the second feature; and correct the reference response value based on the brightness and the second feature to obtain the ambient light adjustment amount.
[0206] In some embodiments, the second determining module 1202 is further configured to:
[0207] If the at least one first information includes: the first display information and the second display information, feature extraction is performed on the first display information and the second display information respectively to obtain a first feature and a second feature; the first feature and the second feature are fused to obtain a second fused feature; and the reference response value is determined based on the second fused feature.
[0208] In some embodiments, the second determining module 1202 is further configured to:
[0209] determining at least one target brightness level corresponding to the brightness of at least two brightness levels, wherein response values of an ambient light sensor to light emitted by the display screen displaying the same display content at different brightness levels are different;
[0210] Based on the at least one target brightness level, an ambient light adjustment amount corresponding to the first display information and the second display information is determined.
[0211] In some embodiments, the second determining module 1202 is further configured to:
[0212] determining each brightness level of the at least two brightness levels;
[0213] In a case where the brightness is included in the at least two brightness levels, determining the brightness as the target brightness level;
[0214] When the brightness is not included in the at least two brightness levels, at least two target brightness levels of the at least two brightness levels are determined based on a brightness difference between the brightness and each brightness level of the at least two brightness levels.
[0215] In some embodiments, the second determining module 1202 is further configured to:
[0216] In a case where the brightness corresponds to at least two target brightness levels, determining, for each of the at least two target brightness levels, an ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information;
[0217] The ambient light adjustment amount is determined based on the ambient light adjustment component corresponding to each of the at least two target brightness levels.
[0218] In some embodiments, the second determining module 1202 is further configured to:
[0219] The first display information and the second display information are input into a fourth prediction model corresponding to the target brightness level to obtain an ambient light adjustment component corresponding to the target brightness level output by the fourth prediction model. The fourth prediction model corresponding to the target brightness level is used to predict the response value of the ambient light sensor to the light emitted by the display screen based on the target brightness level.
[0220] In some embodiments, the apparatus 1200 further includes a training module configured to:
[0221] Determining a sample data set for the display screen in a scene without ambient light, the sample data set comprising at least two groups of training samples and labels corresponding to each group of training samples, wherein one group of training samples comprises: a reference brightness, first reference display information, and second reference display information; if the first area displays display content represented by the first reference display information, then the second area displays display content represented by the second reference display information; and the labels corresponding to the training samples are response values of the ambient light sensor to light emitted by the display screen using the training samples;
[0222] The prediction model is trained based on the sample data set.
[0223] It should be noted that the various logic units included in the ambient light detection device provided in the embodiment of the present application can be implemented by a processor in an electronic device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0224] The description of the above system embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the system embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0225] It should be noted that, in the embodiment of the present application, if the above-mentioned ambient light detection method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0226] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned ambient light detection method when executing the computer program.
[0227] Correspondingly, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the ambient light detection method provided in the above embodiment is implemented.
[0228] It should be noted that the description of the above storage medium embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0229] It should be noted that Figure 13 This is a hardware entity diagram of an electronic device according to an embodiment of the present application, such as Figure 13 As shown, the electronic device 1300 includes: a processor 1301, at least one communication bus 1302, at least one external communication interface 1304 and a memory 1305. The communication bus 1302 is configured to implement connection and communication between these components. In one example, the electronic device 1300 also includes: a user interface 1303, wherein the user interface 1303 may include a display screen, and the external communication interface 1304 may include a standard wired interface and a wireless interface. The electronic device provided in the embodiment of the present application also includes an ambient light sensor, which is capable of detecting the intensity of received light.
[0230] The memory 1305 is configured to store instructions and applications executable by the processor 1301, and can also cache data to be processed or processed by the processor 1301 and various modules in the electronic device (for example, image data, audio data, and communication data), which can be implemented through flash memory (FLASH) or random access memory (RAM).
[0231] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, “in one embodiment” or “in some embodiments” appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0232] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0233] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0234] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0235] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0236] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0237] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0238] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for detecting ambient light, characterized in that: Applied to electronic equipment, the method includes: determining the brightness of the display screen, first display information, and second display information, wherein the first display information represents display content in a first area of the display screen, and the second display information represents display content in a second area of the display screen, the first area being an area of the display screen where light emitted from the display screen can be incident on an ambient light sensor, and the second area being an area of the display area of the display screen excluding the first area; determining an ambient light adjustment amount based on the brightness, the first display information, and the second display information, the ambient light adjustment amount representing a response value of the ambient light sensor to light emitted by the display screen; The detection value of the ambient light sensor is adjusted according to the ambient light adjustment amount to obtain an ambient light intensity value.
2. The method according to claim 1, characterized in that The electronic device includes an ambient light adjustment amount prediction model, and determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes: The brightness, the first display information, and the second display information are input into the ambient light adjustment amount prediction model to obtain the ambient light adjustment amount output by the ambient light adjustment amount prediction model.
3. The method according to claim 1 or 2, characterized in that The determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes: performing feature extraction on the first display information and the second display information respectively to obtain a first feature and a second feature; Fusing the first feature, the second feature, and the brightness to obtain a first fused feature; The ambient light adjustment amount is determined based on the first fusion feature.
4. The method according to claim 1 or 2, characterized in that The determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes: determining a reference response value according to at least one item of first information, wherein the at least one item of first information includes the brightness, the first display information, and part of the second display information; The reference response value is corrected according to at least one second information to obtain the ambient light adjustment amount, wherein the at least one second information includes information of the brightness, the first display information, and the second display information other than the at least one first information.
5. The method according to claim 4, characterized in that The at least one first information includes the first display information, the at least one second information includes the brightness and the second display information, and the correcting the reference response value according to the at least one second information to obtain the ambient light adjustment amount includes: performing feature extraction on the second display information to obtain a second feature; The reference response value is corrected based on the brightness and the second characteristic to obtain the ambient light adjustment amount.
6. The method according to claim 4, characterized in that The at least one first information includes: the first display information and the second display information; the at least one second information includes: the brightness; and determining the reference response value according to the at least one first information includes: performing feature extraction on the first display information and the second display information respectively to obtain a first feature and a second feature; Fusing the first feature and the second feature to obtain a second fused feature; The reference response value is determined based on the second fused feature.
7. The method according to claim 1 or 2, characterized in that The determining the ambient light adjustment amount based on the brightness, the first display information, and the second display information includes: determining at least one target brightness level corresponding to the brightness of at least two brightness levels, wherein the ambient light sensor has different response values to light emitted by the display screen displaying the same display content at different brightness levels; Based on the at least one target brightness level, an ambient light adjustment amount corresponding to the first display information and the second display information is determined.
8. The method according to claim 7, characterized in that The determining of at least one target brightness level corresponding to the brightness of the at least two brightness levels includes: In a case where the brightness is included in the at least two brightness levels, determining the brightness as the target brightness level; When the brightness is not included in the at least two brightness levels, at least two target brightness levels of the at least two brightness levels are determined based on a brightness difference between the brightness and each brightness level of the at least two brightness levels.
9. The method according to claim 7, characterized in that The determining, based on the at least one target brightness level, the ambient light adjustment amounts corresponding to the first display information and the second display information includes: In a case where the brightness corresponds to at least two target brightness levels, determining, for each of the at least two target brightness levels, an ambient light adjustment component corresponding to the target brightness level based on the first display information and the second display information; The ambient light adjustment amount is determined based on the ambient light adjustment component corresponding to each of the at least two target brightness levels.
10. The method according to claim 9, characterized in that The determining, based on the first display information and the second display information, an ambient light adjustment component corresponding to the target brightness level includes: The first display information and the second display information are input into a fourth prediction model corresponding to the target brightness level to obtain an ambient light adjustment component corresponding to the target brightness level output by the fourth prediction model. The fourth prediction model corresponding to the target brightness level predicts a response value of the ambient light sensor to the light emitted by the display screen based on the target brightness level.
11. The method according to claim 2, characterized in that The method further comprises: Determining a sample data set for the display screen in a scene without ambient light, the sample data set comprising at least two groups of training samples and labels corresponding to each group of training samples, wherein one group of training samples comprises: a reference brightness, first reference display information, and second reference display information; if the first area displays display content represented by the first reference display information, then the second area displays display content represented by the second reference display information; and the labels corresponding to the training samples are response values of the ambient light sensor to light emitted by the display screen using the training samples; The prediction model is trained based on the sample data set.
12. An ambient light detection device, characterized in that: Applied to electronic equipment, the device comprises: a first determining module, configured to determine the brightness of a display screen, first display information, and second display information, wherein the first display information represents display content in a first area of the display screen, and the second display information represents display content in a second area of the display screen, the first area being an area of the display screen where light emitted from the display screen can enter the ambient light sensor, and the second area being an area of the display screen other than the first area; a second determining module, configured to determine an ambient light adjustment amount based on the brightness, the first display information, and the second display information, wherein the ambient light adjustment amount represents a response value of the ambient light sensor to light emitted by the display screen; The adjustment module is configured to adjust the detection value of the ambient light sensor according to the ambient light adjustment amount to obtain an ambient light intensity value.
13. An electronic device, characterized in that: The electronic device includes a memory, a processor, at least one vibration component, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the ambient light detection method according to any one of claims 1 to 11 are implemented.
14. A storage medium storing an executable program, characterized in that: When the executable program is executed by a processor, the ambient light detection method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Ambient light detection method, proximity detection method, photographing method, and terminal
CN110809878A
Ambient light brightness determining method and device, terminal and storage medium
CN111210792A