CN107941330B - Ambient light intensity detection method and device, storage medium and electronic equipment - Google Patents

Ambient light intensity detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107941330B
CN107941330B CN201711174645.7A CN201711174645A CN107941330B CN 107941330 B CN107941330 B CN 107941330B CN 201711174645 A CN201711174645 A CN 201711174645A CN 107941330 B CN107941330 B CN 107941330B
Authority
CN
China
Prior art keywords
light intensity
value
ambient light
rgb
spectrum information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711174645.7A
Other languages
Chinese (zh)
Other versions
CN107941330A (en
Inventor
张海平
周意保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711174645.7A priority Critical patent/CN107941330B/en
Publication of CN107941330A publication Critical patent/CN107941330A/en
Application granted granted Critical
Publication of CN107941330B publication Critical patent/CN107941330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The embodiment of the application provides an ambient light intensity detection method and device, a storage medium and electronic equipment. The method for detecting the intensity of the ambient light comprises the following steps: acquiring an ambient light intensity detection value; determining RGB spectrum information of the detected light; acquiring a target light intensity value of target light matched with RGB spectrum information of a sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen; and adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.

Description

Ambient light intensity detection method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a method and an apparatus for detecting ambient light intensity, a storage medium, and an electronic device.
Background
With the rapid development of electronic technology, electronic devices such as smart phones and tablet computers have become more and more popular. Electronic equipment such as smart phones and tablet computers are provided with display screens.
In general, an ambient light sensor is disposed in a non-display area of an upper portion of a display screen. The electronic equipment automatically adjusts the brightness of the display screen according to the intensity of the ambient light detected by the ambient light sensor, so that the brightness of the display screen is adaptive to the environment.
Disclosure of Invention
The embodiment of the application provides an ambient light intensity detection method and device, a storage medium and an electronic device, which can improve the accuracy of detecting the ambient light intensity.
The embodiment of the application provides an ambient light intensity detection method, which comprises the following steps:
acquiring an ambient light intensity detection value;
determining RGB spectrum information of the detected light;
acquiring a target light intensity value of target light matched with RGB spectrum information of a sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen;
and adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value.
The embodiment of the present application further provides an ambient light intensity detection device, including:
the first acquisition module is used for acquiring an ambient light intensity detection value;
the determining module is used for determining RGB frequency spectrum information of the detected light;
the second acquisition module is used for acquiring a target light intensity value of target light matched with the RGB spectrum information of the sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen;
and the adjusting module is used for adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value.
An embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above-mentioned ambient light intensity detection method.
The embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the above-mentioned ambient light intensity detection method by calling the computer program stored in the memory.
The method for detecting the intensity of the ambient light provided by the embodiment of the application comprises the following steps: acquiring an ambient light intensity detection value; determining RGB spectrum information of the detected light; acquiring a target light intensity value of target light matched with RGB spectrum information of a sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen; and adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 2 is a schematic flowchart of a method for detecting ambient light intensity according to an embodiment of the present disclosure.
Fig. 3 is a schematic view of an application scenario of the ambient light intensity detection method according to the embodiment of the present application.
Fig. 4 is another schematic flow chart of the method for detecting ambient light intensity according to the embodiment of the present application.
Fig. 5 is a schematic structural diagram of a first ambient light intensity detection apparatus according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a second structure of an ambient light intensity detection apparatus according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a third configuration of an ambient light intensity detection apparatus according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a fourth structure of an ambient light intensity detection apparatus according to an embodiment of the present application.
Fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 10 is a schematic structural diagram of an electronic device provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
The terms "first," "second," "third," and the like in the description and in the claims of the present application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, or apparatus, electronic device, system comprising a list of steps is not necessarily limited to those steps or modules or units explicitly listed, may include steps or modules or units not explicitly listed, and may include other steps or modules or units inherent to such process, method, apparatus, electronic device, or system.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 100 includes a cover plate 10, a display 20, a circuit board 30, a housing 40, and an ambient light sensor 50 mounted inside the housing 40.
The cover plate 10 is mounted to the display screen 20 to cover the display screen 20. The cover plate 10 may be a transparent glass cover plate. In some embodiments, the cover plate 10 may be a glass cover plate made of a material such as sapphire.
The display screen 20 is mounted on the housing 40 to form a display surface of the electronic device 100. In some embodiments, the display screen 20 includes a display area and a non-display area. The display area is used for displaying information such as images and texts. The non-display area does not display information. The non-display area can be used for setting some functional components, such as functional components of a camera, a fingerprint identification module and the like.
In some embodiments, the display screen 20 may be displayed full screen. That is, the display screen 20 includes only display regions and does not include non-display regions.
In some embodiments, the Display 20 may be a Liquid Crystal Display (LCD) or an Organic Light-Emitting Diode (OLED) Display.
The circuit board 30 is mounted inside the housing 40. The circuit board 30 may be a motherboard of the electronic device 100. Functional components such as a camera and a processor may be integrated on the circuit board 30. Meanwhile, the display screen 20 may be electrically connected to the circuit board 30.
In some embodiments, display control circuitry is disposed on the circuit board 30. The display control circuit outputs an electrical signal to the display screen 20 to control the display screen 20 to display information.
The housing 40 is used to form the outer contour of the electronic device 100. The housing 40 may be made of plastic or metal. The housing 40 may be integrally formed.
An ambient light sensor 50 is mounted inside the housing 40. Meanwhile, the ambient light sensor 50 is electrically connected to the circuit board 30. For example, the ambient light sensor 50 may be integrated on the circuit board 30. The ambient light sensor 50 is used for detecting the intensity of the ambient light, so that the electronic device 100 can adjust the brightness of the display screen 20 according to the intensity of the ambient light detected by the ambient light sensor 50, so that the brightness of the display screen 20 is adapted to the surrounding environment. For example, in a darker environment, the electronic device 100 may reduce the brightness of the display screen 20; in brighter environments, the electronic device 100 may increase the brightness of the display screen 20.
In the embodiment of the present application, the ambient light sensor 50 may be located below the display area of the display screen 20. That is, the orthographic projection of the ambient light sensor 50 on the display screen 20 is located at the display area of the display screen 20. It will be appreciated that the ambient light sensor 50 now collects ambient light from the outside through the display screen 20 to achieve sensing of ambient light intensity. That is, external ambient light enters the ambient light sensor 50 through the display area of the display screen 20.
In one embodiment, an ambient light intensity detection method is provided, which can be applied in an electronic device. The electronic device may include a smart phone, a tablet computer, and the like. As shown in fig. 2, the ambient light intensity detecting method may include the following steps:
101. and acquiring an ambient light intensity detection value.
Wherein, be provided with ambient light sensor in the electronic equipment. The ambient light sensor is located below a display screen of the electronic device. Ambient light enters the ambient light sensor through the display screen. Thus, the ambient light sensor may detect the intensity of ambient light through the display screen. The electronic device may acquire an ambient light intensity detection value detected by the ambient light sensor.
It should be noted that, since the ambient light is visible light, the ambient light sensor detects the intensity of the visible light. The display screen can emit light, and the light emitted by the display screen is also visible light. Therefore, the light emitted from the display screen may affect the detection data of the ambient light sensor, so that the intensity of the ambient light detected by the ambient light sensor is larger than the actual intensity of the ambient light. Therefore, the ambient light intensity detection value acquired by the electronic device is not the actual ambient light intensity value.
102. RGB spectral information of the detected light is determined.
In a specific implementation process, a color sensor (colorsensor) may be installed inside the electronic device, and RGB spectrum information of the detected light may be identified through a color sensing function of the colorsensor.
103. And acquiring a target light intensity value of the target light matched with the RGB spectrum information of the sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen.
Regardless of the light source of the display screen, the display screen is composed of RGB three primary colors, and the proportions of the three primary colors are different. Therefore, after determining the RGB spectrum information of the detected light, the electronic device may compare the determined RGB spectrum information with the sample RGB spectrum information, determine a target light from the detected light, and obtain the light intensity values of the RGB three primary colors in the target light as the target light intensity value.
In some embodiments, a color sensor matched with the RGB spectrum information of the display screen may be installed inside the electronic device, and then the RGB light intensity value may be measured using the color sensor. Assuming that the spectral wavelength range of R of the display screen is 615+/-2.5nm, the spectral wavelength range of G is 535+/-2.5nm, and the spectral wavelength range of B is 465+/-2.5nm, the colorsensor installed can only detect light of the spectral wavelength range shown, but other wavelengths cannot detect, such as 550 nm.
104. And adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value.
After the electronic device obtains the target light intensity value, the environmental light intensity detection value can be adjusted according to the target light intensity value to obtain an environmental light intensity value. After the electronic equipment adjusts the ambient light intensity detection value, the influence of light emitted when the display screen displays information on the finally obtained ambient light intensity value can be reduced or even eliminated, so that the finally obtained ambient light intensity value is matched with the actual ambient light intensity. Therefore, when the electronic equipment adjusts the brightness of the display screen according to the ambient light intensity value, the adjustment of the brightness of the display screen can be more accurate, and the brightness of the display screen is better adapted to the ambient environment. For example, as shown in fig. 3, after obtaining the ambient light intensity value, the electronic device adjusts the brightness of the display screen according to the actual situation to decrease (or increase) the brightness of the display screen.
As can be seen from the above, in the ambient light intensity detection method provided in the embodiment of the present application, the ambient light intensity detection value is obtained, then the RGB spectrum information of the detected light is determined, and then the target light intensity value of the target light matched between the RGB spectrum information and the sample RGB spectrum information is obtained, where the sample RGB spectrum information is the RGB spectrum information of the display screen, and the ambient light intensity detection value is adjusted according to the target light intensity value, so as to obtain the ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.
In some embodiments, another ambient light intensity detection method is provided and applied to an electronic device. The electronic device may include a smart phone, a tablet computer, and the like. As shown in fig. 4, the ambient light intensity detecting method may include the following steps:
201. and acquiring an ambient light intensity detection value.
Wherein, be provided with ambient light sensor in the electronic equipment. The ambient light sensor is located below a display screen of the electronic device. Ambient light enters the ambient light sensor through the display screen. Thus, the ambient light sensor may detect the intensity of ambient light through the display screen. The electronic device may acquire an ambient light intensity detection value detected by the ambient light sensor.
It should be noted that, since the ambient light is visible light, the ambient light sensor detects the intensity of the visible light. The display screen can emit light, and the light emitted by the display screen is also visible light. Therefore, the light emitted from the display screen may affect the detection data of the ambient light sensor, so that the intensity of the ambient light detected by the ambient light sensor is larger than the actual intensity of the ambient light. Therefore, the ambient light intensity detection value acquired by the electronic device is not the actual ambient light intensity value.
202. RGB spectral information of the detected light is determined, the RGB spectral information including RGB frequency values.
In a specific implementation process, the colorsensor may be installed inside the electronic device, and RGB spectrum information of the detected light, such as frequency and wavelength of the detected light, may be identified through a color sensing function of the colorsensor.
203. And acquiring RGB spectrum information of the display screen, wherein the sample RGB spectrum information comprises a sample RGB frequency interval.
Regardless of the light source of the display screen, the display screen is composed of RGB three primary colors, and the proportions of the three primary colors are different. Typically, the RGB spectral information of the display screen is fixed and can radiate RGB light at a specific frequency or wavelength, for example, R of the display screen may have a spectral wavelength range of 615+/-2.5nm, G of the display screen may have a spectral wavelength range of 535+/-2.5nm, B of the display screen may have a spectral wavelength range of 465+/-2.5nm, etc.
In nature, the spectrum information of visible light can refer to table 1:
TABLE 1
Name (R) Wavelength (nm) Frequency (MHZ)
Purple light 400~435 680~790
Blue light 450~480 620~680
Blue light 480~490 600~620
Green light 500~560 530~600
Yellow light 580~595 510~520
Orange light 595~605 480~510
Red light 605~700 405~480
Therefore, a color sensor matched with the RGB spectrum information of the display screen may be installed inside the electronic device, and then the RGB light intensity values of the detected light may be measured using the color sensor.
204. Judging whether the RGB frequency value is in a sample RGB frequency interval or not; if yes, go to step 205, otherwise, end the process.
Specifically, the obtained RGB frequency value is compared with a sample RGB frequency interval of the display screen, and it is determined whether the RGB frequency value is within the sample RGB frequency interval.
205. And acquiring the light intensity value of the target light corresponding to the RGB frequency value to obtain the target light intensity value.
Assume that there is a sample RGB frequency bin: r [412.5, 417.5], G [562.5, 567.5], B [632.5, 637.5] in MHZ. Then, the light intensity of the detected light with a frequency within any frequency interval of RGB can be obtained, and the obtained light intensities are superimposed to obtain the target light intensity value.
206. And adjusting the ambient light intensity detection value based on the target light intensity value to obtain an ambient light intensity value.
In the embodiment of the present application, there may be a plurality of ways to adjust the ambient light intensity detection value based on the target light intensity value. Such as:
in some embodiments, the step of "adjusting the ambient light intensity detection value based on the target light intensity value to obtain the ambient light intensity value" may include the following processes:
calculating the difference value between the ambient light intensity detection value and the target light intensity value;
an ambient light intensity value is determined from the difference.
In some embodiments, the difference may be directly used as the ambient light intensity value.
In practical applications, since the external ambient light may also have RGB light rays having the same spectrum information as the display screen, the external ambient light is also sensed by a color sensor which is dedicated to receive only the RGB light source of the display screen. Therefore, directly using the difference as the finally obtained ambient light intensity results in a smaller value than the actual ambient light intensity value. Thus, in some embodiments, the step of "determining the ambient light intensity value from said difference" may comprise the following procedure:
acquiring a preset first adjusting coefficient;
and calculating to obtain the ambient light intensity value according to the first adjusting coefficient and the difference value.
In practical application, the RGB with the same frequency spectrum of the display screen generally accounts for a certain proportion of the whole ambient light, and is a fixed value, and can be specifically set to be about 5%. Assuming that the difference is S and the first adjustment coefficient is X, the calculation formula of the ambient light intensity value may be: s (1+ X).
In some embodiments, the step of "adjusting the ambient light intensity detection value based on the target light intensity value to obtain the ambient light intensity value" may include the following processes:
acquiring a preset second adjusting coefficient;
calculating the product of the second adjustment coefficient and the target light intensity value to obtain a light intensity adjustment value;
and adjusting the ambient light intensity detection value according to the light intensity adjustment value to obtain an ambient light intensity value.
Similarly, the ambient light intensity detection value includes a light intensity value of a light emitting line of the display screen, and the target light intensity value detected by the colorsensor may include a light intensity value of a portion of ambient light in the external ambient light, so that the detected target light intensity value needs to be optimized to obtain a more accurate ambient light intensity adjustment value.
Specifically, if the ambient light intensity detection value is D, the second adjustment coefficient is Y, and the target light intensity value is Z, the calculation formula of the ambient light intensity value may be: d- (Y x Z). Wherein, the value of Y is determined according to the ratio of Z to D.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, in the ambient light intensity detection method provided in the embodiment of the present application, the ambient light intensity detection value is obtained, then the RGB spectrum information of the detected light is determined, and then the target light intensity value of the target light matched between the RGB spectrum information and the sample RGB spectrum information is obtained, where the sample RGB spectrum information is the RGB spectrum information of the display screen, and the ambient light intensity detection value is adjusted according to the target light intensity value, so as to obtain the ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.
The embodiment of the application further provides an ambient light intensity detection device, the ambient light intensity detection device can be integrated in the electronic equipment, and the electronic equipment can be equipment such as a smart phone and a tablet computer.
As shown in fig. 5, the ambient light intensity detection apparatus 300 may include: a first obtaining module 31, a determining module 32, a second obtaining module 33, and an adjusting module 34, wherein:
a first obtaining module 31, configured to obtain an ambient light intensity detection value;
a determining module 32 for determining RGB spectrum information of the detected light;
the second obtaining module 33 is configured to obtain a target light intensity value of the target light matched between the RGB spectrum information and the sample RGB spectrum information, where the sample RGB spectrum information is RGB spectrum information of the display screen;
and the adjusting module 34 is configured to adjust the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value.
In some embodiments, the RGB spectral information comprises RGB frequency values, the sample RGB spectral information comprises a sample RGB frequency interval; referring to fig. 6, the second obtaining module 33 may include:
the judging submodule 331 is configured to judge whether the RGB frequency value is within the sample RGB frequency interval;
the first obtaining submodule 332 is configured to obtain a light intensity value of the target light corresponding to the RGB frequency value if the determination submodule determines that the determination result is yes, so as to obtain a target light intensity value.
In some embodiments, referring to fig. 7, the adjusting 34 may comprise:
a first calculating submodule 341, configured to calculate a difference between the ambient light intensity detection value and the target light intensity value;
a determination sub-module 342 is used for determining the ambient light intensity value based on the difference.
In some embodiments, the determination sub-module 342 may further be configured to:
acquiring a preset first adjusting coefficient;
and calculating to obtain the ambient light intensity value according to the first adjusting coefficient and the difference value.
In some embodiments, referring to fig. 8, the adjustment module 34 may include:
the second obtaining sub-module 343 is configured to obtain a preset second adjustment coefficient;
a second calculating submodule 344, configured to calculate a product of the second adjustment coefficient and the target light intensity value to obtain a light intensity adjustment value;
the adjusting submodule 345 is configured to adjust the ambient light intensity detection value according to the light intensity adjustment value to obtain an ambient light intensity value.
As can be seen from the above, the ambient light intensity detection device provided in the embodiment of the present application obtains the ambient light intensity detection value, then determines the RGB spectrum information of the detected light, and then obtains the target light intensity value of the target light, where the RGB spectrum information matches the sample RGB spectrum information, where the sample RGB spectrum information is the RGB spectrum information of the display screen, and adjusts the ambient light intensity detection value according to the target light intensity value, so as to obtain the ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.
The embodiment of the application also provides the electronic equipment. The electronic device can be a smart phone, a tablet computer and the like. As shown in fig. 9, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions:
acquiring an ambient light intensity detection value;
determining RGB spectrum information of the detected light;
acquiring a target light intensity value of target light matched with RGB spectrum information of a sample, wherein the RGB spectrum information of the sample is the RGB spectrum information of the display screen;
and adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value.
In some embodiments, the RGB spectral information comprises RGB frequency values, the sample RGB spectral information comprising a sample RGB frequency interval; when obtaining the target light intensity value of the target light matched with the RGB spectrum information and the sample RGB spectrum information, the processor 401 executes the following steps:
judging whether the RGB frequency value is in a sample RGB frequency interval or not;
if so, acquiring the light intensity value of the target light corresponding to the RGB frequency value to obtain the target light intensity value.
In some embodiments, when the ambient light intensity detection value is adjusted according to the target light intensity value to obtain an ambient light intensity value, the processor 401 may be configured to perform the following steps:
calculating the difference value between the environment light intensity detection value and the target light intensity value;
an ambient light intensity value is determined from the difference.
In some embodiments, when determining the ambient light intensity value from the difference, the processor 401 may be configured to perform the following steps:
acquiring a preset first adjusting coefficient;
and calculating to obtain the ambient light intensity value according to the first adjusting coefficient and the difference value.
In some embodiments, when the ambient light intensity detection value is adjusted according to the target light intensity value to obtain an ambient light intensity value, the processor 401 may be configured to perform the following steps:
acquiring a preset second adjusting coefficient;
calculating the product of the second adjusting coefficient and the target light intensity value to obtain a light intensity adjusting value;
and adjusting the ambient light intensity detection value according to the light intensity adjustment value to obtain an ambient light intensity value.
Memory 402 may be used to store computer programs and data. The memory 402 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 401 executes various functional applications and data processing by calling a computer program stored in the memory 402.
In some embodiments, as shown in fig. 10, electronic device 400 further comprises: radio frequency circuit 403, display 404, control circuit 405, input unit 406, audio circuit 407, sensor 408, and power supply 409. The processor 401 is electrically connected to the radio frequency circuit 403, the display 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409.
The radio frequency circuit 403 is used for transceiving radio frequency signals to communicate with a network device or other electronic devices through wireless communication.
The display screen 404 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 405 is electrically connected to the display screen 404, and is configured to control the display screen 404 to display information.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 406 may include a fingerprint recognition module.
The audio circuit 407 may provide an audio interface between the user and the electronic device through a speaker, microphone.
The sensor 408 is used to collect external environmental information. The sensors 408 may include one or more of ambient light sensors, acceleration sensors, gyroscopes, etc.
The power supply 409 is used to power the various components of the electronic device 400. In some embodiments, the power source 409 may be logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
Although not shown in fig. 10, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
Therefore, the embodiment of the application provides an electronic device, which obtains an ambient light intensity detection value, then determines RGB spectrum information of the detected light, and then obtains a target light intensity value of the target light, where the RGB spectrum information matches with the sample RGB spectrum information, where the sample RGB spectrum information is the RGB spectrum information of the display screen, and adjusts the ambient light intensity detection value according to the target light intensity value to obtain the ambient light intensity value. In the scheme, the electronic equipment can acquire corresponding data according to the RGB frequency spectrum information of the display screen to adjust the detection value of the ambient light sensor, so that the influence of light generated by the display screen to the intensity of ambient light detected by the electronic equipment is reduced, and the accuracy of the intensity of the ambient light is improved.
The present application further provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer executes the ambient light intensity detection method according to any one of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The method, the apparatus, the storage medium, and the electronic device for detecting ambient light intensity provided by the embodiments of the present application are described in detail above, and a specific example is applied in the description to explain the principles and the embodiments of the present application, and the description of the embodiments is only used to help understanding the method and the core concept of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (6)

1. An ambient light intensity detection method applied to electronic equipment is characterized by comprising the following steps:
acquiring an ambient light intensity detection value;
determining RGB spectrum information of the detected light; wherein the detected light comprises ambient light and display screen light;
acquiring a target light intensity value of target light matched with sample RGB spectrum information in the detected light, wherein the sample RGB spectrum information is RGB spectrum information of the display screen; the target light is light matched with the RGB frequency spectrum information of the sample in the whole light consisting of the ambient light and the display screen light;
adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value; the method specifically comprises the following steps: calculating the difference value between the environment light intensity detection value and the target light intensity value; acquiring a preset first adjusting coefficient; calculating to obtain the ambient light intensity value according to the first adjustment coefficient and the difference value; the ambient light intensity value is obtained by calculating S (1+ X), wherein S is a difference value between the ambient light intensity detection value and the target light intensity value, and X is a first adjusting coefficient; or acquiring a preset second adjusting coefficient; calculating the product of the second adjustment coefficient and the target light intensity value to obtain a light intensity adjustment value; adjusting the ambient light intensity detection value according to the light intensity adjustment value to obtain an ambient light intensity value; and the value of the second adjusting coefficient is determined according to the ratio of the target light intensity value to the ambient light intensity detection value.
2. The method of detecting ambient light intensity according to claim 1, wherein the RGB spectrum information includes RGB frequency values, and the sample RGB spectrum information includes a sample RGB frequency interval;
the method for obtaining the target light intensity value of the target light matched with the RGB spectrum information of the sample comprises the following steps:
judging whether the RGB frequency value is in a sample RGB frequency interval or not;
if so, acquiring the light intensity value of the target light corresponding to the RGB frequency value to obtain the target light intensity value.
3. An ambient light intensity detecting device, comprising:
the first acquisition module is used for acquiring an ambient light intensity detection value;
the determining module is used for determining RGB frequency spectrum information of the detected light; wherein the detected light comprises ambient light and display screen light;
the second acquisition module is used for acquiring a target light intensity value of a target light ray of the display screen, wherein the RGB spectrum information in the detected light ray is matched with the sample RGB spectrum information, and the sample RGB spectrum information is the RGB spectrum information of the display screen; the target light is light matched with the RGB frequency spectrum information of the sample in the whole light consisting of the ambient light and the display screen light;
the adjusting module is used for adjusting the ambient light intensity detection value according to the target light intensity value to obtain an ambient light intensity value;
wherein the adjustment module comprises:
the first calculation submodule is used for calculating the difference value between the ambient light intensity detection value and the target light intensity value;
the determining submodule is used for acquiring a preset first adjusting coefficient; calculating to obtain the ambient light intensity value according to the first adjustment coefficient and the difference value; the ambient light intensity value is obtained by calculating S (1+ X), wherein S is a difference value between the ambient light intensity detection value and the target light intensity value, and X is a first adjusting coefficient;
or, the adjusting module includes:
the second obtaining submodule is used for obtaining a preset second adjusting coefficient; the value of the second adjusting coefficient is determined according to the ratio of the target light intensity value to the ambient light intensity detection value;
the second calculation submodule is used for calculating the product of the second adjustment coefficient and the target light intensity value so as to obtain a light intensity adjustment value;
and the adjusting submodule is used for adjusting the ambient light intensity detection value according to the light intensity adjusting value so as to obtain an ambient light intensity value.
4. The ambient light intensity detecting device according to claim 3, wherein the RGB spectrum information includes RGB frequency values, and the sample RGB spectrum information includes a sample RGB frequency interval;
the second acquisition module includes:
the judgment submodule is used for judging whether the RGB frequency value is in a sample RGB frequency interval or not;
and the first obtaining submodule is used for obtaining the light intensity value of the target light corresponding to the RGB frequency value if the judgment submodule judges that the target light intensity value is positive, so as to obtain the target light intensity value.
5. A storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the ambient light intensity detection method of claim 1 or 2.
6. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute the ambient light intensity detection method according to claim 1 or 2 by calling the computer program stored in the memory.
CN201711174645.7A 2017-11-22 2017-11-22 Ambient light intensity detection method and device, storage medium and electronic equipment Active CN107941330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711174645.7A CN107941330B (en) 2017-11-22 2017-11-22 Ambient light intensity detection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174645.7A CN107941330B (en) 2017-11-22 2017-11-22 Ambient light intensity detection method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107941330A CN107941330A (en) 2018-04-20
CN107941330B true CN107941330B (en) 2020-09-08

Family

ID=61930719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711174645.7A Active CN107941330B (en) 2017-11-22 2017-11-22 Ambient light intensity detection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107941330B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108917921B (en) * 2018-06-15 2020-06-09 江西合力泰科技有限公司 Ambient light intensity detection method
CN109740519B (en) * 2018-12-29 2021-08-13 联想(北京)有限公司 Control method and electronic device
CN111486950B (en) * 2020-04-20 2022-04-19 Oppo广东移动通信有限公司 Ambient light detection method, ambient light detection device, electronic apparatus, and storage medium
CN112033527B (en) * 2020-08-26 2023-10-03 北京小米移动软件有限公司 Ambient brightness detection method, device, equipment and storage medium
CN111947775B (en) * 2020-08-28 2022-10-21 Oppo广东移动通信有限公司 Device detection method and device, storage medium and electronic device
CN115706750A (en) * 2021-08-09 2023-02-17 北京小米移动软件有限公司 Color temperature calibration method, color temperature calibration device and storage medium
CN113865703A (en) * 2021-09-30 2021-12-31 维沃移动通信有限公司 Ambient light detection method, detection device, light detection module, and electronic apparatus
CN114283743A (en) * 2021-12-27 2022-04-05 深圳市汇顶科技股份有限公司 Method and device for detecting ambient light under display screen and electronic equipment
CN114220381B (en) * 2022-02-22 2022-05-13 深圳灏鹏科技有限公司 Display brightness control method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604516A (en) * 2008-06-10 2009-12-16 台达电子工业股份有限公司 Display device, the Control Component that is used for this display device and control method
CN102682738A (en) * 2012-05-11 2012-09-19 Tcl集团股份有限公司 Color temperature regulation method and system for display device
CN103940505A (en) * 2013-01-23 2014-07-23 华为终端有限公司 Ambient light sensor, adjusting method thereof and electronic product

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9489918B2 (en) * 2013-06-19 2016-11-08 Lenovo (Beijing) Limited Information processing methods and electronic devices for adjusting display based on ambient light
US10593291B2 (en) * 2015-09-17 2020-03-17 Apple Inc. Methods for color sensing ambient light sensor calibration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604516A (en) * 2008-06-10 2009-12-16 台达电子工业股份有限公司 Display device, the Control Component that is used for this display device and control method
CN102682738A (en) * 2012-05-11 2012-09-19 Tcl集团股份有限公司 Color temperature regulation method and system for display device
CN103940505A (en) * 2013-01-23 2014-07-23 华为终端有限公司 Ambient light sensor, adjusting method thereof and electronic product

Also Published As

Publication number Publication date
CN107941330A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN107941330B (en) Ambient light intensity detection method and device, storage medium and electronic equipment
CN107945769B (en) Ambient light intensity detection method and device, storage medium and electronic equipment
CN107957294B (en) Ambient light intensity detection method and device, storage medium and electronic equipment
US11175824B2 (en) Method for detecting ambient light intensity, storage medium and electronic device
CN107966209B (en) Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN107223203B (en) Light-intensity test method, apparatus and intelligent terminal
KR102554675B1 (en) Electronic device and method for sensing ambient light based on display information of the electronic device
CN107968883B (en) Distance state detection method and device, storage medium and electronic equipment
US10648862B2 (en) Color sensing ambient light sensor calibration
KR102639395B1 (en) Electronic device which mounted luminance sensor at a back side of a display and method for measureing luminanace using the luminance sensor
EP3775810B1 (en) Calibrated brightness estimation using ambient color sensors
CN107945770A (en) Ambient light intensity detection method, device, storage medium and electronic equipment
CN107945733B (en) Brightness of display screen method of adjustment, device, storage medium and electronic equipment
CN108881875A (en) Image white balancing treatment method, device, storage medium and terminal
CN106598444A (en) Mobile terminal control method and mobile terminal
WO2023045884A1 (en) Screen light detection model training method, ambient light detection method, and apparatus
CN109032488A (en) Processing method, storage medium and the electronic equipment of blank screen gesture
KR102634812B1 (en) Method, apparatus and electronic device for estimating screen light leakage amount
WO2022042085A1 (en) Device testing method and apparatus, and storage medium and electronic device
CN115479665A (en) Ambient light detection method and electronic equipment
CN108759881B (en) Relative position detection method and terminal equipment
RU2772932C2 (en) Method for determination of ambient light intensity, storage medium and electronic device
US11847993B2 (en) Method and apparatus for locating sensor under display screen and electronic device
CN113218503B (en) Method and system for determining ambient light intensity, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant