Optical signal processing method and processing device, electronic equipment and chip

By using a combination method of preset sampling frequency and coherent sampling frequency in optical signal processing, the second frequency point is determined to adjust the exposure time, which solves the problems of low frequency detection accuracy and spectrum leakage, and improves the shooting effect of the camera.

CN119946437APending Publication Date: 2025-05-06SUZHOU JUXIN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510102352.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-06

Smart Images

  • Figure CN119946437A_ABST
    Figure CN119946437A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an optical signal processing method and device, electronic equipment and a chip, and the method comprises the steps: carrying out the first sampling of an optical signal based on a preset sampling frequency, and determining a first frequency point; based on a coherent sampling law, determining a coherent sampling frequency according to the first frequency point; based on the coherent sampling frequency, performing second sampling on an optical signal, and determining at least one second frequency point; wherein the second frequency point is used for adjusting the exposure duration of the image acquisition device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of optical technology, and in particular, to a method, a processing device, an electronic device, and a chip for processing an optical signal. Background Art

[0002] Flickering light sources may have adverse effects on the shooting effects of cameras or cameras, etc. Generally, the frequency of flickering light sources is detected to guide the camera to set reasonable exposure parameters and improve the shooting effect.

[0003] However, the accuracy of current frequency detection is low, and there is even a problem of spectrum leakage, which seriously affects the shooting effect of the camera. How to improve the accuracy of frequency detection and improve the shooting effect is one of the important issues that need to be solved urgently. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method, a processing device, an electronic device, and a chip for processing an optical signal.

[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a method for processing an optical signal, including:

[0007] Based on a preset sampling frequency, performing a first sampling on the optical signal to determine a first frequency point;

[0008] Based on the coherent sampling law, determining the coherent sampling frequency according to the first frequency point;

[0009] Based on the coherent sampling frequency, a second sampling is performed on the light signal to determine at least one second frequency point; wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

[0010] In some embodiments, the method further comprises:

[0011] Determining whether the second frequency point meets a preset condition;

[0012] In response to the second frequency point satisfying the preset condition, the exposure duration of the image acquisition device is adjusted according to the second frequency point.

[0013] In some embodiments, the method further comprises:

[0014] In response to the second frequency point not satisfying the preset condition, updating the coherent sampling frequency according to the second frequency point;

[0015] Based on the updated coherent sampling frequency, the second sampling is performed again on the optical signal, and at least one second frequency point is re-determined until the re-determined second frequency point meets the preset condition.

[0016] In some embodiments, determining whether the second frequency point meets a preset condition includes:

[0017] Determining whether a first frequency difference between the at least one second frequency point and the preset frequency point is within a first preset range;

[0018] If the second frequency point including the first frequency difference is within the first preset range, it is determined that the preset condition is met.

[0019] In some embodiments, determining whether the second frequency point meets a preset condition includes:

[0020] If the second frequency difference between the at least one second frequency point and the at least one second frequency point obtained by the previous second sampling is within a second preset range, then the preset number value is increased by 1, otherwise the number value is cleared to zero;

[0021] If the number value is greater than or equal to a preset number threshold, it is determined that the second frequency point meets the preset condition.

[0022] In some embodiments, performing a first sampling on the optical signal to determine the first frequency point includes:

[0023] Performing a first sampling on the optical signal to obtain first sampling data;

[0024] Performing frequency domain conversion on the first sampling data to obtain a first spectrum;

[0025] In the first frequency spectrum, a frequency point that meets a preset strength condition is selected as the first frequency point.

[0026] In some embodiments, performing a second sampling on the optical signal to determine at least one second frequency point includes:

[0027] Performing a second sampling on the optical signal to obtain second sampling data;

[0028] Performing frequency domain conversion on the second sampling data to obtain a second spectrum;

[0029] In the second spectrum, selecting a plurality of candidate frequency points whose intensities are greater than a preset threshold;

[0030] Determine the candidate frequency points having a multiple relationship between the candidate frequency points;

[0031] The minimum frequency point in each group of candidate frequency points having a multiple relationship is selected as the second frequency point, and the candidate frequency point that does not have a multiple relationship with any other candidate frequency point is selected as the second frequency point.

[0032] In some embodiments, adjusting the exposure time of the image acquisition device according to the second frequency point includes:

[0033] According to the period lengths corresponding to the multiple second frequency points, determine the least common multiple of the period lengths as the minimum exposure duration;

[0034] An integral multiple of the minimum exposure time is determined as the exposure time.

[0035] In some embodiments, adjusting the exposure time of the image acquisition device according to the second frequency point includes:

[0036] Determining a weight coefficient corresponding to each cycle length according to the strength of each of the second frequency points;

[0037] Determine a minimum exposure duration according to the durations of each cycle and the weight coefficients corresponding to the durations of each cycle;

[0038] An integral multiple of the minimum exposure time is determined as the exposure time.

[0039] The present application also provides an optical signal processing device, including:

[0040] A first frequency point determining unit, configured to perform a first sampling on the optical signal based on a preset sampling frequency to determine a first frequency point;

[0041] A coherent sampling frequency determining unit, configured to determine the coherent sampling frequency according to the first frequency point based on a coherent sampling law;

[0042] The second frequency point determination unit is used to perform a second sampling on the light signal based on the coherent sampling frequency to determine at least one second frequency point; wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

[0043] In some embodiments, the processing device further comprises:

[0044] A duration determination unit is used to adjust the exposure duration of the image acquisition device according to the second frequency point.

[0045] In some embodiments, the coherent sampling frequency determination unit is further used to update the coherent sampling frequency according to the second frequency point in response to the second frequency point not satisfying the preset condition; the second frequency point determination unit is further used to re-sample the optical signal based on the updated coherent sampling frequency and re-determine at least one second frequency point.

[0046] In some embodiments, the second frequency point determination unit is specifically used to determine whether the first frequency difference between the at least one second frequency point and the preset frequency point is within a first preset range; if the second frequency point including the first frequency difference is within the first preset range, it is determined that the preset condition is met.

[0047] In some embodiments, the second frequency point determination unit is specifically used to add 1 to a preset number value if the second frequency difference between the at least one second frequency point and the at least one second frequency point obtained by the previous second sampling is within a second preset range, otherwise the number value is cleared to zero; if the number value is greater than or equal to a preset number threshold, it is determined that the second frequency point meets the preset condition.

[0048] In some embodiments, the first frequency point determination unit is specifically used to perform a first sampling on the optical signal to obtain first sampling data; perform frequency domain conversion on the first sampling data to obtain a first spectrum; and in the first spectrum, select a frequency point that meets a preset intensity condition as the first frequency point.

[0049] In some embodiments, the second frequency point determination unit is also used to perform a second sampling on the optical signal to obtain second sampling data; perform frequency domain conversion on the second sampling data to obtain a second spectrum; in the second spectrum, select multiple alternative frequency points whose intensities are greater than a preset threshold; determine alternative frequency points that have a multiple relationship between the alternative frequency points; select the minimum frequency point in each group of alternative frequency points that have a multiple relationship as the second frequency point, and select the alternative frequency point that does not have a multiple relationship with any other alternative frequency point as the second frequency point.

[0050] In some embodiments, the duration determination unit is specifically used to determine the least common multiple of each cycle duration as the minimum exposure duration based on the cycle durations corresponding to the multiple second frequency points; and determine an integer multiple of the minimum exposure duration as the exposure duration.

[0051] In some embodiments, the duration determination unit is specifically used to determine the weight coefficient corresponding to each cycle duration according to the strength of each second frequency point; determine the minimum exposure duration according to each cycle duration and the weight coefficient corresponding to each cycle duration; and determine the integer multiple of the minimum exposure duration as the exposure duration.

[0052] The embodiment of the present application also provides an electronic device, including a processor and an image acquisition device;

[0053] The processor is used to execute the above processing method.

[0054] And adjust the exposure time of the image acquisition device according to the second frequency point.

[0055] An embodiment of the present application also provides a chip, including a device for executing the above-mentioned processing method, or including the above-mentioned processing device.

[0056] The optical signal processing method provided in the embodiment of the present application can determine a first frequency point used to characterize the approximate frequency of ambient light by sampling the optical signal at a preset sampling frequency. After calculating a coherent sampling frequency that matches the ambient light frequency through the first frequency point, sampling is performed using this coherent sampling frequency that matches the ambient light, thereby determining at least one second frequency point that can accurately describe the ambient light frequency information. An accurate second frequency point is conducive to determining more appropriate exposure parameters and improving the shooting effect of the camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 1 ;

[0058] Figure 2 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 2 ;

[0059] Figure 3 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 3 ;

[0060] Figure 4 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 4 ;

[0061] Figure 5 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 5 ;

[0062] Fig. 6A FIG6 is a step diagram of a method for processing an optical signal provided in an embodiment of the present application;

[0063] Figure 6B Schematic diagram of the process of the optical signal processing method provided in the embodiment of the present application Figure 1 ;

[0064] Figure 7 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 7 ;

[0065] Fig. 8A FIG8 is a step diagram of a method for processing an optical signal provided in an embodiment of the present application;

[0066] Figure 8B Schematic diagram of the process of the optical signal processing method provided in the embodiment of the present application Figure 2 ;

[0067] Figure 8C Schematic diagram of the process of the optical signal processing method provided in the embodiment of the present application Figure 3 ;

[0068] Fig. 9 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 9 ;

[0069] Fig.10 The steps of the optical signal processing method provided in the embodiment of the present application are as follows: Figure 10 ;

[0070] Fig.11 Schematic diagram of the process of the optical signal processing method provided in the embodiment of the present application Figure 4 ;

[0071] Fig.12 A schematic diagram of the structure of a processing device provided in an embodiment of the present application;

[0072] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0073] Figure 14 to Figure 15 Schematic diagram of the structure of the chip provided in the embodiment of the present application Figure 1 to Figure 2 ;

[0074] Fig.16 A flowchart of the processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] The following will be combined with the embodiments of the present application and the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0076] In the following description, a large number of specific details are given to provide a more thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described; that is, all features of the actual embodiments are not described here, and well-known functions and structures are not described in detail.

[0077] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present application. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0078] In order to thoroughly understand the present application, detailed steps and detailed structures will be presented in the following description to illustrate the technical solution of the present application. The preferred embodiments of the present application are described in detail below, but in addition to these detailed descriptions, the present application may also have other implementation methods.

[0079] Flickering light sources (e.g., AC light sources or monitor screens) may adversely affect the shooting effects of cameras or still cameras. For example, the camera may capture the changes in the brightness of AC fluorescent lamps, resulting in flickering stripes in the captured image, or inconsistent exposure or color effects in continuous shooting mode.

[0080] In order to prevent the camera's shooting effect from being affected by flickering light sources, the camera's exposure parameters need to be adapted accordingly. By sampling and analyzing the frequency of these flickering light sources, appropriate exposure parameters can be determined based on the frequency of the flickering light sources to improve the quality and stability of the shooting effect. Specifically, the light signal is sampled and processed, and the continuous light signal is discretized in time to obtain a series of discrete sample values. The sample values ​​are analyzed to extract the frequency information of the flickering light source.

[0081] However, in the scheme of determining the frequency information of the flickering light source by sampling at a fixed sampling frequency, there is a possibility that the sampling frequency and the changing frequency of the flickering light source do not satisfy the coherent sampling theorem, resulting in spectrum leakage problems, which in turn affects the setting of the camera exposure parameters and the shooting effect.

[0082] In view of this, an embodiment of the present application provides a method for processing an optical signal, such as Figure 1 As shown, the processing method includes the following steps S101 to S103:

[0083] Step S101: Based on a preset sampling frequency, perform a first sampling on an optical signal to determine a first frequency point.

[0084] Step S102: Based on the coherent sampling law, determine the coherent sampling frequency according to the first frequency point.

[0085] Step S103: Based on the coherent sampling frequency, perform a second sampling on the light signal to determine at least one second frequency point, wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

[0086] The sampling frequency refers to the number of times the light signal is sampled per unit time, and Hertz (Hz) is generally used as the unit of sampling frequency. The preset sampling frequency may be a default value or initial value set inside the sampling device. If the preset sampling frequency is too low, the obtained sample value may not be able to restore the original light signal, causing signal distortion; and if the preset sampling frequency is too high, it will increase the burden of data processing and reduce processing efficiency. In some embodiments, the value of the preset sampling frequency can be appropriately increased to ensure that the preset sampling frequency can adapt to different light source environments.

[0087] The frequency of light refers to the frequency of the periodic change of the brightness fluctuation of the light source, and can also be expressed in Hz. The frequency of the flickering light source is related to the frequency of its power supply. The ambient light may be provided by a flickering light source of a single frequency, or by a flickering light source of multiple frequencies. It should be emphasized that the frequency of the light waves of sunlight composed of multiple wavelengths of light is related to the wavelength. However, the brightness of sunlight is stable and unchanged, which is equivalent to having no frequency, and the exposure time may not be limited by the frequency of the light wave. The flickering light source, such as an indoor light emitting diode (LED) lamp, also covers multiple wavelengths. However, since the LED lamp is not powered by a constant current, its brightness changes in a stable cycle, and the frequency corresponding to this cycle is the frequency of the light in the embodiment of the present application.

[0088] By sampling the optical signal at a single fixed preset sampling frequency, the time domain or frequency domain information of the optical signal can be obtained, and then the frequency information of the optical signal can be obtained. The preset sampling frequency has nothing to do with the actual ambient light, so the preset sampling frequency and the ambient light frequency may not satisfy the coherent sampling theorem. Therefore, the frequency information obtained after sampling at the preset sampling frequency can only be used to characterize the approximate frequency of the ambient light, and may not reflect the actual frequency of the ambient light. Among them, satisfying the coherent sampling theorem means that the ratio between the sampling frequency and the number of sampling points is equal to the ratio between the frequency of the sampled signal and the number of cycles sampled by the sampled signal, that is, it meets the following formula (1),

[0089]

[0090] Among them, F s is the sampling frequency, N is the number of sampling points, F t is the frequency of the sampled signal, and M is the number of cycles sampled by the sampled signal.

[0091] Furthermore, in the above formula (1), M must be an odd number or a prime number, and M and N must be prime numbers to each other.

[0092] By sampling the optical signal at a relevant sampling frequency, more accurate and complete frequency information of the optical signal can be obtained.

[0093] Therefore, in the embodiment of the present application, the first sampling is used to determine the first frequency point, which can only roughly reflect the frequency information of the optical signal and can be used to determine the coherent sampling frequency. Specifically, the first frequency point can be used as the sampled signal frequency Ft, and the coherent sampling frequency Fs can be calculated using the above formula (1).

[0094] Since the coherent sampling frequency and the frequency of the ambient light conform to the coherent sampling theorem, by sampling with the coherent sampling frequency adapted to the ambient light, at least one second frequency point that more accurately describes the frequency information of the ambient light can be determined.

[0095] The optical signal processing method provided in the embodiment of the present application can determine a first frequency point used to characterize the approximate frequency of ambient light by sampling the optical signal at a single fixed preset sampling frequency. Then, a coherent sampling frequency matching the ambient light frequency is calculated through the first frequency point, and sampling is performed using this coherent sampling frequency adapted to the ambient light, thereby determining at least one second frequency point that can accurately describe the ambient light frequency information. An accurate second frequency point is conducive to determining more appropriate exposure parameters and improving the shooting effect of the camera.

[0096] In some embodiments, Figure 2 As shown, in the above step S101, performing a first sampling on the optical signal to determine the first frequency point includes the following steps:

[0097] Step S201: perform a first sampling on an optical signal to obtain first sampling data.

[0098] Step S202: performing frequency domain conversion on the first sampling data to obtain a first spectrum.

[0099] Step S203: In the first frequency spectrum, a frequency point that meets a preset strength condition is selected as a first frequency point.

[0100] Based on the preset sampling frequency, the optical signal is first sampled to obtain time series data including multiple sampling points, i.e., first sampled data. The first sampled data is frequency-domain converted to obtain a first spectrum corresponding to the first sampled data. The frequency-domain conversion refers to converting a time-domain signal into a frequency-domain signal. Specifically, it can be implemented by Fourier Transform (FT) algorithm, Fast Fourier Transform (FFT) algorithm, etc.

[0101] Each frequency point (frequency component) in the calculated first spectrum is analyzed, and a frequency point that meets the preset intensity condition is selected as the first frequency point. The intensity of the frequency point refers to the intensity of the optical signal at the frequency point, that is, the amplitude corresponding to the frequency point. It can be understood that the above-mentioned first frequency point can only be used to calculate the coherent sampling frequency. Therefore, in the first spectrum obtained by the first sampling, only one frequency point that meets the preset conditions can be selected as the first frequency point.

[0102] In a specific embodiment, after frequency domain conversion using the FFT algorithm, the intensity f(x) corresponding to each frequency point can be calculated using the following formula (2).

[0103]

[0104] Here, x is the index in the FFT algorithm result.

[0105] Since the result of the FFT algorithm is symmetrical, in some embodiments, only the corresponding frequency points in the frequency range of 0 to N / 2 may be considered as the first frequency points, thereby reducing the amount of data processing and improving signal processing efficiency.

[0106] The frequency point corresponding to the higher intensity is the main frequency component of the optical signal. In some embodiments, the frequency point corresponding to the highest intensity can be directly selected as the first frequency point. In other embodiments, one of the multiple frequency points with higher intensity can be selected as the first frequency point. Specifically, Figure 3 The above step S203, selecting a frequency point that meets a preset intensity condition as a first frequency point in the first spectrum, includes the following steps:

[0107] Step S301: In a first frequency spectrum, a plurality of relatively large frequency points are selected as candidate frequency points for a first frequency point.

[0108] Step S302: determining candidate frequency points having a multiple relationship between candidate frequency points of the first frequency point.

[0109] Step S303: removing non-minimum frequency points from each group of candidate frequency points having a multiple relationship, and selecting the candidate frequency point with the greatest intensity as the first frequency point from the remaining candidate frequency points.

[0110] The frequency points in the first spectrum are sorted by intensity value, and multiple frequency points with larger intensity are selected as candidate frequency points for the first frequency point. According to whether there is an integer multiple relationship between the frequency point and other frequency points, these candidate frequency points are divided into multiple frequency points and non-multiple frequency points, and the frequency point with the highest intensity among the non-multiple frequency points is determined as the first frequency point.

[0111] Exemplarily, the alternative frequency points determined in the first spectrum may include 50 Hz, 60 Hz, 150 Hz, etc. Among them, there is an integer multiple relationship between 50 Hz and 150 Hz. 150 Hz may be a frequency doubling point caused by aliasing effect or electromagnetic interference, and is not the main frequency component of the optical signal. Using 150 Hz to determine the coherent sampling frequency will affect the accuracy of optical signal sampling. By removing these frequency doubling points and selecting a suitable first frequency point from the remaining other alternative frequency points, it is helpful to improve the accuracy of determining the coherent sampling frequency and the ambient light frequency.

[0112] In some embodiments, Figure 4 As shown, in the above step S103, performing a second sampling on the optical signal to determine at least one second frequency point includes the following steps:

[0113] Step S401: performing a second sampling on the optical signal to obtain second sampling data.

[0114] Step S402: performing frequency domain conversion on the second sampling data to obtain a second spectrum.

[0115] Step S403: In the second spectrum, multiple candidate frequency points whose intensities are greater than a preset threshold are selected.

[0116] Step S404: determining candidate frequency points having a multiple relationship between the candidate frequency points.

[0117] Step S405: selecting the minimum frequency point in each group of candidate frequency points having a multiple relationship as the second frequency point, and selecting a candidate frequency point that does not have a multiple relationship with any other candidate frequency point as the second frequency point.

[0118] Based on the coherent sampling frequency, the optical signal is sampled for the second time to obtain time series data including multiple sampling points, i.e., the second sampled data. The second sampled data is frequency-domain converted to obtain a second spectrum corresponding to the second sampled data. Specifically, it can also be implemented by FT algorithm, FFT algorithm, etc. It should be noted that the embodiment of the present application does not limit the specific method of frequency-domain conversion of the first sampled data and / or the second sampled data, and the above two can use the same algorithm or different algorithms.

[0119] Exemplarily, after frequency domain conversion using the FFT algorithm, the intensity corresponding to each frequency point is calculated using the above formula (2). Multiple candidate frequency points whose intensity is greater than a preset threshold are selected. The preset threshold can be determined based on the intensity range of the second spectrum. In other words, the preset threshold can be a fixed value set in advance, or it can be a dynamic value obtained by calculation based on the intensity range of the second spectrum. It can be understood that since the results of the FFT algorithm are symmetrical, only the corresponding frequency points in the frequency range of 0 to N / 2 can be considered as alternative frequency points for the second frequency point, thereby reducing the amount of data processing and improving the signal processing efficiency.

[0120] The frequency doubling points generated by the aliasing effect or electromagnetic interference will affect the accuracy of the optical signal sampling and interfere with the determination of the frequency of the optical signal. In this embodiment, multiple candidate frequency points are first selected based on the intensity, and then among these candidate frequency points, it is determined whether each candidate frequency point has a multiple relationship with other candidate frequency points. By removing the frequency doubling points and using the remaining other candidate frequency points as the second frequency point, it is beneficial to improve the accuracy of determining the ambient light frequency.

[0121] In some other embodiments, all the octave points in the second spectrum may be filtered out first, and then, among the remaining frequency points, based on the intensity of the frequency points, frequency points with intensities greater than a preset threshold or a preset number of frequency points with larger intensities may be selected as the second frequency points.

[0122] In some embodiments, Figure 5 As shown, the above optical signal processing method further includes the following steps:

[0123] Step S501: determine whether the second frequency point meets a preset condition.

[0124] Step S502: In response to the second frequency point satisfying a preset condition, adjusting the exposure duration of the image acquisition device according to the second frequency point.

[0125] Here, the preset condition refers to the condition that the second frequency point reaches a suitable range for setting the exposure time, reduces the stroboscopic phenomenon, is as close as possible to the frequency of the real light source, and the error is within an acceptable range.

[0126] By judging whether the second frequency point meets the preset condition, it can be determined whether the second frequency point can well represent the frequency information of the ambient light.

[0127] If the second frequency point meets the preset conditions, the exposure time of the image acquisition device can be adjusted by using the second frequency point, so that the exposure time can meet the requirement that it is an integer multiple of the ambient light cycle. Even if the exposure time of each pixel point in different rows is different, the light energy received by each pixel point is consistent, which can reduce the possibility of stroboscopic phenomenon and is conducive to improving shooting quality.

[0128] In some embodiments, Fig. 6AAs shown, the above optical signal processing method further includes the following steps:

[0129] Step S601: in response to a second frequency point not satisfying a preset condition, updating a coherent sampling frequency according to the second frequency point.

[0130] Step S602: based on the updated coherent sampling frequency, re-sampling the optical signal for the second time, and re-determining at least one second frequency point, until the re-determined second frequency point meets a preset condition.

[0131] If the second frequency point meets the non-preset condition, it is considered that the second frequency point may not be the main frequency of the ambient light. At this time, it is necessary to re-determine the coherent sampling frequency according to the second frequency point, and then re-determine the second frequency point to improve the accuracy of the second frequency point.

[0132] Figure 6B The flowchart of the processing method provided in the embodiment of the present application is shown. Figure 6B As shown, after executing the above step S103, execute step S501 to determine whether the second frequency point meets the preset condition. If the second frequency point meets the preset condition, execute the above step S502; if the second frequency point does not meet the preset condition, execute step S601 to re-determine the coherent sampling frequency so that the new coherent sampling frequency and the second frequency point meet the coherent sampling theorem. And after executing step S601, execute the above step S602, that is, return to step S103, and re-sample the optical signal for the second time until the obtained second frequency point meets the preset condition.

[0133] In some embodiments, Figure 7 As shown, the above step S501, determining whether the second frequency point meets the preset condition, specifically includes the following steps:

[0134] Step S701: Determine whether a first frequency difference between at least one second frequency point and a preset frequency point is within a first preset range.

[0135] Step S702: If the second frequency point including the first frequency difference is within the first preset range, it is determined that the preset condition is met.

[0136] Common flickering light sources include AC light sources, display devices, etc., and their frequencies are usually fixed values. For example, the frequency of an AC light source is related to the local power supply standard. The standard frequency of AC in some countries or regions is 50Hz, while the standard frequency in other countries or regions is 60Hz. Common frequencies of mobile phones or computer monitors are 60Hz, 90Hz, and 120Hz, etc. If the second frequency point is close to or equal to these common flickering light source frequencies (preset frequency points), it is considered that this second frequency point meets the preset conditions. At this time, the exposure time of the image acquisition device can be adjusted according to this second frequency point. If one of the multiple second frequency points is close to or equal to one of these common flickering light source frequencies, it is considered that these second frequency points meet the preset conditions. At this time, the exposure time of the image acquisition device can be adjusted according to this second frequency point.

[0137] Specifically, if the first frequency difference between one of the second frequency points and the preset frequency point is within the first preset range, the second frequency point is considered to meet the preset condition; otherwise, the second frequency point is considered to not meet the preset condition. If none of the first frequency differences are within the first preset range, the second frequency point corresponding to the maximum intensity can be selected to update the coherent sampling frequency, the optical signal can be re-sampled for the second time, and at least one second frequency point can be re-determined until the first frequency difference between the re-determined second frequency point and the preset frequency point is within the first preset range. In some embodiments, the maximum number of loops can be limited to avoid the phenomenon of infinite loops. Specifically, a counter can be used to record the number of executions of the second sampling or the number of determinations of the second frequency point, and when the number of executions or the number of determinations is greater than a certain preset value, the loop is directly terminated and a prompt message is output.

