Aperture control method and image pickup apparatus

文档序号:1712062 发布日期:2019-12-13 浏览:22次 中文

阅读说明:本技术 光圈控制方法及摄像设备 (Aperture control method and image pickup apparatus ) 是由 田仁富 刘刚 曾峰 于 2018-05-18 设计创作,主要内容包括:本发明公开了一种光圈控制方法及摄像设备,属于摄像技术领域。本发明提供的方法,当亮度属于目标亮度范围时,会基于目标占空比控制光圈处于平衡状态,由于光圈的通光孔径的大小保持不变,则进光量稳定,从而保证拍摄画面的亮度稳定,避免实时动态调整光圈而导致的曝光震荡问题。(The invention discloses an aperture control method and camera equipment, and belongs to the technical field of camera shooting. According to the method provided by the invention, when the brightness belongs to the target brightness range, the aperture is controlled to be in a balanced state based on the target duty ratio, and the light inlet quantity is stable because the size of the clear aperture of the aperture is kept unchanged, so that the brightness of a shot picture is ensured to be stable, and the problem of exposure oscillation caused by real-time dynamic adjustment of the aperture is avoided.)

1. an aperture control method, characterized in that the method comprises:

acquiring a target duty ratio of a driving signal;

acquiring the brightness of a currently shot frame;

when the brightness is in a target brightness range, the aperture is controlled to be in a balanced state through a driving signal with the duty ratio being the target duty ratio, and the balanced state is a state that the size of the clear aperture of the aperture is kept unchanged.

2. the method of claim 1, wherein obtaining the target duty cycle of the drive signal comprises:

and carrying out weighted summation on at least one historical duty ratio to obtain the target duty ratio, wherein the weight of each historical duty ratio is in positive correlation with the corresponding historical holding time length, and the historical holding time length refers to the time length of keeping the brightness unchanged when the aperture is controlled based on the corresponding historical duty ratio.

3. The method of claim 2, further comprising:

starting timing when the diaphragm starts to be controlled by the driving signal with the duty ratio being the target duty ratio;

When the brightness changes, acquiring the recorded duration;

and storing the target duty ratio as a historical duty ratio, and storing the recorded duration as a historical holding duration corresponding to the historical duty ratio.

4. The method according to claim 1, wherein after acquiring the brightness of the currently captured frame, the method further comprises:

when the brightness is smaller than the minimum value of the target brightness range, acquiring a first duty ratio of a driving signal, wherein the first duty ratio is smaller than a target duty ratio;

And controlling the aperture to be opened to be large through a driving signal with the duty ratio being the first duty ratio.

5. The method of claim 4, wherein obtaining the first duty cycle of the drive signal comprises:

And acquiring the first duty ratio according to a first brightness difference, wherein the first brightness difference refers to the difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the first duty ratio is in negative correlation with the first brightness difference.

6. The method of claim 4, wherein obtaining the first duty cycle of the drive signal comprises:

And acquiring the first duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture, and the first duty ratio is positively correlated with the second brightness difference.

7. the method of claim 6, wherein obtaining the first duty cycle according to the second brightness gap comprises:

Determining a time factor according to the second brightness difference;

acquiring the first duty ratio according to the time factor, wherein the first duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

8. The method according to claim 1, wherein after acquiring the brightness of the currently captured frame, the method further comprises:

when the brightness is larger than the maximum value of the target brightness range, acquiring a second duty ratio of a driving signal, wherein the second duty ratio is larger than the target duty ratio;

And controlling the aperture to be closed down through the driving signal with the duty ratio of the second duty ratio.

9. the method of claim 8, wherein obtaining the second duty cycle of the drive signal comprises:

and acquiring the second duty ratio according to a first brightness difference, wherein the first brightness difference refers to the difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the second duty ratio is positively correlated with the first brightness difference.

10. the method of claim 8, wherein obtaining the second duty cycle of the drive signal comprises:

And acquiring the second duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture, and the second duty ratio is positively correlated with the second brightness difference.

11. The method of claim 10, wherein obtaining the second duty cycle according to the second brightness gap comprises:

determining a time factor according to the second brightness difference;

Acquiring the second duty ratio according to the time factor, wherein the second duty ratio is positively correlated with the time factor;

The time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

12. The method of claim 1, further comprising:

starting timing when the diaphragm starts to be controlled by the driving signal with the duty ratio being the target duty ratio;

when the brightness changes, if the recorded duration does not reach the preset duration, adjusting the target duty ratio to obtain the adjusted target duty ratio;

And adjusting the duty ratio of the driving signal to the adjusted target duty ratio, and restarting timing until the time length for which the brightness is kept unchanged reaches the preset time length under the current adjusted target duty ratio.

13. the method of claim 12, wherein the adjusting the target duty cycle comprises:

increasing the target duty cycle when the brightness is greater than a maximum value of the target brightness range; or the like, or, alternatively,

when the brightness is less than the minimum value of the target brightness range, the target duty cycle is decreased.

14. An image capturing apparatus, characterized in that the image capturing apparatus comprises a processor, a memory, and an aperture, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the operations performed by the aperture control method according to any one of claims 1 to 13.

Technical Field

the invention relates to the technical field of camera shooting, in particular to a diaphragm control method and camera shooting equipment.

Background

The aperture stop is a device for controlling the amount of light received by a photosensitive element in an image pickup apparatus, and is usually a hole-shaped aperture stop with a variable size, which is located inside a lens. By controlling the aperture, the clear aperture of the aperture can be adjusted, thereby adjusting the brightness of the currently photographed picture, for example, by controlling the aperture to be opened to be large to increase the brightness, and by controlling the aperture to be closed to be small to decrease the brightness.

at present, the camera device dynamically adjusts the aperture in real time to ensure that the brightness of the currently photographed picture infinitely approaches the target brightness set by the user: in the process that the camera device controls the aperture, the camera device collects the brightness of a frame of picture shot at present in real time, based on the brightness and target brightness preset by a user, the brightness difference between the brightness and the target brightness is calculated, based on the brightness difference and a linear mapping relation between the preset brightness difference and a voltage value, a voltage value corresponding to the brightness difference is inquired, and the clear aperture of the aperture is controlled to move continuously based on the voltage value, so that the size of the clear aperture of the aperture dynamically approaches the size of the clear aperture corresponding to the target brightness.

In the process of implementing the invention, the inventor finds that the related art has at least the following problems:

In the process of controlling the aperture, exposure is not easy to be stable, and exposure oscillation often occurs, so that the currently shot picture is dim and bright.

Disclosure of Invention

the embodiment of the invention provides an aperture control method and camera equipment, which can solve the problem that exposure oscillation often occurs in the aperture control process in the related technology. The technical scheme is as follows:

In one aspect, a method for controlling an aperture is provided, the method comprising:

Acquiring a target duty ratio of a driving signal;

acquiring the brightness of a currently shot frame;

when the brightness is in a target brightness range, the aperture is controlled to be in a balanced state through a driving signal with the duty ratio being the target duty ratio, and the balanced state is a state that the size of the clear aperture of the aperture is kept unchanged.

Optionally, the obtaining the target duty ratio of the driving signal includes:

And carrying out weighted summation on at least one historical duty ratio to obtain the target duty ratio, wherein the weight of each historical duty ratio is in positive correlation with the corresponding historical holding time length, and the historical holding time length refers to the time length of keeping the brightness unchanged when the aperture is controlled based on the corresponding historical duty ratio.

Optionally, the method further comprises:

Starting timing when the diaphragm starts to be controlled by the driving signal with the duty ratio being the target duty ratio;

when the brightness changes, acquiring the recorded duration;

and storing the target duty ratio as a historical duty ratio, and storing the recorded duration as a historical holding duration corresponding to the historical duty ratio.

optionally, after acquiring the brightness of the currently captured frame of picture, the method further includes:

When the brightness is smaller than the minimum value of the target brightness range, acquiring a first duty ratio of a driving signal, wherein the first duty ratio is smaller than a target duty ratio;

and controlling the aperture to be opened to be large through a driving signal with the duty ratio being the first duty ratio.

Optionally, the obtaining the first duty cycle of the driving signal includes:

And acquiring the first duty ratio according to a first brightness difference, wherein the first brightness difference refers to the difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the first duty ratio is in negative correlation with the first brightness difference.

optionally, the obtaining the first duty cycle of the driving signal includes:

And acquiring the first duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture, and the first duty ratio is positively correlated with the second brightness difference.

Optionally, the obtaining the first duty ratio according to the second brightness difference includes:

determining a time factor according to the second brightness difference;

acquiring the first duty ratio according to the time factor, wherein the first duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

optionally, after acquiring the brightness of the currently captured frame of picture, the method further includes:

When the brightness is larger than the maximum value of the target brightness range, acquiring a second duty ratio of a driving signal, wherein the second duty ratio is larger than the target duty ratio;

and controlling the aperture to be closed down through the driving signal with the duty ratio of the second duty ratio.

Optionally, the obtaining the second duty cycle of the driving signal includes:

and acquiring the second duty ratio according to a first brightness difference, wherein the first brightness difference refers to the difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the second duty ratio is positively correlated with the first brightness difference.

Optionally, the obtaining the second duty cycle of the driving signal includes:

And acquiring the second duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture, and the second duty ratio is positively correlated with the second brightness difference.

optionally, the obtaining the second duty ratio according to the second brightness difference includes:

determining a time factor according to the second brightness difference;

Acquiring the second duty ratio according to the time factor, wherein the second duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

Optionally, the method further comprises:

Starting timing when the diaphragm starts to be controlled by the driving signal with the duty ratio being the target duty ratio;

