Shooting method, electronic equipment, storage medium and computer program product

By combining photodiodes and analog-to-digital converters with an integrated circuit bus, the frequency of the light source is detected and the exposure time is adjusted, which solves the problem of banding in the shooting of electronic devices in the light flickering environment, and improves the shooting quality and data transmission security.

CN121908144APending Publication Date: 2026-04-21HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-11
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In the prior art, electronic devices are prone to banding when shooting in environments with flickering light sources. The encapsulated flicker sensor cannot detect emission frequencies other than the fixed frequency, resulting in bright and dark stripes in the captured image.

Method used

The analog information of the light source is detected by a photodiode, converted into digital information by an analog-to-digital converter, and transmitted to a digital signal processor via an integrated circuit bus. The emission frequency is determined based on the digital information of the light source, and the exposure time of the scintillation sensor is adjusted to be an integer multiple of the scintillation period of the light source.

Benefits of technology

It reduces banding, improves the security and accuracy of data transmission, and ensures the quality of captured images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121908144A_ABST
    Figure CN121908144A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, and discloses a shooting method, electronic equipment, a storage medium and a computer program product, and the method executes an anti-flicker algorithm through a digital signal processor, so that after light source analog information of a light source in a shooting environment detected by a photodiode is converted into light source digital information through an analog-to-digital converter, the light source digital information is sent to the electronic equipment. The signals can be directly transmitted to the digital signal processor through the integrated circuit bus, and the digital signal processor executes an anti-flicker algorithm to obtain the emission frequency of the light source. Therefore, the integrated circuit bus is used as a physical bus, and compared with a principle that a software communication link is less affected by factors such as external electromagnetic interference and illegal access, the data transmission security can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a shooting method, electronic device, storage medium, and computer program product. Background Technology

[0002] In some shooting methods, electronic devices can store a fixed exposure time corresponding to the camera. When the electronic device detects that the user has turned on the camera, it can control the camera to receive light signals from a light source (such as the screen of the electronic device, a projector, or other luminous objects) within that fixed exposure time. The electronic device can then convert these signals into digital image information. However, if there is flickering light in the shooting environment, and the fixed exposure time stored by the electronic device is not an integer multiple of the flicker period, the image displayed on the screen may show scrolling bright and dark stripes, a phenomenon known as banding.

[0003] To avoid banding in images captured by electronic devices, some technical solutions employ packaged flicker sensors to detect the emission frequency of light emitted from a light source. Based on this emission frequency, the flicker period of the light source is determined, and the exposure time of the flicker sensor is controlled to be an integer multiple of the flicker period. However, because packaged flicker sensors have limited detection capabilities—for example, if their sampling frequency is a fixed frequency, such as 1kHz—they cannot detect emission frequencies other than this fixed frequency, thus causing banding in the images captured by the electronic device. Summary of the Invention

[0004] To address the issue of banding in images captured by electronic devices, this application provides a shooting method, an electronic device, a storage medium, and a computer program product.

[0005] In a first aspect, this application provides a shooting method applied to an electronic device, the electronic device including a photodiode, an analog-to-digital converter (ADC), and a first processor, wherein the photodiode is connected to the ADC, and the ADC is connected to the first processor via a physical bus; and the method includes: the photodiode detecting a shooting command and acquiring analog light source information of a light source in the shooting environment; the photodiode sending the analog light source information to the ADC; the ADC performing analog-to-digital conversion processing on the analog light source information to obtain digital light source information; the ADC sending the digital light source information to the first processor via the physical bus; and the first processor obtaining the emission frequency of the light source based on the digital light source information, wherein the emission frequency of the light source is used to determine the first exposure time corresponding to the shooting command.

[0006] It is understandable that, based on the above scheme, using an integrated circuit bus as a physical bus, compared to software communication links, is less affected by external electromagnetic interference, unauthorized access, and other factors, which can reduce banding while improving data transmission security.

[0007] In some alternative implementations of the first aspect, the first processor is any one of a digital signal processor, a central processing unit, or a microcontroller.

[0008] In some alternative implementations of the first aspect, the physical bus is any one of an integrated circuit bus, a serial peripheral interface bus, or a universal asynchronous transceiver bus.

[0009] In some alternative implementations of the first aspect, the first processor is a digital signal processor, and the electronic device includes an audio sensor module controlled by the digital signal processor, wherein the audio sensor module is used to obtain the emission frequency of the light source based on digital information of the light source.

[0010] In some alternative implementations of the first aspect, the audio sensor module includes an anti-flicker algorithm unit, wherein the anti-flicker algorithm unit is used to obtain the emission frequency of the light source based on digital information of the light source.

[0011] In some alternative implementations of the first aspect, the electronic device further includes a non-camera sensor service located in the hardware abstraction layer of the software system, an automatic exposure module, and a scintillation sensor module controlled by a digital signal processor; and the method further includes: the audio sensor module sending the emission frequency of the light source to the scintillation sensor module; the scintillation sensor module sending the emission frequency of the light source to the non-camera sensor service; the non-camera sensor service sending the emission frequency of the light source to the automatic exposure module; and the automatic exposure module determining a first exposure time based on the emission frequency of the light source.

[0012] In some alternative implementations of the first aspect, the method further includes: corresponding to the detection of a shooting command, the automatic exposure module controls the camera of the electronic device to acquire an image using a second exposure time; corresponding to the automatic exposure module determining a first exposure time, the automatic exposure module controls the camera of the electronic device to convert the second exposure time into the first exposure time.

[0013] In some alternative implementations of the first aspect, the automatic exposure module determines the first exposure time based on the emission frequency of the light source, including: the automatic exposure module determines the flicker period of the light source based on the reciprocal relationship between frequency and period, and the emission frequency of the light source; the automatic exposure module determines the first exposure time as an integer multiple of the flicker period of the light source.

[0014] In a second aspect, this application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the one or more processors of the electronic device, for executing the shooting method mentioned in this application.

[0015] Thirdly, this application provides a readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the shooting method mentioned in this application.

[0016] Fourthly, embodiments of this application provide a computer program product, which includes computer instructions. When executed by an electronic device, the electronic device executes the computer program code of the shooting method mentioned in this application. Attached Figure Description

[0017] Figure 1 Based on some examples of this application, a schematic diagram of a mobile phone 100's camera image is shown;

[0018] Figure 2 Based on some examples of this application, the waveform of the optical signal corresponding to the light energy emitted by a light source is shown;

[0019] Figure 3 Based on some examples of this application, a schematic diagram of the architecture of the first shooting system is shown;

[0020] Figure 4 Based on some examples of this application, a flowchart of a shooting method is shown;

[0021] Figure 5 Based on some examples of this application, a schematic diagram of the architecture of the second shooting system is shown;

[0022] Figure 6A Based on some examples of this application, a schematic diagram of the hardware structure of an electronic device is shown;

[0023] Figure 6B Based on some examples of this application, a schematic diagram of the architecture of a third shooting system is shown;

[0024] Figure 7 Based on some examples of this application, a schematic diagram of the architecture of a fourth shooting system is shown. Detailed Implementation

[0025] The illustrative embodiments of this application include, but are not limited to, a shooting method, an electronic device, a storage medium, and a computer program product.

[0026] To facilitate understanding of the solutions mentioned in the embodiments of this application, the technical terms mentioned in the embodiments of this application will be introduced below.

[0027] Exposure time: The duration for which a camera in an electronic device receives a light source signal.

[0028] It is understood that the shooting method mentioned in the embodiments of this application can be applied to scenarios where various electronic devices are used to shoot light sources. For example, using a mobile phone to shoot a projector, or using a tablet to shoot a lighting device with localized flickering light sources.

[0029] To clearly illustrate the solutions mentioned in the embodiments of this application, the embodiments of this application and the banding phenomenon are first introduced.

[0030] When there is a light source in the shooting scene, scrolling stripes may appear in the image captured by an electronic device. For example, as... Figure 1 As shown, the image 110 captured by mobile phone 100 may display scrolling stripes of light and dark; this phenomenon is called banding. The banding phenomenon occurs because the exposure time of the camera in the electronic device is not an integer multiple of the flicker period of the light source.

[0031] The formation process of the banding phenomenon will be explained in detail below.

[0032] Assuming the light source is connected to a 50Hz alternating current, the waveform of the light signal corresponding to the light energy emitted by the light source can be as follows: Figure 2 The envelope shown is a periodically changing envelope with a frequency of 100Hz.

[0033] In some specific implementations, the flicker period of the light source is denoted as T, where T = 1 / 100s. The exposure time required for the camera to capture one row of pixels in a frame is denoted as t.

[0034] When the camera's exposure time t is not an integer multiple of the light source's flicker period, for example, t = T + t1, then when the camera captures the i-th row of pixels in a frame, the light energy received by the camera is S + S1, where S represents the light energy received by the camera in the i-th row within time T, and S1 represents the light energy received by the camera within time t1. Thus, when the camera captures the (i+1)-th row of that frame, the light energy received by the camera is S2 + S3 + S4, where S2 represents the light energy received by the camera within time t4, S3 represents the light energy received by the camera within time t2, and S4 represents the light energy received by the camera within time t3.

[0035] Since t1 = t2 = t3 and t2 + t3 + t4 = t, then S1 = S3 < S4 and S + S1 < S2 + S3 + S4. This means that the light energy received by the camera when capturing the pixels in the i-th row is less than the light energy received when capturing the pixels in the (i+1)-th row. Therefore, when the image frame is displayed on the electronic device, the brightness of the pixels in the i-th row is different from that in the (i+1)-th row; the pixels in the i-th row are slightly darker than those in the (i+1)-th row. As a result, the overall captured image will exhibit scrolling bright and dark stripes due to the different brightness of the pixels in different rows, a phenomenon known as banding.

[0036] Specifically, the working principle of the flicker sensor to solve the banding phenomenon is as follows:

[0037] A flicker sensor first detects the flicker frequency of the light emitted by a light source. For example, in an AC-powered environment, traditional fluorescent lamps flicker at a certain frequency (e.g., 50Hz, corresponding to a light energy change frequency of 100Hz) due to the periodic changes in AC power. By monitoring and analyzing changes in the light source, a flicker sensor can accurately detect this flicker frequency.

[0038] After detecting the flicker frequency of the light source, the flicker sensor generates a synchronization signal based on that flicker frequency. This synchronization signal is used to indicate that the exposure time of the camera in the electronic device is an integer multiple of the flicker frequency of the light source.

[0039] As mentioned earlier, due to the limited detection capability of the packaged scintillation sensor, for example, the sampling frequency of the packaged scintillation sensor is 1KHz. Therefore, the scintillation sensor cannot detect light sources with emission frequencies higher or lower than 1KHz, making it impossible to determine the scintillation period of the light source in order to control the exposure time of the scintillation sensor to be an integer multiple of the scintillation period. As a result, when using an electronic device to photograph the light source, the screen of the electronic device will show a banding phenomenon.

[0040] It is understood that some optical devices, such as photodiodes, operate based on the photoelectric effect. When a light source emits light, the light intensity changes continuously. A photodiode can convert these light intensities into corresponding current changes; therefore, the detection capability of a photodiode is stronger than that of a scintillation sensor. To address this, this application provides a shooting method. In this method, an optical device, such as a photodiode, can be used to detect the light source information captured by the electronic device. Then, based on the detected light source information, the emission frequency of the light source is first determined, and then the scintillation period of the light source is determined based on the emission frequency. The exposure time of the scintillation sensor is then adjusted based on the scintillation period. In this way, the exposure time of the scintillation sensor in the electronic device can be controlled to be an integer multiple of the scintillation period of the light source, thereby reducing banding phenomena in the captured images.

[0041] For example, such as Figure 3 The diagram illustrates the architecture of a shooting system. This system can include both software and hardware systems. The software system can employ a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, cloud architecture, etc. The following explanation uses a layered architecture as an example to illustrate the software system within the shooting system.

[0042] A layered architecture divides a software system into several layers, each with a clearly defined role. Layers communicate with each other through software interfaces. For example, a software system can be divided into an application layer, a framework layer (not shown), a hardware abstraction layer, and a kernel layer.

[0043] The application layer can include a package of applications. For example, the application package can include a camera application, which could be the system camera application or a third-party application with shooting functionality in instant messaging software.

[0044] The framework layer can provide application programming interfaces (APIs) and programming frameworks for applications in the application layer.

[0045] Continue as Figure 3 As shown, the hardware abstraction layer may include an auto-exposure (AE) module, a non-camera sensor service (NCS Service), an audio sensor hardware abstraction layer (audio sensor HAL), and an antibanding algorithm unit.

[0046] The automatic exposure module (AE) can automatically create an auto-exposure node (AE node) when it detects that the user has turned on the camera and the camera application is in a pre-shooting state, and send a command to the non-camera sensor service (NCS Service) to create a communication connection link.

[0047] The automatic exposure module (AE) can also be used to determine the flicker period of the light source and adjust the camera's exposure time to an integer multiple of the flicker period of the light source.

[0048] Non-camera sensor services can be used to call communication interfaces to communicate with lower-level software, and can also be used to send signal acquisition commands to lower-level software.

[0049] The audio sensor hardware abstraction layer (HAL) can be used to forward commands and data, such as sending the commands mentioned above for creating communication connection links and signal acquisition to the lower-level software.

[0050] The antibanding algorithm unit can be used to determine the emission frequency of the light emitted by the light source and calculate the flicker period of the light source based on the emission frequency of the light emitted by the light source.

[0051] The kernel layer is the layer between the software system and the hardware system. Continuing... Figure 3 As shown, the kernel layer may include an audio sensor driver.

[0052] The audio sensor driver can be used to feed data back to the audio sensor hardware abstraction layer (HAL). It can also receive commands from the HAL, such as signal acquisition commands.

[0053] Continue as Figure 3 As shown, the hardware system may include a photodiode (PD) and an analog-to-digital converter (ADC).

[0054] Among them, photodiodes (PDs) can be used to detect the light intensity of light sources in the shooting environment and perform photoelectric conversion processing on the light intensity to obtain simulated light source information.

[0055] Analog-to-digital converters (ADCs) can be used to convert analog light source information into digital light source information in the shooting environment.

[0056] The following is based on Figure 3 The system architecture shown is used to introduce some shooting methods.

[0057] like Figure 3The control flow transmission link, shown by the solid line, allows the camera application to control the camera application to enter a pre-shooting state (i.e., displaying a shooting preview) when the camera application detects the user opening the camera. The AE module automatically creates an AE node and sends a command to the Non-Camera Sensor Service (NCSService) to establish a communication connection. In response to this command, the NCS Service establishes a communication connection with the audio sensor hardware abstraction layer (HAL) and the audio sensor driver. Furthermore, the NCS Service can send signal acquisition commands to the analog-to-digital converter (ADC) and photodiode (PD) via the HAL and PD.

[0058] like Figure 3 The data stream transmission link, shown by the dashed line, uses a photodiode (PD) to detect the light intensity of a light source in the shooting environment. The PD performs photoelectric conversion on the light intensity and converts it into digital information of the light source via an analog-to-digital converter (ADC). This digital information is then uploaded to the anti-flickering algorithm unit via the audio sensor driver and the audio sensor hardware abstraction layer (HAL). The anti-flickering algorithm unit then determines the emission frequency of the light emitted by the light source based on the digital information and calculates the flicker period of the light source. This information is then uploaded to the automatic exposure (AE) module via the non-camera sensor service (NCSService). The automatic exposure (AE) module adjusts the camera's exposure time to an integer multiple of the flicker period of the light source.

[0059] It is understandable that the data stream transmission link is a software communication link, including the audio sensor hardware abstraction layer (AHAL), the audio sensor hardware abstraction layer (AHAL), and the anti-flicker algorithm (AntibandingAlgo) unit. Therefore, the data stream transmission link is relatively long, which can easily lead to the risk of data transmission of the simulated light source information corresponding to the light intensity in the shooting environment.

[0060] It is understandable that, as a physical bus, the integrated circuit bus is less susceptible to external electromagnetic interference and unauthorized access compared to software communication links. Therefore, data transmission via the integrated circuit bus is more secure than data transmission via software communication links. In electronic devices, devices with processing capabilities, typically connected to analog-to-digital converters (ADCs) via the integrated circuit bus, can include digital signal processors (DSPs), central processing units (CPUs), and microprocessors. Since DSPs have low power consumption, in some embodiments, the aforementioned anti-flicker algorithm can be executed by the DSP. Thus, the analog light source information of the light source in the shooting environment detected by the photodiode, after being converted into digital light source information by the ADC, can be directly transmitted to the DSP via the integrated circuit bus. The DSP then executes the anti-flicker algorithm to obtain the emission frequency of the light source.

[0061] It is understood that in some embodiments, the digital signal processor includes an audio sensor module and a flicker sensor module. The audio sensor module is used to receive the digital light source signal converted by the analog-to-digital converter, and the flicker sensor module is used to transmit data to the non-camera sensor service located in the hardware abstraction module of the software system. However, the bandwidth of the channel through which the flicker sensor module uploads data to the non-camera sensor service is relatively small, making it unable to transmit large amounts of digital light source information. Furthermore, the audio sensor module cannot directly transmit data to the non-camera sensor service located in the hardware abstraction module of the software system. Therefore, the anti-flicker algorithm can be set in the audio sensor module.

[0062] The following is a detailed description of the shooting methods mentioned in the embodiments of this application. For example... Figure 4 The diagram illustrates a flowchart of a shooting method. In some specific implementations, this shooting method can be executed by an electronic device, which may include a photodiode, an analog-to-digital converter (ADC), and a first processor. The photodiode is connected to the ADC, and the ADC is connected to the first processor via a physical bus.

[0063] like Figure 4 As shown, the shooting method may include:

[0064] 401: When the photodiode detects a shooting command, acquire simulated light source information of the light source in the shooting environment.

[0065] In some specific implementations, photodiodes (PDs) can be used to detect the light intensity of a light source in the shooting environment and perform photoelectric conversion on the light intensity to obtain simulated light source information.

[0066] 402: The photodiode sends analog light source information to the analog-to-digital converter.

[0067] 403: The analog-to-digital converter performs analog-to-digital conversion on the analog information of the light source to obtain the digital information of the light source.

[0068] 404: The analog-to-digital converter sends digital information about the light source to the first processor via the audio integrated circuit bus.

[0069] It is understandable that the physical bus can be any of the following: integrated circuit bus, serial peripheral interface bus, or universal asynchronous transceiver bus. The primary processor can be any of the following: digital signal processor, central processing unit, or microcontroller.

[0070] 405: The first processor obtains the emission frequency of the light source based on the digital information of the light source, wherein the emission frequency of the light source is used to determine the first exposure time of the corresponding shooting command.

[0071] It is understood that the first processor may include an audio sensor module. This audio sensor module can be used to obtain the emission frequency of the light source based on digital information about the light source. The audio sensor module may also include an anti-flicker algorithm unit.

[0072] In some alternative implementations, the anti-flicker algorithm unit can be used to obtain the emission frequency of the light source based on the digital information of the light source.

[0073] Furthermore, the electronic device may also include a non-camera sensor service and an automatic exposure module located in the hardware abstraction layer of the software system, and the first processor may also include a flicker sensor module. In some specific implementations, the audio sensor module may send the emission frequency of the light source to the flicker sensor module, the flicker sensor module may send the flicker frequency of the light source to the non-camera sensor service, the non-camera sensor service may send the flicker frequency of the light source to the automatic exposure module, and then the automatic exposure module may determine the first exposure time based on the emission frequency of the light source.

[0074] After the automatic exposure module determines the first exposure time, it can determine the flicker period of the light source based on the reciprocal relationship between frequency and period, and the emission frequency of the light source. Furthermore, the automatic exposure module can determine the first exposure time as an integer multiple of the flicker period of the light source. Then, upon detecting a shooting command, the automatic exposure module can adjust the second exposure time of the electronic device's camera to the first exposure time to reduce banding.

[0075] like Figure 5 The diagram illustrates a system architecture for a shooting system. This system can include both software and hardware systems. The software system can employ a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, cloud architecture, etc. The following explanation uses a layered architecture as an example to illustrate the software system within the shooting system.

[0076] A layered architecture divides a software system into several layers, each with a clearly defined role. Layers communicate with each other through software interfaces. For example, a software system can be divided into an application layer, a framework layer (not shown), a hardware abstraction layer, and a kernel layer.

[0077] The application layer can include a package of applications. For example, the application package can include a camera application, which could be the system camera application or a third-party application with shooting functionality in instant messaging software.

[0078] The framework layer can provide application programming interfaces (APIs) and programming frameworks for applications in the application layer.

[0079] like Figure 5 As shown, the hardware abstraction layer may include an automatic exposure (AE) module, a non-camera sensor service (NCSService), a flicker sensor hardware abstraction layer (flicker sensor HAL), and an antibanding algorithm unit.

[0080] The Auto Exposure (AE) module can automatically create an auto-exposure node (AE node) and send a command to the Non-Camera Sensor Service (NCS Service) to create a communication connection link when it detects that the user has turned on the camera and the camera application is in a pre-shooting state.

[0081] The automatic exposure module (AE) can also be used to determine the flicker period of a light source based on its emission frequency and adjust the camera's exposure time to an integer multiple of the flicker period of the light source.

[0082] Non-camera sensor services can be used to call communication interfaces to communicate with lower-level software, and can also be used to send signal acquisition commands to lower-level software.

[0083] The flicker sensor hardware abstraction layer (HAL) can be used to forward commands and data, such as sending the commands mentioned above for creating communication connection links and signal acquisition to the lower-level software.

[0084] The antibanding algorithm unit can be used to determine the emission frequency of the light emitted by the light source.

[0085] The kernel layer is the layer between the software system and the hardware system. Continuing... Figure 5 As shown, the kernel layer may include a flicker driver.

[0086] The flicker driver can be used to feed back data, such as light source simulation information, to the flicker sensor hardware abstraction layer (HAL). It can also receive commands from the HAL, such as signal acquisition commands.

[0087] Continue as Figure 5 As shown, the hardware system may include a flicker sensor. The flicker sensor can be used to detect the light intensity of a light source in the shooting environment and perform photoelectric conversion processing on the light intensity to obtain simulated light source information.

[0088] The following is based on Figure 5 The system architecture shown is used to introduce some shooting methods.

[0089] like Figure 5 The control flow transmission link, shown by the solid line, allows the camera application to control the camera application to enter a pre-shooting state (i.e., displaying a shooting preview) when the camera application detects the user opening the camera. The AE module automatically creates an AE node and sends a command to the Non-Camera Sensor Service (NCS Service) to establish a communication connection. In response to this command, the NCS Service establishes a communication connection with the flicker sensor hardware abstraction layer (Flicker Sensor HAL) and the flicker sensor driver. Furthermore, the NCS Service can send signal acquisition commands to the flicker sensor via the Flicker Sensor HAL and the flicker driver.

