Flicker frequency identification method and apparatus, terminal, and storage medium

CN117392048BActive Publication Date: 2026-10-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210786786.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2026-10-23
Estimated Expiration
2042-07-04

AI Technical Summary

Benefits of technology

[0008]本公开第一方面实施例提出的闪烁频率识别方法,通过获取环境光的本次光源频率,获取第一数量的历史光源频率,其中,历史光源频率是从环境光的历史频谱信息中提取得到,根据第一数量的历史光源频率,确定本次光源频率的可信度信息,其中,可信度信息用于描述本次光源频率的可信程度,根据本次光源频率、历史光源频率、以及可信度信息确定环境光的闪烁频率,能够联合本次光源频率、历史光源频率和可信度信息确定闪烁频率,提升闪烁频率识别的稳定性,有效提升闪烁频率识别的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392048B_ABST
    Figure CN117392048B_ABST
Patent Text Reader

Abstract

The present disclosure provides a flicker frequency identification method, an imaging method, a device, a terminal and a storage medium. The method comprises: obtaining a current light source frequency of ambient light, obtaining a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from historical spectrum information of the ambient light, determining credibility information of the current light source frequency according to the first number of historical light source frequencies, wherein the credibility information is used to describe the credibility of the current light source frequency, and determining a flicker frequency of the ambient light according to the current light source frequency, the historical light source frequencies and the credibility information. Through the present disclosure, the flicker frequency can be determined by combining the current light source frequency, the historical light source frequencies and the credibility information, the stability of flicker frequency identification is improved, and the accuracy of flicker frequency identification is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal technology, and in particular to a flicker frequency identification method, device, terminal and storage medium. Background Technology

[0002] Currently, when using a camera to photograph light sources, the camera image is prone to flickering with rolling dark stripes, and it is necessary to identify the frequency of this flickering.

[0003] In related technologies, the statistical calculation of flicker frequency is usually based on single-frame sampling.

[0004] In this method, when in a dimly lit environment, the weak light source signal can cause unstable statistical information, resulting in fluctuations in the calculated light source frequency and affecting the accuracy of flicker frequency recognition. Summary of the Invention

[0005] This disclosure aims to at least partially address one of the technical problems in the related art.

[0006] Therefore, the purpose of this disclosure is to propose a flicker frequency identification method, device, terminal, storage medium, and computer program product that can determine the flicker frequency by combining the current light source frequency, historical light source frequency, and reliability information, thereby improving the stability and accuracy of flicker frequency identification.

[0007] The flicker frequency identification method proposed in the first aspect of this disclosure includes: acquiring the current light source frequency of ambient light; acquiring a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light; determining the credibility information of the current light source frequency based on the first number of historical light source frequencies, wherein the credibility information is used to describe the credibility of the current light source frequency; and determining the flicker frequency of ambient light based on the current light source frequency, the historical light source frequencies, and the credibility information.

[0008] The flicker frequency identification method proposed in the first aspect of this disclosure obtains the current light source frequency of ambient light and a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined, wherein the reliability information is used to describe the reliability of the current light source frequency. The flicker frequency of ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. This method can combine the current light source frequency, historical light source frequencies, and reliability information to determine the flicker frequency, thereby improving the stability of flicker frequency identification and effectively improving the accuracy of flicker frequency identification.

[0009] The flicker frequency identification device proposed in the second aspect of this disclosure includes: a first acquisition module for acquiring the current light source frequency of ambient light; a second acquisition module for acquiring a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from historical spectrum information of ambient light; a first determination module for determining the credibility information of the current light source frequency based on the first number of historical light source frequencies, wherein the credibility information is used to describe the credibility level of the current light source frequency; and a second determination module for determining the flicker frequency of ambient light based on the current light source frequency, historical light source frequencies, and credibility information.

[0010] The flicker frequency identification device proposed in the second aspect of this disclosure acquires the current light source frequency of ambient light and a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined, wherein the reliability information is used to describe the reliability of the current light source frequency. The flicker frequency of ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. The device can combine the current light source frequency, historical light source frequencies, and reliability information to determine the flicker frequency, thereby improving the stability of flicker frequency identification and effectively improving the accuracy of flicker frequency identification.

[0011] The imaging method proposed in the third aspect of this disclosure includes: acquiring the flicker frequency of ambient light identified by the flicker frequency identification method proposed in the first aspect of the present invention; determining the target exposure time of the camera component based on the flicker frequency; and controlling the camera component to image based on the target exposure time.

[0012] The imaging method proposed in the third aspect of this disclosure obtains the flicker frequency of ambient light identified by the flicker frequency identification method proposed in the first aspect of the disclosure above, determines the target exposure time of the camera component based on the flicker frequency, and controls the camera component to image based on the target exposure time. It can adjust the exposure time of the camera component according to the flicker frequency to obtain the target exposure time. Imaging of the camera component based on the target exposure time can effectively eliminate the stripe rolling phenomenon caused by the flicker frequency of the light source and effectively improve the imaging effect of the camera component.

[0013] The imaging apparatus according to the fourth aspect of this disclosure includes: a third acquisition module for acquiring the flicker frequency of ambient light identified by the flicker frequency recognition device as described in the second aspect of the disclosure; a third determination module for determining the target exposure time of the camera component based on the flicker frequency; and a control module for controlling the camera component to image based on the target exposure time.

[0014] A fifth aspect of this disclosure provides a terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the flicker frequency identification method as proposed in the first aspect of this disclosure, or the imaging method as proposed in the second aspect of this disclosure.

[0015] A sixth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the flicker frequency identification method as proposed in the first aspect of this disclosure, or the imaging method as proposed in the second aspect of this disclosure.

[0016] A seventh aspect of this disclosure provides a computer program product that, when executed by a processor, performs either the flicker frequency identification method as proposed in the first aspect of this disclosure or the imaging method as proposed in the second aspect of this disclosure.

[0017] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:

[0019] Figure 1 This is a schematic flowchart of a flicker frequency identification method proposed in an embodiment of this disclosure;

[0020] Figure 2 This is a flowchart illustrating a flicker frequency identification method according to another embodiment of this disclosure;

[0021] Figure 3 This is a flowchart illustrating a flicker frequency identification method according to another embodiment of this disclosure;

[0022] Figure 4 This is a schematic diagram of the exposure time calculation process in an embodiment of this disclosure;

[0023] Figure 5 This is a schematic flowchart of an imaging method proposed in an embodiment of the present disclosure;

[0024] Figure 6 This is a schematic diagram of the structure of a flicker frequency identification device according to an embodiment of the present disclosure;

[0025] Figure 7 This is a schematic diagram of the structure of a flicker frequency identification method proposed in another embodiment of this disclosure;

[0026] Figure 8 This is a schematic diagram of the structure of an imaging device according to an embodiment of the present disclosure;

[0027] Figure 9 A block diagram is shown that is suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0028] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.

[0029] Figure 1 This is a schematic flowchart of a flicker frequency identification method proposed in an embodiment of this disclosure.

[0030] It should be noted that the entity executing the flicker frequency identification method in this embodiment is a flicker frequency identification device, which can be implemented by software and / or hardware. The device can be configured in an electronic device, which may include, but is not limited to, a terminal or a server.

[0031] like Figure 1 As shown, the flicker frequency identification method includes:

[0032] S101: Obtain the frequency of the ambient light source.

[0033] The current light source frequency refers to the emission frequency of the ambient light in the scene being captured by the camera at the current moment. This ambient light can be the light source in the current shooting scene.

[0034] In this embodiment of the disclosure, when acquiring the current light source frequency of the ambient light, an anti-flicker sensor can be activated when the camera is started to capture the light source in the scene. The anti-flicker sensor collects the original brightness information of the ambient light source over a period of time. The original brightness information is then transmitted to the camera's hardware abstraction layer through a noise correction algorithm. The light source spectrum information of the current light source is calculated through the Fast Fourier Transform (FFT) of the hardware abstraction layer. The maximum peak frequency within the current period of time is selected as the light source frequency based on the light source spectrum information, thereby realizing the acquisition of the current light source frequency of the ambient light.

[0035] S102: Obtain the first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light.

[0036] Among them, the historical light source frequency refers to the light source frequency at a historical moment before the current light source frequency is obtained. The historical light source frequency can be extracted from the historical spectrum information of ambient light.

[0037] Historical spectrum information refers to the spectrum information of historical moments prior to the current moment.

[0038] The first quantity refers to the number of historical light source frequencies collected from historical spectrum information.

[0039] In this embodiment of the disclosure, when obtaining a first number of historical light source frequencies, the light source spectrum information of a pre-saved historical moment can be obtained, and multiple historical peak frequencies can be obtained from the historical light source frequency information closest to the current moment. The obtained historical peak frequencies are used as historical light source frequencies, and the number of obtained historical light source frequencies is used as the first number, so as to obtain a first number of historical light source frequencies.

[0040] S103: Based on the first number of historical light source frequencies, determine the reliability information of the current light source frequency, wherein the reliability information is used to describe the reliability of the current light source frequency.

[0041] The credibility information refers to the constraints under which the current light source frequency can be used to assist in adjusting the exposure time. The credibility information describes the credibility of the current light source frequency. If the credibility of the current light source frequency is high, then the current light source frequency can be used to adjust the exposure time.

[0042] In this embodiment of the disclosure, when determining the reliability information of the current light source frequency based on a first number of historical light source frequencies, the original reliability data of the current light source frequency can be determined first based on the amplitude of the maximum frequency in the light source spectrum corresponding to the current light source frequency, the original brightness of the ambient light source, the ratio of the maximum frequency to the commonly used frequency, and the ratio of the maximum frequency amplitude to the average value of the DC component. Then, the maximum frequency value and the number of maximum frequency values ​​in the first number of historical light source frequencies can be analyzed. The current light source frequency can be compared with the historical light source frequencies. If the historical light source frequency is the same as the current light source frequency, and the first number is greater than a set number (the set number is a preset value), then the original reliability of the current light source frequency is increased. The reliability obtained after adjustment is used as the reliability information of the current light source frequency, and the reliability information can be used to adjust the exposure time.

[0043] In other embodiments, if the frequency values ​​of the historical light source frequencies are the same as the frequency of the current light source, and the first number is less than a set number, it can be confirmed that there is no stable flicker frequency in this light source. There is no need to adjust the original confidence level of the current light source frequency. The original confidence level is maintained and used as the confidence level information of the current light source frequency. If multiple other frequency values ​​that are different from the current light source frequency appear in the first number of historical light source frequencies, the current light source frequency is considered unreliable. The original confidence level of the current light source frequency is lowered and the confidence level obtained after adjustment is used as the confidence level information of the current light source frequency. Alternatively, any other possible method can be used to determine the confidence level information of the current light source frequency based on the first number of historical light source frequencies. There are no restrictions on this.

[0044] S104: Determine the flicker frequency of the ambient light based on the frequency of the current light source, the frequency of historical light sources, and the credibility information.

