WO2021213016A1 - 环境光检测方法、装置、电子设备及存储介质 - Google Patents

环境光检测方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021213016A1
WO2021213016A1 PCT/CN2021/078920 CN2021078920W WO2021213016A1 WO 2021213016 A1 WO2021213016 A1 WO 2021213016A1 CN 2021078920 W CN2021078920 W CN 2021078920W WO 2021213016 A1 WO2021213016 A1 WO 2021213016A1
Authority
WO
WIPO (PCT)
Prior art keywords
light intensity
intensity value
ambient light
display screen
detected
Prior art date
Application number
PCT/CN2021/078920
Other languages
English (en)
French (fr)
Inventor
贾勇
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021213016A1 publication Critical patent/WO2021213016A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • G01J1/42Photometry, e.g. photographic exposure meter using electric radiation detectors
    • G01J1/4204Photometry, e.g. photographic exposure meter using electric radiation detectors with determination of ambient light

Definitions

  • This application relates to the technical field of electronic equipment, and more specifically, to an ambient light detection method, device, electronic equipment, and storage medium.
  • the screen-to-body ratio of electronic devices is increasing, which brings higher requirements on hardware and structural technology.
  • the existing electronic equipment has a light sensor set above the screen to detect the intensity of the ambient light, so as to adjust the brightness of the display screen of the electronic equipment.
  • the screen-to-body ratio increases and the space outside the screen decreases, how to increase the screen-to-body ratio without affecting ambient light detection has become an urgent problem to be solved.
  • this application proposes an ambient light detection method, device, electronic equipment, and storage medium.
  • an embodiment of the present application provides an ambient light detection method.
  • the method includes: acquiring a detection light intensity value detected by a light sensor, wherein the light sensor is located below the display screen, and the detection light There is at least one detection value corresponding to a target area in the intensity value, and the target area is an area where some pixels of the display screen do not emit light during the refresh process; Fourier transform is performed on the time domain information of the detected light intensity value , Obtain the frequency domain information corresponding to the detected light intensity value; perform light intensity compensation on the detected light intensity value according to the frequency domain information; determine the ambient light intensity value according to the compensated detected light intensity value.
  • an embodiment of the present application provides an ambient light detection device, the device includes: a data acquisition module for acquiring the detected light intensity value detected by the light sensor, wherein the light sensor is located on the display screen Below, there is at least one detection value corresponding to a target area in the detected light intensity value, and the target area is an area where some pixels of the display screen do not emit light during the refresh process; a frequency domain conversion module is used to The time domain information of the detected light intensity value is Fourier transformed to obtain the frequency domain information corresponding to the detected light intensity value; a data compensation module is used to perform light intensity on the detected light intensity value according to the frequency domain information Compensation; The result determination module is used to determine the ambient light intensity value according to the compensated detected light intensity value.
  • an embodiment of the present application provides an electronic device, including: a display screen; a light sensor located below the display screen; one or more processors; a memory; one or more applications Program, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute the above-mentioned first aspect Ambient light detection method.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the environment provided in the first aspect. Light detection method.
  • Fig. 1 shows a schematic cross-sectional view of ambient light detection in the prior art.
  • Fig. 2 shows a flowchart of an ambient light detection method according to an embodiment of the present application.
  • Fig. 3 shows a schematic diagram of an ambient light detection method provided by an embodiment of the present application.
  • FIG. 4 shows another schematic diagram of the ambient light detection method provided by an embodiment of the present application.
  • FIG. 5 shows another schematic diagram of the ambient light detection method provided by an embodiment of the present application.
  • FIG. 6 shows still another schematic diagram of the ambient light detection method provided by an embodiment of the present application.
  • Fig. 7 shows a flow chart of an ambient light detection method according to another embodiment of the present application.
  • Fig. 8 shows another flowchart of an ambient light detection method according to another embodiment of the present application.
  • Fig. 9 shows still another flow chart of the ambient light detection method according to another embodiment of the present application.
  • Fig. 10 shows still another flowchart of the ambient light detection method according to another embodiment of the present application.
  • Fig. 11 shows still another flow chart of the ambient light detection method according to another embodiment of the present application.
  • Fig. 12 shows a flow chart of an ambient light detection method according to another embodiment of the present application.
  • FIG. 13 shows a schematic diagram of the overall flow of an ambient light detection method provided according to an embodiment of the present application.
  • Fig. 14 shows a block diagram of an ambient light detection device according to an embodiment of the present application.
  • FIG. 15 is a block diagram of an electronic device for executing the ambient light detection method according to the embodiment of the present application according to an embodiment of the present application.
  • FIG. 16 is a schematic cross-sectional view of an electronic device used to execute the ambient light detection method according to an embodiment of the present application according to an embodiment of the present application.
  • Fig. 17 is a storage unit for storing or carrying program codes for realizing the ambient light detection method according to the embodiment of the present application according to an embodiment of the present application.
  • the light sensor may be arranged below the display screen.
  • the display screen will emit light during the display process, at this time, a part of the light will leak to the light sensor. Therefore, the light received by the light sensor disposed under the display screen is the sum of the external ambient light and the light leakage of the display screen, that is, the detected light intensity is the light intensity of the ambient light superimposed on the display screen.
  • the light leakage of the screen is usually calculated by obtaining the information of the display screen, and then the reported value of the light sensor is used to subtract the light leakage of the screen to obtain the ambient light.
  • this method needs to obtain display screen information, and is currently mainly implemented through a screen refresh processing layer (surfaceflinger). Under heavy load conditions, such as playing games, it will cause the screen to freeze.
  • the light guide rod 105 (usually made of transparent plastic, whose top is directly on the cover 101 or the external environment) penetrating the display screen can be used to avoid the interference of the display light emission, so that the environment After the light enters the light sensing device 104 through the light guide rod, the light sensing device 104 can detect the accurate ambient light intensity.
  • the setting of the light guide requires a certain cover space, which increases the width of the black border and cannot achieve a full-screen design of the display screen.
  • the inventor has discovered and proposed the ambient light detection method, device, electronic device, and storage medium provided by the embodiments of the present application.
  • the light sensor When the light sensor is located under the display screen, it can be detected by the light sensor.
  • the frequency domain information corresponding to the light intensity value is used to compensate for the light leakage of the screen to obtain a more accurate ambient light intensity value, which can reduce the influence of the brightness of the screen light source on the ambient light detection, improve the accuracy of the ambient light detection, and is beneficial to electronic equipment Full screen design.
  • the specific ambient light detection method will be described in detail in the subsequent embodiments.
  • FIG. 2 shows a schematic flowchart of an ambient light detection method provided by an embodiment of the present application.
  • the ambient light detection method can be applied to the ambient light detection device 700 as shown in FIG. 8 and the electronic equipment equipped with the ambient light detection device 700 (FIG. 10, FIG. 11). The following will elaborate on the process shown in Figure 2.
  • the ambient light detection method shown may specifically include the following steps:
  • Step S110 Obtain the detected light intensity value detected by the light sensor, where the light sensor is located below the display screen, and there is at least one detection value corresponding to a target area in the detected light intensity value, and the target area is The area where some pixels do not emit light during the refresh process of the display screen.
  • the electronic device may obtain the detected light intensity value detected by the light sensor to determine the current ambient light intensity according to the detected light intensity value.
  • there is at least one detection value corresponding to a target area in the detected light intensity value and the target area is an area where some pixels do not emit light during the refresh process of the display screen.
  • the light sensor can be used to collect light for light intensity detection, and it can be an ambient light sensor, which can be implemented by phototransistors, photoresistors, or photodiodes.
  • the light sensor can be arranged under the display screen of the electronic device to increase the screen-to-body ratio of the electronic device.
  • the position of the light sensor may correspond to the display area of the display screen.
  • the display screen needs to be constantly refreshed when displaying images to ensure the update and display quality of the images.
  • you use a high-speed camera or shorten the exposure time of the camera to take a picture of the display screen of an electronic device you can see that there are some areas of pixels that do not emit light (also called black bars) during the refresh process of the display screen, and The non-luminous area will move with the refresh.
  • the non-luminous area is the aforementioned target area.
  • the area 141 filled with diagonal lines in the display screen 140 is an area where the display screen does not currently emit light.
  • the display screen of the target area is black, and the black does not leak light. If the light sensor performs light sensing detection on the target area, the detected light intensity value obtained can be interference-free data, that is, the ambient light intensity value that is basically not affected by the light emission of the display screen. If the light sensing detection is performed on other areas other than the target area, since the other areas are light-emitting areas, there is interference from the light intensity of the display screen.
  • the detected light intensity value obtained by the light sensor is the value of the light leakage intensity of the display screen.
  • the sum of the intensity value of the ambient light is the interference data.
  • the integration period detected by the light sensor can be adjusted, so that there can be at least one detection value corresponding to the target area in the detected light intensity value obtained by the light sensor, that is, there is at least one non-interference The ambient light intensity value, so that a more accurate ambient light intensity value can be obtained according to the acquired detection light intensity value later.
  • Step S120 Perform Fourier transform on the time domain information of the detected light intensity value to obtain frequency domain information corresponding to the detected light intensity value.
  • the electronic device may perform Fourier transform on the time domain information of the detected light intensity value detected by the light sensor to obtain the frequency domain information corresponding to the detected light intensity value, so as to be based on the frequency domain information Obtain a more accurate ambient light intensity value. Not only can make full use of all captured data, but also improve the accuracy of ambient light detection.
  • the value of the interference data is usually greater than the non-interference data.
  • the time-domain waveform of the detection light intensity value may have a low point, so that an effective Fourier transform can be performed.
  • the integrated value curve of the light sensor may be as shown in FIG. 4, with the horizontal axis as time and the vertical axis as the detected light intensity value. It can be seen that most of the time the light intensity value is large, and only when the light intensity value is small, the light intensity value becomes smaller, the high time is about 16.57ms, the low time is only about 90us, and the curve has periodicity. Among them, the low is the non-interference ambient light value, and the high is the sum of the ambient light and the light leakage of the display screen.
  • the frequency point intensity of the corresponding frequency point can be obtained, and the frequency point intensity can be used to characterize the influence of light leakage of the display screen under the current display screen.
  • the intensity of different frequency points represents the amount of screen light leakage of the display screen under different display screens. Among them, when the display screen is a white screen, the intensity of this frequency point is the highest, that is, the amount of light leakage influence of the display screen is the largest, and when the display screen is a black screen, there is no intensity of this frequency point, that is, the amount of light leakage influence of the display screen is 0.
  • Fig. 5 shows a schematic diagram of a time-domain waveform of the detected light intensity value. It can be seen that the waveform has obvious periodic characteristics, and its period is the refresh period of the display screen.
  • the frequency domain waveform obtained after Fourier transform is shown in Figure 6, and it can be seen that the frequency domain waveform has obvious frequency point intensity. The intensity of this frequency point represents the influence of the screen light leakage under the white screen.
  • Step S130 Perform light intensity compensation on the detected light intensity value according to the frequency domain information.
  • the electronic device can perform light intensity compensation on the detected light intensity value detected by the light sensor to remove the interference of light leakage from the screen and obtain a more accurate ambient light intensity.
  • the compensation difference to be compensated can be determined according to the amount of light leakage, so as to reduce the amount of screen light leakage to a minimum. . Then the detected light intensity value is compensated according to the compensation difference, so that an effective ambient light value can be obtained. As a way, the corresponding relationship between the frequency point intensity and the compensation difference value can be established in advance, so that when the current frequency point intensity is obtained, the corresponding compensation difference value can be found for compensation according to the corresponding relationship.
  • Step S140 Determine the ambient light intensity value according to the compensated detected light intensity value.
  • the electronic device after the electronic device obtains the compensated detection light intensity value, it can determine the current ambient light intensity value according to the compensated detection light intensity value.
  • the electronic device After the electronic device obtains the compensated detection light intensity value, it can determine the current ambient light intensity value according to the compensated detection light intensity value.
  • all the detected light intensity values captured by the light sensor are fully utilized, and a more accurate ambient light intensity is obtained, thereby avoiding the waste of data.
  • the electronic device may use the compensated detected light intensity value as the current ambient light intensity value. It is also possible to perform data fusion and smoothing processing on the multiple compensated detected light intensity values, and the obtained detected light intensity value is used as the current ambient light intensity value. Among them, the number of data required for data fusion and smoothing processing is not limited here, and can be set reasonably according to actual needs.
  • the electronic device may report the ambient light intensity value in real time, or may report the ambient light intensity value every specified time. As a way, the electronic device may use the compensated detection light intensity value obtained within a specified time as the current ambient light intensity value, and then select a specified number of the current ambient light intensity values for reporting. It is worth noting that the selection can be random selection or selection based on fluctuations of the data before and after. The specific selection method is not limited here. Among them, the selection is based on the fluctuation of the data before and after, it can be understood that when a compensated ambient light intensity value is selected and reported, if the subsequently compensated ambient light intensity value is still the same value, it will not be reported until there is a different value.
  • the current ambient light intensity value when the current ambient light intensity value is selected for reporting, it can be judged whether the current ambient light intensity value is consistent with the previous ambient light intensity value. If the current ambient light intensity value is the same as the previous ambient light intensity value When they are inconsistent, the current ambient light intensity value can be reported. In addition, if the current ambient light intensity value is consistent with the previous ambient light intensity value, the reporting of the current ambient light intensity value can be cancelled. In this way, only useful data is reported, avoiding the reporting of a large amount of meaningless data. As another way, multiple compensated detected light intensity values after data fusion and smoothing can be reported as the current ambient light intensity value. The reporting method can also be reported by random selection or according to the fluctuations of the data before and after. Choose to escalate.
  • the electronic device can adjust the brightness of the display screen according to the ambient light intensity, which improves the user's visual experience.
  • the detected light intensity value detected by the light sensor is obtained to Fourier the time domain information of the detected light intensity value.
  • Leaf transform to obtain the frequency domain information corresponding to the detected light intensity value.
  • there is at least one detection value corresponding to the target area in the detected light intensity value and the target area is an area where some pixels do not emit light during the refresh process of the display screen.
  • light intensity compensation can be performed on the detected light intensity value to reduce the interference of the screen light emission, and finally, according to the compensated detected light intensity value, a more accurate ambient light intensity value can be obtained.
  • the impact of the brightness of the screen light source on the ambient light detection can be reduced, so that when the light sensor is placed under the display screen, there is no need to set a light guide column, and it can Realize accurate detection of ambient light intensity.
  • FIG. 7 shows a schematic flowchart of an ambient light detection method provided by another embodiment of the present application.
  • the following will elaborate on the process shown in FIG. 7, and the ambient light detection method shown may specifically include the following steps:
  • Step S210 Obtain the detected light intensity value detected by the light sensor, where the light sensor is located below the display screen, and there is at least one detection value corresponding to a target area in the detected light intensity value, and the target area is The area where some pixels do not emit light during the refresh process of the display screen.
  • step S210 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the integration period of the light sensor may be set.
  • the integration period of the light sensor may refer to the integration time required to obtain a light intensity value.
  • the integration period of the light sensor can be set to be less than half of the time width corresponding to the target area (black bar) to ensure that the light sensor can be refreshed in the target area (black bar). Accurately capture the ambient light intensity value without interference.
  • the ambient light detection method of the present application may further include:
  • Step S202a Obtain a target area in the display screen, where the target area is an area where some pixels do not emit light during the refresh process of the display screen.
  • Step S204a Determine the first time width corresponding to the target area in the refresh period of the display screen.
  • a high-speed camera can be used or the exposure time of the camera can be shortened to take photos and videos on the display screen, so that a target area where some pixels in the display screen do not emit light can be obtained. Then, the time corresponding to the pixel width of the target area (black bar) can be converted by the screen recording time of the camera to obtain the first time width corresponding to the target area in one refresh cycle of the display screen.
  • the ratio of the pixel width of the target area to the pixel width of the display screen can be determined, and further, according to the refresh period and ratio of the display screen, the first time corresponding to the target area in the refresh period of the display screen is determined width.
  • the time to refresh the display screen is about 16.6ms (that is, the refresh cycle).
  • the pixel width of the black bar can be calculated with the entire display screen.
  • the ratio of the pixel width to the first time width corresponding to the pixel width of the black bar such as 180us.
  • the above method of acquiring the target area is only an example, and there is no specific limitation here.
  • Step S206a Obtain a first integration period of light intensity measurement based on the first time width, where the first integration period is less than half of the first time width.
  • Step S208a Control the light sensor to start light intensity detection with the first integration period.
  • the integration period of the light sensor for light intensity measurement can be set to be less than half of the first time width of the target area to move to the light sensor in the target area.
  • the light sensor can perform light detection, so that the light sensor can detect at least one non-interference ambient light intensity value. In this way, the sensor itself is used to detect the light under the screen, and the ambient light brightness is obtained by integrating the black bars refreshed on the screen.
  • the electronic device when the display screen is in the DC mode (low-brightness no flicker eye-protection mode), the electronic device can control the light sensor to start the light intensity detection with the above-mentioned first integration period.
  • the sensitivity (sensitivity) of the light sensor can be very high when the light sensor value is obtained using the above-mentioned calculation and integration method, so as to be able to output the light sensor value in a very short integration time, and the ADC of the light sensor ( Analog-to-Digital Converter)
  • the output value relative to the LUX value of ambient light should be greater than 1 times to ensure the accuracy of ambient light detection.
  • high-sensitivity light sensing devices can be used for light sensing detection, which can not only analyze the brightness of the ambient light for backlight adjustment, but also identify the jitter amplitude of the ambient light, so as to obtain the strobe of the ambient light for use in the camera Uneven removal of photos taken (in the indoor ambient light has a certain screen flicker), because the camera exposure is progressive exposure, there will be black and white horizontal stripes.
  • the display screen when it has a refresh synchronization signal, it can be synchronized to the light sensor end, so that the refresh synchronization can be used to control the start of integration.
  • the light sensing device usually includes an interrupt signal, I2C, gnd, and a Sync synchronization signal can be added here.
  • the Sync synchronization signal needs to be connected to the synchronization signal of the display, so that when the display is refreshed, a synchronization signal can be sent to the light sensor, and the light sensor is integrated to obtain the ambient light value. Therefore, it is avoided that more invalid data is caused by integration during the time when the black bars are not refreshed.
  • the ambient light detection method of the present application may further include:
  • Step S202b Obtain a second time width during which the display screen is in the off-screen state in one PWM period.
  • the display screen when the display screen is in the PWM dimming mode, in a PWM (Pulse Width Modulation, pulse width modulation) cycle, there will be a part of the time in the on-screen state and part of the time in the off-screen state, which is through the on The switch of screen and off screen realizes the function of darker brightness seen by human eyes. Since the display screen will not emit light when the display screen is in the off-screen state, therefore, in some embodiments, when the display screen is in the PWM dimming mode, the time width corresponding to the target area (black bar) can also be a PWM period The time width of the screen in the off-screen state.
  • PWM Pulse Width Modulation, pulse width modulation
  • the screen flicker frequency in the PWM dimming mode may be 240hz.
  • the target area may be refreshed at a rate of 240HZ.
  • the time width during which the display is in the off-screen state is about 3.7ms.
  • the time width of the target area is 3ms at low brightness 10nit, that is, in the PWM dimming mode, the width of the target area in the display screen is wider, and the light sensor can easily integrate and obtain the accurate ambient light intensity value.
  • the second time width during which the display screen is in the off-screen state in one PWM period is related to the brightness of the display screen. The darker the current brightness of the display screen is, the longer the display screen is in the off-screen state within a PWM period, that is, the longer the time width corresponding to the target area; the brighter the current brightness of the display screen, it indicates that the display screen is off-screen in a PWM period The shorter the state, the shorter the time width corresponding to the target area.
  • the light sensor detects less interference data of the light intensity value.
  • the time width corresponding to the target area is shorter, the light sensor detects the light intensity. The more disturbing data the value is.
  • Step S204b Obtain a second integration period of the light intensity measurement based on the second time width, wherein the second integration period is less than half of the second time width.
  • Step S206b Control the light sensor to start light intensity detection with the second integration period.
  • the integration period of the light sensor for light intensity measurement can be set to be less than half of the second time width of the target area, so that when the target area moves to the detection range of the light sensor, the light sensor can Perform light sensing detection, so that the light sensing sensor can detect at least one undisturbed ambient light intensity value.
  • the ambient light detection method of the present application may further include:
  • Step S200 Determine whether it is currently in the PWM dimming mode.
  • the light sensor when the display screen is currently in the PWM dimming mode, the light sensor can be controlled to start the light intensity detection in the above-mentioned second integration period, that is, step S202b to step S206b are executed.
  • the light sensor can be controlled to start the light intensity detection in the above-mentioned first integration period, that is, step S202a to step S208a are executed.
  • the ambient light detection method of the present application may further include:
  • Step S201 Determine whether the brightness of the current display screen is greater than the preset brightness.
  • the PWM dimming mode is used when the brightness of the display is dark, and because the brightness of the display is higher, the time width corresponding to the target area is shorter, until it disappears, causing the light sensor to fail to detect the environment effectively
  • the light intensity value therefore, in some embodiments, the electronic device can determine whether the current brightness of the display screen is greater than the preset brightness.
  • step S202a to step S202a ⁇ are executed.
  • step S208a If the brightness is less than or equal to the preset brightness, the current light sensor is very suitable for detection in the second integration period, and the light sensor can be controlled to start the light intensity detection in the second integration period, that is, step S202b ⁇ Step S206b.
  • Step S220 Perform Fourier transform on the time domain information of the detected light intensity value to obtain frequency domain information corresponding to the detected light intensity value.
  • step S220 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the time domain information of the detected light intensity value may be subjected to fast Fourier transform (fast Fourier transform, FFT) to increase the calculation speed.
  • fast Fourier transform fast Fourier transform
  • DFT Discrete Fourier Transform
  • the light sensor can continuously report data streams, and these data streams can enter a data queue.
  • the data queue can be set to comply with the sample book requirements of FFT. For example, the queue length can be set to 1024.
  • the data in the data queue can be continuously Fourier transformed to calculate the frequency information. Subsequent compensation processing, when the data is out of the queue, the data out of the queue can be discarded.
  • Step S230 Determine the compensation value corresponding to the frequency domain information according to the preset correspondence between the frequency domain information and the compensation value.
  • the corresponding relationship between the frequency domain information and the compensation value may be established in advance, so that when the current frequency domain information is obtained, the corresponding compensation value can be found for compensation according to the corresponding relationship.
  • the ambient light detection method of the present application may further include:
  • the display screen When the display screen is in a dark environment, obtain the screen light intensity value detected by the light sensor for displaying the target picture on the display screen; perform Fourier transform on the time domain information of the screen light intensity value to obtain the screen light intensity
  • the frequency domain information corresponding to the value; the frequency domain information corresponding to the screen light intensity value under different target screens is fitted to obtain a fitting model, which is used to characterize the corresponding relationship between the frequency domain information and the compensation value .
  • the electronic device can be placed in a dark environment.
  • the light intensity value detected by the light sensor is only the light intensity value of the screen, and the time domain information of the light intensity value of the screen After the Fourier transform is performed, the frequency domain information corresponding to the light intensity value of the screen can be obtained, that is, the amount of influence of the screen light leakage. Therefore, by controlling the display screen to display different target pictures, the frequency domain information corresponding to the light intensity value of the screen under each target picture can be obtained, and the influence of the screen light leakage under different display pictures can be obtained. For example, if it is read that the frequency domain amplitude is close to or equal to the frequency domain amplitude of the white picture, the compensation value corresponding to the white picture can be used to compensate.
  • the electronic device can fit and optimize different screen light intensity values and their corresponding frequency point intensity.
  • the fitting model can be used to characterize the correspondence between frequency domain information and compensation values.
  • the corresponding compensation value is estimated, and the compensation value and the corresponding frequency point intensity are obtained for fitting optimization, and the above-mentioned fitting model can be obtained.
  • Step S240 Perform light intensity compensation on the detected light intensity value based on the compensation value.
  • Step S250 Determine the ambient light intensity value according to the compensated detected light intensity value.
  • step S250 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the integration period of the light sensor is set to be less than half of the time width of the target area to ensure that the light sensor detects
  • the target area is an area where some pixels do not emit light during the refresh process of the display screen.
  • Fourier transform can be performed on the detected light intensity value detected by the light sensor to obtain frequency domain information, and according to the frequency domain information, the detected light intensity value can be compensated for light intensity to reduce the interference of screen light emission, and finally According to the compensated detection light intensity value, a more accurate ambient light intensity value is obtained.
  • the optimal detection scheme for different application scenarios can be realized, and the accuracy of the ambient light intensity is improved.
  • FIG. 12 shows a schematic flowchart of an ambient light detection method provided by another embodiment of the present application.
  • the following will elaborate on the process shown in FIG. 12, and the ambient light detection method shown may specifically include the following steps:
  • Step S310 Obtain multiple detected light intensity values detected by the light sensor within a preset time, where the preset time is greater than the refresh period of the display screen.
  • the minimum number of acquired detected light intensity values may be limited before the Fourier transform is performed. Specifically, multiple detected light intensity values detected by the light sensor within a preset time may be obtained, where the preset time is greater than the refresh period of the display screen. As a way, in order to reduce the data error after Fourier transform, the preset time can be at least more than twice the refresh period of the display screen.
  • the preset time can be adjusted reasonably according to the Nth power of 2 so that the detection data within the preset time Meet the logo.
  • Step S320 Perform Fourier transform on the time domain information of the detected light intensity value to obtain frequency domain information corresponding to the detected light intensity value.
  • Step S330 Perform light intensity compensation on the detected light intensity value according to the frequency domain information.
  • step S320 and step S330 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • Step S340 Obtain the minimum light intensity value in each refresh period from the plurality of detected light intensity values, and use it as the first ambient light intensity value in each refresh period.
  • Step S350 Obtain the multiple compensated detected light intensity values in each refresh period as the second ambient light intensity value in each refresh period.
  • Step S360 Perform data smoothing processing on the first ambient light intensity value and the second ambient light intensity value to obtain the target ambient light intensity value, which is used as the ambient light detection result.
  • the minimum light intensity value in each refresh period can be obtained from the multiple detected light intensity values, and the minimum light intensity value in each refresh period can be preliminarily estimated.
  • the first ambient light intensity value in the refresh period Then compensate the multiple detected light intensity values in each refresh period according to the aforementioned compensation method, and use the compensated multiple detected light intensity values as the second ambient light intensity in each refresh period estimated again .
  • data smoothing is performed on the two estimated ambient light intensity, and a more accurate target ambient light intensity value can be obtained, which can be used as the detection result of the ambient light.
  • FIG. 13 shows an overall flow chart of an ambient light detection method.
  • the detected light intensity value detected by the light sensor is obtained to Fourier the time domain information of the detected light intensity value.
  • Leaf transform to obtain the frequency domain information corresponding to the detected light intensity value.
  • there is at least one detection value corresponding to the target area in the detected light intensity value and the target area is an area where some pixels do not emit light during the refresh process of the display screen.
  • light intensity compensation can be performed on the detected light intensity value to reduce the interference of the screen light emission, and finally, according to the compensated detected light intensity value, a more accurate ambient light intensity value can be obtained.
  • the impact of the brightness of the screen light source on the ambient light detection can be reduced, so that when the light sensor is placed under the display screen, there is no need to set a light guide column, and it can Realize accurate detection of ambient light intensity.
  • FIG. 14 shows a structural block diagram of an ambient light detection device 700 provided by an embodiment of the present application.
  • the ambient light detection device 700 includes: a data acquisition module 710, a frequency domain conversion module 720, a data compensation module 730, and Result determination module 740.
  • the data acquisition module 710 is used to acquire the detected light intensity value detected by the light sensor, where the light sensor is located below the display screen, and there is at least one detection value corresponding to the target area in the detected light intensity value.
  • the target area is an area where some pixels of the display screen do not emit light during the refresh process;
  • the frequency domain conversion module 720 is configured to perform Fourier transform on the time domain information of the detected light intensity value to obtain the detected light intensity The frequency domain information corresponding to the value;
  • the data compensation module 730 is configured to perform light intensity compensation on the detected light intensity value according to the frequency domain information;
  • the result determination module 740 is configured to determine the detected light intensity value according to the compensated Ambient light intensity value.
  • the data compensation module 730 may be specifically configured to: determine the compensation value corresponding to the frequency domain information according to the preset correspondence relationship between the frequency domain information and the compensation value; The light intensity value performs light intensity compensation.
  • the ambient light detection device 700 may further include: a model fitting module.
  • the model fitting module may be specifically used to: when the display screen is in a dark environment, obtain the screen light intensity value detected by the light sensor of the target screen displayed on the display screen; The inner leaf transform is used to obtain the frequency domain information corresponding to the light intensity value of the screen; the frequency domain information corresponding to the light intensity value of the screen under different target images is fitted to obtain a fitting model, and the fitting model is used for Characterize the corresponding relationship between frequency domain information and compensation value.
  • the above-mentioned data acquisition module 710 may be specifically configured to acquire multiple detected light intensity values detected by the light sensor within a preset time, and the preset time is greater than the refresh period of the display screen.
  • the above result determining module 740 may be specifically configured to: obtain the minimum light intensity value in each refresh period from the plurality of detected light intensity values, as the first ambient light intensity in each refresh period Value; obtain the multiple detected light intensity values after compensation in each refresh period as the second ambient light intensity value in each refresh period; combine the first ambient light intensity value and the second ambient light intensity value Perform data smoothing to obtain the target ambient light intensity value and use it as the ambient light detection result.
  • the ambient light detection device 700 may further include: a detection module.
  • the detection module may be specifically configured to: obtain a target area in the display screen, where the target area is an area where some pixels of the display screen do not emit light during the refresh process; and determine that the target area is within the refresh period of the display screen Corresponding first time width; based on the first time width, obtain the first integration period of light intensity measurement, wherein the first integration period is less than half of the first time width; control the light sensor to The light intensity detection starts in the first integration period.
  • the ambient light detection device 700 may further include: a mode judgment module and a first processing module.
  • the mode judgment module is used to judge whether it is currently in the PWM dimming mode; the first processing module is used to perform the step of obtaining the target area in the display screen if it is not in the PWM dimming mode.
  • the ambient light detection device 700 may further include: a second processing module.
  • the second processing module may be specifically configured to: if it is in the PWM dimming mode, obtain the second time width during which the display screen is in the off-screen state in one PWM period; and obtain the second time width of the light intensity measurement based on the second time width.
  • the integration period wherein the second integration period is less than half of the second time width; the light sensor is controlled to start the light intensity detection with the second integration period.
  • the ambient light detection device 700 may further include: a brightness judgment module and a third processing module.
  • the brightness judgment module is used to judge whether the brightness of the current display screen is greater than the preset brightness
  • the third processing module is used to perform the acquisition of the display screen in the off-screen state within one PWM period if the brightness is less than or equal to the preset brightness The second time width step.
  • the ambient light detection device 700 may further include: a fourth processing module, configured to perform the step of obtaining the target area in the display screen if the brightness is greater than the preset brightness.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the ambient light detection device provided in the embodiment of the present application is used to implement the corresponding ambient light detection method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
  • the electronic device 100 may be a terminal device capable of running application programs, such as a PC computer or a mobile terminal.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a light sensor 130, a display screen 140, and one or more application programs, where the light sensor 130 is located under the display screen 140
  • One or more application programs may be stored in the memory 120 and configured to be executed by the one or more processors 110, and the one or more application programs are configured to execute the method described in the foregoing method embodiment.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the electronic device 100 may adopt at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PDA Programmable Logic Array
  • the processor 110 may be integrated with one or a combination of a central processing unit (CPU), an ambient light detector (Graphics Processing Unit, GPU), and a modem.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
  • the light sensor 130 may be any light sensor for collecting light for light intensity detection, and the specific light sensor is not limited here.
  • the display screen 140 may be used to display information input by the user or information provided to the user, and various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of images, text, icons, videos, and any combination thereof.
  • the processor 110 may obtain the detected light intensity value according to the light received by the light sensor 130. Subsequently, the processor 110 may determine the current ambient light intensity value according to the detected light intensity value, and adjust the brightness of the display screen 140 according to the current ambient light intensity value.
  • the display screen 140 may be an OLED display screen.
  • OLED Organic Light-Emitting Diode
  • the display screen 140 may also be a MicroLED display screen, and the MicroLED display screen also has good light transmittance to visible light and infrared light.
  • these display screens are only exemplary, and the embodiments of the present invention are not limited thereto.
  • FIG. 16 shows a schematic structural diagram of an electronic device.
  • the electronic device includes a glass cover 101, a display panel 102, a buffer foam 103, and a light sensor 104.
  • the light sensor is arranged under the display panel 102.
  • FIG. 17 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • the program code 810 may be compressed in a suitable form, for example.

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Sustainable Development (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Liquid Crystal Display Device Control (AREA)

Abstract

一种环境光检测方法、装置(700)、电子设备(100)及存储介质(800)。环境光检测方法包括:获取光感传感器(130)检测到的检测光强度值,其中,光感传感器(130)位于显示屏(140)下方,检测光强度值中至少存在一个目标区域所对应的检测值,目标区域为显示屏在刷新过程中部分像素不发光的区域;对检测光强度值的时域信息进行傅里叶变换,得到检测光强度值对应的频域信息;根据频域信息,对检测光强度值进行光强度补偿;根据补偿后的检测光强度值,确定环境光强度值。可利用屏下的光感传感器(130)来实现当前的环境光检测。还涉及环境光检测方法对应的装置(700)、电子设备(100)和存储介质(800)。

Description

环境光检测方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求于2020年4月20日提交的申请号为202010313048.3的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及电子设备技术领域,更具体地,涉及一种环境光检测方法、装置、电子设备及存储介质。
背景技术
随着电子设备走向全面屏时代,电子设备的屏占比越来越大,给硬件和结构技术上带来更高的要求。一般地,现有的电子设备将光感传感器设置在屏幕上方,以检测环境光强度,从而对电子设备的显示屏亮度进行调节。但是,随着屏占比的提高,屏幕以外的空间减少,如何在不影响环境光检测的前提下提高屏占比成为急需解决的问题。
发明内容
鉴于上述问题,本申请提出了一种环境光检测方法、装置、电子设备及存储介质。
第一方面,本申请实施例提供了一种环境光检测方法,所述方法包括:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;根据所述频域信息,对所述检测光强度值进行光强度补偿;根据所述补偿后的检测光强度值,确定环境光强度值。
第二方面,本申请实施例提供了一种环境光检测装置,所述装置包括:数据获取模块,用于获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;频域转换模块,用于对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;数据补偿模块,用于根据所述频域信息,对所述检测光强度值进行光强度补偿;结果确定模块,用于根据所述补偿后的检测光强度值,确定环境光强度值。
第三方面,本申请实施例提供了一种电子设备,包括:显示屏;光感传感器,所述光感传感器位于所述显示屏下方;一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的环境光检测方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的环境光检测方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例, 对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了现有技术中的环境光检测的截面示意图。
图2示出了根据本申请一个实施例的环境光检测方法的一种流程图。
图3示出了本申请一个实施例提供的环境光检测方法中一种示意图。
图4示出了本申请一个实施例提供的环境光检测方法中另一种示意图。
图5示出了本申请一个实施例提供的环境光检测方法中又一种示意图。
图6示出了本申请一个实施例提供的环境光检测方法中再一种示意图。
图7示出了根据本申请另一个实施例的环境光检测方法的一种流程图。
图8示出了根据本申请另一个实施例的环境光检测方法的另一种流程图。
图9示出了根据本申请另一个实施例的环境光检测方法的又一种流程图。
图10示出了根据本申请另一个实施例的环境光检测方法的再一种流程图。
图11示出了根据本申请另一个实施例的环境光检测方法的还一种流程图。
图12示出了根据本申请又一个实施例的环境光检测方法的一种流程图。
图13示出了一种根据本申请实施例提供的环境光检测方法的整体流程示意图。
图14示出了根据本申请一个实施例的环境光检测装置的一种框图。
图15是本申请实施例的用于执行根据本申请实施例的环境光检测方法的电子设备的框图。
图16是本申请实施例的用于执行根据本申请实施例的环境光检测方法的电子设备的截面示意图。
图17是本申请实施例的用于保存或者携带实现根据本申请实施例的环境光检测方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
在一些方案中,为了实现全面屏及更大的屏占比,可以将光感传感器设置在显示屏下方。但由于显示屏在显示的过程中,显示屏会发光,此时,会有一部分光漏到光感传感器上。因此,设置在显示屏下方的光感传感器接收到的光为外界环境光和显示屏的漏光之和,也即检测到的光强度是环境光叠加显示屏发光的光强度。目前通常是通过获取显示屏信息来计算出屏幕漏光,然后用光感传感器的报值减去屏幕漏光即为环境光。然而,该种方式需要获取显示屏信息,且目前主要通过画面刷新处理层(surfaceflinger)实现,在重载情况下如打游戏等,会导致画面出现卡顿。
虽然在一些方案中,如图1所示,可以利用贯穿显示屏的导光柱105(通常使用透明塑料制作,其顶部直接顶到盖板101或者外界环境)来避免显示屏发光的干扰,使得环境光经过导光柱进入光感器件104后,光感器件104可检测到准确的环境光强度。然而,导光柱的设置需要占用一定的盖板空间,增加了黑边宽度,无法实现显示屏的全面屏设计。
因此,发明人经过长期的研究发现并提出了本申请实施例提供的环境光检测方法、装置、电子设备以及存储介质,在光感传感器位于显示屏下方的情况下,可通过光感传感器的检测光强度值对应的频域信息来补偿屏幕的漏光,得到较为准确的环境光强度值,既能够降低屏幕光源的亮度对环境光线检测的影响,提高环境光检测的准确性,又有利于电子设备的全面屏设计。具体的环境光检测方法在后续的实施例中进行详细的说明。
请参阅图2,图2示出了本申请一个实施例提供的环境光检测方法的流程示意图。在具体的实施例中,该环境光检测方法可应用于如图8所示的环境光检测装置700以及配置有所述环境光检测装置700的电子设备(图10、图11)。下面将针对图2所示的流 程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:
步骤S110:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。
在本申请实施例中,电子设备可以获取光感传感器检测到的检测光强度值,以根据该检测光强度值确定当前的环境光强度。其中,检测光强度值中至少存在一个目标区域所对应的检测值,该目标区域为显示屏在刷新过程中部分像素不发光的区域。
在本申请实施例中,光感传感器可用于采集光线以进行光强度检测,可以是环境光传感器,其可以采用光电晶体管、光敏电阻或光电二极管等器件实现。其中,光感传感器可设置在电子设备的显示屏下方,以提高电子设备的屏占比。在一些实施例中,光感传感器的位置可与显示屏的显示区域对应。
需要说明的是,显示屏在显示画面时需要不断的刷新以保证画面的更新及显示质量。而当使用高速相机或者将相机的曝光时间调短,对电子设备的显示屏进行拍照时,可以看到显示屏在刷新过程中存在部分区域的像素不发光(也可称为黑条),且该不发光的区域会随刷新移动。该不发光的区域即为上述目标区域。例如,如图3所示,显示屏140中的斜线填充的区域141为显示屏当前不发光的区域。
由于目标区域是不发光的区域,因此,该目标区域的显示画面为黑色,黑色不漏光。若光感传感器对该目标区域进行光感检测,其得到的检测光强度值可以是无干扰数据,即基本不受显示屏发光的影响的环境光强度值。而若对该目标区域以外的其他区域进行光感检测,由于其他区域是发光的区域,因此,存在显示屏发光的光强度的干扰,光感传感器得到的检测光强度值为显示屏漏光强度值和环境光强度值之和,即干扰数据。
在一些实施例中,可以通过调整光感传感器检测的积分周期,使得光感传感器获取到的检测光强度值中可以至少存在一个目标区域所对应的检测值,也即至少存在一个无干扰的的环境光强度值,以便后续能根据获取到检测光强度值,得到较为准确的环境光强度值。
步骤S120:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。
虽然获取到的检测光强度值至少存在一个无干扰数据,但由于屏下的光感传感器检测到的光强度值大多都是环境光叠加显示屏发光的干扰数据,浪费数据较多,数据准确率不高。因此,在本申请实施例中,电子设备可对光感传感器检测到的检测光强度值的时域信息进行傅里叶变换,得到检测光强度值对应的频域信息,以根据该频域信息得到较为准确的环境光强度值。既能够充分利用所有抓取到的数据,也提高了环境光检测的准确性。
可以理解的是,由于干扰数据为环境光与显示屏发光强度的叠加,因此,干扰数据的值通常都是大于无干扰数据的。也就是说,因为获取到的检测光强度值至少存在一个无干扰数据,导致检测光强度值的时域波形可以存在低点,从而可进行有效的傅里叶变换。
例如,当刷新频率为60Hz的显示屏显示白色画面时,光感传感器的积分值曲线可以如图4所示,横轴方向为时间,纵轴方向为检测光强度值。可以看到大部分时间其光强度值较大,只有很小的时候光强度值变小,为高的时间约16.57ms,为低的时间只有90us左右,且该曲线具有周期性。其中,低的为无干扰的环境光值,高的则为环境光与显示屏漏光之和。
在一些实施例中,对检测光强度值的时域信息进行傅里叶变换后,可以得到对应频率点的频点强度,该频点强度可以用于表征显示屏在当前显示画面下的漏光影响量,不同的频点强度代表了显示屏在不同显示画面下的屏幕漏光影响量。其中,当显示画 面为白色画面时,该频点强度最高,也即显示屏的漏光影响量最大,而当显示画面为黑色画面时,没有该频点强度,也即显示屏的漏光影响量为0。
例如,当显示屏显示白色画面时,请参阅图5,图5示出了一种检测光强度值的时域波形示意图。可以看到该波形有明显的周期特性,其周期即为显示屏的刷新周期。进行傅里叶变换后得到的频域波形如图6所示,可以看到该频域波形有明显的频点强度。该频点强度代表了白色画面下的屏幕漏光影响量。
步骤S130:根据所述频域信息,对所述检测光强度值进行光强度补偿。
在本申请实施例中,在得到上述频域信息后,电子设备可以对光感传感器检测到的检测光强度值进行光强度补偿,以去除屏幕漏光的干扰,得到较为准确的环境光强度。
由于频点强度可以用于表征显示屏在当前显示画面下的漏光影响量,因此,在一些实施例中,可以根据该漏光影响量确定要补偿的补偿差值,以降低屏幕漏光影响量到最低。然后再根据该补偿差值对检测光强度值进行补偿,从而可得到有效的环境光值。作为一种方式,可以预先建立频点强度与补偿差值之间的对应关系,从而在获取到当前的频点强度时,可根据该对应关系,找到对应的补偿差值进行补偿。
步骤S140:根据所述补偿后的检测光强度值,确定环境光强度值。
在申请实施例中,电子设备在得到补偿后的检测光强度值后,可以根据该补偿后的检测光强度值,确定当前的环境光强度值。从而充分利用了光感传感器抓取的所有检测光强度值,得到了较为准确的环境光强度,避免了数据的浪费。
在一些实施例中,电子设备可以将补偿后的检测光强度值,作为当前的环境光强度值。也可以是将多个补偿后的检测光强度值进行数据融合平滑处理后,得到的检测光强度值作为当前的环境光强度值。其中,数据融合平滑处理所需要的数据个数此处不作限定,可根据实际需求进行合理设定。
在一些实施例中,电子设备可以是实时上报环境光强度值,也可以是每隔指定时间进行环境光强度值的上报。作为一种方式,电子设备可以从指定时间内将得到的补偿后的检测光强度值作为当前环境光强度值,进而选取指定数量的该当前环境光强度值进行上报。值得说明的是,选取可以是随机选择,也可以是根据前后数据的波动变化进行选择,具体选择方式此处不作限定。其中,根据前后数据的波动变化进行选择,可以理解为在一个补偿的环境光强度值被选中上报时,如果后续补偿的环境光强度值还是同样的值时,不进行上报,直至存在一个不同值时,才进行上报,例如,当前一个环境光强度值被选中上报时,可以判断当前环境光强度值与该前一个环境光强度值是否一致,若当前环境光强度值与前一个环境光强度值不一致时,可以上报该当前环境光强度值。此外,若当前环境光强度值与前一个环境光强度值一致时,可以取消当前环境光强度值的上报。从而仅上报有用数据,避免大量无意义数据的上报。作为另一种方式,可以将进行数据融合平滑处理后的多个补偿后的检测光强度值作为当前的环境光强度值进行上报,上报方法也可以利用随机选择上报或者根据前后数据的波动变化进行选择上报。
在一些实施例中,电子设备在获取到当前的环境光强度值后,可以根据该环境光强度至对显示屏的亮度进行调节,提高了用户的视觉体验。
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过获取光感传感器检测到的检测光强度值,以对该检测光强度值的时域信息进行傅里叶变换,从而得到该检测光强度值对应的频域信息。其中,检测光强度值中至少存在一个目标区域所对应的检测值,而目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。这样,通过检测光强度值对应的频域信息进行光强度补偿,可以降低屏幕光源的亮度对环境 光线检测的影响,从而在将光感传感器设置在显示屏下方时,无需设置导光柱,也能够实现对环境光强度的准确检测。
请参阅图7,图7示出了本申请另一个实施例提供的环境光检测方法的流程示意图。下面将针对图7所示的流程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:
步骤S210:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。
在本申请实施例中,步骤S210可以参阅前述实施例的内容,此处不再赘述。
在一些实施例中,为了保证光感传感器检测到的检测光强度值中至少存在一个目标区域所对应的检测值,可以对光感传感器的积分周期进行设置。其中,光感传感器的积分周期可以是指获得一个光强度值所需的积分时间。
在一些实施例中,可以根据采样定理,将光感传感器的积分周期设为小于目标区域(黑条)对应的时间宽度的一半,以保证光感传感器可以在刷新的目标区域(黑条)中准确抓取到无干扰的环境光强度值。
作为一种方式,目标区域(黑条)对应的时间宽度可根据显示屏的刷新周期确定,从而可确定出光感传感器的积分周期。具体地,请参阅图8,在步骤S210之前,本申请的环境光检测方法还可以包括:
步骤S202a:获取显示屏中的目标区域,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。
步骤S204a:确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度。
在一些实施例中,可以使用高速相机或者将相机的曝光时间调短,对显示屏进行拍照录像,从而可以获取到显示屏中部分像素不发光的目标区域。然后可以通过相机的录屏时间进行换算,将目标区域(黑条)的像素宽度所对应的时间的换算出来,以得到目标区域在显示屏的一个刷新周期内所对应的第一时间宽度。作为一种实施方式,可以确定目标区域的像素宽度与显示屏的像素宽度的比例,进一步地,根据显示屏的刷新周期以及比例,确定目标区域在显示屏的刷新周期内所对应的第一时间宽度。例如,当显示屏的刷新频率为60Hz(即1s钟刷新60张显示画面)时,刷新一次显示画面的时间约为16.6ms(即刷新周期),可通过计算黑条的像素宽度与整个显示屏的像素宽度的比例,来求出黑条的像素宽度所对应的第一时间宽度,如180us。当然,上述获取目标区域的方式仅为举例,此处不作具体限定。
可以理解的是,显示屏的刷新频率有多种,如60Hz、90Hz、120Hz等,不同的刷新频率其对应的目标区域的第一时间宽度不一致。
步骤S206a:基于所述第一时间宽度,获取光强度测量的第一积分周期,其中,所述第一积分周期小于所述第一时间宽度的一半。
步骤S208a:控制光感传感器以所述第一积分周期开始进行光强度检测。
在一些实施例中,由于目标区域可随刷新移动,因此,可以将光感传感器进行光强度测量的积分周期设为小于目标区域的第一时间宽度的一半,以在目标区域移动到光感传感器的检测范围处时,光感传感器可以进行光感检测,从而光感传感器可检测到至少一个无干扰的环境光强度值。这样,使用传感器自身实现屏下的光线检测,通过屏幕刷新的黑条进行积分获取环境光亮度。对显示屏的画面没有依赖,不需要截屏计算,简化当前屏下光感实现的计算及耦合复杂度,并解决重载情况下的卡顿等问题。
例如,在上述例子中,第一积分周期需要小于90us。从而在一个刷新周期内,光感传感器至少可以检测到16.666/0.09=185个数据。其中,185个数据有一个无干扰的有效数据,其它数据都受屏幕漏光影响。从而光感传感器可以实现最快16.6ms上报一个检测光强度值。在一些实施例中,也可以按最快20ms上报一个检测光强度值, 此处不作限定。
在一些实施例中,当显示屏处于DC模式(低亮无频闪护眼模式)时,电子设备可控制光感传感器以上述第一积分周期开始进行光强度检测。
在一些实施例中,使用上述计算积分方法获取光感值时,光感传感器的感度(灵敏度)可以很高,以能够在极短的积分时间内输出光感值,且光感传感器的ADC(Analog-to-Digital Converter,模拟/数字转换器)输出值相对环境光的LUX值应该大于1倍以保证环境光的检测准确度。
作为一种方式,可以使用高灵敏度光感器件来进行光感检测,不仅能够分析环境光亮度用于背光调节,还可以识别出环境光的抖动幅度,从而获取环境光的频闪,用于相机的拍照不均匀去除(在室内环境光有一定的屏闪),由于相机曝光是逐行曝光,会出现黑白横条的情况。
在一些实施例中,当显示屏有刷新同步信号时可以同步到光感传感器端,从而可以使用刷新同步来控制积分的开始。如图8所示,光感器件通常包括中断信号,I2C,gnd,在这里可以增加一个Sync同步信号。Sync同步信号需要连接显示屏的同步信号,这样显示屏刷新的时候可以发同步信号给到光感传感器,光感积分获得环境光值。从而避免在非刷新黑条的时间内积分造成较多无效数据。
作为另一种方式,目标区域(黑条)对应的时间宽度可根据PWM周期确定,从而可确定出光感传感器的积分周期。具体地,请参阅图9,在步骤S210之前,本申请的环境光检测方法还可以包括:
步骤S202b:获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度。
可以理解的是,当显示屏处于PWM调光模式时,在一个PWM(Pulse Width Modulation,脉冲宽度调制)周期内,会有一部分时间处于亮屏状态,一部分时间处于灭屏状态,其是通过亮屏和灭屏的切换实现人眼看到的较暗亮度的功能。由于显示屏处于灭屏状态时,显示屏也不会发光,因此,在一些实施例中,当显示屏处于PWM调光模式时,目标区域(黑条)对应的时间宽度也可以是一个PWM周期内处于灭屏状态的时间宽度。
例如,刷新频率为60hz的显示屏,在PWM调光模式下的屏闪频率可为240hz,此时,目标区域可以是以240HZ的速度刷新。通过计算可以得到PWM周期为1000/240=4.16ms,其中,显示处于灭屏状态的时间宽度约3.7ms。实际测试在低亮度10nit时目标区域的时间宽度为3ms,也即在PWM调光模式下,显示屏中的目标区域的宽度更宽,光感传感器很容易积分获取到精确的环境光强度值。
在一些实施例中,一个PWM周期内显示屏处于灭屏状态的第二时间宽度,与显示屏的亮度有关。显示屏的当前亮度越暗,表明一个PWM周期内显示屏处于灭屏状态越长,即目标区域对应的时间宽度越长;显示屏的当前亮度越亮,表明一个PWM周期内显示屏处于灭屏状态越短,即目标区域对应的时间宽度越短。
可以理解的是,当目标区域对应的时间宽度越长时,光感传感器检测到到光强度值的干扰数据越少,当目标区域对应的时间宽度越短时,光感传感器检测到到光强度值的干扰数据越多。
步骤S204b:基于第二时间宽度,获取光强度测量的第二积分周期,其中,所述第二积分周期小于所述第二时间宽度的一半。
步骤S206b:控制光感传感器以所述第二积分周期开始进行光强度检测。
在一些实施例中,可以将光感传感器进行光强度测量的积分周期设为小于目标区域的第二时间宽度的一半,以在目标区域移动到光感传感器的检测范围处时,光感传感器可以进行光感检测,从而光感传感器可检测到至少一个无干扰的环境光强度值。
在一些实施例中,可以将上述两种积分周期进行结合,以根据具体的应用场景,选择出合适的积分周期。具体地,请参阅图10,在步骤S202a之前,本申请的环境光 检测方法还可以包括:
步骤S200:判断当前是否处于PWM调光模式。
具体地,当显示屏当前处于PWM调光模式时,可以控制光感传感器以上述第二积分周期开始进行光强度检测,也即执行步骤S202b~步骤S206b。当显示屏当前不处于PWM调光模式时,可以控制光感传感器以上述第一积分周期开始进行光强度检测,也即执行步骤S202a~步骤S208a。
由于PWM调光模式下的黑条宽度与显示屏亮度有关,因此,在一些实施例中,在根据PWM黑条进行计算之前,可以先判断亮度是否符合条件。具体地,请参阅图11,在步骤S202b之前,本申请的环境光检测方法还可以包括:
步骤S201:判断当前显示屏的亮度是否大于预设亮度。
通常情况下,显示屏的亮度较暗时,才会使用PWM调光模式,且由于显示屏的亮度越高,目标区域对应的时间宽度越短,直至消失,导致光感传感器无法有效检测到环境光强度值,因此,在一些实施例中,电子设备可判断当前显示屏的亮度是否大于预设亮度。
具体地,如果大于所述预设亮度,则当前光感传感器不适合以第二积分周期进行检测,可以控制光感传感器以上述第一积分周期开始进行光强度检测,也即执行步骤S202a~步骤S208a;如果小于或等于所述预设亮度,则当前光感传感器很适合以第二积分周期进行检测,可以控制光感传感器以上述第二积分周期开始进行光强度检测,也即执行步骤S202b~步骤S206b。
步骤S220:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。
在本申请实施例中,步骤S220可以参阅前述实施例的内容,此处不再赘述。
在一些实施例中,可以是对检测光强度值的时域信息进行快速傅里叶变换(fast Fourier transform,FFT),以提高运算速度。
可以理解的是,在FFT中,利用WN的周期性和对称性,可以把一个N项序列(设N=2k,k为正整数),分为两个N/2项的子序列,每个N/2点DFT变换需要(N/2)2次运算,再用N次运算把两个N/2点的DFT变换组合成一个N点的离散傅里叶变换(Discrete Fourier Transform,DFT)。这样变换以后,总的运算次数就变成N+2*(N/2)^2=N+N^2/2。虽然,FFT提高了运算速度,但是,也对参与运算的样本序列作出了限制,即要求样本数为2^N点。也就是说,1024=2^10满足FFT运算要求,1000点则不满足,若采用1000点,FFT算法会在其后补零,自动不足1024点。但是这样,被分析的样本就变了,结果误差较大。
因此,为了保证数据的准确率,在一些实施例中,光感传感器可以不断的上报数据流,这些数据流可进入一个数据队列。该数据队列可以设置符合FFT的样本书要求,例如队列长度可设为1024,遵循数据先入先出的原则,则可对数据队列中的数据不停的进行傅里叶变换以计算频率信息用于后续补偿处理,当数据出队列后可以将出队列的数据丢弃。
步骤S230:根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值。
在一些实施例中,可以预先设立频域信息与补偿值的对应关系,从而在获取到当前的频域信息时,可根据该对应关系,找到对应的补偿值进行补偿。
作为一种方式,可以预先根据不同显示画面的频率信息进行拟合,优化,得到拟合模型。从而,在获取到当前的频域信息时,可根据该拟合模型,找到对应的补偿值进行补偿。具体地,在步骤S230之前,本申请的环境光检测方法还可以包括:
当显示屏处于黑暗环境时,获取所述显示屏显示目标画面时光感传感器检测到的屏幕光强度值;对所述屏幕光强度值的时域信息进行傅里叶变换,得到所述屏幕光强 度值对应的频域信息;对不同目标画面下的所述屏幕光强度值对应的频域信息进行拟合,得到拟合模型,所述拟合模型用于表征频域信息与补偿值的对应关系。
在一些实施例中,可将电子设备至于黑暗环境,此时由于不存在环境光的影响,光感传感器检测到的光强度值仅为屏幕光强度值,对该屏幕光强度值的时域信息进行傅里叶变换后,可得到屏幕光强度值对应的频域信息,也即屏幕漏光影响量。因此,可以通过控制显示屏显示不同的目标画面,来获取每个目标画面下的屏幕光强度值对应的频域信息,得到不同显示画面下的屏幕漏光影响量。例如,如果读到了频域幅值是接近或等于白色画面的频域幅值,则可通过白色画面对应的补偿值进行补偿。
在一些实施例中,由于屏幕光强度值对应的频域信息中可以包含对应频率点的频点强度,因此,电子设备可以将不同的屏幕光强度值和其对应频点强度进行拟合、优化,可以得到拟合模型。该拟合模型可用于表征频域信息与补偿值的对应关系。作为一种方式,通过将不同的屏幕光强度值和其对应频点强度进行拟合,可以得到屏幕光强度值和其对应频点强度的线性关系,然后可根据拟合后的屏幕光强度值估算对应的补偿值,将得到补偿值和对应的频点强度进行拟合优化,可以得到上述拟合模型。其中,也可以是将屏幕光强度值直接作为补偿值进行拟合,此处不作限定,仅需将频点强度与补偿值关联起来即可。
步骤S240:基于所述补偿值对所述检测光强度值进行光强度补偿。
步骤S250:根据所述补偿后的检测光强度值,确定环境光强度值。
在本申请实施例中,步骤S250可以参阅前述实施例的内容,此处不再赘述。
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过将光感传感器的积分周期设为小于目标区域的时间宽度的一半,以保证光感传感器检测到的检测光强度值中至少存在一个无干扰的环境光强度值。其中,目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可对光感传感器检测到的检测光强度值进行傅里叶变换,得到频域信息,并根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。此外,通过根据显示屏的不同工作模式来确定对应的目标区域的时间宽度,可实现不同的应用场景的最优检测方案,提高了对环境光强度的准确性。
请参阅图12,图12示出了本申请又一个实施例提供的环境光检测方法的流程示意图。下面将针对图12所示的流程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:
步骤S310:获取光感传感器在预设时间内检测到的多个检测光强度值,所述预设时间大于显示屏的刷新周期。
在一些实施例中,为了保证傅里叶变换的有效进行,可以在进行傅里叶变换之前,对获取到的检测光强度值的最小数量进行限定。具体地,可以是获取光感传感器在预设时间内检测到的多个检测光强度值,其中,预设时间大于显示屏的刷新周期。作为一种方式啊,为了减少傅里叶变换后的数据误差,预设时间可以是至少大于显示屏的刷新周期的2倍。
在一些实施例中,当傅里叶变换为FFT时,由于其所需的数据是2的N次方,可以根据2的N次方合理调整预设时间,以使预设时间内的检测数据符合该标识。
步骤S320:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。
步骤S330:根据所述频域信息,对所述检测光强度值进行光强度补偿。
在本申请实施例中,步骤S320和步骤S330可以参阅前述实施例的内容,此处不再赘述。
步骤S340:从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,作为每个刷新周期内的第一环境光强度值。
步骤S350:获取每个刷新周期内所述补偿后的多个检测光强度值,作为每个刷新周期内的第二环境光强度值。
步骤S360:将所述第一环境光强度值和第二环境光强度值进行数据平滑处理,得到目标环境光强度值,并作为环境光的检测结果。
在一些实施例中,由于光感传感器检测到无干扰数据通常是最小的,因此,可以从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,初步估算出每个刷新周期内的第一环境光强度值。然后再根据前述的补偿方法对每个刷新周期内的多个检测光强度值进行补偿,并将补偿后的多个检测光强度值,作为再次估算的每个刷新周期内的第二环境光强度。最后将两次估算的环境光强度进行数据平滑处理,可以得到较为准确的目标环境光强度值,并作为环境光的检测结果。例如,请参阅图13,图13示出了一种环境光检测方法的整体流程图。
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过获取光感传感器检测到的检测光强度值,以对该检测光强度值的时域信息进行傅里叶变换,从而得到该检测光强度值对应的频域信息。其中,检测光强度值中至少存在一个目标区域所对应的检测值,而目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。这样,通过检测光强度值对应的频域信息进行光强度补偿,可以降低屏幕光源的亮度对环境光线检测的影响,从而在将光感传感器设置在显示屏下方时,无需设置导光柱,也能够实现对环境光强度的准确检测。
请参阅图14,其示出了本申请实施例提供的一种环境光检测装置700的结构框图,该环境光检测装置700包括:数据获取模块710、频域转换模块720、数据补偿模块730以及结果确定模块740。其中,数据获取模块710用于获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;频域转换模块720用于对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;数据补偿模块730用于根据所述频域信息,对所述检测光强度值进行光强度补偿;结果确定模块740用于根据所述补偿后的检测光强度值,确定环境光强度值。
在一些实施例中,数据补偿模块730可以具体用于:根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值;基于所述补偿值对所述检测光强度值进行光强度补偿。
在该实施例下,环境光检测装置700还可以包括:模型拟合模块。该模型拟合模块可以具体用于:当显示屏处于黑暗环境时,获取所述显示屏显示目标画面时光感传感器检测到的屏幕光强度值;对所述屏幕光强度值的时域信息进行傅里叶变换,得到所述屏幕光强度值对应的频域信息;对不同目标画面下的所述屏幕光强度值对应的频域信息进行拟合,得到拟合模型,所述拟合模型用于表征频域信息与补偿值的对应关系。
在一些实施例中,上述数据获取模块710可以具体用于:获取光感传感器在预设时间内检测到的多个检测光强度值,所述预设时间大于显示屏的刷新周期。
在该实施例下,上述结果确定模块740可以具体用于:从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,作为每个刷新周期内的第一环境光强度值;获取每个刷新周期内所述补偿后的多个检测光强度值,作为每个刷新周期内的第二环境光强度值;将所述第一环境光强度值和第二环境光强度值进行数据平滑处理,得到目标环境光强度值,并作为环境光的检测结果。
在一些实施例中,该环境光检测装置700还可以包括:检测模块。该检测模块可 以具体用于:获取显示屏中的目标区域,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度;基于所述第一时间宽度,获取光强度测量的第一积分周期,其中,所述第一积分周期小于所述第一时间宽度的一半;控制光感传感器以所述第一积分周期开始进行光强度检测。
在一些实施例中,该环境光检测装置700还可以包括:模式判断模块和第一处理模块。其中,模式判断模块用于判断当前是否处于PWM调光模式;第一处理模块用于若不处于所述PWM调光模式,则执行所述获取显示屏中的目标区域的步骤。
在一些实施例中,该环境光检测装置700还可以包括:第二处理模块。该第二处理模块可以具体用于:若处于所述PWM调光模式,则获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度;基于第二时间宽度,获取光强度测量的第二积分周期,其中,所述第二积分周期小于所述第二时间宽度的一半;控制光感传感器以所述第二积分周期开始进行光强度检测。
在一些实施例中,该环境光检测装置700还可以包括:亮度判断模块和第三处理模块。其中,亮度判断模块用于判断当前显示屏的亮度是否大于预设亮度;第三处理模块用于若小于或等于所述预设亮度,则执行所述获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度的步骤。
在一些实施例中,该环境光检测装置700还可以包括:第四处理模块,用于若大于所述预设亮度,则执行所述获取显示屏中的目标区域的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
综上所述,本申请实施例提供的环境光检测装置用于实现前述方法实施例中相应的环境光检测方法,并具有相应的方法实施例的有益效果,在此不再赘述。
请参考图15,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是PC电脑、移动终端等能够运行应用程序的终端设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、光感传感器130、显示屏140以及一个或多个应用程序,其中,光感传感器130位于显示屏140下方,一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个应用程序配置用于执行如前述方法实施例所描述的方法。
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、环境光检测器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括 只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
光感传感器130可以是用于采集光线以进行光强度检测的任意光感器件,此处不对具体的光感传感器进行限定。
显示屏140可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。在一些实施例中,处理器110可根据光感传感器130接收的光线获取检测光强度值。随后,处理器110可根据检测光强度值确定当前的环境光强度值,并根据当前环境光强度值调节显示屏140的亮度。
在一些实施例中,显示屏140可以是OLED显示屏。具体地,有机发光二极管(OrganicLight-EmittingDiode,OLED)显示屏具有良好的透光性,能够通过可见光。因此,OLED显示屏在展现内容效果的情况下,也不影响光感传感器130接收可见光。显示屏140也可以采用MicroLED显示屏,MicroLED显示屏同样具有对可见光和红外光良好的透光率。当然,这些显示屏仅作为示例性的,本发明的实施例并不限于此。
请参阅图16,图16示出了一种电子设备的结构示意图。其中,电子设备包括玻璃盖板101、显示面板102、缓存泡棉103以及光感传感器104。其中,光感传感器设于显示面板102下方。
请参考图17,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种环境光检测方法,其特征在于,所述方法包括:
    获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;
    对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;
    根据所述频域信息,对所述检测光强度值进行光强度补偿;
    根据所述补偿后的检测光强度值,确定环境光强度值。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述频域信息,对所述检测光强度值进行光强度补偿,包括:
    根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值;
    基于所述补偿值对所述检测光强度值进行光强度补偿。
  3. 根据权利要求2所述的方法,其特征在于,在所述根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值之前,所述方法还包括:
    当显示屏处于黑暗环境时,获取所述显示屏显示目标画面时光感传感器检测到的屏幕光强度值;
    对所述屏幕光强度值的时域信息进行傅里叶变换,得到所述屏幕光强度值对应的频域信息;
    对不同目标画面下的所述屏幕光强度值对应的频域信息进行拟合,得到拟合模型,所述拟合模型用于表征频域信息与补偿值的对应关系。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述获取光感传感器检测到的检测光强度值,包括:
    获取光感传感器在预设时间内检测到的多个检测光强度值,所述预设时间大于显示屏的刷新周期;
    所述根据所述补偿后的检测光强度值,确定环境光强度值,包括:
    从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,作为每个刷新周期内的第一环境光强度值;
    获取每个刷新周期内所述补偿后的多个检测光强度值,作为每个刷新周期内的第二环境光强度值;
    将所述第一环境光强度值和第二环境光强度值进行数据平滑处理,得到目标环境光强度值,并作为环境光的检测结果。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,在所述获取光感传感器检测到的检测光强度值之前,所述方法还包括:
    获取显示屏中的目标区域,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;
    确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度;
    基于所述第一时间宽度,获取光强度测量的第一积分周期,其中,所述第一积分周期小于所述第一时间宽度的一半;
    控制光感传感器以所述第一积分周期开始进行光强度检测。
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度,包括:
    确定所述目标区域的像素宽度与所述显示屏的像素宽度的比例;
    根据所述显示屏的刷新周期以及所述比例,确定所述目标区域在所述显示屏的刷 新周期内所对应的第一时间宽度。
  7. 根据权利要求5或6所述的方法,其特征在于,在所述获取显示屏中的目标区域之前,所述方法还包括:
    判断当前是否处于PWM调光模式;
    若不处于所述PWM调光模式,则执行所述获取显示屏中的目标区域的步骤。
  8. 根据权利要求7所述的方法,其特征在于,在所述判断当前是否处于PWM调光模式之后,所述方法还包括:
    若处于所述PWM调光模式,则获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度;
    基于第二时间宽度,获取光强度测量的第二积分周期,其中,所述第二积分周期小于所述第二时间宽度的一半;
    控制光感传感器以所述第二积分周期开始进行光强度检测。
  9. 根据权利要求8所述的方法,其特征在于,在所述获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度之前,所述方法还包括:
    判断当前显示屏的亮度是否大于预设亮度;
    若小于或等于所述预设亮度,则执行所述获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度的步骤。
  10. 根据权利要求9所述的方法,其特征在于,在所述判断当前显示屏的亮度是否大于预设亮度之后,所述方法还包括:
    若大于所述预设亮度,则执行所述获取显示屏中的目标区域的步骤。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,在所述根据所述补偿后的检测光强度值,确定环境光强度值之后,所述方法还包括:
    根据所述环境光强度,调节所述显示屏的亮度。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述根据所述补偿后的检测光强度值,确定环境光强度值,包括:
    对多个所述补偿后的检测光强度值进行数据平滑处理,得到处理后的检测光强度值作为当前的环境光强度值。
  13. 根据权利要求1-11任一项所述的方法,其特征在于,所述根据所述补偿后的检测光强度值,确定环境光强度值,包括:
    将所述补偿后的检测光强度值作为当前的环境光强度值。
  14. 根据权利要求1-13任一项所述的方法,其特征在于,在所述根据所述补偿后的检测光强度值,确定环境光强度值之后,所述方法还包括:
    每隔指定时间上报所述环境光强度值。
  15. 根据权利要求14所述的方法,其特征在于,所述每隔指定时间上报所述环境光强度值,包括:
    每隔指定时间,从所述指定时间内得到的所述环境光强度值中,选取指定数量的环境光强度值进行上报。
  16. 根据权利要求15所述的方法,其特征在于,所述从所述指定时间内得到的所述环境光强度值中,选取指定数量的环境光强度值进行上报,包括:
    当前一个环境光强度值被选中上报时,判断当前环境光强度值与所述前一个环境光强度值是否一致;
    若所述当前环境光强度值与所述前一个环境光强度值不一致时,上报所述当前环境光强度值。
  17. 根据权利要求16所述的方法,其特征在于,在所述判断当前环境光强度值与所述前一个环境光强度值是否一致之后,所述方法还包括:
    若所述当前环境光强度值与所述前一个环境光强度值一致时,取消所述当前环境 光强度值的上报。
  18. 一种环境光检测装置,其特征在于,所述装置包括:
    数据获取模块,用于获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;
    频域转换模块,用于对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;
    数据补偿模块,用于根据所述频域信息,对所述检测光强度值进行光强度补偿;
    结果确定模块,用于根据所述补偿后的检测光强度值,确定环境光强度值。
  19. 一种电子设备,其特征在于,包括:
    显示屏;
    光感传感器,所述光感传感器位于所述显示屏下方;
    一个或多个处理器;
    存储器;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利要求1-17任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。
PCT/CN2021/078920 2020-04-20 2021-03-03 环境光检测方法、装置、电子设备及存储介质 WO2021213016A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010313048.3A CN111486950B (zh) 2020-04-20 2020-04-20 环境光检测方法、装置、电子设备及存储介质
CN202010313048.3 2020-04-20

Publications (1)

Publication Number Publication Date
WO2021213016A1 true WO2021213016A1 (zh) 2021-10-28

Family

ID=71811064

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078920 WO2021213016A1 (zh) 2020-04-20 2021-03-03 环境光检测方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN111486950B (zh)
WO (1) WO2021213016A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114152894A (zh) * 2021-12-02 2022-03-08 北京博示电子科技有限责任公司 一种检测灯管的方法、装置、电子设备和存储介质
WO2022101177A1 (en) * 2020-11-13 2022-05-19 Ams International Ag Optical sensing
CN114840114A (zh) * 2022-07-05 2022-08-02 荣耀终端有限公司 显示控制方法、装置及存储介质
EP4231280A1 (en) * 2022-02-18 2023-08-23 Shenzhen Goodix Technology Co., Ltd. Method for measuring intensity of ambient light at electronic device, electronic device, and chip
CN117135250A (zh) * 2023-03-01 2023-11-28 荣耀终端有限公司 电子设备、屏幕亮度控制方法和导光结构
CN117194885A (zh) * 2023-09-06 2023-12-08 东莞市同和光电科技有限公司 一种红外接收芯片的光干扰抑制方法及红外接收芯片

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111486950B (zh) * 2020-04-20 2022-04-19 Oppo广东移动通信有限公司 环境光检测方法、装置、电子设备及存储介质
CN112033527B (zh) * 2020-08-26 2023-10-03 北京小米移动软件有限公司 环境亮度检测方法、装置、设备及存储介质
CN112179508A (zh) * 2020-09-30 2021-01-05 北京小米移动软件有限公司 环境光频率获取方法和装置、电子设备、存储介质
WO2022126656A1 (zh) * 2020-12-18 2022-06-23 深圳市汇顶科技股份有限公司 指纹检测的方法、指纹传感器和电子设备
CN112365833B (zh) * 2021-01-15 2021-04-30 深圳阜时科技有限公司 屏下光感亮度调节值的检测方法及矫正方法
CN112985588A (zh) * 2021-02-05 2021-06-18 深圳市汇顶科技股份有限公司 终端设备、光信号处理方法及存储介质
CN113110817B (zh) * 2021-04-08 2023-06-20 Oppo广东移动通信有限公司 环境光亮度的确定方法、装置、终端及存储介质
CN115597706B (zh) * 2021-05-17 2023-10-20 荣耀终端有限公司 一种环境光的检测方法、电子设备及芯片系统
CN113889053B (zh) * 2021-06-04 2022-07-22 荣耀终端有限公司 基于环境光传感器的屏幕亮度调整方法
CN113763856B (zh) * 2021-07-19 2022-09-13 荣耀终端有限公司 环境光照强度确定方法、装置及存储介质
CN114283751B (zh) * 2021-12-29 2023-04-07 西安闻泰信息技术有限公司 光感检测方法、终端设备及存储介质
CN114459600A (zh) * 2022-01-29 2022-05-10 维沃移动通信有限公司 环境光检测方法及装置、显示屏补偿显示方法及装置
CN114220381B (zh) * 2022-02-22 2022-05-13 深圳灏鹏科技有限公司 显示亮度控制方法、装置、设备及存储介质
CN117337382A (zh) * 2022-03-22 2024-01-02 京东方科技集团股份有限公司 显示面板及其制作方法、环境光强度检测方法及装置
TR2022013016A2 (tr) * 2022-08-17 2022-09-21 İstanbul Geli̇şi̇m Üni̇versi̇tesi̇ Moni̇törler üzeri̇nde görüntü kali̇tesi̇ni̇ artirmaya yöneli̇k si̇stem
CN115290299B (zh) * 2022-09-30 2023-04-07 深圳市汇顶科技股份有限公司 确定屏幕漏光的跌落深度的方法、装置及电子设备
CN117129085B (zh) * 2023-02-28 2024-05-31 荣耀终端有限公司 环境光的检测方法、电子设备及可读存储介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140132578A1 (en) * 2012-11-15 2014-05-15 Apple Inc. Ambient Light Sensors with Infrared Compensation
CN204463781U (zh) * 2015-03-17 2015-07-08 武汉精测电子技术股份有限公司 显示面板亮度频谱分析装置
US20170092228A1 (en) * 2015-09-30 2017-03-30 Apple Inc. Content-based statistics for ambient light sensing
CN107917755A (zh) * 2017-11-22 2018-04-17 广东欧珀移动通信有限公司 环境光检测方法、装置、存储介质及电子设备
CN107941330A (zh) * 2017-11-22 2018-04-20 广东欧珀移动通信有限公司 环境光强度检测方法、装置、存储介质及电子设备
CN107957294A (zh) * 2017-11-22 2018-04-24 广东欧珀移动通信有限公司 环境光强度检测方法、装置、存储介质及电子设备
CN108716950A (zh) * 2018-05-16 2018-10-30 北京小米移动软件有限公司 环境光亮度获取方法及装置
CN110211523A (zh) * 2019-07-26 2019-09-06 武汉精立电子技术有限公司 一种远距离测量液晶模组Flicker闪烁值的方法、装置及系统
CN111486950A (zh) * 2020-04-20 2020-08-04 Oppo广东移动通信有限公司 环境光检测方法、装置、电子设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987376A (zh) * 2006-12-22 2007-06-27 上海神明控制工程有限公司 燃烧火焰信号处理系统
JP2010249769A (ja) * 2009-04-20 2010-11-04 Oki Denki Bosai Kk 炎監視装置
CN102375973B (zh) * 2010-08-24 2013-04-03 汉王科技股份有限公司 人脸识别方法和系统及红外背光补偿方法和系统
JP6454748B2 (ja) * 2016-05-18 2019-01-16 レノボ・シンガポール・プライベート・リミテッド ユーザの存否を認定する方法、デバイスの制御方法および電子機器
CN107609514B (zh) * 2017-09-12 2021-08-06 Oppo广东移动通信有限公司 人脸识别方法及相关产品
CN107966209B (zh) * 2017-11-22 2020-07-07 Oppo广东移动通信有限公司 环境光检测方法、装置、存储介质和电子设备
US11991808B2 (en) * 2018-07-12 2024-05-21 Apple Inc. Electronic device with ambient light flicker sensor
CN109632092A (zh) * 2018-12-29 2019-04-16 东南大学 一种基于空间光场的亮度测试系统及方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140132578A1 (en) * 2012-11-15 2014-05-15 Apple Inc. Ambient Light Sensors with Infrared Compensation
CN204463781U (zh) * 2015-03-17 2015-07-08 武汉精测电子技术股份有限公司 显示面板亮度频谱分析装置
US20170092228A1 (en) * 2015-09-30 2017-03-30 Apple Inc. Content-based statistics for ambient light sensing
CN107917755A (zh) * 2017-11-22 2018-04-17 广东欧珀移动通信有限公司 环境光检测方法、装置、存储介质及电子设备
CN107941330A (zh) * 2017-11-22 2018-04-20 广东欧珀移动通信有限公司 环境光强度检测方法、装置、存储介质及电子设备
CN107957294A (zh) * 2017-11-22 2018-04-24 广东欧珀移动通信有限公司 环境光强度检测方法、装置、存储介质及电子设备
CN108716950A (zh) * 2018-05-16 2018-10-30 北京小米移动软件有限公司 环境光亮度获取方法及装置
CN110211523A (zh) * 2019-07-26 2019-09-06 武汉精立电子技术有限公司 一种远距离测量液晶模组Flicker闪烁值的方法、装置及系统
CN111486950A (zh) * 2020-04-20 2020-08-04 Oppo广东移动通信有限公司 环境光检测方法、装置、电子设备及存储介质

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022101177A1 (en) * 2020-11-13 2022-05-19 Ams International Ag Optical sensing
CN114152894A (zh) * 2021-12-02 2022-03-08 北京博示电子科技有限责任公司 一种检测灯管的方法、装置、电子设备和存储介质
CN114152894B (zh) * 2021-12-02 2022-08-02 北京博示电子科技有限责任公司 一种检测灯管的方法、装置、电子设备和存储介质
EP4231280A1 (en) * 2022-02-18 2023-08-23 Shenzhen Goodix Technology Co., Ltd. Method for measuring intensity of ambient light at electronic device, electronic device, and chip
CN114840114A (zh) * 2022-07-05 2022-08-02 荣耀终端有限公司 显示控制方法、装置及存储介质
CN117135250A (zh) * 2023-03-01 2023-11-28 荣耀终端有限公司 电子设备、屏幕亮度控制方法和导光结构
CN117194885A (zh) * 2023-09-06 2023-12-08 东莞市同和光电科技有限公司 一种红外接收芯片的光干扰抑制方法及红外接收芯片
CN117194885B (zh) * 2023-09-06 2024-05-14 东莞市同和光电科技有限公司 一种红外接收芯片的光干扰抑制方法及红外接收芯片

Also Published As

Publication number Publication date
CN111486950B (zh) 2022-04-19
CN111486950A (zh) 2020-08-04

Similar Documents

Publication Publication Date Title
WO2021213016A1 (zh) 环境光检测方法、装置、电子设备及存储介质
US20230276136A1 (en) Photographing method, electronic device, and storage medium
CN107979698B (zh) 环境光强度检测方法、装置、存储介质及电子设备
US20210243347A1 (en) Generating static images with an event camera
WO2017113343A1 (zh) 一种调节背光亮度的方法和终端
TWI421749B (zh) 顯示面板及其操作方法
US9990902B2 (en) Electronic device for adjusting brightness of screen and method thereof
US10545242B2 (en) Systems and methods for in-frame sensing and adaptive sensing control
US9697622B2 (en) Interface adjustment method, apparatus, and terminal
US8953048B2 (en) Information processing apparatus and control method thereof
CN107102936A (zh) 一种流畅度的评估方法和移动终端以及存储介质
WO2021031850A1 (zh) 图像处理的方法、装置、电子设备及存储介质
US20140306903A1 (en) Methods of evaluating touch procesing
US10978027B2 (en) Electronic display partial image frame update systems and methods
CN113763856B (zh) 环境光照强度确定方法、装置及存储介质
CN106210852B (zh) 一种终端静态图层信息检测方法及终端
EP2854122A1 (en) Adjusting light emitting pixels
KR102189643B1 (ko) 디스플레이 장치 및 그 제어 방법
CN102279692B (zh) 拖拽对象时实现预览的方法、客户端
US20200336661A1 (en) Video recording and processing method and electronic device
WO2020056744A1 (zh) 拖影评价、改善方法和电子设备
CN109740519B (zh) 控制方法和电子设备
CN114119431A (zh) 图像处理方法、装置、电子设备及存储介质
WO2021077308A1 (zh) 触摸屏处理方法、装置、移动终端以及存储介质
EP2682935A1 (en) Method for powersaving of LCD and an electronic device thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21792799

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21792799

Country of ref document: EP

Kind code of ref document: A1