Shooting method and device, electronic equipment and storage medium
By collecting the light wave information of the flicker light source, controlling the light emitting element or adjusting the light transmittance of the lens, the image light and dark fringe problems caused by the flicker light source in the prior art are solved, and image quality is guaranteed.
Patent Information
- Application Number
- CN202411568921.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-25
AI Technical Summary
When the prior art eliminates the light and dark fringe phenomenon of image caused by flickering ambient light source, it is easy to cause blurring or overexposure of fast moving objects, affecting image quality.
By collecting the light wave information of the flickering light source in the shooting scene, controlling the light emitting element to compensate for the flickering light source, or adjusting the light transmittance of the lens in the lens to keep the light constant and eliminate the light and dark fringes.
It realizes that while eliminating the light and dark fringe phenomenon of image, it ensures image quality without affecting the exposure time setting, and avoids blurring and overexposure of fast moving objects.
Smart Images

Figure CN119521008A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data photography technology, and specifically relates to a shooting method, device, electronic device and storage medium. Background Art
[0002] Currently, during the shooting process, when the ambient light source flickers, light and dark stripes may appear in the shot image, resulting in a decrease in image quality.
[0003] In the prior art, the improvement method adopted is to detect the frequency f of the ambient light through an anti-flicker light sensor, and adjust the exposure time according to the flicker cycle of 1 / f or an integer multiple of 1 / f, so as to eliminate the light and dark stripes phenomenon. However, in the above method, if the exposure time is 10ms or its integer multiples under a 100Hz light source, the phenomenon of fast-moving objects being blurred will occur; for example, in a bright outdoor environment, if the exposure time is 10ms or its integer multiples under a 100Hz light source, overexposure will occur.
[0004] It can be seen that the method of eliminating light and dark stripes used in the prior art has the problem of reduced image quality. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a shooting method, device, electronic device and storage medium, which can solve the problem of image quality degradation caused by the method of eliminating light and dark stripes used in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising: when a first flashing light source appears in a shooting scene, acquiring light wave information of the first flashing light source;
[0007] According to the light wave information of the first flashing light source, the light emitting element is controlled to emit light, and the light emitted by the light emitting element is used to compensate the first flashing light source; or,
[0008] The transmittance of the lens in the lens is adjusted according to the light wave information of the first flashing light source, and the brightness value of the output light of the first flashing light source is negatively correlated with the transmittance of the lens.
[0009] In a second aspect, an embodiment of the present application provides a photographing device, the device comprising:
[0010] An acquisition module, configured to acquire light wave information of a first flashing light source when the first flashing light source appears in the shooting scene;
[0011] A control module, used for controlling the light emitting element to emit light according to the light wave information of the first flashing light source, wherein the light emitted by the light emitting element is used to compensate for the first flashing light source;
[0012] The adjustment module is used to adjust the light transmittance of the lens in the lens according to the light wave information of the first flashing light source, and there is a negative correlation between the brightness value of the output light of the first flashing light source and the light transmittance of the lens.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps described in the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0017] In the embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1It is one of the flow charts of the shooting method provided in the embodiment of the present application;
[0019] Figure 2 It is one of the partial structural schematic diagrams of the electronic device provided in the embodiment of the present application;
[0020] Figures 3 to 7 They are schematic diagrams 1 to 5 of the principles of light wave compensation provided in the embodiments of the present application;
[0021] Figure 8 This is one of the principle schematic diagrams of the transmittance adjustment method provided in the embodiment of the present application;
[0022] Fig. 9 This is one of the schematic diagrams of the exposure time determination principle provided in the embodiment of the present application.
[0023] Fig.10 This is the second schematic diagram of the exposure time determination principle provided in the embodiment of the present application;
[0024] Figures 11 to 13 They are respectively schematic diagrams 1 to 3 of the unmixing principle provided in the embodiments of the present application;
[0025] Fig.14 is a block diagram of a photographing device provided by some embodiments of the present application;
[0026] Fig.15 Schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application;
[0027] Fig.16 It is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings of the embodiments of the present application to clearly describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present application belong to the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the target object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0030] The following is a detailed description of the shooting method provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0031] like Figure 1 FIG. 1 is a flowchart of a shooting method according to an embodiment of the present application, and takes the method applied to an electronic device as an example. The method includes:
[0032] Step 110: When a first flashing light source appears in the shooting scene, light wave information of the first flashing light source is obtained.
[0033] In some embodiments of the present application, the light wave information of the first flickering light source in the shooting scene can be collected by a flicker sensor, and the light wave information includes some parameters related to the light source waveform. For example, the light wave information includes: the frequency, phase, amplitude, brightness value, etc. of the light wave of the emitted light of the first flickering light source.
[0034] Step 120: According to the light wave information of the first flashing light source, control the light emitting element in the electronic device to emit light. The light emitted by the light emitting element is used to compensate the first flashing light source.
[0035] In some embodiments of the present application, a light-emitting element is configured in the electronic device, so that when a flickering light source appears in the shooting scene, the light-emitting element is controlled to emit light to compensate for the light during the non-lighting period of the first flickering light source. Alternatively, the electronic device can control the light-emitting element to emit light with higher brightness to compensate for the light with lower brightness emitted by the first flickering light source, thereby creating a shooting scene in which the light source emits light steadily rather than flickeringly. Optionally, the light-emitting element can be a flash, a fill light, or an infrared device. For example, the light-emitting element can be a light-emitting diode (LED) lamp.
[0036] In an optional implementation, the electronic device can control the light emitting element to emit light compensation through a driving circuit. Figure 2 As shown, the driving circuit of the light emitting element is as follows Figure 2 As shown in the dotted box in . The Flicker sensor can transmit the collected light wave information to the application processor (AP), so that the AP can control the driving circuit to achieve the effect of compensating the first flashing light source with the emitted light of the light-emitting component. For example, if the light emitted by the first flashing light source changes from bright to dark, the light emitted by the light-emitting component can be controlled from dark to bright. For another example, if the first flashing light source flashes, that is, the time periods of lighting and stopping lighting alternate, then during the period when the first flashing light source is lighting, the light-emitting component is controlled not to emit light; conversely, during the period when the first flashing light source is not lighting, the light-emitting component is controlled to emit light. It should be noted that Figure 2Take the light emitting element as a flash lamp as an example.
[0037] Specifically, Figure 2 As shown, the driving circuit may include a square wave generator, a sine wave generator, a triangle wave generator, an amplifier, an amplitude selection module, and an attenuator. The AP may control the processing path of the driving circuit according to the waveform of the light wave of the first flashing light source, so that the driving circuit generates an electrical signal with the same waveform as the light wave of the first flashing light source through the wave generator, and then uses the electrical signal to drive the light-emitting element to emit a light wave with the same waveform as the light wave of the first flashing light source for light compensation. Wherein, if the waveform is a square wave, the driving circuit is controlled to form a processing path based on the square wave generating circuit to drive the light-emitting element to emit a light wave with a square waveform for light compensation; if the waveform is a sine wave, the driving circuit is controlled to form a processing path based on the sine wave generating circuit to drive the light-emitting element to emit a light wave with a sine wave waveform for light compensation; if the waveform is a triangle, the driving circuit is controlled to form a processing path based on the triangle generator to drive the light-emitting element to emit a light wave with a triangle waveform for light compensation.
[0038] Alternatively, step 130: adjusting the light transmittance of the lens in the lens according to the light wave information of the first flashing light source. The brightness value of the light emitted by the first flashing light source is negatively correlated with the light transmittance of the lens.
[0039] In some embodiments of the present application, the lens may include a lens with adjustable transmittance, and then based on the adjustment of the transmittance of the lens, the energy of the light that the lens can receive through the lens is adjusted, so that the light source that the lens can receive is constant. For example, if the light emitted by the first flashing light source changes from bright to dark, the transmittance of the lens is controlled from low to high. For another example, if the first flashing light source flashes, that is, the time period of lighting and stopping lighting alternates, then during the period when the first flashing light source is lighting, the transmittance of the lens is controlled to be lowered; conversely, during the period when the first flashing light source is not lighting, the transmittance of the lens is controlled to be increased.
[0040] In an embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0041] In the process of the shooting method of another embodiment of the present application, the light wave information includes the first frequency and phase of the emitted light of the first flashing light source. Step 120 includes:
[0042] Sub-step A1: according to the first frequency of the first flashing light source, the light emitting element is controlled to emit light according to the first frequency, and the light wave of the output light of the first flashing light source is opposite in phase to the light wave of the output light of the light emitting element.
[0043] In some embodiments, the light wave information of the first flashing light source can be collected by a flicker sensor, and the frequency of the waveform of the output light of the first flashing light source can be calculated by fast Fourier transform (FFT), which is defined as the first frequency. In addition, the light wave information can also include the waveform and phase of the output light of the first flashing light source. The electronic device can control the light emitting element to emit light with a waveform of the light wave of the first flashing light source according to the first frequency, phase and waveform of the first flashing light source, and the light wave phase of the output light of the light emitting element is opposite to the light wave of the output light of the first flashing light source.
[0044] Taking the square wave waveform of the emitted light of the first flashing light source as an example, the first frequency and phase of the emitted light of the first flashing light source are obtained by the Flicker sensor, and the first frequency and phase of the first flashing light source are output to the AP. The AP controls the driving circuit to drive the light-emitting element to emit a light wave with a first frequency and a phase opposite to that of the first flashing light source, so that the light-emitting time of the light-emitting element is aligned with the time when the first flashing light source is not emitting light, and the light-emitting element is turned off. The time is aligned with the time when the first flashing light source emits light, so that the light received by the lens remains constant. Figure 3 As shown, the thin solid line represents the light wave signal 301 of the light emitted by the first flashing light source, and the dotted line represents the light wave signal 302 of the light emitted by the light emitting element. The two waveforms have the same frequency and opposite phases. Based on this, the superposition of the light emitted by the first flashing light source and the light emitted by the light emitting element can enable the lens to receive the light wave represented by the thick solid line, and the waveform of the light wave is a straight line. That is, the thick solid line represents the light wave signal 303 after the light waves of the light emitted by the first flashing light source and the light emitted by the light emitting element are superimposed. The waveform of the light wave signal 303 is a straight line, indicating that the illumination is stable.
[0045] It should be noted that, based on the setting of the light control scheme of the light emitting element, the light collected by the lens can be stabilized, but the brightness value of the superimposed light wave is related to the control scheme, such as Figure 3 The position of the light wave signal 303 in is not limited, and can be translated upward, that is, the stable light is brighter; or can be translated downward, that is, the stable light is darker.
[0046] In this embodiment, the first frequency and phase of the first flashing light source can be obtained to control the light emitting component to emit a light wave with the same waveform as the light wave of the first flashing light source, a frequency also being the first frequency, and a phase opposite to the phase of the light wave of the first flashing light source, so that the light emitted by the light emitting component is compensated in the interval when the first flashing light source is not emitting light, so that the light collected by the lens is constant, thereby achieving the effect of stable lighting in the shooting scene, and effectively eliminating the phenomenon of light and dark stripes in the image caused by the flickering of the light source.
[0047] In the process of the shooting method of another embodiment of the present application, the light wave information also includes the first amplitude of the emitted light of the first flickering light source. It should be noted that in some embodiments, in the process of executing step 110 to obtain the light wave information of the first flickering light source, the DC component amplitude and the AC component amplitude of the first flickering light source can be collected by the Flicker sensor to extract the AC component amplitude as the first amplitude.
[0048] Sub-step B1: Calculate the second amplitude of the light wave of the light emitted by the light emitting element according to the first amplitude and the target coefficient. The target coefficient is used to control the fourth amplitude of the light wave of the light emitting element captured by the lens to be equal to the third amplitude of the light wave of the first flashing light source captured by the lens.
[0049] Optionally, the target system can be determined by test acquisition and used to calculate the second amplitude. Specifically, under an ambient flickering light source, the Flicker sensor can obtain the following Figure 4 The DC component and AC component amplitudes h1 of the ambient flickering light source are shown, and the AC component amplitude h2 of the emitted light of the ambient flickering light source captured by the lens is obtained. The AC component amplitude h2 is as follows: Figure 5 As shown, a first ratio i1 is obtained according to the AC component amplitude h1 and the AC component amplitude h2. The first ratio i1 satisfies: i1 = h2 / h1.
[0050] Then, the ambient flickering light source is turned off, the light emitting element is turned on, and the flickering amplitude of the light emitted by the light emitting element (i.e., the AC light amplitude) is set to be Figure 6 The amplitude h3 shown in FIG. 1 is the amplitude h4 of the light emitted by the light emitting element captured by the lens. The amplitude h4 is as shown in FIG. Figure 7 As shown. The second ratio i2 is obtained based on the amplitude h3 and the amplitude h4. The second ratio i2 satisfies: i2 = h4 / h3. When the condition that needs to be met is that the amplitude h4 captured by the lens is equal to the amplitude h2 captured by the lens, h2 = h4. Correspondingly, h3×i2=h1×i1, that is, h3=h1×i1 / i2 is obtained, and the target coefficient is i1 / i2.
[0051] Obviously, the value of the second amplitude of the light wave of the light emitting element can be the product of the first amplitude of the first flickering light source and the target coefficient. In an optional case, the target coefficient i1 / i2 can be determined by setting the AC component amplitude h1 of the ambient flickering light source, and after turning off the ambient flickering light source and turning on the light emitting element, repeatedly debugging the light emitting element so that the lens can collect the emitted light of the light emitting element with an amplitude of the AC component amplitude h2.
[0052] Based on this, optionally, the electronic device may store a correspondence between the AC component amplitude h1 and the target coefficient, and the correspondence records the target coefficients corresponding to multiple AC component amplitudes h1. The electronic device may determine the target coefficient corresponding to the AC component amplitude (i.e., the first amplitude) of the first flashing light source based on the correspondence between the AC component amplitude h1 and the target coefficient. Then, the product of the first amplitude and the target coefficient is calculated to obtain the second amplitude of the light wave of the light emitted by the light-emitting element.
[0053] That is, the electronic device can calculate the second amplitude of the light wave of the light emitted by the light emitting element according to formula (1), the first amplitude, and its corresponding target coefficient. Formula (1) satisfies:
[0054] h Flash =h Flicker ×i1 / i2 (1)
[0055] In formula (1), h Flash represents the second amplitude, h Flicker represents the first amplitude, and i1 / i2 represents the target coefficient.
[0056] Sub-step B2: controlling the light-emitting element to emit light according to a second amplitude.
[0057] For example, Figure 2 As shown, the AP can transmit light wave information to the driving circuit, and the AP can control the processing path of the driving circuit according to the waveform of the light wave of the first flashing light source, so that the driving circuit generates an electrical signal with the same waveform as the light wave of the first flashing light source through the wave generator. In addition, the wave generator can also receive the first frequency and phase of the emitted light of the first flashing light source transmitted by the AP to generate an electrical signal with the same waveform as the light wave of the first flashing light source, the first frequency, and the opposite phase to the phase of the emitted light of the first flashing light source, and output the electrical signal to the amplifier. Furthermore, the amplitude selection module in the driving circuit receives the first amplitude of the emitted light of the first flashing light source to calculate the second amplitude of the light-emitting element according to the target coefficient, thereby controlling the amplifier and the attenuator to adjust the amplitude of the electrical signal to the second amplitude, and outputs the adjusted electrical signal to the light-emitting element, so that the light-emitting element emits a light wave with the same waveform as the light wave of the first flashing light source, the first frequency, and the opposite phase to the light wave of the first flashing light source.
[0058] In some embodiments of the present application, the light-emitting element can be controlled to emit a waveform that is the same as the waveform of the light wave of the first flashing light source, a frequency that is also the first frequency, a phase that is opposite to the phase of the light wave of the first flashing light source, and an amplitude that is a light wave of the second amplitude. In this way, since the light-emitting element is controlled to emit light according to the second amplitude, the fourth amplitude of the light wave of the light-emitting element collected by the lens can be controlled to be equal to the amplitude of the AC component (i.e., the third amplitude) of the light wave of the first flashing light source collected by the lens. Therefore, the light emitted by the light-emitting element can form effective light compensation for the first flashing light source during the interval when the first flashing light source is not emitting light, so that the light collected by the lens is constant, achieving the effect of stable light in the shooting scene, and effectively eliminating the phenomenon of light and dark stripes in the image caused by the flickering of the light source.
[0059] In the process of the shooting method of another embodiment of the present application, the light wave information includes the first frequency and phase of the emitted light of the first flashing light source. Step 130 includes:
[0060] Sub-step C1: According to the first frequency of the first flashing light source, the lens is controlled to change the light transmittance according to the first frequency. The light wave of the first flashing light source and the change waveform of the light transmittance of the lens are in opposite phase.
[0061] In this step, the waveform of the change in the transmittance of the lens and the waveform of the first flashing light source have the same frequency and opposite phases. In addition, the light wave information may also include the waveform of the emitted light of the first flashing light source. When the electronic device controls the lens to change the transmittance according to the first frequency of the first flashing light source, the waveform of the change in the transmittance of the lens and the waveform of the first flashing light source may have the same waveform, the same frequency and opposite phases.
[0062] For example, the waveform of the light emitted by the first flashing light source is a sine waveform. Figure 8 As shown, the waveform 801 of the light wave of the first flashing light source is a sine waveform. Correspondingly, the waveform 802 presented by the change law of the transmittance of the lens can also be a sine waveform, and the two waveforms have the same frequency but opposite phases. Among them, at the peak of the waveform of the light wave of the first flashing light source, that is, the light emitted by the first flashing light source is the brightest, the transmittance of the lens is the lowest, and the lens has the strongest reception inhibition on the outgoing light of the first flashing light source. Conversely, at the trough of the waveform of the light wave of the first flashing light source, that is, the light emitted by the first flashing light source is the darkest, the transmittance of the lens is the highest, and the lens has the weakest reception inhibition on the outgoing light of the first flashing light source. In this way, the waveform 803 of the light wave finally received by the lens is a straight line, indicating that the light energy received by the lens through the lens is stable. And the brightness value of the light wave is the minimum brightness value of the outgoing light of the first flashing light source.
[0063] Optionally, the material of the lens with adjustable transmittance may include various materials with adjustable transmittance, such as indium tin oxide (ITO), liquid crystal materials, and electrochromic materials. Furthermore, the transmittance of the lens may be adjusted using an electric field with frequency information. For example, the grayscale of the lens may be increased by an electric field to achieve the purpose of reducing the transmittance of the lens.
[0064] In some embodiments of the present application, the light wave information includes the brightness value of the emitted light of the first flashing light source at each moment in a single cycle. According to the first frequency of the first flashing light source, the process of controlling the lens to change the transmittance according to the first frequency may include:
[0065] Sub-step C11: setting a first light transmittance of the lens at a first moment in a single cycle.
[0066] In some embodiments of the present application, the first flashing light source emits periodic flashing light, and the light wave has a changing period. Accordingly, the changing period of the light transmittance of the lens is the same as the flashing period of the emitted light of the first flashing light source. That is, the period of the changing waveform of the light transmittance of the lens is the same as the changing period of the waveform of the light wave of the first flashing light source.
[0067] The electronic device can set the first transmittance of the lens at the first moment in a single cycle of the emitted light, that is, a single change cycle of the transmittance, so that the brightness value of the first flashing light source that can be captured by the lens can be maintained at the target brightness based on the first transmittance. Optionally, the first moment can be the moment corresponding to the lowest brightness value of the emitted light of the first flashing light source. The value range of the target brightness can be [a0, a0+x]. Wherein, a0 is the lowest brightness value of the emitted light of the first flashing light source, and x∈[0,1]. For example, the electronic device can set the first transmittance of the lens in a single cycle, and the moment corresponding to the lowest brightness value of the emitted light of the first flashing light source is 100%.
[0068] Sub-step C12: based on the relationship between the first brightness value of the emitted light of the first flashing light source at the first moment and the first transmittance, convert the brightness value of the first flashing light source at each moment in a single cycle into the second transmittance of the lens at each moment in a single cycle.
[0069] The waveform of the light wave of the first flashing light source represents the change of the brightness value of the emitted light over time. That is, it can be understood that in the light wave coordinate system of the first flashing light source, the ordinate represents the brightness value of the emitted light of the light source, and the abscissa represents the time.
[0070] Specifically, when the brightness of the emitted light of the first flashing light source is the maximum brightness h5, that is, at the peak of the light wave waveform of the first flashing light source, the change waveform of the light transmittance of the lens is at the trough, and it is assumed that the light transmittance G1 of the lens at this time is 100%×a1. Among them, a1 is a coefficient used to determine the light transmittance.
[0071] When the brightness of the emitted light of the first flashing light source is the minimum brightness value h6, that is, at the trough of the light wave waveform of the first flashing light source, the change waveform of the light transmittance of the lens is at the peak, and it is assumed that the light transmittance G2 is 100%*a2 at this time. Among them, a2 is a coefficient used to determine the light transmittance. In order to ensure that the light energy collected by the lens of the electronic device in the above two situations is consistent, combined with the principle of the above embodiment, it can also be determined that h5×i1×G1=h6×i1×G2, that is, h5×G1=h6×G2 is satisfied, and G2=G1×h5 / h6 can be obtained.
[0072] Based on this, the first brightness value and the first transmittance at the first moment can be used as a reference, combined with the brightness values at each moment in a single cycle, to calculate the second transmittance at each moment in the single cycle in sequence. Among them, the second transmittance G8 at each moment in a single cycle satisfies: h7×G7=h8×G8. h7 represents the first brightness value, G1 represents the first transmittance, h8 represents the brightness value at each moment, and G8 represents the second transmittance at each moment. It should be noted that the period of the emitted light of the first flashing light source is equal to the period of change of the transmittance. Therefore, the single period here can be understood as a single change period of the emitted light of the first flashing light source, and can also be understood as a single change period of the transmittance.
[0073] For example, the moment corresponding to the trough of the waveform of the first flashing light source (ie, the moment corresponding to the minimum brightness value) can be determined as the first moment, so that the transmittance at the corresponding moment can be calculated by combining the brightness value at any moment with the first brightness value at the first moment and 100% as a reference.
[0074] Sub-step C13: According to the second light transmittance at each moment in a single cycle, controlling the lens to periodically change the light transmittance of the lens.
[0075] In the embodiment of the present application, the electronic device controls the lens to periodically change the transmittance of the lens according to the second transmittance at each moment in a single cycle. In this way, the waveform of the change in the transmittance of the lens and the waveform of the first flashing light source have the same waveform, the same frequency, and opposite phase.
[0076] It should be noted that based on the setting of the adjustment scheme for the light transmittance of the lens, the light received by the lens through the lens is stable, but the brightness value of the light wave after the specific lens projects is related to the adjustment scheme, such as Figure 8 The position of the light wave signal 803 in is not limited, and can be translated upward, that is, the received stable light is brighter, or can be translated downward, that is, the received stable light is darker.
[0077] In this embodiment, the first frequency, phase, and brightness value of the first flashing light source at each moment can be obtained to adjust the light transmittance of the lens based on these parameters. The change waveform of the light transmittance of the lens and the waveform of the first flashing light source have the same waveform, the same frequency, and the opposite phase, so that the light energy collected by the lens is always consistent, ensuring that the light collected by the lens is constant, achieving the effect of stable light in the shooting scene, and effectively eliminating the light and dark stripes of the image caused by the flickering of the light source.
[0078] In the above embodiments, the first flickering light source is used as an example for explanation. When the parameters of the waveforms of all light sources appearing in the shooting scene are the same, it can be assumed that there is one flickering light source. Of course, there may be multiple flickering light sources in a single shooting scene, and the parameters of the multiple flickering light sources are at least partially different. In the following embodiments, taking the shooting scene with two flickering light sources as an example, the technical solution of this application describes the elimination of the light and dark stripes phenomenon of the image under the presence of multiple flickering light sources.
[0079] In the process of a shooting method of another embodiment of the present application, the method further includes:
[0080] Step D1: when a second flickering light source also appears in the shooting scene, a first period of the light wave of the first flickering light source and a second period of the light wave of the second flickering light source are acquired.
[0081] Optionally, the light wave information of the first flashing light source and the light wave information of the second flashing light source can be collected by a Flicker sensor to obtain the first frequency of the first flashing light source and the second frequency of the second flashing light source, and determine the first period of the light wave of the first flashing light source and the second period of the light wave of the second flashing light source.
[0082] Step D2: Calculate the exposure time interval according to the ambient light brightness value of the shooting scene collected by the sensor.
[0083] Optionally, the ambient light brightness value of the shooting scene can be collected by a flicker sensor to obtain an exposure time interval suitable for the current ambient light brightness value. In the case of a constant aperture, the exposure time of the exposure time interval and the ambient light brightness value are as follows: Fig. 9 The proportional relationship shown. Fig. 9 The relationship between exposure time and ambient light brightness is shown. The larger the ambient light brightness is, the shorter the corresponding exposure time should be, otherwise overexposure may occur.
[0084] Step D3: Among the first period, the integer multiple value of the first period, the second period and the integer multiple value of the second period, if there is a second period, or a target integer multiple value of the second period is within the exposure time interval, the target integer multiple value is used as the exposure time.
[0085] In some embodiments of the present application, after calculating the exposure time interval based on the ambient light brightness value of the shooting scene collected by the sensor, the electronic device can determine whether the first period, its integer multiple value, the second period and its integer multiple value are within the exposure time interval.
[0086] When the second period is within the exposure time interval, the second period can be used as the exposure time, and step 120 is executed to control the light-emitting component to emit light according to the light wave information of the first flashing light source, or step 130 is executed to adjust the transmittance of the lens in the lens according to the light wave information of the first flashing light source.
[0087] When a target integer multiple data of the second cycle is within the exposure time interval, the target integer multiple data can be used as the exposure time, and step 120 is executed to control the light-emitting component to emit light according to the light wave information of the first flashing light source, or step 130 is executed to adjust the transmittance of the lens in the lens according to the light wave information of the first flashing light source.
[0088] When the first cycle is within the exposure time interval, the first cycle can be used as the exposure time, and the light-emitting component can be controlled to emit light according to the light wave information of the second flashing light source, or the transmittance of the lens in the lens can be adjusted according to the light wave information of the second flashing light source.
[0089] When a target integer multiple data of the first cycle is within the exposure time interval, the target integer multiple data is used as the exposure time, and the light-emitting component is controlled to emit light according to the light wave information of the second flashing light source, or the transmittance of the lens in the lens is adjusted according to the light wave information of the second flashing light source.
[0090] It should be noted that, in some embodiments, there may be multiple values in the first period, the integer multiple value of the first period, the second period, and the integer multiple value of the second period that are located in the target time interval. In an optional case, the electronic device can use any value located in the target time area as the exposure time. Further optionally, in the case where a moving object appears in the shooting scene, the minimum value located in the exposure time interval can be used as the exposure time. For example, the shortest possible exposure time is required in modes such as motion capture mode. The electronic device can also use the minimum value among the multiple values located in the target time area as the exposure time.
[0091] It should also be noted that, according to the light wave information of the second flashing light source, the implementation method of controlling the light emitting element to emit light can refer to the implementation method of the aforementioned step 120. Similarly, according to the light wave information of the second flashing light source, the implementation method of adjusting the light transmittance of the lens in the lens can also refer to the implementation method of step 130, which is not described in detail in the embodiment of the present application. It can be seen that when there are two flashing light sources in the shooting scene, the problem of light and dark stripes in the image caused by one flashing light source can be eliminated by changing the exposure time, and the problem of light and dark stripes in the image caused by another flashing light source can be eliminated by light compensation of the light emitting element or by adjusting the light transmittance of the lens.
[0092] For example, assuming that the first period is t1, the integer multiples of the first period include: 2×t1, 3×t1, etc.; the second period is t2, the integer multiples of the second period include: 2×t2, 3×t2, etc. Fig. 9 and Fig.10 , the exposure time intervals [ts, te], t1, 2×t1, 3×t1, t2, 2×t2, 3×t2, etc. Fig.10 The time axis is shown in FIG. 2×t1, which is located in the exposure time interval [ts, te], is determined as the exposure time.
[0093] In addition, as mentioned above, when there are two flickering light sources in the shooting scene, the problem of image light and dark stripes caused by one flickering light source can be eliminated by changing the exposure time, and the problem of image light and dark stripes caused by another flickering light source can be eliminated by light compensation of the light emitting element or by adjusting the light transmittance of the lens. Based on this, the electronic device needs to filter the light waves of the first flickering light source and the light waves of the second flickering light source from the mixed light waves of the two flickering light sources to obtain the light wave information of the two light waves respectively.
[0094] Optionally, the electronic device may demix the light wave signals of the two aliased flashing light sources by using algorithms such as FFT and spectrum analysis, so as to obtain the light wave signal of the first flashing light source and the light wave signal of the second flashing light source.
[0095] For example, Fig.11 As shown, Fig.11 1 shows a mixed light wave signal 1101 of the first flashing light source and the second flashing light source. The mixed light wave signal is demixed to obtain a light wave signal 1102 of the first flashing light source and a light wave signal 1103 of the second flashing light source. Fig.11 The light wave signal 1102 of the first flashing light source is called the unmixed signal 1, and the light wave signal of the second flashing light source is called the unmixed signal 2.
[0096] Further optionally, the electronic device may collect the mixed light wave signal of the first flickering light source and the second flickering light source through a flicker sensor, and then obtain the light wave signal of the first flickering light source and the light wave signal of the second flickering light source by demixing the mixed light wave signal. Increasing the sampling frequency of the flicker sensor is conducive to demixing the real light wave signal. For example, please refer to Fig.12 , which shows a mixed signal 1201 of a 100 Hz sine wave signal and a 60 Hz square wave signal, and a sine wave signal 1202 and a 60 Hz square wave signal 1203 obtained by demixing and restoring the mixed signal after the mixed signal is collected by a Flicker sensor with a sampling frequency of 1 kHz. Please refer to Fig.13, which shows a mixed signal 1201 of a 100 Hz sine wave signal and a 60 Hz square wave signal, and a sine wave signal 1204 and a 60 Hz square wave signal 1205 obtained by unmixing and restoring the mixed signal after the Flicker sensor with a sampling frequency of 9 kHz is used to collect the mixed signal. Obviously, it can be seen that when the sampling frequency of the Flicker sensor is increased, the waveforms of the two light wave signals obtained by unmixing and restoring are closer to the original waveforms.
[0097] In this embodiment, when both the first flashing light source and the second flashing light source exist in the shooting scene, for one of the flashing light sources, the exposure time can be used to eliminate the problem of light and dark stripes in the image caused by the flashing light source; for the other flashing light source, the light emitting element can be controlled to emit light or the transmittance of the lens can be adjusted to eliminate the problem of light and dark stripes in the image caused by the flashing light source. Compared with setting the exposure time by simply using the common multiple of the periods of the two flashing light sources, this embodiment can set the exposure time more accurately and will not cause overexposure due to long exposure time.
[0098] In summary, the shooting method provided by the embodiment of the present application can collect the light wave information of the first flashing light source in the shooting scene, so as to control the light emitting element to emit light or adjust the transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to compensate light by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, so as to achieve the effect of stable light in the shooting scene, thereby eliminating the image light and dark stripes caused by the flashing of the light source. In another scheme, the transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the high and low changes in the transmittance, so as to make the light collected by the lens constant, and eliminate the image light and dark stripes caused by the flashing of the light source. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0099] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.
[0100] Fig.14 A block diagram of a photographing device according to an embodiment of the present application is shown, and the device includes:
[0101] An acquisition module 10, configured to acquire light wave information of the first flashing light source when the first flashing light source appears in the shooting scene;
[0102] A control module 20, configured to control the light emitting element to emit light according to the light wave information of the first flashing light source, wherein the light emitted by the light emitting element is used to compensate for the first flashing light source;
[0103] The adjustment module 30 is used to adjust the light transmittance of the lens in the lens according to the light wave information of the first flashing light source, and there is a negative correlation between the brightness value of the output light of the first flashing light source and the light transmittance of the lens.
[0104] In an embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0105] Optionally, the light wave information includes a first frequency and phase of the output light of the first flashing light source; the control module 20, based on the light wave information of the first flashing light source, is further used to control the light-emitting component to emit light according to the first frequency, and the light wave of the output light of the first flashing light source is opposite in phase to the light wave of the output light of the light-emitting component.
[0106] Optionally, the light wave information further includes a first amplitude of the emitted light of the first flashing light source; and the control module 20 is further configured to:
[0107] Calculating a second amplitude of a light wave of the light emitted by the light emitting element according to the first amplitude and a target coefficient, wherein the target coefficient is used to control a fourth amplitude of a light wave of the light emitting element captured by a lens to be equal to a third amplitude of a light wave of the first flashing light source captured by the lens;
[0108] The light emitting element is controlled to emit light according to the second amplitude.
[0109] Optionally, the light wave information includes a first frequency and phase of the output light of the first flashing light source; the adjustment module 30 is further used to control the lens to change its transmittance according to the first frequency, and the light wave of the first flashing light source is opposite in phase to the change waveform of the transmittance of the lens.
[0110] Optionally, the light wave information includes brightness values of the emitted light of the first flashing light source at various moments in a single cycle; the adjustment module 30 is further used to:
[0111] Setting a first light transmittance of the lens at a first moment in the single cycle;
[0112] According to the relationship between the first brightness value of the emitted light of the first flashing light source at the first moment and the first light transmittance, the brightness value of the first flashing light source at each moment in the single cycle is converted into the second light transmittance of the lens at each moment in the single cycle;
[0113] According to the second light transmittance at each moment in the single cycle, the lens is controlled to periodically change the light transmittance of the lens.
[0114] Optionally, the acquisition module is further configured to acquire a first period of the light wave of the first flickering light source and a second period of the light wave of the second flickering light source when a second flickering light source also appears in the shooting scene;
[0115] The shooting device also includes: a calculation module, which is used to calculate the exposure time interval according to the ambient light brightness value of the shooting scene collected by the sensor;
[0116] A determination module is used to use the target integer multiple value as the exposure time when, among the first period, the integer multiple value of the first period, the second period and the integer multiple value of the second period, the second period exists, or a target integer multiple value of the second period is within the exposure time interval.
[0117] In the embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0118] The device in the embodiment of the present application can be a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmentedreality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0119] The device of the embodiment of the present application may be a device having an action system. The action system may be an Android action system, an iOS action system, or other possible action systems, which are not specifically limited in the embodiment of the present application.
[0120] The device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0121] Alternatively, if Fig.15 As shown, an embodiment of the present application also provides an electronic device 1500, including a processor 1501, a memory 1502, and a program or instruction stored in the memory 1502 and executable on the processor 1501. When the program or instruction is executed by the processor 1501, each step of any of the above-mentioned shooting method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0122] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0123] Fig.16 The hardware structure diagram of an electronic device for implementing an embodiment of the present application is shown in FIG. The electronic device 1600 includes, but is not limited to, a radio frequency unit 1601, a network module 1602, an audio output unit 1603, an input unit 1604, a sensor 1605, a display unit 1606, a user input unit 1607, an interface unit 1608, a memory 1609, a processor 1610, a camera 1611, and other components.
[0124] Those skilled in the art will appreciate that the electronic device 1600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.16 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0125] Processor 1610, configured to obtain light wave information of a first flashing light source when the first flashing light source appears in the shooting scene;
[0126] According to the light wave information of the first flashing light source, the light emitting element is controlled to emit light, and the light emitted by the light emitting element is used to compensate the first flashing light source; or,
[0127] The transmittance of the lens in the lens is adjusted according to the light wave information of the first flashing light source, and the brightness value of the output light of the first flashing light source is negatively correlated with the transmittance of the lens.
[0128] In the embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0129] Optionally, the light wave information includes a first frequency and phase of the output light of the first flashing light source; the processor 1610 is further used to: control the light-emitting component to emit light according to the first frequency, and the light wave of the output light of the first flashing light source is opposite in phase to the light wave of the output light of the light-emitting component.
[0130] Optionally, the light wave information further includes a first amplitude of the emitted light of the first flashing light source; and the processor 1610 is further configured to:
[0131] Calculating a second amplitude of a light wave of the light emitted by the light emitting element according to the first amplitude and a target coefficient, wherein the target coefficient is used to control a fourth amplitude of a light wave of the light emitting element captured by a lens to be equal to a third amplitude of a light wave of the first flashing light source captured by the lens;
[0132] The light emitting element is controlled to emit light according to the second amplitude.
[0133] Optionally, the light wave information includes a first frequency and phase of the output light of the first flashing light source; the processor 1610 is further used to: control the lens to change the transmittance according to the first frequency, and the light wave of the first flashing light source is opposite in phase to the change waveform of the transmittance of the lens.
[0134] Optionally, the processor 1610 is further configured to:
[0135] Setting a first light transmittance of the lens at a first moment in the single cycle;
[0136] According to the relationship between the first brightness value of the emitted light of the first flashing light source at the first moment and the first light transmittance, the brightness value of the first flashing light source at each moment in the single cycle is converted into the second light transmittance of the lens at each moment in the single cycle;
[0137] According to the second light transmittance at each moment in the single cycle, the lens is controlled to periodically change the light transmittance of the lens.
[0138] Optionally, the processor 1610 is further configured to:
[0139] When a second flashing light source also appears in the shooting scene, obtaining a first period of the light wave of the first flashing light source and a second period of the light wave of the second flashing light source;
[0140] Calculating an exposure time interval according to the ambient light brightness value of the shooting scene collected by the sensor;
[0141] Among the first period, the integer multiple value of the first period, the second period and the integer multiple value of the second period, if the second period exists, or a target integer multiple value of the second period is within the exposure time interval, the target integer multiple value is used as the exposure time.
[0142] In the embodiment of the present application, for the first flashing light source appearing in the shooting scene, the light wave information of the first flashing light source can be collected to control the light emission of the light emitting element or adjust the light transmittance of the lens in the lens according to the light wave information. In one scheme, the light emitting element can be controlled to emit light according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so that the light compensation is performed by the light emitted by the light emitting element in the interval when the first flashing light source does not emit light or when the first flashing light source emits relatively dark light, so that the light collected by the lens is constant, and the light in the shooting scene is stable, thereby eliminating the light stripe phenomenon of the image caused by the flashing of the light source. In another scheme, the light transmittance of the lens can be adaptively adjusted according to the flashing condition of the first flashing light source, such as flashing from bright to dark, flashing light intermittently, etc., so as to balance the light energy that the lens can receive through the change of the transmittance, so that the light collected by the lens is constant, and the light stripe phenomenon of the image caused by the flashing of the light source is eliminated. It can be seen that compared with the related art, the shooting method provided in the embodiment of the present application will not affect the setting of the exposure time, and thus will not cause blurring and overexposure of fast-moving objects. Therefore, the image quality can be effectively guaranteed while eliminating the phenomenon of light and dark stripes in the image.
[0143] It should be understood that in the embodiment of the present application, the input unit 1604 may include a graphics processor (Graphics Processing Unit, GPU) 16041 and a microphone 16042, and the graphics processor 16041 processes the image data of the static picture or video image obtained by the image capture device (such as a camera) in the video image capture mode or the image capture mode. The display unit 1606 may include a display panel 16061, and the display panel 16061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1607 includes a touch panel 16071 and at least one of other input devices 16072. The touch panel 16071 is also called a touch screen. The touch panel 16071 may include two parts: a touch detection device and a touch controller. Other input devices 16072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and an action rod, which will not be repeated here. The memory 1609 can be used to store software programs and various data, including but not limited to cameras and action systems. The processor 1610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the action system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1610.
[0144] The memory 1609 can be used to store software programs and various data. The memory 1609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1609 may include a volatile memory or a non-volatile memory, or the memory 1609 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0145] The processor 1610 may include one or more processing units; optionally, the processor 1610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1610.
[0146] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0147] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0148] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0149] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0150] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0151] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0153] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting method, characterized in that: The method comprises: When a first flashing light source appears in the shooting scene, obtaining light wave information of the first flashing light source; According to the light wave information of the first flashing light source, the light emitting element is controlled to emit light, and the light emitted by the light emitting element is used to compensate the first flashing light source; or, The transmittance of the lens in the lens is adjusted according to the light wave information of the first flashing light source, and the brightness value of the output light of the first flashing light source is negatively correlated with the transmittance of the lens.
2. The method according to claim 1, characterized in that: The light wave information includes a first frequency and a phase of the emitted light of the first flashing light source; and controlling the light emitting element to emit light according to the light wave information of the first flashing light source includes: According to the first frequency, the light emitting element is controlled to emit light according to the first frequency, and the light wave of the output light of the first flashing light source is opposite in phase to the light wave of the output light of the light emitting element.
3. The method according to claim 2, characterized in that The light wave information also includes a first amplitude of the emitted light of the first flashing light source; and controlling the light emitting element to emit light according to the light wave information of the first flashing light source further includes: Calculating a second amplitude of a light wave of the light emitted by the light emitting element according to the first amplitude and a target coefficient, wherein the target coefficient is used to control a fourth amplitude of a light wave of the light emitting element captured by a lens to be equal to a third amplitude of a light wave of the first flashing light source captured by the lens; The light emitting element is controlled to emit light according to the second amplitude.
4. The method according to claim 1, characterized in that: The light wave information includes a first frequency and a phase of the emitted light of the first flashing light source; and adjusting the light transmittance of the lens in the lens according to the light wave information of the first flashing light source includes: According to the first frequency, the lens is controlled to change its transmittance according to the first frequency, and the light wave of the first flashing light source is opposite in phase to the change waveform of the transmittance of the lens.
5. The method according to claim 4, characterized in that The light wave information includes the brightness value of the emitted light of the first flashing light source at each moment in a single cycle; the controlling the lens to change the light transmittance according to the first frequency according to the first frequency includes: Setting a first light transmittance of the lens at a first moment in the single cycle; According to the relationship between the first brightness value of the emitted light of the first flashing light source at the first moment and the first light transmittance, the brightness value of the first flashing light source at each moment in the single cycle is converted into the second light transmittance of the lens at each moment in the single cycle; According to the second light transmittance at each moment in the single cycle, the lens is controlled to periodically change the light transmittance of the lens.
6. The method according to claim 1, characterized in that The method further comprises: When a second flashing light source also appears in the shooting scene, obtaining a first period of the light wave of the first flashing light source and a second period of the light wave of the second flashing light source; Calculating an exposure time interval according to the ambient light brightness value of the shooting scene collected by the sensor; Among the first period, the integer multiple value of the first period, the second period and the integer multiple value of the second period, if the second period exists, or a target integer multiple value of the second period is within the exposure time interval, the target integer multiple value is used as the exposure time.
7. A photographing device, characterized in that: The device comprises: An acquisition module, configured to acquire light wave information of a first flashing light source when the first flashing light source appears in the shooting scene; A control module, used for controlling the light emitting element to emit light according to the light wave information of the first flashing light source, wherein the light emitted by the light emitting element is used to compensate for the first flashing light source; The adjustment module is used to adjust the light transmittance of the lens in the lens according to the light wave information of the first flashing light source, and there is a negative correlation between the brightness value of the output light of the first flashing light source and the light transmittance of the lens.
8. The device according to claim 6, characterized in that The light wave information includes a first frequency and phase of the output light of the first flashing light source; the control module is also used to control the light emitting component to emit light according to the first frequency, and the light wave of the output light of the first flashing light source is opposite in phase to the light wave of the output light of the light emitting component.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 6 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 6 are implemented.