when the brightness changes, if the recorded duration does not reach the preset duration, adjusting the target duty ratio to obtain the adjusted target duty ratio;

and adjusting the duty ratio of the driving signal to the adjusted target duty ratio, and restarting timing until the time length for which the brightness is kept unchanged reaches the preset time length under the current adjusted target duty ratio.

Optionally, the adjusting the target duty cycle includes:

Increasing the target duty cycle when the brightness is greater than a maximum value of the target brightness range; or the like, or, alternatively,

when the brightness is less than the minimum value of the target brightness range, the target duty cycle is decreased.

In another aspect, there is provided an aperture control apparatus, the apparatus including:

the acquisition module is used for acquiring a target duty ratio of the driving signal;

the acquisition module is also used for acquiring the brightness of a currently shot frame;

And the control module is used for controlling the aperture to be in a balanced state through the driving signal with the duty ratio being the target duty ratio when the brightness is in the target brightness range, wherein the balanced state is a state that the size of the clear aperture of the aperture is kept unchanged.

Optionally, the obtaining module is further configured to perform weighted summation on at least one historical duty cycle to obtain the target duty cycle, where a weight of each historical duty cycle is positively correlated with a corresponding historical holding time, and the historical holding time is a time during which brightness is kept unchanged when the aperture is controlled based on the corresponding historical duty cycle.

Optionally, the apparatus further comprises:

The timing module is used for starting timing when the diaphragm is controlled by the driving signal with the duty ratio being the target duty ratio;

the acquisition module is further used for acquiring the recorded duration when the brightness changes;

and the storage module is used for storing the target duty ratio as a historical duty ratio and storing the recorded duration as a historical holding duration corresponding to the historical duty ratio.

Optionally, the obtaining module is further configured to obtain a first duty ratio of the driving signal when the brightness is smaller than the minimum value of the target brightness range, where the first duty ratio is smaller than a target duty ratio;

the control module is further configured to control the aperture to be opened wide through a driving signal with a duty ratio of the first duty ratio.

Optionally, the obtaining module is further configured to obtain the first duty ratio according to a first brightness difference, where the first brightness difference is a difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the first duty ratio is negatively correlated to the first brightness difference.

Optionally, the obtaining module is further configured to obtain the first duty ratio according to a second brightness difference, where the second brightness difference is a difference between the brightness and the brightness of the previous frame of picture, and the first duty ratio is positively correlated with the second brightness difference.

Optionally, the obtaining module includes:

A determining submodule for determining a time factor based on the second luminance difference;

the obtaining submodule is used for obtaining the first duty ratio according to the time factor, and the first duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

optionally, the obtaining module is further configured to obtain a second duty ratio of the driving signal when the brightness is greater than the maximum value of the target brightness range, where the second duty ratio is greater than the target duty ratio;

the control module is further configured to control the aperture to be closed or closed according to a driving signal with the second duty ratio.

Optionally, the obtaining module is further configured to obtain the second duty ratio according to a first brightness difference, where the first brightness difference is a difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the second duty ratio is positively correlated to the first brightness difference.

Optionally, the obtaining module is further configured to obtain the second duty ratio according to a second brightness difference, where the second brightness difference is a difference between the brightness and the brightness of the previous frame of picture, and the second duty ratio is positively correlated to the second brightness difference.

Optionally, the obtaining module includes:

a determining submodule for determining a time factor according to the second brightness difference;

the obtaining submodule is used for obtaining the second duty ratio according to the time factor, and the second duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

Optionally, the apparatus further comprises:

the timing module is used for starting timing when the diaphragm is controlled by the driving signal with the duty ratio being the target duty ratio;

The adjusting module is used for adjusting the target duty ratio to obtain the adjusted target duty ratio if the recorded duration does not reach the preset duration every time the brightness changes; adjusting the duty cycle of the driving signal to the adjusted target duty cycle;

the timing module is further configured to restart timing until a duration in which the brightness is kept unchanged reaches a preset duration under the current adjusted target duty cycle.

Optionally, the adjusting module is further configured to:

Increasing the target duty cycle when the brightness is greater than a maximum value of the target brightness range; or the like, or, alternatively,

When the brightness is less than the minimum value of the target brightness range, the target duty cycle is decreased.

In another aspect, an image capturing apparatus is provided, which includes a processor, a memory, and an aperture, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement an operation performed by the aperture control method described above.

In another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed by the above-mentioned aperture control method.

The technical scheme provided by the embodiment of the invention has the following beneficial effects:

According to the aperture control method, the aperture control device, the camera equipment and the storage medium provided by the embodiment of the invention, when the brightness belongs to the target brightness range, the aperture is controlled to be in a balanced state based on the target duty ratio, and the light incoming quantity is stable because the size of the clear aperture of the aperture is kept unchanged, so that the brightness of a shot picture can be ensured to be stable, and the problem of exposure oscillation caused by real-time dynamic adjustment of the aperture is avoided.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

fig. 1 is a flowchart of an aperture control method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a duty cycle axis provided by an embodiment of the present invention;

FIG. 3 is a system diagram of an aperture control method according to an embodiment of the present invention;

FIG. 4 is a flowchart of a method for controlling an aperture according to an embodiment of the present invention;

FIG. 5 is a flowchart of a method for controlling an aperture according to an embodiment of the present invention;

FIG. 6 is a flowchart of a method for controlling an aperture according to an embodiment of the present invention;

FIG. 7 is a flowchart of a method for controlling an aperture according to an embodiment of the present invention;

FIG. 8 is a flowchart of a method for controlling an aperture according to an embodiment of the present invention;

fig. 9 is a schematic structural diagram of an aperture control apparatus according to an embodiment of the present invention;

Fig. 10 is a schematic structural diagram of an image pickup apparatus provided in an embodiment of the present invention.

Detailed Description

the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

for convenience of understanding, terms referred to in the embodiments of the present disclosure are explained below:

Aperture: the aperture stop is a member for controlling the amount of light received by a photosensitive element in an image pickup apparatus, and is usually a variable-size aperture stop located inside a lens. The direct-current (hereinafter referred to as DC) aperture is an aperture controlled by voltage, the size of the clear aperture of the DC aperture has no feedback value and no step control mechanism, and the image pickup apparatus cannot sense the size and change of the clear aperture of the aperture, and can determine the change of the clear aperture only by the brightness of the currently-photographed image, thereby performing fuzzy control such as opening and closing the aperture.

Auto Exposure (AE): the automatic exposure is a function that the exposure amount is automatically adjusted according to the intensity of the current light by the camera equipment, and the overexposure or the underexposure can be prevented through the automatic exposure, so that the shot image can reach proper brightness. The mode of the image pickup device for automatic exposure comprises a shutter control, a gain adjustment and a diaphragm control, wherein the mode of the diaphragm control refers to a process of controlling the light transmission quantity by changing the size of the light transmission aperture of the diaphragm so as to realize automatic exposure.

exposure oscillation: this means that the exposure cannot be converged (the exposure is unstable), and the photographed image is blurred.

Duty ratio: it refers to the ratio of the power-on time of the pulse signal to the power-on period. In an ideal train of pulse periods (e.g., a square wave), the duty cycle is the ratio of the duration of a positive pulse to the total period of the pulse. In the process of controlling the DC aperture, the processor generates a Pulse Width Modulation (PWM) wave according to a duty ratio, transmits the PWM wave to the driving module, and the driving module receives the PWM wave, converts the PWM wave into a voltage value, and drives the aperture based on the voltage value to open or close the aperture. The voltage value is the power for driving the aperture, and the size of the duty ratio determines the size of the voltage value converted by the PWM wave, thereby determining whether the aperture can be opened or closed, and the strength of the opening operation or the closing operation.

Balance point (target duty ratio): in the concept introduced in this embodiment, the balance point refers to a duty ratio at which the diaphragm exists in the PWM wave driving mode, in which the size of the diaphragm clear aperture is kept constant, and at any duty ratio on the left side of the balance point (smaller than the balance point), the diaphragm is in an open state, and the farther from the balance point, the larger the diaphragm opening force. At any duty cycle to the right of the equilibrium point (greater than this duty cycle), the aperture will be in a closed state, with the more distant from the equilibrium point, the greater the force with which the aperture is closed.

Balance point shift: the phenomenon that the actual balance point of the diaphragm is inconsistent with the theoretically calculated balance point is caused by the difference of the diaphragm, a driving circuit, a driving chip and other hardware.

first luminance difference: refers to the difference between the luminance and the target luminance.

Second luminance difference: which is the difference between the luminance and the luminance of the previous frame.

Luminance factor (y factor, yF): a factor, which is selectable when controlling the aperture, can be seen as a duty cycle. The brightness factor may be determined according to a difference between the brightness of the currently captured frame of picture and the target brightness, for example, the brightness factor may be positively correlated with the difference between the brightness of the currently captured frame of picture and the target brightness.

Time factor (tF): a factor, which is selectable when controlling the aperture, can be seen as a duty cycle. In the process of controlling the aperture to be opened or closed, the force for driving the aperture may be insufficient, which results in too slow speed of brightness change, and the force for driving the aperture may also be too large, which results in too fast speed of brightness change. In order to ensure the proper speed of brightness change and avoid the phenomenon of overexposure or over-darkness, the duty ratio can be adjusted by combining with a time factor in the process of controlling the aperture so as to ensure the proper force for driving the aperture and achieve the effect of uniform brightness change.

Micro-balancing: it refers to a stage of keeping the balance point constant and a stage of slightly adjusting the balance point. In the micro-balance stage, the exposure is basically stable, and the machine can sense that the brightness of the current picture is stable without obvious oscillation. In the micro-balance stage, when the balance point is slightly adjusted, the time length of the constant brightness at the balance point is recorded, and the balance point of the control aperture at the next entry into the micro-balance stage can be calculated by adopting the time length weight.

Coarse balancing: this is a stage of adjusting the balance point to a large extent. If the diaphragm cannot be stable for a long time after being started, the deviation between the calculated balance point and the actual balance point of the diaphragm is large, the camera equipment enters a rough balance stage, and the balance point is adjusted greatly, so that the actual balance point of the diaphragm is found in the adjusting process, and the normal control of the diaphragm is ensured.

fig. 1 is a flowchart of an aperture control method according to an embodiment of the present invention, and referring to fig. 1, the method includes:

101. And acquiring the target duty ratio of the driving signal.

102. And acquiring the brightness of a frame of currently shot picture.

103. When the brightness is in the target brightness range, the aperture is controlled to be in a balanced state by the driving signal with the duty ratio as the target duty ratio, wherein the balanced state is a state that the size of the clear aperture of the aperture is kept unchanged.

According to the method provided by the embodiment, when the brightness belongs to the target brightness range, the aperture is controlled to be in a balanced state based on the target duty ratio, and as the size of the clear aperture of the aperture is kept unchanged, the brightness of a shot picture can be ensured to be stable, and the problem of exposure oscillation caused by real-time dynamic adjustment of the aperture is avoided.

optionally, the obtaining the target duty ratio of the driving signal includes:

and carrying out weighted summation on at least one historical duty ratio to obtain the target duty ratio, wherein the weight of each historical duty ratio is in positive correlation with the corresponding historical holding time length, and the historical holding time length refers to the time length of keeping the brightness unchanged when the aperture is controlled based on the corresponding historical duty ratio.

Optionally, the method further comprises:

Starting timing when the diaphragm is started to be controlled by the driving signal with the duty ratio being the target duty ratio;

when the brightness changes, the recorded duration is obtained;

And storing the target duty ratio as a historical duty ratio, and storing the recorded duration as a historical holding duration corresponding to the historical duty ratio.

optionally, after acquiring the brightness of the currently captured frame of picture, the method further includes:

When the brightness is smaller than the minimum value of the target brightness range, acquiring a first duty ratio of a driving signal, wherein the first duty ratio is smaller than a target duty ratio;

The aperture is controlled to be opened by a driving signal with a duty ratio of the first duty ratio.

optionally, the obtaining the first duty cycle of the driving signal includes:

The first duty ratio is obtained according to a first brightness difference, wherein the first brightness difference refers to a difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the first duty ratio is inversely related to the first brightness difference.

Optionally, the obtaining the first duty cycle of the driving signal includes:

And acquiring the first duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame, and the first duty ratio is positively correlated with the second brightness difference.

optionally, the obtaining the first duty ratio according to the second brightness difference includes:

Determining a time factor according to the second brightness difference;

obtaining the first duty ratio according to the time factor, wherein the first duty ratio is positively correlated with the time factor;

The time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

optionally, after acquiring the brightness of the currently captured frame of picture, the method further includes:

when the brightness is larger than the maximum value of the target brightness range, acquiring a second duty ratio of the driving signal, wherein the second duty ratio is larger than the target duty ratio;

and controlling the aperture to be closed down by the driving signal with the duty ratio of the second duty ratio.

Optionally, the obtaining the second duty cycle of the driving signal includes:

And acquiring the second duty ratio according to a first brightness difference, wherein the first brightness difference refers to the difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the second duty ratio is positively correlated with the first brightness difference.

optionally, the obtaining the second duty cycle of the driving signal includes:

and acquiring the second duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture, and the second duty ratio is positively correlated with the second brightness difference.

optionally, the obtaining the second duty ratio according to the second brightness difference includes:

determining a time factor according to the second brightness difference;

obtaining the second duty ratio according to the time factor, wherein the second duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

optionally, the method further comprises:

starting timing when the diaphragm is started to be controlled by the driving signal with the duty ratio being the target duty ratio;

When the brightness changes, if the recorded duration does not reach the preset duration, adjusting the target duty ratio to obtain the adjusted target duty ratio;

and adjusting the duty ratio of the driving signal to the adjusted target duty ratio, and restarting timing until the time length for which the brightness is kept unchanged reaches the preset time length under the current adjusted target duty ratio.

Optionally, the adjusting the target duty cycle includes:

Increasing the target duty cycle when the brightness is greater than the maximum value of the target brightness range; or the like, or, alternatively,

the target duty cycle is decreased when the brightness is less than the minimum value of the target brightness range.

In this embodiment, the process of controlling the aperture is mainly divided into three processes of controlling the aperture to be opened and closed, controlling the aperture to be closed and controlling the aperture to be in a balanced state. In the process of controlling the aperture to be opened to be large, the clear aperture of the aperture becomes large, the quantity of light entering the image pickup apparatus increases, and the brightness of the currently photographed picture also increases. In the process of controlling the aperture to be closed, the clear aperture of the aperture becomes smaller, the light quantity entering the camera equipment is correspondingly reduced, and the brightness of the current shot picture is reduced. In the process of controlling the diaphragm to be in the equilibrium state, the size of the clear aperture of the diaphragm is kept constant, the amount of light entering the image pickup apparatus is constant, and the brightness is also constant.

the core of controlling the aperture is the duty cycle. This is because the principle of controlling the aperture is: the camera device determines a duty ratio with a certain size, generates a driving signal according to the duty ratio, and sends the driving signal to the driving module, the driving module converts a driving signal wave into a voltage value, the voltage value can drive a motor connected with the aperture, and the motor can drive the aperture to move, so that the aperture is opened or closed or a balanced state is kept. The magnitude of the duty ratio determines the magnitude of the voltage value converted by the pwm wave, and thus determines the strength of operations such as opening, closing and maintaining the aperture.

in combination with the principle of controlling the aperture and the characteristics of the aperture, the inventors took five points on the duty axis, which is an axis made up of a series of values from the minimum value of the duty to the maximum value of the duty, as shown in fig. 2, b, min, max, pC, pO, respectively. The direction of the duty ratio shaft towards the left is the direction of opening the aperture, and the direction of the duty ratio shaft towards the right is the direction of closing the aperture.

b represents the target duty cycle, which can be the balance point of the aperture. When the duty ratio of the driving signal is b, the diaphragm is in a balanced state under the action of the driving signal, the size of the clear aperture is kept unchanged, and the exposure is stable. The left side of b on the duty ratio axis is the opening direction, the more left, the larger the aperture opening force is, and the aperture opening force reaches the maximum at the minimum value min of the duty ratio. The right side of b on the duty ratio axis is the closing direction, the more the right side is, the more the aperture closing force is, and the maximum aperture closing force reaches the maximum at the maximum value max of the duty ratio.

pO represents the duty ratio at which the aperture can be controlled to be just opened, when the duty ratio of the driving signal belongs to the interval formed by b and pO, the aperture will be opened greatly under the action of the driving signal, but the opening speed is very slow, the speed of the picture brightening is also very slow, the brightness of the picture will not be obviously sensed by the machine, and when the duty ratio of the aperture is controlled to be at pO, the picture brightening reaches the degree that the machine can sense. In this embodiment, a difference between the balance point and the preset offset may be calculated, and the difference may be used as pO. The preset offset can be determined according to actual requirements, 5% of the total length of the duty ratio shaft can be taken as the preset offset, and then pO is b-5% (max-min). The position of pO may be affected by the position of the equilibrium point, and when the equilibrium point (target duty ratio) moves, pO may move accordingly with the movement of the equilibrium point.

pC represents the duty ratio at which the aperture can be controlled to be turned off, when the duty ratio of the driving signal belongs to the interval formed by b and pC, the aperture can be turned off under the action of the driving signal, but the turning-off speed is very slow, the speed of the picture becoming dark is also very slow, the machine can not sense the reduction of brightness obviously, and when the duty ratio of the aperture is controlled to be at pC, the picture becomes dark to the extent that the machine can sense. In this embodiment, a sum of the balance point and the preset offset may be calculated, and the sum may be referred to as pC. The preset offset can be determined according to actual requirements, and 5% of the total length of the duty ratio shaft can be taken as the preset offset, so that pC is b + 5% (max-min). The position of pC is affected by the position of the equilibrium point, and when the equilibrium point moves, pC moves accordingly with the movement of the equilibrium point.

Referring to fig. 3, which shows a system frame diagram of a method for controlling an aperture according to an embodiment of the present invention, the method for controlling an aperture may be implemented by combining various processes such as a micro-balancing process, an aperture opening process, an aperture closing process, an abnormality detection process, and a coarse balancing process: when the brightness of the current shot picture is too low, a large aperture is opened until the brightness rises to the target brightness range, and then a micro-balance process is carried out. When the brightness of the current shot picture is too high, the aperture is closed down until the brightness is reduced to the target brightness range, and then the micro-balance process is carried out. In the micro-balancing process, the aperture is controlled to keep a balanced state through the driving signal with the target duty ratio. Meanwhile, abnormality detection can be carried out in the process of controlling the aperture, and if abnormality is detected, a coarse balancing process is carried out, so that the target duty ratio is adjusted greatly.

The specific steps of the above processes are specifically described below by the embodiment of fig. 4. The process of opening the aperture is detailed in steps 402-403, the process of closing the aperture is detailed in steps 404-405, and the process of controlling the aperture to keep a balanced state is detailed in steps 406-407.

fig. 4 is a flowchart of a diaphragm control method according to an embodiment of the present invention, where an execution subject of the method is an image capturing apparatus, and referring to fig. 4, the method includes:

401. the image pickup apparatus acquires the brightness of a currently photographed frame.