[0138] In some embodiments, all the multiple frequency points in the second spectrum can be filtered out first, and among the remaining frequency points, the frequency points with intensity greater than a preset threshold or a preset number of large intensity are selected as the second frequency points. Then, it is judged in turn whether each second frequency point is close to or equal to the preset frequency point. Since the multiple frequency points in the second spectrum have been filtered out, the number of judgments for judging whether the second frequency point meets the preset conditions can be reduced, thereby improving the operation efficiency.

[0139] However, in the case where the frequency of the ambient light is more complex, it may include multiple frequencies with multiple relationships. For example, when the frequency of the ambient light includes 30 Hz, 60 Hz, 120 Hz and 240 Hz, the exposure time can be accurately adjusted according to 30 Hz. However, when determining the second frequency point, there is a situation where 60 Hz, 120 Hz and 240 Hz are directly filtered out as multiple frequency points, that is, the second frequency point is determined to be 30 Hz. In the case where the preset frequency point is 60 Hz, since the frequency point 60 Hz has been mistakenly filtered out as a multiple frequency point, in the subsequent process of determining whether the second frequency point meets the preset condition, it will be because the first frequency difference between the second frequency point (30 Hz) and the preset frequency point (60 Hz) does not meet the condition within the first preset range, that is, the second frequency point (30 Hz) does not meet the preset condition, and it is considered that the exposure time of the image acquisition device cannot be adjusted according to the second frequency point (30 Hz). In some embodiments, it is necessary to determine the coherent sampling frequency again at this time to re-determine the second frequency point. This will increase the number of steps required to determine the second frequency point, and it may even happen that the second frequency point cannot meet the preset conditions, resulting in the loop failing to end normally. In some embodiments, it is possible to directly determine whether each second frequency point in the second spectrum is close to or equal to the preset frequency point. When one of the second frequency points is close to or equal to the preset frequency point, it is considered that the exposure duration of the image acquisition device can be adjusted according to these second frequency points. Since the double frequency points in the second spectrum are not filtered out, the number of judgments for determining whether the second frequency point meets the preset conditions is increased, but the situation where the frequency point is incorrectly filtered out can be effectively avoided.

[0140] In some embodiments, Fig. 8A As shown, the above step S501, determining whether the second frequency point meets the preset condition, specifically includes the following steps:

[0141] Step S801: if the second frequency difference between at least one second frequency point and at least one second frequency point obtained by the previous second sampling is within a second preset range, then the preset number value is increased by 1, otherwise the number value is cleared.

[0142] Step S802: If the number value is greater than or equal to a preset number threshold, it is determined that the second frequency point meets the preset condition.

[0143] The frequency of the ambient light may be different from the frequency of a common flickering light source. In this case, it is possible to determine whether the second frequency point calculated multiple times is stable to determine whether the second frequency point is the main frequency of the ambient light. If the difference between the second frequency points determined multiple times is small and the frequency of the ambient light does not change significantly, it can be considered that the second frequency point meets the preset conditions.

[0144] Figure 8B The flowchart of the processing method provided in the embodiment of the present application is shown. Figure 8BAs shown, after executing the above step S103, step S803 can be executed, based on the second frequency point, the coherent sampling frequency can be updated again according to the second frequency point. Step S804 is executed, based on the updated coherent sampling frequency, the optical signal is re-sampled for the second time, and at least one second frequency point corresponding to the updated coherent sampling frequency is determined. Through step S801, it is determined whether the second frequency difference between the second frequency points obtained twice before and after is within the second preset range; if the second frequency difference is within the second preset range, the counter count value is increased by 1; if the second frequency difference is not within the preset range, the counter count value is cleared. By determining whether the count value of the counter is greater than or equal to the preset count threshold, it can be confirmed whether the frequency of the ambient light has changed. If the count value is greater than or equal to the preset count threshold, it can be considered that the second frequency point is stable and the frequency of the ambient light has not changed. Step S502 can be executed to use this stable second frequency point to adjust the exposure time of the image acquisition device. Among them, the second preset range can be set according to the required accuracy. In this embodiment, the second preset range can be set to plus or minus 4 Hz, that is, when the absolute value of the second frequency difference is less than or equal to 4 Hz, the second frequency point is considered to be within the second preset range. If the second frequency difference is not within the second preset range, step S805 is executed, and the coherent sampling frequency is re-determined according to the second frequency point determined in step S804, and then the process returns to step S103 until the second frequency difference is within the second preset range.

[0145] Of course, the embodiments of the present application do not limit the specific number of times the second sampling is performed. In some embodiments, the number of executions of the second sampling may be greater than or equal to 2 times. The number of stable times of the second frequency point can be recorded by a counter. Specifically, when the second frequency difference values ​​are all within the second preset range, the number of stable times of the second frequency point is increased by 1. When the number of stable times is greater than the preset number threshold, the second frequency point can be considered to be stable, that is, the second frequency point meets the preset conditions, and this stable second frequency point can be used to adjust the exposure duration of the image acquisition device. In some embodiments, in order to avoid the phenomenon of infinite loops, another counter can be further used to record the number of executions of the second sampling or the number of determinations of the second frequency point, and when the number of executions or the number of determinations is greater than a preset value, the loop is directly terminated and a reminder message is output.

[0146] It is understandable that multiple groups of second frequency points can also be determined by continuously sampling multiple times at the same coherent sampling frequency. Figure 8BWhen executing step S103, multiple groups of second frequency points are determined by continuous multiple sampling at the same coherent sampling frequency. And by judging whether the second frequency difference between the second frequency points in adjacent groups is within the second preset range, it is determined whether the second frequency point is stable. In this embodiment, after executing step S103 and determining multiple groups of second frequency points, steps S803 and S804 can be skipped and step S801 can be directly executed. If the number of stable times of the second frequency difference meets the preset number requirement, it can also be considered that the second frequency point meets the preset requirement.

