Brightness processing methods, devices and storage media

By determining the initial gain and calibrating the calibration coefficients of the gain module of the light sensor, the problem of the ambient brightness determination error of the light sensor was solved, enabling more accurate ambient brightness processing and display brightness adjustment, thus improving the user experience.

CN116499585BActive Publication Date: 2026-04-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, light sensors have errors in determining ambient brightness, which leads to inaccurate adjustment of display brightness in electronic devices and affects user experience.

Method used

The target gain is obtained by determining the initial gain of each gain module in the light sensor and calibrating the calibration coefficients, thus accurately processing the ambient brightness value.

Benefits of technology

It improves the accuracy of ambient brightness values, enhances the brightness adjustment of electronic devices, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116499585B_ABST
    Figure CN116499585B_ABST
Patent Text Reader

Abstract

This disclosure relates to a brightness processing method, apparatus, and storage medium. The method includes: determining the initial gain of each gain module in the light sensor during the process of acquiring ambient brightness values ​​of the environment in which the electronic device is located via the light sensor; calibrating the initial gain according to calibration coefficients pre-stored in the electronic device to obtain a target gain; and processing the ambient brightness values ​​acquired by the light sensor according to the target gain to obtain a target ambient brightness value. This disclosure improves the accuracy of the obtained ambient brightness values ​​by calibrating the initial gain before processing the ambient brightness values ​​acquired by the light sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a brightness processing method, apparatus and storage medium. Background Technology

[0002] In related technologies, an under-display light sensor in an electronic device can be used to detect the brightness of the external environment, and the detection result can be applied to image capture or screen display brightness adjustment. This typically involves amplifying the acquired light source signal using a gain control module within the light sensor to determine the brightness of the external environment.

[0003] Most mainstream light sensors offer specific gain settings, which are implemented internally by physical amplifiers. However, processing light source signals in this way can lead to errors in determining ambient brightness, which in turn can cause errors in how electronic devices adjust the display brightness, affecting the user experience. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a brightness processing method, apparatus and storage medium.

[0005] According to a first aspect of the present disclosure, a brightness processing method is provided, applied to an electronic device having a light sensor, comprising:

[0006] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the optical sensor, the initial gain of each gain module in the optical sensor is determined;

[0007] The initial gain is calibrated according to the calibration coefficients pre-stored in the electronic device to obtain the target gain;

[0008] The ambient brightness value collected by the optical sensor is processed according to the target gain to obtain the target ambient brightness value.

[0009] In some embodiments, the method further includes:

[0010] A standard brightness detection module is set up in a test space with a test light source to obtain the standard brightness value of the test position in the test space.

[0011] The test brightness value at the test location is obtained through the light sensor of the electronic device.

[0012] Based on the standard brightness value, the test brightness value, and the initial gain of each of the gain modules in the optical sensor, the calibration coefficient corresponding to each of the initial gains is obtained.

[0013] In some embodiments, acquiring the test brightness value at the test location via the light sensor of the electronic device includes:

[0014] With the electronic device located within the test space, the gain modules in the optical sensor are controlled to switch between at least one initial gain;

[0015] The reference brightness value collected by the optical sensor in the test space is processed based on at least one of the initial gains to obtain the test brightness value corresponding to each of the initial gains.

[0016] In some embodiments, obtaining the calibration coefficient corresponding to each initial gain based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the light sensor includes:

[0017] The standard gain is obtained based on the standard brightness value and the test brightness value;

[0018] Based on the standard gain and each of the initial gains, the calibration coefficients corresponding to each of the initial gains are obtained respectively.

[0019] In some embodiments, obtaining the standard gain based on the standard brightness value and the test brightness value includes:

[0020] The standard gain is obtained based on the ratio between the standard brightness value and each of the test brightness values.

[0021] In some embodiments, obtaining the calibration coefficients corresponding to each initial gain based on the standard gain and each initial gain includes:

[0022] The calibration coefficient corresponding to each initial gain is obtained based on the ratio between the standard gain and each initial gain.

[0023] In some embodiments, calibrating the initial gain according to a pre-stored calibration coefficient in the electronic device to obtain a target gain includes:

[0024] The initial gain is used to query the gain list stored in the memory of the electronic device, and a calibration coefficient that satisfies a preset correlation with the initial gain is determined from the gain list.

[0025] The initial gain is calibrated according to the calibration coefficient that satisfies the preset correlation relationship with the initial gain to obtain the target gain;

[0026] The gain list is generated based on the initial gain, the calibration coefficient, and the correlation between the initial gain and the calibration coefficient.

[0027] In some embodiments, determining the initial gain of each gain module in the light sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located via the light sensor includes:

[0028] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the gain modules are controlled to switch between the initial gains according to the signal strength of the output signal of the photodetector of the electronic device.

[0029] The signal strength of the output signal is used to characterize the ambient brightness of the environment in which the electronic device is currently located.

[0030] In some embodiments, the method further includes:

[0031] The display brightness of the electronic device's screen is adjusted according to the target ambient brightness value.

[0032] According to a second aspect of the present disclosure, a brightness processing apparatus is provided, applied to an electronic device having a light sensor, the apparatus comprising:

[0033] The determination module is configured to determine the initial gain of each gain module in the light sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor.

[0034] The calibration module is configured to calibrate the initial gain according to the calibration coefficients pre-stored in the electronic device to obtain the target gain;

[0035] The processing module is configured to process the ambient brightness value collected by the light sensor according to the target gain to obtain the target ambient brightness value.

[0036] In some embodiments, the apparatus further includes:

[0037] The first acquisition module is configured to acquire the standard brightness value of the test position in the test space by using a standard brightness detection module set in the test space with a test light source;

[0038] The second acquisition module is configured to acquire the test brightness value at the test location through the light sensor of the electronic device;

[0039] The module is configured to obtain calibration coefficients corresponding to each initial gain based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the light sensor.

[0040] In some embodiments, the second acquisition module is configured to:

[0041] With the electronic device located within the test space, the gain modules in the optical sensor are controlled to switch between at least one initial gain;

[0042] The reference brightness value collected by the optical sensor in the test space is processed based on at least one of the initial gains to obtain the test brightness value corresponding to each of the initial gains.

[0043] In some embodiments, the obtaining module is configured as follows:

[0044] The standard gain is obtained based on the standard brightness value and the test brightness value;

[0045] Based on the standard gain and each of the initial gains, the calibration coefficients corresponding to each of the initial gains are obtained respectively.

[0046] In some embodiments, the obtaining module is configured as follows:

[0047] The standard gain is obtained based on the ratio between the standard brightness value and each of the test brightness values.

[0048] In some embodiments, the obtaining module is configured as follows:

[0049] The calibration coefficient corresponding to each initial gain is obtained based on the ratio between the standard gain and each initial gain.

[0050] In some embodiments, the calibration module is configured to:

[0051] The initial gain is used to query the gain list stored in the memory of the electronic device, and a calibration coefficient that satisfies a preset correlation with the initial gain is determined from the gain list.

[0052] The initial gain is calibrated according to the calibration coefficient that satisfies the preset correlation relationship with the initial gain to obtain the target gain;

[0053] The gain list is generated based on the initial gain, the calibration coefficient, and the correlation between the initial gain and the calibration coefficient.

[0054] In some embodiments, the determining module is configured to:

[0055] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the gain modules are controlled to switch between the initial gains according to the signal strength of the output signal of the photodetector of the electronic device.

[0056] The signal strength of the output signal is used to characterize the ambient brightness of the environment in which the electronic device is currently located.

[0057] In some embodiments, the apparatus further includes:

[0058] The adjustment module is configured to adjust the display brightness of the electronic device's screen based on the target ambient brightness value.

[0059] According to a third aspect of the present disclosure, a brightness processing apparatus is provided, comprising:

[0060] processor;

[0061] Memory configured to store processor-executable instructions;

[0062] The processor is configured to implement the steps of any of the brightness processing methods in the first aspect described above during execution.

[0063] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a brightness processing apparatus, the apparatus is enabled to perform the steps of any of the brightness processing methods described in the first aspect.

[0064] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0065] In this embodiment of the present disclosure, during the process of acquiring the ambient brightness value of the environment in which the electronic device is located using a light sensor, the initial gain of each gain module in the light sensor can be determined. Then, the initial gain can be calibrated according to a calibration coefficient to obtain a target gain. This allows for the processing of the ambient brightness value acquired by the light sensor based on the target gain, resulting in a more accurate target ambient brightness value. By calibrating the initial gain before processing the ambient brightness value acquired by the light sensor, this disclosure improves the accuracy of the obtained ambient brightness value.

[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0067] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0068] Figure 1 This is a flowchart illustrating a brightness processing method according to an exemplary embodiment of the present disclosure.

[0069] Figure 2 This is a schematic diagram illustrating the operation of an optical sensor according to an exemplary embodiment of the present disclosure.

[0070] Figure 3 This is a block diagram of a brightness processing apparatus according to an exemplary embodiment of the present disclosure.

[0071] Figure 4 This is a hardware structure block diagram of a brightness processing device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0073] Figure 1 This is a flowchart illustrating a brightness processing method according to an exemplary embodiment, such as... Figure 1 As shown, this method is applied to electronic devices with optical sensors and mainly includes the following steps:

[0074] In step 101, during the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the initial gain of each gain module in the light sensor is determined.

[0075] In step 102, the initial gain is calibrated according to the calibration coefficients pre-stored in the electronic device to obtain the target gain;

[0076] In step 103, the ambient brightness value collected by the light sensor is processed according to the target gain to obtain the target ambient brightness value.

[0077] Here, electronic devices can include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals can include devices such as mobile phones, tablets, laptops, or wearable devices, as well as smart home devices such as smart speakers, and in-vehicle devices. Fixed terminals can include desktop computers or smart TVs.

[0078] Here, a light sensor refers to a device that can sensitively detect light energy (also called light signal or light source signal) from ultraviolet to infrared light and convert it into an electrical signal. A light sensor is a sensing device that mainly consists of multiple modules, including a photosensitive element (or photodetector), a gain module (or gain control module), a conversion module, and a storage module (such as a register). The photosensitive element converts the light source signal into an electrical signal such as current or voltage; the gain module amplifies the electrical signal; the conversion module converts the amplified analog electrical signal into a digital signal; and the storage module stores the converted digital signal. When electronic devices need to determine the ambient brightness of the external environment, they can read the stored data from the storage module. Light sensors mainly include ambient light sensors, infrared light sensors, sunlight sensors, and ultraviolet light sensors, and are primarily used in areas such as display systems for electronic devices, automotive electronics, and intelligent lighting systems.

[0079] In this embodiment of the disclosure, during the process of the electronic device acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the initial gain of each gain module in the light sensor can be determined.

[0080] In this embodiment, gain can be understood as the amplification factor of a signal. When an electronic device amplifies the brightness value represented by an electrical signal through the gain module in a light sensor, the amplification factor can be determined first, and the brightness value represented by the signal can be processed using the preset amplification factor. The initial gain can refer to the default gain of the gain module, such as the gain preset when the electronic device leaves the factory, the gain obtained by resetting during the use of the electronic device, or the gain used by the electronic device in the last processing of the ambient brightness value, etc., without specific limitations here.

[0081] To differentiate gain modules from those used for other purposes, electronic devices can control gain modules to amplify the brightness represented by the signal with different initial gains. In other words, for different functions of the electronic device, multiple different initial gains can be set for each gain module. During use, the gain modules can be switched between different initial gains according to the usage scenario and / or the function the electronic device needs to achieve. For example, three initial gains can be set for the first gain module: 2, 3, and 4. For instance, if the input current of the gain module is 5A, a current of 5A can represent a brightness value of 5. If the preset initial gain is 2, then the output current is 10A, etc. If the electronic device switches the initial gain from 2 to 4, then the output current can be 20A, and a current of 20A can represent a brightness value of 20, etc.

[0082] Ambient brightness values ​​can be used to represent the brightness of the current environment in which an electronic device is located. For example, the ambient brightness value at 7:00 AM could be 15, and the ambient brightness value at 2:00 PM could be 25. It's important to note that the light source signals collected by the electronic device through its light sensor, as well as the digital signals obtained through subsequent processing such as signal conversion, can all be used to characterize the brightness of the current environment. The purpose of this processing is to obtain a more accurate ambient brightness value.

[0083] In one possible embodiment, the optical sensor may include multiple photodetectors, multiple gain modules, and multiple conversion modules, etc. Figure 2 This is a schematic diagram illustrating the operation of an ambient light sensor according to an exemplary embodiment, such as... Figure 2 As shown, different photodetectors can collect light source signals of different colors. For example, the first photodetector 201 collects the signal from the red channel, the second photodetector 202 collects the signal from the green channel, the third photodetector 203 collects the signal from the blue channel, and the fourth photodetector 204 collects the signal from the cyan channel, etc. Different gain modules can amplify the brightness values ​​represented by the signals from different color channels. For example, the first gain module 205 amplifies the brightness value represented by the red channel signal, the second gain module 206 processes the brightness value represented by the green channel signal, the third gain module 207 processes the brightness value represented by the blue channel signal, and the fourth gain module 208 processes the brightness value represented by the cyan channel signal, etc. Different conversion modules can convert the signal types of different color channels (e.g., converting digital signals to analog signals). For example, the first conversion module 209 converts the red channel signal, the second conversion module 210 converts the green channel signal, the third conversion module 211 converts the blue channel signal, and the fourth conversion module 212 converts the cyan channel signal, etc. The converted signal is then input to the storage module 213, allowing data such as ambient light brightness to be obtained by reading from the storage module 213.

[0084] In some embodiments, the electronic device can determine the initial gain of each gain module by directly reading the initial gain value pre-stored in the storage module of the optical sensor. For example, the electronic device reads that the initial gain of the first gain module in the storage module is 8. In other embodiments, the electronic device can also determine the initial gain of each gain module based on the ratio between the input signal and the output signal of the gain module. For example, if the electronic device determines that the input voltage of the first gain module is 3V and the output voltage is 48V, then the initial gain of the first gain module can be determined to be 16, etc.

[0085] After the electronic device determines the initial gain of each gain module, it can calibrate the initial gain according to the calibration coefficients pre-stored in the electronic device to obtain the target gain. Here, the calibration coefficients can be used to characterize the degree of calibration of the initial gain. For example, the calibration coefficients can be positively correlated with the degree of calibration of the initial gain, such as the larger the calibration coefficient, the stronger the calibration degree. The calibration coefficients can be greater than 1, or less than or equal to 1, etc., and this disclosure does not make specific limitations.

[0086] In one possible embodiment, the electronic device can store the initial gain, calibration coefficients, and the correspondence between the initial gain and the calibration coefficients in a database. The electronic device can query the database to see if there is a calibration coefficient that matches the current initial gain. If it does, the calibration coefficient that matches the current initial gain can be used as a pre-stored calibration coefficient; if it does not, a preset default calibration coefficient can be used as a pre-stored calibration coefficient.

[0087] In one possible embodiment, the electronic device may also determine the calibration coefficient using one or more of the following information: current time, current temperature, type of electronic device, size of the electronic device's display screen, and intensity parameters (also known as signal strength, etc.) of the light source signal collected by the light sensor. For example, the calibration coefficient corresponding to 8:00-17:00 may be 0.9, and the calibration coefficient corresponding to 17:00-24:00 may be 1.2, etc.

[0088] In other embodiments, the electronic device can also obtain calibration coefficients through a coefficient preset model. This coefficient preset model can refer to a trained neural network model, which obtains corresponding calibration coefficients (e.g., 0.97) by inputting information such as the current time and the intensity parameters of the light source signal collected by the light sensor into the coefficient prediction model.

[0089] In this embodiment of the disclosure, different initial gains can correspond to different calibration coefficients. The calibration of the electronic device can include multiplying the calibration coefficient and the initial gain, or adding the calibration coefficient and the initial gain, etc., and this disclosure does not impose specific limitations. For example, when the initial gain is 2, the corresponding calibration coefficient can be 1.1, then the target gain is 2.2; when the initial gain is 4, the corresponding calibration coefficient can be 1.3, then the target gain is 5.2; when the initial gain is 8, the corresponding calibration coefficient can be 0.9, then the target gain is 7.2, and so on.

[0090] After obtaining the target gain, the electronic device can process the ambient brightness value collected by the light sensor according to the target gain to obtain the target ambient brightness value. The target ambient brightness can be understood as the actual brightness of the external environment at present. The electronic device can determine the actual ambient brightness value by using the ambient brightness value collected by the light sensor.

[0091] The ambient brightness value collected by the light sensor can be understood as the brightness value represented by the initial light source signal received by the light sensor, that is, the ambient brightness value represented by the light source signal before it is processed by the gain module. In one possible embodiment, the electronic device can also determine the target ambient brightness value based on the target gain and the ambient brightness value collected by the light sensor, using a preset calculation formula or a trained calculation model.

[0092] In this embodiment of the present disclosure, during the process of acquiring the ambient brightness value of the environment in which the electronic device is located using a light sensor, the initial gain of each gain module in the light sensor can be determined. Then, the initial gain can be calibrated according to a calibration coefficient to obtain a target gain. This allows for the processing of the ambient brightness value acquired by the light sensor based on the target gain, resulting in a more accurate target ambient brightness value. By calibrating the initial gain before processing the ambient brightness value acquired by the light sensor, this disclosure improves the accuracy of the obtained ambient brightness value.

[0093] In some embodiments, the method further includes:

[0094] A standard brightness detection module is set up in a test space with a test light source to obtain the standard brightness value of the test position in the test space.

[0095] The test brightness value at the test location is obtained through the light sensor of the electronic device.

[0096] Based on the standard brightness value, the test brightness value, and the initial gain of each of the gain modules in the optical sensor, the calibration coefficient corresponding to each of the initial gains is obtained.

[0097] In this embodiment, the test light source can refer to the light source used by the electronic device to determine the calibration coefficient, such as a standard light source with a brightness of 35 lux. In one possible embodiment, since brightness is positively correlated with light intensity, brightness can also be expressed in units such as nits, which is not specifically limited in this disclosure. The test light source can be a light source provided by a standard light source box, also known as a standard light source enclosure or light source enclosure, which is a lighting box that can provide lighting to simulate various ambient lights. It can be used to detect the color of goods and the accuracy of light sensors, and can provide a stable and standard test light source. The test space can be understood as the space in which the test light source can be detected, such as the internal space of the standard light source box. The standard brightness detection module can detect different standard brightnesses at different test positions (e.g., different heights) within the test space. The standard brightness detection module can be understood as a brightness detector without error, such as a standard precision lux meter. The standard brightness value can be understood as the brightness value generated by the test light source. The standard brightness value at a certain position within the test space is a true brightness value without error.

[0098] In this embodiment of the disclosure, the electronic device can obtain the standard brightness value of the test position within the test space by using a standard brightness detection module disposed within the test space with a test light source. For example, if the test position is located at a height of 30 cm within the test space with a test light source, the standard brightness value obtained by the standard brightness detection module is 35 lux; if the test position is located at a height of 60 cm, the standard brightness value obtained by the standard brightness detection module is 50 lux, etc.

[0099] In this embodiment of the disclosure, after obtaining the standard brightness value of the test location within the test space, the test brightness value of the test location can be obtained using the light sensor of the electronic device according to the initial gain. The test brightness value can be understood as the brightness value determined by the light sensor of the electronic device, which can correspond to the standard brightness value. For example, by placing the light sensor of the electronic device at the same position or height (e.g., 30 cm) of the standard brightness detection module, a test brightness value of 39 lux can be determined. In one possible embodiment, the test brightness value of the test location can be obtained multiple times using the light sensor, resulting in multiple test brightness values. These multiple test brightness values ​​are then used as the final test brightness value, which helps to obtain a more accurate test brightness value. In one possible embodiment, different test locations can correspond to different test brightness values. For example, a test location at a height of 30 cm corresponds to a test brightness value of 39 lux; a test location at a height of 60 cm corresponds to a test brightness value of 47 lux, etc.

[0100] After acquiring the test brightness value, the electronic device can obtain the calibration coefficient corresponding to the initial gain based on the standard brightness value, the test brightness value, and the initial gain. For example, if the electronic device determines that the standard brightness value is 35 lux, the test brightness value is 39 lux, and the initial gain used by the light sensor is 2, the calibration coefficient can be obtained according to the calculation model. The calibration model can refer to a pre-trained neural network model. By inputting the standard brightness value, the test brightness value, and the initial gain into the calibration model, the model outputs the corresponding calibration coefficient, such as 0.9.

[0101] In one possible embodiment, the light sensor can be equipped with multiple gain modules for different color channels. Each gain module can determine a set of corresponding standard luminance values ​​and test luminance values ​​based on its initial gain. Using the initial gain, standard luminance values, and test luminance values ​​of each gain module, a calibration coefficient corresponding to each initial gain can be obtained. For example, the initial gain of the first gain module is 2, corresponding to a calibration coefficient of 0.9; the initial gain of the second gain module is 4, corresponding to a calibration coefficient of 1.1, and so on. That is, different initial gains can correspond to different calibration coefficients. Here, different initial gains can refer to different initial gains within a single gain module, or different initial gains across different gain modules, etc.

[0102] In this embodiment of the disclosure, a standard brightness detection module is set in a test space with a test light source to obtain the standard brightness value of the test position in the test space. Then, the test brightness value of the test position is obtained through the light sensor of the electronic device. Thus, the calibration coefficient corresponding to the initial gain can be obtained according to the standard brightness value, the test brightness value and the initial gain, and the calibration coefficient can be obtained quickly and accurately.

[0103] In some embodiments, acquiring the test brightness value at the test location via the light sensor of the electronic device includes:

[0104] With the electronic device located within the test space, the gain modules in the optical sensor are controlled to switch between at least one initial gain;

[0105] The reference brightness value collected by the optical sensor in the test space is processed based on at least one of the initial gains to obtain the test brightness value corresponding to each of the initial gains.

[0106] In this embodiment of the disclosure, when the electronic device is located within the test space, the gain modules in the light sensor are controlled to switch between at least one initial gain. For example, the initial gain of the gain module is first controlled to be 2, then the initial gain can be switched to 4, then to 8, and so on. The electronic device can then process the reference brightness value collected by the light sensor within the test space based on at least one initial gain to obtain the test brightness value corresponding to each initial gain. The reference brightness value can refer to the brightness value represented by the light source signal collected by the light sensor, such as a brightness value represented by the signal output by the photodetector in the light sensor of 10 lux.

[0107] After determining the reference brightness value, the electronic device can process the reference brightness value based on the initial gain to obtain the test brightness value corresponding to the initial gain. For example, amplification processing can be performed, that is, each initial gain can be multiplied by its corresponding reference brightness value to obtain the test brightness value. Since the gain module in the optical sensor amplifies the value through a physical amplifier (e.g., an amplification circuit), the theoretically set initial gain is 2, but its actual amplification factor is not 2. Instead, it follows a normal distribution based on 2, so it could be 1.9, 2.1, etc. Therefore, there is an error between the test brightness value obtained by processing the reference brightness value based on the initial gain and the theoretical brightness value. For example, during the test, if the reference brightness value collected by the electronic device's optical sensor is 12 lux, and the initial gain is 2, the obtained test brightness value is 24 lux; if the reference brightness value is 8 lux, and the initial gain is 3, the obtained test brightness value is 24 lux; if the reference brightness value is 6 lux, and the initial gain is 4, the obtained test brightness value is 24 lux, etc. The standard brightness value during the test remains unchanged, such as 25 lux.