The camera device can acquire the brightness of a currently shot frame of picture in real time after starting the aperture so as to control the aperture according to the brightness of the current picture. The image pickup apparatus may acquire a luminance value of each pixel in a frame of a currently photographed image, calculate an average value of the luminance of the pixels in the image from the luminance value of each pixel, and take the average value as the luminance of the frame of the image.

When the brightness of the currently shot picture is obtained, the image pickup apparatus compares the brightness with the target brightness range, and when the brightness is determined to be smaller than the minimum value of the target brightness range, the following steps 402 to 403 are performed, when the brightness is determined to be larger than the maximum value of the target brightness range, the following steps 404 to 405 are performed, and when the brightness is determined to belong to the target brightness range, the following steps 406 to 407 are performed.

The target brightness range is an interval in which the control brightness falls in the process of adjusting the aperture, and the target brightness range is a standard for judging whether the brightness meets the requirement or not. When the brightness belongs to the target brightness range, the brightness is considered to be close to the target brightness enough, the machine cannot easily perceive the difference between the brightness and the target brightness, at the moment, the aperture is adjusted again, the actual significance is not achieved, the exposure oscillation problem is easily caused, and therefore the aperture is controlled to be in a balanced state, and the aperture is not driven to open or close the clear aperture any more. When the brightness is less than the minimum value of the target brightness range, the current shot picture is considered to be too dark, so the aperture is controlled to be opened to increase the brightness to belong to the target brightness range, and when the brightness is greater than the maximum value of the target brightness range, the current shot picture is considered to be too bright, the aperture is controlled to be closed to decrease the brightness to belong to the target brightness range.

in one possible implementation, the target brightness range may be a range determined according to the target brightness and the preset span, for example, a median of the target brightness range is the target brightness, a minimum of the target brightness range is a difference between the target brightness and the preset span, and a maximum of the target brightness range is a sum of the target brightness and the preset span. The target brightness and the preset span can be set according to experience, business requirements or user customization. For example, the target brightness may be regarded as the brightness that the user wants the current picture to achieve, and is preset by the user, and the preset span is determined according to the service requirement, for example, when the required precision is high, the preset range is set to be smaller.

402. the image pickup apparatus acquires a first duty ratio of the drive signal, which is smaller than a target duty ratio.

when the brightness is smaller than the minimum value of the target brightness range, indicating that the current picture is too dark, the image pickup device controls the aperture to be opened by a driving signal with a certain duty ratio.

For the sake of description, the duty ratio used when the control aperture is opened is referred to herein as a first duty ratio. Since the left side of the target duty ratio on the duty axis is the opening direction, the image pickup apparatus takes a duty ratio smaller than the target duty ratio as the first duty ratio to control the aperture to be opened by the drive signal of the first duty ratio. For example, referring to fig. 2, a point may be taken as the first duty ratio on the left side of pO on the duty ratio axis.

with respect to specific implementations of obtaining the first duty cycle, the following three implementations are provided herein:

the first mode is that the camera device acquires a first duty ratio according to the first brightness difference.

First luminance difference: refers to a difference between the luminance and the target luminance, which belongs to the target luminance range, and may include a median of the target luminance range, a minimum of the target luminance range, or a maximum of the target luminance range, and the like. Regarding the process of acquiring the first luminance difference, in the process of controlling the aperture, the image pickup apparatus may acquire a difference between the luminance and the target luminance from the luminance and the target luminance to obtain the first luminance difference, and may calculate an absolute value of a difference between the luminance and the target luminance, for example, as the first luminance difference.

Regarding the process of obtaining the first duty ratio according to the first brightness difference, the magnitude of the first duty ratio may be negatively correlated with the first brightness difference, i.e., the larger the difference between the brightness and the target brightness, the larger the first duty ratio. In a possible implementation, a mapping relationship between the first brightness difference and the first duty ratio may be established in advance, where the mapping relationship may be a negative correlation relationship, and the image capturing apparatus may query the mapping relationship according to the first brightness difference to obtain the first duty ratio corresponding to the first brightness difference.

Optionally, a luminance factor may be introduced for the first luminance difference, a corresponding luminance factor may be determined according to the first luminance difference, and then the first duty ratio is obtained according to the luminance factor. Wherein the magnitude of the luminance factor is positively correlated with the first luminance difference. In a possible implementation, a mapping relationship between the first luminance difference and the luminance factor may be established in advance, the image capturing apparatus may query the mapping relationship based on the first luminance difference to obtain a luminance factor corresponding to the first luminance difference, and then obtain the first duty ratio according to the luminance factor and the pO.

For example, the image pickup apparatus may calculate the first duty ratio by applying the following equation: where F denotes the first duty cycle, pO denotes the first balance offset point, and yF denotes the luminance factor, see fig. 2, the first duty cycle may be to the left of pO on the duty cycle axis.

in this mode, because the dynamics of opening big diaphragm has been decided to the size of first duty cycle, at the in-process of control diaphragm, through combining the difference between luminance and the target brightness, confirm the target duty cycle, can guarantee to open the dynamics of big diaphragm suitable to it is appropriate to guarantee that the speed that the diaphragm opened big is appropriate: when the brightness is larger than the target brightness, the first duty ratio is smaller, and referring to fig. 2, on the duty ratio axis, the first duty ratio is on the left side of the equilibrium point and tends to the left, the force for opening the large aperture is larger, so that the aperture is opened quickly, and the brightness reaches the target brightness as soon as possible. Similarly, when the brightness is smaller than the target brightness, the first duty ratio is larger, and referring to fig. 2, on the duty ratio axis, the first duty ratio is on the left side of the equilibrium point and tends to the right, the force for opening the aperture is smaller, so that the aperture is slowly opened, and the over-brightness adjustment is prevented.

And secondly, the camera device acquires the first duty ratio according to the second brightness difference.

The second brightness difference refers to a difference between the brightness and the brightness of the previous frame, and regarding the process of obtaining the second brightness difference, in the process of controlling the aperture, the image capturing apparatus may obtain a difference between the brightness and the brightness of the previous frame according to the brightness and the brightness of the previous frame, to obtain the second brightness difference, for example, an absolute value of a difference between the brightness and the brightness of the previous frame may be calculated, and the absolute value may be used as the second brightness difference.

Regarding the process of obtaining the first duty ratio according to the second brightness difference, the magnitude of the first duty ratio may be positively correlated with the second brightness difference, that is, the larger the difference between the brightness and the brightness of the previous frame is, the larger the first duty ratio is. In a possible implementation, a mapping relationship between the second brightness difference and the second duty ratio may be established in advance, the mapping relationship may be a positive correlation, and the image capturing apparatus may query the mapping relationship according to the second brightness difference to obtain the first duty ratio corresponding to the second brightness difference.

Optionally, a time factor may be introduced into the second luminance difference, the time factor may be determined according to the second luminance difference, and then the first duty ratio positively correlated to the time factor may be obtained according to the time factor. Regarding the manner of obtaining the first duty ratio according to the time factor, in a possible implementation, a mapping relationship between the time factor and the first duty ratio may be established in advance, where the mapping relationship may be a positive correlation, and the image capturing apparatus may query the mapping relationship according to the time factor to obtain the first duty ratio corresponding to the time factor.

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold. The time factor can be designed in a form of a piecewise function, and when the brightness changes rapidly, the time factor increases progressively with the lapse of time, and when the brightness changes too slowly, the time factor decreases progressively with the lapse of time.

Regarding the specific process of determining the time factor, in a possible implementation, the time factor may be determined in an iterative manner, and the last time factor calculated may be adjusted according to the current second brightness difference, and the adjusted time factor is used as the current time factor. Specifically, if the current second luminance difference is smaller than the second luminance threshold, the image capturing apparatus increases the last time factor to obtain the current time factor, for example, the last time factor is 10, and if the last time factor is twice as large as 10, the current time factor is 20. Similarly, if the current second brightness difference is greater than the first brightness threshold, the image capturing apparatus decreases the last calculated time factor to obtain the current time factor. For example, if the time factor calculated last time is 10 and is reduced by one time for 10, the time factor calculated this time is 5.

Alternatively, an initial value of the time factor may be set, and the time factor is continuously adjusted according to the current second brightness difference in the process of controlling the aperture. The initial value of the time factor can be determined according to actual requirements and can be 1.

In this mode, because the magnitude of the first duty cycle determines the force for opening the large aperture, in the process of controlling the aperture, the target duty cycle is determined by combining the difference between the brightness of the current picture and the brightness of the previous frame picture, and the force for opening the large aperture can be adjusted, so that the increasing speed of the clear aperture of the aperture is adjusted, the speed of brightness change is ensured to be proper, and the phenomenon of overexposure or over-darkness is avoided:

when the difference between the brightness and the brightness of the previous frame is small, it indicates that the brightness of the currently shot frame is almost unchanged from the brightness of the previous frame, that is, the speed of brightening the currently shot frame is too slow, the first duty ratio is small, and referring to fig. 2, on the duty ratio axis, the process of determining the first duty ratio can be regarded as that the camera device moves the first duty ratio from the left side of the PO to the left side, so that the force for opening the large aperture is large, the aperture is rapidly opened, the aperture opening speed is increased, the brightness rising speed is increased, and the condition that the exposure adjusting time is too long due to the too slow aperture opening speed is avoided.

Similarly, when the difference between the brightness and the brightness of the previous frame is large, it indicates that the brightness of the currently photographed frame changes too much relative to the brightness of the previous frame, that is, the speed of brightening the currently photographed frame is too fast, the first duty ratio is large, and referring to fig. 2, it can be seen that the image capturing apparatus moves the first duty ratio from the left side of the PO to the right side, the force for driving the aperture to open the aperture is reduced, and the speed for opening the aperture to open the aperture is reduced, so that the speed for increasing the brightness is reduced. Ensures that the clear aperture of the aperture is stably enlarged, further ensures that the brightness of the current picture is stably lightened, avoids the condition of exposure oscillation caused by the over-high speed of enlarging the aperture,

And thirdly, the camera device acquires the first duty ratio according to the first brightness difference and the second brightness difference.

the third mode is a combination of the first mode and the second mode, the image capturing apparatus may determine a first brightness difference and a second brightness difference, and obtain a first duty ratio according to the first brightness difference and the second brightness difference, where the magnitude of the first duty ratio is negatively correlated with the first brightness difference and positively correlated with the second brightness difference. In a possible implementation, a mapping relationship between the first brightness difference, the second brightness difference, and the first duty ratio may be established in advance, and the image capturing apparatus may query the mapping relationship according to the first brightness difference and the second brightness difference to obtain the first duty ratio corresponding to the first brightness difference and the second brightness difference.

for example, the image capturing apparatus may calculate the first luminance difference and the second luminance difference by applying the following formulas to obtain the first duty ratio: f ═ pO- (tF + yF), where F denotes the first duty cycle, pO denotes the first balance offset point, tF denotes the time factor, and yF denotes the luminance factor. Referring to fig. 2, the first duty cycle may be to the left of pO on the duty cycle axis.

the first balance offset point (pO) is a difference value between a target duty ratio and a preset offset, and the image pickup device may acquire the target duty ratio, calculate the difference value between the target duty ratio and the preset offset, and obtain the first balance offset point.

403. the image pickup apparatus controls the aperture to be opened large by a drive signal having a duty ratio of a first duty ratio.

For a specific process of controlling the aperture to be opened, the image pickup apparatus may generate a driving signal having a duty ratio of a first duty ratio according to the first duty ratio, and the clear aperture of the aperture may become large by the driving of the driving signal, thereby achieving an effect of opening the aperture. For example, the image pickup apparatus may generate a PWM wave having a first duty ratio, and transmit the PWM wave to the driving module, and the driving module may convert the PWM wave into a voltage value, and the clear aperture of the diaphragm may become large by the driving of the voltage value.

When the aperture is opened to a large size, the amount of light entering increases and the brightness increases, and if the image pickup apparatus determines that the brightness falls within the target brightness range, the process of controlling the aperture to be opened to a large size is stopped, and the process of controlling the aperture based on the target duty ratio is started. And if the image pickup device determines that the brightness still does not belong to the target brightness range, continuing to control the aperture to be opened to be large until the brightness belongs to the target brightness range.

alternatively, the image pickup apparatus may adjust the time factor according to how fast the luminance changes each time the aperture is controlled to be opened, and further determine the first duty ratio again and control the aperture to be opened again according to the adjusted time factor so as to adjust the speed at which the picture becomes bright. Specifically, the process of re-controlling the aperture opening may include the following two designs:

it is designed that (for the case that the speed of the image brightening is too slow), the image pickup apparatus determines whether the second luminance difference is smaller than a first preset threshold value after controlling the aperture to be opened, and increases the time factor when the second luminance difference is smaller than the first preset threshold value. And repeatedly executing the steps of acquiring the first duty ratio and controlling the aperture to be opened to be large based on the increased time factor. Wherein the first preset threshold may be preset by a developer.

For a specific manner of increasing the time factor, the image capturing apparatus may calculate a product of the time factor and a preset multiple, as the increased time factor, where the preset multiple is a positive integer greater than 1, for example, 2. In addition, the image pickup apparatus may also calculate a sum of the time factor and a preset amplitude that is a positive number as the increased time factor.

second, the image capturing apparatus may determine whether the second brightness difference is greater than a second preset threshold after controlling the aperture to be opened, and decrease the time factor when the second brightness difference is greater than the second preset threshold. And repeatedly executing the steps of acquiring the first duty ratio and controlling the aperture to be opened to be large based on the reduced time factor. Wherein the first preset threshold may be preset by a developer.

for a specific manner of reducing the time factor, the image capturing apparatus may calculate a ratio of the time factor to a preset multiple, and take the ratio as the time factor after the reduction, where the preset multiple is a positive integer greater than 1, for example, 2. In addition, the image pickup apparatus may also calculate a difference value between the time factor and a preset amplitude value, which is a positive number, as the reduced time factor.

Alternatively, maximum state detection may be performed during control of the aperture opening: in the process of adjusting the first duty ratio, whether the current duty ratio has reached the minimum duty ratio or not can be judged, when the duty ratio has reached the minimum duty ratio, namely the first duty ratio is at the min position of the duty ratio axis, the opening force of the diaphragm has reached the maximum, the size of the clear aperture of the diaphragm has reached the maximum, at this moment, the first duty ratio does not need to be continuously adjusted, the first duty ratio is set to be the minimum duty ratio, and the diaphragm is controlled based on the minimum duty ratio.

in summary, the above steps 402-403 describe the process of controlling the aperture opening, and referring to fig. 5, which shows a flowchart of the process of controlling the aperture opening, the image pickup apparatus may repeatedly perform the process of acquiring the first duty ratio to control the aperture opening until the luminance belongs to the target luminance range according to the flowchart of fig. 5. Hereinafter, the process of controlling the aperture to be closed is explained by steps 404 to 405.

404. the image pickup apparatus acquires a second duty ratio of the drive signal, the second duty ratio being greater than the target duty ratio.

When the brightness is larger than the maximum value of the target brightness range, indicating that the current picture is too bright, the image pickup device controls the aperture to be closed by a driving signal with a certain duty ratio.

For the sake of description, the duty ratio used when controlling the aperture to be closed is referred to herein as a second duty ratio. Since the right side of the target duty on the duty axis is the off direction, the image pickup apparatus takes a duty larger than the target duty as the second duty. Illustratively, referring to fig. 2, a point may be taken to the right of pC on the duty axis as the second duty.

With respect to specific implementations of obtaining the second duty cycle, the following three implementations are provided herein:

The first method is to obtain the second duty ratio according to a first brightness difference, where the first brightness difference is a difference between the brightness and a target brightness, and the target brightness belongs to a target brightness range.

Regarding the process of obtaining the second duty ratio according to the first brightness difference, the magnitude of the second duty ratio may be positively correlated with the first brightness difference, i.e., the larger the difference between the brightness and the target brightness, the larger the second duty ratio. In a possible implementation, a mapping relationship between the first brightness difference and the second duty ratio may be established in advance, the mapping relationship may be a positive correlation, and the image capturing apparatus may query the mapping relationship according to the first brightness difference to obtain the second duty ratio corresponding to the first brightness difference.

Optionally, a luminance factor may be introduced for the first luminance difference, a corresponding luminance factor may be determined according to the first luminance difference, and then the second duty ratio may be obtained according to the luminance factor. Wherein the magnitude of the luminance factor is positively correlated with the first luminance difference. In a possible implementation, a mapping relationship between the first luminance difference and the luminance factor may be established in advance, the image capturing apparatus may query the mapping relationship based on the first luminance difference to obtain a luminance factor corresponding to the first luminance difference, and then obtain the second duty ratio according to the luminance factor and the pO.

For example, the image pickup apparatus may calculate the second duty ratio by applying the following equation: f ═ pC + yF, where F denotes the second duty cycle, pC denotes the second balance offset point, and yF denotes the luminance factor, see fig. 2, the second duty cycle may be to the right of pC on the duty cycle axis.

In this mode, because the dynamics of closing little diaphragm has been decided to the size of second duty cycle, at the in-process of control diaphragm, through combining the difference between luminance and the target brightness, acquires the second duty cycle, can guarantee to close the dynamics of little diaphragm suitable to guarantee that the speed that the diaphragm closed down is suitable, and then guarantee that the speed that the picture darkens is suitable: when the brightness is larger than the target brightness, the second duty ratio is larger, and referring to fig. 2, on the duty ratio axis, the second duty ratio is on the right side of the equilibrium point and tends to the right, the force for closing the aperture is larger, so that the aperture is quickly closed, and the brightness is reduced to the target brightness as soon as possible. Similarly, when the brightness is smaller than the target brightness, the second duty ratio is smaller, and referring to fig. 2, on the duty ratio axis, the second duty ratio is on the right side of the equilibrium point and tends to the left, the force for opening the large aperture is smaller, so that the aperture is slowly closed, and the excessive dimming is prevented.

And secondly, acquiring a second duty ratio according to a second brightness difference, wherein the second brightness difference refers to the difference between the brightness and the brightness of the previous frame of picture.

the second brightness difference refers to a difference between the brightness and the brightness of the previous frame, and regarding the process of obtaining the second duty ratio according to the second brightness difference, the magnitude of the second duty ratio may be positively correlated with the second brightness difference, that is, the larger the difference between the brightness and the brightness of the previous frame is, the larger the second duty ratio is. In a possible implementation, a mapping relationship between the second brightness difference and the second duty ratio may be established in advance, where the mapping relationship may be a positive correlation, and the image capturing apparatus may query the mapping relationship according to the second brightness difference to obtain the second duty ratio corresponding to the second brightness difference.

Optionally, a time factor may be introduced into the second luminance difference, the time factor may be determined according to the second luminance difference, and then the second duty ratio positively correlated to the time factor may be obtained according to the time factor. Regarding the manner of obtaining the second duty ratio according to the time factor, in a possible implementation, a mapping relationship between the time factor and the second duty ratio may be established in advance, where the mapping relationship may be a positive correlation, and the image capturing apparatus may query the mapping relationship according to the time factor to obtain the second duty ratio corresponding to the time factor.

The specific process of determining the time factor is the same as the step 402, and is not described herein again.

For example, the image pickup apparatus may calculate the second duty ratio according to the following formula: f ═ pC + tF + yF, where F denotes the second duty cycle, pC denotes the second balance offset point, tF denotes the time factor, and yF denotes the luminance factor. Referring to fig. 2, the second duty cycle may be on the right side of pC on the duty cycle axis.

In this mode, because the dynamics of closing the aperture has been decided to the size of second duty cycle, at the in-process of control aperture, through the difference between the luminance that combines current picture and the luminance of last frame picture, confirm the second duty cycle, can adjust the dynamics of closing the aperture, thereby adjust the speed that the clear aperture of aperture diminishes, guarantee that the clear aperture of aperture steadily reduces, and then guarantee that the luminance of current picture steadily darkens, avoid leading to the condition of exposure oscillation because the speed that the aperture closed down is too fast, also avoid leading to the condition of adjusting the time overlength of exposure because the speed that the aperture closed down is too slow.

405. The image pickup apparatus controls the aperture to be closed down by a drive signal having a second duty ratio.

For the specific process of controlling the aperture to be closed down, the image pickup apparatus may generate a driving signal having a duty ratio of the second duty ratio according to the second duty ratio, and the clear aperture of the aperture may become smaller by the driving of the driving signal, thereby achieving the effect of closing down the aperture. For example, the image pickup apparatus may generate a PWM wave having a second duty ratio, and transmit the PWM wave to the driving module, and the driving module may convert the PWM wave into a voltage value, and the clear aperture of the diaphragm may become small by the driving of the voltage value.

When the aperture is closed down, the amount of light entering decreases and the brightness decreases, and if the image pickup apparatus determines that the brightness falls within the target brightness range, the process of controlling the aperture to be closed down is stopped, and the process of controlling the aperture based on the target duty ratio is entered. And if the image pickup equipment determines that the brightness still does not belong to the target brightness range, continuing to control the aperture to be closed down until the brightness belongs to the target brightness range.

alternatively, the image pickup apparatus may adjust the time factor according to how fast the luminance changes each time the aperture is controlled to be closed, and further determine the second duty ratio again and control the aperture to be closed again according to the adjusted time factor so as to adjust the speed at which the screen is darkened. Specifically, the process of re-controlling the aperture to close down may include the following two designs:

Designing one (for the case that the speed of the image darkening is too slow), the image pickup apparatus may determine whether the second brightness difference is smaller than a first preset threshold after controlling the aperture to be closed, and increase the time factor when the second brightness difference is smaller than the first preset threshold. And repeatedly executing the steps of acquiring the second duty ratio and controlling the aperture to be closed down based on the increased time factor.

The process of increasing the time factor in step 405 is the same as the process of increasing the time factor in step 403, and is not described herein again.

In the first design, when the second brightness difference is smaller than the first preset threshold, it indicates that the brightness of the currently photographed picture is almost unchanged from the brightness of the previous frame of picture, that is, the speed at which the currently photographed picture becomes dark is too slow, and then after the time factor is increased, because the second duty ratio is positively correlated with the time factor and the first duty ratio is larger than the second equilibrium offset point, referring to fig. 2, the process of reacquiring the second duty ratio can be regarded as that the camera device moves the second duty ratio from the right side of the PC to the right side, and the force for driving the aperture to be smaller becomes larger accordingly, so that the speed at which the aperture is smaller can be increased, and the speed at which the brightness is decreased is further increased.

second, the image capturing apparatus may determine whether the second brightness difference is greater than a second preset threshold after controlling the aperture to be closed, and decrease the time factor when the second brightness difference is greater than the second preset threshold. And repeatedly executing the steps of acquiring the second duty ratio and controlling the aperture to be closed down based on the reduced time factor.

The process of reducing the time factor in step 405 is the same as the process of reducing the time factor in step 403, and is not described herein again.

in the second design, when the second brightness difference is greater than the second preset threshold, it indicates that the brightness of the currently photographed picture changes too much relative to the brightness of the previous frame of picture, that is, the currently photographed picture becomes too dark slowly, so that after the time factor is increased, since the second duty ratio is positively correlated with the time factor and the first duty ratio is greater than the second balance offset point, referring to fig. 2, repeating the process of the second duty ratio can be regarded as the image pickup apparatus moving the second duty ratio from the right side of the PC to the left, the force for driving the aperture to be small is reduced accordingly, the speed for driving the aperture to be small can be reduced, and further the speed for reducing the brightness.

in summary, the above steps 404 to 405 describe the process of controlling the aperture stop to be closed, and referring to fig. 6, which shows a flowchart of the process of controlling the aperture stop to be closed, the image pickup apparatus may repeatedly execute the process of acquiring the second duty ratio to control the aperture stop to be closed, according to the flowchart of fig. 6, until the luminance belongs to the target luminance range. Hereinafter, a process of controlling the aperture to maintain the balanced state when the luminance belongs to the target luminance range will be described through steps 406 to 407.

406. when the luminance belongs to the target luminance range, the image pickup apparatus acquires a target duty ratio of the aperture, the target duty ratio being a duty ratio capable of controlling the aperture in an equilibrium state, the equilibrium state being a state in which the size of the aperture is kept unchanged.

For the timing of executing step 406, optionally, if the brightness already belongs to the target brightness range when the aperture is started, step 406 may be directly executed. If the aperture is started and the brightness is less than the minimum value of the target brightness range, the aperture can be controlled to be opened to increase the brightness, and the brightness is increased through the above steps 402-403, and when the target brightness is increased to the target brightness range, the step 406 is executed. If the aperture is turned on and the brightness is greater than the maximum value of the reference target brightness range, the aperture can be controlled to be turned off through the above steps 404-405, and the brightness will decrease accordingly, and when the target brightness falls within the target brightness range, the step 406 is executed.

For a specific determination manner of the target duty ratio, the target duty ratio of the aperture may be determined based on at least one historical duty ratio and at least one corresponding historical holding time, where the historical duty ratio may be a target duty ratio used for controlling the aperture to be in a balanced state in historical operation, and the historical holding time is a time during which the brightness is kept unchanged when the aperture is controlled based on the corresponding historical duty ratio. Alternatively, the imaging apparatus may count time each time the aperture is controlled by a certain duty ratio, that is, record a duration during which the brightness of the picture remains unchanged at the duty ratio as a history holding duration corresponding to the duty ratio, and correspondingly store the duty ratio and the holding duration, so that after a plurality of control processes, a plurality of duty ratios and a plurality of history holding durations may be obtained.

In one possible implementation, the target duty ratio of the aperture may be a weighted sum of a plurality of historical duty ratios, and the image capturing apparatus may perform weighted summation on at least one historical duty ratio to obtain the target duty ratio, the weight of each historical duty ratio being positively correlated with the corresponding historical holding time period. For example, a mapping relationship between the historical holding time and the weight may be established in advance, where the mapping relationship includes at least one historical holding time and at least one corresponding weight, and when the historical holding time of the historical duty ratio is determined, the mapping relationship may be queried according to the historical holding time, and the weight corresponding to the historical holding time is obtained from the mapping relationship and is used as the weight for weighting the historical duty ratio.

exemplarily, assuming that the plurality of historical duty ratios are b1, b2, b3, the history keeping time length of b1 is t1, the history keeping time length of b2 is t2, the history keeping time length of b3 is t3, and the target duty ratio is best _ b, the calculation formula of best _ b may be as follows: best _ b ═ (b1 × t1+ b2 × t2+ b3 × t3)/(t1+ t2+ t 3).

then, if under a certain historical duty ratio, the longer the time that the brightness is kept unchanged is, the better the effect of the historical duty ratio is, and the more accurate the historical duty ratio is, the larger the weight corresponding to the historical duty ratio is, so that the determined target duty ratio is closer to the historical duty ratio, and the accuracy of the target duty ratio is ensured. Further, when the aperture is controlled by the target duty ratio, the time for which the luminance is kept constant is long, thereby improving the accuracy of controlling the aperture.

through the target duty ratio determining method provided by the embodiment, at least the following technical effects can be achieved:

First, the efficiency of determining the target duty cycle is improved: due to the wide difference between hardware and application environments, developers have extremely high difficulty and long time consumption in manually determining the target duty ratio through experiments and experiences. In the embodiment, the camera device extracts experience from multiple historical operations in a self-learning mode, and determines the current target duty ratio according to the target duty ratio of the aperture and the historical holding time of each control in the historical operations, so that the appropriate target duty ratio is automatically found, and the efficiency is greatly improved.

Second, flexibility in controlling the aperture is improved: in implementation, if a certain fixed duty ratio is taken as a target duty ratio, the method is likely not suitable for complicated and varied environments, and in addition, the target duty ratio of the diaphragm of a certain image pickup apparatus is likely not suitable for other image pickup apparatuses. In the embodiment, a method with high flexibility and strong adaptability for calculating the target duty ratio is introduced, the same target duty ratio is not set for each image pickup apparatus, the target duty ratio is not fixedly set, each image pickup apparatus flexibly updates the target duty ratio according to the target duty ratio and the holding time of the historical operation of the image pickup apparatus, and the flexibility of controlling the aperture is greatly improved.

Thirdly, the accuracy of the target duty cycle is improved: when the camera device controls the diaphragm to be in the balanced state based on the target duty ratio, if the brightness is not changed for a long time, that is, the holding time is long, it can be known that the diaphragm has a strong capability of maintaining the balanced state at the target duty ratio, and the target duty ratio is reliable, and when the target duty ratio adopted for controlling the diaphragm to be in the balanced state next time is calculated subsequently, the weight of the target duty ratio is large, and the influence on the target duty ratio next time is large. And after the aperture is controlled to be in the balanced state based on each target duty ratio, if the brightness is changed quickly, that is, the holding time is short, the situation that the aperture has a weak capability of keeping the balanced state at the target duty ratio can be known, the target duty ratio is poor in accuracy, and when the target duty ratio adopted for controlling the aperture to be in the balanced state next time is calculated subsequently, the weight of the target duty ratio is small, and the influence on the next target duty ratio is small. The target duty ratio calculated by the method is high in accuracy, the adjusting process of the aperture can be guaranteed to be more stable, the speed of the aperture entering a balance state is higher, and the problem of exposure oscillation is well solved.

It should be noted that, regarding the timing of acquiring the target duty ratio, for example, the following two ways are provided here:

In the first mode, the image pickup apparatus reads a target duty ratio calculated after the aperture has finished the equilibrium state last time.

The target duty ratio of the diaphragm can be updated in real time along with the process that the diaphragm finishes the balanced state, in the process that the camera device controls the diaphragm to be in the balanced state based on a certain target duty ratio every time, if the brightness changes, the fact that the size of the clear aperture of the diaphragm changes can be known, the diaphragm finishes the balanced state, the current keeping time length and the target duty ratio are stored, and the determined target duty ratio is updated according to the current target duty ratio and the keeping time length, so that the diaphragm is controlled to be in the balanced state by adopting the updated target duty ratio next time.

then, when the image pickup apparatus should control the diaphragm to be in the balanced state, since the target duty ratio has already been calculated after the balanced state is once ended on the diaphragm, the image pickup apparatus may directly read the target duty ratio calculated last time without a provisional calculation.

In a second mode, the image pickup apparatus may temporarily calculate the target duty ratio based on at least one history duty ratio and at least one corresponding history holding period.

Every time the image pickup apparatus controls the diaphragm to be in the equilibrium state based on a certain target duty ratio, if it is determined that the luminance is changed, it may be only the corresponding history holding period and the target duty ratio without calculating the target duty ratio. And when the image pickup apparatus should control the aperture in the balanced state, at least one of the historical duty ratios and the corresponding at least one of the historical holding periods may be read, and the target duty ratio may be temporarily calculated based on the at least one of the historical duty ratios and the corresponding at least one of the historical holding periods, so as to control the aperture based on the calculated target duty ratio.

407. The image pickup apparatus controls the diaphragm to be in a balanced state by a drive signal having a duty ratio as a target duty ratio.

According to the specific process of controlling the aperture to be in the balanced state, after the camera device obtains the target duty ratio, the driving signal with the duty ratio as the target duty ratio can be generated, and the size of the clear aperture of the aperture can be kept unchanged under the driving of the driving signal, so that the effect that the aperture is in the balanced state is achieved. For example, the image pickup apparatus may generate a PWM wave having a duty ratio of a target duty ratio, transmit the PWM wave to the driving module, and the driving module receives the PWM wave, converts the PWM wave into a voltage value, and the size of the clear aperture of the diaphragm is kept constant by the driving of the voltage value.

Alternatively, the image pickup apparatus may start timing when the diaphragm starts to be controlled by the drive signal with the duty ratio being the target duty ratio, detect whether the luminance changes in real time, end timing when the luminance changes, acquire a recorded duration, store the target duty ratio as the history duty ratio, and store the recorded duration as the history holding duration corresponding to the history duty ratio. Further, after the historical duty cycle and the historical holding time length are correspondingly stored, the target duty cycle may be updated based on a plurality of currently stored historical holding time lengths and a plurality of currently stored historical holding time lengths.

The duration of each frame of picture shot by the camera device is fixed, the number of shot frames can be used as a timing unit, and the holding duration corresponding to the target duty ratio is obtained by recording the number of frames shot by the camera device under the target duty ratio. Specifically, when the image pickup apparatus starts to control the aperture based on the target duty ratio, the count may be started from 0, incremented by one each time a frame of picture is taken, and ended when the luminance is changed, the number of frames recorded may be taken as the holding time period at the target duty ratio.

In addition, the image pickup apparatus may perform, after recording the history holding period corresponding to the target duty ratio, a weighted sum of the target duty ratio and at least one history duty ratio based on the plurality of history holding periods that have been stored, to obtain an updated target duty ratio, so as to control the diaphragm based on the updated target duty ratio when the diaphragm is to be controlled to be in the equilibrium state next time.

It should be noted that, in the process of controlling the aperture based on the target duty ratio, the brightness may slightly change, and the image pickup apparatus may perform fine adjustment on the target duty ratio along with the slight change of the brightness, and may control the aperture again based on the target duty ratio after the fine adjustment, so as to ensure stable exposure. The specific process of fine-tuning the target duty cycle and thereby re-controlling the aperture may include the following two ways.

First, when the brightness is slightly darkened, the image capturing apparatus may appropriately reduce the target duty ratio, and control the aperture again based on the target duty ratio after the appropriate reduction.

Determine the way the brightness is slightly dimmed: the brightness may be compared with the brightness of the previous frame, and when the brightness is less than the brightness of the previous frame and the second brightness difference is less than a threshold, it may be determined that the brightness is slightly darker.

Manner of reducing the target duty cycle: a difference between the target duty cycle and a first preset amplitude, which is a positive number, may be calculated as the reduced target duty cycle. Of course, a ratio of the target duty cycle to a first preset multiple may also be calculated, and the ratio is taken as the reduced target duty cycle, where the first preset multiple is a positive integer greater than 1.

In this mode, by appropriately reducing the target duty ratio when the luminance is slightly darker, it can be considered that the image pickup apparatus slightly shifts the target duty ratio to the left on the duty axis, and in the driving mode of the PWM wave, a force to drive the diaphragm to be opened is generated, and the clear aperture of the diaphragm becomes larger, and the luminance becomes slightly brighter.

In addition, when the image pickup apparatus appropriately decreases the target duty ratio, the target duty ratio before the decrease and the holding period may be stored, and the holding period corresponding to the target duty ratio after the decrease may be newly recorded when the control of the diaphragm based on the target duty ratio after the decrease is started.

In the second mode, when the luminance becomes slightly bright, the image pickup apparatus may increase the target duty ratio appropriately, and control the aperture again based on the target duty ratio after the increase appropriately.

Determine the way the brightness is slightly brighter: the brightness may be compared with the brightness of the previous frame, and when the brightness is greater than the brightness of the previous frame and the second brightness difference is less than a threshold, it may be determined that the brightness is slightly brighter.

Manner of increasing target duty cycle: a sum of the target duty cycle and a first preset amplitude, which is a positive number, may be calculated as the increased target duty cycle. Of course, the product of the target duty cycle and a first preset multiple may also be calculated, and the product is used as the increased target duty cycle, where the first preset multiple is a positive integer greater than 1.

In this mode, by appropriately increasing the target duty ratio when the luminance becomes slightly bright, it can be considered that the image pickup apparatus slightly shifts the target duty ratio to the right on the duty axis, and in the driving mode of the PWM wave, a force to drive the diaphragm to close is generated, and the clear aperture of the diaphragm becomes small, and the luminance becomes slightly dark.

In addition, when the target duty ratio is appropriately increased, the target duty ratio before the increase and the holding period may be stored, and the holding period corresponding to the target duty ratio after the increase may be newly recorded when the control of the diaphragm based on the target duty ratio after the increase is started.

in summary, the above steps 406 to 407 describe the process of controlling the aperture to be in the balanced state, and referring to fig. 7, which shows a flowchart of the process of controlling the aperture to be in the balanced state, the image capturing apparatus can keep the aperture in the balanced state according to the flowchart of fig. 7, and can also perform fine adjustment on the target duty ratio with a slight change in luminance to ensure that the luminance tends to be stable.

In practice, if the actual target duty ratio of the diaphragm is very different from the calculated target duty ratio, when the diaphragm is adjusted through the above steps 402 to 403 and/or steps 404 to 405, the diaphragm may be fixed due to too small force for controlling the diaphragm, and the exposure may be overexposed, too dark or oscillated, and the brightness may not be stable for a long time. Therefore, the present embodiment further introduces an abnormality detection process, and if the diaphragm cannot be stabilized for a long time after being started, that is, if the diaphragm does not enter the equilibrium state for a long time, it indicates that there is a large deviation in the target duty ratio, the target duty ratio is adjusted through the following steps one to two.

And step one, when the diaphragm is controlled by a driving signal with the duty ratio as the target duty ratio, timing is started.

And step two, when the brightness changes, if the recorded duration does not reach the preset duration, adjusting the target duty ratio to obtain the adjusted target duty ratio.

If the diaphragm does not enter the balance state after the preset duration, the abnormal condition can be known, the deviation of the target duty ratio is large, the rough balance correction is needed, the target duty ratio is adjusted greatly, and therefore the coarse adjustment is carried out on the diaphragm. The preset time length can be determined according to actual service requirements and can be preset by developers.

specifically, this step may include the following two cases:

in case one, when the luminance is greater than the maximum value of the target luminance range, the target duty ratio is increased.

the camera device can compare the brightness of a currently shot frame with the maximum value of the target brightness range, and when the brightness is determined to be greater than the maximum value of the target brightness range, it can be known that the force for driving the aperture to close is always too small when the aperture is adjusted before, so that the brightness is always not reduced, and the brightness is always too bright. Therefore, the target duty ratio is increased, the subsequently determined coarse target duty ratio is shifted to the right by a large amount on the duty axis, and the force for driving the aperture to close is increased, so that the brightness is reduced.

for the manner of increasing the target duty ratio, a sum of the target duty ratio and the luminance factor may be obtained, and the sum may be used as the increased target duty ratio. For example, the adjusted target duty cycle may be calculated using the following formula: f is b + yF, where F denotes the target duty cycle after the increase and b denotes the target duty cycle before the increase.

alternatively, in order to avoid malfunction and overshoot, when the luminance is greater than the maximum value of the target luminance range, the image capturing apparatus may first determine whether the speed at which the luminance is dimmed is too fast, and increase the target duty ratio if the luminance is not dimmed or the speed at which the luminance is dimmed is slower. If the dimming speed of the brightness is higher, which indicates that the clear aperture of the diaphragm is already closed quickly, the target duty ratio can be reduced by a small amplitude to reduce the force for driving the diaphragm to close, so as to avoid the situation that the exposure is too dark due to the excessive closing of the diaphragm. In the process of determining whether the brightness dimming speed is too fast, it may be determined that the brightness dimming speed is too fast when the brightness is smaller than the brightness of the previous frame and the second brightness difference is greater than a certain threshold.

And in the second case, when the brightness is smaller than the minimum value of the target brightness range, the target duty ratio is reduced.

the image pickup device can compare the brightness of a frame of currently shot image with the minimum value of the target brightness range, and when the brightness is determined to be smaller than the minimum value of the target brightness range, it can be known that the force for driving the aperture to open is always too small when the aperture is adjusted before, so that the brightness cannot rise all the time, and the brightness is always too dark. The target duty cycle is therefore reduced, and the subsequently determined coarse target duty cycle is shifted to the left by a large amount on the duty axis, and the force with which the aperture is driven to open is increased, so that the brightness is increased.

For the way of reducing the target duty ratio, a difference between the target duty ratio and the luminance factor may be obtained, and the difference is taken as the reduced target duty ratio. Illustratively, the coarse target duty cycle may be calculated using the following formula: f is b-yF, where F denotes the target duty ratio after the reduction and b denotes the target duty ratio before the reduction.

Alternatively, in order to avoid the erroneous operation and the overshoot, when the luminance is smaller than the minimum value of the target luminance range, the image pickup apparatus may first determine whether the luminance is becoming too fast, and then decrease the target duty ratio if the luminance is not becoming too fast or the luminance is becoming slower. If the brightness is faster, indicating that the clear aperture of the aperture is already rapidly opened, the target duty ratio can be increased by a small amount to reduce the force for driving the aperture to open, thereby avoiding the situation of overexposure caused by excessively opening the aperture. In the process of determining whether the brightness brightening speed is too fast, a second brightness difference may be obtained based on the brightness and the brightness of the previous frame, and when the second brightness difference is positive and greater than a certain threshold, the brightness brightening speed is determined to be too fast.

And step three, adjusting the duty ratio of the driving signal to the adjusted target duty ratio, and restarting timing until the time length for which the brightness is kept unchanged reaches the preset time length under the current adjusted target duty ratio.

The camera equipment can start timing when the duty ratio of the driving signal is adjusted, record the duration that the brightness keeps unchanged under the adjusted target duty ratio, judge whether the duration that the brightness keeps unchanged reaches the preset duration if the brightness changes, readjust the target duty ratio if the duration that the brightness keeps unchanged does not reach the preset duration, confirm that the target duty ratio is accurately adjusted in the course of rough balance if the duration that the brightness keeps unchanged reaches the preset duration, and end the adjusting process. The preset duration may be determined according to actual service requirements, and may be a duration consumed for shooting 20 frames.

In summary, the above steps one to three describe the process of roughly adjusting the aperture, and referring to fig. 8, which shows a flowchart of roughly balancing the aperture, the image capturing apparatus may repeatedly perform the process of obtaining a rough target duty ratio to roughly adjust the aperture according to the flowchart of fig. 8 until the brightness belongs to the target brightness range.

According to the method provided by the embodiment, when the brightness belongs to the target brightness range, the aperture is controlled to be in a balanced state based on the target duty ratio, and as the size of the clear aperture of the aperture is kept unchanged, the brightness of a shot picture can be ensured to be stable, and the problem of exposure oscillation caused by real-time dynamic adjustment of the aperture is avoided.

Fig. 9 is a schematic structural diagram of an aperture control apparatus according to an embodiment of the present invention. Referring to fig. 9, the apparatus includes: an acquisition module 901 and a control module 902.

An obtaining module 901, configured to obtain a target duty ratio of a driving signal;

the obtaining module 901 is further configured to obtain the brightness of a currently shot frame;

And a control module 902, configured to control the aperture to be in a balanced state through a driving signal with a duty ratio being the target duty ratio when the luminance is in the target luminance range, where the balanced state is a state where the size of the clear aperture of the aperture remains unchanged.

The device that this embodiment provided, when luminance belongs to target brightness range, can be based on target duty ratio control diaphragm is in balanced state, because the size of the clear aperture of diaphragm keeps unchangeable, can guarantee to shoot the luminance stability of picture, avoids real-time dynamic adjustment diaphragm and the exposure that leads to vibrate the problem.

Optionally, the obtaining module 901 is further configured to perform weighted summation on at least one historical duty cycle to obtain the target duty cycle, where a weight of each historical duty cycle is positively correlated with a corresponding historical holding time, and the historical holding time is a time during which brightness is kept unchanged when the aperture is controlled based on the corresponding historical duty cycle.

optionally, the apparatus further comprises:

The timing module is used for starting timing when the diaphragm is controlled by the driving signal with the target duty ratio;

the obtaining module 901 is further configured to obtain a recorded duration when the brightness changes;

and the storage module is used for storing the target duty ratio as a historical duty ratio and storing the recorded duration as a historical holding duration corresponding to the historical duty ratio.

Optionally, the obtaining module 901 is further configured to obtain a first duty ratio of the driving signal when the brightness is smaller than the minimum value of the target brightness range, where the first duty ratio is smaller than the target duty ratio;

The control module 902 is further configured to control the aperture to be opened by the driving signal with the first duty ratio.

Optionally, the obtaining module 901 is further configured to obtain the first duty ratio according to a first brightness difference, where the first brightness difference refers to a difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the first duty ratio is negatively correlated to the first brightness difference.

Optionally, the obtaining module 901 is further configured to obtain the first duty ratio according to a second brightness difference, where the second brightness difference is a difference between the brightness and the brightness of the previous frame, and the first duty ratio is positively correlated to the second brightness difference.

Optionally, the obtaining module 901 includes:

A determining submodule for determining a time factor based on the second luminance difference;

The obtaining submodule is used for obtaining the first duty ratio according to the time factor, and the first duty ratio is positively correlated with the time factor;

the time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

Optionally, the obtaining module 901 is further configured to obtain a second duty ratio of the driving signal when the brightness is greater than the maximum value of the target brightness range, where the second duty ratio is greater than the target duty ratio;

The control module 902 is further configured to control the aperture to be closed down according to the driving signal with the second duty ratio.

optionally, the obtaining module 901 is further configured to obtain the second duty ratio according to a first brightness difference, where the first brightness difference refers to a difference between the brightness and a target brightness, the target brightness belongs to the target brightness range, and the second duty ratio is positively correlated to the first brightness difference.

Optionally, the obtaining module 901 is further configured to obtain the second duty ratio according to a second brightness difference, where the second brightness difference refers to a difference between the brightness and the brightness of the previous frame, and the second duty ratio is positively correlated to the second brightness difference.

Optionally, the obtaining module 901 includes:

A determining submodule for determining a time factor based on the second luminance difference;

The obtaining submodule is used for obtaining the second duty ratio according to the time factor, and the second duty ratio is positively correlated with the time factor;

The time factor is a time-varying parameter, and increases with the lapse of time when the second brightness difference is smaller than a first preset threshold, and decreases with the lapse of time when the second brightness difference is larger than a second preset threshold.

Optionally, the apparatus further comprises:

The timing module is used for starting timing when the diaphragm is controlled by the driving signal with the target duty ratio;

The adjusting module is used for adjusting the target duty ratio to obtain the adjusted target duty ratio if the recorded duration does not reach the preset duration every time the brightness changes; adjusting the duty ratio of the driving signal to the adjusted target duty ratio;

The timing module is further configured to restart timing until a duration in which the brightness is kept unchanged reaches a preset duration under the current adjusted target duty cycle.

Optionally, the adjusting module is further configured to:

Increasing the target duty cycle when the brightness is greater than the maximum value of the target brightness range; or the like, or, alternatively,

The target duty cycle is decreased when the brightness is less than the minimum value of the target brightness range.

All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.

It should be noted that: the diaphragm control device provided in the above embodiment is only illustrated by dividing the above functional modules when controlling the diaphragm, and in practical applications, the above function allocation may be performed by different functional modules according to needs, that is, the internal structure of the image capturing apparatus may be divided into different functional modules to perform all or part of the above described functions. In addition, the aperture control device and the aperture control method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.

Fig. 10 is a schematic structural diagram of an image capturing apparatus provided in an embodiment of the present invention, where the image capturing apparatus 1000 may have a relatively large difference due to different configurations or performances, and generally, the image capturing apparatus 1000 includes: a processor 1001, a memory 1002, and an aperture 1003.

The memory 1002 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 1001 to implement the methods provided by the above method embodiments. Of course, the image capturing apparatus 1000 may further include a wired or wireless network interface, a keyboard, an input/output interface, and other components to facilitate input and output, and the image capturing apparatus 1000 may further include other components for implementing the functions of the apparatus, which is not described herein again.

In an exemplary embodiment, there is also provided a computer-readable storage medium, such as a memory, comprising instructions executable by a processor of an image pickup apparatus to perform the aperture control method in the above-described embodiments. For example, the computer-readable storage medium may be a random-access memory (ROM), a random-access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

32页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:摄像头组件及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类