[0090] like Figure 5The data transmission link, shown by the dashed line, involves a flicker sensor that performs photoelectric conversion on the light intensity of the detected light source in the shooting environment to obtain simulated light source information. This information is then uploaded sequentially through the flicker driver and the flicker sensor hardware abstraction layer to the antibanding algorithm unit. The antibanding algorithm unit performs a Fourier transform on the simulated light source information to determine the emission frequency of the light emitted by the light source. This information is then uploaded to the automatic exposure (AE) module via the non-camera sensor service (NCS Service). The automatic exposure (AE) module determines the flicker period of the light source based on its emission frequency and adjusts the camera's exposure time to an integer multiple of the flicker period.

[0091] It is understandable that the data stream transmission link includes a flicker driver, a flicker sensor hardware abstraction layer, and an anti-flicker algorithm unit. In other words, the data stream transmission link is relatively long. This can easily lead to the risk of data transmission of simulated light source information corresponding to the light intensity in the shooting environment.

[0092] Therefore, embodiments of this application provide an electronic device. For example... Figure 6A The diagram shows a schematic of the hardware structure of an electronic device.

[0093] Specifically, such as Figure 6AAs shown, the electronic device 600 may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, antenna 1, antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, a headphone jack 670D, a sensor module 680, buttons 690, a motor 691, an indicator 692, a camera 693, a display screen 694, and a subscriber identification module (SIM) card interface 695, etc. The sensor module 680 may include a pressure sensor 680A, a gyroscope sensor 680B, a barometric pressure sensor 680C, a magnetic sensor 680D, an accelerometer sensor 680E, a distance sensor 680F, a proximity light sensor 680G, a fingerprint sensor 680H, a temperature sensor 680J, a touch sensor 680K, an ambient light sensor 680L, a bone conduction sensor 680M, etc.

[0094] Processor 610 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The processor may be the hardware unit corresponding to the application layer mentioned above.

[0095] The digital signal processor (DSP) is used to process digital signals, including digital image signals and other digital signals. For example, the DSP may include an audio sensor module. This audio sensor module can be used to obtain the emission frequency of the light source based on digital information about the light source. The audio sensor module may also include an anti-flicker algorithm unit. This anti-flicker algorithm unit can be used to obtain the emission frequency of the light source based on digital information about the light source.

[0096] The processor 610 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. This memory can store instructions or data that the processor 610 has just used or that are used repeatedly. If the processor 610 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 610, and thus improves the efficiency of the system. For example, the processor 610 can execute the imaging method mentioned in the embodiments of this application.

[0097] In some embodiments, the processor 610 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0098] The I2S interface can be used for audio communication. In some embodiments, the processor 66 may include multiple I2S buses. The processor 66 can be coupled to the audio module 670 via the I2S bus to enable communication between the processor 66 and the audio module 670. In some embodiments, the audio module 670 can transmit audio signals to the wireless communication module 660 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0099] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. The UART interface is a universal serial data bus used for asynchronous communication. The GPIO interface is software configurable. GPIO can be configured as either control or data signals. The MIPI interface can be used to connect the processor 610 to peripheral devices such as the display 694 and camera 693. The GPIO interface is software configurable. The USB interface 630 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, or USB Type-C interface.

[0100] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 600. In other embodiments of this application, the electronic device 600 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0101] The charging management module 640 receives charging input from the charger. The power management module 641 connects to the battery 642, and the charging management module 640 connects to the processor 610.

[0102] The wireless communication function of electronic devices can be implemented through antenna 1, antenna 2, mobile communication module 650, wireless communication module 660, modem processor, and baseband processor.

[0103] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 650 can provide solutions for wireless communication applications in electronic devices, including 2G / 3G / 4G / 5G. The modem processor can include a modulator and a demodulator. Wireless communication module 660 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) technologies.

[0104] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 650, and the antenna 2 is coupled to the wireless communication module 660, enabling the electronic device to communicate with networks and other devices via wireless communication technology.

[0105] The electronic device implements display functions through a GPU, a display screen 694, and an application processor. The display screen 694 is used to display images and videos. The electronic device also implements shooting functions through an ISP, a camera 693, a video codec, a GPU, the display screen 694, and an application processor. The ISP processes data fed back from the camera 693. The camera 693 is used to capture still images or videos. The video codec is used to compress or decompress digital video.

[0106] The external memory interface 620 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The internal memory 621 can be used to store computer executable program code, including instructions. The internal memory 621 may include a program storage area and a data storage area.

[0107] Electronic devices can implement audio functions, such as music playback and recording, through audio modules 670, speakers 670A, receivers 670B, microphones 670C, headphone jacks 670D, and application processors.

[0108] Audio module 670 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Speaker 670A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 670B, also called a "handpiece," is used to convert audio electrical signals into sound signals. Microphone 670C, also called a "microphone" or "microphone," is used to convert sound signals into electrical signals. Headphone jack 670D is used to connect wired headphones. Headphone jack 670D can be a USB 630 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, or a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0109] Pressure sensor 680A senses pressure signals and converts them into electrical signals. Gyroscope sensor 680B determines the motion posture of electronic devices. Barometric pressure sensor 680C measures air pressure. Magnetism sensor 680D includes a Hall effect sensor. Accelerometer sensor 680E detects the magnitude of acceleration in various directions (typically three axes) of electronic devices. Distance sensor 680F measures distance. Proximity sensor 680G may include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. Ambient light sensor 680L senses ambient light intensity. Fingerprint sensor 680H collects fingerprints. Temperature sensor 680J detects temperature. Touch sensor 680K, also called a "touch device," can be placed on display screen 694. The touch sensor 680K and display screen 694 together form a touchscreen, also called a "touchscreen." Touch sensor 680K detects touch operations applied to or near it. Bone conduction sensor 680M acquires vibration signals.

[0110] Buttons 690 include a power button, volume buttons, etc. Buttons 690 can be mechanical buttons or touch-sensitive buttons. The electronic device can receive button input and generate key signal inputs related to user settings and function control.

[0111] Motor 691 can generate vibration alerts. Indicator 692 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 695 is used to connect a SIM card.

[0112] This application also provides a shooting system. For example... Figure 6B The diagram illustrates the system architecture of another imaging system. This imaging system can include a software system and a hardware system. The software system can employ a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, cloud architecture, etc. The following explanation uses a layered architecture as an example to illustrate the software system within the imaging system.

[0113] A layered architecture divides a software system into several layers, each with a clearly defined role. Layers communicate with each other through software interfaces. This software system can be divided into an application layer, a framework layer, a hardware abstraction layer, and a kernel layer.

[0114] The application layer can include application packages of a series of applications.

[0115] The framework layer can provide application programming interfaces and programming frameworks for applications in the application layer.

[0116] like Figure 6BAs shown, the hardware abstraction layer may include an automatic exposure module (AE), a non-camera sensor service (NCSService), and an audio sensor hardware abstraction layer (audio sensor HAL).

[0117] The automatic exposure module (AE) can automatically create an automatic exposure node (AE node) and send a command to the non-camera sensor service (NCS Service) to create a communication connection link when it detects that the user has turned on the camera and the camera application is in a pre-shooting state.

[0118] Non-camera sensor services can be used to call communication interfaces that communicate with lower-level software.

[0119] The audio sensor hardware abstraction layer (HAL) can be used to forward commands and data, such as sending the command to create a communication connection link, as mentioned above, to the lower-level software.

[0120] The kernel layer is the layer between the software system and the hardware system. Continuing... Figure 6B As shown, the kernel layer may include an analog-to-digital converter (ADC) driver. This ADC driver can be used to receive instructions from upper-layer software, such as signal acquisition instructions.

[0121] The hardware system may include digital signal processors (ADSPs) and hardware.

[0122] The digital signal processor may include a flicker sensor module and an audio sensor module, namely the flicker sensor module (flicker sensor pd) and the audio sensor module (audio sensor pd) in the ADSP.

[0123] The flicker sensor module (flicker sensorpd) in the ADSP can be used to forward commands and data, such as sending the command to create a communication connection link mentioned above to the audio sensor module (audio sensorpd) in the ADSP.

[0124] In ADSP, the audio sensor module (audio sensorpd) can be used to forward commands and data, such as sending the command to create a communication connection link mentioned above to the audio sensor hardware abstraction layer (audio sensorhal).

[0125] The audio sensor module (audio sensor PD) in the ADSP may include an antibanding algorithm unit. This antibanding algorithm unit can determine the emission frequency of the light emitted by the light source and calculate the flicker period of the light source based on the emission frequency.

[0126] The hardware may include photodiodes (PDs) and analog-to-digital converters (ADCs).

[0127] Among them, photodiodes (PDs) can be used to detect the light intensity of light sources in the shooting environment and perform photoelectric conversion processing on the light intensity to obtain simulated light source information.

[0128] Analog-to-digital converters (ADCs) can be used to convert analog light source information into digital light source information in the shooting environment.

[0129] The following is based on Figure 6B The system architecture shown illustrates the shooting method mentioned in the embodiments of this application.

[0130] like Figure 6BThe control flow transmission link, shown by the solid line, allows the camera application to control the camera application to enter a pre-shooting state (i.e., displaying a shooting preview on the electronic device) when the camera application detects the user opening the camera. The AE module can automatically create an AE node and send a command to the Non-Camera Sensor Service (NCSService) to establish a communication connection. In response to this command, the NCS Service establishes communication connections with the flicker sensor module (flicker sensorpd) in the ADSP, the audio sensor module (audio sensor pd) in the ADSP, the audio sensor hardware abstraction layer (audiosensor HAL), and the analog-to-digital converter driver (ADC driver). Furthermore, the Non-Camera Sensor Service (NCS Service) can send signal acquisition commands to the analog-to-digital converter (ADC) driver through the flicker sensor module (flicker sensor pd) in the ADSP, the audio sensor module (audio sensor pd) in the ADSP, the audio sensor hardware abstraction layer (audiosensor HAL), and the analog-to-digital converter driver. In turn, it can send signal acquisition commands to the photodiode (PD) through the inter-integrated circuit (I2C) and the analog-to-digital converter (ADC).

[0131] like Figure 6B The data transmission link, shown by the dashed line, involves a photodiode (PD) that performs photoelectric conversion on the light intensity detected in the shooting environment to obtain analog light source information. This analog information is then converted into digital light source information by an analog-to-digital converter (ADC) and uploaded to the anti-flicker algorithm unit via an inter-channel audio bus (I2S). The anti-flicker algorithm unit can then determine the emission frequency of the light emitted by the light source based on this digital information. This information is then uploaded to the automatic exposure (AE) module via the flicker sensor module (flicker sensorpd) in the ADSP and the non-camera sensor service (NCS Service). The AE module can then determine the flicker period of the light source based on its emission frequency and adjust the camera's exposure time to an integer multiple of the flicker period.

[0132] Thus, the data stream transmission link includes an analog-to-digital converter (ADC) and an anti-flicker algorithm unit, meaning the data stream transmission link is shortened. This improves the transmission security of analog signals from light sources corresponding to the light intensity in the shooting environment. Furthermore, the combination of photodiodes and ADCs can improve sampling frequency and data acquisition accuracy, enabling the detection of light source frequencies in complex environments, thus adapting to high-frequency and low-fluctuation depth scenes.

