Method and device for detecting flicker frequency of ambient light source and electronic equipment

Through the light intensity sensing module and analog-to-digital conversion module composed of photodiodes and audio chips, the water ripple problem of electronic devices in the light source scintillation scene is solved, and high-precision and low-cost light source scintillation frequency detection and camera parameter adjustment are achieved.

CN120333771APending Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410034448.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-09
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, electronic devices are prone to water ripples when taking pictures in a light source scintillation scene, and the accuracy and sampling rate of existing ambient light sensors are low, resulting in poor detection effect of light source signal frequency.

Method used

The light intensity sensing module and analog-to-digital conversion module composed of photodiodes and audio chips are used to detect the flicker frequency of the ambient light source through the high sampling rate and high quantization accuracy of the audio chip, and the flicker frequency is calculated using the data processing module to adjust the camera parameters and eliminate water ripple.

Benefits of technology

It realizes high-precision and low-cost flicker frequency detection of ambient light source, which can effectively eliminate water ripple in the image collected by the camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120333771A_ABST
    Figure CN120333771A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for detecting the flicker frequency of an ambient light source and electronic equipment, relates to the field of terminals, can detect the flicker frequency of the ambient light source, and is high in detection precision and low in cost. The electronic equipment comprises a light intensity sensing module, an analog-to-digital conversion module and a data processing module, the light intensity sensing module is connected with the analog-to-digital conversion module, and the analog-to-digital conversion module is connected with the data processing module; the light intensity sensing module comprises a photodiode and is used for detecting a light intensity signal of an ambient light source and converting the light intensity signal into an analog voltage signal; the analog-to-digital conversion module is used for converting the analog voltage signal into a digital voltage signal; the analog-to-digital conversion module is an audio chip, and the audio chip is connected with a microphone and / or a loudspeaker; the data processing module is used for calculating the flicker frequency of the ambient light source according to the digital voltage signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of terminals, and in particular, to a method, apparatus, and electronic device for detecting the flicker frequency of an ambient light source. Background Art

[0002] Currently, in a light source flicker scenario, such as a light source scenario of an incandescent lamp or a screen driven by 50 Hz alternating current, when an electronic device takes a photo, water ripples (debanding) are easily captured. To eliminate the water ripples, the flicker frequency of the light source can be detected, and the parameters of the camera can be adjusted according to the flicker frequency of the light source to eliminate the water ripples.

[0003] In related technologies, an integrated ambient light sensor can be installed in an electronic device to detect the flicker frequency of a light source through the integrated ambient light sensor. However, the integrated ambient light sensor has low accuracy and low sampling rate, resulting in poor frequency detection effect of the light source signal. Summary of the Invention

[0004] Embodiments of the present application provide a method, apparatus, and electronic device for detecting the flicker frequency of an ambient light source, which can detect the flicker frequency of the ambient light source, and have high detection accuracy and low cost.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, an electronic device is provided, including: a light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module; the light intensity sensing module includes a photodiode (Photo-Diode, PD), and the light intensity sensing module is configured to detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal; the analog-to-digital conversion module is configured to convert the analog voltage signal into a digital voltage signal; the analog-to-digital conversion module is an audio chip, and the audio chip is connected to a microphone and / or a speaker; the data processing module is configured to calculate the flicker frequency of the ambient light source according to the digital voltage signal.

[0007] The solution provided by the embodiments of the present application can reuse an audio chip (for example, an audio codec or an ADC) to process an analog signal (the analog voltage signal corresponding to the light intensity signal of the ambient light source) to obtain a digital signal (a digital voltage signal), and then calculate the flicker frequency of the ambient light source according to the digital voltage signal. Since the audio chip has a high sampling rate (for example, 8 - 192 KHz) and high quantization accuracy (for example, >= 24 Bit), it can effectively detect the flicker frequency of the ambient light source, with high detection accuracy and no additional cost increase (that is, low cost).

[0008] In a possible implementation, the electronic device further includes an application processor AP and a camera; the data processing module is further configured to send the flicker frequency of the ambient light source to the AP; the AP is configured to set parameters of the camera according to the flicker frequency of the ambient light source, and the parameters of the camera include exposure time and / or frame rate. In this way, the parameters of the camera can be adjusted based on the detected flicker frequency of the ambient light source to eliminate moiré patterns in the images captured by the camera.

[0009] In a possible implementation, the audio chip includes an audio codec or an audio analog-to-digital converter ADC. Since the audio codec or the audio analog-to-digital converter ADC has a high sampling rate and high quantization accuracy, it can effectively detect the flicker frequency of the ambient light source, with high detection accuracy and without increasing additional costs.

[0010] In a possible implementation, the data processing module is an audio digital signal processor. That is, the audio digital signal processor can be reused to calculate the flicker frequency of the ambient light source from the digital voltage signal, with high calculation efficiency and without increasing additional costs.

[0011] In a possible implementation, the analog-to-digital conversion module is configured to perform high-pass filtering on the analog voltage signal to obtain an AC voltage signal, then amplify the AC voltage signal, and perform analog-to-digital conversion on the amplified AC voltage signal to obtain a digital voltage signal. In this way, the DC signal that does not contribute to the detection of the light source frequency can be filtered out, and the AC signal can be amplified, which can enhance the detection of the fluctuating signal, so as to better detect the stroboscopic effect of the AC light source.

[0012] In a possible implementation, the light intensity sensing module includes a photodiode, a first sampling resistor, a first capacitor, and a second capacitor; the cathode of the photodiode is connected to a bias voltage, the anode of the photodiode is connected to one end of the first sampling resistor, and the other end of the first sampling resistor is directly grounded; one end of the second capacitor is connected to the anode of the photodiode, and the other end of the second capacitor is grounded through AC; one end of the first capacitor is connected to the other end of the first sampling resistor, and the other end of the first capacitor is grounded through AC. In this way, the light intensity signal of the ambient light source can be detected by the photodiode, and the light intensity signal can be converted into an analog voltage signal through devices such as the first sampling resistor.

[0013] In a possible implementation, the light intensity sensing module further includes a first bead and a second bead; one end of the first bead is connected to one end of the second capacitor and the anode of the photodiode, and one end of the second bead is connected to one end of the first capacitor and the other end of the first sampling resistor. Among them, the first bead and the second bead can play the role of suppressing high-frequency noise and spike interference, and absorbing electrostatic pulses.

[0014] In a possible implementation, the light intensity sensing module includes a photodiode, a second sampling resistor, and a first operational amplifier; the cathode of the photodiode is connected to one end of the second sampling resistor and the inverting input terminal of the first operational amplifier, and the anode of the photodiode is grounded; the other end of the second sampling resistor is connected to the output terminal of the first operational amplifier, and the non-inverting input terminal of the first operational amplifier is grounded. In this way, the light intensity signal of the ambient light source can be detected by the photodiode, and the light intensity signal can be converted into an analog voltage signal through devices such as the second sampling resistor.

[0015] In a possible implementation, the light intensity sensing module includes a photodiode, a second operational amplifier, and a charging capacitor; the cathode of the photodiode is connected to one end of the charging capacitor and the inverting input terminal of the second operational amplifier, and the anode of the photodiode is grounded; the other end of the charging capacitor is connected to the output terminal of the second operational amplifier, and the non-inverting input terminal of the second operational amplifier is connected to a bias voltage. In this way, the light intensity signal of the ambient light source can be detected by the photodiode, and the light intensity signal can be converted into an analog voltage signal through devices such as the charging capacitor.

[0016] In a possible implementation, the analog-to-digital conversion module includes a high-pass filter, a programmable gain amplifier (PGA), an analog-to-digital converter, and a data transmission module. The input terminal of the high-pass filter is connected to the output terminal of the light intensity sensing module, the output terminal of the high-pass filter is connected to the input terminal of the PGA, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; the high-pass filter is used to receive the analog voltage signal from the output terminal of the light intensity sensing module; the high-pass filter filters the DC voltage signal of the analog voltage signal to obtain an AC voltage signal; the PGA amplifies the AC voltage signal; the analog-to-digital converter converts the amplified AC voltage signal into a digital voltage signal; the data transmission module sends the digital voltage signal to the data processing module through a bus. In this way, the DC signal that contributes nothing to the detection of the light source frequency can be filtered, and the AC signal can be amplified, and the detection of the fluctuation signal can be enhanced, so that the stroboscopic effect of the AC light source can be detected better.

[0017] In a possible implementation, the analog-to-digital conversion module includes a programmable gain amplifier, an analog-to-digital converter, and a data transmission module. The input end of the PGA is connected to the output end of the light intensity sensing module, the output end of the PGA is connected to the input end of the analog-to-digital converter, the output end of the analog-to-digital converter is connected to the input end of the data transmission module, and the output end of the data transmission module is connected to the data processing module. The PGA is configured to receive an analog voltage signal from the output end of the light intensity sensing module and perform amplification processing on the analog voltage signal. The analog-to-digital converter converts the amplified analog voltage signal into a digital voltage signal. The data transmission module sends the digital voltage signal to the data processing module through a bus.

[0018] In a second aspect, a detection device for the flicker frequency of an ambient light source is provided, including: a light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module; the light intensity sensing module includes a photodiode, and the light intensity sensing module is configured to detect the light intensity signal of the ambient light source and convert the light intensity signal into a voltage signal; the analog-to-digital conversion module is configured to convert the analog voltage signal into a digital voltage signal; the data processing module is configured to calculate the flicker frequency of the ambient light source according to the digital voltage signal.

[0019] The detection device for the flicker frequency of the ambient light source provided by the embodiments of the present application can detect the light intensity signal of the ambient light source through the light intensity sensing module and convert the light intensity signal into a voltage signal; convert the analog voltage signal into a digital voltage signal through the analog-to-digital conversion module; calculate the flicker frequency of the ambient light source according to the digital voltage signal through the data processing module. It can effectively detect the flicker frequency of the ambient light source. Based on the detected flicker frequency of the ambient light source, the parameters of the camera can be adjusted to eliminate the moiré pattern in the image captured by the camera.

[0020] In a possible implementation, the analog-to-digital conversion module is configured to perform high-pass filtering processing on the analog voltage signal to obtain an AC voltage signal, then amplify the AC voltage signal, and perform analog-to-digital conversion on the amplified AC voltage signal to obtain a digital voltage signal.

[0021] In a possible implementation, the light intensity sensing module includes a photodiode, a first sampling resistor, a first capacitor, and a second capacitor; the cathode of the photodiode is connected to a bias voltage, the anode of the photodiode is connected to one end of the first sampling resistor, and the other end of the first sampling resistor is grounded directly; one end of the second capacitor is connected to the anode of the photodiode, and the other end of the second capacitor is grounded through AC; one end of the first capacitor is connected to the other end of the first sampling resistor, and the other end of the first capacitor is grounded through AC.

[0022] In a possible implementation, the light intensity sensing module further includes a first magnetic bead and a second magnetic bead; one end of the first magnetic bead is connected to one end of the second capacitor and the anode of the photodiode, and one end of the second magnetic bead is connected to one end of the first capacitor and the other end of the first sampling resistor.

[0023] In a possible implementation, the light intensity sensing module includes a photodiode, a second sampling resistor, and a first operational amplifier; the cathode of the photodiode is connected to one end of the second sampling resistor and the inverting input terminal of the first operational amplifier, and the anode of the photodiode is grounded; the other end of the second sampling resistor is connected to the output terminal of the first operational amplifier, and the non-inverting input terminal of the first operational amplifier is grounded.

[0024] In a possible implementation, the light intensity sensing module includes a photodiode, a second operational amplifier, and a charging capacitor; the cathode of the photodiode is connected to one end of the charging capacitor and the inverting input terminal of the second operational amplifier, and the anode of the photodiode is grounded; the other end of the charging capacitor is connected to the output terminal of the second operational amplifier, and the non-inverting input terminal of the second operational amplifier is connected to a bias voltage.

[0025] In a possible implementation, the analog-to-digital conversion module includes a high-pass filter, a programmable gain amplifier, an analog-to-digital converter, and a data transmission module. The input terminal of the high-pass filter is connected to the output terminal of the light intensity sensing module, the output terminal of the high-pass filter is connected to the input terminal of the PGA, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; the high-pass filter is configured to receive an analog voltage signal from the output terminal of the light intensity sensing module; the high-pass filter filters the DC voltage signal of the analog voltage signal to obtain an AC voltage signal; the PGA amplifies the AC voltage signal; the analog-to-digital converter converts the amplified AC voltage signal into a digital voltage signal; the data transmission module sends the digital voltage signal to the data processing module through a bus.

[0026] In a possible implementation, the analog-to-digital conversion module includes a programmable gain amplifier, an analog-to-digital converter, and a data transmission module. The input terminal of the PGA is connected to the output terminal of the light intensity sensing module, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; the PGA is configured to receive an analog voltage signal from the output terminal of the light intensity sensing module and amplify the analog voltage signal; the analog-to-digital converter converts the amplified analog voltage signal into a digital voltage signal; the data transmission module sends the digital voltage signal to the data processing module through a bus.

[0027] In a third aspect, a method for detecting the flicker frequency of an ambient light source is provided, which is applied to an electronic device. The electronic device includes a light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module includes a photodiode, the light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module. The method includes: the light intensity sensing module detects the light intensity signal of the ambient light source and converts the light intensity signal into a voltage signal; the analog-to-digital conversion module converts the voltage signal into a digital voltage signal; the analog-to-digital conversion module is an audio chip, and the audio chip is connected to a microphone and / or a speaker; the data processing module calculates the flicker frequency of the ambient light source according to the digital voltage signal.

[0028] The method for detecting the flicker frequency of the ambient light source provided by the embodiments of the present application can detect the light intensity signal of the ambient light source through the light intensity sensing module and convert the light intensity signal into a voltage signal; convert the analog voltage signal into a digital voltage signal through the analog-to-digital conversion module; calculate the flicker frequency of the ambient light source according to the digital voltage signal through the data processing module. It can effectively detect the flicker frequency of the ambient light source. Based on the detected flicker frequency of the ambient light source, the parameters of the camera can be adjusted to eliminate the water ripples in the image captured by the camera.

[0029] In a fourth aspect, a computer-readable storage medium is provided, including computer instructions, which when running on an electronic device, cause the electronic device to execute the method as described in the third aspect.

[0030] In a fifth aspect, a computer program product containing instructions is provided, which when running on the above-mentioned electronic device, causes the electronic device to execute the method as described in the third aspect.

[0031] Among them, the technical effects of the second aspect to the fifth aspect refer to the technical effects of the first aspect and any of its embodiments, and will not be repeated here. Description of the Drawings

[0032] Figure 1 It is a schematic diagram of a module provided by an embodiment of the present application;

[0033] Figure 2 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0034] Figure 3 It is a schematic diagram of the structure of another electronic device provided by an embodiment of the present application;

[0035] Figure 4 It is a schematic diagram of the circuit connection of a light intensity sensing module provided by an embodiment of the present application;

[0036] Figure 5 It is a schematic diagram of the circuit connection of an analog-to-digital conversion module provided by an embodiment of the present application;

[0037] Figure 6 Schematic diagram of the circuit connection of another analog-to-digital conversion module provided by an embodiment of the present application;

[0038] Figure 7 Schematic diagram of a shooting scene provided by an embodiment of the present application;

[0039] Figure 8 Schematic flowchart of a method for detecting the flicker frequency of an environmental light source provided by an embodiment of the present application;

[0040] Figure 9 Schematic diagram of a spectrogram provided by an embodiment of the present application;

[0041] Figure 10 Schematic diagram of a display provided by an embodiment of the present application;

[0042] Figure 11 Schematic diagram of the software and hardware architecture of an electronic device provided by an embodiment of the present application;

[0043] Figure 12 Schematic diagram of the structure of a chip system provided by an embodiment of the present application. Detailed implementation manners

[0044] For the sake of clear and concise description of the following embodiments, a brief introduction to relevant concepts or technologies is given first:

[0045] Rolling shutter: It refers to an exposure method in which the camera scans line by line and exposes line by line until all pixel points are exposed. The exposure times of different rows of pixels are different.

[0046] Light source flicker scene: It refers to a shooting scene (shooting environment) with a flickering light source. Among them, the flicker light source can include light sources powered by alternating current, such as chandeliers indoors, TV screens, electronic screens in shopping malls or high-speed railway stations, etc.

[0047] In a light source flicker scene, when the electronic device uses the rolling shutter exposure method for shooting, it is easy to shoot out debanding.

[0048] In order to eliminate debanding, the flicker frequency of the light source can be detected, and the parameters of the camera can be adjusted according to the flicker frequency of the light source to eliminate debanding.

[0049] In the related art, an integrated ambient light sensor can be installed in an electronic device to detect the flicker frequency of a light source through the integrated ambient light sensor. However, the accuracy of the integrated ambient light sensor is low and the sampling rate is low, resulting in poor frequency detection effect of the light source signal.

[0050] The embodiments of the present application provide a device and method for detecting the flicker frequency of an ambient light source, which can detect the flicker frequency of the ambient light source with high detection accuracy and low cost.

[0051] Next, the technical solutions in the embodiments of the present application will be described in conjunction with the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more than two. In addition, in order to clearly describe the technical solutions in the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily limit to be different.

[0052] As Figure 1 shown, the embodiments of the present application provide a device for detecting the flicker frequency of an ambient light source. The device can include three parts, namely, a light intensity sensing module, an analog-to-digital conversion module, and a data processing module. The light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module. Among them:

[0053] The light intensity sensing module includes a photodiode PD. The light intensity sensing module is used to detect the light intensity signal of the ambient light source and convert the light intensity signal into a voltage signal (analog voltage signal).

[0054] The analog-to-digital conversion module is used to convert the voltage signal (analog voltage signal) into a digital voltage signal.

[0055] The data processing module is used to calculate the flicker frequency of the ambient light source according to the digital voltage signal.

[0056] In some embodiments, the above-mentioned device for detecting the flicker frequency of an ambient light source can be applied to an electronic device.

[0057] As Figure 2 shown, the electronic device can include modules such as an audio chip, a speaker, a microphone, a PD photodetection circuit, and an SoC. Among them, the SoC can include an ADSP and an application processor AP. That is, the ADSP and the AP can be integrated on the SoC.

[0058] In the embodiments of the present application, the audio chip can serve as an analog-to-digital conversion module. The audio chip can be connected to a PD photoelectric detection circuit. The PD photoelectric detection circuit can serve as a light intensity sensing module, which is used to detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal. The audio chip can be used to convert the analog voltage signal into a digital voltage signal. The audio chip can also be connected to a microphone and / or a speaker.

[0059] In the embodiments of the present application, the audio (Audio) digital signal processor (DSP) of the electronic device can serve as a data processing module. The Audio DSP can also be referred to as ADSP. The Audio DSP can use the fast Fourier transform (FFT) algorithm to process the digital voltage signal to obtain the flicker frequency of one or more ambient light sources.

[0060] Optionally, the data processing module can also send the frequency information (the flicker frequency of one or more ambient light sources) to the application processor AP. That is, the Audio DSP can send the calculated frequency information (the flicker frequency of one or more ambient light sources) to the application processor (AP), and the AP can set the parameters of the camera (such as the exposure time) according to the received frequency information to eliminate moiré.

[0061] The present application also provides an electronic device (for example, electronic device 100) that employs the above-described detection device for the flicker frequency of the ambient light source.

[0062] Figure 3 This is a schematic structural diagram of an electronic device 100 provided by the embodiments of the present application. As Figure 3 shown, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a light intensity sensing module 170E, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0063] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0064] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, an audio digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0066] The charging management module 140 is configured to receive a charging input from a charger. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.

[0067] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0068] The wireless communication function of the electronic device 100 can be implemented through Antenna 1, Antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0069] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, Antenna 1 can be multiplexed as the diversity antenna of the wireless local area network.

[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through Antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through Antenna 1 for radiation.

[0071] The modulation and demodulation processor can include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to Speaker 170A, Receiver 170B, etc.), or displays an image or video through the display screen 194.

[0072] The wireless communication module 160 may provide wireless communication solutions applied to the electronic device 100, including WLAN (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0073] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with a network and other devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0074] Electronic device 100 implements a display function through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0075] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0076] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc. The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture static images or videos. The digital voltage signal processor is used to process digital voltage signals. In addition to processing digital image signals, it can also process other digital voltage signals. The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0077] The camera 193 can include 1 to N. Each camera includes a photosensitive element (CCD / CMOS), and can sense light through the photosensitive element (CCD / CMOS), collect photons and convert them into charges.

[0078] For example, the electronic device may include two front cameras and three rear cameras. Among them, the front cameras may include a front main camera and a TOF camera. Among them, the TOF camera may include a TX and an RX. The TX may be used to emit optical signals (infrared light or laser pulses), and the RX may be used to receive imaging. The TX may be, for example, an infrared light emitter. The RX may be, for example, a complementary metal oxide semiconductor (CMOS) or a charge coupled device (CCD) image sensor. Optionally, the front camera may further include a front secondary camera.

[0079] Among them, the rear cameras may include, for example, a rear main camera, a wide-angle camera (which may also be referred to as an ultra-wide-angle camera), and a telephoto camera, etc. Of course, the rear cameras may further include other types of cameras. For example, they may further include a depth camera module, a black-and-white camera module, a macro camera module, etc. This application does not make any limitations. Among them, the rear main camera may be a wide-angle camera, and the viewing angles of the rear main camera and the ultra-wide-angle camera may be different.

[0080] The external memory interface 120 may be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card. The internal memory 121 may be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. For example, in the embodiments of this application, the processor 110 may execute the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0081] The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor, etc. For example, music playback, recording, etc.

[0082] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. The microphone 170C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. The headphone jack 170D is used to connect a wired headphone.

[0083] In the embodiment of the present application, the audio module 170 can be an audio chip. The audio chip can be, for example, an audio codec or an audio analog-to-digital converter ADC.

[0084] The light intensity sensing module 170E, including a photodiode, is used to convert the light intensity signal of the ambient light source into an analog voltage signal.

[0085] In the embodiment of the present application, the audio module 170 is further used to sample, quantize, and encode the analog voltage signal from the light intensity sensing module 170E to obtain a digital voltage signal.

[0086] In the embodiment of the present application, the audio module 170 can send the digital voltage signal to the Audio DSP in the processor 110. The Audio DSP can be used as a data processing module. The Audio DSP can use the FFT algorithm and the peak search algorithm to process the digital voltage signal to obtain one or more flicker frequencies (each flicker frequency corresponds to an ambient light source).

[0087] Further, the Audio DSP in the processor 110 can send the frequency information (the flicker frequencies of one or more ambient light sources) to the application processor in the processor 110. The application processor can set the parameters of the camera (such as the exposure time) according to the received frequency information to eliminate moiré.

[0088] The button 190 includes a power-on button, volume buttons, etc. The button 190 can be a mechanical button or a touch button. The electronic device 100 can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device 100. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. The indicator 192 can be an indicator light and can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be in contact with and separated from the electronic device 100 by being inserted into or removed from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

[0089] Exemplarily, Figure 4 The light intensity sensing module is described in detail.

[0090] As Figure 4 shown in (a) of [], it is a circuit connection schematic diagram of the light intensity sensing module (i.e., the PD photoelectric detection circuit). As Figure 4 shown in (a) of [], the light intensity sensing module can include a photodiode PD, a sampling resistor R1 (the first sampling resistor), filter capacitors C1 (the first capacitor) and C2 (the second capacitor). Among them, the cathode (negative electrode) of the photodiode PD is connected to the bias voltage Vbias, the anode (positive electrode) of the photodiode PD is connected to one end of the sampling resistor R1, and the other end of the sampling resistor R1 is directly grounded. One end of the filter capacitor C1 is connected to port 2 and the other end of the resistor R1, and the other end of the filter capacitor C1 is grounded through AC. One end of the filter capacitor C2 is connected to the anode of the photodiode PD and port 1, and the other end of the filter capacitor C2 is grounded through AC. Among them, port 1 is an analog voltage signal and port 2 is a ground signal.

[0091] As Figure 4 shown in (b) of [], it is a circuit connection schematic diagram of the light intensity sensing module (i.e., the PD photoelectric detection circuit). As Figure 4As shown in (b) thereof, the light intensity sensing module may include a photodiode PD, a sampling resistor R1, filter capacitors C1 and C2, beads L1 (the first bead) and L2 (the second bead), etc. Among them, the cathode (negative electrode) of the photodiode PD is connected to the bias voltage Vbias, the anode (positive electrode) of the photodiode PD is connected to one end of the sampling resistor R1, and the other end of the sampling resistor R1 is directly grounded. One end of the bead L1 is connected to one end of the filter capacitor C2 and the anode of the photodiode PD, and the other end of the filter capacitor C2 is grounded through AC. One end of the bead L2 is connected to one end of the filter capacitor C1 and the other end of the resistor R1, and the other end of the filter capacitor C1 is grounded through AC. The other end of the bead L1 is connected to port 1, and the other end of the bead L2 is connected to port 2. Among them, port 1 is an analog voltage signal, and port 2 is a ground signal. Among them, the beads L1 and L2 can play the roles of suppressing high-frequency noise and spike interference, and absorbing electrostatic pulses.

[0092] As shown in Figure 4 (c) thereof, it is another circuit connection schematic diagram of the light intensity sensing module. As shown in Figure 4 (c) thereof, the light intensity sensing module includes a photodiode PD, a sampling resistor R2 (the second sampling resistor), and an operational amplifier 1 (the first operational amplifier). The cathode of the photodiode PD is connected to one end of the sampling resistor R2 and the inverting input terminal of the operational amplifier 1, and the anode of the photodiode PD is grounded. The other end of the sampling resistor R2 is connected to the output terminal of the operational amplifier 1. The non-inverting input terminal of the operational amplifier 1 is grounded. Port 1 is connected to the output port of the operational amplifier 1 and one end of the sampling resistor R2, and port 2 is connected to the anode terminal of the photodiode PD. Among them, port 1 is an analog voltage signal, and port 2 is a ground signal.

[0093] As shown in Figure 4 (d) thereof, it is yet another circuit connection schematic diagram of the light intensity sensing module. As shown in Figure 4 (d) thereof, the light intensity sensing module includes a photodiode PD, an operational amplifier 2 (the second operational amplifier), and a charging capacitor C3. The cathode of the photodiode PD is connected to one end of the charging capacitor C3 and the inverting input terminal of the operational amplifier 2, and the anode of the photodiode PD is grounded. The other end of the charging capacitor C3 is connected to the output terminal of the operational amplifier 2. The non-inverting input terminal of the operational amplifier 2 is connected to the bias voltage Vbias. Port 1 is connected to the output port of the operational amplifier 2 and one end of the charging capacitor C3, and port 2 is connected to the anode terminal of the photodiode PD. Among them, port 1 is an analog voltage signal, and port 2 is a ground signal.

[0094] Figure 4Among (a)-(d) are schematic diagrams of the circuit connection of the light intensity sensing module, and the circuit of the light intensity sensing module is not limited thereto. For example, in some possible implementation manners, the light intensity sensing module may include a plurality of photodiodes, or the light intensity sensing module may further include other elements, which are not specifically limited in this application.

[0095] Exemplarily, Figures 5 - 6 An expanded description of the analog-to-digital conversion module is given.

[0096] In a possible design, as Figure 5 shown, the analog-to-digital conversion module includes a high-pass filter, a programmable gain amplifier (PGA), an analog-to-digital converter (ADC TX), and a data transmission module. The input end of the high-pass filter is connected to the output end of the light intensity sensing module (i.e., port 1 and port 2 of the light intensity sensing module), the output end of the high-pass filter is connected to the input end of the PGA, the output end of the PGA is connected to the input end of the analog-to-digital converter, the output end of the analog-to-digital converter is connected to the input end of the data transmission module, and the output end of the data transmission module is connected to the data processing module.

[0097] Among them, the high-pass filter is connected to port 1 and port 2 of the light intensity sensing module, and the high-pass filter can receive an analog voltage signal (i.e., the analog voltage signal corresponding to the light intensity signal detected by the photodiode PD) from port 1 and port 2 of the light intensity sensing module.

[0098] The high-pass filter can filter the low-frequency DC signal of the analog voltage signal to obtain an AC voltage signal (a high-frequency AC voltage signal). In this way, the high-pass filter can filter out the DC signal that makes no contribution to the light source frequency detection and can enhance the detection of the fluctuation signal (AC signal).

[0099] It should be noted that the ambient light source can include a DC light source and an AC light source. The light emitted by the DC light source (for example, an electric bulb powered by DC) is continuous and uniform light, without stroboscopic effect. Since the voltage and current directions of the alternating current fluctuate continuously at a certain frequency, the luminous intensity (i.e., the light intensity signal) of the AC light source (for example, an electric bulb powered by AC) also has stroboscopic effect with the fluctuation of the alternating current. The light intensity signal detected by the light intensity sensing module can include the light intensity signal of the DC light source and the light intensity signal of the AC light source. After converting the light intensity signal detected by the light intensity sensing module into an analog voltage signal, the analog voltage signal can include a DC voltage signal and an AC voltage signal. The DC voltage signal corresponds to the light intensity signal of the DC light source, and the AC voltage signal corresponds to the light intensity signal of the AC light source. Since the light emitted by the DC light source has no stroboscopic effect, the DC voltage signal makes no contribution to the detection of stroboscopic effect. Therefore, the DC voltage signal can be blocked and the AC voltage signal can be retained to better detect the stroboscopic effect of the AC light source. The DC voltage signal can be blocked by a high-pass filter. This is because the frequency of the DC signal is zero, so the DC signal cannot pass through the high-pass filter, and thus the high-pass filter can achieve the function of blocking the direct current.

[0100] The PGA can amplify the filtered signal (AC voltage signal). The ADC TX can convert the amplified signal (amplified AC voltage signal) into a digital voltage signal. The data transmission module is used to transmit the digital voltage signal and can send the digital voltage signal to the data processing module through a bus.

[0101] In another possible design, the analog-to-digital conversion module may not include a high-pass filter. Exemplarily, as Figure 6 shown, the analog-to-digital conversion module includes a PGA, an analog-to-digital converter, and a data transmission module. The input end of the PGA is connected to the output end of the light intensity sensing module, the output end of the PGA is connected to the input end of the analog-to-digital converter, the output end of the analog-to-digital converter is connected to the input end of the data transmission module, and the output end of the data transmission module is connected to the data processing module.

[0102] The PGA can receive the analog voltage signal from port 1 (i.e., port 1) and port 2 (i.e., port 2). The PGA can amplify the analog voltage signal.

[0103] The analog-to-digital converter can sample and quantize the amplified analog voltage signal, thereby converting the analog voltage signal into a digital voltage signal.

[0104] The data transmission module can be responsible for transmitting the digital voltage signal and sending the digital voltage signal to the data processing module through a bus.

[0105] A data processing module is used to process the digital voltage signal. The data processing module can be an Audio DSP. The Audio DSP can adopt the FFT algorithm to analyze the frequency domain of the digital voltage signal and obtain the flicker frequencies of one or more ambient light sources.

[0106] It can be understood that the process of converting the light intensity signal of the ambient light source into a digital voltage signal in the embodiments of the present application is similar to the recording process. During the recording process, a microphone (also called a "microphone") can collect an analog sound signal and convert the analog sound signal into an analog electrical signal. The audio module is used to convert the analog electrical signal into a digital audio signal. Similarly, during the process of converting the light intensity signal of the ambient light source into a digital voltage signal, the light intensity sensing module can detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal. The audio module can convert the analog voltage signal into a digital audio signal.

[0107] In a possible design, the analog-to-digital conversion module can be an audio codec or an audio ADC. The audio codec or the audio ADC can amplify, sample, quantize, and encode the analog voltage signal detected by the light intensity sensing module to obtain a digital voltage signal. The audio codec or the audio ADC has a high sampling rate (8 - 192KHz), a high quantization accuracy (>= 24Bit), and has a low-frequency cut-off function (that is, it can block the low-frequency DC signal), can detect the flicker frequency of the ambient light source, and has a high detection accuracy. Moreover, when the flicker frequency of the ambient light source is detected in the present application, the audio codec or the ADC is multiplexed, and no additional cost will be increased.

[0108] It should be noted that the audio codec or the audio ADC can be an independent chip or integrated into other chips. For example, the audio codec can be integrated into a power management integrated circuit (PMIC).

[0109] Of course, the analog-to-digital conversion module is not limited to being an audio chip (for example, an audio codec or an audio ADC). The analog-to-digital conversion module can be a module (or chip) independent of the audio chip, and the present application does not make any limitations.

[0110] The solution for detecting the flicker frequency of the ambient light source provided by the embodiments of the present application can be applied to at least one of the scenarios such as a local light source scenario, a low-light scenario, a high-frequency light source scenario, a mixed light source scenario, etc.

[0111] Among them, the local light source scenario means that there is a local light source in the shooting scenario. For example, taking the electronic device as a mobile phone, as Figure 7As shown in (a) in [description], the mobile phone can display a shooting preview interface 701. The shooting preview interface 701 shows the image captured by the camera of the mobile phone. According to the shooting preview interface 701, the location corresponding to the current shooting scene is the living room, and the light sources in the living room include natural light (sunlight) and the display screen of the TV. The natural light can cover the entire living room, and the light emitted by the display screen of the TV covers a part of the living room. The display screen of the TV can be regarded as a local light source.

[0112] A low-light scene refers to a scene where the light intensity of the ambient light source in the shooting scene is weak. For example, as Figure 7 shown in (b) in [description], the mobile phone can display a shooting preview interface 702. The shooting preview interface 702 shows the image captured by the camera of the mobile phone. According to the shooting preview interface 702, the location corresponding to the current shooting scene is the bedroom. If the current time is at night, the light sources in the bedroom only include a table lamp (the table lamp can be located on the bedside table). Since the light intensity of the table lamp is weak, it can be considered that the current is in a low-light environment.

[0113] A high-frequency light source scene refers to a scene where the flicker frequency of the ambient light source in the shooting scene is high. For example, as Figure 7 shown in (c) in [description], the mobile phone can display a shooting preview interface 703. The shooting preview interface 703 shows the image captured by the camera of the mobile phone. According to the shooting preview interface 703, the location corresponding to the current shooting scene is the high-speed rail waiting station, and this high-speed rail waiting station includes high-frequency display screens. It can be considered that the current is in a high-frequency light source scene.

[0114] A mixed light source scene refers to a scene where there are multiple ambient light sources in the shooting scene, and the flicker frequencies of these multiple ambient light sources are different. For example, as Figure 7 shown in (d) in [description], the mobile phone can display a shooting preview interface 704. The shooting preview interface 704 shows the image captured by the camera of the mobile phone. According to the shooting preview interface 704, the location corresponding to the current shooting scene is the living room, and the light sources in the living room include the display screen of the TV and a table lamp. The flicker frequencies of the display screen of the TV and the table lamp are different, that is, the current is in a mixed light source scene.

[0115] It should be understood that two or more of the local light source scene, low-light scene, high-frequency light source scene, and mixed light source scene may exist simultaneously.

[0116] As Figure 8 shown, an embodiment of the present application provides a method for detecting the flicker frequency of an ambient light source, which is applied to an electronic device. The electronic device includes a light intensity sensing module, an analog-to-digital conversion module, and a data processing module. The light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module. The method includes:

[0117] 801. Detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal.

[0118] The light intensity sensing module of the electronic device can detect the light intensity signal of the ambient light source through PD and convert the light intensity signal of the ambient light source into an analog voltage signal.

[0119] 802. Convert the analog voltage signal into a digital voltage signal.

[0120] The analog-to-digital conversion module of the electronic device can convert the analog voltage signal into a digital voltage signal. The specific process can refer to the relevant description of the analog-to-digital conversion module above and will not be elaborated here.

[0121] 803. Calculate the flicker frequency of the ambient light source according to the digital voltage signal.

[0122] The data processing module (e.g., Audio DSP) of the electronic device can calculate the flicker frequency of the ambient light source according to the digital voltage signal. The specific process can refer to the relevant description of the data processing module above and will not be elaborated here.

[0123] Exemplarily, as shown in (a) of Figure 9 , it is an example of the digital voltage signal in the time domain received by the data processing module from the analog-to-digital conversion module. Among them, the abscissa represents time, and the unit of the abscissa is millisecond (ms). The ordinate represents amplitude, and the unit of the ordinate is dB (decibel). After the data processing module performs FFT processing on the digital voltage signal as shown in (a) of Figure 9 , a spectrogram as shown in (b) of Figure 9 can be obtained. This spectrogram is a logarithmic amplitude spectrogram. Among them, the abscissa represents frequency, and the unit of the abscissa is hertz (Hz). The ordinate represents amplitude, and the unit of the ordinate is dB (decibel). After the data processing module performs FFT processing on the digital voltage signal, the frequencies and amplitudes of multiple sine wave signals can be obtained. Further, the data processing module can determine the frequency of the target peak position according to the peak seeking algorithm and use the frequency of the target peak position as the flicker frequency of the ambient light source. Among them, the target peak position can refer to the peak position with an amplitude higher than the preset amplitude. For example, assuming the preset amplitude is 2, the peak positions higher than the preset amplitude can include Peak 1, Peak 2, and Peak 3. That is, the target peak positions include Peak 1, Peak 2, and Peak 3. The frequencies corresponding to Peak 1, Peak 2, and Peak 3 are 100 Hz, 2160 Hz, and 4200 Hz respectively. That is, the flicker frequencies of the ambient light source can include 100 Hz, 2160 Hz, and 4200 Hz.

[0124] 804. Set the parameters of the camera according to the flicker frequency of the ambient light source.

[0125] Further, a data processing module (e.g., Audio DSP) may send frequency information (the blinking frequency of one or more ambient light sources) to the application processor of the electronic device. The application processor may set / adjust the parameters of the camera according to the received frequency information to eliminate moiré patterns.

[0126] Among them, the parameters of the camera include exposure time (which may also be referred to as shutter time) and / or frame rate (which may also be referred to as frame interval).

[0127] In some embodiments, the application processor may determine the light source period according to the blinking frequency of the light source. The blinking frequency of the light source is the reciprocal of the light source period. The application processor may set the exposure time of the camera to an integer multiple of the light source period, or may set the frame rate of the camera to an integer multiple of the light source period, so as to eliminate moiré patterns.

[0128] If there are multiple ambient light sources and the light source periods of the multiple ambient light sources are different, the application processor may set the exposure time or frame rate of the camera according to the least common multiple of the light source periods of the multiple ambient light sources. For example, the exposure time of the camera may be set to an integer multiple of the least common multiple of the light source periods of the multiple ambient light sources, or the frame rate of the camera may be set to an integer multiple of the least common multiple of the light source periods of the multiple ambient light sources, so as to eliminate moiré patterns.

[0129] Exemplarily, assume that the location corresponding to the current shooting scene is a high-speed rail waiting station, and the high-speed rail waiting station includes a high-frequency (blinking frequency higher than a preset threshold) blinking light source (e.g., a train number display screen), that is, it is currently in a high-frequency light source scene. As Figure 10 shown in (a) of, after the light emitted by the train number display screen 1002 is collected by the camera of the electronic device, moiré patterns may appear in the display area of the train number display screen 1002 in the shooting preview interface 1001, affecting the user experience. In a possible situation, if the light emitted by the train number display screen 1002 irradiates the surrounding reflectors and is then collected by the camera of the electronic device, as Figure 10 shown in (b) of, moiré patterns may appear in the entire display area of the shooting preview interface 1003, affecting the user experience. The electronic device provided in the embodiments of the present application can detect the blinking frequency of the train number display screen 1002 and adjust the parameters of the camera (e.g., exposure time and / or frame rate) according to the blinking frequency of the train number display screen 1002, so as to avoid moiré patterns. As Figure 10 shown in (c) of, after adjusting the parameters of the camera (e.g., exposure time and / or frame rate) according to the blinking frequency of the train number display screen 1002 (e.g., setting the exposure time of the camera to an integer multiple of the light source period), the electronic device may display the shooting preview interface 1004, and there are no moiré patterns in the shooting preview interface 1004, thereby improving the user experience.

[0130] The solution provided by this application can reuse the audio codec or ADC to process the analog signal (the analog voltage signal corresponding to the light intensity signal of the ambient light source). Since the audio codec or ADC has a high sampling rate (for example, the sampling rate can reach 8 - 192 KHz), high quantization accuracy (for example, the quantization accuracy >= 24 Bit), and has a low - frequency cut - off function (that is, it can block the low - frequency DC signal), it can effectively detect the flicker frequency of the ambient light source in scenarios such as local light source scenarios, low - light scenarios, high - frequency light source scenarios, and mixed light source scenarios.

[0131] In the related art, the electronic device detects the flicker frequency of the ambient light source through an integrated ambient light sensor. Due to the low accuracy and low sampling rate of the integrated ambient light sensor, the frequency detection effect of the light source signal is poor (for example, it cannot detect the flicker frequencies of some light source signals (such as high - frequency light sources, local light sources, etc.)).

[0132] As shown in Table 1, it shows the detection of the flicker frequency of the ambient light source using the related - art solution and the solution of this application in different scenarios.

[0133] Table 1

[0134]

[0135]

[0136] The solution provided by this application is different from the solution in the related art that detects the flicker frequency of the ambient light source through an integrated ambient light sensor. The solution provided by this application adopts a segmented processing when detecting the flicker frequency of the ambient light source. It detects the light intensity signal of the ambient light source through the light intensity sensing module, converts the light intensity signal into an analog voltage signal, and then uses the audio module (such as audio codec or ADC) of the electronic device to perform DC - blocking, amplification, sampling, quantization, and encoding processing on the analog voltage signal to obtain a digital voltage signal. Since the audio codec or ADC has high accuracy and high sampling rate, it can more accurately detect the flicker frequency of the ambient light source. Moreover, this application reuses the audio codec or ADC when detecting the flicker frequency of the ambient light source, without increasing additional costs. That is, the solution provided by this application has high detection accuracy and low cost.

[0137] In addition, the audio module (e.g., audio codec or ADC) and the data processing module (e.g., AudioDSP) can be reused to implement the functions of a spectrum analyzer. The spectrum analyzer can be used for the frequency-domain analysis of analog signals (e.g., light intensity signals, temperature signals, etc.), such as determining the power, frequency, etc. of the analog signal. For example, the audio codec or ADC can be reused to process the analog voltage signal corresponding to the light intensity signal of the ambient light source to obtain a digital voltage signal, and then the data processing module (e.g., Audio DSP) can perform FFT processing on the digital voltage signal to obtain the spectrogram of the light intensity signal.

[0138] An embodiment of the present application provides an electronic device, which may include: an audio chip, a light intensity sensing module (PD photoelectric detection circuit), a memory, and one or more processors (e.g., ADSP and application processor AP). The audio chip, the light intensity sensing module, the memory, and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute each function or step executed by the electronic device in the above method embodiment. The structure of the electronic device can refer to Figure 2 or Figure 3 the structure of the electronic device shown.

[0139] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. An embodiment of the present invention takes the system of the layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0140] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through interfaces. In some embodiments, the system may include an application layer, an application framework layer, an Android runtime, a system library, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that the embodiments of the present application take the system as an example to illustrate. In other operating systems (e.g., IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solution of the present application can also be implemented.

[0141] Among them, the application layer may include a series of application packages.

[0142] Such as Figure 11As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, wireless local area networks (WLAN), Bluetooth, music, video, short message, lock screen application, settings application, etc. Of course, the application layer may also include other application packages, such as payment applications, shopping applications, banking applications, chat applications or financial management applications, etc., which are not limited in this application.

[0143] Among them, the camera application has the functions of shooting and video recording. In response to the user's operation of opening the camera application, the electronic device can perform shooting or video recording.

[0144] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. For example, it may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, and a camera service (Camera Service), etc., and the embodiments of this application do not make any restrictions on this.

[0145] Among them, Camera Service can be started during the startup phase of the electronic device and can be used to transfer and save relevant information of the camera.

[0146] The system library may include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing library (such as: OpenGL ES), 2D image engine (such as: SGL), etc.

[0147] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0148] The Media Libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The Media Libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0149] OpenGL ES is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0150] SGL is a drawing engine for 2D drawing.

[0151] The Android Runtime includes core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0152] The HAL layer is a wrapper for the Linux kernel drivers, providing interfaces upward and shielding the implementation details of the lower-level hardware.

[0153] The HAL layer can include Wi-Fi HAL, audio HAL, camera HAL, etc.

[0154] Among them, the camera HAL is the core software framework of the camera.

[0155] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc. Among them, the camera driver is the driver layer of the Camera device, mainly responsible for the interaction with the hardware.

[0156] In the embodiments of the present application, the kernel layer may further include a flicker frequency interface, which is used to interact with the ADSP, obtain the flicker frequency of the ambient light source from the ADSP, and transfer it to the upper-layer application. The upper-layer application (for example, a camera application) can set the parameters of the camera (for example, the exposure time) according to the flicker frequency of the ambient light source to eliminate water ripples.

[0157] The hardware layer includes a display, a camera, a PD photoelectric detection circuit (abbreviated as PD in the figure), an audio chip, an ADSP, etc.

[0158] Among them, the PD photoelectric detection circuit can detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal. The audio chip can receive the analog voltage signal from the PD photoelectric detection circuit and convert the analog voltage signal into a digital voltage signal. The ADSP can use the FFT algorithm to process the digital voltage signal to obtain the flicker frequency of the ambient light source (the flicker frequency of one or more ambient light sources).

[0159] The embodiments of the present application also provide a chip system (for example, a system on a chip (SoC)), such as Figure 12As shown in the figure, the chip system includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected by a line. For example, the interface circuit 1202 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 1202 can be used to send signals to other devices (such as the processor 1201 or the touch screen of an electronic device). Exemplarily, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the electronic device can execute each step in the above embodiments. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations on this.

[0160] The embodiments of the present application also provide a computer-readable storage medium, which includes computer instructions. When the computer instructions run on the above-mentioned electronic device, the electronic device is enabled to execute each function or step that the electronic device executes in the above method embodiments.

[0161] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0162] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0163] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it can be located in one place, or it can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0165] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0166] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An electronic device, characterized in that, Comprising: a light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module; the light intensity sensing module includes a photodiode, and the light intensity sensing module is used to detect the light intensity signal of the ambient light source and convert the light intensity signal into an analog voltage signal; the analog-to-digital conversion module is used to convert the analog voltage signal into a digital voltage signal; the analog-to-digital conversion module is an audio chip, and the audio chip is connected to a microphone and / or a speaker; the data processing module is used to calculate the flicker frequency of the ambient light source according to the digital voltage signal.

2. The electronic device according to claim 1, wherein The electronic device further includes an application processor AP and a camera; the data processing module is further used to send the flicker frequency of the ambient light source to the AP; the AP is used to set the parameters of the camera according to the flicker frequency of the ambient light source, and the parameters of the camera include exposure time and / or frame rate.

3. The electronic device according to claim 1 or 2, wherein the audio chip includes an audio codec or an audio analog-to-digital converter ADC.

4. The electronic device according to claim 2 or 3, wherein the data processing module is an audio digital signal processor.

5. The electronic device according to any one of claims 1-4, wherein the analog-to-digital conversion module is used to perform high-pass filtering on the analog voltage signal to obtain an AC voltage signal, then amplify the AC voltage signal, and perform analog-to-digital conversion on the amplified AC voltage signal to obtain the digital voltage signal.

6. The electronic device according to any one of claims 1-5, characterized in that, The light intensity sensing module includes the photodiode, a first sampling resistor, a first capacitor, and a second capacitor; the cathode of the photodiode is connected to a bias voltage, the anode of the photodiode is connected to one end of the first sampling resistor, and the other end of the first sampling resistor is directly grounded; one end of the second capacitor is connected to the anode of the photodiode, and the other end of the second capacitor is AC grounded; one end of the first capacitor is connected to the other end of the first sampling resistor, and the other end of the first capacitor is AC grounded.

7. The electronic device according to claim 6, wherein The light intensity sensing module further includes a first bead and a second bead; one end of the first bead is connected to one end of the second capacitor and the anode of the photodiode, and one end of the second bead is connected to one end of the first capacitor and the other end of the first sampling resistor.

8. The electronic device according to any one of claims 1-5, wherein the light intensity sensing module includes the photodiode, a second sampling resistor, and a first operational amplifier; the cathode of the photodiode is connected to one end of the second sampling resistor and the inverting input terminal of the first operational amplifier, and the anode of the photodiode is grounded; the other end of the second sampling resistor is connected to the output terminal of the first operational amplifier, and the non-inverting input terminal of the first operational amplifier is grounded.

9. The electronic device according to any one of claims 1-5, wherein The light intensity sensing module includes the photodiode, the second operational amplifier, and the charging capacitor; the cathode of the photodiode is connected to one end of the charging capacitor and the inverting input terminal of the second operational amplifier, and the anode of the photodiode is grounded; the other end of the charging capacitor is connected to the output terminal of the second operational amplifier, and the non-inverting input terminal of the second operational amplifier is connected to a bias voltage.

10. The electronic device according to any one of claims 1-9, characterized in that The analog-to-digital conversion module includes a high-pass filter, a programmable gain amplifier PGA, an analog-to-digital converter, and a data transmission module. The input terminal of the high-pass filter is connected to the output terminal of the light intensity sensing module, the output terminal of the high-pass filter is connected to the input terminal of the PGA, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; The high-pass filter is used to receive the analog voltage signal from the output terminal of the light intensity sensing module; The high-pass filter filters the DC voltage signal of the analog voltage signal to obtain an AC voltage signal; The PGA amplifies the AC voltage signal; The analog-to-digital converter converts the amplified AC voltage signal into a digital voltage signal; The data transmission module sends the digital voltage signal to the data processing module through a bus.

11. The electronic device according to any one of claims 1-9, characterized in that The analog-to-digital conversion module includes a programmable gain amplifier PGA, an analog-to-digital converter, and a data transmission module. The input terminal of the PGA is connected to the output terminal of the light intensity sensing module, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; The PGA is used to receive the analog voltage signal from the output terminal of the light intensity sensing module and amplify the analog voltage signal; The analog-to-digital converter converts the amplified analog voltage signal into the digital voltage signal; The data transmission module sends the digital voltage signal to the data processing module through a bus.

12. A detection device for the flicker frequency of an ambient light source, characterized in that Comprising: A light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module; The light intensity sensing module includes a photodiode. The light intensity sensing module is used to detect the light intensity signal of the ambient light source and convert the light intensity signal into a voltage signal; The analog-to-digital conversion module is used to convert the analog voltage signal into a digital voltage signal; The data processing module is used to calculate the flicker frequency of the ambient light source according to the digital voltage signal.

13. The device according to claim 12, characterized in that The analog-to-digital conversion module is used to perform high-pass filtering on the analog voltage signal to obtain an AC voltage signal, then amplify the AC voltage signal, and perform analog-to-digital conversion on the amplified AC voltage signal to obtain the digital voltage signal.

14. The device according to claim 12 or 13, characterized in that, The light intensity sensing module includes the photodiode, a first sampling resistor, a first capacitor, and a second capacitor; The cathode of the photodiode is connected to a bias voltage, the anode of the photodiode is connected to one end of the first sampling resistor, and the other end of the first sampling resistor is grounded directly; one end of the second capacitor is connected to the anode of the photodiode, and the other end of the second capacitor is grounded through AC; one end of the first capacitor is connected to the other end of the first sampling resistor, and the other end of the first capacitor is grounded through AC.

15. The device according to claim 14, characterized in that, The light intensity sensing module further includes a first bead and a second bead; One end of the first bead is connected to one end of the second capacitor and the anode of the photodiode, and one end of the second bead is connected to one end of the first capacitor and the other end of the first sampling resistor.

16. The device according to claim 12 or 13, wherein The light intensity sensing module includes the photodiode, a second sampling resistor, and a first operational amplifier; the cathode of the photodiode is connected to one end of the second sampling resistor and the inverting input terminal of the first operational amplifier, and the anode of the photodiode is grounded; the other end of the second sampling resistor is connected to the output terminal of the first operational amplifier, and the non-inverting input terminal of the first operational amplifier is grounded.

17. The device according to claim 12 or 13, wherein The light intensity sensing module includes the photodiode, a second operational amplifier, and a charging capacitor; the cathode of the photodiode is connected to one end of the charging capacitor and the inverting input terminal of the second operational amplifier, and the anode of the photodiode is grounded; the other end of the charging capacitor is connected to the output terminal of the second operational amplifier, and the non-inverting input terminal of the second operational amplifier is connected to a bias voltage.

18. The device according to any one of claims 12-17, wherein The analog-to-digital conversion module includes a high-pass filter, a programmable gain amplifier (PGA), an analog-to-digital converter, and a data transmission module. The input terminal of the high-pass filter is connected to the output terminal of the light intensity sensing module, the output terminal of the high-pass filter is connected to the input terminal of the PGA, the output terminal of the PGA is connected to the input terminal of the analog-to-digital converter, the output terminal of the analog-to-digital converter is connected to the input terminal of the data transmission module, and the output terminal of the data transmission module is connected to the data processing module; The high-pass filter is used to receive the analog voltage signal from the output terminal of the light intensity sensing module; The high-pass filter filters the DC voltage signal of the analog voltage signal to obtain an AC voltage signal; The PGA amplifies the AC voltage signal; The analog-to-digital converter converts the amplified AC voltage signal into a digital voltage signal; The data transmission module sends the digital voltage signal to the data processing module through a bus.

19. The device according to any one of claims 12-17, characterized in that The analog-to-digital conversion module includes a programmable gain amplifier PGA, an analog-to-digital converter, and a data transmission module. The input end of the PGA is connected to the output end of the light intensity sensing module. The output end of the PGA is connected to the input end of the analog-to-digital converter. The output end of the analog-to-digital converter is connected to the input end of the data transmission module. The output end of the data transmission module is connected to the data processing module; The PGA is used to receive the analog voltage signal from the output end of the light intensity sensing module and perform amplification processing on the analog voltage signal; The analog-to-digital converter converts the amplified analog voltage signal into the digital voltage signal; The data transmission module sends the digital voltage signal to the data processing module through a bus.

20. A method for detecting the flicker frequency of an ambient light source, characterized in that, Applied to an electronic device, the electronic device includes a light intensity sensing module, an analog-to-digital conversion module, and a data processing module; the light intensity sensing module includes a photodiode. The light intensity sensing module is connected to the analog-to-digital conversion module, and the analog-to-digital conversion module is connected to the data processing module. The method includes: The light intensity sensing module detects the light intensity signal of the ambient light source and converts the light intensity signal into a voltage signal; The analog-to-digital conversion module converts the voltage signal into a digital voltage signal; the analog-to-digital conversion module is an audio chip, and the audio chip is connected to a microphone and / or a speaker; The data processing module calculates the flicker frequency of the ambient light source according to the digital voltage signal.

Citation Information

Cited By

  • Method and apparatus for detecting flicker frequency of ambient light source, and electronic device

    EP4768875A1

  • Method and apparatus for detecting flicker frequency of ambient light source, and electronic device

    WO2025148692A1