CN112102796B - Method and device for acquiring ambient light information by using camera and terminal equipment - Google Patents

Method and device for acquiring ambient light information by using camera and terminal equipment Download PDF

Info

Publication number
CN112102796B
CN112102796B CN202010917684.7A CN202010917684A CN112102796B CN 112102796 B CN112102796 B CN 112102796B CN 202010917684 A CN202010917684 A CN 202010917684A CN 112102796 B CN112102796 B CN 112102796B
Authority
CN
China
Prior art keywords
motion state
ambient light
camera
detection
light 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
CN202010917684.7A
Other languages
Chinese (zh)
Other versions
CN112102796A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN112102796A publication Critical patent/CN112102796A/en
Application granted granted Critical
Publication of CN112102796B publication Critical patent/CN112102796B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • 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 application discloses a method and a device for acquiring ambient light information by using a camera and terminal equipment. The method comprises the following steps: determining a first motion state of the terminal device; acquiring a first period corresponding to the first motion state; determining a first detection starting moment according to a first period; when the first detection starting moment is reached, a camera of the terminal equipment is used for acquiring first ambient light information; determining a second motion state of the terminal device; when the second motion state is different from the first motion state, acquiring a second period corresponding to the second motion state; determining a second detection starting time according to the second period and the first detection starting time; and when the second detection starting moment is reached, the camera is used for acquiring second ambient light information. By the method, the detection period of the camera for detecting the ambient light can be adjusted in time according to the motion state of the terminal equipment, so that the power consumption of the terminal equipment is reduced under the condition of ensuring the detection sensitivity.

Description

Method and device for acquiring ambient light information by using camera and terminal equipment
The present application claims priority of the chinese patent application entitled "a camera detection ambient light period adjustment scheme" filed by the chinese national office at 15/05/2020, application number 202010414903.X, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the technical field of terminal devices, and in particular, to a method and an apparatus for acquiring ambient light information by using a camera, and a terminal device.
Background
With the development of internet technology and mobile communication network technology, the frequency of using mobile terminals by users is higher and higher, and the functions that can be realized by mobile terminals are more and more. For example, the mobile terminal may detect the ambient light of the environment where the mobile terminal is located through the camera, and then adjust the brightness of the display screen according to the detection result, so that the user may have better visual experience.
When the camera is used to detect the ambient light of the mobile terminal, the camera is usually turned on periodically at a fixed detection period to detect the ambient light of the environment where the mobile terminal is located. The ambient light is detected in a fixed detection period, and when the detection sensitivity is high, the power consumption of the mobile terminal is high, so that the performance of the mobile terminal is influenced; if the power consumption of the mobile terminal is reduced, the detection sensitivity is low, and the user experience is poor.
Disclosure of Invention
The application provides a method and a device for acquiring ambient light information by using a camera, and a terminal device, so as to solve the problem of how to reduce the power consumption of a mobile terminal under the condition of ensuring detection sensitivity when the camera is used for detecting the ambient light of the mobile terminal.
In a first aspect, the present application provides a method for acquiring ambient light information by using a camera, where the method is applied to a terminal device, and includes: determining a first motion state of the terminal device; acquiring a first period, wherein the first period is a preset detection period corresponding to the first motion state; determining a first detection starting moment according to the first period; when the first detection starting moment is reached, a camera of the terminal equipment is used for acquiring first ambient light information; determining a second motion state of the terminal device; when the second motion state is different from the first motion state, acquiring a second period, wherein the second period is a preset detection period corresponding to the second motion state; determining a second detection starting time according to the second period and the first detection starting time; and when the second detection starting moment is reached, the camera is used for acquiring second ambient light information.
In the implementation mode, a first motion state of the terminal device is determined, a preset detection period corresponding to the first motion state is obtained, a first detection starting time is determined according to the preset detection period corresponding to the first motion state, when the first detection starting time is reached, the camera of the terminal device is used for obtaining first ambient light information, then a second motion state of the terminal device is determined, when the second motion state is different from the first motion state, the preset detection period corresponding to the second motion state is obtained, a second detection starting time is determined according to the preset detection period corresponding to the second motion state and the first detection starting time, and when the second detection starting time is reached, the camera of the terminal device is used for obtaining second ambient light information. Therefore, by the method, the detection period of the camera for detecting the ambient light can be adjusted in time according to the motion state of the terminal equipment, so that when the terminal equipment moves faster, the detection period can be reduced, the detection sensitivity can be improved, and the user experience can be improved.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the method further includes: when the second motion state is the same as the first motion state, determining a third detection starting time according to the first period and the first detection starting time; and when the third detection starting moment is reached, the camera is used for acquiring third ambient light information.
In this implementation manner, when the motion state of the terminal device is not changed, the ambient light information can be periodically acquired in a fixed detection period, and the detection manner is more flexible.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the acquiring, by using a camera of the terminal device, first ambient light information includes: acquiring first camera shooting information of the camera; and acquiring the first ambient light information according to the first camera information.
In the implementation mode, the ambient light information of the terminal equipment can be acquired according to the camera shooting information of the camera of the terminal equipment, and the acquired ambient light information is more accurate.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the determining the first motion state of the terminal device includes: acquiring a first time length, wherein the first time length is the time length for keeping a display screen of the terminal equipment in a bright screen state; and when the first time length is larger than a preset screen-on time length threshold value, determining a first motion state of the terminal equipment.
In the implementation mode, when the display screen of the terminal equipment is determined to be in the bright screen state for a long time, the first motion state of the terminal equipment is determined, and the subsequent process of detecting the ambient light is executed, so that unnecessary power consumption increase caused by false triggering is avoided.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the determining the first motion state of the terminal device includes: acquiring a first acceleration detection value of the terminal equipment; and determining a first motion state of the terminal equipment according to the first acceleration detection value.
In the implementation mode, the motion state of the terminal equipment can be determined according to the acceleration detection value of the terminal equipment, and the change details of the motion state of the terminal equipment can be accurately detected, so that the detection period more suitable for an application scene can be set, the detection sensitivity more meets the requirement of the practical application scene, and correspondingly, the power consumption of the terminal equipment can be reduced to a greater extent.
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: and after the camera is used for obtaining the ambient light information each time, adjusting the brightness of the display screen of the terminal equipment according to the ambient light information.
In the implementation mode, the ambient light information of the terminal device can be acquired according to the motion state of the terminal device, and then the brightness of the display screen of the terminal device is adjusted according to the ambient light information, so that the power consumption of the terminal device can be reduced under the condition that the adjustment sensitivity is ensured, and the user experience is better.
In a second aspect, the present application provides an apparatus for acquiring ambient light information using a camera, the apparatus comprising: the determining module is used for determining a first motion state of the terminal equipment; the acquisition module is used for acquiring a first period, wherein the first period is a preset detection period corresponding to the first motion state; the determining module is further configured to determine a first detection starting time according to the first period; the processing module is used for acquiring first ambient light information by using a camera of the terminal equipment when the first detection starting time is reached; the determining module is further configured to determine a second motion state of the terminal device; the obtaining module is further configured to obtain a second period when the second motion state is different from the first motion state, where the second period is a preset detection period corresponding to the second motion state; the determining module is further configured to determine a second detection start time according to the second period and the first detection start time; and the processing module is also used for acquiring second ambient light information by using the camera when the second detection starting time is reached.
The device of the implementation mode can firstly determine a first motion state of the terminal equipment, acquire a preset detection period corresponding to the first motion state, determine a first detection starting time according to the preset detection period corresponding to the first motion state, acquire first ambient light information by using a camera of the terminal equipment when the first detection starting time is reached, then determine a second motion state of the terminal equipment, acquire a preset detection period corresponding to the second motion state when the second motion state is different from the first motion state, determine a second detection starting time according to the preset detection period corresponding to the second motion state and the first detection starting time, and acquire second ambient light information by using the camera of the terminal equipment when the second detection starting time is reached. Therefore, the device can be used for adjusting the detection period of the camera for detecting the ambient light in time according to the motion state of the terminal equipment, so that when the terminal equipment moves fast, the detection period can be shortened, the detection sensitivity can be improved, the user experience can be improved, when the terminal equipment moves slowly, the power consumption of the terminal equipment can be reduced through the increase of the detection period, and therefore the power consumption of the terminal equipment is reduced under the condition that the detection sensitivity is ensured.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the determining module is further configured to determine a third detection starting time according to the first period and the first detection starting time when the second motion state is the same as the first motion state; and the processing module is further used for acquiring third ambient light information by using the camera when the third detection starting time is reached.
The device of the implementation mode can periodically acquire the ambient light information in a fixed detection period when the motion state of the terminal equipment is unchanged, and the detection mode is more flexible.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the processing module is specifically configured to: acquiring first camera shooting information of the camera; and acquiring the first ambient light information according to the first camera information.
The device of the implementation mode can acquire the ambient light information of the terminal equipment according to the camera shooting information of the camera of the terminal equipment, and the acquired ambient light information is more accurate.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the determining module is specifically configured to: acquiring a first time length; the first duration is the duration that the display screen of the terminal equipment is kept in a bright screen state; and when the first time length is larger than a preset screen-on time length threshold value, determining a first motion state of the terminal equipment.
According to the device of the implementation mode, when the display screen of the terminal equipment is determined to be in the bright screen state for a long time, the first motion state of the terminal equipment can be determined, and the subsequent process of detecting the ambient light is executed, so that unnecessary power consumption increase caused by false triggering is avoided.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the determining module is specifically configured to: acquiring a first acceleration detection value of the terminal equipment; and determining a first motion state of the terminal equipment according to the first acceleration detection value.
The device of the implementation mode can determine the motion state of the terminal equipment according to the acceleration detection value of the terminal equipment, and can accurately detect the change details of the motion state of the terminal equipment, so that the detection period more suitable for an application scene can be set, the detection sensitivity more meets the requirement of an actual application scene, and correspondingly, the power consumption of the terminal equipment can be reduced to a greater extent.
With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the processing module is further configured to: and after the camera is used for obtaining the ambient light information each time, adjusting the brightness of the display screen of the terminal equipment according to the ambient light information.
The device of the implementation mode can acquire the ambient light information of the terminal device according to the motion state of the terminal device, and then adjust the brightness of the display screen of the terminal device according to the ambient light information, so that the power consumption of the terminal device can be reduced under the condition of ensuring the adjustment sensitivity, and the user experience is better.
In a third aspect, the present application provides a terminal device, which includes at least one camera and the apparatus of the second aspect.
The terminal equipment is used, a first motion state of the terminal equipment can be determined firstly, a preset detection period corresponding to the first motion state is obtained, a first detection starting time is determined according to the preset detection period corresponding to the first motion state, when the first detection starting time is reached, the camera of the terminal equipment is used for obtaining first environment light information, then a second motion state of the terminal equipment can be determined, when the second motion state is different from the first motion state, the preset detection period corresponding to the second motion state is obtained, the second detection starting time is determined according to the preset detection period corresponding to the second motion state and the first detection starting time, and when the second detection starting time is reached, the camera of the terminal equipment is used for obtaining second environment light information. Therefore, the terminal equipment can be used for adjusting the detection period of the camera for detecting the ambient light in time according to the motion state of the terminal equipment, so that when the terminal equipment moves fast, the detection period can be shortened, the detection sensitivity can be improved, the user experience can be improved, when the terminal equipment moves slowly, the power consumption of the terminal equipment can be reduced through the increase of the detection period, and therefore the power consumption of the terminal equipment is reduced under the condition that the detection sensitivity is ensured.
In a fourth aspect, embodiments of the present application provide a communication device comprising a processor, wherein when the processor executes a computer program or instructions in a memory, the method according to the first aspect is performed.
In a fifth aspect, embodiments of the present application provide a communications apparatus, which includes a processor and a memory, where the memory is used to store a computer program or instructions; the processor is configured to execute the computer program or instructions stored by the memory to cause the communication device to perform the respective method as shown in the first aspect.
In a sixth aspect, embodiments of the present application provide a communication device, which includes a processor, a memory, and a transceiver; the transceiver is used for receiving signals or sending signals; the memory for storing computer programs or instructions; the processor for invoking the computer program or instructions from the memory to perform the method according to the first aspect.
In a seventh aspect, an embodiment of the present application provides a communication apparatus, which includes a processor and an interface circuit; the interface circuit is used for receiving a computer program or instructions and transmitting the computer program or instructions to the processor; the processor executes the computer program or instructions to perform the respective method as shown in the first aspect.
In an eighth aspect, embodiments of the present application provide a computer storage medium for storing a computer program or instructions, which when executed, enable the method of the first aspect to be implemented.
In a ninth aspect, embodiments of the present application provide a computer program product comprising a computer program or instructions, which when executed, cause the method of the first aspect to be implemented.
In order to solve the problem of how to reduce the power consumption of the mobile terminal under the condition of ensuring the detection sensitivity when the camera is used for detecting the ambient light of the mobile terminal, the application provides a method and a device for acquiring the ambient light information by using the camera and terminal equipment. The method comprises the steps of firstly determining a first motion state of the terminal device, obtaining a preset detection period corresponding to the first motion state, determining a first detection starting time according to the preset detection period corresponding to the first motion state, obtaining first environment light information by using a camera of the terminal device when the first detection starting time is reached, then determining a second motion state of the terminal device, obtaining a preset detection period corresponding to the second motion state when the second motion state is different from the first motion state, determining a second detection starting time according to the preset detection period corresponding to the second motion state and the first detection starting time, and obtaining second environment light information by using the camera of the terminal device when the second detection starting time is reached. Therefore, by the method, the detection period of the camera for detecting the ambient light can be adjusted in time according to the motion state of the terminal equipment, so that when the terminal equipment moves faster, the detection period can be reduced, the detection sensitivity can be improved, and the user experience can be improved.
Drawings
Fig. 1 is a schematic flowchart illustrating an embodiment of a method for acquiring ambient light information by using a camera according to the present application;
FIG. 2 is a block diagram of an embodiment of an apparatus for acquiring ambient light information using a camera according to the present disclosure;
fig. 3 is a block diagram of a chip according to an embodiment of the present disclosure.
Detailed Description
The technical solution of the present application is described below with reference to the accompanying drawings.
In the description of this application, "/" means "or" unless otherwise stated, for example, A/B may mean A or B. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. Further, "at least one" means one or more, "a plurality" means two or more. The terms "first", "second", and the like do not necessarily limit the number and execution order, and the terms "first", "second", and the like do not necessarily limit the difference.
It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The application provides a method and a device for acquiring ambient light information by using a camera and terminal equipment. The terminal device referred to in the present application may be a terminal device including at least one camera (camera), such as a mobile phone, a tablet computer, a monitoring device, an in-vehicle device, and the like. The terminal device may be, for example, a mounted terminal
Figure BDA0002665602140000051
Figure BDA0002665602140000052
Or other operating system device.
In a possible implementation manner, the at least one camera included in the terminal device may be all rear cameras of the terminal device. In another possible implementation manner, the at least one camera included in the terminal device may be all front-facing cameras of the terminal device. In other possible implementations, the terminal device may include both a front camera and a rear camera. Furthermore, when the camera of the terminal device is used to obtain the ambient light information of the environment where the terminal device is located, the terminal device may call one camera of the at least one camera to obtain the ambient light information.
The following describes a method for acquiring ambient light information using a camera according to an embodiment of the present application with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a method for acquiring ambient light information by using a camera according to the present application. The method can be applied to a terminal device, and the method can comprise the following steps:
and step S101, determining a first motion state of the terminal equipment.
In a possible implementation manner, after the terminal device is powered on, detection of ambient light information of an environment where the terminal device is located may be started, a detection start time may be recorded, a current motion state of the terminal device may be determined, and the motion state may be determined as the first motion state.
In a possible implementation manner, when the camera is used to acquire the ambient light information and the brightness of the display screen of the terminal device is adjusted according to the acquired ambient light information, the brightness of the display screen is adjusted only when the display screen is in a bright screen state. Based on this, when it is detected that the terminal device is in the bright screen state, the detection of the ambient light information of the environment where the terminal device is located is started, the detection starting time is recorded, the current motion state of the terminal device is determined, and the motion state is determined as the first motion state.
In a possible implementation manner, in order to avoid using the camera to acquire the ambient light information when the display screen is turned on by a user through misoperation, and thus increase the power consumption of the terminal device, the camera may be used to acquire the ambient light information when the display screen of the terminal device is in a bright screen state for a long time. Based on this, when it is detected that the terminal device is in the bright screen state, a first duration is obtained first, the first duration is a duration during which the display screen of the terminal device is kept in the bright screen state, when the first duration is greater than a preset bright screen duration threshold, detection of ambient light information of an environment where the terminal device is located is started, a detection starting time is recorded, a current motion state of the terminal device is determined, and the motion state is determined as the first motion state. The preset screen-on duration threshold value can be set according to the requirements of the application scene.
In a possible implementation manner, in order to obtain environment light information more stably subsequently, when the environment light information of the environment where the terminal device is located is detected, a detection start time is recorded, then the environment light information of the terminal device is obtained periodically by using a camera according to a default detection period (for example, the default detection period may be set to 5 seconds), and after a preset number of default detection periods continue, a current motion state of the terminal device is determined, and the motion state is determined as the first motion state. For example, after 3 default detection periods have elapsed, the first motion state of the terminal device is determined again.
The terminal device may include a plurality of motion states. For example: the terminal device may include a plurality of motion states: a static state, a slow motion state, a medium motion state, a fast motion state, and the like. It should be noted that the number of motion states included in the terminal device may also be set to be a greater number or a smaller number according to the requirements of the actual application scenario, which is not limited in the present application.
In a possible implementation manner, one motion state of the terminal device may correspond to a value section of an acceleration detection value, for example, the value section of the acceleration detection value corresponding to the stationary state may be [0,0], the value section of the acceleration detection value corresponding to the slow motion state may be (0, M1], the value section of the acceleration detection value corresponding to the medium motion state may be (M1, M2], the value section of the acceleration detection value corresponding to the fast motion state may be (M2, M3), and the like, where values of M1, M2, and M3 may be set according to an actual application scenario, and a corresponding relationship between the motion state of the terminal device and the value section of the acceleration detection value may be set in the terminal device in advance.
Determining the first motion state of the terminal device may be implemented as follows: acquiring a first acceleration detection value of the terminal equipment; and determining a first motion state of the terminal equipment according to the first acceleration detection value.
A physical device for detecting the acceleration of the terminal device, such as an acceleration sensor, may be provided in the terminal device. A first detected acceleration value of the terminal device may be acquired using an acceleration sensor.
For example, a plurality of acceleration values of each coordinate axis in three coordinate axes may be obtained through an acceleration sensor, and a variance value of each coordinate axis is generated according to the obtained acceleration values and is respectively recorded as a first variance value, a second variance value and a third variance value, where the first variance value may be a variance value of an X coordinate axis, the second variance value may be a variance value of a Y coordinate axis, and the third variance value may be a variance value of a Z coordinate axis; and then, carrying out mean value calculation on the first variance value, the second variance value and the third variance value to generate an average variance value of three coordinate axes, and determining the average variance value as a first acceleration detection value of the terminal equipment.
For example, acceleration values X1, X2, … …, X100 of 100X coordinate axes, acceleration values Y1, Y2, … …, Y100 of 100Y coordinate axes, and acceleration values Z1, Z2, … …, Z100 of 100Z coordinate axes are respectively acquired by using acceleration sensors; then, calculating to obtain a first variance value according to X1, X2, … … and X100, calculating to obtain a second variance value according to Y1, Y2, … … and Y100, and calculating to obtain a third variance value according to Z1, Z2, … … and Z100; and then, carrying out mean value calculation on the first variance value, the second variance value and the third variance value to obtain an average variance value of the first variance value, the second variance value and the third variance value, and determining the average variance value as a first acceleration detection value of the terminal equipment.
After a first acceleration detection value of the terminal device is obtained, the first acceleration detection value can be matched with a value interval of the acceleration detection value preset in the terminal device, and the value interval of the acceleration detection value corresponding to the first acceleration detection value is determined and recorded as a target value interval; and then, acquiring the motion state of the terminal equipment corresponding to the target value-taking interval, and determining the motion state as a first motion state.
For example, if the acquired first detected acceleration value is 0, the first motion state is a stationary state. Or, if the acquired first acceleration detection value is within the range of the (0, M1) value interval, the first motion state is a slow motion state, or, if the acquired first acceleration detection value is within the range of the (M1, M2) value interval, the first motion state is a medium motion state, or, if the acquired first acceleration detection value is within the range of the (M2, M3) value interval, the first motion state is a fast motion state.
It should be noted that the first motion state of the terminal device may also be determined by other implementations. For example, the position information of the terminal device may be acquired through a Global Positioning System (GPS) or a beidou system, and the first motion state of the terminal device is determined according to the position information; or, the terminal device obtains the signal strength of a wireless local area network (Wi-Fi), and determines the first motion state of the terminal device according to the signal strength, and the like, which is not limited in the present application.
And step S102, acquiring a first period.
The first period is a preset detection period corresponding to the first motion state.
Generally, when the terminal device is in a static state, it may be considered that the ambient light information of the environment where the terminal device is located does not change, and in this case, the detection period for acquiring the ambient light information may be set to a period with a longer duration, that is, a longer duration may be set between two adjacent detection start times for acquiring the ambient light information (detection start times for acquiring the ambient light information each time), so that power consumption of the terminal device may be reduced, and performance of the terminal device may be improved. When the terminal equipment is in a motion state, the environment where the terminal equipment is located can be changed generally, and the ambient light information can be changed correspondingly. Further, the ambient light information changes differently for different motion states, for example, the ambient light information changes differently for a slow motion state than for a fast motion state.
Based on this, corresponding detection periods can be preset in the terminal device according to different motion states of the terminal device, that is, a corresponding preset detection period can be set for the motion state of each terminal device according to requirements of an actual application scene, and then the motion state of the terminal device and the preset detection period corresponding to the motion state are correspondingly stored in the terminal device together. When step S102 is executed, the first motion state is matched with the motion state of the terminal device stored in the terminal device, and a preset detection period corresponding to the motion state identical to the first motion state is determined as a first period.
For example, referring to table 1 below, the motion state of the terminal device and the preset detection period corresponding to the motion state may be stored in the manner of table 1 below. After the first motion state is acquired, the first motion state may be matched with the motion states in table 1, and a preset detection period corresponding to the motion state in table 1 that is the same as the first motion state is determined as a first period. For example, if the first motion state is a stationary state, the first period is 9 seconds. Alternatively, if the first motion state is a fast motion state, the first period is 6 seconds, and the like.
Figure BDA0002665602140000071
Figure BDA0002665602140000081
TABLE 1
And step S103, determining a first detection starting moment according to the first period.
In a possible implementation manner, after obtaining the first period, the terminal device may determine, as the first detection start time, a time that is after the detection start time and is separated from the detection start time by the first period.
In a possible implementation manner, the terminal device may further record a time when the first period is obtained, and determine, as the first detection starting time, a time when the first period is separated from the time when the first period is obtained after the time when the first period is obtained. Therefore, after the detection is stable, the ambient light information of the terminal equipment can be detected according to the motion state of the terminal equipment, and the obtained ambient light information is more accurate.
And step S104, when the first detection starting time is reached, acquiring first ambient light information by using a camera of the terminal equipment.
When the first detection starting time is reached, the terminal equipment can start a camera of the terminal equipment, the camera is used for acquiring the environmental light information, and the environmental light information acquired at this time is the first environmental light information in the application. In order to reduce power consumption of the terminal device and improve performance of the terminal device, the camera can be closed after the first ambient light information is acquired.
In a possible implementation manner, the acquiring of the first ambient light information by using the camera of the terminal device may be implemented as follows: shooting by using a camera to obtain first shooting information, wherein the first shooting information comprises image information or video information shot by the camera; the first ambient light information is obtained according to the first image pickup information, and the first ambient light information may be illuminance information of ambient light or other information of the ambient light, which is not limited in the present application.
In some optional embodiments of the present application, after the first ambient light information is acquired, the brightness of the display screen of the terminal device may also be adjusted according to the first ambient light information.
In a possible implementation manner, if the terminal device stores the ambient light information and the display screen brightness level corresponding to the ambient light information in advance, the brightness of the display screen of the terminal device is adjusted according to the first ambient light information, which may be implemented as follows: and matching the first ambient light information with pre-stored ambient light information, determining the display screen brightness level corresponding to the pre-stored ambient light information which is the same as the first ambient light information as a target brightness level, and adjusting the brightness of the display screen of the terminal device to the target brightness level.
For example, referring to table 2 below, the ambient light information, which is illuminance information of ambient light in lux, and the display screen luminance level corresponding to the ambient light information may be stored correspondingly in the manner of table 2 below. Assuming that the acquired first ambient light information is 50lux, it can be known from table 2 that the target brightness level corresponding to the first ambient light information is 100, and the brightness of the display screen of the terminal device needs to be adjusted to the display screen brightness level of 100. Assuming that the acquired first ambient light information is 900lux, it can be known from table 2 that the target brightness level corresponding to the first ambient light information is 1000, and the brightness of the display screen of the terminal device needs to be adjusted to the display screen brightness level of 1000.
Ambient light information (lux) Display screen brightness level
3 0
50 100
100 200
200 300
…… ……
900 1000
TABLE 2
And step S105, determining a second motion state of the terminal equipment.
In order to reduce the power consumption of the terminal device under the condition that the detection sensitivity is ensured, after the terminal device acquires the first ambient light information, the motion state of the terminal device may be determined again, and the motion state may be determined as the second motion state. And then determining a subsequent mode for acquiring the ambient light information according to the relationship between the second motion state and the first motion state.
The implementation manner of determining the second motion state of the terminal device may refer to the implementation manner of determining the first motion state of the terminal device in the foregoing embodiments, and is not described in detail here.
And S106, when the second motion state is different from the first motion state, acquiring a second period.
And the second period is a preset detection period corresponding to the second motion state.
The implementation manner of acquiring the second period may refer to the implementation manner of acquiring the first period in the foregoing embodiments, and is not described in detail here.
And S107, determining a second detection starting time according to the second period and the first detection starting time.
After the second period is obtained, a time after the first detection start time and separated from the first detection start time by a second period may be determined as a second detection start time.
And S108, when the second detection starting time is reached, acquiring second ambient light information by using the camera.
And when the second detection starting moment is reached, the camera of the terminal equipment can be started again, and the camera is used for acquiring the ambient light information of the environment where the terminal equipment is located. In the embodiment of the present application, the environmental optical information obtained this time is the second environmental optical information. Similarly, in order to reduce the power consumption of the terminal device and improve the performance of the terminal device, the camera may be turned off after the second ambient light information is acquired.
The implementation manner of using the camera to obtain the second ambient light information may refer to the implementation manner of using the camera to obtain the first ambient light information in the foregoing embodiments, and details are not described here.
In some optional embodiments of the present application, after the second ambient light information is obtained, the brightness of the display screen of the terminal device may also be adjusted according to the second ambient light information, and a specific implementation manner may refer to an implementation manner in the foregoing embodiment, where the brightness of the display screen of the terminal device is adjusted according to the first ambient light information, and details are not described here.
And step S109, when the second motion state is the same as the first motion state, determining a third detection starting time according to the first period and the first detection starting time.
When the second motion state is the same as the first motion state, the first period may be used as a detection period, and the ambient light information of the environment where the terminal device is located may be periodically acquired. Based on this, a time after the first detection start time and separated from the first detection start time by a first period may be determined as the third detection start time.
And step S110, when the third detection starting time is reached, the camera is used for acquiring third ambient light information.
And when the third detection starting moment is reached, the camera of the terminal equipment can be started again, and the camera is used for acquiring the ambient light information of the environment where the terminal equipment is located. In the embodiment of the present application, the environmental optical information obtained this time is the third environmental optical information. Similarly, in order to reduce the power consumption of the terminal device and improve the performance of the terminal device, the camera may be turned off after the third ambient light information is acquired.
The implementation manner of using the camera to obtain the third ambient light information may refer to the implementation manner of using the camera to obtain the first ambient light information in the foregoing embodiments, and details are not described here.
In some optional embodiments of the present application, after the third ambient light information is obtained, the brightness of the display screen of the terminal device may be further adjusted according to the third ambient light information, and a specific implementation manner may refer to an implementation manner in the foregoing embodiment, where the brightness of the display screen of the terminal device is adjusted according to the first ambient light information, and details are not described here.
In the subsequent detection process of the ambient light information, referring to the contents of steps S105 to S110 in the foregoing embodiment, after the ambient light information is obtained each time, the motion state of the terminal device may be determined again, when the motion state determined this time is the same as the motion state determined last time, the detection start time of this time is determined according to the preset detection period corresponding to the motion state determined last time and the detection start time of the last time, and when the detection start time of this time is reached, the camera of the terminal device is used to obtain the ambient light information. Or when the determined motion state is different from the previously determined motion state, determining the detection starting time according to the preset detection period corresponding to the determined motion state and the previously detected starting time, and acquiring the ambient light information by using a camera of the terminal device when the detection starting time is reached.
After the ambient light information is acquired each time, the brightness of the display screen of the terminal device may also be adjusted according to the ambient light information acquired this time, and the specific implementation manner may refer to the implementation manner in the foregoing embodiment of adjusting the brightness of the display screen of the terminal device according to the first ambient light information, which is not described in detail here.
In the method for acquiring ambient light information by using a camera according to the embodiment of the present application, a first motion state of a terminal device is determined, a preset detection period corresponding to the first motion state is acquired, a first detection start time is determined according to the preset detection period corresponding to the first motion state, when the first detection start time is reached, the camera of the terminal device is used to acquire the first ambient light information, a second motion state of the terminal device is determined, when the second motion state is different from the first motion state, a preset detection period corresponding to the second motion state is acquired, a second detection start time is determined according to the preset detection period corresponding to the second motion state and the first detection start time, and when the second detection start time is reached, the camera of the terminal device is used to acquire the second ambient light information. Therefore, by the method, the detection period of the camera for detecting the ambient light can be adjusted in time according to the motion state of the terminal equipment, so that when the terminal equipment moves faster, the detection period can be reduced, the detection sensitivity can be improved, and the user experience can be improved.
The various method embodiments described herein may be implemented as stand-alone solutions or combined in accordance with inherent logic and are intended to fall within the scope of the present application.
It is to be understood that, in the above-described method embodiments, the method and operations implemented by the terminal device may also be implemented by a component (e.g., a chip or a circuit) that can be used for the terminal device.
The above-mentioned scheme provided by the embodiment of the present application is mainly introduced from the perspective of interaction between each network element. It will be understood that each network element, in order to implement the above functions, includes a corresponding hardware structure or software module or a combination of both for performing each function. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. 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 embodiment of the present application, the terminal device and the like may be divided into the functional modules according to the above method example, for example, each functional module may be divided for each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation. The following description will be given by taking an example of dividing each function module for each function.
The method provided by the embodiment of the present application is described in detail above with reference to fig. 1. Hereinafter, the apparatus provided in the embodiment of the present application will be described in detail with reference to fig. 2 and 3. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments, and therefore, for brevity, details are not repeated here, since the details that are not described in detail may be referred to the above method embodiments.
Referring to fig. 2, fig. 2 is a block diagram illustrating a structure of an embodiment of an apparatus for acquiring ambient light information using a camera according to the present disclosure. The apparatus may be a terminal device, or may be a component included in the terminal device, which is not limited in this application. As shown in fig. 2, the apparatus 200 may include: a determining module 201, an obtaining module 202 and a processing module 203. The apparatus 200 may be used to perform the actions performed by the terminal device in the above method embodiments.
For example: the determining module 201 may be configured to determine a first motion state of the terminal device. The obtaining module 202 may be configured to obtain a first period, where the first period is a preset detection period corresponding to the first motion state. The determining module 201 may be further configured to determine a first detection starting time according to the first period. The processing module 203 may be configured to acquire first ambient light information by using a camera of the terminal device when the first detection start time is reached. The determining module 201 may be further configured to determine a second motion state of the terminal device. The obtaining module 202 may be further configured to obtain a second period when the second motion state is different from the first motion state, where the second period is a preset detection period corresponding to the second motion state. The determining module 201 may be further configured to determine a second detection start time according to the second period and the first detection start time. The processing module 203 may be further configured to acquire second ambient light information by using the camera when the second detection start time is reached.
Optionally, the determining module 201 may be further configured to determine a third detection starting time according to the first period and the first detection starting time when the second motion state is the same as the first motion state. The processing module 203 may be further configured to acquire third ambient light information by using the camera when the third detection start time is reached.
Optionally, the processing module 203 is specifically configured to: acquiring first camera shooting information of the camera; and acquiring the first ambient light information according to the first camera information.
Optionally, the determining module 201 is specifically configured to: acquiring a first time length, wherein the first time length is the time length for keeping a display screen of the terminal equipment in a bright screen state; and when the first time length is larger than a preset screen-on time length threshold value, determining a first motion state of the terminal equipment.
Optionally, the determining module 201 is specifically configured to: acquiring a first acceleration detection value of the terminal equipment; and determining a first motion state of the terminal equipment according to the first acceleration detection value.
Optionally, the processing module 203 may be further configured to: and after the camera is used for obtaining the ambient light information each time, adjusting the brightness of the display screen of the terminal equipment according to the ambient light information.
That is, the apparatus 200 may implement steps or flows corresponding to those executed by the terminal device in the method shown in fig. 1 according to the embodiment of the present application, and the apparatus 200 may include modules for executing the method executed by the terminal device in the method shown in fig. 1. Also, the modules and other operations and/or functions described above in the apparatus 200 are respectively for implementing the corresponding steps of the method shown in fig. 1. For example, the determining module 201 in the apparatus 200 may be configured to perform steps S101, S103, S105, and S107 in the method shown in fig. 1, the obtaining module 202 may be configured to perform steps S102 and S106 in the method shown in fig. 1, and the processing module 203 may be configured to perform steps S104 and S108 in the method shown in fig. 1.
It should be understood that the specific processes of the modules for executing the corresponding steps are already described in detail in the above method embodiments, and therefore, for brevity, detailed descriptions thereof are omitted.
The embodiment of the present application further provides a terminal device, which may include at least one camera and the apparatus 200. In a possible implementation manner, the at least one camera included in the terminal device may be all rear cameras of the terminal device. In another possible implementation manner, the at least one camera included in the terminal device may be all front-facing cameras of the terminal device. In other possible implementations, the terminal device may include both a front camera and a rear camera. Furthermore, when the camera of the terminal device is used to obtain the ambient light information of the environment where the terminal device is located, the terminal device may call one camera of the at least one camera to obtain the ambient light information.
The terminal device may execute the functions of the terminal device in the above method embodiments, or implement the steps or processes executed by the terminal device in the above method embodiments.
The terminal device may include a processor and a transceiver. Optionally, the terminal device may further include a memory. Wherein the processor, the transceiver and the memory can communicate with each other through the internal connection path to transmit control and/or data signals, the memory is used for storing computer programs or instructions, and the processor is used for calling and running the computer programs or instructions from the memory to control the transceiver to receive signals and/or transmit signals.
The processor may be combined with memory to form a processing device, the processor being configured to execute computer programs or instructions stored in the memory to implement the functions described above. In particular implementations, the memory may be integrated within the processor or may be separate from the processor.
The above-mentioned transceivers may also be referred to as transceiving units. A transceiver may include a receiver (or receiver, receiving circuit) and/or a transmitter (or transmitter, transmitting circuit). Wherein the receiver is used for receiving signals, and the transmitter is used for sending signals.
It should be understood that the terminal device described above is capable of implementing the various processes involving the terminal device in the method embodiments shown above. The operation and/or function of each module in the terminal device are respectively for implementing the corresponding flow in the above method embodiment. Specifically, reference may be made to the description of the above method embodiments, and the detailed description is appropriately omitted herein to avoid redundancy.
The embodiment of the application also provides a processing device which comprises a processor and an interface. The processor may be adapted to perform the method of the above-described method embodiments.
It should be understood that the processing means may be a chip. For example, referring to fig. 3, fig. 3 is a block diagram of a chip according to an embodiment of the present disclosure. The chip shown in fig. 3 may be a general-purpose processor or may be a dedicated processor. The chip 300 comprises a processor 301. The processor 301 may be configured to support the apparatus shown in fig. 2 to execute the technical solution shown in fig. 1.
Optionally, the chip 300 may further include a transceiver 302, where the transceiver 302 is configured to receive control of the processor 301, and is configured to support the apparatus shown in fig. 2 to execute the technical solution shown in fig. 1. Optionally, the chip 300 shown in fig. 3 may further include: a storage medium 303.
It should be noted that the chip shown in fig. 3 can be implemented by using the following circuits or devices: one or more Field Programmable Gate Arrays (FPGAs), Programmable Logic Devices (PLDs), Application Specific Integrated Circuits (ASICs), system chips (socs), Central Processing Units (CPUs), Network Processors (NPs), digital signal processing circuits (DSPs), Micro Controller Units (MCUs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuitry, or any combination of circuitry capable of performing the various functions described throughout this application.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor. To avoid repetition, it is not described in detail here.
It should be noted that the processor in the embodiments of the present application may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, Synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
According to the method provided by the embodiment of the present application, an embodiment of the present application further provides a computer program product, which includes: computer program or instructions which, when run on a computer, cause the computer to perform the method of any one of the embodiments shown in figure 1.
According to the method provided by the embodiment of the present application, a computer storage medium is further provided, and the computer storage medium stores a computer program or instructions, and when the computer program or instructions runs on a computer, the computer is caused to execute the method of any one of the embodiments shown in fig. 1.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer program or instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
As used in this specification, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from two components interacting with another component in a local system, distributed system, and/or across a network such as the internet with other systems by way of the signal).
Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps (step) 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.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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 modules described as separate parts may or may not be physically separate, and parts displayed as modules 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 modules in the embodiments of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The device, the terminal device, the computer storage medium, the computer program product, and the chip for acquiring ambient light information by using the camera provided by the embodiment of the present application are all configured to execute the method provided above, and therefore, the beneficial effects achieved by the device, the terminal device, the computer storage medium, the computer program product, and the chip can refer to the beneficial effects corresponding to the method provided above, and are not described herein again.
It should be understood that, in the embodiments of the present application, the execution sequence of each step should be determined by its function and inherent logic, and the size of the sequence number of each step does not mean the execution sequence, and does not limit the implementation process of the embodiments.
All parts of the specification are described in a progressive mode, the same and similar parts of all embodiments can be referred to each other, and each embodiment is mainly introduced to be different from other embodiments. In particular, as for the embodiments of the apparatus, the terminal device, the computer storage medium, the computer program product, and the chip for acquiring the ambient light information using the camera, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the description in the method embodiments.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
The above-described embodiments of the present application do not limit the scope of the present application.

Claims (16)

1. A method for acquiring ambient light information by using a camera is applied to a terminal device, and the method sets a corresponding preset detection period for each motion state of the terminal device, and comprises the following steps:
determining a first motion state of the terminal device;
acquiring a first period, wherein the first period is a preset detection period corresponding to the first motion state;
determining a first detection starting time according to the first period, wherein the first detection starting time is used for starting detection of the ambient light information, and the preset detection period is the duration of two adjacent ambient light information detections;
when the first detection starting moment is reached, a camera of the terminal equipment is used for acquiring first ambient light information;
determining a second motion state of the terminal device;
when the second motion state is different from the first motion state, acquiring a second period, wherein the second period is a preset detection period corresponding to the second motion state;
determining a second detection starting time according to the second period and the first detection starting time;
and when the second detection starting moment is reached, the camera is used for acquiring second ambient light information.
2. The method of claim 1, further comprising:
when the second motion state is the same as the first motion state, determining a third detection starting time according to the first period and the first detection starting time;
and when the third detection starting moment is reached, the camera is used for acquiring third ambient light information.
3. The method according to claim 1, wherein the acquiring first ambient light information using a camera of the terminal device comprises:
acquiring first camera shooting information of the camera;
and acquiring the first ambient light information according to the first camera information.
4. The method according to any one of claims 1 to 3, wherein the determining the first motion state of the terminal device comprises:
acquiring a first time length, wherein the first time length is the time length for keeping a display screen of the terminal equipment in a bright screen state;
and when the first time length is larger than a preset screen-on time length threshold value, determining a first motion state of the terminal equipment.
5. The method according to any one of claims 1 to 3, wherein the determining the first motion state of the terminal device comprises:
acquiring a first acceleration detection value of the terminal equipment;
and determining a first motion state of the terminal equipment according to the first acceleration detection value.
6. A method according to any one of claims 1 to 3, characterized in that the method further comprises:
and after the camera is used for obtaining the ambient light information each time, adjusting the brightness of the display screen of the terminal equipment according to the ambient light information.
7. An apparatus for acquiring ambient light information by using a camera, the apparatus being configured to set a corresponding preset detection period for each motion state of a terminal device, the apparatus comprising:
the determining module is used for determining a first motion state of the terminal equipment;
the acquisition module is used for acquiring a first period, wherein the first period is a preset detection period corresponding to the first motion state;
the determining module is further configured to determine a first detection starting time according to the first period, where the first detection starting time is used to start detection of the ambient light information, and the preset detection period is a duration of two adjacent detections of the ambient light information;
the processing module is used for acquiring first ambient light information by using a camera of the terminal equipment when the first detection starting time is reached;
the determining module is further configured to determine a second motion state of the terminal device;
the obtaining module is further configured to obtain a second period when the second motion state is different from the first motion state, where the second period is a preset detection period corresponding to the second motion state;
the determining module is further configured to determine a second detection start time according to the second period and the first detection start time;
and the processing module is also used for acquiring second ambient light information by using the camera when the second detection starting time is reached.
8. The apparatus of claim 7,
the determining module is further configured to determine a third detection starting time according to the first period and the first detection starting time when the second motion state is the same as the first motion state;
and the processing module is further configured to use the camera to acquire third ambient light information when the third detection start time is reached.
9. The apparatus of claim 7, wherein the processing module is specifically configured to:
acquiring first camera shooting information of the camera;
and acquiring the first ambient light information according to the first camera information.
10. The apparatus according to any one of claims 7 to 9, wherein the determining module is specifically configured to:
acquiring a first time length, wherein the first time length is the time length for keeping a display screen of the terminal equipment in a bright screen state;
and when the first time length is larger than a preset screen-on time length threshold value, determining a first motion state of the terminal equipment.
11. The apparatus according to any one of claims 7 to 9, wherein the determining module is specifically configured to:
acquiring a first acceleration detection value of the terminal equipment;
and determining a first motion state of the terminal equipment according to the first acceleration detection value.
12. The apparatus of any of claims 7 to 9, wherein the processing module is further configured to:
and after the camera is used for obtaining the ambient light information each time, adjusting the brightness of the display screen of the terminal equipment according to the ambient light information.
13. A terminal device, characterized in that it comprises at least one camera and the apparatus of any of claims 7 to 12.
14. An apparatus for acquiring ambient light information using a camera, comprising a processor and a memory;
the processor for executing a computer program or instructions stored in the memory, which when executed, causes the apparatus to carry out the method of any one of claims 1 to 6.
15. A computer storage medium comprising computer programs or instructions which, when executed, perform the method of any one of claims 1 to 6.
16. A chip comprising a processor coupled to a memory for executing a computer program or instructions stored in the memory, the computer program or instructions when executed causing the method of any of claims 1 to 6 to be performed.
CN202010917684.7A 2020-05-15 2020-09-03 Method and device for acquiring ambient light information by using camera and terminal equipment Active CN112102796B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010414903 2020-05-15
CN202010414903X 2020-05-15

Publications (2)

Publication Number Publication Date
CN112102796A CN112102796A (en) 2020-12-18
CN112102796B true CN112102796B (en) 2022-03-08

Family

ID=73757318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010917684.7A Active CN112102796B (en) 2020-05-15 2020-09-03 Method and device for acquiring ambient light information by using camera and terminal equipment

Country Status (1)

Country Link
CN (1) CN112102796B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518178B (en) * 2021-04-22 2022-09-20 中煤科工集团重庆研究院有限公司 Video image acquisition device for slope safety monitoring

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704785A (en) * 2014-11-28 2016-06-22 联芯科技有限公司 Network searching method, device and mobile terminal
CN106131828A (en) * 2016-06-30 2016-11-16 维沃移动通信有限公司 A kind of WiFi password sharing method, mobile terminal and Cloud Server
CN107193439A (en) * 2017-05-24 2017-09-22 北京小米移动软件有限公司 Illumination control method and device
CN109545120A (en) * 2018-11-29 2019-03-29 努比亚技术有限公司 Screen photosensitive sensors adjusting method, mobile terminal and computer readable storage medium
CN110784915A (en) * 2019-10-30 2020-02-11 维沃移动通信有限公司 Power consumption control method of electronic equipment and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7145454B2 (en) * 2004-01-26 2006-12-05 Nokia Corporation Method, apparatus and computer program product for intuitive energy management of a short-range communication transceiver associated with a mobile terminal
CN108281117A (en) * 2013-07-24 2018-07-13 联想(北京)有限公司 A kind of display unit adjusting method and system
CN105407458B (en) * 2015-10-27 2020-07-31 麒和科技(南京)有限公司 Method and device for calling GPS (global positioning system) pre-estimated position information by mobile terminal
US10565956B2 (en) * 2016-11-23 2020-02-18 Motorola Mobility Llc Method and apparatus for light spectrum filtering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704785A (en) * 2014-11-28 2016-06-22 联芯科技有限公司 Network searching method, device and mobile terminal
CN106131828A (en) * 2016-06-30 2016-11-16 维沃移动通信有限公司 A kind of WiFi password sharing method, mobile terminal and Cloud Server
CN107193439A (en) * 2017-05-24 2017-09-22 北京小米移动软件有限公司 Illumination control method and device
CN109545120A (en) * 2018-11-29 2019-03-29 努比亚技术有限公司 Screen photosensitive sensors adjusting method, mobile terminal and computer readable storage medium
CN110784915A (en) * 2019-10-30 2020-02-11 维沃移动通信有限公司 Power consumption control method of electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN112102796A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US10484589B2 (en) Electronic device and image capturing method thereof
CN109167931B (en) Image processing method, device, storage medium and mobile terminal
CN107943409B (en) Touch screen control method and device
US10558511B2 (en) Method and device for evaluating system fluency, and UE
US10708512B2 (en) Method and device for capturing image and storage medium
JP2017510203A (en) Method and apparatus for controlling image capture
CN109565717B (en) Method and device for configuring bandwidth part
US9967830B2 (en) Method for controlling content transmission and electronic device for supporting the same
US11153498B2 (en) Image processing method and electronic device supporting same
CN104917581A (en) System time correction method and device, terminal and router
US11178501B2 (en) Methods, devices, and computer-readable medium for microphone selection
CN106253996B (en) Sensitivity attenuation test method and device
US11388652B2 (en) Method and apparatus for indicating position of cell-defining synchronization signal block and searching for the same, and base station
KR102477522B1 (en) Electronic device and method for adjusting exposure of camera of the same
CN112102796B (en) Method and device for acquiring ambient light information by using camera and terminal equipment
US11917562B2 (en) Vehicle-to-everything synchronization method and device
US11265924B2 (en) Method and device for data transmission
US20200344627A1 (en) Network measurement method and device, and storage medium
CN109547703B (en) Shooting method and device of camera equipment, electronic equipment and medium
WO2020258050A1 (en) Method and apparatus for determining wireless resource
CN106535147B (en) Communication signal processing method and device
US10187498B2 (en) Method and apparatus for setting waiting time duration
CN113302967B (en) Measurement configuration method, measurement reporting method, measurement configuration device, measurement reporting device and storage medium
CN113508610B (en) Capability acquisition method and device, capability indication method and device
CN113316222A (en) Data processing method and device, electronic equipment 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
GR01 Patent grant
GR01 Patent grant