WO2023137957A1 - 环境光感值的获取方法、电子设备及计算机可读存储介质 - Google Patents

环境光感值的获取方法、电子设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2023137957A1
WO2023137957A1 PCT/CN2022/098721 CN2022098721W WO2023137957A1 WO 2023137957 A1 WO2023137957 A1 WO 2023137957A1 CN 2022098721 W CN2022098721 W CN 2022098721W WO 2023137957 A1 WO2023137957 A1 WO 2023137957A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
light
stable
sensing
photosensitive
Prior art date
Application number
PCT/CN2022/098721
Other languages
English (en)
French (fr)
Inventor
朱丽华
Original Assignee
上海闻泰信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海闻泰信息技术有限公司 filed Critical 上海闻泰信息技术有限公司
Publication of WO2023137957A1 publication Critical patent/WO2023137957A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • G01J1/02Details
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/0626Adjustment of display parameters for control of overall brightness

Definitions

  • the present disclosure relates to a method for acquiring ambient light sensitivity values, an electronic device, and a computer-readable storage medium.
  • electronic devices With the development of society, electronic devices have been deeply involved in people's daily life. Generally, electronic devices are provided with a display brightness automatic adjustment function. When the user is using the electronic device, the electronic device will monitor the current ambient light sensitivity value in real time, and adjust the screen display brightness of the electronic device according to the monitored ambient light sensitivity value.
  • a method for acquiring an ambient light sensitivity value, an electronic device, and a computer-readable storage medium are provided.
  • the discrete degree value includes a variance
  • merging the first stable optical perception value and the second stable optical perception value to obtain an ambient light perception value includes: if the variance corresponding to the first stable optical perception value and the second stable optical perception value is less than a preset variance threshold, merging the first stable optical perception value and the second stable optical perception value to obtain an ambient light perception value; or, the discrete degree value includes a standard deviation.
  • merging the first stable light perception value and the second stable light perception value to obtain an ambient light perception value includes: if the standard deviation corresponding to the first stable light perception value and the second stable light perception value is less than a preset standard deviation threshold, then merging the first stable light perception value and the second stable light perception value to obtain an ambient light perception value.
  • the calculation of the degree of dispersion corresponding to the first photosensitive stable value and the second photosensitive stable value includes:
  • the merging of the first light-sensing stable value and the second light-sensing stable value to obtain the ambient light-sensing value includes:
  • the determining the first light-sensing stable value according to the multiple first light-sensing values collected by the first light-sensing sensor includes:
  • Denoising the plurality of first photosensitive values and if the number of the denoised first photosensitive values reaches a first preset number threshold, using the first average value corresponding to the denoised first photosensitive values as the first photosensitive stable value;
  • the determining the second stable value of light perception based on a plurality of second light perception values collected by the second light perception sensor includes:
  • Denoising the plurality of second photosensitive values and if the number of the denoised second photosensitive values reaches a second preset number threshold, using the second mean value corresponding to the denoised second photosensitive values as the second photosensitive stable value;
  • the first photosensor is a front photosensor arranged on the front of the screen of the electronic device
  • the second photosensor is a rear photosensor arranged on the back of the screen of the electronic device.
  • the denoising the multiple first light sensitivity values includes:
  • the first mean value corresponding to the first light perception value after denoising is used as the first stable light perception value, including:
  • the first average value corresponding to the first photosensitive values in the first photosensitive buffer queue whose number reaches the first preset number threshold is used as a first photosensitive stable value.
  • the judging whether the read first light-sensitivity value is a noise light-sensitivity value includes:
  • the first head of line value is the first first light-sensing value written in the first light-sensing buffer queue
  • both the first head-of-line value and the read first light-sensing value are smaller than the first stable light-sensing value determined last time, or both the first head-of-line value and the read first light-sensing value are greater than the first stable light-sensing value determined last time, it is determined that the read first light-sensing value is not a noise light-sensing value.
  • the acquiring the first head-of-line value includes:
  • the denoising the multiple second light sensitivity values includes:
  • the second collection buffer is used to store a plurality of second light-sensing values collected by the second light sensor
  • the second mean value corresponding to the second light perception value after denoising is used as the second light perception stable value, including:
  • the second average value corresponding to the second photosensitive values in the second photosensitive buffer queue whose number reaches the second preset number threshold is used as a second photosensitive stable value.
  • the judging whether the read second light sensitivity value is a noise light sensitivity value includes:
  • the read second light-sensing value is not a noise light-sensing value.
  • determining the first light-sensing stable value according to the multiple first light-sensing values collected by the first light-sensing sensor includes:
  • the determining the second stable value of light perception based on a plurality of second light perception values collected by the second light perception sensor includes:
  • the method further includes:
  • the degree of dispersion corresponding to the first stable light perception value and the second stable light perception value if the degree of dispersion is greater than or equal to the preset threshold value, discarding the first stable light perception value and the second stable light perception value, re-acquiring a re-determined first stable light-sensing value based on the first light-sensing value collected by the first light-sensing sensor and obtaining a re-determined second stable light-sensing value according to the second light-sensing value collected by the second light sensor, and continuing to judge the re-determined first stable light-sensing value and the re-determined second stable light-sensing value Whether the determined value of the degree of dispersion is smaller than the preset threshold, until the re-determined value of the degree of dispersion is smaller than the preset threshold.
  • the merging the first stable light perception value and the second stable light perception value to obtain the ambient light perception value includes:
  • An average value corresponding to the first stable light perception value and the second stable light perception value is determined as the ambient light perception value.
  • the merging the first stable light perception value and the second stable light perception value to obtain the ambient light perception value includes:
  • a value obtained by performing weighted summation of the first stable light perception value and the second stable light perception value based on different weights is determined as the ambient light perception value.
  • a device for acquiring ambient light sensitivity values including at least a first light sensor and a second light sensor, and further comprising:
  • a stable value determining module configuring the stable value determining module as a module for determining a first light-sensing stable value based on a plurality of first light-sensing values collected by the first light-sensing sensor; and a module configured to determine a second light-sensing stable value based on a plurality of second light-sensing values collected by the second light-sensing sensor;
  • a fusion module configuring the fusion module as a module that calculates the degree of dispersion value corresponding to the first stable light perception value and the second stable light perception value, and if the discrete degree value is less than a preset threshold value, configuring the fusion module as a module that fuses the first stable light perception value and the second stable light perception value to obtain an ambient light perception value.
  • the value of the degree of dispersion includes a variance
  • the fusion module further configures the fusion module to fuse the first stable value of light perception with the second stable value of light perception to obtain a module of ambient light perception values if the variance corresponding to the first stable light perception value and the second stable light perception value is less than a preset standard deviation. Threshold, the first stable light perception value is fused with the second stable light perception value to obtain a module of the ambient light perception value.
  • the fusion module further configures the fusion module as a module for obtaining an average value corresponding to the first stable light perception value and the second stable light perception value; and, a module configured to calculate a first difference between the first stable light perception value and the average value; and a module configured to calculate a second difference between the second stable light perception value and the average value; The module of the discrete degree value corresponding to the stable value.
  • the fusion module further configures the fusion module as a module that multiplies the first stable light perception value by a first weight to obtain a first numerical value; and is configured as a module that multiplies the second stable light perception value by a second weight to obtain a second numerical value, and the sum of the second weight and the first weight is 1; and is configured as a module that adds the first numerical value to the second numerical value to obtain an ambient light perception value.
  • the stable value determination module further includes a first collection unit configured as a module for collecting a plurality of first light-sensing values through the first light-sensing sensor;
  • the stable value determination module further includes a first denoising unit configured as a module for denoising the plurality of first light perception values;
  • the stable value determination module also includes a first determination unit configured to configure the first determination unit as a module that uses the first mean value corresponding to the denoised first light perception value as the first light perception stable value if the number of the denoised first light perception value reaches a first preset number threshold;
  • the stable value determination module further includes a second acquisition unit configured as a module for collecting a plurality of second light-sensing values through the second light-sensing sensor;
  • the stable value determination module further includes a second denoising unit configured as a module for denoising the plurality of second light perception values;
  • the stable value determination module further includes a second determination unit, and the second determination unit is configured such that if the number of the denoised second light sensitivity values reaches a second preset number threshold, the second average value corresponding to the denoised second light sensitivity value is used as a second light sensitivity stable value module; wherein the first light sensor is a front light sensor arranged on the front of the screen of the electronic device, and the second light sensor is a rear light sensor arranged on the back of the screen of the electronic device.
  • the first denoising unit further configures the first denoising unit as a module for reading the first light sensing values collected by the first light sensor one by one from the first acquisition buffer; the first acquisition buffer is used to store multiple first light sensing values collected by the first light sensor; and, the first denoising unit is further configured as a module for judging whether the read first light sensing value is a noise point light sensing value, and if the read first light sensing value is not a noise point light sensing value, then it is configured as a module for writing the read first light sensing value into the first light sensing buffer queue;
  • the first determining unit further configures the first determining unit as a module that if the number of first light-sensing values written in the first light-sensing buffer queue reaches a first preset number threshold, the first average value corresponding to the first light-sensing values in the first light-sensing buffer queue whose number reaches the first preset number threshold is used as a first light-sensing stable value.
  • the first acquisition unit is also configured as a module for acquiring a first head-of-line value, where the first head-of-line value is the first first light-sensing value written in the first light-sensing buffer queue;
  • the first determining unit further configures the first determining unit as a module that determines that the read first light-sensing value is not a noise light-sensing value when both the first head-of-line value and the read first light-sensing value are smaller than the last determined first light-sensing stable value, or when the first head-of-line value and the read first light-sensing value are greater than the last determined first light-sensing stable value.
  • An electronic device comprising at least a first light sensor and a second light sensor, and further comprising a memory storing computer-readable instructions and one or more processors coupled to the memory; the one or more processors are configured to call a module of the computer-readable instructions stored in the memory; when the computer-readable instructions are executed by the one or more processors, the one or more processors execute the steps of the method for obtaining ambient light-sensing values described in any one of the above.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, the computer-readable storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, the one or more processors are made to perform the steps of the method for obtaining ambient light sensitivity values described in any one of the above.
  • a computer program product when the computer program product is run on a computer, the computer is made to execute the steps of the method for obtaining ambient light sensitivity value described in any one of the above.
  • An application distribution platform the application distribution platform is used to distribute computer program products, wherein, when the computer program products run on a computer, the computer is made to execute the steps of the method for obtaining ambient light sensitivity values described in any one of the above.
  • Fig. 1a is a schematic structural diagram of an electronic device in one or more embodiments of the present disclosure
  • Fig. 1b is another schematic structural diagram of an electronic device in one or more embodiments of the present disclosure.
  • FIG. 2 is a schematic flowchart of a method for acquiring ambient light sensitivity values provided by one or more embodiments of the present disclosure
  • Fig. 3 is another schematic flow chart of the method for acquiring ambient light sensitivity values provided by one or more embodiments of the present disclosure
  • FIG. 4 is a schematic structural diagram of an acquisition device for ambient light sensitivity values in one or more embodiments of the present disclosure
  • Fig. 5 is another schematic structural diagram of an electronic device in one or more embodiments of the present disclosure.
  • first and second and the like in the specification and claims of the present disclosure are used to distinguish different objects, rather than to describe a specific order of objects.
  • first camera and the second camera are used to distinguish different cameras, not to describe a specific order of the cameras.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present disclosure shall not be construed as being preferred or advantageous over other embodiments or designs. To be precise, the use of words such as “exemplary” or “for example” is intended to present related concepts in a specific manner. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "plurality” refers to two or more.
  • the electronic device involved in the embodiments of the present disclosure may at least include but not limited to two light sensors, which are respectively a first light sensor and a second light sensor.
  • the photosensitive sensor can be used to collect the photosensitive value, and the photosensitive value refers to the intensity value of light.
  • the unit of the light sensitivity value is candela/square meter (abbreviation: cd/m 2 ).
  • the first photosensor may be a front photosensor arranged on the front of the screen of the electronic device
  • the second photosensor may be a rear photosensor arranged on the back of the screen of the electronic device.
  • the first photosensitive sensor can collect multiple first photosensitive values, that is, the first photosensitive sensor can collect multiple first photosensitive values on the front of the electronic device screen, and the electronic device stores the multiple first photosensitive values in the first collection buffer;
  • the second photosensitive sensor can collect multiple second photosensitive values, that is, the second photosensitive sensor can collect multiple second photosensitive values on the back of the electronic device screen, and the electronic device stores the multiple second photosensitive values in the second collection buffer.
  • the first acquisition buffer and the second acquisition buffer may be a circular queue.
  • FIG. 1 a it is a schematic structural diagram of an electronic device in one or more embodiments of the present disclosure.
  • the electronic device 100 includes a first light sensor 101 , and the first light sensor 101 is arranged on the front of the screen of the electronic device 100 .
  • FIG. 1 b it is another schematic structural diagram of an electronic device in one or more embodiments of the present disclosure.
  • the electronic device 100 includes a second photosensor 102 , and the second photosensor 102 is disposed on the back of the screen of the electronic device 100 .
  • FIG. 2 is a schematic flowchart of a method for obtaining ambient light sensitivity values provided by one or more embodiments of the present disclosure, wherein the method for obtaining ambient light sensitivity values described in FIG. 2 can be applied to electronic devices.
  • the method for obtaining ambient light sensitivity values may include the following steps:
  • an average value corresponding to the multiple first light-sensing values may be used as the first stable light-sensing value.
  • the electronic device collects 5 first light sensitivity values through the first light sensor, they are 120cd/m 2 , 123cd/m 2 , 130cd/m 2 , 146cd/m 2 and 127cd/m 2 .
  • the noisy light-sensing values can be understood as the light-sensing values collected under abnormal conditions, such as the light-sensing values collected by the electronic device when the brightness of the current ambient light source changes frequently or the electronic device has multiple light sources.
  • the electronic device determines a relatively accurate first light sensitivity stable value according to the denoised first light sensitivity value.
  • an average value corresponding to the multiple second light-sensing values may be used as the second stable light-sensing value.
  • the electronic device may first perform denoising processing on the multiple second light-sensing values acquired to obtain the second light-sensing value with the noise-free light-sensing value, and the electronic device then determines a more accurate second light-sensing stable value based on the denoised second light-sensing value.
  • the electronic device may first execute step 201 and then execute step 202, may execute first step 202 and then execute step 201, or may execute both step 201 and step 202, which are not specifically limited here.
  • the degree of dispersion may indicate the degree of deviation between the first stable light perception value and the second stable light perception value, that is, the degree of deviation between the two stable light perception values and the average value corresponding to the two stable light perception values. If the value of the degree of dispersion is small, it means that the degree of deviation between the two stable values of light perception and the average value corresponding to the two stable values of light perception is small; if the value of the degree of dispersion is large, it means that the degree of deviation between the two stable values of light perception and the average value corresponding to the two stable values of light perception is relatively large.
  • the dispersion value may include but not limited to variance or standard deviation.
  • the degree of dispersion value when the degree of dispersion value is less than the preset threshold value, it means that the first stable light perception value and the second stable light perception value have a small deviation between the two stable light perception values and the average value corresponding to the two stable light perception values. At this time, the ambient light perception value obtained by fusing the first stable light perception value and the second stable light perception value by the electronic device is more accurate.
  • the dispersion degree value when the dispersion degree value is greater than or equal to the preset threshold value, it means that the deviation between the two light-sensing stable values and the average value corresponding to the two light-sensing stable values is relatively large, indicating that the light-sensing value collected by at least one light-sensing sensor in the first light-sensing sensor or the second light-sensing sensor is inaccurate, even if the electronic device fuses the first light-sensing stable value and the second light-sensing stable value, the obtained ambient light-sensing value is not accurate enough.
  • the first stable light perception value and the second stable light perception value determined this time can be directly discarded, the first stable light perception value is determined again according to the first light perception value collected by the first light sensor, and the second stable light perception value is determined according to the second light perception value collected by the second light sensor, and continue to judge whether the discrete degree value corresponding to the re-determined first stable light perception value and the second stable light perception value is less than the preset threshold value, until the re-determined discrete The divergence value is less than the preset threshold.
  • users have different habits of using electronic devices, for example: using electronic devices while sitting, using electronic devices while lying down, and so on.
  • the user uses the electronic device, if the user moves the front of the screen of the electronic device from facing away from the ambient light source to facing the ambient light source, it means that the first stable light sensing value corresponding to the multiple first light sensing values collected by the first light sensing sensor is closer to the ambient light sensing value than the second stable light sensing value.
  • the ambient light sensitivity value is not accurate enough. If the user moves the front of the screen of the electronic device from facing the ambient light source to facing away from the ambient light source, it means that the second stable light sensing value is closer to the ambient light sensing value than the first stable light sensing value.
  • the second stable light sensing value can be used as the ambient light sensing value, but the second stable light sensing value is not accurate enough compared to the actual ambient light sensing value.
  • the preset threshold may be set by the electronic device before leaving the factory.
  • the value of the degree of dispersion includes a variance
  • the preset threshold is a preset variance threshold
  • the value of the degree of dispersion includes a standard deviation
  • the preset threshold is a preset standard deviation threshold
  • the preset variance threshold and the preset standard deviation threshold can be set by the electronic device before leaving the factory.
  • the electronic device may use the average value corresponding to the first light-sensing stable value and the second light-sensing stable value as the ambient light-sensing value, or may use a weighted summation of the first light-sensing stable value and the second light-sensing stable value based on different weights as the ambient light-sensing value, which is not specifically limited here. No matter which method is used to determine the ambient light sensitivity value, since the first stable light perception value and the second stable light perception value are both accurate, the ambient light sensitivity value obtained by the electronic device is also relatively accurate.
  • the electronic device determines the first stable light perception value based on the multiple first light perception values collected by the first light sensor; and determines the second stable light perception value based on the multiple second light perception values collected by the second light sensor, if the electronic device selects one of the first stable light perception value and the second stable light perception value as the ambient light perception value, then the determined first stable light perception value or the second stable light perception value may not be accurate enough.
  • the electronic device can first calculate the degree of dispersion corresponding to the first stable light perception value and the second stable light perception value; if the dispersion value is less than a preset threshold value, it means that the degree of deviation between the first stable light perception value and the second stable light perception value and the average value corresponding to the two stable light perception values is relatively small.
  • Fig. 3 is another schematic flow chart of the method for obtaining the ambient light sensitivity value provided by one or more embodiments of the present disclosure. As shown in Fig. 3, the method for obtaining the ambient light sensitivity value includes the following steps:
  • the denoising of the plurality of first photosensitive values by the electronic device may include: the electronic device reads the first photosensitive values collected by the first photosensor one by one from the first acquisition buffer; the electronic device judges whether the read first photosensitive values are noise photosensitive values, and if the read first photosensitive values are not noise photosensitive values, write the read first photosensitive values into the first photosensitive buffer queue.
  • the electronic device after the electronic device collects a plurality of first light-sensing values through the first light-sensing sensor, it can write the collected first light-sensing values into the first acquisition buffer, that is, the first acquisition buffer stores a plurality of first light-sensing values, and there may be noise light-sensing values in these first light-sensing values, and the noise light-sensing values will affect the accuracy of the first stable light-sensing value.
  • the electronic device may read the first photosensitive values in the first acquisition buffer one by one, and determine whether the first photosensitive value read each time is a noise photosensitive value; if the currently read first photosensitive value is a noisy photosensitive value, the electronic device may discard the read first photosensitive value, and does not need to write the read first photosensitive value into the first photosensitive buffer queue. If the read first photosensitive value is not a noise photosensitive value, the electronic device needs to write the read first photosensitive value into the first photosensitive buffer queue. In this way, it can be ensured that there are no noisy light-sensing values among the plurality of first light-sensing values written in the first light-sensing buffer queue, so that the obtained first stable light-sensing value is more accurate.
  • the electronic device judging whether the read first light-sensing value is a noise light-sensing value may include: the electronic device obtains the first head-of-line value, and the first head-of-line value is the first first light-sensing value written in the first light-sensing buffer queue; when the first head-of-line value and the read first light-sensing value are both smaller than the last determined first light-sensing stable value, or when the first line head value and the read first light-sensing value are both greater than the last determined first light-sensing stable value, the electronic device determines that the read first light-sensing value is not a noise light Sensitive value.
  • the electronic device when the electronic device is writing the first light-sensing value in the first light-sensing buffer queue, if the electronic device determines that there is no first light-sensing value in the first light-sensing buffer queue, that is, if the electronic device determines that the number of first light-sensing values written in the first light-sensing buffer queue is 0, then the electronic device may directly write the first read first light-sensing value into the first light-sensing buffer queue, and use the first first light-sensing value written in the first light-sensing buffer queue as the first head value in the first light-sensing buffer queue , the first head-of-line value can be used to determine whether the first light-sensing value read subsequently is a noise light-sensing value.
  • the electronic device needs to judge whether the first head-of-line value and the subsequently read first light-sensing value are on the same side as the first stable light-sensing value determined last time. If it is located on the same side, then the electronic device may determine that the read first photosensitive value is not a noise photosensitive value. Specifically, if it is determined that the first head of line value and the read first photosensitive value are both smaller than the last determined first photosensitive stable value, or if it is determined that the first line head value and the read first photosensitive value are both greater than the last determined first photosensitive stable value, then the electronic device may determine that the read first photosensitive value is not a noise photosensitive value.
  • the electronic device may determine that the read first photosensitive value is a noise photosensitive value, specifically, if it is determined that the first line head value is smaller than the last determined first photosensitive stable value and the read first photosensitive value is greater than or equal to the last determined first photosensitive stable value, or if it is determined that the first line head value is greater than the last determined photosensitive stable value and the read first photosensitive value is less than or equal to the last determined first photosensitive stable value, then the electronic device determines that the read first photosensitive value is Noise light sensitivity value.
  • the electronic device acquires a first head of line value of 148cd/m 2 and reads a first light sensitivity value of 127cd/m 2 , then the first head of line value of 148cd/m 2 and the read first light sensitivity value of 127cd/m 2 are both smaller than the last stable first light sensitivity value of 150cd/m 2 . At this time, the electronic device can determine that the read first light sensitivity value is not a noise light sensitivity value.
  • the electronic device acquires a first head of line value of 163cd/m 2 and reads a first photosensitive value of 131cd/m 2 , then the first head of line value of 163d/m 2 is greater than the last stable first photosensitive value of 150cd/m 2 , and the read first light sensitive value of 131cd/m 2 is smaller than the last first stable photosensitive value of 150cd/m 2 .
  • the light sensitivity value is the noise light sensitivity value.
  • the electronic device takes the first average value corresponding to the denoised first photosensitive values as the first photosensitive stable value, which may include: if the number of first photosensitive values written in the first photosensitive buffer queue reaches the first preset number threshold, the electronic device uses the first average value corresponding to the first photosensitive values in the first photosensitive buffer queue whose number reaches the first preset number threshold as the first photosensitive stable value.
  • the first preset quantity threshold may be set before the electronic device leaves the factory, or may be customized by the user according to actual needs, which is not specifically limited here.
  • the first preset number threshold may be an integer greater than or equal to 8.
  • the electronic device may be triggered to calculate a first average value corresponding to the first photosensitive values written in the first photosensitive buffer queue, and use the first average value as the first photosensitive stable value, and then, the electronic device automatically clears the first photosensitive values written in the first photosensitive buffer queue. If the number of the first light-sensing values written in the first light-sensing buffer queue does not reach the first preset number threshold, the first light-sensing values in the first acquisition buffer will be continuously read until the number of first light-sensing values written in the first light-sensing buffer queue reaches the first preset number threshold.
  • the first preset number threshold is 8.
  • the electronic device collects 8 first light sensitivity values through the first light sensor, they are 120cd/m 2 , 123cd/m 2 , 130cd/m 2 , 146cd/m 2 , 127cd/m 2 , 137cd/m 2 , 142cd/m 2 and 126cd/m 2 .
  • the number of first photosensitive values obtained by the electronic device has reached the first preset threshold value.
  • the denoising of the plurality of second photosensitive values by the electronic device may include: the electronic device reads the second photosensitive values collected by the second photosensor one by one from the second photosensitive buffer queue; the electronic device judges whether the read second photosensitive values are noise photosensitive values, and if the read second photosensitive values are not noise photosensitive values, write the read second photosensitive values into the second photosensitive buffer queue.
  • the collected second light-sensing values can be written into the second acquisition buffer, that is, the second acquisition buffer stores multiple second light-sensing values, and noise light-sensing values may exist in these second light-sensing values, and the noise light-sensing values will affect the accuracy of the second stable light-sensing value. Therefore, the electronic device needs to first process these noisy light-sensing values to determine a more accurate second light-sensing stable value.
  • the electronic device may read the second light-sensing values in the second acquisition buffer one by one, and determine whether the second light-sensing values read each time are noise light-sensing values. If the read second photosensitive value is a noise photosensitive value, the electronic device may discard the read second photosensitive value without writing the read second photosensitive value into the second photosensitive buffer queue; if the read second photosensitive value is not a noise photosensitive value, then the electronic device needs to write the read second photosensitive value into the second photosensitive buffer queue.
  • the electronic device judging whether the read second light-sensing value is a noise light-sensing value may include: the electronic device acquires a second head of line value, and the second head-of-line value is the first second light-sensing value written in the second light-sensing buffer queue; when the second head-of-line value and the read second light-sensing value are both smaller than the second stable light-sensing value determined last time, or when the second head-of-line value and the read second light-sensing value are both greater than the second stable light-sensing value determined last time, the electronic device determines that the read second light-sensing value is not a noise light Sensitive value.
  • the electronic device may directly write the first read second light-sensing value into the second light-sensing buffer queue, and use the first second light-sensing value written in the second light-sensing buffer queue as the second head value in the second light-sensing buffer queue , the second head-of-line value can be used to determine whether the second light-sensing value read subsequently is a noise light-sensing value.
  • the electronic device needs to judge whether the second head-of-line value and the subsequently read second light-sensing value are on the same side of the last second stable light-sensing value. If it is located on the same side, then the electronic device may determine that the read second photosensitive value is not a noise photosensitive value. Specifically, if it is determined that the second head of line value and the read second photosensitive value are both smaller than the last determined second photosensitive stable value, or if it is determined that the second line head value and the read second photosensitive value are both greater than the last determined second photosensitive stable value, then the electronic device may determine that the read second photosensitive value is not a noise photosensitive value.
  • the electronic device may determine that the read second photosensitive value is a noise photosensitive value, specifically, if it is determined that the second head of line value is smaller than the last determined second photosensitive stable value and the read second photosensitive value is greater than or equal to the last determined second photosensitive stable value, or if it is determined that the second line head value is greater than the last determined second photosensitive stable value and the read second photosensitive value is less than or equal to the last determined second photosensitive stable value, then the electronic device determines that the read second photosensitive value is Noise light sensitivity value.
  • the electronic device uses the second mean value corresponding to the denoised second photosensitive values as the second stable photosensitive value, which may include: if the number of second photosensitive values written in the second photosensitive buffer queue reaches the second preset number threshold, the electronic device takes the second average value corresponding to the second photosensitive values in the second photosensitive buffer queue whose number reaches the second preset number threshold as the second stable photosensitive value.
  • the second preset quantity threshold may be set before the electronic device leaves the factory, or may be customized by the user according to actual needs, which is not specifically limited here.
  • the second preset number threshold may be an integer greater than or equal to 8.
  • the electronic device may be triggered to calculate a second average value corresponding to the second photosensitive values written in the second photosensitive buffer queue, and use the second average value as the second photosensitive stable value, and then, the electronic device automatically clears the second photosensitive value written in the second photosensitive buffer queue. If the quantity of the second light-sensing values written in the second light-sensing buffer queue does not reach the second preset number threshold, the second light-sensing values in the second acquisition buffer will be continuously read until the second light-sensing values written in the second light-sensing buffer queue reach the second preset number threshold.
  • the electronic device may first perform steps 301 and 302 and then perform steps 303 and 304, may first perform steps 303 and 304 and then perform steps 301 and 302, or may perform steps 301 and 302 and steps 303 and 304 at the same time, which is not specifically limited here.
  • obtaining the average value corresponding to the first stable light perception value and the second stable light perception value by the electronic device may include: the electronic device determining the average value corresponding to the first stable light perception value and the second stable light perception value according to the first formula.
  • the electronic device calculating the first difference between the first stable light perception value and the average value may include: the electronic device determining the first difference between the first stable light perception value and the average value according to the second formula.
  • the electronic device calculating the second difference between the second stable light perception value and the average value may include: the electronic device determining the second difference between the second stable light perception value and the average value according to a third formula.
  • the second stable light perception value b 312cd/m 2
  • the average value X corresponding to the first stable light perception value a and the second stable light perception value b 253cd/m 2
  • the electronic device sums the square of the first difference value and the square of the second difference value to obtain a summation result, which may include: the electronic device determining the summation result according to a fourth formula.
  • S represents the variance
  • SqrS represents the standard deviation, wherein the Sqr represents the square root.
  • the electronic device fuses the first stable light perception value with the second stable light perception value to obtain the ambient light perception value, which may include but not limited to one of the following implementations:
  • the discrete degree value includes a variance, and if the variance corresponding to the first stable light perception value and the second stable light perception value is smaller than a preset variance threshold, the electronic device fuses the first stable light perception value and the second stable light perception value to obtain an ambient light perception value.
  • the preset variance threshold S' can be any value between 10000 and 22500.
  • the preset variance threshold S' 10000.
  • the electronic device can fuse the first light-sensing stable value and the second light-sensing stable value to obtain the ambient light-sensing value.
  • Implementation mode 2 the discrete degree value includes a standard deviation, and if the standard deviation corresponding to the first stable light perception value and the second stable light perception value is less than a preset standard deviation threshold, the electronic device fuses the first stable light perception value and the second stable light perception value to obtain an ambient light perception value.
  • any value between 100 and 150 can be selected as the preset standard deviation threshold SqrS'.
  • the electronic device can fuse the first light-sensing stable value and the second light-sensing stable value to obtain the ambient light-sensing value.
  • the electronic device fusing the first light-sensing stable value and the second light-sensing stable value to obtain the ambient light-sensing value may include: the electronic device multiplying the first light-sensing stable value by a first weight to obtain a first value; the electronic device multiplying the second light-sensing stable value by a second weight to obtain a second value; the electronic device adding the first value to the second value to obtain an ambient light-sensing value.
  • the sum of the second weight and the first weight is 1.
  • the first stable light perception value determined by the electronic device based on the first light perception value after denoising is relatively accurate; and the second stable light perception value determined based on the second light perception value after denoising is also relatively accurate.
  • the electronic device can calculate the degree of dispersion corresponding to the first stable light perception value and the second stable light perception value, and the dispersion degree value is also relatively accurate; , the electronic device can fuse the first light-sensing stable value with the second light-sensing stable value to obtain an ambient light-sensing value with high accuracy.
  • steps in the flow charts in FIGS. 2-3 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2-3 may include a plurality of sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily performed sequentially, but may be performed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • the embodiment of the present disclosure also provides a device for obtaining ambient light sensitivity values.
  • the device embodiment corresponds to the foregoing method embodiment.
  • this device embodiment does not repeat the details of the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the content in the foregoing method embodiment.
  • FIG. 4 is a schematic structural diagram of an acquisition device for ambient light sensitivity values in one or more embodiments of the present disclosure. As shown in FIG. 4 , the acquisition device for ambient light sensitivity values provided in this embodiment may include:
  • the stable value determination module 401 is configured to configure the stable value determination module 401 as a module for determining a first stable light perception value based on a plurality of first light perception values collected by the first light sensor; and a module configured to determine a second stable light perception value based on a plurality of second light perception values collected by the second light sensor;
  • the fusion module 402 is configured to configure the fusion module 402 as a module that calculates the discrete degree value corresponding to the first stable light perception value and the second stable light perception value, and if the discrete degree value is less than a preset threshold value, configure the first stable light perception value and the second stable light perception value to fuse to obtain the ambient light perception value.
  • the degree of dispersion value includes a variance
  • the fusion module 402 further configures the fusion module 402 so that if the variance corresponding to the first stable light perception value and the second stable light perception value is less than a preset variance threshold, then the first stable light perception value is fused with the second stable light perception value to obtain a module of the ambient light perception value; or, the discrete degree value includes a standard deviation, and the fusion module 402 further configures the fusion module 402. value, then fuse the first stable light perception value with the second stable light perception value to obtain a module of the ambient light perception value.
  • the fusion module 402 also configures the fusion module 402 as a module for obtaining the average value corresponding to the first stable light perception value and the second stable light perception value; and a module configured to calculate a first difference between the first stable light perception value and the average value; and a module configured to calculate a second difference between the second stable light perception value and the average value; value module.
  • the fusion module 402 also configures the fusion module 402 to multiply the first light perception stable value by the first weight to obtain a first numerical value; and is configured to multiply the second light perception stable value by a second weight to obtain a second numerical value, and the sum of the second weight and the first weight is 1; and is configured to add the first numerical value to the second numerical value to obtain an ambient light perception value.
  • the fusion module 402 also includes a first collection unit 4011 configured as a module for collecting a plurality of first light-sensing values through the first light-sensing sensor;
  • the fusion module 402 also includes a first denoising unit 4012 configured as a module for denoising the plurality of first light sensing values;
  • the fusion module 402 also includes a first determination unit 4013 configured as a module that if the number of the denoised first light perception value reaches a first preset number threshold, the first mean value corresponding to the denoised first light perception value is used as the first light perception stable value;
  • the fusion module 402 also includes a second collection unit 4014 configured as a module for collecting a plurality of second light-sensing values through the second light-sensing sensor;
  • the fusion module 402 also includes a second denoising unit 4015 configured as a module for denoising the plurality of second light perception values;
  • the fusion module 402 also includes a second determination unit 4016 configured to use a second average value corresponding to the denoised second light perception value as a second light perception stable value if the number of the denoised second light perception values reaches a second preset number threshold; wherein, the first light sensor is a front light sensor arranged on the front of the screen of the electronic device, and the second light sensor is a rear light sensor arranged on the back of the screen of the electronic device.
  • the first denoising unit 4012 is further configured as a module for reading the first light-sensing values collected by the first light sensor one by one from the first collection buffer; the first collection buffer is used to store a plurality of first light-sensing values collected by the first light sensor; and is further configured to determine whether the read first light-sensing values are noise light-sensing values, and if the read first light-sensing values are not noise light-sensing values, write the read first light-sensing values into the first light-sensing buffer queue module;
  • the first determination unit 4013 is also configured as a module that if the number of first light perception values written in the first light perception buffer queue reaches a first preset number threshold, the first mean value corresponding to the first light perception values in the first light perception buffer queue whose number reaches the first preset number threshold is used as a first light perception stable value.
  • the first acquisition unit 4011 is further configured to acquire a first queue head value, where the first queue head value is the module of the first first light-sensing value written in the first light-sensing buffer queue;
  • the first determination unit 4013 is also configured as a module for determining that the read first light sensitivity value is not a noise light sensitivity value when both the first head of line value and the read first light sensitivity value are smaller than the last determined first light sensitivity stable value, or when the first line head value and the read first light sensitivity value are both greater than the last determined first light sensitivity stable value.
  • the device for acquiring the ambient light sensitivity value provided in this embodiment can execute the method for acquiring the ambient light sensitivity value provided in the above method embodiment, and its implementation principle is similar to the technical effect, and will not be repeated here.
  • Each module in the above-mentioned device for acquiring the ambient light sensing value may be fully or partially realized by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of one or more processors in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that one or more processors can invoke and execute the corresponding operations of the above modules.
  • FIG. 5 is another structural schematic diagram of the electronic device in one or more embodiments of the present disclosure.
  • the electronic device may include: a memory 501 and one or more processors 502, and the memory 501 is configured as a module for storing computer-readable instructions; when the computer-readable instructions are executed by the one or more processors 502, the one or more processors 502 execute the steps of the method for obtaining ambient light perception values described in the above method embodiments.
  • One or more non-volatile storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors execute the steps of the method for obtaining ambient light sensitivity values described in any one of the above.
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present disclosure are produced in whole or in part.
  • a computer can be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media.
  • Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).
  • the disclosed system, device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc.
  • Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • the method for obtaining the ambient light sensitivity value provided by the present disclosure can determine the ambient light sensitivity value with high accuracy when the brightness of the current ambient light source of the electronic device changes frequently or the electronic device moves rapidly under the condition of multiple light sources, and has strong industrial applicability.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Position Input By Displaying (AREA)
  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)

Abstract

一种环境光感值的获取方法、电子设备(100)及计算机可读存储介质,可有效提高确定环境光感值的准确性。电子设备(100)至少包括第一光感传感器(101)和第二光感传感器(102),方法包括:根据通过第一光感传感器(101)采集的多个第一光感值,确定第一光感稳定值(201);根据通过第二光感传感器(102)采集的多个第二光感值,确定第二光感稳定值(202);计算第一光感稳定值与第二光感稳定值对应的离散程度值(203);若离散程度值小于预设阈值,则将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值(204)。

Description

环境光感值的获取方法、电子设备及计算机可读存储介质
相关交叉引用
本公开要求于2022年1月24日提交中国专利局、申请号为2022100798590、发明名称为“环境光感值的获取方法、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及环境光感值的获取方法、电子设备及计算机可读存储介质。
背景技术
随着社会的发展,电子设备已经深入人们的日常生活中,一般情况下,电子设备都设置有显示亮度自动调节功能。在用户使用该电子设备的过程中,该电子设备会实时监测当前的环境光感值,并随着监测到的环境光感值调节该电子设备的屏幕显示亮度。
然而,如果该电子设备当前的环境光源亮度变动频繁或该电子设备在多光源的情况下快速移动,那么,就会使得该电子设备实时监测的环境光感值出现不够准确的问题。
发明内容
(一)要解决的技术问题
在现有技术中,当电子设备当前的环境光源亮度变动频繁或该电子设备在多光源的情况下快速移动时,会存在电子设备实时检测的环境光感值不够准确的问题。
(二)技术方案
根据本公开公开的各种实施例,提供一种环境光感值的获取方法、电子设备及计算机可读存储介质。
一种环境光感值的获取方法,应用于电子设备,所述电子设备至少包括第一光感传感器和第二光感传感器,所述方法包括:
根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值;
根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值;
计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值。
作为本公开实施例一种可选的实施方式,所述离散程度值包括方差,所述若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:若所述第一光感稳定值与所述第二光感稳定值对应的方差小于预设方差阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值;或,所述离散程度值包括标准差,所述若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:若所述第一光感稳定值与所述第二光感稳定值对应的标准差小于预设标准差阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值。
作为本公开实施例一种可选的实施方式,所述计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,包括:
获取所述第一光感稳定值与所述第二光感稳定值对应的平均值;
计算所述第一光感稳定值与所述平均值的第一差值;
计算所述第二光感稳定值与所述平均值的第二差值;
将所述第一差值的平方与所述第二差值的平方进行求和,并根据求和结果确定所述第一光感稳定值与所述第二光感稳定值对应的离散程度值。
所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
将所述第一光感稳定值与第一权重相乘,得到第一数值;
将所述第二光感稳定值与第二权重相乘,得到第二数值,所述第二权重与所述第一权重之和为1;
将所述第一数值与所述第二数值相加,得到环境光感值。
作为本公开实施例一种可选的实施方式,所述根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值,包括:
通过所述第一光感传感器采集多个第一光感值;
对所述多个第一光感值进行去噪,若去噪后的第一光感值的数量达到第一预设数量阈值,则将所述去噪后的第一光感值对应的第一均值作为第一光感稳定值;
所述根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值,包括:
通过所述第二光感传感器采集多个第二光感值;
对所述多个第二光感值进行去噪,若去噪后的第二光感值的数量达到第二预设数量阈值,则将所述去噪后的第二光感值对应的第二均值作为第二光感稳定值;
其中,所述第一光感传感器为设置在所述电子设备的屏幕的正面的前置光感传感器,所述第二光感传感器为设置在所述电子设备的屏幕的背面的后置光感传感器。
作为本公开实施例一种可选的实施方式,所述对所述多个第一光感值进行去噪,包括:
从第一采集缓冲区中逐一读取所述第一光传感器采集的第一光感值;所述第一采集缓冲区用于存储所述第一光传感器采集的多个第一光感值;
判断读取的第一光感值是否为噪点光感值,若所述读取的第一光感值不为噪点光感值,则将所述读取的第一光感值写入第一光感缓冲队列;
所述若去噪后的第一光感值的数量达到第一预设数量阈值,则将所述去噪后的第一光感值对应的第一均值作为第一光感稳定值,包括:
若写入到所述第一光感缓冲队列中的第一光感值的数量达到第一预设数量阈值,则将所述第一光感缓冲队列中数量达到所述第一预设数量阈值的第一光感值对应的第一均值作为第一光感稳定值。
作为本公开实施例一种可选的实施方式,所述判断读取的第一光感值是否为噪点光感值,包括:
获取第一队头值,所述第一队头值为第一光感缓冲队列中写入的首个第一光感值;
当所述第一队头值和读取的第一光感值均小于上一次确定的第一光感稳定值,或,所述第一队头值和所述读取的第一光感值均大于所述上一次确定的第一光感稳定值时,确定所述读取的第一光感值不为噪点光感值。
作为本公开实施例一种可选的实施方式,所述获取第一队头值,包括:
确定出所述第一光感缓冲队列中不存在第一光感值;
将首个读取的第一光感值写入所述第一光感缓冲队列,且将在所述第一光感缓冲队列中写入的所述首个读取的第一光感值作为所述第一光感缓冲队列中的第一队头值。
作为本公开实施例一种可选的实施方式,所述对所述多个第二光感值进行去噪,包括:
从第二采集缓冲区中逐一读取所述第二光传感器采集的第二光感值;所述第二采集缓冲区用于存储所述第二光传感器采集的多个第二光感值;
判断读取的第二光感值是否为噪点光感值,若所述读取的第二光感值不为噪点光感值,则将所述读取的第二光感值写入第二光感缓冲队列;
所述若去噪后的第二光感值的数量达到第二预设数量阈值,则将所述去噪后的第二光感值对应的第二均值作为第二光感稳定值,包括:
若写入到所述第二光感缓冲队列中的第二光感值的数量达到第二预设数量阈值,则将所述第二光感缓冲队列中数量达到所述第二预设数量阈值的第二光感值对应的第二均值作为第二光感稳定值。
作为本公开实施例一种可选的实施方式,其中,所述判断读取的第二光感值是否为噪点光感值,包括:
获取第二队头值,所述第二队头值为第二光感缓冲队列中写入的首个第二光感值;
当所述第二队头值和读取的第二光感值均小于上一次确定的第二光感稳定值,或,所述第二队头值 和所述读取的第二光感值均大于所述上一次确定的第二光感稳定值时,确定所述读取的第二光感值不为噪点光感值。
作为本公开实施例一种可选的实施方式,其中,所述根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值,包括:
计算所述第一光感传感器采集的多个第一光感值的均值,根据所述多个第一光感值的均值确定第一光感稳定值;
所述根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值,包括:
计算所述第二光感传感器采集的多个第二光感值的均值,根据所述多个第二光感值的均值确定第二光感稳定值。
作为本公开实施例一种可选的实施方式,其中,所述方法还包括:
计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,若所述离散程度值大于或等于所述预设阈值,则舍弃所述第一光感稳定值及所述第二光感稳定值,重新根据所述第一光感传感器采集的第一光感值获取重新确定的第一光感稳定值及根据所述第二光传感器采集的第二光感值获取重新确定的第二光感稳定值,并继续判断所述重新确定的第一光感稳定值和所述重新确定的第二光感稳定值对应的重新确定的离散程度值是否小于所述预设阈值,直到所述重新确定的离散程度值小于所述预设阈值。
作为本公开实施例一种可选的实施方式,其中,所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
将所述第一光感稳定值与所述第二光感稳定值对应的平均值确定为环境光感值。
作为本公开实施例一种可选的实施方式,其中,所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
将所述第一光感稳定值与所述第二光感稳定值基于不同的权重进行加权求和得到的值确定为环境光感值。
一种环境光感值的获取装置,至少包括第一光感传感器和第二光感传感器,还包括:
稳定值确定模块,将所述稳定值确定模块配置成根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值的模块;以及,配置成根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值的模块;
融合模块,将所述融合模块配置成计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值的模块,若所述离散程度值小于预设阈值,则配置成将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,所述离散程度值包括方差,所述融合模块还将所述融合模块配置成若所述第一光感稳定值与所述第二光感稳定值对应的方差小于预设方差阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值的模块;或,所述离散程度值包括标准差,所述融合模块还将所述融合模块配置成若所述第一光感稳定值与该第二光感稳定值对应的标准差小于预设标准差阈值,则将该第一光感稳定值与该第二光感稳定值进行融合,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,所述融合模块,还将所述融合模块配置成获取所述第一光感稳定值与所述第二光感稳定值对应的平均值的模块;以及,配置成计算所述第一光感稳定值与所述平均值的第一差值的模块;以及,配置成计算所述第二光感稳定值与所述平均值的第二差值的模块;以及,配置成将所述第一差值的平方与所述第二差值的平方进行求和,并根据求和结果确定所述第一光感稳定值与所述第二光感稳定值对应的离散程度值的模块。
作为本公开实施例一种可选的实施方式,所述融合模块,还将所述融合模块配置成将所述第一光感稳定值与第一权重相乘,得到第一数值的模块;以及,配置成将所述第二光感稳定值与第二权重相乘,得到第二数值的模块,所述第二权重与所述第一权重之和为1;以及,配置成将所述第一数值与所述第二数值相加,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,所述稳定值确定模块,还包括第一采集单元,将所述第一采集单元配置成通过所述第一光感传感器采集多个第一光感值的模块;
所述稳定值确定模块,还包括第一去噪单元,将所述第一去噪单元配置成对所述多个第一光感值进行去噪的模块;
所述稳定值确定模块,还包括第一确定单元,将所述第一确定单元配置成若去噪后的第一光感值的数量达到第一预设数量阈值,则将所述去噪后的第一光感值对应的第一均值作为第一光感稳定值的模块;
所述稳定值确定模块,还包括第二采集单元,将所述第二采集单元配置成通过所述第二光感传感器采集多个第二光感值的模块;
所述稳定值确定模块,还包括第二去噪单元,将所述第二去噪单元配置成对所述多个第二光感值进行去噪的模块;
所述稳定值确定模块,还包括第二确定单元,将所述第二确定单元配置成若去噪后的第二光感值的数量达到第二预设数量阈值,则将所述去噪后的第二光感值对应的第二均值作为第二光感稳定值的模块;其中,所述第一光感传感器为设置在所述电子设备的屏幕的正面的前置光感传感器,所述第二光感 传感器为设置在所述电子设备的屏幕的背面的后置光感传感器。
所述第一去噪单元,还将所述第一去噪单元配置成从第一采集缓冲区中逐一读取所述第一光传感器采集的第一光感值的模块;所述第一采集缓冲区用于存储所述第一光传感器采集的多个第一光感值;以及,还将所述第一去噪单元配置成判断读取的第一光感值是否为噪点光感值的模块,若所述读取的第一光感值不为噪点光感值,则配置成将所述读取的第一光感值写入第一光感缓冲队列的模块;
所述第一确定单元,还将所述第一确定单元配置成若写入到所述第一光感缓冲队列中的第一光感值的数量达到第一预设数量阈值,则将所述第一光感缓冲队列中数量达到所述第一预设数量阈值的第一光感值对应的第一均值作为第一光感稳定值的模块。
所述第一采集单元,还将所述第一采集单元配置成获取第一队头值的模块,所述第一队头值为第一光感缓冲队列中写入的首个第一光感值;
所述第一确定单元,还将所述第一确定单元配置成当所述第一队头值和读取的第一光感值均小于上一次确定的第一光感稳定值的模块,或,所述第一队头值和所述读取的第一光感值均大于所述上一次确定的第一光感稳定值时,配置成确定所述读取的第一光感值不为噪点光感值的模块。
一种电子设备,至少包括第一光感传感器和第二光感传感器,还包括存储有计算机可读指令的存储器以及所述存储器耦合的一个或多个处理器;将所述一个或多个处理器配置成调用所述存储器中存储的所述计算机可读指令的模块;所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行上述任一项所述的环境光感值的获取方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行上述任一项所述的环境光感值的获取方法的步骤。
一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述任一项所述的环境光感值的获取方法的步骤。
一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述任一项所述的环境光感值的获取方法的步骤。
本公开的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本公开而了解。本公开的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得,本公开的一个或多个实施例的细节在下面的附图和描述中提出。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举可选实施例,并配合所附附图,作详 细说明如下。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用来解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1a为本公开一个或多个实施例中电子设备的一个结构示意图;
图1b为本公开一个或多个实施例中电子设备的另一个结构示意图;
图2为本公开一个或多个实施例提供的环境光感值的获取方法的一个流程示意图;
图3为本公开一个或多个实施例提供的环境光感值的获取方法的另一个流程示意图;
图4为本公开一个或多个实施例中环境光感值的获取装置的一个结构示意图;
图5为本公开一个或多个实施例中电子设备的另一个结构示意图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
本公开的说明书和权利要求书中的术语“第一”和“第二”等是用来区别不同的对象,而不是用来描述对象的特定顺序。例如,第一摄像头和第二摄像头是为了区别不同的摄像头,而不是为了描述摄像头的特定顺序。
在本公开实施例中,“示例性的”或者“例如”等词来表示作例子、例证或说明。本公开实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,此外,在本公开实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。
本公开实施例中所涉及的电子设备至少可以包括但不限于两个光感传感器,分别为第一光感传感器和第二光感传感器。
其中,光感传感器可以用于采集光感值,该光感值指的是光的强度值。该光感值的单位为坎德拉/平方米(简称:cd/m 2)。
可选的,该第一光感传感器可以为设置在该电子设备的屏幕的正面的前置光感传感器,该第二光感传感器可以为设置在该电子设备的屏幕的背面的后置光感传感器。
其中,该第一光感传感器可以采集多个第一光感值,即该第一光感传感器在电子设备屏幕正面可以采集多个第一光感值,该电子设备再将这多个第一光感值存储在第一采集缓冲区;该第二光感传感器可以采集多个第二光感值,即该第二光感传感器在电子设备屏幕背面可以采集多个第二光感值,该电子设备再将这多个第二光感值存储在第二采集缓冲区。
可选的,该第一采集缓冲区和该第二采集缓冲区可为一个环形队列。
示例性的,如图1a所示,为本公开一个或多个实施例中电子设备的一个结构示意图。在图1a中,电子设备100包括第一光感传感器101,第一光感传感器101设置在电子设备100的屏幕的正面。
如图1b所示,为本公开一个或多个实施例中电子设备的另一个结构示意图。在图1b中,电子设备100包括第二光感传感器102,第二光感传感器102设置在电子设备100的屏幕的背面。
参照图2所示,图2为本公开一个或多个实施例提供的环境光感值的获取方法的一个流程示意图,其中,图2所描述的环境光感值的获取方法可以应用于电子设备。如图2所示,该环境光感值的获取方法可以包括以下步骤:
201、根据通过第一光感传感器采集的多个第一光感值,确定第一光感稳定值。
在一些实施例中,电子设备在通过第一光感传感器采集多个第一光感值之后,可以将这多个第一光感值对应的均值作为第一光感稳定值。
示例性的,当电子设备通过第一光感传感器采集了5个第一光感值,分别为120cd/m 2、123cd/m 2、130cd/m 2、146cd/m 2及127cd/m 2。该电子设备对这5个第一光感值求平均值,即(120+123+130+146+127)/5=129.2cd/m 2,然后,该电子设备将该平均值129.2cd/m 2作为这5个第一光感值对应的第一光感稳定值。
在一些实施例中,由于第一光感传感器采集的多个第一光感值中可能会存在噪点光感值,噪点光感值可理解为是在非正常条件下所采集到的光感值,例如电子设备当前的环境光源亮度变动频繁或该电子设备在多光源的情况下采集的光感值,该噪点光感值会影响第一光感稳定值的准确性,所以,该电子设备可以先对获取的这多个第一光感值进行去噪处理,得到去除噪点光感值的第一光感值,该电子设备再根据去噪后的第一光感值,确定较为准确的第一光感稳定值。
202、根据通过第二光感传感器采集的多个第二光感值,确定第二光感稳定值。
在一些实施例中,电子设备在通过第二光感传感器采集多个第二光感值之后,可以将这多个第二光感值对应的均值作为第二光感稳定值。
在一些实施例中,由于第二光感传感器采集的多个第二光感值中可能会存在噪点光感值,该噪点光感值会影响第二光感稳定值的准确性,所以,该电子设备可以先对获取的这多个第二光感值进行去噪处 理,得到去除噪点光感值的第二光感值,该电子设备再根据去噪后的第二光感值,确定较为准确的第二光感稳定值。
需要说明的是,电子设备可以先执行步骤201再执行步骤202,可以先执行步骤202再执行步骤201,也可以同时执行步骤201和步骤202,此处不做具体限定。
203、计算第一光感稳定值与第二光感稳定值对应的离散程度值。
可以理解的是,该离散程度值可以表示该第一光感稳定值和该第二光感稳定值,即这两个光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度。若该离散程度值较小,则说明这两个光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度较小;若该离散程度值较大,则说明这两个光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度较大。
可选的,该离散程度值可以包括但不限于方差或标准差。
其中,标准差为方差的算术平方根。
204、若离散程度值小于预设阈值,则将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
在一些实施例中,当该离散程度值小于预设阈值时,说明该第一光感稳定值和该第二光感稳定值,这两个光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度较小,此时,电子设备将该第一光感稳定值与该第二光感稳定值进行融合得到的环境光感值是更为准确的。此外,当该离散程度值大于或等于该预设阈值时,说明这两个光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度较大,说明第一光感传感器或第二光感传感器中存在至少一个光感传感器采集的光感值出现不准确的情况,电子设备即使将该第一光感稳定值与该第二光感稳定值进行融合,得到的环境光感值也是不够准确的。
可选的,若第一光感稳定值与第二光感稳定值对应的离散程度值大于或等于该预设阈值,可直接舍弃本次确定的第一光感稳定值及第二光感稳定值,重新根据第一光传感器采集的第一光感值确定第一光感稳定值及根据第二光传感器采集的第二光感值确定第二光感稳定值,并继续判断重新确定的第一光感稳定值与重新获取的第二光感稳定值对应的离散程度值是否小于预设阈值,直到重新确定的离散程度值小于该预设阈值。
在一些实施例中,由于用户使用电子设备的习惯不同,例如:坐着使用电子设备,躺着使用电子设备等。在用户使用电子设备的过程中,若用户将电子设备的屏幕正面从背对环境光源移动到面对该环境光源,则说明该第一光感传感器采集的多个第一光感值对应的第一光感稳定值相较于该第二光感稳定值更贴近环境光感值,此时,若该第一光感稳定值与该第二光感稳定值对应的离散程度值大于或等于该预设阈值,则可以将该第一光感稳定值作为环境光感值,但该第一光感稳定值相较于实际的环境光感值也还不够准确。若用户将电子设备的屏幕正面从面对环境光源移动到背对该环境光源,则说明该第二光感 稳定值相较于该第一光感稳定值更贴近环境光感值,此时,若第一光感稳定值与第二光感稳定值对应的离散程度值大于或等于该预设阈值,则可以将该第二光感稳定值作为环境光感值,但该第二光感稳定值相较于实际的环境光感值也还不够准确。
其中,该预设阈值可以是电子设备出厂前设置的。
可选的,该离散程度值包括方差,该预设阈值为预设方差阈值;该离散程度值包括标准差,该预设阈值为预设标准差阈值。
其中,该预设方差阈值和该预设标准差阈值可由电子设备在出厂前设置。
在一些实施例中,电子设备可以将第一光感稳定值和第二光感稳定值对应的平均值作为环境光感值,也可以将该第一光感稳定值和该第二光感稳定值基于不同的权重进行加权求和得到的值作为该环境光感值,此处不做具体限定。无论是哪种方式确定环境光感值,由于该第一光感稳定值和该第二光感稳定值都是准确的,所以,该电子设备得到的环境光感值也是较为准确的。
在本公开实施例中,电子设备在根据通过该第一光感传感器采集的多个第一光感值,确定第一光感稳定值;并根据通过该第二光感传感器采集的多个第二光感值,确定第二光感稳定值之后,如果该电子设备选择该第一光感稳定值和该第二光感稳定值的其中一个光感稳定值作为环境光感值,那么,可能由于确定的第一光感稳定值或第二光感稳定值不够准确,这就导致该电子设备最后确定的环境光感值也不够准确,所以,该电子设备可以先计算该第一光感稳定值与该第二光感稳定值对应的离散程度值;若该离散程度值小于预设阈值,则说明该第一光感稳定值与该第二光感稳定值与这两个光感稳定值对应的平均值之间的偏离程度较小,此时,该电子设备可以将该第一光感稳定值与该第二光感稳定值进行融合,以确定准确性较高的环境光感值。
图3为本公开一个或多个实施例提供的环境光感值的获取方法的另一个流程示意图,如图3所示,该环境光感值的获取方法包括以下步骤:
301、通过第一光感传感器采集多个第一光感值。
302、对多个第一光感值进行去噪,若去噪后的第一光感值的数量达到第一预设数量阈值,则将去噪后的第一光感值对应的第一均值作为第一光感稳定值。
可选的,电子设备对该多个第一光感值进行去噪,可以包括:电子设备从第一采集缓冲区中逐一读取该第一光传感器采集的第一光感值;该电子设备判断读取的第一光感值是否为噪点光感值,若该读取的第一光感值不为噪点光感值,则将该读取的第一光感值写入第一光感缓冲队列。
在一些实施例中,由于电子设备通过第一光感传感器采集多个第一光感值之后,可以将采集这多个第一光感值写入到第一采集缓冲区,即该第一采集缓冲区中存储了多个第一光感值,而这些第一光感值中可能存在噪点光感值,该噪点光感值会影响第一光感稳定值的准确性,所以,该电子设备需要先对这 些噪点光感值进行处理,以确定较为准确的第一光感稳定值。具体的,电子设备可以逐一读取该第一采集缓冲区中的第一光感值,并判断每次读取的第一光感值是否为噪点光感值;若当前读取的第一光感值是噪点光感值,则该电子设备可丢弃该读取的第一光感值,不需要将该读取的第一光感值写入第一光感缓冲队列中。若读取的第一光感值不是噪点光感值,则该电子设备需要将该读取的第一光感值写入第一光感缓冲队列中。这样就可以保证该第一光感缓冲队列中写入的多个第一光感值中不存在噪点光感值,从而使得获取的第一光感稳定值较为准确。
可选的,电子设备判断读取的第一光感值是否为噪点光感值,可以包括:电子设备获取第一队头值,该第一队头值为第一光感缓冲队列中写入的首个第一光感值;当该第一队头值和读取的第一光感值均小于上一次确定的第一光感稳定值,或,该第一队头值和该读取的第一光感值均大于该上一次确定的第一光感稳定值时,该电子设备确定该读取的第一光感值不为噪点光感值。
在一些实施例中,电子设备在第一光感缓冲队列中写入第一光感值的过程中,如果该电子设备确定该第一光感缓冲队列中不存在第一光感值,即如果该电子设备确定该第一光感缓冲队列中写入的第一光感值的数量为0,那么,该电子设备可以将首个读取的第一光感值直接写入该第一光感缓冲队列,且将在该第一光感缓冲队列中写入的首个第一光感值作为该第一光感缓冲队列中的第一队头值,该第一队头值可以用于判断后续读取的第一光感值是否为噪点光感值。
然后,该电子设备需要判断该第一队头值和后续读取的第一光感值是否位于上一次确定的第一光感稳定值的同侧。如果位于同侧,那么,该电子设备可以确定该读取的第一光感值不为噪点光感值,具体的,如果确定该第一队头值和该读取的第一光感值均小于该上一次确定的第一光感稳定值,或,确定该第一队头值和该读取的第一光感值均大于该上一次确定的第一光感稳定值,那么,该电子设备可以确定该读取的第一光感值不为噪点光感值。
如果不位于同侧,那么,该电子设备可以确定该读取的第一光感值为噪点光感值,具体的,如果确定该第一队头值小于该上一次确定的第一光感稳定值且该读取的第一光感值大于等于该上一次确定的第一光感稳定值,或,如果确定该第一队头值大于该上一次确定的第一光感稳定值且该读取的第一光感值小于等于该上一次确定的第一光感稳定值,那么,该电子设备确定该读取的第一光感值为噪点光感值。
示例性的,假设第一光感缓冲队列对应的上一次的第一光感稳定值为150cd/m 2。如果电子设备获取的第一队头值为148cd/m 2,读取的第一光感值为127cd/m 2,那么,该第一队头值为148cd/m 2和该读取的第一光感值为127cd/m 2均小于该上一次的第一光感稳定值为150cd/m 2,此时,该电子设备可以确定该读取的第一光感值不为噪点光感值。如果电子设备获取的第一队头值为163cd/m 2,读取的第一光感值为131cd/m 2,那么,该第一队头值为163d/m 2大于该上一次的第一光感稳定值为150cd/m 2,且该读取的第一光感值为131cd/m 2小于该上一次的第一光感稳定值为150cd/m 2,此时,该电子设备可以确定 该读取的第一光感值为噪点光感值。
可选的,该若去噪后的第一光感值的数量达到第一预设数量阈值,则电子设备将该去噪后的第一光感值对应的第一均值作为第一光感稳定值,可以包括:若写入到该第一光感缓冲队列中的第一光感值的数量达到第一预设数量阈值,则电子设备将该第一光感缓冲队列中数量达到该第一预设数量阈值的第一光感值对应的第一均值作为第一光感稳定值。
其中,该第一预设数量阈值可以是电子设备出厂前设置的,也可以是用户根据实际需求自定义的,此处不做具体限定。可选的,该第一预设数量阈值可以为大于等于8的整数。
在一些实施例中,如果该第一光感缓冲队列中写入的第一光感值的数量达到第一预设数量阈值,那么,可以触发该电子设备计算该第一光感缓冲队列中写入的第一光感值所对应的第一均值,并将该第一均值作为第一光感稳定值,然后,该电子设备再自动清除该第一光感缓冲队列中写入的第一光感值。如果该第一光感缓冲队列中写入的第一光感值的数量未达到该第一预设数量阈值,则会持续地读取该第一采集缓冲区中的第一光感值,直到在该第一光感缓冲队列中写入的第一光感值的数量达到该第一预设数量阈值。
示例性的,假设第一预设数量阈值为8。当电子设备通过第一光感传感器采集了8个第一光感值,分别为120cd/m 2、123cd/m 2、130cd/m 2、146cd/m 2、127cd/m 2、137cd/m 2、142cd/m 2及126cd/m 2。该电子设备获取的第一光感值的数量已经达到该第一预设数量阈值为,此时,该电子设备自动计算这8个第一光感值对应的第一均值,即(120+123+130+146+127+137+142+126)/8=131.375cd/m 2,然后,该电子设备将该平均值131.375cd/m 2作为这8个第一光感值对应的第一光感稳定值。
303、通过第二光感传感器采集多个第二光感。
304、对多个第二光感值进行去噪,若去噪后的第二光感值的数量达到第二预设数量阈值,则将去噪后的第二光感值对应的第二均值作为第二光感稳定值。
可选的,电子设备对该多个第二光感值进行去噪,可以包括:电子设备从第二光感缓冲区队列中逐一读取该第二光传感器采集的第二光感值;该电子设备判断读取的第二光感值是否为噪点光感值,若该读取的第二光感值不为噪点光感值,则将该读取的第二光感值写入第二光感缓冲队列。
在一些实施例中,由于电子设备通过第二光感传感器采集多个第二光感值之后,可以将采集这多个第二光感值写入到第二采集缓冲区,即该第二采集缓冲区中存储了多个第二光感值,而这些第二光感值中可能存在噪点光感值,该噪点光感值会影响第二光感稳定值的准确性,所以,该电子设备需要先对这些噪点光感值进行处理,以确定较为准确的第二光感稳定值。具体的,电子设备可以逐一读取该第二采集缓冲区中的第二光感值,并判断每次读取的第二光感值是否为噪点光感值。若读取的第二光感值是噪点光感值,则该电子设备可丢弃该读取的第二光感值,不需要将该读取的第二光感值写入第二光感缓冲 队列中;若读取的第二光感值不是噪点光感值,则该电子设备需要将该读取的第二光感值写入第二光感缓冲队列中。这样就可以保证该第二光感缓冲队列中写入的多个第二光感值中不存在噪点光感值,从而使得获取的第二光感稳定值较为准确。
可选的,电子设备判断读取的第二光感值是否为噪点光感值,可以包括:电子设备获取第二队头值,该第二队头值为第二光感缓冲队列中写入的首个第二光感值;当该第二队头值和读取的第二光感值均小于上一次确定的第二光感稳定值,或,该第二队头值和该读取的第二光感值均大于该上一次确定的第二光感稳定值时,该电子设备确定该读取的第二光感值不为噪点光感值。
在一些实施例中,电子设备在第二光感缓冲队列中写入第二光感值的过程中,如果该电子设备确定该第二光感缓冲队列中不存在第二光感值,即如果该电子设备确定该第二光感缓冲队列中写入的第二光感值的数量为0,那么,该电子设备可以将首个读取的第二光感值直接写入该第二光感缓冲队列,且将在该第二光感缓冲队列中写入的首个第二光感值作为该第二光感缓冲队列中的第二队头值,该第二队头值可以用于判断后续读取的第二光感值是否为噪点光感值。
然后,该电子设备需要判断该第二队头值和后续读取的第二光感值是否位于上一次的第二光感稳定值的同侧。如果位于同侧,那么,该电子设备可以确定该读取的第二光感值不为噪点光感值,具体的,如果确定该第二队头值和该读取的第二光感值均小于该上一次确定的第二光感稳定值,或,确定该第二队头值和该读取的第二光感值均大于该上一次确定的第二光感稳定值,那么,该电子设备可以确定该读取的第二光感值不为噪点光感值。
如果不位于同侧,那么,该电子设备可以确定该读取的第二光感值为噪点光感值,具体的,如果确定该第二队头值小于该上一次确定的第二光感稳定值且该读取的第二光感值大于等于该上一次确定的第二光感稳定值,或,如果确定该第二队头值大于该上一次确定的第二光感稳定值且该读取的第二光感值小于等于该上一次确定的第二光感稳定值,那么,该电子设备确定该读取的第二光感值为噪点光感值。
可选的,若去噪后的第二光感值的数量达到第二预设数量阈值,则电子设备将该去噪后的第二光感值对应的第二均值作为第二光感稳定值,可以包括:若写入到该第二光感缓冲队列中的第二光感值的数量达到第二预设数量阈值,则电子设备将该第二光感缓冲队列中数量达到该第二预设数量阈值的第二光感值对应的第二均值作为第二光感稳定值。
其中,该第二预设数量阈值可以是电子设备出厂前设置的,也可以是用户根据实际需求自定义的,此处不做具体限定。可选的,该第二预设数量阈值可以为大于等于8的整数。
在一些实施例中,如果该第二光感缓冲队列中写入的第二光感值的数量达到第二预设数量阈值,那么,可以触发该电子设备计算该第二光感缓冲队列中写入的第二光感值所对应的第二均值,并将该第二均值作为第二光感稳定值,然后,该电子设备再自动清除该第二光感缓冲队列中写入的第二光感值。如 果该第二光感缓冲队列中写入的第二光感值的数量未达到该第二预设数量阈值,则会持续地读取该第二采集缓冲区中的第二光感值,直到在该第二光感缓冲队列中写入的第二光感值的数量达到该第二预设数量阈值。
需要说明的是,电子设备可以先执行步骤301和302再执行步骤303和304,可以先执行步骤303和304再执行步骤301和302,也可以同时执行步骤301和302及步骤303和304,此处不做具体限定。
305、获取第一光感稳定值与第二光感稳定值对应的平均值。
可选的,电子设备获取第一光感稳定值与第二光感稳定值对应的平均值,可以包括:电子设备根据第一公式,确定第一光感稳定值与第二光感稳定值对应的平均值。
其中,该第一公式为X=(a+b)/2;X表示该平均值,a表示该第一光感稳定值,b表示该第二光感稳定值。
示例性的,假设第一光感稳定值a=194cd/m 2,第二光感稳定值b=312cd/m 2,那么,第一光感稳定值a与第二光感稳定值b对应的平均值X=(a+b)/2=(194+312)/2=253cd/m 2
306、计算第一光感稳定值与平均值的第一差值。
可选的,电子设备计算第一光感稳定值与平均值的第一差值,可以包括:电子设备根据第二公式,确定第一光感稳定值与平均值的第一差值。
其中,该第二公式为p=a-X;p表示该第一差值。
示例性的,假设第一光感稳定值a=194cd/m 2、第一光感稳定值a与第二光感稳定值b对应的平均值X=253cd/m 2,那么,第一光感稳定值a与平均值X的第一差值p=a-X=194-253=-61cd/m 2
307、计算第二光感稳定值与平均值的第二差值。
可选的,电子设备计算第二光感稳定值与平均值的第二差值,可以包括:电子设备根据第三公式,确定第二光感稳定值与平均值的第二差值。
其中,该第三公式为q=b-X;q表示该第二差值。
示例性的,假设第二光感稳定值b=312cd/m 2、第一光感稳定值a与第二光感稳定值b对应的平均值X=253cd/m 2,那么,第二光感稳定值b=与平均值X的第二差值q=b-X=312-253=59cd/m 2
308、将第一差值的平方与第二差值的平方进行求和,并根据求和结果确定第一光感稳定值与第二光感稳定值对应的离散程度值。
可选的,电子设备将第一差值的平方与第二差值的平方进行求和,得到求和结果,可以包括:电子设备根据第四公式,确定求和结果。
其中,该第四公式为S=(p 2+q 2)/(k-1);S表示该求和结果,k表示差值的个数。由于在本公开实施例中只有两个差值,分别为第一差值和第二差值,所以,k取2,该第四公式为S=(p 2+q 2)。
可选的,当离散程度值包括方差时,S表示该方差;当离散程度值包括标准差时,SqrS表示该标准差,其中,该Sqr表示平方根。
示例性的,假设第一差值p=-61cd/m 2、第二差值q=59cd/m 2,那么,第一光感稳定值a与第二光感稳定值b对应的方差S=(p 2+q 2)=(-61) 2+59 2=7202;第一光感稳定值a与第二光感稳定值b对应的标准差SqrS=84.86。
309、若离散程度值小于预设阈值,则将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
可选的,若离散程度值小于预设阈值,则电子设备将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值,可以包括但不限于以下其中一种实现方式:
实现方式1:离散程度值包括方差,若第一光感稳定值与第二光感稳定值对应的方差小于预设方差阈值,则电子设备将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
可选的,预设方差阈值S’可以选取10000~22500之间的任一数值。
示例性的,假设预设方差阈值S’=10000。电子设备获取的离散程度值S=7202,该离散程度值S=7202小于该S’=10000,此时,该电子设备可以将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
实现方式2:离散程度值包括标准差,若第一光感稳定值与第二光感稳定值对应的标准差小于预设标准差阈值,则电子设备将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
可选的,预设标准差阈值SqrS’可以选取100~150之间的任一数值。
示例性的,假设预设标准差阈值SqrS’=110。电子设备获取的离散程度值SqrS=84.86,该离散程度值SqrS=84.86小于该S’=110,此时,该电子设备可以将第一光感稳定值与第二光感稳定值进行融合,得到环境光感值。
可选的,电子设备将该第一光感稳定值与该第二光感稳定值进行融合,得到环境光感值,可以包括:电子设备将该第一光感稳定值与第一权重相乘,得到第一数值;该电子设备将该第二光感稳定值与第二权重相乘,得到第二数值;该电子设备将该第一数值与该第二数值相加,得到环境光感值。
其中,该第二权重与该第一权重之和为1。
可选的,电子设备根据该第五公式,得到第一数值;该电子设备根据该第六公式,得到第二数值;该电子设备根据第七公式,得到环境光感值;其中,该第五公式为Y=au,Y表示该第一数值,u表示该第一权重;该第六公式为Z=bv,Z表示该第二数值,v表示该第二权重;第七公式H=Y+Z,H表示该环境光感值;u+v=1。
示例性的,假设第一权重u取0.2,那么,第二权重v=1-u=1-0.2=0.8;第一光感稳定值a=194cd/m 2、 第二光感稳定值b=312cd/m 2。电子设备获取的第一数值Y=au=194×0.2=38.4cd/m 2,第二数值Z=bv=312×0.8=249.6cd/m 2,然后,该电子设备可以确定环境光感值H=Y+Z=38.4+249.6=288cd/m 2
在本公开实施例中,电子设备根据去噪后的第一光感值确定的第一光感稳定值较为准确的;并根据去噪后的第二光感值确定的第二光感稳定值也是较为准确的,然后,该电子设备可以计算该第一光感稳定值与该第二光感稳定值对应的离散程度值,且该离散程度值也是较为准确的;若该离散程度值小于预设阈值,则说明该第一光感稳定值与该第二光感稳定值之间的差异程度较小,此时,该电子设备可以将该第一光感稳定值与该第二光感稳定值进行融合,得到准确性较高环境光感值。
应该理解的是,虽然图2-3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
基于同一发明构思,作为对上述方法的实现,本公开实施例还提供了一种环境光感值的获取装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。
图4为本公开一个或多个实施例中环境光感值的获取装置的一个结构示意图,如图4所示,本实施例提供的环境光感值的获取装置可以包括:
稳定值确定模块401和融合模块402;其中,稳定值确定模块401还包括:第一采集单元4011、第一去噪单元4012、第一确定单元4013、第二采集单元4014、第二去噪单元4015及第二确定单元4016。
稳定值确定模块401,将稳定值确定模块401配置成根据通过该第一光感传感器采集的多个第一光感值,确定第一光感稳定值的模块;以及,配置成根据通过该第二光感传感器采集的多个第二光感值,确定第二光感稳定值的模块;
融合模块402,将融合模块402配置成计算该第一光感稳定值与该第二光感稳定值对应的离散程度值的模块,若该离散程度值小于预设阈值,则配置成将该第一光感稳定值与该第二光感稳定值进行融合,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,
该离散程度值包括方差,融合模块402,还将融合模块402配置成若该第一光感稳定值与该第二光感稳定值对应的方差小于预设方差阈值,则将该第一光感稳定值与该第二光感稳定值进行融合,得到环境光感值的模块;或,该离散程度值包括标准差,融合模块402,还将融合模块402配置成若该第一光 感稳定值与该第二光感稳定值对应的标准差小于预设标准差阈值,则将该第一光感稳定值与该第二光感稳定值进行融合,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,
融合模块402,还将融合模块402配置成获取该第一光感稳定值与该第二光感稳定值对应的平均值的模块;以及,配置成计算该第一光感稳定值与该平均值的第一差值的模块;以及,配置成计算该第二光感稳定值与该平均值的第二差值的模块;以及,配置成将该第一差值的平方与该第二差值的平方进行求和,并根据求和结果确定该第一光感稳定值与该第二光感稳定值对应的离散程度值的模块。
作为本公开实施例一种可选的实施方式,
融合模块402,还将融合模块402配置成将该第一光感稳定值与第一权重相乘,得到第一数值的模块;以及,配置成将该第二光感稳定值与第二权重相乘,得到第二数值的模块,该第二权重与该第一权重之和为1;以及,配置成将该第一数值与该第二数值相加,得到环境光感值的模块。
作为本公开实施例一种可选的实施方式,
融合模块402,还包括第一采集单元4011,配置成通过该第一光感传感器采集多个第一光感值的模块;
融合模块402,还包括第一去噪单元4012,配置成对该多个第一光感值进行去噪的模块;
融合模块402,还包括第一确定单元4013,配置成若去噪后的第一光感值的数量达到第一预设数量阈值,则将该去噪后的第一光感值对应的第一均值作为第一光感稳定值的模块;
融合模块402,还包括第二采集单元4014,配置成通过该第二光感传感器采集多个第二光感值的模块;
融合模块402,还包括第二去噪单元4015,配置成对该多个第二光感值进行去噪的模块;
融合模块402,还包括第二确定单元4016,配置成若去噪后的第二光感值的数量达到第二预设数量阈值,则将该去噪后的第二光感值对应的第二均值作为第二光感稳定值的模块;其中,该第一光感传感器为设置在该电子设备的屏幕的正面的前置光感传感器,该第二光感传感器为设置在该电子设备的屏幕的背面的后置光感传感器。
作为本公开实施例一种可选的实施方式,第一去噪单元4012,还配置成从第一采集缓冲区中逐一读取该第一光传感器采集的第一光感值的模块;该第一采集缓冲区用于存储该第一光传感器采集的多个第一光感值;还配置成判断读取的第一光感值是否为噪点光感值,若该读取的第一光感值不为噪点光感值,则将该读取的第一光感值写入第一光感缓冲队列的模块;
第一确定单元4013,还配置成若写入到该第一光感缓冲队列中的第一光感值的数量达到第一预设数量阈值,则将该第一光感缓冲队列中数量达到该第一预设数量阈值的第一光感值对应的第一均值作为 第一光感稳定值的模块。
作为本公开实施例一种可选的实施方式,
第一采集单元4011,还配置成获取第一队头值,该第一队头值为第一光感缓冲队列中写入的首个第一光感值的模块;
第一确定单元4013,还配置成当该第一队头值和读取的第一光感值均小于上一次确定的第一光感稳定值,或,该第一队头值和该读取的第一光感值均大于该上一次确定的第一光感稳定值时,确定该读取的第一光感值不为噪点光感值的模块。
本实施例提供的环境光感值的获取装置可以执行上述方法实施例提供的环境光感值的获取方法,其实现原理与技术效果类似,此处不再赘述。上述环境光感值的获取装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的一个或多个处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于一个或多个处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种电子设备,如图5所示,图5为本公开一个或多个实施例中电子设备的另一个结构示意图,该电子设备可以包括:存储器501和一个或多个处理器502,将存储器501配置成存储计算机可读指令的模块;计算机可读指令被一个或多个处理器502执行时,使得一个或多个处理器502执行上述方法实施例所述的环境光感值的获取方法的步骤。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一项所述的环境光感值的获取方法的步骤。
计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本公开实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
在本公开所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些 特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
本领域普通技术人员可以理解实现上述方法实施例中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成的,计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本公开所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,比如静态随机存取存储器(Static Random Access Memory,SRAM)和动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本公开的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干变形和改进,这些都属于本公开的保护范围。因此,本公开专利的保护范围应以所附权利要求为准。
工业实用性
本公开提供的环境光感值的获取方法,可以在电子设备当前的环境光源亮度变动频繁或该电子设备在多光源的情况下快速移动时,确定准确性较高的环境光感值,具有很强的工业实用性。

