CN107966209B - Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus - Google Patents
Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus Download PDFInfo
- Publication number
- CN107966209B CN107966209B CN201711176941.0A CN201711176941A CN107966209B CN 107966209 B CN107966209 B CN 107966209B CN 201711176941 A CN201711176941 A CN 201711176941A CN 107966209 B CN107966209 B CN 107966209B
- Authority
- CN
- China
- Prior art keywords
- ambient light
- target
- value
- light intensity
- brightness value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 56
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 238000005375 photometry Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 12
- 238000012545 processing Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 239000010410 layer Substances 0.000 description 6
- 239000004973 liquid crystal related substance Substances 0.000 description 6
- 238000010009 beating Methods 0.000 description 4
- 238000005259 measurement Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 210000000554 iris Anatomy 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000012044 organic layer Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- 239000007787 solid Substances 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)
- Telephone Function (AREA)
Abstract
Description
技术领域technical field
本申请涉及电子设备领域,具体涉及一种环境光检测方法、装置、存储介质和电子设备。The present application relates to the field of electronic devices, and in particular, to an ambient light detection method, device, storage medium and electronic device.
背景技术Background technique
随着通信技术的发展,诸如智能手机等电子设备越来越普及。在电子设备的使用过程中,例如通话过程中,为了避免用户对电子设备的误操作,当用户脸部靠近电子设备达到一定距离后,电子设备会自动熄屏。通常,电子设备通过接近传感器来检测用户脸部的靠近和远离,根据检测到的数据来控制电子设备熄屏或者亮屏。With the development of communication technology, electronic devices such as smart phones are becoming more and more popular. During the use of the electronic device, for example, during a call, in order to avoid misoperation of the electronic device by the user, when the user's face approaches the electronic device for a certain distance, the electronic device will automatically turn off the screen. Generally, an electronic device detects the approaching and reversing of a user's face through a proximity sensor, and controls the electronic device to turn off or brighten the screen according to the detected data.
目前,移动智能终端上的信息安全和身份认证问题日益突出,越来越多的智能终端集成了用于识别如指纹、人脸、虹膜等生物信息的生物识别技术的传感器,另外还需要诸如环境光传感器、距离传感器等等,这些传感器往往都设置在终端的前面板上面。因此可以采用将传感器放在屏幕下方的方案,以此来实现全面屏方案,然而以环境光传感器为例,传感器在测光时会受到屏幕亮度的干扰,使得环境光的测量结果不准确。At present, the problems of information security and identity authentication on mobile smart terminals are becoming more and more prominent. More and more smart terminals integrate biometric sensors used to identify biometric information such as fingerprints, faces, irises, etc. Light sensors, distance sensors, etc., these sensors are often arranged on the front panel of the terminal. Therefore, the solution of placing the sensor under the screen can be used to realize the full-screen solution. However, taking the ambient light sensor as an example, the sensor will be interfered by the brightness of the screen during light metering, making the measurement result of ambient light inaccurate.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种环境光检测方法、装置、存储介质和电子设备,可以提升环境光检测的准确性。Embodiments of the present application provide an ambient light detection method, device, storage medium, and electronic device, which can improve the accuracy of ambient light detection.
第一方面,本申请实施例提供一种环境光检测方法,应用于电子设备,所述电子设备包括设置在屏幕显示区域不同位置的多个环境光传感器,所述环境光检测方法包括:In a first aspect, an embodiment of the present application provides an ambient light detection method, which is applied to an electronic device, where the electronic device includes a plurality of ambient light sensors disposed at different positions in a screen display area, and the ambient light detection method includes:
分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值;Obtain the current brightness value of the screen area corresponding to each ambient light sensor to obtain multiple brightness values;
对所述多个亮度值进行对比,确定最小的亮度值为目标亮度值,所述目标亮度值所对应的环境光传感器为目标环境光传感器;Comparing the plurality of brightness values, it is determined that the minimum brightness value is the target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light sensor;
获取所述目标环境光传感器当前检测到的第一光强度值;obtaining the first light intensity value currently detected by the target ambient light sensor;
根据所述第一光强度值和所述目标亮度值计算目标光强度值。A target light intensity value is calculated according to the first light intensity value and the target luminance value.
第二方面,本申请实施例还提供了一种环境光检测装置,应用于电子设备,所述电子设备包括设置在屏幕显示区域不同位置的多个环境光传感器,所述环境光检测装置包括:第一获取模块、确定模块、第二获取模块以及计算模块;In a second aspect, an embodiment of the present application further provides an ambient light detection device, which is applied to an electronic device, where the electronic device includes a plurality of ambient light sensors disposed at different positions in a screen display area, and the ambient light detection device includes: a first acquisition module, a determination module, a second acquisition module and a calculation module;
所述第一获取模块,用于分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值;The first acquisition module is used to separately acquire the current brightness value of the screen area corresponding to each ambient light sensor, so as to obtain a plurality of brightness values;
所述确定模块,用于对所述多个亮度值进行对比,确定最小的亮度值为目标亮度值,所述目标亮度值所对应的环境光传感器为目标环境光传感器;The determining module is configured to compare the plurality of brightness values, and determine that the minimum brightness value is the target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light sensor;
所述第二获取模块,用于获取所述目标环境光传感器当前检测到的第一光强度值;the second acquisition module, configured to acquire the first light intensity value currently detected by the target ambient light sensor;
所述计算模块,用于根据所述第一光强度值和所述目标亮度值计算目标光强度值。The calculation module is configured to calculate a target light intensity value according to the first light intensity value and the target brightness value.
第三方面,本申请实施例还提供一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述环境光检测方法的步骤。In a third aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above ambient light detection method.
第四方面,本申请实施例还提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述环境光检测方法的步骤。In a fourth aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the above ambient light detection when executing the program steps of the method.
本申请实施例提供的环境光检测方法分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值,对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器,获取目标环境光传感器当前检测到的第一光强度值,根据第一光强度值和目标亮度值计算目标光强度值。本申请通过在终端中设置多个环境光传感器,选择对应屏幕区域亮度最小的环境光传感器来进行测光,可以减小屏幕亮度对检测结果的干扰,提升环境光检测的准确性。The ambient light detection method provided by the embodiments of the present application respectively acquires the current brightness value of the screen area corresponding to each ambient light sensor to obtain multiple brightness values, compares the multiple brightness values, and determines the minimum brightness value as the target brightness The ambient light sensor corresponding to the target brightness value is the target ambient light sensor, obtain the first light intensity value currently detected by the target ambient light sensor, and calculate the target light intensity value according to the first light intensity value and the target brightness value. In the present application, by setting multiple ambient light sensors in the terminal, and selecting the ambient light sensor with the smallest brightness corresponding to the screen area for light metering, the interference of the screen brightness on the detection result can be reduced, and the accuracy of ambient light detection can be improved.
附图说明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 is a schematic plan view of a display screen of an electronic device according to an embodiment of the present application.
图2为本申请实施例提供的环境光检测方法的一种流程示意图。FIG. 2 is a schematic flowchart of an ambient light detection method provided by an embodiment of the present application.
图3为本申请实施例提供的环境光检测方法的另一种流程示意图。FIG. 3 is another schematic flowchart of an ambient light detection method provided by an embodiment of the present application.
图4为本申请实施例提供的环境光检测装置的一种结构示意图。FIG. 4 is a schematic structural diagram of an ambient light detection device provided by an embodiment of the present application.
图5为本申请实施例提供的环境光检测装置的另一种结构示意图。FIG. 5 is another schematic structural diagram of an ambient light detection device provided by an embodiment of the present application.
图6为本申请实施例提供的电子设备的一种结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图7为本申请实施例提供的电子设备的另一种结构示意图。FIG. 7 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Please refer to the drawings, wherein the same component symbols represent the same components, and the principles of the present application are exemplified by being implemented in a suitable computing environment. The following description is based on illustrated specific embodiments of the present application and should not be construed as limiting other specific embodiments of the present application not detailed herein.
在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise stated. Accordingly, the steps and operations will be referred to several times as being performed by a computer, which reference herein includes operations by a computer processing unit of electronic signals representing data in a structured format. This operation transforms the data or maintains it in a location in the computer's memory system, which can be reconfigured or otherwise change the operation of the computer in a manner well known to testers in the art. The data structures maintained by the data are physical locations of the memory that have specific characteristics defined by the data format. However, the principle of the present application is described by the above text, which is not meant to be a limitation, and testers in the art will understand that various steps and operations described below can also be implemented in hardware.
本申请的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。所熟知的适合用于本申请的运算系统、环境与组态的范例可包括(但不限于)手持电话、个人计算机、服务器、多处理器系统、微电脑为主的系统、主架构型计算机、及分布式运算环境,其中包括了任何的上述系统或装置。The principles of the present application operate using many other general-purpose or special-purpose computing, communication environments, or configurations. Well-known examples of computing systems, environments, and configurations suitable for use in this application may include, but are not limited to, hand-held telephones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and A distributed computing environment including any of the above systems or apparatus.
以下将分别进行详细说明。The detailed descriptions will be given below.
本实施例将从环境光检测装置的角度进行描述,该装置具体可以集成在电子设备中,该电子设备可以为包含环境光传感器(如智能手机、平板电脑)的电子设备。This embodiment will be described from the perspective of an ambient light detection apparatus, which may be integrated into an electronic device, and the electronic device may be an electronic device including an ambient light sensor (eg, a smart phone, a tablet computer).
首先参考图1,图一为本发明实施例提供的一种显示屏平面示意图,显示屏21包括显示区域215和非显示区域216。其中,显示区域215执行显示屏21的显示功能,用于显示信息。非显示区域216不显示信息。显示屏21可以包括多个彼此间隔的非显示区域216。例如,在显示屏21的顶部和底部分别设置有非显示区域216。非显示区域216可以用于设置摄像头、受话器以及指纹模组等功能组件。Referring first to FIG. 1 , FIG. 1 is a schematic plan view of a display screen according to an embodiment of the present invention. The
其中,环境光传感器213设置在屏幕21的显示区域215,比如图1所示的将两个环境光传感器分别设置在显示区域215的左上角和右下角。The
在一些实施例中,显示屏21可以为液晶显示屏(Liquid Crystal Display,LCD)或有机发光二极管显示屏(Organic Light-Emitting Diode,OLED)等类型的显示屏。当显示屏21为液晶显示屏时,显示层可以包括依次层叠设置的背光板、下偏光片、阵列基板、液晶层、彩膜基板以及上偏光片等结构。当显示屏21为有机发光二极管显示屏时,显示层可以包括依次层叠设置的基层、阳极、有机层、导电层、发射层以及阴极等结构。In some embodiments, the
图2为本申请实施例提供的环境光检测方法的一种流程示意图,该方法应用于电子设备,该电子设备包括设置在屏幕显示区域不同位置的多个环境光传感器,上述环境光检测包括以下步骤:2 is a schematic flowchart of an ambient light detection method provided by an embodiment of the present application. The method is applied to an electronic device, and the electronic device includes a plurality of ambient light sensors disposed at different positions in a screen display area. The ambient light detection includes the following step:
步骤S101,分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值。In step S101, the current brightness value of the screen area corresponding to each ambient light sensor is obtained respectively, so as to obtain a plurality of brightness values.
其中,上述环境光传感器可以为2个或者2个以上等,并分散设置在屏幕的显示区域下方,比如电子设备包括4个环境光传感器,分别设置在屏幕显示区域的左下角、左上角、右上角以及右下角,则上述4个环境光传感器分别对应的屏幕区域即为显示区域的上述四个角落。Among them, the above ambient light sensors may be two or more, etc., and are arranged scattered under the display area of the screen. For example, the electronic device includes four ambient light sensors, which are respectively arranged in the lower left corner, upper left corner, and upper right corner of the display area of the screen. corner and the lower right corner, the screen areas corresponding to the above four ambient light sensors respectively are the above four corners of the display area.
在一实施例中,环境光传感器所对应的屏幕区域的面积大小可以为1cm×1cm,也即1cm2,在其他实施例当中,上述环境光传感器所对应的屏幕区域的面积还可以通过像素点的个数来表示,比如在分辨率为1920×1080的显示屏当中,表示图像中像素点的个数为2073600个,该环境光传感器所对应的屏幕区域可以为包含100×50也即5000个像素点的区域。本发明对此不做进一步限定。In one embodiment, the area of the screen area corresponding to the ambient light sensor may be 1cm×1cm, that is, 1cm 2 . For example, in a display screen with a resolution of 1920×1080, the number of pixels in the image is 2,073,600, and the screen area corresponding to the ambient light sensor can be 100×50, that is, 5,000 pixels. area of pixels. The present invention does not further limit this.
其中,在获取每个环境光传感器所对应的屏幕区域当前的亮度值之前,还可以判断电子设备是否为亮屏状态,若是,则获取屏幕当前显示的图像,然后进一步获取该图象当中环境光传感器所对应的图像区域当前的亮度值。具体地,将屏幕处于亮屏状态作为触发条件,当通过对系统应用程序的进程进行监听,以判断电子设备的屏幕是否处于亮屏状态,当监听到电容式触摸屏被点亮时,表示屏幕处于亮屏状态,即获取屏幕当前显示的图像。Among them, before acquiring the current brightness value of the screen area corresponding to each ambient light sensor, it is also possible to determine whether the electronic device is in a bright screen state, and if so, acquire the image currently displayed on the screen, and then further acquire the ambient light in the image. The current brightness value of the image area corresponding to the sensor. Specifically, the screen is in the bright-screen state as the trigger condition, and by monitoring the process of the system application program, it is determined whether the screen of the electronic device is in the bright-screen state, and when the capacitive touch screen is monitored to be lit, it means that the screen is in Bright screen state, that is, to obtain the image currently displayed on the screen.
在一实施例当中,可以获取环境光传感器所对应的屏幕区域内每个像素点的亮度值,具体可以提取每个像素点的亮度值,以矩阵的形式的记录存储,便于后续直接调用亮度值,然后计算该区域的平均亮度值,比如将获取到的每个像素点的亮度值相加,除以像素点的个数,生成环境光传感器所对应的屏幕区域当前的亮度值。其中,可以在获取到该屏幕区域的图像中,将每个像素点的红色分量、绿色分量以及蓝色分量(red、green、blue,RGB)转换为色调、饱和度以及亮度值(Hue、saturation、value,HSV),获取每个像素点的亮度值。In one embodiment, the brightness value of each pixel in the screen area corresponding to the ambient light sensor can be obtained, specifically, the brightness value of each pixel can be extracted and stored in the form of a matrix, so that the brightness value can be directly called later. , and then calculate the average brightness value of the area. For example, add the obtained brightness value of each pixel point and divide it by the number of pixels to generate the current brightness value of the screen area corresponding to the ambient light sensor. Among them, in the acquired image of the screen area, the red component, green component and blue component (red, green, blue, RGB) of each pixel can be converted into hue, saturation and brightness values (Hue, saturation, RGB) , value, HSV) to get the brightness value of each pixel.
在上述实施例当中,在获取到的图像中,获取每个像素点的红色分量、绿色分量以及蓝色分量,将每个像素点的RGB转换为HSV。其中,RGB颜色空间转换为HSV颜色空间为现有技术,在此不做赘述。In the above embodiment, in the acquired image, the red component, the green component and the blue component of each pixel are acquired, and the RGB of each pixel is converted into HSV. The conversion of the RGB color space to the HSV color space is in the prior art, and details are not described here.
步骤S102,对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器。Step S102 , comparing a plurality of brightness values, and determining that the smallest brightness value is the target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light sensor.
在获取到多个环境光传感器所对应的屏幕区域的亮度值之后,对上述多个亮度值进行对比,以确定其中最小的目标亮度值。本发明实施例中,亮度值的单位可以为尼特(nits)。例如,在一实施例中,电子设备包含四个环境光传感器,分别设置在屏幕显示区域的左上、左下、右上以及右下,通过步骤S101测得上述4个屏幕区域的亮度值分别是200nits、500nits、300nits以及350nits,即可确定其中最小亮度值为200nits,也即目标亮度值,同时确定屏幕显示区域的左上位置所对应的环境光传感器为目标环境光传感器。After acquiring the brightness values of the screen areas corresponding to the multiple ambient light sensors, the aforementioned multiple brightness values are compared to determine the minimum target brightness value. In this embodiment of the present invention, the unit of the luminance value may be nits. For example, in one embodiment, the electronic device includes four ambient light sensors, which are respectively disposed at the upper left, lower left, upper right and lower right of the screen display area, and the brightness values of the above four screen areas measured in step S101 are 200nits, 500nits, 300nits and 350nits, you can determine the minimum brightness value of 200nits, that is, the target brightness value, and determine the ambient light sensor corresponding to the upper left position of the screen display area as the target ambient light sensor.
在一实施例当中,若上述多个环境光传感器所对应的屏幕区域当前的亮度值中存在亮度值相同且均为最小亮度的屏幕区域时,可以指定该亮度相同的屏幕区域中任意一个屏幕区域所对应的环境光传感器为目标环境光传感器。In one embodiment, if there is a screen area with the same brightness value and the minimum brightness among the current brightness values of the screen areas corresponding to the above-mentioned multiple ambient light sensors, any one of the screen areas with the same brightness can be designated. The corresponding ambient light sensor is the target ambient light sensor.
步骤S103,获取目标环境光传感器当前检测到的第一光强度值。Step S103, acquiring the first light intensity value currently detected by the target ambient light sensor.
环境光传感器主要由光敏元件组成。目前光敏元件发展迅速、品种繁多、应用广泛。市场出售的有光敏电阻、光敏二极管、光电三极管、硅光电池等。环境光传感器可以感知周围光线情况,并告知处理芯片自动调节显示器背光亮度,降低产品的功耗。例如,在手机、笔记本,GPS等移动等手持设备应用中,显示器消耗的电量高达电池总电量的30%,采用环境光传感器可以最大限度地延长电池的工作时间。另一方面,环境光传感器有助于显示器提供柔和的画面。当环境亮度较高时,使用环境光传感器的液晶显示器会自动调成高亮度。当外界环境较暗时,显示器就会调成低亮度。Ambient light sensors are mainly composed of photosensitive elements. At present, photosensitive components have developed rapidly, have a wide variety and are widely used. There are photoresistors, photodiodes, phototransistors, silicon photovoltaic cells, etc. on the market. The ambient light sensor can sense the surrounding light and tell the processing chip to automatically adjust the backlight brightness of the display to reduce the power consumption of the product. For example, in mobile phone, notebook, GPS and other mobile handheld device applications, the display consumes up to 30% of the total battery power, and the use of ambient light sensors can maximize the battery's working time. On the other hand, the ambient light sensor helps the display deliver a soft picture. When the ambient brightness is high, the LCD monitor using the ambient light sensor will automatically adjust to high brightness. When the external environment is dark, the display will be adjusted to low brightness.
在一实施例当中,可以获取预设次数环境光传感器检测到的光强度值,然后计算多个光强度值的平均值,即为第一光强度值。其中,上属预设次数可以根据实际情况来设定,比如为10次,每1秒采集一次数据,以得到电子设备中环境光传感器在10秒内连续10次的采样数据,在环境光比较稳定(比如室内环境)的情况下,该数据跳动非常小,基本在个位数跳动,比如501nits、505nits、503nits一类的读值。在获取上述多个光强度值之后,可以将上述数值全部相加,然后除以个数即可得到多个光强度值的平均光强度值。比如,在预设时间段内,对环境光传感器的光强度值进行n次采样,以得到Q1、Q2、Q3……Qn等n个光强度值,计算Q1+Q2+Q3+……+Qn并将结果除以n即可得到其平均光强度值,即为第一光强度值。In one embodiment, the light intensity values detected by the ambient light sensor for a preset number of times may be acquired, and then the average value of the plurality of light intensity values may be calculated, which is the first light intensity value. Among them, the preset number of times can be set according to the actual situation, such as 10 times, and the data is collected every 1 second to obtain the sampling data of the ambient light sensor in the electronic device for 10 consecutive times within 10 seconds. In the case of stability (such as indoor environment), the data beating is very small, basically beating in single digits, such as 501nits, 505nits, 503nits and other readings. After the above-mentioned multiple light intensity values are obtained, all the above-mentioned values may be added up, and then divided by the number to obtain the average light intensity value of the multiple light intensity values. For example, in a preset time period, the light intensity value of the ambient light sensor is sampled n times to obtain n light intensity values such as Q1, Q2, Q3...Qn, etc., calculate Q1+Q2+Q3+...+Qn and Divide the result by n to obtain its average light intensity value, which is the first light intensity value.
步骤S104,根据第一光强度值和目标亮度值计算目标光强度值。Step S104: Calculate the target light intensity value according to the first light intensity value and the target brightness value.
本发明实施例中,由于环境光设置在屏幕的显示区域下方,因此屏幕的亮度将会对环境光光传感器的测量造成干扰。具体的,可以通过将第一光强度值减去目标亮度值来计算目标光强度值,该目标光强度值更加接近当前环境光的光强度值。In the embodiment of the present invention, since the ambient light is disposed below the display area of the screen, the brightness of the screen will interfere with the measurement of the ambient light sensor. Specifically, the target light intensity value may be calculated by subtracting the target brightness value from the first light intensity value, where the target light intensity value is closer to the light intensity value of the current ambient light.
其中,上述第一光强度值的单位与目标亮度值的单位可能不同,比如,第一光强度值的单位可以为勒克斯(Lux),而目标亮度值的单位可以为尼特,因此在进行计算之前还需要对上述单位进行换算,以使第一光强度值的单位与目标亮度值的单位相同,今儿进行计算。Wherein, the unit of the first light intensity value may be different from the unit of the target brightness value. For example, the unit of the first light intensity value may be Lux, and the unit of the target brightness value may be nits. Therefore, when calculating The above-mentioned units also need to be converted before, so that the unit of the first light intensity value is the same as the unit of the target brightness value, and now the calculation is performed.
电子设备在获取目标光强度值后,即可根据该环境光强度来调节显示屏的亮度,实现亮度的自动调节。After obtaining the target light intensity value, the electronic device can adjust the brightness of the display screen according to the ambient light intensity, so as to realize the automatic adjustment of the brightness.
由上可知,本申请实施例可以分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值,对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器,获取目标环境光传感器当前检测到的第一光强度值,根据第一光强度值和目标亮度值计算目标光强度值。本申请通过在终端中设置多个环境光传感器,选择对应屏幕区域亮度最小的环境光传感器来进行测光,可以减小屏幕亮度对检测结果的干扰,提升环境光检测的准确性。It can be seen from the above that in this embodiment of the present application, the current brightness value of the screen area corresponding to each ambient light sensor can be obtained separately to obtain multiple brightness values, and the multiple brightness values can be compared to determine the minimum brightness value. , the ambient light sensor corresponding to the target brightness value is the target ambient light sensor, obtains the first light intensity value currently detected by the target ambient light sensor, and calculates the target light intensity value according to the first light intensity value and the target brightness value. In the present application, by setting multiple ambient light sensors in the terminal, and selecting the ambient light sensor with the smallest brightness corresponding to the screen area for light metering, the interference of the screen brightness on the detection result can be reduced, and the accuracy of ambient light detection can be improved.
根据上一实施例的描述,以下将进一步地来说明本申请的环境光检测方法。According to the description of the previous embodiment, the ambient light detection method of the present application will be further described below.
请参阅图3,图3为本申请实施例提供的另一种环境光检测方法的流程示意图,包括以下步骤:Please refer to FIG. 3. FIG. 3 is a schematic flowchart of another ambient light detection method provided by an embodiment of the present application, including the following steps:
步骤S201,获取环境光传感器所对应的屏幕区域内每个像素点的亮度值。Step S201, acquiring the brightness value of each pixel in the screen area corresponding to the ambient light sensor.
在一实施例中,可以提取每个像素点的亮度值,以矩阵的形式的记录存储,便于后续直接调用亮度值,然后计算该区域的平均亮度值,比如将获取到的每个像素点的亮度值相加,除以像素点的个数,生成环境光传感器所对应的屏幕区域当前的亮度值。其中,可以在获取到该屏幕区域的图像中,将每个像素点的红色分量、绿色分量以及蓝色分量(red、green、blue,RGB)转换为色调、饱和度以及亮度值(Hue、saturation、value,HSV),获取每个像素点的亮度值。In one embodiment, the brightness value of each pixel can be extracted and stored in the form of a matrix, so that the brightness value can be directly called in the future, and then the average brightness value of the area can be calculated, such as the obtained value of each pixel. The brightness values are added and divided by the number of pixels to generate the current brightness value of the screen area corresponding to the ambient light sensor. Among them, in the acquired image of the screen area, the red component, green component and blue component (red, green, blue, RGB) of each pixel can be converted into hue, saturation and brightness values (Hue, saturation, RGB) , value, HSV) to get the brightness value of each pixel.
步骤S202,根据每个像素点的亮度值计算平均亮度值,并确定平均亮度值为环境光传感器所对应的屏幕区域当前的亮度值,多次获取以得到多个亮度值。Step S202: Calculate the average brightness value according to the brightness value of each pixel point, and determine the average brightness value as the current brightness value of the screen area corresponding to the ambient light sensor, and obtain multiple brightness values to obtain multiple brightness values.
在一实施例中,在获取每个像素点的亮度值之前,还可以判断电子设备是否为亮屏状态,若是,则获取屏幕当前显示的图像,然后进一步获取该图象当中环境光传感器所对应的图像区域中每个像素点的亮度值。具体地,将屏幕处于亮屏状态作为触发条件,当通过对系统应用程序的进程进行监听,以判断电子设备的屏幕是否处于亮屏状态,当监听到电容式触摸屏被点亮时,表示屏幕处于亮屏状态,即获取屏幕当前显示的图像In one embodiment, before acquiring the brightness value of each pixel, it is also possible to determine whether the electronic device is in a bright screen state, and if so, acquire the image currently displayed on the screen, and then further acquire the corresponding ambient light sensor in the image. The luminance value of each pixel in the image area of . Specifically, the screen is in the bright-screen state as the trigger condition, and by monitoring the process of the system application program, it is determined whether the screen of the electronic device is in the bright-screen state, and when the capacitive touch screen is monitored to be lit, it means that the screen is in Bright screen state, that is, to obtain the image currently displayed on the screen
步骤S203,对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器。Step S203 , comparing a plurality of brightness values, and determining that the minimum brightness value is the target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light sensor.
在一实施例中,在获取到多个环境光传感器所对应的屏幕区域的亮度值之后,对上述多个亮度值进行对比,以确定其中最小的目标亮度值。本发明实施例中,亮度值的单位可以为尼特(nits)。例如,在一实施例中,电子设备包含四个环境光传感器,分别设置在屏幕显示区域的左上、左下、右上以及右下,通过步骤S101测得上述4个屏幕区域的亮度值分别是200nits、500nits、300nits以及350nits,即可确定其中最小亮度值为200nits,也即目标亮度值,同时确定屏幕显示区域的左上位置所对应的环境光传感器为目标环境光传感器。In one embodiment, after acquiring the brightness values of the screen regions corresponding to the multiple ambient light sensors, the aforementioned multiple brightness values are compared to determine the smallest target brightness value among them. In this embodiment of the present invention, the unit of the luminance value may be nits. For example, in one embodiment, the electronic device includes four ambient light sensors, which are respectively disposed at the upper left, lower left, upper right and lower right of the screen display area, and the brightness values of the above four screen areas measured in step S101 are 200nits, 500nits, 300nits and 350nits, you can determine the minimum brightness value of 200nits, that is, the target brightness value, and determine the ambient light sensor corresponding to the upper left position of the screen display area as the target ambient light sensor.
步骤S204,获取目标环境光传感器当前检测到的第一光强度值。Step S204, acquiring the first light intensity value currently detected by the target ambient light sensor.
在一实施例当中,可以获取预设次数环境光传感器检测到的光强度值,然后计算多个光强度值的平均值,即为第一光强度值。其中,上属预设次数可以根据实际情况来设定,比如为10次,每1秒采集一次数据,以得到电子设备中环境光传感器在10秒内连续10次的采样数据,在环境光比较稳定(比如室内环境)的情况下,该数据跳动非常小,基本在个位数跳动,比如501nits、505nits、503nits一类的读值。在获取上述多个光强度值之后,可以将上述数值全部相加,然后除以个数即可得到多个光强度值的平均光强度值。In one embodiment, the light intensity values detected by the ambient light sensor for a preset number of times may be acquired, and then the average value of the plurality of light intensity values may be calculated, which is the first light intensity value. Among them, the preset number of times can be set according to the actual situation, such as 10 times, and the data is collected every 1 second to obtain the sampling data of the ambient light sensor in the electronic device for 10 consecutive times within 10 seconds. In the case of stability (such as indoor environment), the data beating is very small, basically beating in single digits, such as 501nits, 505nits, 503nits and other readings. After the above-mentioned multiple light intensity values are obtained, all the above-mentioned values may be added up, and then divided by the number to obtain the average light intensity value of the multiple light intensity values.
步骤S205,获取目标环境光传感器之外的环境光传感器当前检测到的第二光强度值。Step S205, acquiring the second light intensity value currently detected by ambient light sensors other than the target ambient light sensor.
其中,通过上述目标环境光传感器之外的环境光传感器当前检测到的第二光强度值可以与步骤S204中相同。Wherein, the second light intensity value currently detected by the ambient light sensor other than the target ambient light sensor may be the same as that in step S204.
步骤S206,计算第二光强度值与第一光强度值之间的差值。Step S206, calculating the difference between the second light intensity value and the first light intensity value.
步骤S207,判断差值是否小于预设值,若是,则执行步骤S208,若否,则结束流程。Step S207, it is judged whether the difference value is smaller than the preset value, if yes, then step S208 is executed, if not, the process ends.
在实际使用当中,由于上述多个环境光传感器均设置在屏幕的显示区域,而显示区域也是电子设备的触控区域,因此当用户在电子设备上进行触控操作时,可能存在用户手指或其他东西在环境光传感器上方遮挡导致测量的光强度值不准确,因此可以判断目标环境光传感器是否被遮挡,若没被遮挡,则继续执行下一步骤。In actual use, since the above-mentioned multiple ambient light sensors are all set in the display area of the screen, and the display area is also the touch area of the electronic device, when the user performs a touch operation on the electronic device, there may be user fingers or other If something is blocked above the ambient light sensor, the measured light intensity value is inaccurate. Therefore, it can be determined whether the target ambient light sensor is blocked. If it is not blocked, proceed to the next step.
其中,上述判断目标环境光传感器是否被遮挡可以通过判断上述目标传感器测得的地一光强度值与其他环境光传感器测得的第二光强度值之间的差值是否小于预设值,由于当电子设备中的多个环境光传感器中的一个被遮挡时,该环境光传感器与其他环境光传感器所测得的光强度值差距会比较大,因此采用该方案判断目标环境光传感器是否被遮挡。若第二光强度值与第一光强度值的差值小于预设值,则确定该目标环境光传感器未被遮挡,则进一步执行步骤S208。The above determination of whether the target ambient light sensor is blocked can be determined by judging whether the difference between the first light intensity value measured by the above target sensor and the second light intensity value measured by other ambient light sensors is smaller than the preset value, because When one of the multiple ambient light sensors in the electronic device is blocked, the difference between the light intensity values measured by the ambient light sensor and other ambient light sensors will be relatively large. Therefore, this solution is used to determine whether the target ambient light sensor is blocked. . If the difference between the second light intensity value and the first light intensity value is smaller than the preset value, it is determined that the target ambient light sensor is not blocked, and step S208 is further performed.
步骤S208,计算第一光强度值与目标亮度值的差值,并确定该差值为目标光强度值。Step S208: Calculate the difference between the first light intensity value and the target brightness value, and determine that the difference is the target light intensity value.
本发明实施例中,由于环境光设置在屏幕的显示区域下方,因此屏幕的亮度将会对环境光光传感器的测量造成干扰。具体的,可以通过将第一光强度值减去目标亮度值来计算目标光强度值,该目标光强度值更加接近当前环境光的光强度值。In the embodiment of the present invention, since the ambient light is disposed below the display area of the screen, the brightness of the screen will interfere with the measurement of the ambient light sensor. Specifically, the target light intensity value may be calculated by subtracting the target brightness value from the first light intensity value, where the target light intensity value is closer to the light intensity value of the current ambient light.
电子设备在获取目标光强度值后,即可根据该环境光强度来调节显示屏的亮度,实现亮度的自动调节。After obtaining the target light intensity value, the electronic device can adjust the brightness of the display screen according to the ambient light intensity, so as to realize the automatic adjustment of the brightness.
由上可知,本申请实施例可以获取环境光传感器所对应的屏幕区域内每个像素点的亮度值,根据每个像素点的亮度值计算平均亮度值,并确定平均亮度值为环境光传感器所对应的屏幕区域当前的亮度值,多次获取以得到多个亮度值,对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器,获取目标环境光传感器当前检测到的第一光强度值,获取目标环境光传感器之外的环境光传感器当前检测到的第二光强度值,计算第二光强度值与第一光强度值之间的差值,判断差值是否小于预设值,若是,则计算第一光强度值与目标亮度值的差值,并确定该差值为目标光强度值。本申请通过在终端中设置多个环境光传感器,选择对应屏幕区域亮度最小的环境光传感器来进行测光,可以减小屏幕亮度对检测结果的干扰,提升环境光检测的准确性。It can be seen from the above that the embodiment of the present application can obtain the brightness value of each pixel in the screen area corresponding to the ambient light sensor, calculate the average brightness value according to the brightness value of each pixel, and determine the average brightness value as the ambient light sensor. The current brightness value of the corresponding screen area is obtained multiple times to obtain multiple brightness values, and the multiple brightness values are compared to determine the minimum brightness value. The target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light The sensor obtains the first light intensity value currently detected by the target ambient light sensor, obtains the second light intensity value currently detected by the ambient light sensor other than the target ambient light sensor, and calculates the second light intensity value and the first light intensity value and determine whether the difference is smaller than the preset value, and if so, calculate the difference between the first light intensity value and the target brightness value, and determine that the difference is the target light intensity value. In the present application, by setting multiple ambient light sensors in the terminal, and selecting the ambient light sensor with the smallest brightness corresponding to the screen area for light metering, the interference of the screen brightness on the detection result can be reduced, and the accuracy of ambient light detection can be improved.
为了便于更好的实施本申请实施例提供的环境光检测方法,本申请实施例还提供了一种基于上述环境光检测方法的装置。其中名词的含义与上述环境光检测方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate better implementation of the ambient light detection method provided by the embodiments of the present application, the embodiments of the present application further provide a device based on the above ambient light detection method. The meanings of the nouns are the same as those in the above-mentioned ambient light detection method, and the specific implementation details can refer to the description in the method embodiment.
请参阅图4,图4为本申请实施例提供的一种环境光检测装置的结构示意图,应用于电子设备,电子设备包括设置在屏幕显示区域不同位置的多个环境光传感器,该环境光检测装置30包括:第一获取模块301、确定模块302、第二获取模块303以及计算模块304;Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of an ambient light detection device provided by an embodiment of the application, applied to an electronic device. The electronic device includes a plurality of ambient light sensors disposed at different positions in a screen display area. The ambient light detection device The
该第一获取模块301,用于分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值;The first obtaining
该确定模块302,用于对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器;The determining
该第二获取模块303,用于获取目标环境光传感器当前检测到的第一光强度值;The second obtaining
该计算模块304,用于根据第一光强度值和目标亮度值计算目标光强度值。The
继续参阅图5,在一实施例当中,第一获取模块301包括:获取子模块3011和计算子模块3012;Continuing to refer to FIG. 5 , in one embodiment, the
该获取子模块3011,用于获取环境光传感器所对应的屏幕区域内每个像素点的亮度值;The acquisition sub-module 3011 is used to acquire the brightness value of each pixel in the screen area corresponding to the ambient light sensor;
该计算子模块3012,用于根据每个像素点的亮度值计算平均亮度值,并确定平均亮度值为环境光传感器所对应的屏幕区域当前的亮度值,多次获取以得到多个亮度值。The
在一实施例中,计算模块304,具体用于计算第一光强度值与目标亮度值的差值,并确定差值为目标光强度值。In one embodiment, the
进一步的,上述环境光检测装置30还可以包括:第三获取模块305和判断模块306;Further, the above-mentioned ambient
该第三获取模块305,用于当第二获取模块303获取目标环境光传感器当前检测到的第一光强度值之后,获取目标环境光传感器之外的环境光传感器当前检测到的第二光强度值;The
该判断模块306,用于计算第二光强度值与第一光强度值之间的差值,并判断差值是否满足预设条件;The judging
上述计算模块304,具体用于当判断模块306判断为是时,根据第一光强度值和目标亮度值计算目标光强度值。The
由上可知,本申请实施例提供的环境光检测装置30可以通过第一获取模块301分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值,确定模块302对多个亮度值进行对比,确定最小的亮度值为目标亮度值,目标亮度值所对应的环境光传感器为目标环境光传感器,第二获取模块303获取目标环境光传感器当前检测到的第一光强度值,计算模块304根据第一光强度值和目标亮度值计算目标光强度值。本申请通过在终端中设置多个环境光传感器,选择对应屏幕区域亮度最小的环境光传感器来进行测光,可以减小屏幕亮度对检测结果的干扰,提升环境光检测的准确性。It can be seen from the above that the ambient
本申请还提供一种存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现方法实施例提供的环境光检测方法。The present application further provides a storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the ambient light detection method provided by the method embodiment is implemented.
本申请还提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现方法实施例提供的环境光检测方法。The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the program, the environment provided by the method embodiment is implemented Light detection method.
在本申请又一实施例中还提供一种电子设备,该电子设备可以是智能手机、平板电脑等设备。如图6所示,电子设备400包括处理器401、存储器402。其中,处理器401与存储器402电性连接。Another embodiment of the present application further provides an electronic device, where the electronic device may be a smartphone, a tablet computer, or the like. As shown in FIG. 6 , the
处理器401是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The
在本实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能:In this embodiment, the
分别获取每个环境光传感器所对应的屏幕区域当前的亮度值,以得到多个亮度值;Obtain the current brightness value of the screen area corresponding to each ambient light sensor to obtain multiple brightness values;
对所述多个亮度值进行对比,确定最小的亮度值为目标亮度值,所述目标亮度值所对应的环境光传感器为目标环境光传感器;Comparing the plurality of brightness values, it is determined that the minimum brightness value is the target brightness value, and the ambient light sensor corresponding to the target brightness value is the target ambient light sensor;
获取所述目标环境光传感器当前检测到的第一光强度值;obtaining the first light intensity value currently detected by the target ambient light sensor;
根据所述第一光强度值和所述目标亮度值计算目标光强度值。A target light intensity value is calculated according to the first light intensity value and the target brightness value.
请参阅图7,图7为本申请实施例提供的电子设备结构示意图。该电子设备500可以包括射频(RF,Radio Frequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器504、音频电路506、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 7 , which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The
射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路501还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通信系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器508通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入单元503对存储器502的访问。
输入单元503可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元503可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。The
显示单元504可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元504可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid CrystalDisplay)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图7中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The
电子设备还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于电子设备还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device may also include at least one
音频电路506可通过扬声器、传声器提供用户与电子设备之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经射频电路501以发送给比如另一电子设备,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与电子设备的通信。The
无线保真(WiFi)属于短距离无线传输技术,电子设备通过无线保真模块507可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图7示出了无线保真模块507,但是可以理解的是,其并不属于电子设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology, and the electronic device can help users to send and receive emails, browse web pages and access streaming media through the Wi-
处理器508是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The
电子设备还包括给各个部件供电的电源509(比如电池)。优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power source 509 (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the
尽管图7中未示出,电子设备还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 7 , the electronic device may also include a camera, a Bluetooth module, and the like, which will not be repeated here.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules can refer to the previous method embodiments, which will not be repeated here.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如信息发布方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read OnlyMemory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as It is stored in the memory of the terminal and executed by at least one processor in the terminal, and the execution process may include the flow of the embodiment of the information publishing method. The storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
以上对本申请实施例提供的一种环境光检测方法、装置、存储介质和电子设备进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The ambient light detection method, device, storage medium, and electronic device provided by the embodiments of the present application are described in detail above. Each functional module may be integrated in a processing chip, or each module may exist physically alone, or two One or more modules are 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. The principles and implementations of the present application are described herein using specific examples, and the descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; meanwhile, for those skilled in the art, according to the Thoughts, there will be changes in specific embodiments and application scopes. To sum up, the contents of this specification should not be construed as limitations on the present application.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711176941.0A CN107966209B (en) | 2017-11-22 | 2017-11-22 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711176941.0A CN107966209B (en) | 2017-11-22 | 2017-11-22 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107966209A CN107966209A (en) | 2018-04-27 |
CN107966209B true CN107966209B (en) | 2020-07-07 |
Family
ID=62000412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711176941.0A Active CN107966209B (en) | 2017-11-22 | 2017-11-22 | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107966209B (en) |
Families Citing this family (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108494974B (en) * | 2018-05-10 | 2021-05-04 | Oppo广东移动通信有限公司 | Display brightness adjusting method, mobile terminal and storage medium |
CN108847199B (en) * | 2018-06-22 | 2020-06-02 | 北京小米移动软件有限公司 | Brightness determination method and device |
CN108924347B (en) * | 2018-06-27 | 2021-05-11 | Oppo广东移动通信有限公司 | Control method, control device, electronic device, storage medium, and computer apparatus |
CN109067983B (en) * | 2018-07-17 | 2021-07-20 | Oppo广东移动通信有限公司 | Information prompting method, storage medium and electronic device |
CN109460199A (en) * | 2018-09-18 | 2019-03-12 | 努比亚技术有限公司 | A kind of preceding screen of terminal determines method, terminal and computer readable storage medium |
CN111243506B (en) * | 2018-11-29 | 2021-11-02 | 北京小米移动软件有限公司 | Screen brightness adjusting method, device, equipment and storage medium |
CN111261074B (en) * | 2018-11-30 | 2023-10-31 | 上海耕岩智能科技有限公司 | Method for detecting whether screen emits light uniformly, storage medium and electronic equipment |
CN113574588B (en) * | 2019-03-08 | 2024-07-19 | ams国际有限公司 | Spectral decomposition of ambient light measurements |
CN111989734B (en) * | 2019-03-13 | 2023-08-22 | 西安诺瓦星云科技股份有限公司 | Environment parameter acquisition method, device and system, display terminal and brightness adjustment method |
CN112133723A (en) * | 2019-06-24 | 2020-12-25 | 南昌欧菲生物识别技术有限公司 | Photosensitive modules, display devices and electronic equipment |
CN112714205B (en) * | 2019-10-24 | 2023-06-20 | 北京小米移动软件有限公司 | Ambient light intensity determination method, device and storage medium |
CN110730262A (en) * | 2019-10-30 | 2020-01-24 | 北京字节跳动网络技术有限公司 | Environment brightness value detection method and device and electronic equipment |
CN110636230B (en) * | 2019-10-31 | 2021-03-05 | Oppo广东移动通信有限公司 | Exposure adjusting method, device, equipment and storage medium |
CN113132532B (en) * | 2019-12-26 | 2022-05-13 | 超聚变数字技术有限公司 | Ambient light intensity calibration method and device and electronic equipment |
CN111189537A (en) * | 2020-01-07 | 2020-05-22 | 中国科学院武汉物理与数学研究所 | Device and method for simultaneously monitoring multi-channel and multi-type laser power |
CN111459983A (en) * | 2020-03-27 | 2020-07-28 | Tcl移动通信科技(宁波)有限公司 | Light value reporting method and device, storage medium and mobile terminal |
CN111486950B (en) * | 2020-04-20 | 2022-04-19 | Oppo广东移动通信有限公司 | Ambient light detection method, device, electronic device and storage medium |
CN111785230B (en) * | 2020-06-22 | 2022-07-26 | Oppo广东移动通信有限公司 | Brightness adjusting method, terminal and storage medium |
CN112767866B (en) * | 2021-01-28 | 2022-09-23 | 昆山国显光电有限公司 | Display apparatus and control method thereof |
CN113837990B (en) * | 2021-06-11 | 2022-09-30 | 荣耀终端有限公司 | Noise monitoring method, electronic device, chip system and storage medium |
CN113542499A (en) * | 2021-07-16 | 2021-10-22 | 上海众链科技有限公司 | Intelligent light sensing method and structure of mobile phone and mobile phone |
CN114461093B (en) * | 2021-08-19 | 2023-01-20 | 荣耀终端有限公司 | A method for detecting ambient light, electronic equipment, a chip system, and a storage medium |
CN113920963A (en) * | 2021-09-18 | 2022-01-11 | 荣耀终端有限公司 | A screen brightness adjustment method, electronic device and storage medium |
CN113984201B (en) * | 2021-11-03 | 2023-06-27 | 武汉华星光电技术有限公司 | Ambient light sensing structure and display panel |
CN114459600A (en) * | 2022-01-29 | 2022-05-10 | 维沃移动通信有限公司 | Ambient light detection method and device and display screen compensation display method and device |
CN115719589A (en) * | 2022-11-15 | 2023-02-28 | 北京小米移动软件有限公司 | Brightness control method, device, electronic device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009031666A (en) * | 2007-07-30 | 2009-02-12 | Lg Display Co Ltd | Display device with integrated touch panel |
CN104765422A (en) * | 2015-04-28 | 2015-07-08 | 小米科技有限责任公司 | Screen module of mobile equipment and mobile equipment |
CN105334911A (en) * | 2014-06-26 | 2016-02-17 | 联想(北京)有限公司 | Electronic device |
CN107300417A (en) * | 2017-05-25 | 2017-10-27 | 广东欧珀移动通信有限公司 | Detection method, device, storage medium and the terminal of ambient light |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6747290B2 (en) * | 2000-12-12 | 2004-06-08 | Semiconductor Energy Laboratory Co., Ltd. | Information device |
US7009663B2 (en) * | 2003-12-17 | 2006-03-07 | Planar Systems, Inc. | Integrated optical light sensitive active matrix liquid crystal display |
JP5301240B2 (en) * | 2007-12-05 | 2013-09-25 | 株式会社ジャパンディスプレイウェスト | Display device |
-
2017
- 2017-11-22 CN CN201711176941.0A patent/CN107966209B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009031666A (en) * | 2007-07-30 | 2009-02-12 | Lg Display Co Ltd | Display device with integrated touch panel |
CN105334911A (en) * | 2014-06-26 | 2016-02-17 | 联想(北京)有限公司 | Electronic device |
CN104765422A (en) * | 2015-04-28 | 2015-07-08 | 小米科技有限责任公司 | Screen module of mobile equipment and mobile equipment |
CN107300417A (en) * | 2017-05-25 | 2017-10-27 | 广东欧珀移动通信有限公司 | Detection method, device, storage medium and the terminal of ambient light |
Also Published As
Publication number | Publication date |
---|---|
CN107966209A (en) | 2018-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107966209B (en) | Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus | |
CN107943345B (en) | Calibration method, device, storage medium and electronic device for proximity sensor | |
US9697622B2 (en) | Interface adjustment method, apparatus, and terminal | |
CN107038681B (en) | Image blurring method and device, computer readable storage medium and computer device | |
CN107168469B (en) | Fingerprint acquisition method and related product | |
CN107942306B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
CN108494957A (en) | Antenna switching method and device, storage medium and electronic equipment | |
US10922846B2 (en) | Method, device and system for identifying light spot | |
US11915633B2 (en) | Screen color temperature control method, apparatus, storage medium, and mobile terminal | |
CN114143523A (en) | Brightness adjusting method and device, projection equipment and storage medium | |
CN107734618B (en) | Application program closing method and device, storage medium and electronic equipment | |
CN113852751B (en) | Image processing method, device, terminal and storage medium | |
CN109032487A (en) | Electronic device control method, electronic device control device, storage medium and electronic device | |
CN117435109A (en) | Content display method and device and computer readable storage medium | |
CN113676663B (en) | Camera white balance adjustment method, device, storage medium and terminal equipment | |
CN112867171B (en) | WIFI connection method and device, storage medium and mobile terminal | |
CN111081198B (en) | Data control method, data control device, storage medium and terminal equipment | |
CN110995324B (en) | Bluetooth communication method, device, storage medium and terminal equipment | |
CN111107616A (en) | Light sensor control method and device and terminal | |
CN111048056A (en) | Terminal equipment brightness adjusting method and system, storage medium and terminal equipment | |
CN111026488B (en) | Communication data saving method, device, terminal equipment and storage medium | |
CN111521375B (en) | Gamma value determination method and device | |
CN111147838B (en) | Image processing method and device and mobile terminal | |
CN110275637B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
CN111651313B (en) | Conversion method and system of identification card, storage medium and terminal equipment |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |