CN115691416A - Ambient light collection method and device - Google Patents
Ambient light collection method and device Download PDFInfo
- Publication number
- CN115691416A CN115691416A CN202211384430.9A CN202211384430A CN115691416A CN 115691416 A CN115691416 A CN 115691416A CN 202211384430 A CN202211384430 A CN 202211384430A CN 115691416 A CN115691416 A CN 115691416A
- Authority
- CN
- China
- Prior art keywords
- screen
- ambient light
- pwm dimming
- width
- frequency
- 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.)
- Pending
Links
Images
Landscapes
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The application discloses an ambient light collection method and device, and belongs to the technical field of electronic equipment. The ambient light acquisition method includes: receiving an ambient light acquisition request sent by an ambient light sensor; responding to an ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of the electronic device and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen corresponding to ambient light acquisition; wherein the target width is greater than a second width of the light-transmitting hole for transmitting ambient light; and sending a target screen PWM dimming signal at a first frequency and a second frequency so that the width of a PWM dimming off interval is greater than a second width when the ambient light sensor collects ambient light, wherein the second frequency is the frequency of the original screen PWM dimming signal.
Description
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to an ambient light collection method and device.
Background
With the continuous improvement of Organic Light-Emitting Diode (OLED) technology, high-frequency Pulse Width Modulation (PWM) dimming technology has been gradually applied to various electronic devices (e.g., mobile phones, tablet computers, etc.). Compared with a low-frequency PWM dimming technology, the high-frequency PWM dimming technology can reduce eye discomfort caused by screen flicker, and improves user experience.
In the related art, when adjusting the screen brightness, the ambient light sensor disposed under the screen and operating in the PWM dimming off interval needs to be used to collect the ambient light.
However, in some cases, for example, when dimming is performed by using a high-frequency PWM dimming technique or the screen brightness is high, the width of the PWM dimming off interval is not enough to cover the width of the light hole for transmitting the ambient light on the shading foam on the back of the screen, as shown in fig. 1, (1) is the PWM dimming off interval, and (2) is the light hole, so that the ambient light sensor also collects the light emitted by the screen when collecting the ambient light, the collected ambient light is inaccurate, and the accuracy of calculation of the ambient light illuminance, the color temperature and the like is affected, and the accuracy of screen brightness adjustment is affected.
Disclosure of Invention
The embodiment of the application aims to provide an ambient light collection method and an ambient light collection device, which can solve the problem of inaccurate ambient light collection.
In a first aspect, an embodiment of the present application provides an ambient light collection method, including:
receiving an ambient light acquisition request sent by an ambient light sensor;
responding to an ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of the electronic equipment and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of a screen corresponding to the ambient light acquisition; wherein the target width is greater than a second width of the light-transmitting hole for transmitting ambient light;
and sending a target screen PWM dimming signal at a first frequency and a second frequency so that the width of a PWM dimming off interval is greater than a second width when an ambient light sensor collects ambient light, wherein the second frequency is the frequency of the original screen PWM dimming signal.
In a second aspect, an embodiment of the present application provides an ambient light collection apparatus, including:
the receiving module is used for receiving an ambient light acquisition request sent by an ambient light sensor;
the first determining module is used for responding to an ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of the electronic equipment and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of a screen corresponding to the ambient light acquisition; wherein the target width is greater than a second width of the light-transmitting hole for transmitting ambient light;
the transmitting module is used for transmitting a target screen PWM dimming signal at a first frequency and a second frequency so that the width of a PWM dimming closing interval is larger than a second width when the ambient light sensor collects ambient light, wherein the second frequency is the frequency of the original screen PWM dimming signal.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored in a storage medium, which is executed by at least one processor to implement the steps of the method according to the first aspect.
In the embodiment of the application, after an ambient light acquisition request sent by an ambient light sensor is received, a first frequency of a screen PWM dimming signal is determined according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of an electronic device and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen, which correspond to the ambient light acquisition; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. Make ambient light sensor when gathering ambient light, PWM adjusts luminance and closes the width of interval and be greater than the width that is used for seeing through the light trap of ambient light, and PWM adjusts luminance and closes the width that interval can cover the light trap, and ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improves the accuracy that screen brightness adjusted.
Drawings
Fig. 1 is a schematic diagram illustrating a PWM dimming off interval and a position of a light hole during ambient light collection in the related art;
fig. 2 is a schematic flowchart of an ambient light acquisition method provided in an embodiment of the present application;
FIG. 3 is a schematic width diagram of various objects provided by embodiments of the present application;
fig. 4 is a first schematic diagram of sending out a target screen PWM dimming signal according to an embodiment of the present application;
fig. 5 is a second schematic diagram of sending out a target screen PWM dimming signal according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an ambient light collection device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 8 is a hardware configuration diagram of an electronic device implementing an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below clearly with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The ambient light collection method and device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 2 is a schematic flowchart of an ambient light collection method according to an embodiment of the present application. As shown in fig. 2, the ambient light collection method may include:
s201: receiving an ambient light acquisition request sent by an ambient light sensor;
s202: responding to an ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of the electronic equipment and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of a screen corresponding to the ambient light acquisition; wherein the target width is greater than a second width of the light hole for transmitting ambient light;
s203: and sending a target screen PWM dimming signal at a first frequency and a second frequency so that the width of a PWM dimming off interval is greater than a second width when an ambient light sensor collects ambient light, wherein the second frequency is the frequency of the original screen PWM dimming signal.
Specific implementations of the above steps will be described in detail below.
In the embodiment of the application, after an ambient light acquisition request sent by an ambient light sensor is received, a first frequency of a screen PWM dimming signal is determined according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of an electronic device and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen, which correspond to the ambient light acquisition; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. Make ambient light sensor when gathering ambient light, PWM adjusts luminance and closes the width of interval and be greater than the width that is used for seeing through the light trap of ambient light, and PWM adjusts luminance and closes the width that the interval width can cover the light trap, and ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculations such as ambient illuminance and colour temperature, improves the accuracy of screen brightness control.
In some possible implementations of the embodiments of the present application, the first end and the second end in the embodiments of the present application may respectively refer to a top end and a bottom end of the screen, where the top end and the bottom end of the screen are an upper edge and a lower edge of the screen, respectively.
In some possible implementations of the embodiment of the present application, the widths of the objects, such as the target width of the PWM dimming off interval, the width of the PWM dimming on interval, the width of the light hole, the total length of the screen, and the distance from the light hole to the top end of the screen, corresponding to the ambient light collection are as shown in fig. 3.
Wherein, in FIG. 3, W 1 Target width, W, of corresponding PWM dimming off interval for ambient light collection 2 Width, W, of the light-transmitting hole 3 Width, W, of the turn-on interval for PWM dimming 4 Total length of screen, W 0 The distance from the light hole to the top of the screen.
The transmission speed of the screen PWM dimming signal is W 4 /T 4 Wherein, T 4 The PWM dimming signal is transmitted for a first duration from the top to the bottom of the screen.
The first frequency of the screen PWM dimming signal:
it will also be appreciated that the screen PWM dimming signal is transmitted to W 1 +W 3 The time used is (W) 1 +W 3 )×T 4 /W 4 Then the first frequency of the screen PWM dimming signal
Therefore, the first frequency F of the screen PWM dimming signal may be calculated according to the following equation (1):
when the transmission range of the target screen PWM dimming signal is the entire screen, the sending of the target screen PWM dimming signal is shown in fig. 4, and fig. 4 is a first schematic diagram of sending the target screen PWM dimming signal according to the embodiment of the present application.
It is understood that, in the present embodiment, the target screen PWM dimming signal includes two frequencies (the first frequency and the second frequency described above), i.e., the target screen PWM dimming signal is a mixed PWM dimming signal.
In this application embodiment, on the one hand, can guarantee when ambient light gathers that PWM adjusts luminance closes the width of interval and is greater than the width of light trap, and PWM adjusts luminance the width that closes the interval and can cover the width of light trap, and ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering. On the other hand, when the ambient light is not collected, high-frequency PWM dimming can be ensured, and eye discomfort caused by screen flicker is reduced.
In some possible implementations of the embodiments of the present application, the screen may include a first area and a second area, wherein the first area includes an area opposite to the light-transmitting hole, and the second area is an area other than the first area; the target screen PWM dimming signal comprises a first screen PWM dimming signal and an original screen PWM dimming signal; s203 may include: in the first area, sending out a first screen PWM dimming signal at a first frequency; in the second region, the original screen PWM dimming signal is emitted at a second frequency.
Emitting the target screen PWM dimming signal is shown in fig. 5, and fig. 5 is a second schematic diagram of emitting the target screen PWM dimming signal according to the embodiment of the present application.
In fig. 5, the screen includes a region 1 and a region 2, the first screen PWM dimming signal is transmitted at the first frequency only in the region 1, and the original screen PWM dimming signal is transmitted at the frequency of the original screen PWM dimming signal only in the region 2.
In the embodiment of the application, because the first screen PWM dimming signal is transmitted only in the region opposite to the light-transmitting hole included in the screen, and the original screen PWM dimming signal is transmitted only in the other region included in the screen, on one hand, it can be ensured that when ambient light is collected, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, the width of the PWM dimming off interval can cover the width of the light-transmitting hole, the ambient light sensor does not collect light emitted by the screen when collecting ambient light, and the accuracy of the collected ambient light can be ensured. On the other hand, when the ambient light is collected, the frequency of the screen PWM dimming signals of other areas cannot be influenced, so that high-frequency PWM dimming can be ensured in other areas, and eye discomfort caused by screen flicker is reduced.
In some possible implementations of the embodiments of the present application, the ambient light collection method provided in the embodiments of the present application may further include: calculating a second time period T for the ambient light sensor to collect the ambient light according to the following formula (2) 2 :
T 2 =W 1 ×T 4 /W 4 -W 2 ×T 4 /W 4 (2)
In some possible implementations of the embodiments of the present application, the ambient light collection method provided in the embodiments of the present application may further include: calculating the starting time T of the ambient light sensor for collecting the ambient light according to the following formula (3) 0 :
T 0 =(W 0 +W 2 )×T 4 /W 4 (3)
It can be understood that, after the ambient light collection request is sent by the ambient light sensor, it takes a certain time for the screen PWM dimming signal to reach the light hole and the width of the PWM dimming off interval to completely cover the width of the light hole, and therefore, the ambient light needs to be collected when the width of the PWM dimming off interval completely covers the width of the light hole.
Time used when PWM dimming signal of target screen is transmitted to light holePWM dimming signal transmission light hole W of target screen 2 Time of useThe start time T of the ambient light sensor for collecting the ambient light 0 =t 2 +t 1 =W 0 ×T 4 /W 4 +W 2 ×T 4 /W 4 =(W 0 +W 2 )×T 4 /W 4 。
It will also be appreciated that the target screen PWM dimming signal is transmitted through the light-transmitting aperture a distance W 0 +W 2 Target screen PWM dimming Signal Transmission W 0 +W 2 The used time is the starting time T of the ambient light sensor for collecting the ambient light 0 =(W 0 +W 2 )×T 4 /W 4 。
In this application embodiment, can guarantee that PWM adjusts luminance and closes the width that the interval width covers the light trap completely, the ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improve the accuracy of screen brightness control.
It should be noted that, in the ambient light collection method provided in the embodiments of the present application, the execution subject may be an ambient light collection device. In the embodiment of the present application, an ambient light collection device executing an ambient light collection method is taken as an example to describe the ambient light collection device provided in the embodiment of the present application.
Fig. 6 is a schematic structural diagram of an ambient light collection device according to an embodiment of the present application. As shown in fig. 6, the ambient light collection device 600 may include:
a receiving module 601, configured to receive an ambient light acquisition request sent by an ambient light sensor;
a first determining module 602, configured to, in response to an ambient light acquisition request, determine a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of an electronic device, and a first duration of a screen PWM dimming signal transmitted from a first end to a second end of a screen when ambient light is acquired; wherein the target width is greater than a second width of the light-transmitting hole for transmitting ambient light;
the transmitting module 603 is configured to transmit a target screen PWM dimming signal at a first frequency and a second frequency, so that when the ambient light sensor collects ambient light, a width of a PWM dimming off interval is greater than a second width, where the second frequency is a frequency of the original screen PWM dimming signal.
In the embodiment of the application, after an ambient light acquisition request sent by an ambient light sensor is received, a first frequency of a screen PWM dimming signal is determined according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of an electronic device and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen, which correspond to the ambient light acquisition; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. Make ambient light sensor when gathering ambient light, PWM adjusts luminance and closes the width of interval and be greater than the width that is used for seeing through the light trap of ambient light, and PWM adjusts luminance and closes the width that interval can cover the light trap, and ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improves the accuracy that screen brightness adjusted.
In some possible implementations of embodiments of the present application, the screen includes a first area and a second area, wherein the first area includes an area opposite to the light-transmissive hole, and the second area is an area other than the first area; the target screen PWM dimming signal comprises a first screen PWM dimming signal and an original screen PWM dimming signal;
the transmitting module 603 may include:
the first sending submodule is used for sending a first screen PWM dimming signal at a first frequency in a first area;
and the second emission submodule is used for emitting the original screen PWM dimming signal at a second frequency in a second area.
In the embodiment of the application, because the first screen PWM dimming signal is transmitted only in the region opposite to the light-transmitting hole included in the screen, and the original screen PWM dimming signal is transmitted only in the other region included in the screen, on one hand, it can be ensured that when ambient light is collected, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, the width of the PWM dimming off interval can cover the width of the light-transmitting hole, the ambient light sensor does not collect light emitted by the screen when collecting ambient light, and the accuracy of the collected ambient light can be ensured. On the other hand, when the ambient light is collected, the frequency of the screen PWM dimming signals of other areas cannot be influenced, so that high-frequency PWM dimming can be ensured in other areas, and eye discomfort caused by screen flicker is reduced.
In some possible implementations of the embodiments of the present application, the first determining module may be specifically configured to:
and calculating the first frequency of the screen PWM dimming signal according to the formula (1).
In some possible implementations of embodiments of the present application, the ambient light collection apparatus 600 may further include:
and the second determining module is used for calculating a second time length for the ambient light sensor to collect the ambient light according to the formula (2).
In some possible implementations of embodiments of the present application, the ambient light collection apparatus 600 may further include:
and the third determining module is used for calculating the starting time of the ambient light sensor for collecting the ambient light according to the formula (3).
In this application embodiment, can guarantee that PWM adjusts luminance and closes the width that the interval width covers the light trap completely, the ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improve the accuracy of screen brightness control.
The ambient light collection device in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (Network Attached Storage, NAS), a personal computer (NAS), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not limited in particular.
The ambient light collection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The ambient light collection device provided in the embodiment of the present application can implement each process in the ambient light collection method embodiments of fig. 2 to fig. 5, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in the embodiment of the present application, and includes a processor 701 and a memory 702, where the memory 702 stores a program or an instruction that can be executed on the processor 701, and when the program or the instruction is executed by the processor 701, the steps of the embodiment of the ambient light acquisition method are implemented, and the same technical effects can be achieved, and are not described again here to avoid repetition.
In some possible implementations of embodiments of the present Application, processor 701 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of embodiments of the present Application.
In some possible implementations of embodiments of the present application, the Memory 702 may include Read-Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory 702 comprises one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the ambient light acquisition methods according to embodiments of the application.
Fig. 8 is a hardware configuration diagram of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation to the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein the processor 810 is configured to: receiving an ambient light acquisition request sent by an ambient light sensor; in response to the ambient light collection request, determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of the electronic device 800 and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen corresponding to the ambient light collection; wherein the target width is greater than a second width of the light hole for transmitting ambient light; and sending a target screen PWM dimming signal at a first frequency and a second frequency so that the width of a PWM dimming off interval is greater than a second width when the ambient light sensor collects ambient light, wherein the second frequency is the frequency of the original screen PWM dimming signal.
In the embodiment of the application, after an ambient light acquisition request sent by an ambient light sensor is received, a first frequency of a screen PWM dimming signal is determined according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total length of a screen of an electronic device and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen, which correspond to the ambient light acquisition; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. Make ambient light sensor when gathering ambient light, PWM adjusts luminance and closes the width of interval and be greater than the width that is used for seeing through the light trap of ambient light, and PWM adjusts luminance and closes the width that interval can cover the light trap, and ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improves the accuracy that screen brightness adjusted.
In some possible implementations of the embodiments of the present application, the screen includes a first area and a second area, wherein the first area includes an area opposite to the light-transmitting hole, and the second area is an area other than the first area; the target screen PWM dimming signal comprises a first screen PWM dimming signal and an original screen PWM dimming signal; processor 810 may be specifically configured to:
in the first area, sending out a first screen PWM dimming signal at a first frequency;
in the second region, the original screen PWM dimming signal is emitted at a second frequency.
In the embodiment of the application, because the first screen PWM dimming signal is transmitted only in the region opposite to the light-transmitting hole included in the screen, and the original screen PWM dimming signal is transmitted only in the other region included in the screen, on one hand, it can be ensured that when ambient light is collected, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, the width of the PWM dimming off interval can cover the width of the light-transmitting hole, the ambient light sensor does not collect light emitted by the screen when collecting ambient light, and the accuracy of the collected ambient light can be ensured. On the other hand, when the ambient light is collected, the frequency of the screen PWM dimming signals of other areas cannot be influenced, so that high-frequency PWM dimming can be ensured in other areas, and eye discomfort caused by screen flicker is reduced.
In some possible implementations of embodiments of the application, the processor 810 may be specifically configured to:
and calculating the first frequency of the screen PWM dimming signal according to the formula (1).
In some possible implementations of embodiments of the present application, the processor 810 may be further configured to:
the second time period for the ambient light sensor to collect the ambient light is calculated according to the above equation (2).
In some possible implementations of embodiments of the present application, the processor 810 may be further configured to:
the start time for the ambient light sensor to collect the ambient light is calculated according to equation (3) above.
In this application embodiment, can guarantee that PWM adjusts luminance and closes the width that the interval width covers the light trap completely, the ambient light sensor can not gather the light that the screen sent when gathering ambient light, can guarantee the accuracy of the ambient light of gathering, and then can improve the accuracy of calculation such as ambient light illuminance and colour temperature, improve the accuracy of screen brightness control.
It should be understood that, in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playing function, an image playing function, etc.), and the like. Further, the memory 809 can include volatile memory or nonvolatile memory, or the memory 809 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 PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 809 in the present embodiment of the application includes, but is not limited to, these and any other suitable types of memory.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned ambient light collection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, and examples of the computer readable storage medium include non-transitory computer readable storage media such as ROM, RAM, magnetic or optical disks, and the like.
The embodiment of the present application further provides a chip, which includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned ambient light collection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, or a system-on-chip.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the above-mentioned embodiments of the ambient light collection method, and achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. An ambient light collection method, the method comprising:
receiving an ambient light acquisition request sent by an ambient light sensor;
responding to the ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of the electronic equipment and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen corresponding to the ambient light acquisition; wherein the target width is greater than a second width of a light transmission hole for transmitting ambient light;
and sending a target screen PWM dimming signal by using the first frequency and the second frequency so that the width of a PWM dimming off interval is greater than the second width when an ambient light sensor collects ambient light, wherein the second frequency is the frequency of an original screen PWM dimming signal.
2. The method of claim 1, wherein the screen comprises a first area and a second area, wherein the first area comprises an area opposite to the light-transmissive hole, and the second area is an area other than the first area; the target screen PWM dimming signal comprises a first screen PWM dimming signal and the original screen PWM dimming signal;
the sending out the target screen PWM dimming signal at the first frequency and the second frequency comprises:
in the first region, emitting the first screen PWM dimming signal at the first frequency;
in the second region, the original screen PWM dimming signal is emitted at the second frequency.
3. The method of claim 1, wherein determining the first frequency of the screen PWM dimming signal according to the target width of the PWM dimming off interval, the first width of the PWM dimming on interval, the total screen length of the electronic device, and the first duration of the screen PWM dimming signal transmitted from the first end to the second end of the screen when the ambient light is collected comprises:
calculating the first frequency according to the following formula:
wherein F is the first frequency, W 1 Is the target width, W 3 Is the first width, W 4 Is the total length of the screen, T 4 Is the first duration.
4. The method of claim 1, further comprising:
calculating a second time period for the ambient light sensor to collect the ambient light according to the following formula:
T 2 =W 1 ×T 4 /W 4 -W 2 ×T 4 /W 4
wherein, T 2 Is the second duration, W 1 Is the target width, W 2 Is the second width, W 4 Is the total length of the screen, T 4 Is the first duration.
5. The method of claim 1, further comprising:
calculating a start time for the ambient light sensor to collect the ambient light according to the following formula:
T 0 =(W 0 +W 2 )×T 4 /W 4
wherein, T 0 Is the start time, W 0 Is the first distance, W 2 Is the second width, W 4 Is the total length of the screen, T 4 Is the first duration.
6. An ambient light collection device, the device comprising:
the receiving module is used for receiving an ambient light acquisition request sent by an ambient light sensor;
the first determining module is used for responding to the ambient light acquisition request, and determining a first frequency of a screen PWM dimming signal according to a target width of a PWM dimming off interval, a first width of a PWM dimming on interval, a total screen length of the electronic equipment and a first duration of transmission of the screen PWM dimming signal from a first end to a second end of the screen corresponding to the ambient light acquisition; wherein the target width is greater than a second width of a light-transmitting aperture for transmitting ambient light;
and the transmitting module is used for transmitting a target screen PWM dimming signal at the first frequency and the second frequency so that the width of a PWM dimming off interval is greater than the second width when the ambient light sensor collects ambient light, wherein the second frequency is the frequency of an original screen PWM dimming signal.
7. The apparatus of claim 6, wherein the screen comprises a first area and a second area, wherein the first area comprises an area opposite to the light-transmissive hole, and the second area is an area other than the first area; the target screen PWM dimming signal comprises a first screen PWM dimming signal and the original screen PWM dimming signal;
the transmission module includes:
the first sending submodule is used for sending the first screen PWM dimming signal at the first frequency in the first area;
a second emitting submodule for emitting the original screen PWM dimming signal at the second frequency in the second region.
8. The apparatus of claim 6, wherein the first determining module is specifically configured to:
calculating the first frequency according to the following formula:
wherein F is the first frequency, W 1 Is the target width, W 3 Is the first width, W 4 Is the total length of the screen, T 4 Is the first duration.
9. The apparatus of claim 6, further comprising:
a second determining module, configured to calculate a second time period for the ambient light sensor to collect the ambient light according to the following formula:
T 2 =W 1 ×T 4 /W 4 -W 2 ×T 4 /W 4
wherein, T 2 Is the second duration, W 1 Is the target width, W 2 Is the second width, W 4 Is the total length of the screen, T 4 Is the first duration.
10. The apparatus of claim 6, further comprising:
a third determining module, configured to calculate a starting time for the ambient light sensor to collect the ambient light according to the following formula:
T 0 =(W 0 +W 2 )×T 4 /W 4
wherein, T 0 Is the start time, W 0 Is the first distance, W 2 Is the second width, W 4 Is the total length of the screen, T 4 Is the first duration.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211384430.9A CN115691416A (en) | 2022-11-07 | 2022-11-07 | Ambient light collection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211384430.9A CN115691416A (en) | 2022-11-07 | 2022-11-07 | Ambient light collection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115691416A true CN115691416A (en) | 2023-02-03 |
Family
ID=85050908
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211384430.9A Pending CN115691416A (en) | 2022-11-07 | 2022-11-07 | Ambient light collection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115691416A (en) |
-
2022
- 2022-11-07 CN CN202211384430.9A patent/CN115691416A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6924901B2 (en) | Photography method and electronic equipment | |
US9478037B2 (en) | Techniques for efficient stereo block matching for gesture recognition | |
CN107846583B (en) | Image shadow compensation method and mobile terminal | |
CN107749046B (en) | Image processing method and mobile terminal | |
CN112954199B (en) | Video recording method and device | |
CN108984066B (en) | Application icon display method and mobile terminal | |
CN109409235B (en) | Image recognition method and device, electronic equipment and computer readable storage medium | |
US20240080572A1 (en) | Photographing method and apparatus, and electronic device | |
CN113126862A (en) | Screen capture method and device, electronic equipment and readable storage medium | |
CN112312019A (en) | Light supplementing method and device and electronic equipment | |
CN111835937A (en) | Image processing method and device and electronic equipment | |
CN105513098B (en) | Image processing method and device | |
CN114242023A (en) | Display screen brightness adjusting method, display screen brightness adjusting device and electronic equipment | |
CN115691416A (en) | Ambient light collection method and device | |
CN105184750A (en) | Method and device of denoising real-time video images on mobile terminal | |
CN113672193B (en) | Audio data playing method and device | |
CN115562539A (en) | Control display method and device, electronic equipment and readable storage medium | |
CN111601031B (en) | Shooting parameter adjusting method and device | |
CN113962840A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN109785226B (en) | Image processing method and device and terminal equipment | |
CN113473012A (en) | Virtualization processing method and device and electronic equipment | |
CN113473008A (en) | Shooting method and device | |
CN109243375B (en) | Device control method, device, storage medium and electronic device | |
CN112532879B (en) | Image processing method and device | |
US20240329813A1 (en) | Screen control methods, devices and storage media |
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 |