[0147] It should be noted that whether the second frequency point meets the preset condition can also be determined by comprehensively considering whether the second frequency point is equal to the preset frequency point and whether the second frequency point is stable. Figure 8C As shown, after executing step S103 and determining at least one second frequency point, directly execute step S701 to determine whether the first frequency difference is within the first preset range. If not, execute steps S806 and S804 to re-determine the coherent sampling frequency and determine the second frequency point corresponding to the updated coherent sampling frequency. By determining whether the second frequency difference between the second frequency point determined in step S103 and the second frequency point determined in step S804 is within the second preset range, it can be determined whether the second frequency point is stable. Specifically, according to steps S801 and S802, when the number of times is greater than or equal to the preset number of times threshold, it is determined that the second frequency point meets the preset condition. Exemplarily, when the first frequency difference is not within the first preset range, but the second frequency difference is within the second preset range, it can be considered that the second frequency point meets the preset condition, and the exposure time of the image acquisition device can be adjusted according to the second frequency point. If the number value is less than the preset number threshold, step S805 is executed to re-determine the coherent sampling frequency based on the coherent sampling law and the second frequency point determined in the above step S804, and then the process returns to step S103.

[0148] In some embodiments, Fig. 9 As shown, the above step S502, adjusting the exposure time of the image acquisition device according to the second frequency point, includes the following steps:

[0149] Step S901: According to the period durations corresponding to the plurality of second frequency points, the least common multiple of the period durations is determined as the minimum exposure duration.

[0150] Step S902: Determine an integral multiple of the minimum exposure time as the exposure time.

[0151] The reciprocal of the second frequency point is the cycle duration corresponding to the frequency point. When multiple second frequency points are included, the cycle duration corresponding to each second frequency point is determined according to the reciprocal of each second frequency point. By determining the lowest common multiple of each cycle duration as the minimum exposure duration, it can be ensured that the minimum exposure duration of the image acquisition device or the exposure duration is always an integer multiple of the ambient light cycle. Even if the exposure times of pixels in different rows are different, the light energy received by each pixel during the exposure period is always the same, which can reduce the risk of stroboscopic streaks.

[0152] It should be noted that the ratio of the exposure time to the minimum exposure time is a positive integer greater than or equal to 1. That is, the exposure time of the image acquisition device can be directly determined according to the least common multiple of the period time of each second frequency point.

[0153] It is understandable that, when there is only one second frequency point, the period duration of the second frequency point can also be directly determined as the minimum exposure duration or exposure duration of the image acquisition device.

[0154] In some embodiments, Fig.10 As shown, the above step S502, adjusting the exposure time of the image acquisition device according to the second frequency point, includes the following steps:

[0155] Step S1001: Determine the weight coefficient corresponding to each cycle duration according to the strength of each second frequency point.

[0156] Step S1002: Determine the minimum exposure duration according to the duration of each cycle and the weight coefficient corresponding to each cycle duration.

[0157] Step S1003: Determine the integral multiple of the minimum exposure time as the exposure time.

[0158] Among the multiple second frequency points that meet the preset conditions, there may be a situation where the intensity corresponding to some of the second frequency points is very large, while the intensity corresponding to other second frequency points is very small. If the lowest common multiple of the period lengths of all second frequency points is simply determined as the minimum exposure time, the minimum exposure time may be too long. The image acquisition device is prone to overexposure, resulting in the loss of some details and color distortion in the obtained photos.

[0159] At least one second frequency point with a larger intensity may be screened out according to the intensity of each second frequency point, and then the lowest common multiple of the period durations of the second frequency points with a larger intensity may be determined as the minimum exposure duration or the minimum duration.

[0160] like Fig.11 As shown, the present application also provides the following embodiments:

[0161] First, based on a preset sampling frequency, a first sampling is performed on the optical signal to obtain first sampling data. Then, step S202 is executed to perform frequency domain conversion on the first sampling data to obtain a first spectrum. In the first spectrum, a suitable first frequency point is selected. Specifically, steps S301, S302, and S303 can be executed in sequence: in the first spectrum, multiple frequency points with larger intensities are selected as candidate frequency points for the first frequency point. Among these candidate frequency points for the first frequency point, the candidate frequency points with a multiple relationship are determined, the non-minimum frequency points in each group of multiple frequency points with a multiple relationship are removed, and the candidate frequency point with the largest intensity is selected as the first frequency point among the remaining candidate frequency points.

[0162] After determining the first frequency point, execute step S102 to determine the coherent sampling frequency so that it satisfies the coherent sampling law with the first frequency point determined in step S303. After determining the coherent sampling frequency, execute steps S401, S402, S403, S404 and S405 in sequence. Specifically, the optical signal is sampled for the second time using the coherent sampling frequency determined in step S102 to obtain second sampling data. After the second sampling data is converted into the frequency domain to obtain the second spectrum, multiple frequency points with intensities greater than a preset threshold are selected as candidate frequency points for the second frequency point. Among these candidate frequency points for the second frequency point, determine the candidate frequency points with a multiple relationship, remove the non-minimum frequency points in each group of multiple frequency points with a multiple relationship, and use the remaining candidate frequency points as the second frequency point.

[0163] After the second frequency point is determined, step S710 is performed to determine whether the first frequency difference between the second frequency point and the preset frequency point is within the first preset range. If the first frequency difference is within the first preset range, it is considered that all second frequency points including the second frequency point meet the preset condition, and then the exposure time of the image is adjusted according to these second frequency points.

[0164] If the first frequency difference is not within the first preset range, then step S806 and step S804 are executed in sequence, that is, based on the second frequency point determined in step S405, the coherent sampling frequency is re-determined according to the second frequency point with the largest intensity, so that the second frequency point with the largest intensity and the new coherent sampling frequency satisfy the coherence law. And, using this new coherent sampling frequency, the optical signal is re-sampled for the second time, and at least one second frequency point is re-determined. The specific method for determining the second frequency point is similar to the above steps S401 to S405, and will not be repeated here.

[0165] After the second frequency point is re-determined, step S1101 is executed to determine whether the second frequency difference between the second frequency point determined in step S405 and the second frequency point re-determined in step S804 is within the second preset range. If any second frequency difference is not within the second preset range, the counter is reset. If both are, the counter is incremented by 1 (the initial value can be set to 1). And it is determined whether the counter value is greater than or equal to the preset threshold value (the threshold value can be greater than 1, for example, 2). If the value is less than the preset threshold value, based on the second frequency point determined in step S804, the coherent sampling frequency is re-determined according to the second frequency point with the largest intensity, so that the second frequency point with the largest intensity and the new coherent sampling frequency satisfy the coherence law. Then return to the above step S401, and use the coherent sampling frequency re-determined in step S805 to perform a second sampling of the optical signal. If the value is greater than or equal to the preset threshold value, the second frequency point is considered stable, and step S502 is executed to adjust the exposure time of the image acquisition device according to the second frequency point. It should be noted that the second frequency point here may be at least one latest frequency point determined according to step S804, or may be determined according to previously determined second frequencies, for example, determined according to an average value of previously determined second frequencies.

[0166] In some other embodiments, continue to refer to Fig.11 After executing step S805, the process may not return to step S401 but directly return to step S804. That is, for the re-determined second frequency point, it is omitted to determine whether the first frequency difference is within the first preset range, and it is directly determined whether the second frequency difference is within the second preset range.

[0167] In some further embodiments, continue to refer to Fig.11 , a judgment of whether the first frequency difference is within the first frequency range can be added between step S804 and step S801. That is, after executing step S804, for at least one second frequency point determined in step S804, it is judged whether the first frequency difference between these second frequency points and the preset frequency point is within the first preset range. If the first frequency difference is within the first preset range, the exposure time of the image is adjusted according to these second frequency points and the process ends. If not, step S1101 is executed again to judge whether the second frequency difference is within the second preset range.

[0168] Based on the same inventive concept, the embodiment of the present application further provides an optical signal processing device 100, such as Fig.12 As shown, the processing device 100 includes:

[0169] A first frequency point determining unit 101 is used to perform a first sampling on the optical signal based on a preset sampling frequency to determine a first frequency point;

[0170] A coherent sampling frequency determining unit 102, configured to determine the coherent sampling frequency according to the first frequency point based on a coherent sampling law;

[0171] The second frequency point determination unit 103 is used to perform a second sampling on the light signal based on the coherent sampling frequency to determine at least one second frequency point; wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

[0172] In the optical signal processing device 100 provided in the embodiment of the present application, the first frequency point determination unit 101 samples the optical signal at a preset sampling frequency, and can determine a first frequency point for characterizing the approximate frequency of the ambient light. After the coherent sampling frequency determination unit 102 calculates the coherent sampling frequency that matches the ambient light frequency based on the first frequency point, the second frequency point determination unit 103 performs sampling using the coherent sampling frequency that matches the ambient light, and can determine at least one second frequency point that can accurately describe the ambient light frequency information. The second frequency point determined by the second frequency point determination unit 103 is conducive to determining more appropriate exposure parameters and improving the shooting effect of the camera.

[0173] In some embodiments, the processing device further comprises:

[0174] The duration determination unit is used to adjust the exposure duration of the image acquisition device according to the second frequency point.

[0175] In some embodiments, the duration determination unit is specifically configured to adjust the exposure duration of the image acquisition device according to the second frequency point in response to the second frequency point satisfying a preset condition.

[0176] In some embodiments, the coherent sampling frequency determination unit is further configured to update the coherent sampling frequency according to the second frequency point in response to the second frequency point not satisfying a preset condition;

[0177] The second frequency point determination unit is further configured to re-sample the optical signal for the second time based on the updated coherent sampling frequency, and re-determine at least one second frequency point.

[0178] In some embodiments, the second frequency point determination unit is specifically used to determine whether the first frequency difference between at least one second frequency point and the preset frequency point is within a first preset range; if the second frequency point whose first frequency difference is within the first preset range is included, it is determined that the preset condition is met.

[0179] In some embodiments, the second frequency point determination unit is specifically used to add 1 to the preset number value if the second frequency difference between at least one second frequency point and at least one second frequency point obtained by the previous second sampling is within a second preset range, otherwise the number value is cleared to zero; if the number value is greater than or equal to the preset number threshold, it is determined that the second frequency point meets the preset conditions.

[0180] In some embodiments, the first frequency point determination unit is specifically used to perform a first sampling on the optical signal to obtain first sampling data; perform frequency domain conversion on the first sampling data to obtain a first spectrum; and in the first spectrum, select a frequency point that meets a preset intensity condition as the first frequency point.

[0181] In some embodiments, the second frequency point determination unit is also used to perform a second sampling on the optical signal to obtain second sampling data; perform frequency domain conversion on the second sampling data to obtain a second spectrum; in the second spectrum, select multiple alternative frequency points whose intensities are greater than a preset threshold; determine alternative frequency points that have a multiple relationship between the alternative frequency points; select the minimum frequency point in each group of alternative frequency points that have a multiple relationship as the second frequency point, and select an alternative frequency point that does not have a multiple relationship with any other alternative frequency point as the second frequency point.

[0182] In some embodiments, the duration determination unit is specifically used to determine the least common multiple of each cycle duration as the minimum exposure duration according to the cycle durations corresponding to multiple second frequency points; and determine the integer multiple of the minimum exposure duration as the exposure duration.

[0183] In some embodiments, the duration determination unit is specifically used to determine the weight coefficient corresponding to each cycle duration according to the intensity of each second frequency point; determine the minimum exposure duration according to each cycle duration and the weight coefficient corresponding to each cycle duration; and determine the integer multiple of the minimum exposure duration as the exposure duration.

[0184] Based on the same inventive concept, the embodiment of the present application further provides an electronic device 200, such as Fig.13 As shown, the electronic device 200 includes: a processor 201 and an image acquisition device 202;

[0185] The processor 201 is used to execute the above processing method and adjust the exposure time of the image acquisition device according to the second frequency point.

[0186] Since the processor 201 in the electronic device 200 can execute the above processing method when running computer instructions, the electronic device 200 has similar beneficial technical effects as the above optical signal processing method. Therefore, the beneficial effects of the electronic device 200 will not be repeated here.

[0187] Based on the same inventive concept, the embodiment of the present application further provides a chip 300, such as Fig.14 As shown, the chip 300 includes a device 301 for executing the above processing method. Fig.15 As shown, the chip 300 includes the processing device 100 mentioned above.

[0188] Since the chip 300 includes the processing method device 301 or the processing device 100 that can execute the above processing method when running computer instructions, the chip 300 has the beneficial technical effects similar to the above optical signal processing method. Therefore, the beneficial effects of the chip 300 will not be repeated here.

[0189] The present application also provides the following embodiments:

[0190] In order to prevent the camera's photo-taking effect from being affected by flickering light sources, the camera's exposure time needs to be adapted accordingly. For example, a sensor that detects the flickering frequency of a flickering light source (e.g., a Flicker sensor) is used to guide the camera to set a reasonable exposure time. Specifically, a fixed preset sampling frequency is used to sample the ambient light. After a certain amount of data is collected, the sample data group is processed by an FFT algorithm to extract the frequency information of the ambient light. However, there is a situation where the multiple frequency points of a certain effective frequency will drown out other effective frequency points due to their high energy; and since the preset sampling frequency is fixed, when the sampling frequency and the ambient light frequency do not satisfy the coherent sampling theorem, spectrum leakage will occur, resulting in the inability to distinguish adjacent frequency points, or the presence of erroneous frequency points.

[0191] like Fig.16 As shown, the processing device in the embodiment of the present application, such as the sensor 900, first uses the default preset sampling frequency to sample the ambient light, calculates the first frequency point (approximate ambient light frequency), and then calculates the coherent sampling frequency adapted to the ambient light frequency according to the coherent sampling theorem, and samples again using the coherent sampling frequency to calculate a more accurate ambient light frequency (second frequency point). The sensor 900 reports the second frequency point to the central processor 901 (for example, CPU), and after the central processor 901 calculates the exposure time according to the second frequency point, the image acquisition unit 902 can shoot according to the exposure time to obtain a high-quality image.

[0192] Furthermore, the sensor 900 can obtain multiple groups of second frequency points according to the coherent sampling frequency sampling, and compare the second frequency points of adjacent groups to determine whether the coherent sampling frequency needs to be updated. Specifically, if the difference of the second frequency points is less than a certain value (for example, 4Hz), the coherent sampling frequency is kept unchanged. If the difference of the second frequency points is greater than or equal to the value, that is, the ambient light frequency has changed, then the coherent sampling frequency adapted to the ambient light frequency is recalculated based on the coherent sampling theorem according to the latest ambient light frequency, thereby ensuring that the most accurate ambient light frequency can be calculated by quickly adjusting the coherent sampling frequency when the environment changes.

[0193] Furthermore, for the obtained series of second frequency points, the sensor 900 can count all the double frequency signals, extract and filter them, and only extract the frequency point with the highest signal strength and other non-double frequency points to report to the central processor 901. By filtering out the double frequency signals, it can be avoided that other valid frequency points in the environment are submerged due to the double frequency signals.

[0194] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0195] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0196] The various embodiments / implementations provided in this application can be combined with each other without causing any contradiction.

[0197] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for processing an optical signal, characterized in that: include: Based on a preset sampling frequency, performing a first sampling on the optical signal to determine a first frequency point; Based on the coherent sampling law, determining the coherent sampling frequency according to the first frequency point; Based on the coherent sampling frequency, a second sampling is performed on the light signal to determine at least one second frequency point; wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

2. The processing method according to claim 1, characterized in that: Also includes: Determining whether the second frequency point meets a preset condition; In response to the second frequency point satisfying the preset condition, the exposure duration of the image acquisition device is adjusted according to the second frequency point.

3. The processing method according to claim 2, characterized in that: Also includes: In response to the second frequency point not satisfying the preset condition, updating the coherent sampling frequency according to the second frequency point; Based on the updated coherent sampling frequency, the second sampling is performed again on the optical signal, and at least one second frequency point is re-determined until the re-determined second frequency point meets the preset condition.

4. The processing method according to claim 3, characterized in that: The determining whether the second frequency point meets a preset condition includes: Determining whether a first frequency difference between the at least one second frequency point and the preset frequency point is within a first preset range; If the second frequency point including the first frequency difference is within the first preset range, it is determined that the preset condition is met.

5. The processing method according to claim 3, characterized in that: The determining whether the second frequency point meets a preset condition includes: If the second frequency difference between the at least one second frequency point and the at least one second frequency point obtained by the previous second sampling is within a second preset range, then the preset number value is increased by 1, otherwise the number value is cleared to zero; If the number value is greater than or equal to a preset number threshold, it is determined that the second frequency point meets the preset condition.

6. The processing method according to any one of claims 1 to 5, characterized in that: The first sampling of the optical signal to determine the first frequency point includes: Performing a first sampling on the optical signal to obtain first sampling data; Performing frequency domain conversion on the first sampling data to obtain a first spectrum; In the first frequency spectrum, a frequency point whose intensity meets a preset intensity condition is selected as the first frequency point.

7. The processing method according to any one of claims 1 to 5, characterized in that: The performing a second sampling on the optical signal to determine at least one second frequency point includes: Performing a second sampling on the optical signal to obtain second sampling data; Performing frequency domain conversion on the second sampling data to obtain a second spectrum; In the second spectrum, selecting a plurality of candidate frequency points whose intensities are greater than a preset threshold; Determine the candidate frequency points having a multiple relationship between the candidate frequency points; The minimum frequency point in each group of candidate frequency points having a multiple relationship is selected as the second frequency point, and the candidate frequency point that does not have a multiple relationship with any other candidate frequency point is selected as the second frequency point.

8. The processing method according to claim 2, characterized in that: The step of adjusting the exposure time of the image acquisition device according to the second frequency point includes: According to the period lengths corresponding to the multiple second frequency points, determine the least common multiple of the period lengths as the minimum exposure duration; An integral multiple of the minimum exposure time is determined as the exposure time.

9. The processing method according to claim 2, characterized in that: The step of adjusting the exposure time of the image acquisition device according to the second frequency point includes: Determining a weight coefficient corresponding to each cycle length according to the strength of each of the second frequency points; Determine a minimum exposure duration according to the durations of each cycle and the weight coefficients corresponding to the durations of each cycle; An integral multiple of the minimum exposure time is determined as the exposure time.

10. An optical signal processing device, characterized in that: include: A first frequency point determining unit, configured to perform a first sampling on the optical signal based on a preset sampling frequency to determine a first frequency point; A coherent sampling frequency determining unit, configured to determine the coherent sampling frequency according to the first frequency point based on a coherent sampling law; The second frequency point determination unit is used to perform a second sampling on the light signal based on the coherent sampling frequency to determine at least one second frequency point; wherein the second frequency point is used to adjust the exposure time of the image acquisition device.

11. The processing device according to claim 10, characterized in that Also includes: A duration determination unit is used to adjust the exposure duration of the image acquisition device according to the second frequency point.

12. An electronic device, characterized in that: including a processor and an image acquisition device; The processor is used to execute the processing method according to any one of claims 1 to 9, And adjust the exposure time of the image acquisition device according to the second frequency point.

13. A chip, characterized in that: The invention comprises a device for executing the processing method according to any one of claims 1 to 9, or a processing device according to any one of claims 10 to 11.