[0133] The following is combined Figure 7 The following section provides a further description of the shooting system mentioned in the embodiments of this application.

[0134] like Figure 7 The diagram illustrates the system architecture of another imaging system. This imaging system may include an application layer, a framework layer, a hardware abstraction layer (HAL), a kernel layer, a sensor hub, and hardware.

[0135] like Figure 7 As shown, the application layer can include an application package containing a series of applications. This application package may include self-developed cameras, third-party cameras, etc., and may also include gallery, calendar, call, map, navigation, Bluetooth, music, video, etc., without specific limitations in this embodiment.

[0136] Continue as Figure 7 As shown, the framework layer provides application programming interfaces and programming frameworks for applications in the application layer. The framework layer can include a camera service. This camera service can be used to control the camera to perform basic shooting operations.

[0137] Continue as Figure 7 As shown, the Hardware Abstraction Layer (HAL) can include the Camera Hardware Abstraction Layer (Camera HAL).

[0138] The Camera Hardware Abstraction Layer (Camera HAL) can include an automatic exposure module, a statistics module, and a Non-Camera Sensor Service (NCS Service).

[0139] The Auto Exposure (AE) module can be used to automatically create an Auto Exposure node (AE node) when it detects that the user has turned on the camera, putting the camera application in a pre-shooting state, and send a command to create a communication connection link to the Non-Camera Sensor Service (NCS Service) in the framework layer.

[0140] The statistics module can be used to forward commands and data, such as sending the command to create a communication connection link mentioned above to the lower-level software.

[0141] The Non-Camera Sensor Server (NCS Service) can be used to call the communication interface for communicating with the underlying software.

[0142] In some specific implementations, the Non-Camera Sensor Server (NCS Service) may include the network control interface to the Qualcomm Secure Execution Environment (NCSIntfQSEE) and the service state control connection (SSCConnection) interface.

[0143] The network control system interface and the Qualcomm Secure Execution Environment (NCSIntfQSEE) related part can include an audio sensor hardware abstraction layer (HAL) and a flicker sensor hardware abstraction layer (Flicker SensorHAL), referred to as Audio-Flicker. Furthermore, the network control system interface and the Qualcomm Secure Execution Environment (NCSIntfQSEE) related part can also include sensor callback functions.

[0144] The audio sensor hardware abstraction layer (HAL) can be used to forward commands and data, such as sending the command to create a communication connection link, as mentioned above, to the lower-level software.

[0145] The flicker sensor hardware abstraction layer (HAL) can be used to forward commands and data, such as sending the commands mentioned above for creating communication connection links and signal acquisition to the lower-level software.

[0146] The SensorCallBack function module can be used to obtain the blink cycle of the light source via callback.

[0147] Continue as Figure 7 As shown, the kernel layer may include the Qualcomm Message Interface (QMI).

[0148] A sensor hub can include a flicker sensor module and an audio sensor module, namely the flicker sensor module (flicker sensor pd) and the audio sensor module (audio sensor pd) in the ADSP.

[0149] The flicker sensor module (flicker sensorpd) in the ADSP can be used to forward commands and data, such as sending the command to create a communication connection link mentioned above to the audio sensor module (audio sensorpd) in the ADSP.

[0150] In ADSP, the audio sensor module (audio sensorpd) can be used to forward commands and data, such as sending the command to create a communication connection link mentioned above to the audio sensor hardware abstraction layer (audio sensorhal).

[0151] The audio sensor module (audio sensor PD) in the ADSP may include an antibanding algorithm unit. This antibanding algorithm unit can be used to determine the emission frequency of the light emitted by the light source.

[0152] Hardware can include photodiodes (PDs) and analog-to-digital converters (ADCs).

[0153] Among them, photodiodes (PDs) can be used to detect the light intensity of light sources in the shooting environment and perform photoelectric conversion processing on the light intensity to obtain simulated light source information.

[0154] Analog-to-digital converters (ADCs) can be used to convert analog light source information into digital light source information in the shooting environment.

[0155] The following is based on Figure 7 The system architecture shown illustrates the shooting method mentioned in the embodiments of this application.

[0156] exist Figure 7In the system architecture shown, when a user opens the camera application, the Camera HAL can control the camera application to be in a pre-shooting state and send the camera application's status information to the Auto Exposure (AE) module. The AE module can automatically create an AE node and send a command to the Non-Camera Sensor Service (NCS Service) to establish a communication connection link. In response to the communication connection link establishment command, the NCS Service can invoke the Service State Control Connection (SSCConnection) interface and the Qualcomm Message Interface (QMI) to establish communication connection links with the flickersensor module (flicker sensorpd) and the audio sensor module (audiosensorpd) in the ADSP.

[0157] Furthermore, the Non-Camera Sensor Service (NCS Service) can send signal acquisition commands to the analog-to-digital converter (ADC) and photodiode (PD) through the flicker sensor module (flicker sensor pd) in the ADSP and the audio sensor module (audio sensor pd) in the ADSP.

[0158] The photodiode (PD) performs photoelectric conversion on the light intensity of the detected light source in the shooting environment to obtain analog light source information. This analog-to-digital converter then converts the analog light source information into digital light source information and uploads it to the antibanding algorithm unit. The antibanding algorithm unit can then determine the emission frequency of the light emitted by the light source based on the digital light source information. This information is then uploaded to the automatic exposure (AE) module via a communication link. The AE module can determine the flicker period of the light source based on its emission frequency and adjust the camera's exposure time to an integer multiple of the flicker period.

[0159] The shooting method mentioned in the embodiments of this application will be described in further detail below.

[0160] First, upon detecting that the user has activated the camera, the automatic exposure (AE) module can enter the streaming phase. In some implementations, the automatic exposure (AE) module can perform initialization processing.

[0161] Then, the Auto Exposure (AE) module can establish a connection to the Non-Camera Sensor Service (NCS Service). Specifically, the AE module can automatically create an AE node and send a command to the NCS Service to establish a communication connection link, i.e., a handshake connection is established when the flicker sensor module (flicker sensorpd) in the ADSP is detected.

[0162] After establishing a connection to the Non-Camera Sensor Service (NCS), the NCS service can create a connection handle. The Automatic Exposure (AE) module can connect to the NCS and send configuration initialization commands to it.

[0163] Next, the Non-Camera Sensor Service (NCS service) can send configuration initialization commands to the flicker sensor module (flicker sensor pd) in the ADSP.

[0164] In ADSP, the flicker sensor module (flicker sensorpd for short) can respond to configuration initialization commands and create an instance.

[0165] Furthermore, the flicker sensor module (flicker sensorpd) in the ADSP can create a timer in the instance and send signal acquisition commands to the analog-to-digital converter (ADC) and photodiode (PD) every 30ms via the audio sensor and integrated circuit bus (I2C) to instruct the photodiode (PD) to detect the light intensity of the light source in the shooting environment, perform photoelectric conversion processing on the light intensity to obtain analog light source information, convert the analog light source information into digital light source information via the analog-to-digital converter, and return it to the audio sensor module (audiosensorpd) in the ADSP.

[0166] Then, the audio sensor module in the ADSP calculates the flicker frequency of the light source based on an anti-flicker algorithm. Furthermore, the audio sensor module (audio sensor pd) in the ADSP can send the flicker frequency of the light source to the flicker sensor module (flicker sensor pd) in the ADSP. Subsequently, the flicker sensor module (flicker sensor pd) in the ADSP can parse and store the flicker frequency of the light source.

[0167] Furthermore, the timer in the flicker sensor module (flicker sensorpd) in the ADSP can respond to the callback instruction of the SensorCallBack function module, uploading the flicker frequency of the light source to the automatic exposure (AE) module every 50ms. The automatic exposure (AE) module can then determine the flicker period of the light source based on its emission frequency and adjust the camera's exposure time to an integer multiple of the flicker period of the light source, thereby reducing banding on the shooting interface.

[0168] When the system detects that the user has turned off the camera, the Auto Exposure (AE) module can send a command to the flicker sensor module (flicker sensor pd) in the ADSP to cancel the non-camera sensor service connection.

[0169] The flicker sensor can respond to the command to cancel the non-camera sensor service connection, close the non-camera sensor service connection, and wait for the next establishment of the non-camera sensor service, thus completing the closed loop of the entire path.

[0170] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0171] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0172] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0173] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0174] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0175] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0176] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A shooting method, characterized in that, The invention is applied to an electronic device, which includes a photodiode, an analog-to-digital converter, and a first processor. The photodiode is connected to the analog-to-digital converter, and the analog-to-digital converter is connected to the first processor via a physical bus. And the method includes: The photodiode detects the shooting command and collects light source simulation information of the light source in the shooting environment; The photodiode sends the light source simulation information to the analog-to-digital converter; The analog-to-digital converter performs analog-to-digital conversion processing on the analog information of the light source to obtain digital information of the light source. The analog-to-digital converter sends the digital information of the light source to the first processor via the physical bus; The first processor obtains the emission frequency of the light source based on the digital information of the light source, wherein the emission frequency of the light source is used to determine the first exposure time corresponding to the shooting command.

2. The method according to claim 1, characterized in that, The first processor can be any one of a digital signal processor, a central processing unit, or a microcontroller.

3. The method according to claim 1, characterized in that, The physical bus can be any one of the following: integrated circuit bus, serial peripheral interface bus, or universal asynchronous transceiver bus.

4. The method according to claim 2, characterized in that, The first processor is a digital signal processor, and the electronic device includes an audio sensor module controlled by the digital signal processor. The audio sensor module is used to obtain the emission frequency of the light source based on the digital information of the light source.

5. The method according to claim 4, characterized in that, The audio sensor module includes an anti-flicker algorithm unit. The anti-flicker algorithm unit is used to obtain the emission frequency of the light source based on the digital information of the light source.

6. The method according to claim 4 or 5, characterized in that, The electronic device also includes a non-camera sensor service located in the hardware abstraction layer of the software system, an automatic exposure module, and a scintillation sensor module controlled by the digital signal processor; The method also includes: The audio sensor module sends the emission frequency of the light source to the flash sensor module; The flicker sensor module sends the emission frequency of the light source to the non-camera sensor service; The non-camera sensor service sends the emission frequency of the light source to the automatic exposure module; The automatic exposure module determines the first exposure time based on the emission frequency of the light source.

7. The method according to claim 6, characterized in that, The method further includes: In response to the detected shooting command, the automatic exposure module controls the camera of the electronic device to acquire images using a second exposure time; Corresponding to the first exposure time determined by the automatic exposure module, the automatic exposure module controls the camera of the electronic device to convert the second exposure time into the first exposure time.

8. The method according to claim 6, characterized in that, The automatic exposure module determines the first exposure time based on the emission frequency of the light source, including: The automatic exposure module determines the flicker period of the light source based on the reciprocal relationship between frequency and period, and the emission frequency of the light source. The automatic exposure module determines the first exposure time as an integer multiple of the flicker period of the light source.

9. An electronic device, characterized in that, include: A memory for storing instructions executed by one or more processors of the electronic device, wherein the processor is one of one or more processors of the electronic device for performing the imaging method according to any one of claims 1-8.

10. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the shooting method according to any one of claims 1-8.

11. A computer program product, characterized in that, The computer program product includes computer instructions, which, when executed by an electronic device, execute the computer program code of the shooting method as described in any one of claims 1-8.