[0108] In one possible embodiment, different initial gains can be switched to obtain different corresponding test brightness values. For example, if the reference brightness value collected by the light sensor of the electronic device is 6 lux, the test brightness value corresponding to an initial gain of 2 is 12 lux, the test brightness value corresponding to an initial gain of 4 is 24 lux, and the test brightness value corresponding to an initial gain of 8 is 48 lux, etc.

[0109] In this embodiment of the disclosure, when the electronic device is located in the test space, the gain modules in the light sensor are controlled to switch between at least one initial gain. Then, the reference brightness value collected by the light sensor in the test space is processed based on at least one initial gain to obtain the test brightness value corresponding to each initial gain. This allows the test brightness value to be obtained quickly and accurately.

[0110] In some embodiments, obtaining the calibration coefficient corresponding to each initial gain based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the light sensor includes:

[0111] The standard gain is obtained based on the standard brightness value and the test brightness value;

[0112] Based on the standard gain and each of the initial gains, the calibration coefficients corresponding to each of the initial gains are obtained respectively.

[0113] In this embodiment, the electronic device can obtain a standard gain based on the standard brightness value and the test brightness value. The standard gain can be understood as the factor or coefficient by which the light sensor actually amplifies the light source signal during the process of determining the calibration coefficients, and it can correspond to the initial gain. For example, if the electronic device determines the standard brightness value to be 10 lux and the test brightness value to be 39 lux, then the standard gain can be determined to be 3.9 based on the ratio between the standard brightness value and the test brightness value. After determining the standard gain, the electronic device can obtain the calibration coefficients corresponding to each initial gain based on the ratio between the standard gain and the initial gain. For example, if the electronic device determines the initial gain to be 2, and the corresponding standard gain is 1.9, then the calibration coefficient corresponding to the initial gain of 2 can be determined to be 0.95; if the electronic device determines the initial gain to be 4, and the corresponding standard gain is 4.2, then the calibration coefficient corresponding to the initial gain of 4 can be determined to be 1.05, and so on. In one possible embodiment, the electronic device can also obtain the calibration coefficients corresponding to each initial gain based on the difference between the standard gain and the initial gain. For example, if an electronic device has an initial gain of 8 and a corresponding standard gain of 8.3, then the calibration coefficient for an initial gain of 8 can be determined to be 0.3. If an electronic device has an initial gain of 16 and a corresponding standard gain of 15.8, then the calibration coefficient for an initial gain of 16 can be determined to be -0.2, and so on. Of course, the calibration coefficient can also be determined in other ways, such as by multiplying the initial gain by the standard gain, as long as the calibration coefficient can characterize the correlation between the initial gain and the standard gain. No specific limitations are imposed here.

[0114] In one possible embodiment, the electronic device may also use a preset formula or a trained model to obtain a standard gain based on the standard brightness value and the test brightness value, and to obtain a calibration coefficient corresponding to the initial gain based on the standard gain and the initial gain, etc. This disclosure does not make specific limitations.

[0115] In this embodiment of the disclosure, a standard gain is obtained based on the standard brightness value and the test brightness value. Based on the standard gain and each initial gain, the calibration coefficients corresponding to each initial gain are obtained respectively, which can quickly and accurately determine the calibration coefficients, etc.

[0116] In other embodiments, after obtaining the calibration coefficients corresponding to each initial gain during testing, the electronic device can establish a gain list based on the initial gain, calibration coefficients, and the correspondence between the initial gain and calibration coefficients. This gain list is then stored in the electronic device's memory. For example, the gain list may include a calibration coefficient of 0.95 corresponding to an initial gain of 2, and a calibration coefficient of 1.05 corresponding to an initial gain of 4. During the process of calibrating the initial gain to obtain the target gain, the target gain can be determined using the gain list stored in memory and the initial gain, which helps the electronic device accurately and quickly obtain the target gain.

[0117] In some embodiments, obtaining the standard gain based on the standard brightness value and the test brightness value includes:

[0118] The standard gain is obtained based on the ratio between the standard brightness value and each of the test brightness values.

[0119] In this embodiment of the disclosure, the electronic device can obtain the standard gain based on the ratio between the standard brightness value and each test brightness value. For example, if the electronic device determines that the standard brightness value is 10 lux and the test brightness values ​​are 21 lux and 39 lux, then the standard gains can be determined to be 2.1 and 3.9, respectively.

[0120] In this embodiment of the disclosure, the standard gain is obtained by the ratio between the standard brightness value and each test brightness value, which can improve the accuracy and calculation efficiency of the electronic device in determining the standard gain.

[0121] In some embodiments, obtaining the calibration coefficients corresponding to each initial gain based on the standard gain and each initial gain includes:

[0122] The calibration coefficient corresponding to each initial gain is obtained based on the ratio between the standard gain and each initial gain.

[0123] In this embodiment of the disclosure, the electronic device can obtain the calibration coefficient corresponding to each initial gain based on the ratio between the standard gain and each initial gain. For example, if the electronic device determines that the initial gain is 2 and the corresponding standard gain is 2.2, then the calibration coefficient corresponding to the initial gain of 2 can be determined to be 1.1; if the initial gain is determined to be 4 and the corresponding standard gain is 3.9, then the calibration coefficient corresponding to the initial gain of 4 can be determined to be 0.975, and so on.

[0124] In this embodiment, the calibration coefficient corresponding to each initial gain is obtained by the ratio between the standard gain and each initial gain. This can improve the accuracy and computational efficiency of electronic devices in determining calibration coefficients.

[0125] In some embodiments, calibrating the initial gain according to a pre-stored calibration coefficient in the electronic device to obtain a target gain includes:

[0126] The initial gain is used to query the gain list stored in the memory of the electronic device, and a calibration coefficient that satisfies a preset correlation with the initial gain is determined from the gain list.

[0127] The initial gain is calibrated according to the calibration coefficient that satisfies the preset correlation relationship with the initial gain to obtain the target gain;

[0128] The gain list is generated based on the initial gain, the calibration coefficient, and the correlation between the initial gain and the calibration coefficient.

[0129] In this embodiment, a gain list can be pre-generated based on the initial gain, calibration coefficients, and the correlation between the initial gain and the calibration coefficients. This gain list is then stored in the memory of the electronic device. For example, after obtaining the calibration coefficients during testing, a gain list can be generated based on the initial gain, the calibration coefficients obtained during testing, and the correlation between the initial gain and the calibration coefficients. For instance, the gain list may include a calibration coefficient of 0.95 corresponding to an initial gain of 2, and a calibration coefficient of 1.05 corresponding to an initial gain of 4. Then, when determining the calibration coefficients, the electronic device can query the pre-stored gain list in the memory of the electronic device based on the initial gain to determine the calibration coefficient that satisfies a preset correlation with the initial gain. For example, if the electronic device determines the initial gain to be 16, it can query the gain list to determine the corresponding calibration coefficient as 1.1.

[0130] After determining the calibration coefficients, the electronic device can calibrate the initial gain according to the calibration coefficients that satisfy a preset correlation with the initial gain to obtain the target gain. The target gain can be understood as the actual gain of the signal amplification module in the light sensor during the process of determining the target ambient brightness value. For example, if the electronic device determines the initial gain to be 16 and the calibration coefficient to be 1.1, then the target gain can be determined to be 17.6.

[0131] In this embodiment of the present disclosure, a gain list pre-stored in the memory of an electronic device can be queried according to the initial gain, and a calibration coefficient that satisfies a preset correlation with the initial gain can be determined from the gain list. The initial gain can be calibrated according to the calibration coefficient that satisfies the preset correlation with the initial gain to obtain the target gain, thereby quickly and accurately determining the target gain.

[0132] In some embodiments, determining the initial gain of each gain module in the light sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located via the light sensor includes:

[0133] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the gain modules are controlled to switch between the initial gains according to the signal strength of the output signal of the photodetector of the electronic device.

[0134] The signal strength of the output signal is used to characterize the ambient brightness of the environment in which the electronic device is currently located.

[0135] In this embodiment of the disclosure, during the process of the electronic device acquiring the ambient brightness value of the environment in which the electronic device is located through a light sensor, the gain modules can be controlled to switch between initial gains based on the signal strength of the output signal of the photodetector. The signal strength of the output signal can be used to characterize the ambient brightness of the environment in which the electronic device is currently located. For example, a signal strength of 2 indicates an ambient brightness of 10 lux, and a signal strength of 5 indicates an ambient brightness of 35 lux, etc. For instance, if the electronic device determines that the signal strength of the photodetector's output signal is 3, then the initial gain can be set to 2; if it determines that the signal strength of the photodetector's output signal is 7, then the initial gain can be set to 8, etc. That is, there can be a corresponding relationship between the signal strength of the photodetector's output signal and the initial gain, which can be positive, negative, partially positive, partially negative, etc., and this disclosure does not impose specific limitations.

[0136] In this embodiment, by controlling the switching of each gain module between initial gains based on the signal strength of the output signal of the photodetector of the electronic device during the process of acquiring the ambient brightness value of the environment in which the electronic device is located using a light sensor, the electronic device can ensure that it amplifies the brightness value with the most suitable initial gain. This allows the electronic device to more accurately determine the target ambient brightness value, etc. This prevents the light sensor from being insensitive to weak signals when the ambient brightness is very low, and from having large errors in processing strong signals when the ambient brightness is very high.

[0137] In some embodiments, the method further includes:

[0138] The display brightness of the electronic device's screen is adjusted according to the target ambient brightness value.

[0139] In this embodiment of the disclosure, the electronic device can adjust the display brightness of its screen according to the target ambient brightness value. The electronic device can pre-set the correspondence between the target ambient brightness value and the display brightness, and then determine the current display brightness based on the current target ambient brightness value and the correspondence. For example, if the electronic device determines the target ambient brightness value to be 20 lux, it can adjust the display brightness of its screen to 25 lux. The electronic device can also adjust the display brightness of modules such as the flashlight and pendant light according to the target ambient brightness value.

[0140] In this embodiment of the disclosure, by adjusting the display brightness of the electronic device's screen based on the target ambient brightness value, the accuracy and efficiency of adjusting the display brightness of the electronic device can be improved.

[0141] In one possible embodiment, the brightness processing method of this disclosure can be applied to optimize the function of the light sensor in an electronic device (e.g., a mobile phone). The light sensor in the electronic device first collects light source signals using photodetectors such as diodes (photodiodes), converting ambient light into light source signals in the form of current or voltage. The light sensor can employ multiple photodetectors to detect light source signals in different color channels (e.g., red, green, blue, cyan, etc.). Each channel is equipped with a separate gain module (also called a gain control module) to amplify the brightness value represented by the light source signal. After amplification, the brightness value represented by the light source signal passes through an analog-to-digital converter (ADC) module to convert the type of the light source signal (e.g., from digital to analog). The converted brightness value can then be input into a storage module in the light sensor, such as a register. This allows the ambient light brightness value and other data to be obtained by reading from the storage module.

[0142] In one possible embodiment, when the ambient light brightness is very low (e.g., the current ambient light brightness is less than a preset brightness threshold), if a small initial gain is set (e.g., an initial gain of 2), the target ambient light value obtained after the gain module amplifies the ambient light value collected by the light sensor may be small (e.g., approximately equal to 0). However, the ambient light actually has a certain brightness value, not necessarily 0. Therefore, choosing a small initial gain for amplification will lead to light sensor detection distortion. Therefore, a larger initial gain can be set (e.g., an initial gain of 64). When the current ambient light brightness is low, the target ambient light value determined after amplification by the gain module with a larger initial gain will be more accurate. Similarly, when the ambient light brightness is high (e.g., the current ambient light brightness is greater than or equal to a preset brightness threshold), setting a large initial gain will lead to light sensor saturation (i.e., the data value stored in the storage module exceeds the maximum value), which may also lead to light sensor detection distortion. Therefore, a smaller initial gain can be set in this case. In some embodiments, the initial gain can be selected between 2 and 2047 (i.e., powers of 2).

[0143] In related technologies, optical sensors are pre-set with an initial gain after leaving the factory. Internally, the optical sensor uses a physical amplifier (such as a current or voltage amplifier circuit) to amplify the signal from the gain module. The initial gain can be an integer power of 2, such as 2, 4, 8...2048. Assuming the initial gain of the optical sensor is G, and the ambient brightness value collected by the sensor is X, the target ambient brightness value Lux can be calculated as: Lux = X / G. If the initial gain provided by the optical sensor is used directly to calculate the target ambient brightness value, for example, if the initial gain is set to 2, the target ambient brightness value can be calculated as: Lux = X / 2. However, since the amplification process of the gain module uses a physical amplifier, the actual gain (i.e., the target gain) is not 2, but rather a normal distribution based on 2, so it could be 1.9, 2.1, etc. Because there is an error between the actual gain and the preset initial gain in the process of determining the target ambient brightness value, there is an error between the calculated target ambient brightness Lux value and the actual ambient brightness value. When adjusting the display brightness of the electronic device's screen according to the target ambient brightness, errors will occur, reducing the user experience.

[0144] In one possible embodiment, a test light source (e.g., a light source stabilization box) can be set up in the factory where electronic devices (e.g., mobile phones) are manufactured. A specific standard brightness value (i.e., the light box brightness) is selected, and a standard brightness detection module (e.g., a precision lux meter) is used to read the standard brightness value, assuming it is Lux1. The mobile phone is placed in the light source stabilization box, replacing the precision lux meter. A fixture is used to position the mobile phone at a height equal to that of the precision lux meter (i.e., the test position). The mobile phone is set to switch to different initial gains, and its output ambient brightness Luxg (i.e., the test brightness value) is read. The actual amplification factor (i.e., the standard gain) corresponding to the initial gain can then be calculated. The standard gain can be expressed as: Gain = Luxg / Lux1. From this, the standard gain corresponding to the initial gain can be obtained. Then, calibration coefficients are generated based on the initial gain and the standard gain, and a gain list is generated based on the initial gain and the calibration coefficients. The generated gain list is then written into the memory of the electronic device. In the subsequent process of determining the target ambient brightness value, the calibration coefficients of the gain list can be used to calibrate the initial gain, thereby determining the target ambient brightness value.

[0145] In other embodiments, after obtaining the standard gain corresponding to the initial gain, a gain table can be generated based on the initial gain, the standard gain, and the correspondence between the initial gain and the standard gain. The generated gain table is then written into the memory of the electronic device. In the subsequent process of determining the target ambient brightness value, the standard gain from the gain table can be used to determine the target ambient brightness value. In one possible embodiment, during the determination of the standard gain, the test light source can be periodically checked to ensure stable output from the test light source.

[0146] The technical solution disclosed herein enables the determination of the initial gain of each gain module in the optical sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located. Then, the initial gain can be calibrated according to a calibration coefficient to obtain the target gain. This target gain allows for the processing of the ambient brightness value acquired by the optical sensor to obtain a more accurate target ambient brightness value. By calibrating the initial gain before processing the ambient brightness value acquired by the optical sensor, this disclosure improves the accuracy of the obtained ambient brightness value.

[0147] Figure 3 This is a block diagram illustrating a brightness processing apparatus according to an exemplary embodiment. Figure 3 As shown, the device is applied to an electronic device with a light sensor, and the brightness processing device 300 mainly includes:

[0148] The determination module 301 is configured to determine the initial gain of each gain module in the light sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor.

[0149] The calibration module 302 is configured to calibrate the initial gain according to the calibration coefficients pre-stored in the electronic device to obtain the target gain;

[0150] The processing module 303 is configured to process the ambient brightness value collected by the light sensor according to the target gain to obtain the target ambient brightness value.

[0151] In some embodiments, the device 300 further includes:

[0152] The first acquisition module is configured to acquire the standard brightness value of the test position in the test space by using a standard brightness detection module set in the test space with a test light source;

[0153] The second acquisition module is configured to acquire the test brightness value at the test location through the light sensor of the electronic device;

[0154] The module is configured to obtain calibration coefficients corresponding to each initial gain based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the light sensor.

[0155] In some embodiments, the second acquisition module is configured to:

[0156] With the electronic device located within the test space, the gain modules in the optical sensor are controlled to switch between at least one initial gain;

[0157] The reference brightness value collected by the optical sensor in the test space is processed based on at least one of the initial gains to obtain the test brightness value corresponding to each of the initial gains.

[0158] In some embodiments, the obtaining module is configured as follows:

[0159] The standard gain is obtained based on the standard brightness value and the test brightness value;

[0160] Based on the standard gain and each of the initial gains, the calibration coefficients corresponding to each of the initial gains are obtained respectively.

[0161] In some embodiments, the obtaining module is configured as follows:

[0162] The standard gain is obtained based on the ratio between the standard brightness value and each of the test brightness values.

[0163] In some embodiments, the obtaining module is configured as follows:

[0164] The calibration coefficient corresponding to each initial gain is obtained based on the ratio between the standard gain and each initial gain.

[0165] In some embodiments, the calibration module 302 is configured as follows:

[0166] The initial gain is used to query the gain list stored in the memory of the electronic device, and a calibration coefficient that satisfies a preset correlation with the initial gain is determined from the gain list.

[0167] The initial gain is calibrated according to the calibration coefficient that satisfies the preset correlation relationship with the initial gain to obtain the target gain;

[0168] The gain list is generated based on the initial gain, the calibration coefficient, and the correlation between the initial gain and the calibration coefficient.

[0169] In some embodiments, the determining module 301 is configured to:

[0170] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the gain modules are controlled to switch between the initial gains according to the signal strength of the output signal of the photodetector of the electronic device.

[0171] The signal strength of the output signal is used to characterize the ambient brightness of the environment in which the electronic device is currently located.

[0172] In some embodiments, the device 300 further includes:

[0173] The adjustment module is configured to adjust the display brightness of the electronic device's screen based on the target ambient brightness value.

[0174] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0175] Figure 4 This is a hardware structure block diagram illustrating a brightness processing device according to an exemplary embodiment. For example, device 400 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0176] Reference Figure 4The device 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.

[0177] Processing component 402 typically controls the overall operation of device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0178] Memory 404 is configured to store various types of data to support the operation of device 400. Examples of such data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0179] Power supply component 406 provides power to various components of device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 400.

[0180] Multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0181] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0182] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0183] Sensor assembly 414 includes one or more sensors for providing status assessments of various aspects of device 400. For example, sensor assembly 414 may detect the on / off state of device 400, the relative positioning of components such as the display and keypad of device 400, changes in the position of device 400 or a component of device 400, the presence or absence of user contact with device 400, the orientation or acceleration / deceleration of device 400, and temperature changes of device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0184] Communication component 416 is configured to facilitate wired or wireless communication between device 400 and other devices. Device 400 can access wireless networks based on communication standards, such as Wi-Fi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0185] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0186] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of the device 400 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0187] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a luminance processing device, enables the luminance processing device to perform a luminance processing method applied to an electronic device having a light sensor, comprising:

[0188] During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the optical sensor, the initial gain of each gain module in the optical sensor is determined;

[0189] The initial gain is calibrated according to the calibration coefficients pre-stored in the electronic device to obtain the target gain;

[0190] The ambient brightness value collected by the optical sensor is processed according to the target gain to obtain the target ambient brightness value.

[0191] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0192] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A brightness processing method, characterized in that, Applied to an electronic device having a light sensor, the method includes: A standard brightness detection module is set up in a test space with a test light source to obtain the standard brightness value of the test position in the test space. The test brightness value at the test location is obtained through the light sensor of the electronic device. During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the optical sensor, the initial gain of each gain module in the optical sensor is determined; Based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the optical sensor, the calibration coefficient corresponding to each initial gain is obtained; The initial gain is calibrated according to the calibration coefficient corresponding to the initial gain to obtain the target gain; The ambient brightness value collected by the optical sensor is processed according to the target gain to obtain the target ambient brightness value.

2. The method according to claim 1, characterized in that, The step of acquiring the test brightness value at the test location using the light sensor of the electronic device includes: With the electronic device located within the test space, the gain modules in the optical sensor are controlled to switch between at least one initial gain; The reference brightness value collected by the optical sensor in the test space is processed based on at least one of the initial gains to obtain the test brightness value corresponding to each of the initial gains.

3. The method according to claim 1, characterized in that, The calibration coefficients corresponding to each initial gain are obtained based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the optical sensor, including: The standard gain is obtained based on the standard brightness value and the test brightness value; Based on the standard gain and each of the initial gains, the calibration coefficients corresponding to each of the initial gains are obtained respectively.

4. The method according to claim 3, characterized in that, The step of obtaining the standard gain based on the standard brightness value and the test brightness value includes: The standard gain is obtained based on the ratio between the standard brightness value and each of the test brightness values.

5. The method according to claim 3, characterized in that, The step of obtaining the calibration coefficients corresponding to each initial gain based on the standard gain and each initial gain includes: The calibration coefficient corresponding to each initial gain is obtained based on the ratio between the standard gain and each initial gain.

6. The method according to claim 1, characterized in that, The step of calibrating the initial gain according to the calibration coefficient corresponding to the initial gain to obtain the target gain includes: The initial gain is used to query the gain list stored in the memory of the electronic device, and a calibration coefficient that satisfies a preset correlation with the initial gain is determined from the gain list. The initial gain is calibrated according to the calibration coefficient that satisfies the preset correlation relationship with the initial gain to obtain the target gain; The gain list is generated based on the initial gain, the calibration coefficient, and the correlation between the initial gain and the calibration coefficient.

7. The method according to claim 1, characterized in that, The process of determining the initial gain of each gain module in the light sensor during the acquisition of the ambient brightness value of the environment in which the electronic device is located includes: During the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor, the gain modules are controlled to switch between the initial gains according to the signal strength of the output signal of the photodetector of the electronic device. The signal strength of the output signal is used to characterize the ambient brightness of the environment in which the electronic device is currently located.

8. The method according to claim 1, characterized in that, The method further includes: The display brightness of the electronic device's screen is adjusted according to the target ambient brightness value.

9. A brightness processing device, characterized in that, An electronic device having a light sensor, the device comprising: The first acquisition module is configured to acquire the standard brightness value of the test position in the test space by means of a standard brightness detection module set in the test space with a test light source; The second acquisition module is configured to acquire the test brightness value at the test location through the light sensor of the electronic device; The determination module is configured to determine the initial gain of each gain module in the light sensor during the process of acquiring the ambient brightness value of the environment in which the electronic device is located through the light sensor. The module is configured to obtain calibration coefficients corresponding to each initial gain based on the standard brightness value, the test brightness value, and the initial gain of each gain module in the light sensor. The calibration module is configured to calibrate the initial gain according to the calibration coefficient corresponding to the initial gain to obtain the target gain; The processing module is configured to process the ambient brightness value collected by the light sensor according to the target gain to obtain the target ambient brightness value.

10. A brightness processing device, characterized in that, include: processor; Memory configured to store processor-executable instructions; The processor is configured to implement the steps of any one of the brightness processing methods in claims 1 to 8 during execution.

11. A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a luminance processing apparatus, the apparatus is enabled to perform the steps of any of the luminance processing methods of claims 1 to 8.

Citation Information

Patent Citations

  • Device and method of adjusting electromagnetic radiation transmitted by an optical element

    CA2779012A1

  • The method of calibration of photon sensor pixel array by evaluating its characteristic

    KR1020160144692A

  • Electronic device including illuminance sensor

    US20230118391A1