[0045] In this embodiment of the present disclosure, after obtaining the current light source frequency and a first number of historical light source frequencies of the ambient light, and determining the reliability information of the current light source frequency based on the first number of historical light source frequencies, the flicker frequency of the ambient light can be determined based on the current light source frequency, the historical light source frequencies, and the reliability information.

[0046] The flicker frequency refers to the flicker frequency of a light source that causes a wavy, rolling phenomenon to appear on the camera screen when the camera captures a light source.

[0047] In this embodiment of the disclosure, when determining the flicker frequency of ambient light based on the current light source frequency, historical light source frequency, and confidence information, the current light source frequency can be compared with the historical light source frequency, and the confidence information of the current light source frequency can be adjusted according to the comparison result. Then, the confidence level of the current light source frequency can be determined based on the confidence information of the light source frequency. A confidence threshold can be preset. If the confidence level of the current light source frequency is greater than the confidence threshold, the current light source frequency can be used as the flicker frequency. The exposure time can be adjusted according to the flicker frequency to eliminate the ripple scrolling phenomenon displayed in the camera image when the camera captures the light source.

[0048] In this embodiment, by acquiring the current light source frequency of the ambient light, a first number of historical light source frequencies are acquired. The historical light source frequencies are extracted from the historical spectrum information of the ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined. The reliability information is used to describe the reliability of the current light source frequency. The flicker frequency of the ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. The flicker frequency can be determined by combining the current light source frequency, historical light source frequencies, and reliability information, thereby improving the stability of flicker frequency identification and effectively improving the accuracy of flicker frequency identification.

[0049] Figure 2 This is a schematic flowchart of a flicker frequency identification method proposed in an embodiment of this disclosure.

[0050] like Figure 2 As shown, the flicker frequency identification method includes:

[0051] S201: Collect the light source spectrum information of the current frame of ambient light, wherein the light source spectrum information includes: multiple first candidate frequencies.

[0052] Among them, the light source spectrum information can include statistical data such as the frequency amplitude and peak frequency of the ambient light source. The light source spectrum information includes multiple first candidate frequencies. The light source spectrum information of the current frame of the ambient light refers to the light source spectrum information corresponding to the ambient light source at the current moment.

[0053] The first candidate frequency refers to the multiple frequency values ​​corresponding to the current light source contained in the light source spectrum information of the current frame of ambient light.

[0054] In this embodiment of the present disclosure, when acquiring the light source spectrum information of the current frame of ambient light, the original brightness information of the ambient light source within a certain period of time starting from the current moment can be acquired using an anti-flicker sensor. The original brightness information is transmitted to the hardware abstraction layer of the camera through a noise correction algorithm. The fast Fourier transform of the hardware abstraction layer is used to calculate the light source spectrum information of multiple frames starting from the current moment of the ambient light source. The light source spectrum information contains multiple frequency values ​​of the ambient light at the current moment, and these multiple frequency values ​​can be used as multiple first candidate frequencies contained in the light source spectrum information.

[0055] S202: Select the first candidate frequency with the largest value from multiple first candidate frequencies as the current light source frequency.

[0056] In this embodiment of the present disclosure, after acquiring the light source spectrum information of the current frame of ambient light and obtaining multiple first candidate frequencies included in the light source spectrum information, the first candidate frequency with the largest value can be selected from the multiple first candidate frequencies as the current light source frequency.

[0057] In this embodiment of the disclosure, when selecting the first candidate frequency with the largest value from multiple first candidate frequencies as the current light source frequency, the frequency values ​​of multiple first candidate frequencies can be compared and the first candidate frequency with the largest frequency value can be selected as the current light source frequency.

[0058] S203: Obtain a first quantity of historical spectrum information of ambient light, wherein the historical spectrum information includes: multiple second candidate frequencies.

[0059] Among them, historical spectrum information refers to the light source spectrum information of ambient light at historical moments before the current moment. The historical spectrum information includes multiple second candidate frequencies.

[0060] Among them, multiple second candidate frequencies refer to multiple emission frequency values ​​of ambient light sources at historical moments contained in historical spectrum information.

[0061] In this embodiment of the disclosure, when acquiring a first quantity of historical spectrum information of ambient light, the light source spectrum information of a pre-saved historical moment can be acquired, a first quantity of historical spectrum information can be collected from the light source spectrum information of the historical moment, and multiple frequencies can be acquired from the first quantity of historical spectrum information as multiple second candidate frequencies included in the historical spectrum information.

[0062] S204: Select the second candidate frequency with the largest value from multiple second candidate frequencies as the historical light source frequency to obtain the first number of historical light source frequencies.

[0063] In this embodiment of the present disclosure, after collecting a first quantity of historical spectrum information and obtaining multiple second candidate frequencies included in the first quantity of historical spectrum information, the second candidate frequency with the largest value can be selected from the multiple second candidate frequencies as the historical light source frequency.

[0064] In this embodiment of the disclosure, when selecting the second candidate frequency with the largest value from a plurality of second candidate frequencies as the historical light source frequency, the plurality of second candidate frequencies can be numerically compared, and the second candidate frequency with the largest value can be selected as the historical light source frequency. The number of second candidate frequencies is used as the first quantity to obtain the first quantity of historical light source frequencies.

[0065] In this embodiment, by acquiring a first quantity of historical spectrum information of ambient light, the second candidate frequency with the largest value is selected from multiple second candidate frequencies as the historical light source frequency, thus obtaining a first quantity of historical light source frequencies. This allows the acquisition of historical spectrum information of ambient light, and the acquisition of historical light source frequencies from the historical spectrum information to assist in determining the flicker frequency. This avoids the flicker frequency jitter phenomenon caused by the anti-flicker sensor calculating the flicker frequency solely based on the spectrum information at the current moment, effectively improving the stability and accuracy of flicker frequency identification.

[0066] S205: Determine a second number of historical light source frequencies with the same frequency value among the first number of historical light source frequencies.

[0067] Among them, the first historical light source frequency refers to the light source frequency with the same frequency value among the first number of historical light source frequencies, and the number of first historical light source frequencies with the same frequency value among the first number of historical light source frequencies can be referred to as the second number.

[0068] In this embodiment of the disclosure, after selecting the second candidate frequency with the largest value from a plurality of second candidate frequencies as the historical light source frequency to obtain a first number of historical light source frequencies, a second number of first historical light source frequencies with the same frequency value among the first number of historical light source frequencies can be determined.

[0069] In this embodiment of the disclosure, when determining the second number of first historical light source frequencies with the same frequency value among the first number of historical light source frequencies, numerical comparison processing can be performed on the first number of historical light source frequencies to determine the frequencies with the same frequency value among the first number of historical light source frequencies, and the frequency is taken as the first historical light source frequency. The number of first historical light source frequencies among the first number of historical light source frequencies is counted as the second number.

[0070] S206: Based on the second quantity, determine the reliability information of the light source frequency.

[0071] In this embodiment of the disclosure, after determining a second number of historical light source frequencies with the same frequency value from the first number of historical light source frequencies, the reliability information of the current light source frequency can be determined based on the second number.

[0072] In this embodiment of the disclosure, when determining the reliability information of the current light source frequency based on the second quantity, a quantity threshold can be set. If the second quantity is greater than the quantity threshold, the original reliability of the current light source frequency can be increased. If the second quantity is less than the quantity threshold, the original reliability of the current light source frequency can be decreased. The adjusted reliability is used as the reliability information of the current light source frequency, so as to realize the determination of the reliability information of the current light source frequency based on the second quantity.

[0073] S207: Determine the flicker frequency based on the light source frequency, historical light source frequency, and reliability information.

[0074] For a detailed description of S207, please refer to the above embodiments, which will not be repeated here.

[0075] In this embodiment, by acquiring the current light source frequency of the ambient light, a first number of historical light source frequencies are obtained. These historical light source frequencies are extracted from the historical spectrum information of the ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined. This reliability information describes the reliability of the current light source frequency. The flicker frequency of the ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. This combined approach improves the stability and accuracy of flicker frequency identification. By acquiring the first number of historical spectrum information of the ambient light, the second candidate frequency with the largest value from multiple second candidate frequencies is selected as the historical light source frequency, thus obtaining the first number of historical light source frequencies. This allows for the collection of historical spectrum information of the ambient light, and the acquisition of historical light source frequencies from this historical spectrum information to assist in determining the flicker frequency. This avoids the flicker frequency jitter phenomenon caused by the anti-flicker sensor calculating the flicker frequency solely based on the spectrum information at the current moment, effectively improving the stability and accuracy of flicker frequency identification.

[0076] Figure 3 This is a schematic flowchart of a flicker frequency identification method proposed in an embodiment of this disclosure.

[0077] like Figure 3 As shown, the flicker frequency identification method includes:

[0078] S301: Obtain the frequency of the ambient light source.

[0079] S302: Obtain a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light.

[0080] S303: Determine a second number of historical light source frequencies with the same frequency value among the first number of historical light source frequencies.

[0081] For a detailed description of S301-S303, please refer to the above embodiments, which will not be repeated here.

[0082] S304: Determine the first comparison result between the second quantity and the quantity threshold, wherein the quantity threshold is less than or equal to the first quantity.

[0083] The quantity threshold is a pre-set quantity limit value used for comparison with the second quantity, and the quantity threshold is less than or equal to the first quantity.

[0084] The first comparison result refers to the comparison result obtained after comparing the second quantity with the quantity threshold. The first comparison result can indicate whether the second quantity is greater than, less than or equal to the quantity threshold.

[0085] In this embodiment of the disclosure, the second quantity can be compared with the quantity threshold to determine whether the second quantity is greater than, less than or equal to the quantity threshold, and the comparison result can be used as the first comparison result.

[0086] S305: Determine the second comparison result between the first historical light source frequency and the current light source frequency.

[0087] The second comparison result refers to the numerical comparison result obtained by comparing the frequency values ​​of the first historical light source frequency and the current light source frequency. The second comparison result can indicate that the frequency of the first historical light source is greater than, less than or equal to the frequency of the current light source.

[0088] In the implementation of this disclosure, when determining the second comparison result between the first historical light source frequency and the current light source frequency, the first historical light source frequency and the current light source frequency can be compared by frequency value comparison to determine that the first historical light source frequency is lower than, less than or equal to the current light source frequency, and the frequency data comparison result is used as the second comparison result.

[0089] S306: Based on the first comparison result and the second comparison result, determine the reliability information of the light source frequency.

[0090] In this embodiment of the present disclosure, after determining the first comparison result of the second quantity and the quantity threshold, and determining the second comparison result of the first historical light source frequency and the current light source frequency, the reliability information of the current light source frequency can be determined based on the first comparison result and the second comparison result.

[0091] In this embodiment of the disclosure, when determining the reliability information of the current light source frequency based on the first comparison result and the second comparison result, if the second comparison result indicates that the values ​​of the first historical light source frequency and the current light source frequency are the same, and the first comparison result indicates that the second quantity is greater than or equal to the quantity threshold, the original reliability of the current light source frequency can be increased, and the adjusted reliability can be used as the reliability information of the current light source frequency. If the first comparison result indicates that the second quantity is less than the quantity threshold, the original reliability of the current light source frequency can be used as the reliability information of the current light source frequency. If the second comparison result indicates that the frequency values ​​of the first historical light source frequency and the current light source frequency are not the same, and the first comparison result indicates that the second quantity is greater than or equal to the quantity threshold, the original reliability of the current light source frequency can be decreased, and the adjusted reliability can be used as the reliability information of the current light source frequency.

[0092] Optionally, in some embodiments, the reliability information of the current light source frequency is determined based on the first comparison result and the second comparison result. If the first comparison result is that the second quantity is less than the quantity threshold, the reliability information is determined to be a first reliability level. If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the first historical light source frequency and the current light source frequency are the same, the reliability information is determined to be a second reliability level, wherein the second reliability level is higher than the first reliability level. If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the first historical light source frequency and the current light source frequency are not the same, the reliability information is determined to be a third reliability level, wherein the third reliability level is lower than the first reliability level. Thus, the original reliability level of the current light source frequency can be determined based on the first comparison result and the second comparison result, and the flicker frequency can be determined based on the corresponding reliability level. This avoids the flicker frequency jitter phenomenon caused by calculating and outputting the flicker frequency frame by frame, thereby effectively improving the accuracy of flicker frequency identification. When the flicker frequency is used to adjust the exposure time to remove the ripple rolling phenomenon in the camera image, the ripple removal effect can be effectively improved.

[0093] The first confidence level refers to the confidence level obtained after lowering the original confidence level of the light source frequency.

[0094] The second confidence level refers to the confidence level obtained after increasing the original confidence level of the current light source frequency. The current light source frequency corresponding to the second confidence level can be used to adjust the exposure time. The second confidence level is higher than the first confidence level.

[0095] The third confidence level refers to the confidence level when the original confidence level of the current light source frequency is not adjusted. The third confidence level is lower than the first confidence level.

[0096] In this embodiment of the disclosure, when determining the reliability information of the current light source frequency based on the first comparison result and the second comparison result, the reliability information can be determined to be at the first reliability level when the first comparison result is that the second quantity is less than the quantity threshold; the reliability information can be determined to be at the second reliability level when the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the first historical light source frequency and the current light source frequency value are the same; wherein the second reliability level is higher than the first reliability level; and the reliability information can be determined to be at the third reliability level when the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the first historical light source frequency and the current light source frequency value are different; wherein the third reliability level is lower than the first reliability level.

[0097] S307: If the confidence level is the highest, then the flicker frequency is determined based on the current spectrum statistics.

[0098] In this embodiment of the disclosure, the light source spectrum information also includes: current spectrum statistics, which may include, for example, frequency amplitude information, spectrum peak data information, and average frequency data of the current light source spectrum.

[0099] In this embodiment of the disclosure, the credibility level of the current light source frequency can be determined as credibility information based on the first comparison result and the second comparison result. Then, the flicker frequency can be determined based on the current light source spectrum information and the credibility information.

[0100] In this embodiment of the disclosure, when determining the flicker frequency based on the current light source spectrum information and confidence information, the confidence level of the current light source frequency in the confidence information can be analyzed first. If the confidence information is at the first confidence level, it indicates that there is no stable flicker frequency in the ambient light source. Then, the flicker information can be determined based on the current spectrum statistics. The current spectrum statistics can be analyzed to determine whether there are obvious peaks in the current spectrum statistics, whether the frequency amplitude in the current spectrum statistics is large enough, and the frequency in the current spectrum statistics can be compared with the average frequency data of the spectrum. The flicker frequency is determined based on the peak information, amplitude information, and the comparison results of the frequency in the light source spectrum and the average frequency data of the spectrum.

[0101] Optionally, in some embodiments, the current spectrum statistics information includes: multiple frequency peak values. When determining the flicker frequency based on the current spectrum statistics information, the peak value variation among the multiple frequency peak values ​​can be determined, and the flicker frequency can be determined based on the peak value variation.

[0102] In this embodiment of the disclosure, when determining the flicker frequency based on the current spectrum statistics, multiple frequency peaks in the current spectrum information can be analyzed first, the peak value variation between multiple frequency peaks can be determined based on the multiple spectrum peaks, and the flicker frequency can be determined based on the peak value variation and the automatic exposure algorithm.

[0103] S308: If the credibility information is at the second level of credibility, then the frequency of this light source shall be used as the flicker frequency.

[0104] In this embodiment of the disclosure, when determining the flicker frequency based on the current light source spectrum information and the confidence information, the confidence level of the current light source frequency in the confidence information can be analyzed. If the confidence information is at the second confidence level, then the current light source frequency is used as the flicker frequency.

[0105] S309: If the credibility information is at the third credibility level, then the first historical light source frequency shall be used as the flicker frequency.

[0106] In this embodiment of the disclosure, when determining the flicker frequency based on the current spectrum information and the confidence information, the confidence level of the current light source frequency in the confidence information can be analyzed. If the confidence information is at the third confidence level, then the first historical light source frequency is used as the flicker frequency.

[0107] For example, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the exposure time calculation process in this embodiment. When the camera is started to capture the light source in the scene, the anti-flicker sensor is powered on and begins to collect the raw brightness data of the ambient light. The anti-flicker sensor continuously outputs the raw brightness data and transmits it to the camera's hardware abstraction layer through a noise correction algorithm. The hardware abstraction layer software receives the raw brightness data and caches it locally. When the data accumulates to a certain amount, it begins to perform a fast Fourier transform to calculate the current light source spectrum under the current light source environment. The current light source spectrum contains multiple first candidate frequencies. The first candidate frequency with the largest value is selected from the multiple first candidate frequencies as the current light source frequency f1. The current light source spectrum also contains light source spectrum statistics such as the maximum amplitude M1. Then, based on the statistical information of the current light source spectrum, the magnitude of the maximum frequency in the spectrum, the size of the raw brightness data, the ratio of the maximum frequency to the commonly used frequency 100Hz / 120Hz, and the ratio of the maximum frequency amplitude to the common frequency 120Hz, the current light source frequency f1 is calculated. Information such as the ratio of the average value of the DC component is used to determine the reliability of the current light source frequency. If the reliability is high, it can be used to adjust the exposure time. The spectrum of the current light source obtained from the Fast Fourier Transform (FFT) is compared with the historical light source spectra in the local historical data. If the maximum frequency value f1 appears at least N times in the most recent M frequency data, the current environmental frequency is considered stable, the reliability of this frequency is increased, and this frequency can be used to adjust the exposure time. B. If other frequencies fx have appeared with a high probability in the past M frequencies, and fx is not equal to f1, then f1 is considered not a stable frequency, the reliability of this frequency is reduced, and this light source frequency is not used to adjust the exposure time. If the number of times the same maximum frequency f1 appears in the most recent M frequency data is less than N, then there is no stable flicker frequency in the light source, and the reliability of this frequency does not need to be adjusted. Then, the spectrum information and reliability obtained from the current FFT are passed to the automatic exposure algorithm. Exposure Control (AEC) calculates the exposure time using an automatic exposure algorithm and saves the spectrum information obtained from the current Fast Fourier Transform operation in local historical data. After a frame interval, it repeats the flicker frequency identification and exposure time calculation. When the camera is turned off, the anti-flicker sensor is turned off.

[0108] In this embodiment, by acquiring the current light source frequency of the ambient light, a first number of historical light source frequencies are acquired. These historical light source frequencies are extracted from the historical spectrum information of the ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined. This reliability information describes the reliability of the current light source frequency. The flicker frequency of the ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. This combined approach improves the stability and accuracy of flicker frequency identification. When the first comparison result is a second number less than a threshold, the reliability information is determined to be at a first reliability level. If the first comparison result is greater than or equal to the quantity threshold, and the second comparison result is the same as the frequency of the first historical light source and the frequency of the current light source, the credibility information is determined to be at the second credibility level. If the first comparison result is greater than or equal to the quantity threshold, and the second comparison result is different from the frequency of the first historical light source and the frequency of the current light source, the credibility information is determined to be at the third credibility level. Thus, the credibility level of the current light source frequency can be determined based on the first comparison result and the second comparison result. The flicker frequency is determined based on the corresponding credibility level, thereby avoiding the flicker frequency jitter caused by calculating and outputting the flicker frequency frame by frame, thus effectively improving the accuracy of flicker frequency identification. When using this flicker frequency to adjust the exposure time to remove the ripple rolling phenomenon in the camera image, the ripple removal effect can be effectively improved.

[0109] Figure 5 This is a schematic flowchart of an imaging method proposed in an embodiment of the present disclosure.

[0110] like Figure 5 As shown, the imaging method includes:

[0111] S501: Obtain the flicker frequency of the ambient light identified by the flicker frequency identification method described above.

[0112] In this embodiment of the disclosure, after the flicker frequency of the ambient light identified by the flicker recognition method, the flicker frequency of the ambient light identified by the flicker frequency recognition method can be obtained, and the flicker frequency can be used to adjust the exposure time of the camera component.

[0113] S502: Determine the target exposure time of the camera component based on the flicker frequency.

[0114] Exposure time refers to the time the shutter needs to be open in order to project light onto the photosensitive surface of the photosensitive material of the camera component. Target exposure time refers to the exposure time obtained after adjusting the exposure time of the camera component according to the flicker frequency. When the camera component images based on the target exposure time, it can eliminate the stripe scrolling phenomenon in the image caused by the flicker frequency of ambient light.

[0115] In this embodiment of the present disclosure, when determining the target exposure time of the camera component based on the flicker frequency, the exposure parameters of the camera component can be obtained first. These exposure parameters can be the photosensitivity data of the photosensitive material of the camera component, etc. Then, the exposure parameters and flicker frequency of the camera component can be input into the automatic exposure algorithm library, and the exposure time of the camera component can be calculated using the automatic exposure algorithm. The calculated exposure time is then used as the target exposure time of the camera component.

[0116] S503: Controls the camera assembly to image based on the target exposure time.

[0117] In this embodiment of the present disclosure, after determining the target exposure time of the camera component based on the flicker frequency, the camera component can be controlled to image based on the target exposure time. The amount of light entering the camera component can be adjusted based on the target exposure time, and the camera component can be controlled to image based on the target exposure time to obtain the corresponding image or video.

[0118] In this embodiment, by acquiring the flicker frequency of the ambient light as identified by the flicker frequency recognition device described above, the target exposure time of the camera component is determined based on the flicker frequency, and the camera component is controlled to image based on the target exposure time. The exposure time of the camera component can be adjusted according to the flicker frequency to obtain the target exposure time. Imaging based on the target exposure time can effectively eliminate the stripe rolling phenomenon caused by the flicker frequency of the light source, and effectively improve the imaging effect of the camera component.

[0119] Figure 6 This is a schematic diagram of the structure of a flicker frequency identification device according to an embodiment of the present disclosure.

[0120] like Figure 6 As shown, the flicker frequency identification device includes:

[0121] The first acquisition module 601 is used to acquire the current light source frequency of the ambient light;

[0122] The second acquisition module 602 acquires a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light;

[0123] The first determining module 603 is used to determine the reliability information of the current light source frequency based on a first number of historical light source frequencies, wherein the reliability information is used to describe the reliability of the current light source frequency.

[0124] The second determining module 604 is used to determine the flicker frequency of the ambient light based on the current light source frequency, the historical light source frequency, and the confidence information.

[0125] In some embodiments of this disclosure, the first acquisition module 601 is specifically used for:

[0126] Acquire the light source spectrum information of the current frame of ambient light, wherein the light source spectrum information includes: multiple first candidate frequencies;

[0127] The first candidate frequency with the largest value is selected from multiple first candidate frequencies as the frequency of the light source for this application.

[0128] In some embodiments of this disclosure, the second acquisition module 602 is specifically used for:

[0129] Acquire a first quantity of historical spectrum information of ambient light, wherein the historical spectrum information includes: multiple second candidate frequencies;

[0130] The second candidate frequency with the largest value is selected from multiple second candidate frequencies as the historical light source frequency, thus obtaining the first number of historical light source frequencies.

[0131] In some embodiments of this disclosure, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of a flicker frequency identification device according to another embodiment of the present disclosure, wherein the first determining module 603 includes:

[0132] The first determining submodule 6031 is used to determine a second number of first historical light source frequencies with the same frequency value among a first number of historical light source frequencies;

[0133] The second determining submodule 6032 is used to determine the reliability information of the current light source frequency based on the second quantity.

[0134] In some embodiments of this disclosure, the second determining submodule 6032 is specifically used for:

[0135] Determine the first comparison result between the second quantity and the quantity threshold, wherein the quantity threshold is less than or equal to the first quantity;

[0136] Determine the second comparison result between the frequency of the first historical light source and the frequency of the current light source;

[0137] Based on the first and second comparison results, the reliability information of the light source frequency is determined.

[0138] In some embodiments of this disclosure, the second determining submodule 6032 is further configured to:

[0139] If the first comparison result is that the second quantity is less than the quantity threshold, then the credibility information is determined to be at the first credibility level.

[0140] If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the frequency of the first historical light source and the frequency of the current light source are the same, then the credibility information is determined to be the second credibility level, wherein the second credibility level is higher than the first credibility level.

[0141] If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the frequency of the first historical light source and the frequency of the current light source are different, then the credibility information is determined to be at the third credibility level, where the third credibility level is lower than the first credibility level.

[0142] In some embodiments of this disclosure, the light source spectrum information further includes: current spectrum statistics;

[0143] The second determining module 604 is specifically used for:

[0144] If the credibility information is at the highest level, then the flicker frequency is determined based on the current spectrum statistics.

[0145] If the credibility information is at the second level of credibility, then the frequency of this light source will be used as the flashing frequency.

[0146] If the credibility information is at the third level of credibility, then the frequency of the first historical light source will be used as the flicker frequency.

[0147] In some embodiments of this disclosure, the spectrum statistics include: multiple frequency peak values;

[0148] The second determining module 604 is further configured to:

[0149] Determine the peak value variation among multiple frequency wave peaks;

[0150] The flicker frequency is determined based on the peak value variation.

[0151] With the above Figures 1 to 4 Corresponding to the flicker frequency identification method provided in the embodiments, this disclosure also provides a flicker frequency identification device. Because the flicker frequency identification device provided in the embodiments of this disclosure is similar to the one described above... Figures 1 to 4 The flicker frequency identification method provided in the embodiments corresponds to the flicker frequency identification device provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.

[0152] In this embodiment, by acquiring the current light source frequency of the ambient light, a first number of historical light source frequencies are acquired. The historical light source frequencies are extracted from the historical spectrum information of the ambient light. Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined. The reliability information is used to describe the reliability of the current light source frequency. The flicker frequency of the ambient light is determined based on the current light source frequency, historical light source frequencies, and reliability information. The flicker frequency can be determined by combining the current light source frequency, historical light source frequencies, and reliability information, thereby improving the stability of flicker frequency identification and effectively improving the accuracy of flicker frequency identification.

[0153] Figure 8 This is a schematic diagram of the structure of an imaging device proposed in one embodiment of the present disclosure.

[0154] like Figure 8 As shown, the imaging device 80 includes:

[0155] The third acquisition module 801 is used to acquire the flicker frequency of the ambient light identified by the flicker frequency recognition method described above.

[0156] The third determining module 802 is used to determine the target exposure time of the camera component based on the flicker frequency;

[0157] The control module 803 is used to control the camera component to image based on the target exposure time.

[0158] With the above Figure 5 Corresponding to the imaging method provided in the embodiments, this disclosure also provides an imaging device. Since the imaging device provided in the embodiments of this disclosure is similar to the one described above... Figure 5 The imaging method provided in the embodiments corresponds to the imaging device provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.

[0159] In this embodiment, by acquiring the flicker frequency of the ambient light as identified by the flicker frequency recognition device described above, the target exposure time of the camera component is determined based on the flicker frequency, and the camera component is controlled to image based on the target exposure time. The exposure time of the camera component can be adjusted according to the flicker frequency to obtain the target exposure time. Imaging based on the target exposure time can effectively eliminate the stripe rolling phenomenon caused by the flicker frequency of the light source, and effectively improve the imaging effect of the camera component.

[0160] To implement the above embodiments, this disclosure also proposes a terminal, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the flicker frequency identification method proposed in the foregoing embodiments of this disclosure.

[0161] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the flicker frequency identification method proposed in the foregoing embodiments of this disclosure.

[0162] To implement the above embodiments, this disclosure also proposes a computer program product that, when the instruction processor in the computer program product is executed, performs the flicker frequency identification method as proposed in the foregoing embodiments of this disclosure.

[0163] Figure 9 A block diagram is shown that is suitable for implementing embodiments of the present disclosure. Figure 9The terminal 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments disclosed herein.

[0164] like Figure 9 As shown, terminal 12 is presented in the form of a general-purpose computing device. The components of terminal 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0165] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0166] Terminal 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by terminal 12, including volatile and non-volatile media, removable and non-removable media.

[0167] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Terminal 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 9 Not shown; usually referred to as a "hard drive".

[0168] although Figure 9Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0169] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0170] Terminal 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the terminal 12, and / or with any device that enables the terminal 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, terminal 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of terminal 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0171] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the flicker frequency identification method mentioned in the foregoing embodiments.

[0172] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0173] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0174] It should be noted that in the description of this disclosure, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0175] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0176] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0177] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0178] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0179] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0180] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0181] Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A flicker frequency identification method, characterized in that, include: Obtain the frequency of the ambient light source; Obtain a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light; Based on the first number of historical light source frequencies, the reliability information of the current light source frequency is determined, wherein the reliability information is used to describe the reliability of the current light source frequency; The flicker frequency of the ambient light is determined based on the current light source frequency, the historical light source frequency, and the confidence information. Wherein, determining the reliability information of the current light source frequency based on the first number of historical light source frequencies includes: Determine a second number of first historical light source frequencies with the same frequency value from the first number of historical light source frequencies; Determine a first comparison result between the second quantity and the quantity threshold, wherein the quantity threshold is less than or equal to the first quantity; Determine the second comparison result between the frequency of the first historical light source and the frequency of the current light source; Based on the first comparison result and the second comparison result, the reliability information of the current light source frequency is determined.

2. The method as described in claim 1, characterized in that, The acquisition of the current light source frequency of the ambient light includes: Acquire the light source spectrum information of the current frame of ambient light, wherein the light source spectrum information includes: multiple first candidate frequencies; The first candidate frequency with the largest value is selected from the plurality of first candidate frequencies as the current light source frequency.

3. The method as described in claim 2, characterized in that, The acquisition of the first number of historical light source frequencies includes: Acquire a first quantity of historical spectrum information of ambient light, wherein the historical spectrum information includes: a plurality of second candidate frequencies; The first number of historical light source frequencies is obtained by selecting the second candidate frequency with the largest value from the plurality of second candidate frequencies as the historical light source frequency.

4. The method as described in claim 2, characterized in that, The step of determining the reliability information of the current light source frequency based on the first comparison result and the second comparison result includes: If the first comparison result is that the second quantity is less than the quantity threshold, then the credibility information is determined to be at the first credibility level; If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the frequency of the first historical light source and the frequency of the current light source are the same, then the credibility information is determined to be a second credibility level, wherein the second credibility level is higher than the first credibility level; If the first comparison result is that the second quantity is greater than or equal to the quantity threshold, and the second comparison result is that the frequency of the first historical light source and the frequency of the current light source are different, then the credibility information is determined to be at the third credibility level, wherein the third credibility level is lower than the first credibility level.

5. The method as described in claim 4, characterized in that, The light source spectrum information also includes: current spectrum statistics; The step of determining the flicker frequency of the ambient light based on the current light source frequency, the historical light source frequency, and the confidence information includes: If the confidence level is the first confidence level, then the flicker frequency is determined based on the current spectrum statistics. If the confidence level is the second confidence level, then the frequency of the current light source is used as the flashing frequency; If the credibility information is the third credibility level, then the first historical light source frequency is used as the flashing frequency.

6. The method as described in claim 5, characterized in that, The spectrum statistics information mentioned above includes: multiple frequency peak values; The step of determining the flicker frequency based on the current spectral statistics includes: Determine the peak value variation among the plurality of frequency wave peaks; The flicker frequency is determined based on the peak value variation.

7. An imaging method, characterized in that, include: Obtain the flicker frequency of ambient light identified by the flicker frequency identification method as described in any one of claims 1-6 above; The target exposure time of the camera component is determined based on the flicker frequency; The camera assembly is controlled to image based on the target exposure time.

8. A flicker frequency identification device, characterized in that, include: The first acquisition module is used to acquire the frequency of the ambient light source in this application. The second acquisition module acquires a first number of historical light source frequencies, wherein the historical light source frequencies are extracted from the historical spectrum information of ambient light. The first determining module is used to determine the reliability information of the current light source frequency based on the first number of historical light source frequencies, wherein the reliability information is used to describe the reliability of the current light source frequency; The second determining module is used to determine the flicker frequency of the ambient light based on the current light source frequency, the historical light source frequency, and the confidence information. The first determining module is specifically used for: Determine a second number of first historical light source frequencies with the same frequency value from the first number of historical light source frequencies; Determine a first comparison result between the second quantity and the quantity threshold, wherein the quantity threshold is less than or equal to the first quantity; Determine the second comparison result between the frequency of the first historical light source and the frequency of the current light source; Based on the first comparison result and the second comparison result, the reliability information of the current light source frequency is determined.

9. An imaging device, characterized in that, include: The third acquisition module is used to acquire the flicker frequency of the ambient light identified by the flicker frequency recognition device as described in claim 8 above; The third determining module is used to determine the target exposure time of the camera component based on the flashing frequency; A control module is used to control the camera component to image based on the target exposure time.

10. A terminal, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the flicker frequency identification method of any one of claims 1-6, or to perform the imaging method of claim 7.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the flicker frequency identification method according to any one of claims 1-6, or to perform the imaging method according to claim 7.

Citation Information

Patent Citations

  • State sensing method and related apparatus

    WO2019100354A1