Claims (17)

  1. 一种环境光感值的获取方法,其中,应用于电子设备,所述电子设备至少包括第一光感传感器和第二光感传感器,所述方法包括:
    根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值;
    根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值;
    计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值。
  2. 根据权利要求1所述的方法,其中,所述离散程度值包括方差,所述若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
    若所述第一光感稳定值与所述第二光感稳定值对应的方差小于预设方差阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值;或,
    所述离散程度值包括标准差,所述若所述离散程度值小于预设阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
    若所述第一光感稳定值与所述第二光感稳定值对应的标准差小于预设标准差阈值,则将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值。
  3. 根据权利要求1所述的方法,其中,所述计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,包括:
    获取所述第一光感稳定值与所述第二光感稳定值对应的平均值;
    计算所述第一光感稳定值与所述平均值的第一差值;
    计算所述第二光感稳定值与所述平均值的第二差值;
    将所述第一差值的平方与所述第二差值的平方进行求和,并根据求和结果确定所述第一光感稳定值与所述第二光感稳定值对应的离散程度值。
  4. 根据权利要求1-3中任一项所述的方法,其中,所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
    将所述第一光感稳定值与第一权重相乘,得到第一数值;
    将所述第二光感稳定值与第二权重相乘,得到第二数值,所述第二权重与所述第一权重之和为1;
    将所述第一数值与所述第二数值相加,得到环境光感值。
  5. 根据权利要求1所述的方法,其中,所述根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值,包括:
    通过所述第一光感传感器采集多个第一光感值;
    对所述多个第一光感值进行去噪,若去噪后的第一光感值的数量达到第一预设数量阈值,则将所述去噪后的第一光感值对应的第一均值作为第一光感稳定值;
    所述根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值,包括:
    通过所述第二光感传感器采集多个第二光感值;
    对所述多个第二光感值进行去噪,若去噪后的第二光感值的数量达到第二预设数量阈值,则将所述去噪后的第二光感值对应的第二均值作为第二光感稳定值;
    其中,所述第一光感传感器为设置在所述电子设备的屏幕的正面的前置光感传感器,所述第二光感传感器为设置在所述电子设备的屏幕的背面的后置光感传感器。
  6. 根据权利要求5所述的方法,其中,所述对所述多个第一光感值进行去噪,包括:
    从第一采集缓冲区中逐一读取所述第一光传感器采集的第一光感值;所述第一采集缓冲区用于存储所述第一光传感器采集的多个第一光感值;
    判断读取的第一光感值是否为噪点光感值,若所述读取的第一光感值不为噪点光感值,则将所述读取的第一光感值写入第一光感缓冲队列;
    所述若去噪后的第一光感值的数量达到第一预设数量阈值,则将所述去噪后的第一光感值对应的第一均值作为第一光感稳定值,包括:
    若写入到所述第一光感缓冲队列中的第一光感值的数量达到第一预设数量阈值,则将所述第一光感缓冲队列中数量达到所述第一预设数量阈值的第一光感值对应的第一均值作为第一光感稳定值。
  7. 根据权利要求6所述的方法,其中,所述判断读取的第一光感值是否为噪点光感值,包括:
    获取第一队头值,所述第一队头值为第一光感缓冲队列中写入的首个第一光感值;
    当所述第一队头值和读取的第一光感值均小于上一次确定的第一光感稳定值,或,所述第一队头值和所述读取的第一光感值均大于所述上一次确定的第一光感稳定值时,确定所述读取的第一光感值不为噪点光感值。
  8. 根据权利要求7所述的方法,其中,所述获取第一队头值,包括:
    确定出所述第一光感缓冲队列中不存在第一光感值;
    将首个读取的第一光感值写入所述第一光感缓冲队列,且将在所述第一光感缓冲队列中 写入的所述首个读取的第一光感值作为所述第一光感缓冲队列中的第一队头值。
  9. 根据权利要求5所述的方法,其中,所述对所述多个第二光感值进行去噪,包括:
    从第二采集缓冲区中逐一读取所述第二光传感器采集的第二光感值;所述第二采集缓冲区用于存储所述第二光传感器采集的多个第二光感值;
    判断读取的第二光感值是否为噪点光感值,若所述读取的第二光感值不为噪点光感值,则将所述读取的第二光感值写入第二光感缓冲队列;
    所述若去噪后的第二光感值的数量达到第二预设数量阈值,则将所述去噪后的第二光感值对应的第二均值作为第二光感稳定值,包括:
    若写入到所述第二光感缓冲队列中的第二光感值的数量达到第二预设数量阈值,则将所述第二光感缓冲队列中数量达到所述第二预设数量阈值的第二光感值对应的第二均值作为第二光感稳定值。
  10. 根据权利要求9所述的方法,其中,所述判断读取的第二光感值是否为噪点光感值,包括:
    获取第二队头值,所述第二队头值为第二光感缓冲队列中写入的首个第二光感值;
    当所述第二队头值和读取的第二光感值均小于上一次确定的第二光感稳定值,或,所述第二队头值和所述读取的第二光感值均大于所述上一次确定的第二光感稳定值时,确定所述读取的第二光感值不为噪点光感值。
  11. 根据权利要求1所述的方法,其中,所述根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值,包括:
    计算所述第一光感传感器采集的多个第一光感值的均值,根据所述多个第一光感值的均值确定第一光感稳定值;
    所述根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值,包括:
    计算所述第二光感传感器采集的多个第二光感值的均值,根据所述多个第二光感值的均值确定第二光感稳定值。
  12. 根据权利要求1所述的方法,其中,所述方法还包括:
    计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值,若所述离散程度值大于或等于所述预设阈值,则舍弃所述第一光感稳定值及所述第二光感稳定值,重新根据所述第一光感传感器采集的第一光感值获取重新确定的第一光感稳定值及根据所述第二光传感器采集的第二光感值获取重新确定的第二光感稳定值,并继续判断所述重新确定的第一光感稳定值和所述重新确定的第二光感稳定值对应的重新确定的离散程度值是否小于所述预设阈 值,直到所述重新确定的离散程度值小于所述预设阈值。
  13. 根据权利要求1所述的方法,其中,所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
    将所述第一光感稳定值与所述第二光感稳定值对应的平均值确定为环境光感值。
  14. 根据权利要求1所述的方法,其中,所述将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值,包括:
    将所述第一光感稳定值与所述第二光感稳定值基于不同的权重进行加权求和得到的值确定为环境光感值。
  15. 一种环境光感值的获取装置,其中,至少包括第一光感传感器和第二光感传感器,还包括:
    稳定值确定模块,将所述稳定值确定模块配置成根据通过所述第一光感传感器采集的多个第一光感值,确定第一光感稳定值的模块;以及,配置成根据通过所述第二光感传感器采集的多个第二光感值,确定第二光感稳定值的模块;
    融合模块,将所述融合模块配置成计算所述第一光感稳定值与所述第二光感稳定值对应的离散程度值的模块,若所述离散程度值小于预设阈值,则配置成将所述第一光感稳定值与所述第二光感稳定值进行融合,得到环境光感值的模块。
  16. 一种电子设备,其中,至少包括第一光感传感器和第二光感传感器,还包括:
    存储有计算机可读指令的存储器;
    以及所述存储器耦合的一个或多个处理器;
    所述一个或多个处理器调用所述存储器中存储的所述计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行权利要求1-14任一项所述的环境光感值的获取方法。
  17. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其上存储有计算机可读指令,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行权利要求1-14任一项所述的环境光感值的获取方法。
PCT/CN2022/098721 2022-01-24 2022-06-14 环境光感值的获取方法、电子设备及计算机可读存储介质 WO2023137957A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210079859.0 2022-01-24
CN202210079859.0A CN114495862A (zh) 2022-01-24 2022-01-24 环境光感值的获取方法、电子设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2023137957A1 true WO2023137957A1 (zh) 2023-07-27

Family

ID=81474107

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098721 WO2023137957A1 (zh) 2022-01-24 2022-06-14 环境光感值的获取方法、电子设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN114495862A (zh)
WO (1) WO2023137957A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114495862A (zh) * 2022-01-24 2022-05-13 上海闻泰信息技术有限公司 环境光感值的获取方法、电子设备及计算机可读存储介质

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104345876A (zh) * 2013-08-07 2015-02-11 联想(北京)有限公司 一种信息处理方法及电子设备
CN104994315A (zh) * 2015-07-17 2015-10-21 青岛海信电器股份有限公司 背光调整方法、显示设备、遥控器及系统
CN105280159A (zh) * 2014-07-31 2016-01-27 维沃移动通信有限公司 一种显示设备的背光调节方法及其显示设备
CN106257581A (zh) * 2015-06-18 2016-12-28 三星电子株式会社 用户终端装置及其用于调整亮度的方法
CN106558295A (zh) * 2015-09-25 2017-04-05 小米科技有限责任公司 屏幕亮度调整方法及装置
CN109119044A (zh) * 2018-10-16 2019-01-01 Oppo(重庆)智能科技有限公司 电子设备
CN109920394A (zh) * 2019-04-29 2019-06-21 合肥惠科金扬科技有限公司 一种屏幕亮度的调节方法、调节装置及显示设备
CN111128092A (zh) * 2020-02-11 2020-05-08 北京小米移动软件有限公司 屏幕亮度调节方法、屏幕亮度调节装置及计算机存储介质
CN111968597A (zh) * 2020-08-12 2020-11-20 Oppo(重庆)智能科技有限公司 屏幕亮度调节方法、装置、电子设备和存储介质
CN112133261A (zh) * 2020-11-03 2020-12-25 歌尔科技有限公司 一种显示设备的亮度调节方法、装置及系统
CN112468656A (zh) * 2020-11-17 2021-03-09 惠州Tcl移动通信有限公司 控制显屏亮度的方法、装置、设备和计算机可读存储介质
CN112525340A (zh) * 2020-12-01 2021-03-19 珠海格力电器股份有限公司 光线强度值的获取方法及装置、存储介质、电子设备
CN114495862A (zh) * 2022-01-24 2022-05-13 上海闻泰信息技术有限公司 环境光感值的获取方法、电子设备及计算机可读存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2493931A (en) * 2011-08-22 2013-02-27 Apical Ltd Display Device Brightness and Dynamic Range Compression Control
CN107300417A (zh) * 2017-05-25 2017-10-27 广东欧珀移动通信有限公司 环境光的检测方法、装置、存储介质及终端
CN111726449A (zh) * 2019-03-18 2020-09-29 青岛海信移动通信技术股份有限公司 一种确定终端环境亮度的方法和设备
CN112714205B (zh) * 2019-10-24 2023-06-20 北京小米移动软件有限公司 环境光照强度确定方法、装置及存储介质
CN113709275A (zh) * 2020-05-21 2021-11-26 北京小米移动软件有限公司 环境光确定方法、装置、终端设备及存储介质
CN111829654B (zh) * 2020-07-24 2023-03-24 北京小米移动软件有限公司 环境光检测方法及装置、计算机存储介质

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104345876A (zh) * 2013-08-07 2015-02-11 联想(北京)有限公司 一种信息处理方法及电子设备
CN105280159A (zh) * 2014-07-31 2016-01-27 维沃移动通信有限公司 一种显示设备的背光调节方法及其显示设备
CN106257581A (zh) * 2015-06-18 2016-12-28 三星电子株式会社 用户终端装置及其用于调整亮度的方法
CN104994315A (zh) * 2015-07-17 2015-10-21 青岛海信电器股份有限公司 背光调整方法、显示设备、遥控器及系统
CN106558295A (zh) * 2015-09-25 2017-04-05 小米科技有限责任公司 屏幕亮度调整方法及装置
CN109119044A (zh) * 2018-10-16 2019-01-01 Oppo(重庆)智能科技有限公司 电子设备
CN109920394A (zh) * 2019-04-29 2019-06-21 合肥惠科金扬科技有限公司 一种屏幕亮度的调节方法、调节装置及显示设备
CN111128092A (zh) * 2020-02-11 2020-05-08 北京小米移动软件有限公司 屏幕亮度调节方法、屏幕亮度调节装置及计算机存储介质
CN111968597A (zh) * 2020-08-12 2020-11-20 Oppo(重庆)智能科技有限公司 屏幕亮度调节方法、装置、电子设备和存储介质
CN112133261A (zh) * 2020-11-03 2020-12-25 歌尔科技有限公司 一种显示设备的亮度调节方法、装置及系统
CN112468656A (zh) * 2020-11-17 2021-03-09 惠州Tcl移动通信有限公司 控制显屏亮度的方法、装置、设备和计算机可读存储介质
CN112525340A (zh) * 2020-12-01 2021-03-19 珠海格力电器股份有限公司 光线强度值的获取方法及装置、存储介质、电子设备
CN114495862A (zh) * 2022-01-24 2022-05-13 上海闻泰信息技术有限公司 环境光感值的获取方法、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN114495862A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
RU2611260C2 (ru) Способ и устройство предоставления рекомендаций мультимедиа-ресурсов
US10863324B2 (en) Mobile content delivery optimization
CN106454139B (zh) 拍照方法及移动终端
US10169900B2 (en) Picture processing method and apparatus
TWI478558B (zh) 用以提供內容項目關聯性之分析與視覺化的方法、裝置與電腦程式產品
US10764635B2 (en) Aggregated stress monitoring to guide user interaction
WO2018090545A1 (zh) 融合时间因素的协同过滤方法、装置、服务器和存储介质
CN111338910B (zh) 日志数据处理、显示方法、装置、设备及存储介质
US20150049170A1 (en) Method and apparatus for virtual 3d model generation and navigation using opportunistically captured images
WO2023137957A1 (zh) 环境光感值的获取方法、电子设备及计算机可读存储介质
WO2019062369A1 (zh) 应用管理方法、装置、存储介质及电子设备
US11817994B2 (en) Time series trend root cause identification
CN111475384A (zh) 壳体温度的计算方法、装置、存储介质及电子设备
JP2023521541A (ja) 画像検出方法、装置、システム、デバイス及び記憶媒体
CN110765182B (zh) 数据统计方法、装置、电子设备及存储介质
CN114154068A (zh) 媒体内容推荐方法、装置、电子设备及存储介质
TW201730838A (zh) 互動式服務平台及其運作方法
JP2014222474A (ja) 情報処理装置、方法及びプログラム
KR20200101036A (ko) 이미지와 관련된 콘텐트를 어플리케이션에 제공하는 전자 장치 및 방법
CN110955580B (zh) 壳体温度的获取方法、装置、存储介质和电子设备
CN111953935A (zh) 体温监管方法、装置、智慧屏和计算机可读存储介质
US11566947B2 (en) Temperature estimation system, temperature estimation method, and recording medium storing temperature estimation program
US20150269177A1 (en) Method and system for determining user interest in a file
CN114298403A (zh) 预测作品的关注度的方法和装置
JP2023063807A (ja) 画像処理装置、画像処理方法、プログラム及び記録媒体

Legal Events

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

Ref document number: 22921388

Country of ref document: EP

Kind code of ref document: A1