CN111486950A - Ambient light detection method, device, electronic device and storage medium - Google Patents
Ambient light detection method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN111486950A CN111486950A CN202010313048.3A CN202010313048A CN111486950A CN 111486950 A CN111486950 A CN 111486950A CN 202010313048 A CN202010313048 A CN 202010313048A CN 111486950 A CN111486950 A CN 111486950A
- Authority
- CN
- China
- Prior art keywords
- light intensity
- intensity value
- display screen
- detection
- light
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 145
- 238000000034 method Methods 0.000 claims abstract description 56
- 230000008569 process Effects 0.000 claims abstract description 20
- 230000010354 integration Effects 0.000 claims description 43
- 238000012545 processing Methods 0.000 claims description 21
- 238000005259 measurement Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000009499 grossing Methods 0.000 claims description 4
- 230000002123 temporal effect Effects 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 238000002834 transmittance Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000005282 brightening Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000023077 detection of light stimulus Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000006260 foam Substances 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 229920003023 plastic Polymers 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J1/00—Photometry, e.g. photographic exposure meter
- G01J1/42—Photometry, e.g. photographic exposure meter using electric radiation detectors
- G01J1/4204—Photometry, e.g. photographic exposure meter using electric radiation detectors with determination of ambient light
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
Description
技术领域technical field
本申请涉及电子设备技术领域,更具体地,涉及一种环境光检测方法、装置、电子设备及存储介质。The present application relates to the technical field of electronic devices, and more particularly, to an ambient light detection method, device, electronic device, and storage medium.
背景技术Background technique
随着电子设备走向全面屏时代,电子设备的屏占比越来越大,给硬件和结构技术上带来更高的要求。一般地,现有的电子设备将光感传感器设置在屏幕上方,以检测环境光强度,从而对电子设备的显示屏亮度进行调节。但是,随着屏占比的提高,屏幕以外的空间减少,如何在不影响环境光检测的前提下提高屏占比成为急需解决的问题。As electronic devices move towards the era of full screen, the screen ratio of electronic devices is getting larger and larger, which brings higher requirements on hardware and structural technology. Generally, in existing electronic devices, a light sensor is arranged above the screen to detect the intensity of ambient light, so as to adjust the brightness of the display screen of the electronic device. However, as the screen-to-body ratio increases, 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.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,本申请提出了一种环境光检测方法、装置、电子设备及存储介质,既能实现当前的环境光检测,又有利于实现电子设备的全面屏设计。In view of the above problems, the present application proposes an ambient light detection method, device, electronic device and storage medium, which can not only realize the current ambient light detection, but also help realize the full-screen design of the electronic device.
第一方面,本申请实施例提供了一种环境光检测方法,所述方法包括:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;根据所述频域信息,对所述检测光强度值进行光强度补偿;根据所述补偿后的检测光强度值,确定环境光强度值。In a first aspect, an embodiment of the present application provides an ambient light detection method, the method includes: acquiring a detected light intensity value detected by a light sensor, wherein the light sensor is located below a display screen, and the detected light There is a detection value corresponding to at least one 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.
第二方面,本申请实施例提供了一种环境光检测装置,所述装置包括:数据获取模块,用于获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;频域转换模块,用于对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;数据补偿模块,用于根据所述频域信息,对所述检测光强度值进行光强度补偿;结果确定模块,用于根据所述补偿后的检测光强度值,确定环境光强度值。In a second aspect, an embodiment of the present application provides an ambient light detection device, the device includes: a data acquisition module configured to acquire a detected light intensity value detected by a light sensor, wherein the light sensor is located on a display screen Below, there is a detection value corresponding to at least one target area in the detection light intensity value, and the target area is the area where some pixels of the display screen do not emit light during the refresh process; the frequency domain conversion module is used for the Fourier transform is performed on the time domain information of the detected light intensity value to obtain frequency domain information corresponding to the detected light intensity value; a data compensation module is used for performing light intensity analysis on the detected light intensity value according to the frequency domain information Compensation; a result determination module, configured to determine an ambient light intensity value according to the compensated detected light intensity value.
第三方面,本申请实施例提供了一种电子设备,包括:显示屏;光感传感器,所述光感传感器位于所述显示屏下方;一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的环境光检测方法。In a third aspect, embodiments of the present application provide an electronic device, including: a display screen; a light sensor, where the light sensor is located below the display screen; one or more processors; a memory; and one or more applications A program, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs configured to perform the above-mentioned first aspect provides ambient light detection method.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的环境光检测方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the environment provided in the first aspect above Light detection method.
本申请提供的方案,在光感传感器位于显示屏下方的情况下,通过获取光感传感器检测到的检测光强度值,以根据该检测光强度值确定当前的环境光强度。其中,检测光强度值中至少存在一个目标区域所对应的检测值,而目标区域为显示屏在刷新过程中部分像素不发光的区域。由于检测到的检测光强度值可能会受到屏幕发光的干扰,因此,在获取到该检测光强度值之后,可对该检测光强度值的时域信息进行傅里叶变换,以得到该检测光强度值对应的频域信息,并根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰。最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。本申请在将光感传感器设置在显示屏下方时,能够实现对环境光强度的检测,从而不需要在屏幕中设置用于光感传感器接收环境光线的导光柱,有利于电子设备的全面屏设计。此外,本方案通过检测光强度值对应的频域信息进行光强度补偿,可以降低屏幕光源的亮度对环境光线检测的影响,能够提高检测结果的准确性。In the solution provided by the present application, when the light sensor is located below the display screen, the current ambient light intensity is determined according to the detected light intensity value by acquiring the detected light intensity value detected by the light sensor. Among them, there is a detection value corresponding to at least one 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. Since the detected detection light intensity value may be disturbed by the light on the screen, after the detection light intensity value is obtained, Fourier transform can be performed on the time domain information of the detection light intensity value to obtain the detection light intensity value. The frequency domain information corresponding to the intensity value, and according to the frequency domain information, light intensity compensation is performed on the detected light intensity value, so as to reduce the interference of screen light emission. Finally, according to the detected light intensity value after compensation, a more accurate ambient light intensity value is obtained. In the present application, when the light sensor is arranged under the display screen, the detection of ambient light intensity can be realized, so that a light guide column for the light sensor to receive ambient light does not need to be set in the screen, which is beneficial to the full screen design of electronic equipment . In addition, this solution performs light intensity compensation by detecting the frequency domain information corresponding to the light intensity value, which can reduce the influence of the brightness of the screen light source on the detection of ambient light, and can improve the accuracy of the detection result.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出了现有技术中的环境光检测的截面示意图。FIG. 1 shows a schematic cross-sectional view of ambient light detection in the prior art.
图2示出了根据本申请一个实施例的环境光检测方法的一种流程图。FIG. 2 shows a flowchart of an ambient light detection method according to an embodiment of the present application.
图3示出了本申请一个实施例提供的环境光检测方法中一种示意图。FIG. 3 shows a schematic diagram of an ambient light detection method provided by an embodiment of the present application.
图4示出了本申请一个实施例提供的环境光检测方法中另一种示意图。FIG. 4 shows another schematic diagram of the ambient light detection method provided by an embodiment of the present application.
图5示出了本申请一个实施例提供的环境光检测方法中又一种示意图。FIG. 5 shows another schematic diagram of an ambient light detection method provided by an embodiment of the present application.
图6示出了本申请一个实施例提供的环境光检测方法中再一种示意图。FIG. 6 shows another schematic diagram of an ambient light detection method provided by an embodiment of the present application.
图7示出了根据本申请另一个实施例的环境光检测方法的一种流程图。FIG. 7 shows a flowchart of an ambient light detection method according to another embodiment of the present application.
图8示出了根据本申请另一个实施例的环境光检测方法的另一种流程图。FIG. 8 shows another flowchart of an ambient light detection method according to another embodiment of the present application.
图9示出了根据本申请另一个实施例的环境光检测方法的又一种流程图。FIG. 9 shows yet another flowchart of an ambient light detection method according to another embodiment of the present application.
图10示出了根据本申请另一个实施例的环境光检测方法的再一种流程图。FIG. 10 shows yet another flowchart of an ambient light detection method according to another embodiment of the present application.
图11示出了根据本申请另一个实施例的环境光检测方法的还一种流程图。FIG. 11 shows still another flowchart of an ambient light detection method according to another embodiment of the present application.
图12示出了根据本申请又一个实施例的环境光检测方法的一种流程图。FIG. 12 shows a flowchart of an ambient light detection method according to yet another embodiment of the present application.
图13示出了一种根据本申请实施例提供的环境光检测方法的整体流程示意图。FIG. 13 shows a schematic overall flow diagram of an ambient light detection method provided according to an embodiment of the present application.
图14示出了根据本申请一个实施例的环境光检测装置的一种框图。FIG. 14 shows a block diagram of an ambient light detection apparatus according to an embodiment of the present application.
图15是本申请实施例的用于执行根据本申请实施例的环境光检测方法的电子设备的框图。FIG. 15 is a block diagram of an electronic device for executing an ambient light detection method according to an embodiment of the present application according to an embodiment of the present application.
图16是本申请实施例的用于执行根据本申请实施例的环境光检测方法的电子设备的截面示意图。FIG. 16 is a schematic cross-sectional view of an electronic device for performing an ambient light detection method according to an embodiment of the present application according to an embodiment of the present application.
图17是本申请实施例的用于保存或者携带实现根据本申请实施例的环境光检测方法的程序代码的存储单元。FIG. 17 is a storage unit for storing or carrying a program code for implementing the ambient light detection method according to the embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
在一些方案中,为了实现全面屏及更大的屏占比,可以将光感传感器设置在显示屏下方。但由于显示屏在显示的过程中,显示屏会发光,此时,会有一部分光漏到光感传感器上。因此,设置在显示屏下方的光感传感器接收到的光为外界环境光和显示屏的漏光之和,也即检测到的光强度是环境光叠加显示屏发光的光强度。目前通常是通过获取显示屏信息来计算出屏幕漏光,然后用光感传感器的报值减去屏幕漏光即为环境光。然而,该种方式需要获取显示屏信息,且目前主要通过画面刷新处理层(surfaceflinger)实现,在重载情况下如打游戏等,会导致画面出现卡顿。In some solutions, in order to achieve a full screen and a larger screen-to-body ratio, the light sensor can be arranged below the display screen. However, since the display screen will emit light during the display process, a part of the light will leak to the light sensor at this time. Therefore, the light received by the light sensor disposed below 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. At present, the screen light leakage is usually calculated by obtaining the display screen information, and then the ambient light is obtained by subtracting the screen light leakage from the reported value of the light sensor. However, this method needs to obtain the display screen information, and currently it is mainly implemented through a screen refresh processing layer (surfaceflinger).
虽然在一些方案中,如图1所示,可以利用贯穿显示屏的导光柱105(通常使用透明塑料制作,其顶部直接顶到盖板101或者外界环境)来避免显示屏发光的干扰,使得环境光经过导光柱进入光感器件104后,光感器件104可检测到准确的环境光强度。然而,导光柱的设置需要占用一定的盖板空间,增加了黑边宽度,无法实现显示屏的全面屏设计。Although in some solutions, as shown in FIG. 1 , a light guide column 105 (usually made of transparent plastic, the top of which directly touches the
因此,发明人经过长期的研究发现并提出了本申请实施例提供的环境光检测方法、装置、电子设备以及存储介质,在光感传感器位于显示屏下方的情况下,可通过光感传感器的检测光强度值对应的频域信息来补偿屏幕的漏光,得到较为准确的环境光强度值,既能够降低屏幕光源的亮度对环境光线检测的影响,提高环境光检测的准确性,又有利于电子设备的全面屏设计。具体的环境光检测方法在后续的实施例中进行详细的说明。Therefore, after long-term research, the inventor has found and proposed the ambient light detection method, device, electronic device, and storage medium provided by the embodiments of the present application. The frequency domain information corresponding to the light intensity value can compensate the light leakage of the screen and obtain a more accurate ambient light intensity value, which can not only reduce the influence of the brightness of the screen light source on the ambient light detection, improve the accuracy of ambient light detection, but also be beneficial to electronic equipment. full-screen design. The specific ambient light detection method will be described in detail in the following embodiments.
请参阅图2,图2示出了本申请一个实施例提供的环境光检测方法的流程示意图。在具体的实施例中,该环境光检测方法可应用于如图8所示的环境光检测装置700以及配置有所述环境光检测装置700的电子设备(图10、图11)。下面将针对图2所示的流程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:Please refer to FIG. 2. FIG. 2 shows a schematic flowchart of an ambient light detection method provided by an embodiment of the present application. In a specific embodiment, the ambient light detection method can be applied to the ambient
步骤S110:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。Step S110: Obtain the detected light intensity value detected by the light sensor, wherein the light sensor is located below the display screen, and the detected light intensity value has at least one detected value corresponding to a target area, and the target area is: The display screen is an area where some pixels do not emit light during the refresh process.
在本申请实施例中,电子设备可以获取光感传感器检测到的检测光强度值,以根据该检测光强度值确定当前的环境光强度。其中,检测光强度值中至少存在一个目标区域所对应的检测值,该目标区域为显示屏在刷新过程中部分像素不发光的区域。In this embodiment of the present application, the electronic device may acquire the detected light intensity value detected by the light sensor, so as to determine the current ambient light intensity according to the detected light intensity value. Wherein, there is a detection value corresponding to at least one 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.
在本申请实施例中,光感传感器可用于采集光线以进行光强度检测,可以是环境光传感器,其可以采用光电晶体管、光敏电阻或光电二极管等器件实现。其中,光感传感器可设置在电子设备的显示屏下方,以提高电子设备的屏占比。在一些实施例中,光感传感器的位置可与显示屏的显示区域对应。In this embodiment of the present application, the light sensor may be used to collect light for light intensity detection, and may be an ambient light sensor, which may be implemented by using a device such as a phototransistor, a photoresistor, or a photodiode. Wherein, the light sensor can be arranged below the display screen of the electronic device, so as to increase the screen ratio of the electronic device. In some embodiments, the location of the light sensor may correspond to the display area of the display screen.
需要说明的是,显示屏在显示画面时需要不断的刷新以保证画面的更新及显示质量。而当使用高速相机或者将相机的曝光时间调短,对电子设备的显示屏进行拍照时,可以看到显示屏在刷新过程中存在部分区域的像素不发光(也可称为黑条),且该不发光的区域会随刷新移动。该不发光的区域即为上述目标区域。例如,如图3所示,显示屏140中的斜线填充的区域141为显示屏当前不发光的区域。It should be noted that the display screen needs to be constantly refreshed when displaying the picture to ensure the updating and display quality of the picture. When a high-speed camera is used or the exposure time of the camera is shortened to take a picture of the display screen of an electronic device, it can be seen that there are some areas of pixels in the display screen that do not emit light during the refresh process (also known as black bars), and This non-luminous area moves with the refresh. The non-luminous area is the above-mentioned target area. For example, as shown in FIG. 3 , the
由于目标区域是不发光的区域,因此,该目标区域的显示画面为黑色,黑色不漏光。若光感传感器对该目标区域进行光感检测,其得到的检测光强度值可以是无干扰数据,即基本不受显示屏发光的影响的环境光强度值。而若对该目标区域以外的其他区域进行光感检测,由于其他区域是发光的区域,因此,存在显示屏发光的光强度的干扰,光感传感器得到的检测光强度值为显示屏漏光强度值和环境光强度值之和,即干扰数据。Since the target area is an area that does not emit light, the display screen of the target area is black, and black does not leak light. If the light-sensing sensor performs light-sensing detection on the target area, the detected light intensity value obtained by the light-sensing sensor may be non-interference data, that is, the ambient light intensity value that is basically not affected by the lighting of the display screen. However, if the light-sensing detection is performed on other areas than the target area, since other areas are light-emitting areas, there is interference with the light intensity of the display screen, and the detected light intensity value obtained by the light sensor is the display screen light leakage intensity value. and the sum of the ambient light intensity value, that is, the interference data.
在一些实施例中,可以通过调整光感传感器检测的积分周期,使得光感传感器获取到的检测光强度值中可以至少存在一个目标区域所对应的检测值,也即至少存在一个无干扰的的环境光强度值,以便后续能根据获取到检测光强度值,得到较为准确的环境光强度值。In some embodiments, the integration period detected by the light sensor can be adjusted, so that there is at least one detection value corresponding to the target area in the detected light intensity value acquired by the light sensor, that is, there is at least one non-interfering light intensity value. Ambient light intensity value, so that a more accurate ambient light intensity value can be obtained according to the acquired detection light intensity value.
步骤S120:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。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.
虽然获取到的检测光强度值至少存在一个无干扰数据,但由于屏下的光感传感器检测到的光强度值大多都是环境光叠加显示屏发光的干扰数据,浪费数据较多,数据准确率不高。因此,在本申请实施例中,电子设备可对光感传感器检测到的检测光强度值的时域信息进行傅里叶变换,得到检测光强度值对应的频域信息,以根据该频域信息得到较为准确的环境光强度值。既能够充分利用所有抓取到的数据,也提高了环境光检测的准确性。Although there is at least one non-interference data in the detected light intensity value obtained, most of the light intensity values detected by the light sensor under the screen are the interference data of ambient light superimposed on the display screen, which wastes a lot of data and reduces the accuracy of the data. not tall. Therefore, in this embodiment of the present application, 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 obtain the frequency domain information corresponding to the detected light intensity value. Get a more accurate ambient light intensity value. It can not only make full use of all the captured data, but also improve the accuracy of ambient light detection.
可以理解的是,由于干扰数据为环境光与显示屏发光强度的叠加,因此,干扰数据的值通常都是大于无干扰数据的。也就是说,因为获取到的检测光强度值至少存在一个无干扰数据,导致检测光强度值的时域波形可以存在低点,从而可进行有效的傅里叶变换。It can be understood that, since the interference data is the superposition of ambient light and the luminous intensity of the display screen, the value of the interference data is usually greater than that of the non-interference data. That is to say, because at least one piece of non-interference data exists in the acquired detected light intensity value, the time domain waveform of the detected light intensity value may have a low point, so that an effective Fourier transform can be performed.
例如,当刷新频率为60Hz的显示屏显示白色画面时,光感传感器的积分值曲线可以如图4所示,横轴方向为时间,纵轴方向为检测光强度值。可以看到大部分时间其光强度值较大,只有很小的时候光强度值变小,为高的时间约16.57ms,为低的时间只有90us左右,且该曲线具有周期性。其中,低的为无干扰的环境光值,高的则为环境光与显示屏漏光之和。For example, when a display screen with a refresh rate of 60 Hz displays a white image, the integrated value curve of the light sensor can be as shown in Figure 4, where the horizontal axis is time, and the vertical axis is the detected light intensity value. It can be seen that the light intensity value is large most of the time, and the light intensity value becomes small only when it is very small. The high time is about 16.57ms, and the low time is only about 90us, and the curve is periodic. Among them, the low value is the ambient light value without interference, and the high value is the sum of ambient light and display light leakage.
在一些实施例中,对检测光强度值的时域信息进行傅里叶变换后,可以得到对应频率点的频点强度,该频点强度可以用于表征显示屏在当前显示画面下的漏光影响量,不同的频点强度代表了显示屏在不同显示画面下的屏幕漏光影响量。其中,当显示画面为白色画面时,该频点强度最高,也即显示屏的漏光影响量最大,而当显示画面为黑色画面时,没有该频点强度,也即显示屏的漏光影响量为0。In some embodiments, after Fourier transform is performed on the time domain information of the detected light intensity value, the frequency point intensity of the corresponding frequency point can be obtained, and the frequency point intensity can be used to characterize the light leakage effect of the display screen under the current display screen. The intensity of different frequency points represents the influence of screen light leakage on the display screen under different display images. Among them, when the display screen is a white screen, the intensity of the frequency point is the highest, that is, the amount of light leakage of the display screen is the largest, and when the display screen is a black screen, there is no intensity of the frequency point, that is, the amount of light leakage of the display screen is 0.
例如,当显示屏显示白色画面时,请参阅图5,图5示出了一种检测光强度值的时域波形示意图。可以看到该波形有明显的周期特性,其周期即为显示屏的刷新周期。进行傅里叶变换后得到的频域波形如图6所示,可以看到该频域波形有明显的频点强度。该频点强度代表了白色画面下的屏幕漏光影响量。For example, when the display screen displays a white picture, please refer to FIG. 5 , which shows a schematic diagram of a time-domain waveform for detecting light intensity values. It can be seen that the waveform has obvious periodic characteristics, and its cycle is the refresh cycle 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 intensity. The intensity of this frequency point represents the amount of screen light leakage effect under the white picture.
步骤S130:根据所述频域信息,对所述检测光强度值进行光强度补偿。Step S130: Perform light intensity compensation on the detected light intensity value according to the frequency domain information.
在本申请实施例中,在得到上述频域信息后,电子设备可以对光感传感器检测到的检测光强度值进行光强度补偿,以去除屏幕漏光的干扰,得到较为准确的环境光强度。In the embodiment of the present application, after obtaining the above frequency domain information, the electronic device can perform light intensity compensation on the detected light intensity value detected by the light sensor, so as to remove the interference of light leakage from the screen and obtain a relatively accurate ambient light intensity.
由于频点强度可以用于表征显示屏在当前显示画面下的漏光影响量,因此,在一些实施例中,可以根据该漏光影响量确定要补偿的补偿差值,以降低屏幕漏光影响量到最低。然后再根据该补偿差值对检测光强度值进行补偿,从而可得到有效的环境光值。作为一种方式,可以预先建立频点强度与补偿差值之间的对应关系,从而在获取到当前的频点强度时,可根据该对应关系,找到对应的补偿差值进行补偿。Since the intensity of the frequency point can be used to characterize the light leakage influence amount of the display screen under the current display picture, in some embodiments, the compensation difference to be compensated can be determined according to the light leakage influence amount, so as to reduce the light leakage influence amount of the screen to the minimum . Then, the detected light intensity value is compensated according to the compensation difference, so as to obtain an effective ambient light value. As a way, the corresponding relationship between the frequency point intensity and the compensation difference value may 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.
步骤S140:根据所述补偿后的检测光强度值,确定环境光强度值。Step S140: Determine an ambient light intensity value according to the compensated detected light intensity value.
在申请实施例中,电子设备在得到补偿后的检测光强度值后,可以根据该补偿后的检测光强度值,确定当前的环境光强度值。从而充分利用了光感传感器抓取的所有检测光强度值,得到了较为准确的环境光强度,避免了数据的浪费。In the application embodiment, after obtaining the compensated detection light intensity value, the electronic device may determine the current ambient light intensity value according to the compensated detection light intensity value. In this way, all detected light intensity values captured by the photosensitive sensor are fully utilized, and a relatively accurate ambient light intensity is obtained, thereby avoiding data waste.
在一些实施例中,电子设备可以将补偿后的检测光强度值,作为当前的环境光强度值。也可以是将多个补偿后的检测光强度值进行数据融合平滑处理后,得到的检测光强度值作为当前的环境光强度值。其中,数据融合平滑处理所需要的数据个数此处不作限定,可根据实际需求进行合理设定。In some embodiments, the electronic device may use the compensated detected light intensity value as the current ambient light intensity value. The detected light intensity value obtained after performing data fusion and smoothing processing on a plurality of compensated detection light intensity values may also be used as the current ambient light intensity value. The number of data required for data fusion and smoothing processing is not limited here, and can be reasonably set according to actual needs.
在一些实施例中,电子设备可以是实时上报环境光强度值,也可以是每隔指定时间进行环境光强度值的上报。作为一种方式,电子设备可以从指定时间内得到的补偿后的检测光强度值中,选取指定数量的值进行上报。可以是随机选择,也可以是根据前后数据的波动变化进行选择,具体选择方式此处不作限定。其中,根据前后数据的波动变化进行选择,可以理解为在一个补偿的检测光强度值被选中上报时,如果后续补偿的检测光强度值还是同样的值时,不进行上报,直至存在一个不同值时,才进行上报,从而仅上报有用数据,避免大量无意义数据的上报。In some embodiments, 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 select a specified number of values from the compensated detection light intensity values obtained within a specified time period for reporting. It may be selected randomly, or may be selected according to fluctuations in the data before and after, and the specific selection method is not limited here. Among them, the selection is made according to the fluctuation of the data before and after, it can be understood that when a compensated detection light intensity value is selected for reporting, if the subsequent compensated detection light intensity value is still the same value, it will not be reported until there is a different value. Only when the data is reported, only the useful data is reported, and the report of a large amount of meaningless data is avoided.
在一些实施例中,电子设备在获取到当前的环境光强度值后,可以根据该环境光强度至对显示屏的亮度进行调节,提高了用户的视觉体验。In some embodiments, after acquiring the current ambient light intensity value, the electronic device can adjust the brightness of the display screen according to the ambient light intensity, which improves the user's visual experience.
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过获取光感传感器检测到的检测光强度值,以对该检测光强度值的时域信息进行傅里叶变换,从而得到该检测光强度值对应的频域信息。其中,检测光强度值中至少存在一个目标区域所对应的检测值,而目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。这样,通过检测光强度值对应的频域信息进行光强度补偿,可以降低屏幕光源的亮度对环境光线检测的影响,从而在将光感传感器设置在显示屏下方时,无需设置导光柱,也能够实现对环境光强度的准确检测。In the ambient light detection method provided by the embodiment of the present application, when the light sensor is located below the display screen, the detected light intensity value detected by the light sensor is obtained to perform Fourier analysis on the time domain information of the detected light intensity value. Leaf transformation, so as to obtain the frequency domain information corresponding to the detected light intensity value. Among them, there is a detection value corresponding to at least one 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. Then, according to the frequency domain information, light intensity compensation can be performed on the detected light intensity value to reduce the interference of screen light emission, and finally a relatively accurate ambient light intensity value can be obtained according to the compensated detected light intensity value. In this way, the light intensity compensation is performed by detecting the frequency domain information corresponding to the light intensity value, which can reduce the influence of the brightness of the screen light source on the detection of ambient light. Accurate detection of ambient light intensity is achieved.
请参阅图7,图7示出了本申请另一个实施例提供的环境光检测方法的流程示意图。下面将针对图7所示的流程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:Referring to FIG. 7 , FIG. 7 shows a schematic flowchart of an ambient light detection method provided by another embodiment of the present application. The flow shown in FIG. 7 will be described in detail below, and the ambient light detection method shown may specifically include the following steps:
步骤S210:获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。Step S210: Obtain the detected light intensity value detected by the light sensor, wherein the light sensor is located below the display screen, and the detected light intensity value has at least one detected value corresponding to a target area, and the target area is The display screen is an area where some pixels do not emit light during the refresh process.
在本申请实施例中,步骤S210可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for step S210, reference may be made to the content of the foregoing embodiments, and details are not repeated here.
在一些实施例中,为了保证光感传感器检测到的检测光强度值中至少存在一个目标区域所对应的检测值,可以对光感传感器的积分周期进行设置。其中,光感传感器的积分周期可以是指获得一个光强度值所需的积分时间。In some embodiments, in order to ensure that there is a detection value corresponding to at least one target area in the detected light intensity values detected by the light sensor, 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.
在一些实施例中,可以根据采样定理,将光感传感器的积分周期设为小于目标区域(黑条)对应的时间宽度的一半,以保证光感传感器可以在刷新的目标区域(黑条)中准确抓取到无干扰的环境光强度值。In some embodiments, according to the sampling theorem, 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 captures undisturbed ambient light intensity values.
作为一种方式,目标区域(黑条)对应的时间宽度可根据显示屏的刷新周期确定,从而可确定出光感传感器的积分周期。具体地,请参阅图8,在步骤S210之前,本申请的环境光检测方法还可以包括:As a way, the time width corresponding to the target area (black bar) can be determined according to the refresh cycle of the display screen, so that the integration cycle of the light sensor can be determined. Specifically, referring to FIG. 8, before step S210, the ambient light detection method of the present application may further include:
步骤S202a:获取显示屏中的目标区域,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域。Step S202a: 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.
步骤S204a:确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度。Step S204a: Determine the first time width corresponding to the target area within the refresh period of the display screen.
在一些实施例中,可以使用高速相机或者将相机的曝光时间调短,对显示屏进行拍照录像,从而可以获取到显示屏中部分像素不发光的目标区域。然后可以通过相机的录屏时间进行换算,将目标区域(黑条)的像素宽度所对应的时间的换算出来,以得到目标区域在显示屏的一个刷新周期内所对应的第一时间宽度。例如,当显示屏的刷新频率为60Hz(即1s钟刷新60张显示画面)时,刷新一次显示画面的时间约为16.6ms(即刷新周期),可通过计算黑条的像素宽度与整个显示屏的像素宽度的比例,来求出黑条的像素宽度所对应的第一时间宽度,如180us。当然,上述获取目标区域的方式仅为举例,此处不作具体限定。In some embodiments, a high-speed camera can be used or the exposure time of the camera can be shortened to take pictures and videos on the display screen, so that a target area in which some pixels in the display screen do not emit light can be obtained. Then, the screen recording time of the camera can be used for conversion, and the time corresponding to the pixel width of the target area (black bar) can be converted to obtain the first time width corresponding to the target area in one refresh cycle of the display screen. For example, when the refresh rate of the display screen is 60Hz (that is, 60 display images are refreshed in 1s), the time to refresh a display screen is about 16.6ms (that is, the refresh cycle). By calculating the pixel width of the black bar and the entire display screen The ratio of the pixel width of the black bar to obtain the first time width corresponding to the pixel width of the black bar, such as 180us. Of course, the above manner of acquiring the target area is only an example, and is not specifically limited here.
可以理解的是,显示屏的刷新频率有多种,如60Hz、90Hz、120Hz等,不同的刷新频率其对应的目标区域的第一时间宽度不一致。It can be understood that there are various refresh frequencies of the display screen, such as 60 Hz, 90 Hz, 120 Hz, etc., and the first time widths of the corresponding target areas of different refresh frequencies are inconsistent.
步骤S206a:基于所述第一时间宽度,获取光强度测量的第一积分周期,其中,所述第一积分周期小于所述第一时间宽度的一半。Step S206a: Based on the first time width, obtain a first integration period of the light intensity measurement, wherein the first integration period is less than half of the first time width.
步骤S208a:控制光感传感器以所述第一积分周期开始进行光强度检测。Step S208a: Control the light sensor to perform light intensity detection at the first integration period.
在一些实施例中,由于目标区域可随刷新移动,因此,可以将光感传感器进行光强度测量的积分周期设为小于目标区域的第一时间宽度的一半,以在目标区域移动到光感传感器的检测范围处时,光感传感器可以进行光感检测,从而光感传感器可检测到至少一个无干扰的环境光强度值。这样,使用传感器自身实现屏下的光线检测,通过屏幕刷新的黑条进行积分获取环境光亮度。对显示屏的画面没有依赖,不需要截屏计算,简化当前屏下光感实现的计算及耦合复杂度,并解决重载情况下的卡顿等问题。In some embodiments, since the target area can move with the refresh, the integration period of the light intensity measurement performed by the light sensor can be set to be less than half of the first time width of the target area, so as to move to the light sensor in the target area When the detection range is within the range, the light sensing sensor can perform light sensing detection, so that the light sensing sensor can detect at least one non-interference ambient light intensity value. In this way, the sensor itself is used to realize the light detection under the screen, and the ambient light brightness is obtained by integrating the black bars refreshed by the screen. It does not depend on the screen of the display screen, and does not require screenshot calculation, which simplifies the calculation and coupling complexity of the current light sensing implementation under the screen, and solves problems such as freezing under heavy load.
例如,在上述例子中,第一积分周期需要小于90us。从而在一个刷新周期内,光感传感器至少可以检测到16.666/0.09=185个数据。其中,185个数据有一个无干扰的有效数据,其它数据都受屏幕漏光影响。从而光感传感器可以实现最快16.6ms上报一个检测光强度值。在一些实施例中,也可以按最快20ms上报一个检测光强度值,此处不作限定。For example, in the above example, the first integration period needs to be less than 90us. Therefore, in one refresh cycle, the light sensor can detect at least 16.666/0.09=185 data. Among them, 185 data have a valid data without interference, and other data are affected by screen light leakage. Therefore, the light sensor can report a detected light intensity value at the fastest 16.6ms. In some embodiments, a detected light intensity value may also be reported at the fastest 20 ms, which is not limited here.
在一些实施例中,当显示屏处于DC模式(低亮无频闪护眼模式)时,电子设备可控制光感传感器以上述第一积分周期开始进行光强度检测。In some embodiments, when the display screen is in the DC mode (low-brightness and no stroboscopic eye protection mode), the electronic device can control the light sensor to start detecting the light intensity with the above-mentioned first integration period.
在一些实施例中,使用上述计算积分方法获取光感值时,光感传感器的感度(灵敏度)可以很高,以能够在极短的积分时间内输出光感值,且光感传感器的ADC(Analog-to-Digital Converter,模拟/数字转换器)输出值相对环境光的LUX值应该大于1倍以保证环境光的检测准确度。In some embodiments, when the above-mentioned calculation and integration method is used to obtain the photosensitive value, the sensitivity (sensitivity) of the photosensitive sensor can be very high, so as to be able to output the photosensitive value in a very short integration time, and the ADC ( Analog-to-Digital Converter, analog/digital converter) output value relative to the LUX value of ambient light should be greater than 1 times to ensure the detection accuracy of ambient light.
作为一种方式,可以使用高灵敏度光感器件来进行光感检测,不仅能够分析环境光亮度用于背光调节,还可以识别出环境光的抖动幅度,从而获取环境光的频闪,用于相机的拍照不均匀去除(在室内环境光有一定的屏闪),由于相机曝光是逐行曝光,会出现黑白横条的情况。As a way, a high-sensitivity light-sensing device 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 stroboscopic of the ambient light, which can be used in the camera The photo is unevenly removed (there is a certain screen flicker in the indoor ambient light), because the camera exposure is progressive exposure, there will be black and white horizontal bars.
在一些实施例中,当显示屏有刷新同步信号时可以同步到光感传感器端,从而可以使用刷新同步来控制积分的开始。如图8所示,光感器件通常包括中断信号,I2C,gnd,在这里可以增加一个Sync同步信号。Sync同步信号需要连接显示屏的同步信号,这样显示屏刷新的时候可以发同步信号给到光感传感器,光感积分获得环境光值。从而避免在非刷新黑条的时间内积分造成较多无效数据。In some embodiments, when the display screen 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. As shown in Figure 8, the photosensitive device usually includes interrupt signals, 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 screen, so that when the display screen is refreshed, a synchronization signal can be sent to the light sensor, and the light sensor integration can obtain the ambient light value. In this way, more invalid data can be avoided due to integration during the time when the black bars are not refreshed.
作为另一种方式,目标区域(黑条)对应的时间宽度可根据PWM周期确定,从而可确定出光感传感器的积分周期。具体地,请参阅图9,在步骤S210之前,本申请的环境光检测方法还可以包括:As another way, the time width corresponding to the target area (black bar) can be determined according to the PWM period, so that the integration period of the light sensor can be determined. Specifically, referring to FIG. 9, before step S210, the ambient light detection method of the present application may further include:
步骤S202b:获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度。Step S202b: Acquire a second time width during which the display screen is in an off-screen state in one PWM period.
可以理解的是,当显示屏处于PWM调光模式时,在一个PWM(Pulse WidthModulation,脉冲宽度调制)周期内,会有一部分时间处于亮屏状态,一部分时间处于灭屏状态,其是通过亮屏和灭屏的切换实现人眼看到的较暗亮度的功能。由于显示屏处于灭屏状态时,显示屏也不会发光,因此,在一些实施例中,当显示屏处于PWM调光模式时,目标区域(黑条)对应的时间宽度也可以是一个PWM周期内处于灭屏状态的时间宽度。It is understandable that when the display screen is in the PWM dimming mode, in a PWM (Pulse Width Modulation) cycle, there will be a part of the time in the bright screen state, and a part of the time in the off screen state, which is achieved by brightening the screen. The switch between and off the screen realizes the function of darker brightness seen by the human eye. Since the display screen will not emit light even when the display screen is in the off-screen state, in some embodiments, when the display screen is in the PWM dimming mode, the time width corresponding to the target area (black bar) may also be one PWM period The duration of time in the off-screen state.
例如,刷新频率为60hz的显示屏,在PWM调光模式下的屏闪频率可为240hz,此时,目标区域可以是以240HZ的速度刷新。通过计算可以得到PWM周期为1000/240=4.16ms,其中,显示处于灭屏状态的时间宽度约3.7ms。实际测试在低亮度10nit时目标区域的时间宽度为3ms,也即在PWM调光模式下,显示屏中的目标区域的宽度更宽,光感传感器很容易积分获取到精确的环境光强度值。For example, for a display screen with a refresh rate of 60hz, the screen flash frequency in the PWM dimming mode may be 240hz, and at this time, the target area may be refreshed at a speed of 240hz. It can be obtained by calculation that the PWM period is 1000/240=4.16ms, wherein the time width of the display in the off-screen state is about 3.7ms. In the actual test, the time width of the target area is 3ms when the low brightness is 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.
在一些实施例中,一个PWM周期内显示屏处于灭屏状态的第二时间宽度,与显示屏的亮度有关。显示屏的当前亮度越暗,表明一个PWM周期内显示屏处于灭屏状态越长,即目标区域对应的时间宽度越长;显示屏的当前亮度越亮,表明一个PWM周期内显示屏处于灭屏状态越短,即目标区域对应的时间宽度越短。In some embodiments, 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, the longer the display screen is off in a PWM cycle, that is, the longer the time width corresponding to the target area; the brighter the current brightness of the display screen, the longer the screen is off in a PWM cycle The shorter the state, the shorter the time width corresponding to the target area.
可以理解的是,当目标区域对应的时间宽度越长时,光感传感器检测到到光强度值的干扰数据越少,当目标区域对应的时间宽度越短时,光感传感器检测到到光强度值的干扰数据越多。It can be understood that when the time width corresponding to the target area is longer, the light sensor detects less interference data of the light intensity value. When the time width corresponding to the target area is shorter, the light sensor detects the light intensity. The more noisy data the value is.
步骤S204b:基于第二时间宽度,获取光强度测量的第二积分周期,其中,所述第二积分周期小于所述第二时间宽度的一半。Step S204b: Based on the second time width, obtain a second integration period of the light intensity measurement, wherein the second integration period is less than half of the second time width.
步骤S206b:控制光感传感器以所述第二积分周期开始进行光强度检测。Step S206b: Control the light-sensing sensor to perform light intensity detection at the second integration period.
在一些实施例中,可以将光感传感器进行光强度测量的积分周期设为小于目标区域的第二时间宽度的一半,以在目标区域移动到光感传感器的检测范围处时,光感传感器可以进行光感检测,从而光感传感器可检测到至少一个无干扰的环境光强度值。In some embodiments, the integration period of the light intensity measurement performed by the light sensor 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 The light sensing detection is performed so that the light sensing sensor can detect at least one undisturbed ambient light intensity value.
在一些实施例中,可以将上述两种积分周期进行结合,以根据具体的应用场景,选择出合适的积分周期。具体地,请参阅图10,在步骤S202a之前,本申请的环境光检测方法还可以包括:In some embodiments, the above two integration periods may be combined to select an appropriate integration period according to specific application scenarios. Specifically, referring to FIG. 10 , before step S202a, the ambient light detection method of the present application may further include:
步骤S200:判断当前是否处于PWM调光模式。Step S200: Determine whether it is currently in the PWM dimming mode.
具体地,当显示屏当前处于PWM调光模式时,可以控制光感传感器以上述第二积分周期开始进行光强度检测,也即执行步骤S202b~步骤S206b。当显示屏当前不处于PWM调光模式时,可以控制光感传感器以上述第一积分周期开始进行光强度检测,也即执行步骤S202a~步骤S208a。Specifically, when the display screen is currently in the PWM dimming mode, the light sensor can be controlled to start detecting the light intensity with the above-mentioned second integration period, that is, steps S202b to S206b are executed. When the display screen is not currently in the PWM dimming mode, the light sensor can be controlled to start detecting the light intensity with the above-mentioned first integration period, that is, steps S202a to S208a are executed.
由于PWM调光模式下的黑条宽度与显示屏亮度有关,因此,在一些实施例中,在根据PWM黑条进行计算之前,可以先判断亮度是否符合条件。具体地,请参阅图11,在步骤S202b之前,本申请的环境光检测方法还可以包括:Since the width of the black bars in the PWM dimming mode is related to the brightness of the display screen, in some embodiments, before performing the calculation according to the PWM black bars, it can be determined whether the brightness meets the conditions. Specifically, referring to FIG. 11, before step S202b, the ambient light detection method of the present application may further include:
步骤S201:判断当前显示屏的亮度是否大于预设亮度。Step S201: Determine whether the brightness of the current display screen is greater than a preset brightness.
通常情况下,显示屏的亮度较暗时,才会使用PWM调光模式,且由于显示屏的亮度越高,目标区域对应的时间宽度越短,直至消失,导致光感传感器无法有效检测到环境光强度值,因此,在一些实施例中,电子设备可判断当前显示屏的亮度是否大于预设亮度。Under normal circumstances, the PWM dimming mode is only used when the brightness of the display screen is dark, and because the brightness of the display screen is higher, the time width corresponding to the target area is shorter until it disappears, so that the light sensor cannot effectively detect the environment. Therefore, in some embodiments, the electronic device can determine whether the brightness of the current display screen is greater than the preset brightness.
具体地,如果大于所述预设亮度,则当前光感传感器不适合以第二积分周期进行检测,可以控制光感传感器以上述第一积分周期开始进行光强度检测,也即执行步骤S202a~步骤S208a;如果小于或等于所述预设亮度,则当前光感传感器很适合以第二积分周期进行检测,可以控制光感传感器以上述第二积分周期开始进行光强度检测,也即执行步骤S202b~步骤S206b。Specifically, if it is greater than the preset brightness, the current light sensor is not suitable for detection with the second integration period, and the light sensor can be controlled to start light intensity detection with the first integration period, that is, steps S202a to S202a are executed. S208a; if it is less than or equal to the preset brightness, the current photosensitive sensor is very suitable for detection in the second integration period, and the photosensitive sensor can be controlled to start the detection of light intensity in the second integration period, that is, steps S202b~ Step S206b.
步骤S220:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。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.
在本申请实施例中,步骤S220可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for step S220, reference may be made to the content of the foregoing embodiments, which will not be repeated here.
在一些实施例中,可以是对检测光强度值的时域信息进行快速傅里叶变换(fastFourier transform,FFT),以提高运算速度。In some embodiments, a fast Fourier transform (fast Fourier transform, FFT) may be performed on the time domain information of the detected light intensity value, so as to improve the operation speed.
可以理解的是,在FFT中,利用WN的周期性和对称性,可以把一个N项序列(设N=2k,k为正整数),分为两个N/2项的子序列,每个N/2点DFT变换需要(N/2)2次运算,再用N次运算把两个N/2点的DFT变换组合成一个N点的离散傅里叶变换(Discrete FourierTransform,DFT)。这样变换以后,总的运算次数就变成N+2*(N/2)^2=N+N^2/2。虽然,FFT提高了运算速度,但是,也对参与运算的样本序列作出了限制,即要求样本数为2^N点。也就是说,1024=2^10满足FFT运算要求,1000点则不满足,若采用1000点,FFT算法会在其后补零,自动不足1024点。但是这样,被分析的样本就变了,结果误差较大。It can be understood that in FFT, using the periodicity and symmetry of WN, an N-term sequence (set N=2k, k is a positive integer) can be divided into two N/2-term subsequences, each The N/2-point DFT transform requires (N/2) 2 operations, and then uses N operations to combine two N/2-point DFT transforms into an N-point discrete Fourier transform (Discrete Fourier Transform, DFT). After this transformation, the total number of operations becomes N+2*(N/2)^2=N+N^2/2. Although FFT improves the operation speed, it also imposes restrictions on the sample sequence participating in the operation, that is, the number of samples is required to be 2^N points. That is to say, 1024=2^10 satisfies the FFT operation requirements, but not 1000 points. If 1000 points are used, the FFT algorithm will pad zeros after it, and it will automatically be less than 1024 points. However, in this way, the sample being analyzed has changed, and the error of the result is large.
因此,为了保证数据的准确率,在一些实施例中,光感传感器可以不断的上报数据流,这些数据流可进入一个数据队列。该数据队列可以设置符合FFT的样本书要求,例如队列长度可设为1024,遵循数据先入先出的原则,则可对数据队列中的数据不停的进行傅里叶变换以计算频率信息用于后续补偿处理,当数据出队列后可以将出队列的数据丢弃。Therefore, in order to ensure the accuracy of the data, in some embodiments, the light sensor may continuously report data streams, and these data streams may enter a data queue. The data queue can be set to meet the sample book requirements of FFT. For example, the queue length can be set to 1024. Following the principle of data first-in, first-out, the data in the data queue can be continuously Fourier transform to calculate the frequency information for In subsequent compensation processing, when the data is dequeued, the dequeued data can be discarded.
步骤S230:根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值。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.
在一些实施例中,可以预先设立频域信息与补偿值的对应关系,从而在获取到当前的频域信息时,可根据该对应关系,找到对应的补偿值进行补偿。In some embodiments, a 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 acquired, a corresponding compensation value may be found for compensation according to the corresponding relationship.
作为一种方式,可以预先根据不同显示画面的频率信息进行拟合,优化,得到拟合模型。从而,在获取到当前的频域信息时,可根据该拟合模型,找到对应的补偿值进行补偿。具体地,在步骤S230之前,本申请的环境光检测方法还可以包括:As a method, fitting and optimization can be performed in advance according to the frequency information of different display screens to obtain a fitting model. Therefore, when the current frequency domain information is acquired, a corresponding compensation value can be found for compensation according to the fitting model. Specifically, before step S230, the ambient light detection method of the present application may further include:
当显示屏处于黑暗环境时,获取所述显示屏显示目标画面时光感传感器检测到的屏幕光强度值;对所述屏幕光强度值的时域信息进行傅里叶变换,得到所述屏幕光强度值对应的频域信息;对不同目标画面下的所述屏幕光强度值对应的频域信息进行拟合,得到拟合模型,所述拟合模型用于表征频域信息与补偿值的对应关系。When the display screen is in a dark environment, obtain the screen light intensity value detected by the light sensor when the display screen displays the target image; 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 values under different target images is fitted to obtain a fitting model, and the fitting model is used to characterize the corresponding relationship between the frequency domain information and the compensation value. .
在一些实施例中,可将电子设备至于黑暗环境,此时由于不存在环境光的影响,光感传感器检测到的光强度值仅为屏幕光强度值,对该屏幕光强度值的时域信息进行傅里叶变换后,可得到屏幕光强度值对应的频域信息,也即屏幕漏光影响量。因此,可以通过控制显示屏显示不同的目标画面,来获取每个目标画面下的屏幕光强度值对应的频域信息,得到不同显示画面下的屏幕漏光影响量。例如,如果读到了频域幅值是接近或等于白色画面的频域幅值,则可通过白色画面对应的补偿值进行补偿。In some embodiments, the electronic device can be placed in a dark environment. At this time, since there is no influence of ambient light, the light intensity value detected by the light sensor is only the screen light intensity value, and the time domain information of the screen light intensity value After the Fourier transform is performed, the frequency domain information corresponding to the screen light intensity value, that is, the influence amount of screen light leakage, can be obtained. Therefore, the frequency domain information corresponding to the screen light intensity value under each target picture can be obtained by controlling the display screen to display different target pictures, and the influence amount of screen light leakage under different display pictures can be obtained. For example, if it is read that the frequency domain amplitude value is close to or equal to the frequency domain amplitude value of the white picture, the compensation value corresponding to the white picture can be used for compensation.
在一些实施例中,由于屏幕光强度值对应的频域信息中可以包含对应频率点的频点强度,因此,电子设备可以将不同的屏幕光强度值和其对应频点强度进行拟合、优化,可以得到拟合模型。该拟合模型可用于表征频域信息与补偿值的对应关系。作为一种方式,通过将不同的屏幕光强度值和其对应频点强度进行拟合,可以得到屏幕光强度值和其对应频点强度的线性关系,然后可根据拟合后的屏幕光强度值估算对应的补偿值,将得到补偿值和对应的频点强度进行拟合优化,可以得到上述拟合模型。其中,也可以是将屏幕光强度值直接作为补偿值进行拟合,此处不作限定,仅需将频点强度与补偿值关联起来即可。In some embodiments, since the frequency domain information corresponding to the screen light intensity value may include the frequency point intensity of the corresponding frequency point, the electronic device can fit and optimize different screen light intensity values and their corresponding frequency point intensities. , the fitted model can be obtained. The fitting model can be used to characterize the correspondence between the frequency domain information and the compensation value. As a way, by fitting different screen light intensity values and their corresponding frequency point intensities, the linear relationship between the screen light intensity value and its corresponding frequency point intensity can be obtained, and then the fitted screen light intensity value can be obtained according to the The corresponding compensation value is estimated, and the obtained compensation value and the corresponding frequency point intensity are fitted and optimized, and the above fitting model can be obtained. Wherein, the screen light intensity value may also be directly used as the compensation value for fitting, which is not limited here, and it is only necessary to associate the frequency point intensity with the compensation value.
步骤S240:基于所述补偿值对所述检测光强度值进行光强度补偿。Step S240: Perform light intensity compensation on the detected light intensity value based on the compensation value.
步骤S240:根据所述补偿后的检测光强度值,确定环境光强度值。Step S240: Determine an ambient light intensity value according to the compensated detected light intensity value.
在本申请实施例中,步骤S240可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for step S240, reference may be made to the content of the foregoing embodiments, which will not be repeated here.
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过将光感传感器的积分周期设为小于目标区域的时间宽度的一半,以保证光感传感器检测到的检测光强度值中至少存在一个无干扰的环境光强度值。其中,目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可对光感传感器检测到的检测光强度值进行傅里叶变换,得到频域信息,并根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。此外,通过根据显示屏的不同工作模式来确定对应的目标区域的时间宽度,可实现不同的应用场景的最优检测方案,提高了对环境光强度的准确性。In the ambient light detection method provided by the embodiments of the present application, when the light sensor is located below the display screen, the integration period of the light sensor is set to be less than half of the time width of the target area, so as to ensure that the light sensor detected There is at least one undisturbed ambient light intensity value among the detected light intensity values. The target area is an area where some pixels of the display screen do not emit light during the refresh process. Then, 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, light intensity compensation can be performed on the detected light intensity value to reduce the interference of screen light emission, and finally According to the detected light intensity value after compensation, a relatively accurate ambient light intensity value is obtained. In addition, by determining the time width of the corresponding target area according to different working modes of the display screen, an optimal detection scheme for different application scenarios can be realized, and the accuracy of the ambient light intensity is improved.
请参阅图12,图12示出了本申请又一个实施例提供的环境光检测方法的流程示意图。下面将针对图12所示的流程进行详细的阐述,所示环境光检测方法具体可以包括以下步骤:Please refer to FIG. 12. FIG. 12 shows a schematic flowchart of an ambient light detection method provided by another embodiment of the present application. The flow shown in FIG. 12 will be described in detail below, and the ambient light detection method shown may specifically include the following steps:
步骤S310:获取光感传感器在预设时间内检测到的多个检测光强度值,所述预设时间大于显示屏的刷新周期。Step S310: Acquire 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.
在一些实施例中,为了保证傅里叶变换的有效进行,可以在进行傅里叶变换之前,对获取到的检测光强度值的最小数量进行限定。具体地,可以是获取光感传感器在预设时间内检测到的多个检测光强度值,其中,预设时间大于显示屏的刷新周期。作为一种方式啊,为了减少傅里叶变换后的数据误差,预设时间可以是至少大于显示屏的刷新周期的2倍。In some embodiments, in order to ensure the effective execution of the Fourier transform, the minimum number of acquired detected light intensity values may be limited before the Fourier transform is performed. Specifically, it may be to acquire multiple detected light intensity values detected by the light sensor within a preset time, wherein the preset time is greater than the refresh period of the display screen. As a way, in order to reduce the data error after the Fourier transform, the preset time may be at least 2 times greater than the refresh period of the display screen.
在一些实施例中,当傅里叶变换为FFT时,由于其所需的数据是2的N次方,可以根据2的N次方合理调整预设时间,以使预设时间内的检测数据符合该标识。In some embodiments, when the Fourier transform is converted to FFT, since the required data is the Nth power of 2, the preset time can be reasonably adjusted according to the Nth power of 2, so that the detection data within the preset time conforms to this identification.
步骤S320:对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息。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.
步骤S330:根据所述频域信息,对所述检测光强度值进行光强度补偿。Step S330: Perform light intensity compensation on the detected light intensity value according to the frequency domain information.
在本申请实施例中,步骤S320和步骤S330可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for steps S320 and S330, reference may be made to the contents of the foregoing embodiments, and details are not repeated here.
步骤S340:从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,作为每个刷新周期内的第一环境光强度值。Step S340: Obtain the minimum light intensity value in each refresh period from the plurality of detected light intensity values, as the first ambient light intensity value in each refresh period.
步骤S350:获取每个刷新周期内所述补偿后的多个检测光强度值,作为每个刷新周期内的第二环境光强度值。Step S350: Acquire a plurality of the compensated detected light intensity values in each refresh period as the second ambient light intensity values in each refresh period.
步骤S360:将所述第一环境光强度值和第二环境光强度值进行数据平滑处理,得到目标环境光强度值,并作为环境光的检测结果。Step S360: Perform data smoothing processing on the first ambient light intensity value and the second ambient light intensity value to obtain a target ambient light intensity value, which is used as an ambient light detection result.
在一些实施例中,由于光感传感器检测到无干扰数据通常是最小的,因此,可以从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,初步估算出每个刷新周期内的第一环境光强度值。然后再根据前述的补偿方法对每个刷新周期内的多个检测光强度值进行补偿,并将补偿后的多个检测光强度值,作为再次估算的每个刷新周期内的第二环境光强度。最后将两次估算的环境光强度进行数据平滑处理,可以得到较为准确的目标环境光强度值,并作为环境光的检测结果。例如,请参阅图13,图13示出了一种环境光检测方法的整体流程图。In some embodiments, since the non-interference data detected by the light sensor is usually the smallest, the minimum light intensity value in each refresh period may be obtained from the plurality of detected light intensity values, and each The first ambient light intensity value in the refresh period. Then, according to the aforementioned compensation method, the multiple detected light intensity values in each refresh period are compensated, and the compensated multiple detected light intensity values are used as the re-estimated second ambient light intensity within each refresh period. . Finally, the data of the two estimated ambient light intensities are smoothed, and a more accurate target ambient light intensity value can be obtained, which can be used as the detection result of ambient light. For example, please refer to FIG. 13 , which shows an overall flow chart of an ambient light detection method.
本申请实施例提供的环境光检测方法,在光感传感器位于显示屏下方的情况下,通过获取光感传感器检测到的检测光强度值,以对该检测光强度值的时域信息进行傅里叶变换,从而得到该检测光强度值对应的频域信息。其中,检测光强度值中至少存在一个目标区域所对应的检测值,而目标区域为显示屏在刷新过程中部分像素不发光的区域。然后可根据该频域信息,对检测光强度值进行光强度补偿,以减少屏幕发光的干扰,最后再根据补偿后的检测光强度值,得到较为准确的环境光强度值。这样,通过检测光强度值对应的频域信息进行光强度补偿,可以降低屏幕光源的亮度对环境光线检测的影响,从而在将光感传感器设置在显示屏下方时,无需设置导光柱,也能够实现对环境光强度的准确检测。In the ambient light detection method provided by the embodiment of the present application, when the light sensor is located below the display screen, the detected light intensity value detected by the light sensor is obtained to perform Fourier analysis on the time domain information of the detected light intensity value. Leaf transformation, so as to obtain the frequency domain information corresponding to the detected light intensity value. Among them, there is a detection value corresponding to at least one 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. Then, according to the frequency domain information, light intensity compensation can be performed on the detected light intensity value to reduce the interference of screen light emission, and finally a relatively accurate ambient light intensity value can be obtained according to the compensated detected light intensity value. In this way, the light intensity compensation is performed by detecting the frequency domain information corresponding to the light intensity value, which can reduce the influence of the brightness of the screen light source on the detection of ambient light. Accurate detection of ambient light intensity is achieved.
请参阅图14,其示出了本申请实施例提供的一种环境光检测装置700的结构框图,该环境光检测装置700包括:数据获取模块710、频域转换模块720、数据补偿模块730以及结果确定模块740。其中,数据获取模块710用于获取光感传感器检测到的检测光强度值,其中,所述光感传感器位于显示屏下方,所述检测光强度值中至少存在一个目标区域所对应的检测值,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;频域转换模块720用于对所述检测光强度值的时域信息进行傅里叶变换,得到所述检测光强度值对应的频域信息;数据补偿模块730用于根据所述频域信息,对所述检测光强度值进行光强度补偿;结果确定模块740用于根据所述补偿后的检测光强度值,确定环境光强度值。Please refer to FIG. 14 , which shows a structural block diagram of an ambient
在一些实施例中,数据补偿模块730可以具体用于:根据预设的频域信息与补偿值的对应关系,确定所述频域信息所对应的补偿值;基于所述补偿值对所述检测光强度值进行光强度补偿。In some embodiments, 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 between the frequency domain information and the compensation value; The light intensity value performs light intensity compensation.
在该实施例下,环境光检测装置700还可以包括:模型拟合模块。该模型拟合模块可以具体用于:当显示屏处于黑暗环境时,获取所述显示屏显示目标画面时光感传感器检测到的屏幕光强度值;对所述屏幕光强度值的时域信息进行傅里叶变换,得到所述屏幕光强度值对应的频域信息;对不同目标画面下的所述屏幕光强度值对应的频域信息进行拟合,得到拟合模型,所述拟合模型用于表征频域信息与补偿值的对应关系。In this embodiment, the ambient
在一些实施例中,上述数据获取模块710可以具体用于:获取光感传感器在预设时间内检测到的多个检测光强度值,所述预设时间大于显示屏的刷新周期。In some embodiments, the above-mentioned data acquisition module 710 may be specifically configured to: acquire a plurality of 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.
在该实施例下,上述结果确定模块740可以具体用于:从所述多个检测光强度值中获取每个刷新周期内的最小光强度值,作为每个刷新周期内的第一环境光强度值;获取每个刷新周期内所述补偿后的多个检测光强度值,作为每个刷新周期内的第二环境光强度值;将所述第一环境光强度值和第二环境光强度值进行数据平滑处理,得到目标环境光强度值,并作为环境光的检测结果。In this embodiment, the above result determination 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 compensated multiple detected light intensity values in each refresh cycle as the second ambient light intensity value in each refresh cycle; combine the first ambient light intensity value and the second ambient light intensity value The data is smoothed to obtain the target ambient light intensity value, which is used as the detection result of ambient light.
在一些实施例中,该环境光检测装置700还可以包括:检测模块。该检测模块可以具体用于:获取显示屏中的目标区域,所述目标区域为所述显示屏在刷新过程中部分像素不发光的区域;确定所述目标区域在所述显示屏的刷新周期内所对应的第一时间宽度;基于所述第一时间宽度,获取光强度测量的第一积分周期,其中,所述第一积分周期小于所述第一时间宽度的一半;控制光感传感器以所述第一积分周期开始进行光强度检测。In some embodiments, the ambient
在一些实施例中,该环境光检测装置700还可以包括:模式判断模块和第一处理模块。其中,模式判断模块用于判断当前是否处于PWM调光模式;第一处理模块用于若不处于所述PWM调光模式,则执行所述获取显示屏中的目标区域的步骤。In some embodiments, the ambient
在一些实施例中,该环境光检测装置700还可以包括:第二处理模块。该第二处理模块可以具体用于:若处于所述PWM调光模式,则获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度;基于第二时间宽度,获取光强度测量的第二积分周期,其中,所述第二积分周期小于所述第二时间宽度的一半;控制光感传感器以所述第二积分周期开始进行光强度检测。In some embodiments, the ambient
在一些实施例中,该环境光检测装置700还可以包括:亮度判断模块和第三处理模块。其中,亮度判断模块用于判断当前显示屏的亮度是否大于预设亮度;第三处理模块用于若小于或等于所述预设亮度,则执行所述获取一个PWM周期内显示屏处于灭屏状态的第二时间宽度的步骤。In some embodiments, the ambient
在一些实施例中,该环境光检测装置700还可以包括:第四处理模块,用于若大于所述预设亮度,则执行所述获取显示屏中的目标区域的步骤。In some embodiments, the ambient
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices and modules, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
综上所述,本申请实施例提供的环境光检测装置用于实现前述方法实施例中相应的环境光检测方法,并具有相应的方法实施例的有益效果,在此不再赘述。To sum up, the ambient light detection device provided in the embodiments of the present application is used to implement the corresponding ambient light detection methods in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
请参考图15,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是PC电脑、移动终端等能够运行应用程序的终端设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、光感传感器130、显示屏140以及一个或多个应用程序,其中,光感传感器130位于显示屏140下方,一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个应用程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 15 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、环境光检测器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The
光感传感器130可以是用于采集光线以进行光强度检测的任意光感器件,此处不对具体的光感传感器进行限定。The
显示屏140可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。在一些实施例中,处理器110可根据光感传感器130接收的光线获取检测光强度值。随后,处理器110可根据检测光强度值确定当前的环境光强度值,并根据当前环境光强度值调节显示屏140的亮度。The
在一些实施例中,显示屏140可以是OLED显示屏。具体地,有机发光二极管(OrganicLight-EmittingDiode,OLED)显示屏具有良好的透光性,能够通过可见光。因此,OLED显示屏在展现内容效果的情况下,也不影响光感传感器130接收可见光。显示屏140也可以采用MicroLED显示屏,MicroLED显示屏同样具有对可见光和红外光良好的透光率。当然,这些显示屏仅作为示例性的,本发明的实施例并不限于此。In some embodiments, the
请参阅图16,图16示出了一种电子设备的结构示意图。其中,电子设备包括玻璃盖板101、显示面板102、缓存泡棉103以及光感传感器104。其中,光感传感器设于显示面板102下方。Please refer to FIG. 16 , which is a schematic structural diagram of an electronic device. The electronic device includes a
请参考图17,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 17 , which 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 codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。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. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. Computer readable storage medium 800 has storage space for
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (12)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010313048.3A CN111486950B (en) | 2020-04-20 | 2020-04-20 | Ambient light detection method, device, electronic device and storage medium |
PCT/CN2021/078920 WO2021213016A1 (en) | 2020-04-20 | 2021-03-03 | Ambient light detection method and device, electronic apparatus, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010313048.3A CN111486950B (en) | 2020-04-20 | 2020-04-20 | Ambient light detection method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111486950A true CN111486950A (en) | 2020-08-04 |
CN111486950B CN111486950B (en) | 2022-04-19 |
Family
ID=71811064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010313048.3A Active CN111486950B (en) | 2020-04-20 | 2020-04-20 | Ambient light detection method, device, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111486950B (en) |
WO (1) | WO2021213016A1 (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112033527A (en) * | 2020-08-26 | 2020-12-04 | 北京小米移动软件有限公司 | Ambient brightness detection method, device, equipment and storage medium |
CN112179508A (en) * | 2020-09-30 | 2021-01-05 | 北京小米移动软件有限公司 | Ambient light frequency acquisition method and apparatus, electronic device, and storage medium |
CN112365833A (en) * | 2021-01-15 | 2021-02-12 | 深圳阜时科技有限公司 | Method for detecting and correcting brightness adjustment value of light sensation under screen |
CN112985588A (en) * | 2021-02-05 | 2021-06-18 | 深圳市汇顶科技股份有限公司 | Terminal device, optical signal processing method, and storage medium |
CN113110817A (en) * | 2021-04-08 | 2021-07-13 | Oppo广东移动通信有限公司 | Method and device for determining ambient light brightness, terminal and storage medium |
WO2021213016A1 (en) * | 2020-04-20 | 2021-10-28 | Oppo广东移动通信有限公司 | Ambient light detection method and device, electronic apparatus, and storage medium |
CN113804290A (en) * | 2021-05-17 | 2021-12-17 | 荣耀终端有限公司 | Ambient light detection method, electronic device and chip system |
CN113889053A (en) * | 2021-06-04 | 2022-01-04 | 荣耀终端有限公司 | Screen brightness adjusting method based on ambient light sensor |
CN114220381A (en) * | 2022-02-22 | 2022-03-22 | 深圳灏鹏科技有限公司 | Display brightness control method, device, equipment and storage medium |
CN114283751A (en) * | 2021-12-29 | 2022-04-05 | 西安闻泰信息技术有限公司 | Light sensation detection method, terminal device and storage medium |
WO2022101177A1 (en) * | 2020-11-13 | 2022-05-19 | Ams International Ag | Optical sensing |
CN114554187A (en) * | 2022-02-21 | 2022-05-27 | Oppo广东移动通信有限公司 | Wireless camera detection method, device, equipment, medium and program product |
CN114613317A (en) * | 2022-02-18 | 2022-06-10 | 深圳市汇顶科技股份有限公司 | Method for calculating ambient light intensity of electronic equipment, related electronic equipment and chip |
WO2022126656A1 (en) * | 2020-12-18 | 2022-06-23 | 深圳市汇顶科技股份有限公司 | Fingerprint detection method, fingerprint sensor and electronic device |
CN115290299A (en) * | 2022-09-30 | 2022-11-04 | 深圳市汇顶科技股份有限公司 | Method, device and electronic device for determining drop depth of screen light leakage |
WO2023000804A1 (en) * | 2021-07-19 | 2023-01-26 | 荣耀终端有限公司 | Method and apparatus for determining ambient light intensity and storage medium |
WO2023143510A1 (en) * | 2022-01-29 | 2023-08-03 | 维沃移动通信有限公司 | Ambient light detection method and apparatus, and compensation display method and apparatus for display screen |
WO2023178526A1 (en) * | 2022-03-22 | 2023-09-28 | 京东方科技集团股份有限公司 | Display panel and manufacturing method thereof, and ambient light intensity detection method and device |
CN117129085A (en) * | 2023-02-28 | 2023-11-28 | 荣耀终端有限公司 | Ambient light detection method, electronic device and readable storage medium |
WO2024039323A1 (en) * | 2022-08-17 | 2024-02-22 | İstanbul Geli̇şi̇m Üni̇versi̇tesi̇ | System to improve the image quality on monitors |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114120868B (en) * | 2021-11-26 | 2024-09-20 | 努比亚技术有限公司 | Under-screen light sensation compensation calibration method, equipment and computer readable storage medium |
CN114152894B (en) * | 2021-12-02 | 2022-08-02 | 北京博示电子科技有限责任公司 | Method and device for detecting lamp tube, electronic equipment and storage medium |
CN114840114B (en) * | 2022-07-05 | 2023-01-03 | 荣耀终端有限公司 | Display control method, device and storage medium |
CN119324952A (en) * | 2023-03-01 | 2025-01-17 | 荣耀终端有限公司 | Electronic device, screen brightness control method and light guide structure |
CN117194885B (en) * | 2023-09-06 | 2024-05-14 | 东莞市同和光电科技有限公司 | Optical interference suppression method for infrared receiving chip and infrared receiving chip |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1987376A (en) * | 2006-12-22 | 2007-06-27 | 上海神明控制工程有限公司 | Burning flame signal processing system |
EP2423896A1 (en) * | 2009-04-20 | 2012-02-29 | Oki Denki Bohsai Co., Ltd. | Flame monitoring device and flame monitoring method |
CN102375973A (en) * | 2010-08-24 | 2012-03-14 | 汉王科技股份有限公司 | Face recognition method and system, and infrared back light compensation method and system |
CN204463781U (en) * | 2015-03-17 | 2015-07-08 | 武汉精测电子技术股份有限公司 | Display panel luminance spectrum analytical equipment |
US20170337895A1 (en) * | 2016-05-18 | 2017-11-23 | Lenovo (Singapore) Pte. Ltd. | Method, apparatus and computer program product for user detection and operation control |
CN107609514A (en) * | 2017-09-12 | 2018-01-19 | 广东欧珀移动通信有限公司 | Face identification method and Related product |
CN107917755A (en) * | 2017-11-22 | 2018-04-17 | 广东欧珀移动通信有限公司 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
CN107941330A (en) * | 2017-11-22 | 2018-04-20 | 广东欧珀移动通信有限公司 | Ambient light intensity detection method, device, storage medium and electronic equipment |
CN107957294A (en) * | 2017-11-22 | 2018-04-24 | 广东欧珀移动通信有限公司 | Ambient light intensity detection method and device, storage medium and electronic equipment |
CN107966209A (en) * | 2017-11-22 | 2018-04-27 | 广东欧珀移动通信有限公司 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
CN109632092A (en) * | 2018-12-29 | 2019-04-16 | 东南大学 | A kind of luminance test system and method based on spatial light field |
CN110211523A (en) * | 2019-07-26 | 2019-09-06 | 武汉精立电子技术有限公司 | A kind of method, apparatus and system of telemeasurement Flicker value of liquid crystal module |
US20200022239A1 (en) * | 2018-07-12 | 2020-01-16 | Apple Inc. | Electronic Device With Ambient Light Flicker Sensor |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9129548B2 (en) * | 2012-11-15 | 2015-09-08 | Apple Inc. | Ambient light sensors with infrared compensation |
US9997137B2 (en) * | 2015-09-30 | 2018-06-12 | Apple Inc. | Content-based statistics for ambient light sensing |
CN108716950A (en) * | 2018-05-16 | 2018-10-30 | 北京小米移动软件有限公司 | Environmental light brightness acquisition methods and device |
CN111486950B (en) * | 2020-04-20 | 2022-04-19 | Oppo广东移动通信有限公司 | Ambient light detection method, device, electronic device and storage medium |
-
2020
- 2020-04-20 CN CN202010313048.3A patent/CN111486950B/en active Active
-
2021
- 2021-03-03 WO PCT/CN2021/078920 patent/WO2021213016A1/en active Application Filing
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1987376A (en) * | 2006-12-22 | 2007-06-27 | 上海神明控制工程有限公司 | Burning flame signal processing system |
EP2423896A1 (en) * | 2009-04-20 | 2012-02-29 | Oki Denki Bohsai Co., Ltd. | Flame monitoring device and flame monitoring method |
CN102375973A (en) * | 2010-08-24 | 2012-03-14 | 汉王科技股份有限公司 | Face recognition method and system, and infrared back light compensation method and system |
CN204463781U (en) * | 2015-03-17 | 2015-07-08 | 武汉精测电子技术股份有限公司 | Display panel luminance spectrum analytical equipment |
US20170337895A1 (en) * | 2016-05-18 | 2017-11-23 | Lenovo (Singapore) Pte. Ltd. | Method, apparatus and computer program product for user detection and operation control |
CN107609514A (en) * | 2017-09-12 | 2018-01-19 | 广东欧珀移动通信有限公司 | Face identification method and Related product |
CN107917755A (en) * | 2017-11-22 | 2018-04-17 | 广东欧珀移动通信有限公司 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
CN107941330A (en) * | 2017-11-22 | 2018-04-20 | 广东欧珀移动通信有限公司 | Ambient light intensity detection method, device, storage medium and electronic equipment |
CN107957294A (en) * | 2017-11-22 | 2018-04-24 | 广东欧珀移动通信有限公司 | Ambient light intensity detection method and device, storage medium and electronic equipment |
CN107966209A (en) * | 2017-11-22 | 2018-04-27 | 广东欧珀移动通信有限公司 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
US20200022239A1 (en) * | 2018-07-12 | 2020-01-16 | Apple Inc. | Electronic Device With Ambient Light Flicker Sensor |
CN109632092A (en) * | 2018-12-29 | 2019-04-16 | 东南大学 | A kind of luminance test system and method based on spatial light field |
CN110211523A (en) * | 2019-07-26 | 2019-09-06 | 武汉精立电子技术有限公司 | A kind of method, apparatus and system of telemeasurement Flicker value of liquid crystal module |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021213016A1 (en) * | 2020-04-20 | 2021-10-28 | Oppo广东移动通信有限公司 | Ambient light detection method and device, electronic apparatus, and storage medium |
CN112033527B (en) * | 2020-08-26 | 2023-10-03 | 北京小米移动软件有限公司 | Ambient brightness detection method, device, equipment and storage medium |
CN112033527A (en) * | 2020-08-26 | 2020-12-04 | 北京小米移动软件有限公司 | Ambient brightness detection method, device, equipment and storage medium |
CN112179508A (en) * | 2020-09-30 | 2021-01-05 | 北京小米移动软件有限公司 | Ambient light frequency acquisition method and apparatus, electronic device, and storage medium |
WO2022101177A1 (en) * | 2020-11-13 | 2022-05-19 | Ams International Ag | Optical sensing |
US11810390B2 (en) | 2020-12-18 | 2023-11-07 | Shenzhen GOODIX Technology Co., Ltd. | Method for fingerprint detection, fingerprint sensor and electronic device |
WO2022126656A1 (en) * | 2020-12-18 | 2022-06-23 | 深圳市汇顶科技股份有限公司 | Fingerprint detection method, fingerprint sensor and electronic device |
CN112365833A (en) * | 2021-01-15 | 2021-02-12 | 深圳阜时科技有限公司 | Method for detecting and correcting brightness adjustment value of light sensation under screen |
CN112985588A (en) * | 2021-02-05 | 2021-06-18 | 深圳市汇顶科技股份有限公司 | Terminal device, optical signal processing method, and storage medium |
CN113110817A (en) * | 2021-04-08 | 2021-07-13 | Oppo广东移动通信有限公司 | Method and device for determining ambient light brightness, terminal and storage medium |
CN113804290B (en) * | 2021-05-17 | 2022-09-23 | 荣耀终端有限公司 | A kind of ambient light detection method, electronic device and chip system |
CN113804290A (en) * | 2021-05-17 | 2021-12-17 | 荣耀终端有限公司 | Ambient light detection method, electronic device and chip system |
CN115597706B (en) * | 2021-05-17 | 2023-10-20 | 荣耀终端有限公司 | An ambient light detection method, electronic device and chip system |
CN115597706A (en) * | 2021-05-17 | 2023-01-13 | 荣耀终端有限公司(Cn) | Ambient light detection method, electronic device and chip system |
CN113889053A (en) * | 2021-06-04 | 2022-01-04 | 荣耀终端有限公司 | Screen brightness adjusting method based on ambient light sensor |
US12067923B2 (en) | 2021-07-19 | 2024-08-20 | Honor Device Co., Ltd. | Ambient illumination intensity determining method and apparatus, and storage medium |
WO2023000804A1 (en) * | 2021-07-19 | 2023-01-26 | 荣耀终端有限公司 | Method and apparatus for determining ambient light intensity and storage medium |
CN114283751A (en) * | 2021-12-29 | 2022-04-05 | 西安闻泰信息技术有限公司 | Light sensation detection method, terminal device and storage medium |
WO2023143510A1 (en) * | 2022-01-29 | 2023-08-03 | 维沃移动通信有限公司 | Ambient light detection method and apparatus, and compensation display method and apparatus for display screen |
CN114613317B (en) * | 2022-02-18 | 2023-10-31 | 深圳市汇顶科技股份有限公司 | Computing method of ambient light intensity of electronic device, related electronic device and chip |
CN114613317A (en) * | 2022-02-18 | 2022-06-10 | 深圳市汇顶科技股份有限公司 | Method for calculating ambient light intensity of electronic equipment, related electronic equipment and chip |
CN114554187A (en) * | 2022-02-21 | 2022-05-27 | Oppo广东移动通信有限公司 | Wireless camera detection method, device, equipment, medium and program product |
CN114220381A (en) * | 2022-02-22 | 2022-03-22 | 深圳灏鹏科技有限公司 | Display brightness control method, device, equipment and storage medium |
WO2023178526A1 (en) * | 2022-03-22 | 2023-09-28 | 京东方科技集团股份有限公司 | Display panel and manufacturing method thereof, and ambient light intensity detection method and device |
WO2024039323A1 (en) * | 2022-08-17 | 2024-02-22 | İstanbul Geli̇şi̇m Üni̇versi̇tesi̇ | System to improve the image quality on monitors |
CN115290299B (en) * | 2022-09-30 | 2023-04-07 | 深圳市汇顶科技股份有限公司 | Method and device for determining falling depth of screen light leakage and electronic equipment |
CN115290299A (en) * | 2022-09-30 | 2022-11-04 | 深圳市汇顶科技股份有限公司 | Method, device and electronic device for determining drop depth of screen light leakage |
CN117129085A (en) * | 2023-02-28 | 2023-11-28 | 荣耀终端有限公司 | Ambient light detection method, electronic device and readable storage medium |
CN117129085B (en) * | 2023-02-28 | 2024-05-31 | 荣耀终端有限公司 | Ambient light detection method, electronic device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111486950B (en) | 2022-04-19 |
WO2021213016A1 (en) | 2021-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111486950B (en) | Ambient light detection method, device, electronic device and storage medium | |
CN107979698B (en) | Ambient light intensity detection method and device, storage medium and electronic equipment | |
US12170851B2 (en) | Photographing method, electronic device, and storage medium | |
WO2017113343A1 (en) | Method for adjusting backlight brightness and terminal | |
US10935421B2 (en) | Light intensity detection method and apparatus, and intelligent terminal | |
US9990902B2 (en) | Electronic device for adjusting brightness of screen and method thereof | |
US20210243347A1 (en) | Generating static images with an event camera | |
TWI421749B (en) | Display panel and operation method thereof | |
US9697622B2 (en) | Interface adjustment method, apparatus, and terminal | |
CN107102936A (en) | The appraisal procedure and mobile terminal and storage medium of a kind of fluency | |
CN112687232B (en) | Dimming method and device of OLED display screen, electronic equipment and storage medium | |
CN102279692B (en) | The method of realizing preview while dragging object, client | |
EP2854122A1 (en) | Adjusting light emitting pixels | |
CN108873005B (en) | Proximity detection method and device, electronic device, storage medium and device | |
KR102189643B1 (en) | Display apparatus and control method thereof | |
CN106570847B (en) | The method and apparatus of image procossing | |
CN107917755A (en) | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus | |
JP2007334034A5 (en) | ||
US12081876B2 (en) | Method for determining photographing mode, electronic device and storage medium | |
CN106250080A (en) | Method for displaying image and device | |
CN107945733A (en) | Display screen brightness adjusting method and device, storage medium and electronic equipment | |
WO2022089216A1 (en) | Interface display method and electronic device | |
CN114119431A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN107968939B (en) | Display screen processing method and device, storage medium and electronic device | |
WO2019006958A1 (en) | View scrolling method and apparatus, and smart television |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |