CN110146161B - Method and device for detecting ambient illumination intensity and terminal - Google Patents

Method and device for detecting ambient illumination intensity and terminal Download PDF

Info

Publication number
CN110146161B
CN110146161B CN201910498913.3A CN201910498913A CN110146161B CN 110146161 B CN110146161 B CN 110146161B CN 201910498913 A CN201910498913 A CN 201910498913A CN 110146161 B CN110146161 B CN 110146161B
Authority
CN
China
Prior art keywords
illumination intensity
terminal
ambient
detecting
preset
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
CN201910498913.3A
Other languages
Chinese (zh)
Other versions
CN110146161A (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 CN201910498913.3A priority Critical patent/CN110146161B/en
Publication of CN110146161A publication Critical patent/CN110146161A/en
Application granted granted Critical
Publication of CN110146161B publication Critical patent/CN110146161B/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

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Sustainable Development (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Telephone Function (AREA)
  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)

Abstract

The application belongs to the technical field of communication, and particularly relates to a method, a device and a terminal for detecting ambient illumination intensity, wherein the method for detecting the ambient illumination intensity comprises the following steps: acquiring a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor; judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value; if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, the larger value of the first illumination intensity and the second illumination intensity is used as the environment illumination intensity, so that the problem that the environment illumination intensity detection precision is low because the environment illumination intensity of the current environment of the terminal cannot be accurately detected when the terminal is in a backlight scene or one of the optical sensors is shielded is solved, and the detection precision of the environment illumination intensity is improved.

Description

Method and device for detecting ambient illumination intensity and terminal
Technical Field
The application belongs to the technical field of communication, and particularly relates to a method and a device for detecting ambient illumination intensity and a terminal.
Background
The terminal devices such as the mobile phone and the like are generally provided with an ambient light sensor, and the ambient light sensor is used for detecting the ambient light intensity of the current environment of the terminal, so that the backlight brightness of the mobile phone is automatically adjusted according to the detected ambient light intensity, and a user is ensured to have a comfortable visual experience in any lighting scene.
However, the current ambient light sensor has a problem of low detection accuracy when detecting the ambient light intensity.
Disclosure of Invention
The embodiment of the application provides a method, a device and a terminal for detecting ambient illumination intensity, which can solve the technical problem that the detection precision of the existing ambient light sensor is low when the ambient illumination intensity is detected.
A first aspect of an embodiment of the present application provides a method for detecting ambient illumination intensity, which is applied to a terminal, where the terminal includes a first optical sensor for detecting ambient illumination intensity on a first side of the terminal and a second optical sensor for detecting ambient illumination intensity on a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side opposite to the display screen of the terminal; the method for detecting the ambient illumination intensity comprises the following steps:
acquiring a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value;
and if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, taking the larger value of the first illumination intensity and the second illumination intensity as the environment illumination intensity.
A second aspect of the embodiments of the present application provides a device for detecting ambient light intensity, which is configured at a terminal, where the terminal includes a first optical sensor for detecting ambient light intensity at a first side of the terminal and a second optical sensor for detecting ambient light intensity at a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side opposite to the display screen of the terminal; the detection device for the ambient illumination intensity comprises:
an acquisition unit configured to acquire a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
the judging unit is used for judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value;
and the comparison unit is used for taking the larger value of the first illumination intensity and the second illumination intensity as the environment illumination intensity if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value.
A third aspect of the embodiments of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the above method.
In the embodiment of the application, a first optical sensor for detecting the ambient illumination intensity of a first side of a terminal and a second optical sensor for detecting the ambient illumination intensity of a second side of the terminal are respectively arranged; when the ambient illumination intensity is detected, a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor are obtained, and when the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, the larger value of the first illumination intensity and the second illumination intensity is used as the ambient illumination intensity, that is, when any one light sensor of the terminal is in a backlight state or is shielded, the illumination intensity detected by the other light sensor can be used as the ambient illumination intensity, so that the problem that the ambient illumination intensity detection precision is low because the ambient illumination intensity of the environment where the terminal is located cannot be accurately detected when the terminal is in a backlight scene or one light sensor is shielded is solved, and the detection precision of the ambient illumination intensity is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic view of an application scenario in which a terminal is in a backlight state according to an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating a first implementation of a method for detecting ambient light intensity according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a second implementation of a method for detecting ambient light intensity according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a third implementation of a method for detecting ambient light intensity according to an embodiment of the present application;
FIG. 5 is a schematic flowchart illustrating a fourth implementation of a method for detecting ambient light intensity according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an apparatus for detecting ambient light intensity provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In order to explain the technical solution of the present application, the following description will be given by way of specific examples.
When the display screen at terminal is for having the display screen of frame from top to bottom, the upper frame at display screen can be placed to ambient light sensor, and when the display screen at terminal was bang screen form, ambient light sensor can be placed in bang region. However, in both arrangements, when the ambient light sensor is located in the backlight direction, the ambient light intensity detected by the ambient light sensor will be low. For example, as shown in fig. 1, the light source is located on the ceiling, and when the user is lying on the bed to watch the mobile phone, the ambient light sensor is located in the backlight direction, and only the reflected light can be detected, so that the ambient light intensity detected by the ambient light sensor will be lower than the ambient light intensity actually sensed by the user.
In addition, when the ambient light sensor of the terminal is blocked, there is a problem that the ambient light intensity of the environment where the terminal is currently located cannot be accurately detected.
When the display screen of the terminal is a full screen, the ambient light sensor is usually designed to be hidden. For example, for an LCD display screen, the ambient light sensor may be placed in a slit region above the display screen, and for an OLED display screen, the ambient light sensor may be hidden in a manner of being placed under the screen.
However, when the ambient light sensor is placed in the slit region above the display screen for hiding, the slit width is narrow, and the ambient light sensor is far away from the display screen glass cover plate, so that the field angle of the ambient light sensor is slightly small and often smaller than that of human eyes, and therefore, the detected ambient light intensity is easily inconsistent with the human eyes.
Therefore, the current ambient light sensor has a problem of low detection precision when detecting the ambient light intensity, and an error will exist in the brightness adjustment of the display screen.
In the embodiment of the application, a first optical sensor for detecting the ambient illumination intensity of a first side of a terminal and a second optical sensor for detecting the ambient illumination intensity of a second side of the terminal are respectively arranged; when the ambient illumination intensity is detected, a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor are obtained, and when the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, the larger value of the first illumination intensity and the second illumination intensity is used as the ambient illumination intensity, that is, when any one light sensor of the terminal is in a backlight state or is shielded, the illumination intensity detected by the other light sensor can be used as the ambient illumination intensity, so that the problem that the detection precision is low when the terminal is in a backlight scene or when one light sensor is shielded is effectively solved. In addition, the second optical sensor is arranged on the side opposite to the display screen, so that the second optical sensor has a sufficient field angle, and the detected ambient illumination intensity is not consistent with the feeling of human eyes because the field angle is smaller than the field angle of human eyes.
Fig. 2 shows a schematic flow chart of an implementation of the method for detecting ambient light intensity provided in the embodiment of the present application, where the method is applied to a terminal, and can be executed by a device configured on the terminal for detecting ambient light intensity, and is suitable for a situation where it is necessary to improve detection accuracy of ambient light intensity. The terminal can be an intelligent terminal such as a mobile phone, a tablet computer, a Personal Computer (PC), a learning machine and the like, and comprises a first optical sensor for detecting the ambient light intensity of a first side of the terminal and a second optical sensor for detecting the ambient light intensity of a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side back to the back of the display screen of the terminal.
The method for detecting the ambient light intensity may include steps 201 to 203.
Step 201, a first illumination intensity detected by a first light sensor and a second illumination intensity detected by a second light sensor are obtained.
The first optical sensor is used for detecting the ambient light intensity of one side provided with the display screen, and the sensor is an ambient light sensor which is arranged on the traditional terminal and used for detecting the ambient light intensity. Also, the first light sensor may be a light sensor including a photo resistor or a photo diode.
The second optical sensor is an optical sensor for detecting the ambient light intensity on the side opposite to the display screen of the terminal.
In some embodiments of the present application, the second light sensor may be a color temperature sensor.
The color temperature sensor is a light sensor capable of detecting the intensity of ambient light with different wavelengths, and has a plurality of color channels, and the color temperature of the ambient light can be calculated through the spectral information of each channel, so that the color temperature sensor is generally used for detecting the color temperature information of the current environment of the terminal to assist the camera in white balance processing.
However, since the color temperature sensor can calculate not only the color temperature but also the ambient light intensity, in the implementation of the present application, the rear color temperature sensor disposed on the side opposite to the display screen of the terminal may be used as the second light sensor.
That is to say, the original color temperature sensor for detecting the ambient color temperature of the terminal can be used as the second light sensor of the present application, and the ambient illumination intensity on the second side of the terminal can be detected by using the second light sensor, so that the accuracy of detecting the ambient illumination intensity by the terminal can be improved without increasing the hardware structure of the terminal.
In addition, in order to increase the angle of view of the second optical sensor, in some embodiments of the present application, a diffusion film may be added on the second optical sensor to increase the angle of view sensed by the second optical sensor.
In other embodiments of the present application, the second optical sensor may also be an ambient light sensor that is the same as the first optical sensor, or the second optical sensor may also be a camera, and the ambient light intensity of the environment where the terminal is currently located is determined according to the brightness of an image acquired by the camera.
Step 202, determining whether the first illumination intensity and the second illumination intensity are both less than a first preset illumination intensity threshold.
In the embodiment of the application, after the first illumination intensity detected by the first light sensor and the second illumination intensity detected by the second light sensor are obtained, whether the current environment of the terminal is a low-light environment or not can be determined by judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value or not.
For example, when both the first illumination intensity and the second illumination intensity are smaller than a first preset illumination intensity threshold, it may be determined that the current environment of the terminal is a low-light environment; and when the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, the current environment of the terminal is considered to be a highlight environment.
Specifically, when only one of the first illumination intensity and the second illumination intensity is lower than the first preset illumination intensity threshold, it may be that one of the first light sensor or the second light sensor is blocked or is in a backlight state, rather than that the current environment of the terminal is a low-light environment. Therefore, in the embodiment of the present application, when both the first illumination intensity and the second illumination intensity are smaller than a first preset illumination intensity threshold, it is determined that the current environment of the terminal is a low-light environment; and when at least one of the first illumination intensity and the second illumination intensity is greater than or equal to the first preset illumination intensity threshold value, determining that the current environment of the terminal is a highlight environment.
The first preset illumination intensity threshold may be set at the time of factory shipment, and may be set according to practical experience.
Step 203, if the first illumination intensity and the second illumination intensity are not both less than a first preset illumination intensity threshold, taking the larger value of the first illumination intensity and the second illumination intensity as the ambient illumination intensity.
In this embodiment of the application, when the first illumination intensity and the second illumination intensity are not both smaller than the first preset illumination intensity threshold, that is, when it is determined that the current environment of the terminal is a highlight environment, a larger value of the first illumination intensity and the second illumination intensity is used as the ambient illumination intensity, so as to prevent the user from blocking any one of the light sensors, or when any one of the light sensors is in a backlight scene, the detected ambient illumination intensity is relatively low, and thus the detection accuracy of the ambient illumination intensity is improved.
As shown in fig. 3, in some embodiments of the present application, after the step 202 of determining whether the first illumination intensity and the second illumination intensity are both less than the first preset illumination intensity threshold, the method may include: step 204, if the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold, taking the second illumination intensity as the ambient illumination intensity.
Because the terminal hiding the ambient light sensor in the manner of swinging under the screen is affected by light leakage of the display screen, the illumination intensity detected by the ambient light sensor needs to be calculated by using a related fitting algorithm, and the relatively real ambient illumination intensity can be obtained finally. However, due to the inconsistency of the individual display screens and the error of the fitting algorithm, the ambient light intensity calculated by the fitting algorithm usually has an error. Especially, in a low-light environment, most of the illumination intensity detected by the ambient light sensor is derived from light leakage of the display screen, the accuracy can only be achieved by 30% in this way, and when the actual ambient illumination intensity is 0lux, the ambient illumination intensity detected by the ambient light sensor obtained through final calculation may be 2-3 lux, and when the actual ambient illumination intensity is 2-3 lux, the ambient illumination intensity detected by the ambient light sensor obtained through final calculation may be 0 lux.
In some embodiments of the present application, when above-mentioned first illumination intensity and above-mentioned second illumination intensity are all less than first predetermined illumination intensity threshold value, it is low light environment to show the environment that above-mentioned terminal is located at present, consequently, in order to avoid low light environment, because the display screen light leak leads to the environment illumination intensity that the environment light sensor at terminal detected to have great error, the second illumination intensity that this application will directly set up the second light sensor that carries on the back in the body side with the display screen at terminal detected is as environment illumination intensity to improve the detection precision of terminal environment illumination intensity, and make the luminance adjustment of display screen more accurate.
As shown in fig. 4, in some embodiments of the present application, the method for detecting the intensity of ambient light may further include: step 401 to step 404.
Step 401, a first illumination intensity detected by a first light sensor and a second illumination intensity detected by a second light sensor are obtained.
Step 402, determining whether the first illumination intensity and the second illumination intensity are both less than a first preset illumination intensity threshold.
Step 403, if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold, detecting whether the first illumination intensity is smaller than a second preset illumination intensity threshold.
Step 404, if the first illumination intensity is smaller than the second preset illumination intensity threshold, taking the second illumination intensity as the environment illumination intensity.
That is, in the embodiment of the present application, it may not be necessary to directly compare the first illumination intensity with the second illumination intensity, and then determine the larger value of the first illumination intensity and the second illumination intensity as the above-mentioned ambient illumination intensity; instead, the first illumination intensity may be directly compared with a second preset illumination intensity threshold to determine whether the first light sensor is backlit or shielded, and when the first illumination intensity is smaller than the second preset illumination intensity threshold, the first light sensor is backlit or shielded, and the second illumination intensity is used as the final ambient illumination intensity.
The second preset illumination intensity threshold may be equal to the first preset illumination intensity threshold, or slightly smaller or slightly larger than the first preset illumination intensity threshold.
Optionally, when the first illumination intensity is greater than or equal to the second preset illumination intensity threshold, it is detected whether the second illumination intensity is less than the second preset illumination intensity threshold, and if the second illumination intensity is less than the second preset illumination intensity threshold, it indicates that the second light sensor is in a backlight state or is shielded, so that the first illumination intensity may be used as the ambient illumination intensity.
In some embodiments of the present application, as shown in fig. 5, the method for detecting the intensity of ambient light may further include: step 501 to step 504.
Step 501, a first illumination intensity detected by a first light sensor and a second illumination intensity detected by a second light sensor are obtained.
Step 502, determining whether the first illumination intensity and the second illumination intensity are both less than a first preset illumination intensity threshold.
Step 503, if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold, detecting whether the screen angle of the terminal is within a preset angle range.
Step 504, if the screen angle of the terminal is within a preset angle range, taking the second illumination intensity as the ambient illumination intensity.
That is to say, in the embodiment of the present application, it is not necessary to directly compare the first illumination intensity with the second illumination intensity, or it is not necessary to compare the first illumination intensity with a second preset illumination intensity threshold value, so as to determine whether the first light sensor is backlit; but determine whether the first light sensor is in a backlight mode by detecting whether the screen angle of the terminal is within a preset angle range, and determine that the first light sensor is in a backlight state when the screen angle of the terminal is within the preset angle range, so that the second light intensity is used as the final ambient light intensity, thereby avoiding that the detected ambient light intensity has a large error due to the fact that the ambient light sensor is in the backlight state, and improving the detection precision of the ambient light intensity.
The preset angle range is an angle range in which a screen of the terminal faces downwards, and can be set according to practical experience. And, the screen angle of the terminal can be detected by a gravity sensor.
Optionally, in step 503, after detecting whether the screen angle of the terminal is within the preset angle range, the method may further include: and if the screen angle of the terminal is not within a preset angle range, taking the first illumination intensity as the ambient illumination intensity.
That is, since the first light sensor is not in a backlight state and the second light sensor may be in a backlight state, the first illumination intensity may be set as the ambient illumination intensity.
It should be noted that for simplicity of description, the aforementioned method embodiments are all presented as a series of combinations of acts, but those skilled in the art will appreciate that the present invention is not limited by the order of acts described, as some steps may occur in other orders in accordance with the present invention.
Fig. 6 is a schematic structural diagram illustrating an apparatus 600 for detecting an ambient light intensity, which is provided in an embodiment of the present application and is configured in a terminal, where the terminal includes a first light sensor for detecting an ambient light intensity on a first side of the terminal and a second light sensor for detecting an ambient light intensity on a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side opposite to the display screen of the terminal; the detection device for the ambient illumination intensity comprises: includes an acquisition unit 601, a judgment unit 602, and a comparison unit 603.
An acquisition unit 601 configured to acquire a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
a determining unit 602, configured to determine whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold;
a comparing unit 603, configured to, if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold, take a larger value of the first illumination intensity and the second illumination intensity as the ambient illumination intensity.
It should be noted that, for convenience and simplicity of description, the specific working process of the above-described detection apparatus 600 for ambient light intensity may refer to the corresponding process of the method described in fig. 1 to fig. 5, and is not described herein again.
As shown in fig. 7, the present application provides a terminal for implementing the method for detecting ambient light intensity, including: a processor 71, a memory 72, one or more input devices 73 (only one shown in fig. 7), and one or more output devices 74 (only one shown in fig. 7). The processor 71, memory 72, input device 73, and output device 74 are connected by a bus 75.
It should be understood that, in the embodiment of the present Application, the Processor 71 may be a Central Processing Unit (CPU), and the Processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 73 may include a virtual keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 74 may include a display, a speaker, etc.
Memory 72 may include both read-only memory and random-access memory and provides instructions and data to processor 71. Some or all of memory 72 may also include non-volatile random access memory. For example, the memory 72 may also store device type information.
The memory 72 stores a computer program that is executable by the processor 71, and the computer program is, for example, a program of a method for detecting the intensity of ambient light. The processor 71 implements the steps of the method for detecting the ambient light intensity, such as the steps 201 to 203 shown in fig. 2, when executing the computer program. Alternatively, the processor 71, when executing the computer program, implements the functions of the modules/units in the device embodiments, for example, the functions of the units 601 to 603 shown in fig. 6.
The computer program may be divided into one or more modules/units, which are stored in the memory 72 and executed by the processor 71 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used for describing the execution process of the computer program in the terminal for detecting the ambient light intensity. For example, the computer program may be divided into an acquisition unit, a judgment unit and a comparison unit, and each unit has the following specific functions:
an acquisition unit configured to acquire a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
the judging unit is used for judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value;
and the comparison unit is used for taking the larger value of the first illumination intensity and the second illumination intensity as the environment illumination intensity if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal are merely illustrative, and for example, the division of the above-described modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (8)

1. The method for detecting the ambient illumination intensity is applied to a terminal and is characterized in that the terminal comprises a first optical sensor for detecting the ambient illumination intensity of a first side of the terminal and a second optical sensor for detecting the ambient illumination intensity of a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side opposite to the display screen of the terminal; the method for detecting the ambient illumination intensity comprises the following steps:
acquiring a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value;
if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value, detecting whether the screen angle of the terminal is within a preset angle range; and if the screen angle of the terminal is within a preset angle range, determining that the first light sensor is in a backlight state, and taking the second illumination intensity as the ambient illumination intensity.
2. The detection method according to claim 1, wherein after said determining whether the first illumination intensity and the second illumination intensity are both less than a first preset illumination intensity threshold, comprising:
and if the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value, taking the second illumination intensity as the environment illumination intensity.
3. The method for detecting the screen angle of the terminal as claimed in claim 1, wherein the detecting whether the screen angle of the terminal is within a preset angle range comprises:
and if the screen angle of the terminal is not within a preset angle range, taking the first illumination intensity as the ambient illumination intensity.
4. A method as claimed in any one of claims 1 to 3, wherein the second light sensor is a colour temperature sensor.
5. The detection method according to any one of claims 1 to 3, wherein the second photosensor is provided with a diffusion film.
6. The device for detecting the ambient illumination intensity is configured at a terminal, and is characterized in that the terminal comprises a first optical sensor for detecting the ambient illumination intensity of a first side of the terminal and a second optical sensor for detecting the ambient illumination intensity of a second side of the terminal; the first side is the side of the terminal provided with the display screen, and the second side is the side opposite to the display screen of the terminal; the detection device for the ambient illumination intensity comprises:
an acquisition unit configured to acquire a first illumination intensity detected by the first light sensor and a second illumination intensity detected by the second light sensor;
the judging unit is used for judging whether the first illumination intensity and the second illumination intensity are both smaller than a first preset illumination intensity threshold value;
the comparison unit is used for detecting whether the screen angle of the terminal is within a preset angle range or not if the first illumination intensity and the second illumination intensity are not both smaller than a first preset illumination intensity threshold value; and if the screen angle of the terminal is within a preset angle range, determining that the first light sensor is in a backlight state, and taking the second illumination intensity as the ambient illumination intensity.
7. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201910498913.3A 2019-06-10 2019-06-10 Method and device for detecting ambient illumination intensity and terminal Active CN110146161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910498913.3A CN110146161B (en) 2019-06-10 2019-06-10 Method and device for detecting ambient illumination intensity and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910498913.3A CN110146161B (en) 2019-06-10 2019-06-10 Method and device for detecting ambient illumination intensity and terminal

Publications (2)

Publication Number Publication Date
CN110146161A CN110146161A (en) 2019-08-20
CN110146161B true CN110146161B (en) 2021-08-13

Family

ID=67590767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910498913.3A Active CN110146161B (en) 2019-06-10 2019-06-10 Method and device for detecting ambient illumination intensity and terminal

Country Status (1)

Country Link
CN (1) CN110146161B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112484850B (en) * 2019-09-11 2024-03-26 北京小米移动软件有限公司 Light intensity detection module, screen component and mobile terminal
US11343898B2 (en) * 2019-09-20 2022-05-24 Appleton Grp Llc Smart dimming and sensor failure detection as part of built in daylight harvesting inside the luminaire
CN112865862B (en) * 2019-11-12 2022-05-13 Oppo广东移动通信有限公司 Ambient light detection method and apparatus for optical communication between electronic devices
CN111918047A (en) * 2020-07-27 2020-11-10 Oppo广东移动通信有限公司 Photographing control method and device, storage medium and electronic equipment
CN112235924A (en) * 2020-09-25 2021-01-15 深圳星标科技股份有限公司 Sensor fault processing method and related device
CN112472026A (en) * 2020-11-03 2021-03-12 黑龙江中医药大学 Novel medical internal medicine clinical diagnosis and treatment equipment and method
CN113781969B (en) * 2021-09-27 2024-04-23 联想(北京)有限公司 Backlight adjusting method and device and electronic equipment
CN113984201B (en) * 2021-11-03 2023-06-27 武汉华星光电技术有限公司 Ambient light sensing structure and display panel

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1994019212A2 (en) * 1993-02-26 1994-09-01 Donnelly Corporation Automatic rearview mirror and vehicle interior monitoring system using a photosensor array
US6611202B2 (en) * 1993-02-26 2003-08-26 Donnelly Corporation Vehicle camera display system
CN102932554A (en) * 2012-11-14 2013-02-13 广东欧珀移动通信有限公司 System and method for intelligently selecting incoming telegram reminding mode of mobile phone
CN202798942U (en) * 2012-08-09 2013-03-13 广东欧珀移动通信有限公司 Image sensor, camera and electronic product using image sensor
CN107300417A (en) * 2017-05-25 2017-10-27 广东欧珀移动通信有限公司 Detection method, device, storage medium and the terminal of ambient light

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1994019212A2 (en) * 1993-02-26 1994-09-01 Donnelly Corporation Automatic rearview mirror and vehicle interior monitoring system using a photosensor array
US6611202B2 (en) * 1993-02-26 2003-08-26 Donnelly Corporation Vehicle camera display system
CN202798942U (en) * 2012-08-09 2013-03-13 广东欧珀移动通信有限公司 Image sensor, camera and electronic product using image sensor
CN102932554A (en) * 2012-11-14 2013-02-13 广东欧珀移动通信有限公司 System and method for intelligently selecting incoming telegram reminding mode of mobile phone
CN107300417A (en) * 2017-05-25 2017-10-27 广东欧珀移动通信有限公司 Detection method, device, storage medium and the terminal of ambient light

Also Published As

Publication number Publication date
CN110146161A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110146161B (en) Method and device for detecting ambient illumination intensity and terminal
CN110113534B (en) Image processing method, image processing device and mobile terminal
US9449561B1 (en) Light sensor obstruction detection
KR102554675B1 (en) Electronic device and method for sensing ambient light based on display information of the electronic device
US9875724B2 (en) Method and electronic device for adjusting display
EP3637763B1 (en) Colour detection method and terminal
WO2019196909A1 (en) Fingerprint collection method and apparatus based on optical fingerprint technology, and user terminal
US20200051225A1 (en) Fast Fourier Color Constancy
US10783835B2 (en) Automatic control of display brightness
US20160110846A1 (en) Automatic display image enhancement based on user's visual perception model
US20160232857A1 (en) Display device and control method for same
CN107941330B (en) Ambient light intensity detection method and device, storage medium and electronic equipment
CN109819088B (en) Light sensation calibration method and related device
CN104318912A (en) Method and device for detecting environmental light brightness
US20220067330A1 (en) Calibration method, electronic device, and non-transitory computer-readable storage medium
WO2018219290A1 (en) Information terminal
CN110618852B (en) View processing method, view processing device and terminal equipment
CN107577340B (en) Eyesight protection method, terminal and storage device
CN110442313B (en) Display attribute adjusting method and related equipment
US20160255321A1 (en) Image Capture Device With Adaptive White Balance Correction Using A Switchable White Reference
WO2022042085A1 (en) Device testing method and apparatus, and storage medium and electronic device
CN108810397B (en) Image color cast correction method and terminal equipment
CN115479665A (en) Ambient light detection method and electronic equipment
TWI633536B (en) Electronic device and method for adjusting display screen
CN107507601A (en) A kind of method and system of the camera supervised interface display effect of adjust automatically

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant