CN108156394A - A kind of method and device for adjusting aperture - Google Patents
A kind of method and device for adjusting aperture Download PDFInfo
- Publication number
- CN108156394A CN108156394A CN201711480932.0A CN201711480932A CN108156394A CN 108156394 A CN108156394 A CN 108156394A CN 201711480932 A CN201711480932 A CN 201711480932A CN 108156394 A CN108156394 A CN 108156394A
- Authority
- CN
- China
- Prior art keywords
- aperture
- value
- dynamic
- coefficient
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000008859 change Effects 0.000 claims abstract description 15
- 230000009514 concussion Effects 0.000 claims description 19
- 230000010354 integration Effects 0.000 claims description 10
- 238000009738 saturating Methods 0.000 claims 2
- 230000005540 biological transmission Effects 0.000 abstract description 26
- 230000000694 effects Effects 0.000 abstract description 7
- 230000001105 regulatory effect Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000002184 metal Substances 0.000 description 3
- 229910052751 metal Inorganic materials 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004308 accommodation Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 150000002739 metals Chemical class 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000001550 time effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/75—Circuitry for compensating brightness variation in the scene by influencing optical camera components
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B9/00—Exposure-making shutters; Diaphragms
- G03B9/02—Diaphragms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/50—Constructional details
- H04N23/55—Optical parts specially adapted for electronic image sensors; Mounting thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Studio Devices (AREA)
- Exposure Control For Cameras (AREA)
Abstract
The invention discloses a kind of method and device for adjusting aperture, to solve the problem of to adjust the undesirable automatic adjustment overlong time of effect of aperture light transmission hole area using existing automatic aperture adjusting method single.According to the method for adjustment aperture provided by the embodiments of the present application, according to the first range value, second range value, dynamic PID coefficient and preset fixed PID coefficient determine target aperture governing speed, later, the area of the aperture loophole of camera lens is adjusted according to target aperture governing speed, so that the effect of the area of automatic adjustment aperture loophole is more preferable compared to the aperture regulating effect for the aperture regulating method for only considering fixed PID coefficient each time, shorten the time of aperture automatic adjustment, wherein, dynamic PID coefficient is the first range value adjusted according to brightness of image needs and represents that the second range value of the rate of change of brightness of image that camera lens acquires determines.
Description
Technical field
The present invention relates to camera aperture adjustment technology field, more particularly to a kind of method and device for adjusting aperture.
Background technology
Aperture in camera lens is made of several very thin sheet metals, and centre of tree open bore region can be by light, in mirror
During head acquisition image, the size of aperture loophole is changed by mobile sheet metal to control the light into camera lens
Amount, so as to adjust the brightness of acquisition image.The widely used auto iris of the monitoring camera of safety-security area at present, Neng Goushi
The adjust automatically of existing lens aperture light transmission hole area, so as to ensure under different illumination conditions, the image of camera lens acquisition will not go out
It now crosses bright or excessively secretly to improve picture quality.
Normal practice of the existing auto iris when adjusting aperture light transmission hole area is the figure acquired first according to camera lens
Image brightness determines to need the brightness value that adjusts, by PID (Proportion, Integration, Differential, ratio,
Integration, differential) algorithm determines the aperture governing speed that uses of adjustment aperture light transmission hole area, later according to aperture governing speed tune
The size of aperture loophole is saved, wherein, PID coefficient is fixed value used by pid algorithm, generally according to the hardware of aperture
Parameter determines.
However, due to by the above method adjust aperture light transmission hole area when there are alignment error, for example, DC driven
Circuit generates loss to DC driven signal or signal errors causes alignment error, presence resistance when for another example aperture sheet metal moves
Buddhist nun's coefficient causes alignment error etc., these alignment errors cause according to above method adjust aperture light transmission hole area after still not
Ideal brightness regulation effect, the image still darker or lighter of acquisition can be reached, therefore generally required to aperture light transmission
Hole area progress is multiple to be continuously adjusted, and automatically adjusts overlong time.
To sum up, the effect of existing automatic aperture adjusting method single adjusting aperture light transmission hole area is undesirable at present, from
Dynamic regulating time is long.
Invention content
The present invention provides a kind of method and device for adjusting aperture, to solve using existing automatic aperture adjusting method
The problem of effect that single adjusts aperture light transmission hole area is undesirable, automatic adjustment overlong time.
A kind of method for adjusting aperture provided in an embodiment of the present invention, including:
The image acquired according to camera lens determines the first range value and the second range value, and first range value is used to represent
The amplitude that the brightness needs of the image of the camera lens acquisition adjust, second range value are used to represent the figure of the camera lens acquisition
The rate of change of brightness of picture;
According to the corresponding pass between preset first range value, the second range value and dynamic PID coefficient fuzzy value three
System determines and first range value and the corresponding dynamic PID coefficient fuzzy value of second range value;
Dynamic PID coefficient is determined according to the dynamic PID coefficient fuzzy value by Fuzzy Set Way;
According to first range value, second range value, the dynamic PID coefficient and preset fixed PID coefficient
Determine target aperture governing speed;
According to the target aperture governing speed, the area of the aperture loophole of the camera lens is adjusted.
Optionally, the image acquired according to camera lens determines the first range value, including:
The brightness of the current frame image acquired according to the camera lens determines the first range value with preset object brightness.
Optionally, the image acquired according to camera lens determines the second range value, including:
Before the current frame image that the brightness of the current frame image acquired according to the camera lens is acquired with the camera lens
The brightness of one frame image determines the second range value.
Optionally, the dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, really
Fixed and first range value and the corresponding dynamic PID coefficient fuzzy value of second range value, including:
According to the corresponding pass between preset first range value, the second range value and dynamic proportion coefficient fuzzy value three
System determines dynamic proportion coefficient fuzzy value corresponding with first range value and second range value;And
According to the corresponding pass between preset first range value, the second range value and dynamic integral coefficient fuzzy value three
System determines dynamic integral coefficient fuzzy value corresponding with first range value and second range value;And
According to the corresponding pass between preset first range value, the second range value and dynamic differential coefficient fuzzy value three
System determines dynamic differential coefficient fuzzy value corresponding with first range value and second range value;
The dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, passes through fuzzy set
Conjunction method determines dynamic PID coefficient according to the dynamic PID coefficient fuzzy value, including:
The dynamic proportion coefficient is determined according to the dynamic proportion coefficient fuzzy value by Fuzzy Set Way;And
The dynamic integral coefficient is determined according to the dynamic integral coefficient fuzzy value by Fuzzy Set Way;And
The dynamic differential coefficient is determined according to the dynamic differential coefficient fuzzy value by Fuzzy Set Way.
Optionally, the fixed PID coefficient includes proportionality coefficient, integral coefficient and differential coefficient, according to first width
Angle value, second range value, the dynamic PID coefficient and preset fixed PID coefficient determine target aperture governing speed, packet
It includes:
According to the integral term, second range value, dynamic of first range value, first range value about the time
Proportionality coefficient, proportionality coefficient, dynamic integral coefficient, integral coefficient, dynamic differential coefficient and differential coefficient determine target aperture tune
Save speed.
Optionally, this method further includes:
After the area for adjusting the aperture loophole of the camera lens at least once in preset duration, the preset duration is determined
The number that the interior adjusting area causes aperture to shake reaches preset safety value;
According to the aperture governing speed that aperture is caused to shake each time, determine that aperture refers to adjustable range;
According to the aperture with reference to adjustable range, the original adjustable range of preset aperture and the last adjusting camera lens
Aperture loophole area used in aperture governing speed, determine calibration aperture governing speed;
The area of the aperture loophole of the camera lens is adjusted according to the calibration aperture governing speed.
Optionally, determine that adjusting the area causes aperture to shake according to following methods:
After n-th adjusts the area of the aperture loophole in preset duration, determine that n-th adjusts the aperture light transmission
The first brightness of the image of camera lens acquisition and the light is adjusted according to first brightness and n-th before the area in hole
The second brightness of the image of the camera lens acquisition determines luminance delta after the area of circle loophole, and N is positive integer;
The camera lens according to first brightness, second brightness, the luminance delta, the preset duration
After maximum brightness and the minimum brightness judgement of the image of acquisition meet at least one preset concussion condition, determine that n-th is adjusted
Aperture concussion occurs after the area of the aperture loophole.
Optionally, the concussion condition include it is following in it is part or all of:
Second brightness is more than the maximum brightness, and first brightness is less than the negative minimum brightness;
Second brightness is less than the negative minimum brightness, and first brightness is more than the maximum brightness;
The luminance delta is more than second brightness, and the luminance delta is more than the maximum brightness;
The luminance delta is less than second brightness, and the luminance delta is less than the negative maximum brightness.
Optionally, according to the aperture governing speed that aperture is caused to shake each time, determine aperture with reference to adjustable range, packet
It includes:
First kind aperture governing speed and the second class aperture are determined from the aperture governing speed that aperture is caused to shake
Governing speed;
The right side of the integration as the circle with reference to adjustable range is carried out to the minimum value in the first kind aperture governing speed
Boundary and to the maximum value in the second class aperture governing speed carry out integration as it is described circle refer to adjustable range a left side
Boundary;
Wherein, the first kind aperture governing speed meets part or all of in the following conditions:
It is described that the first kind aperture governing speed so that the second brightness of the image of the camera lens acquisition after adjusting is more than
The maximum brightness of the image of camera lens acquisition in preset duration, and cause the first bright of the image of the camera lens acquisition before adjusting
Degree is less than the minimum brightness of the image of the camera lens acquisition in the negative preset duration;
The first kind aperture governing speed to be become according to the brightness that second brightness and first brightness determine
The value of change amount is more than second brightness, and more than the maximum brightness;
The second class aperture governing speed meets part or all of in the following conditions:
The second class aperture governing speed causes second brightness to be less than the negative minimum brightness, and more than described
Maximum brightness;
The second class aperture governing speed causes the luminance delta to be less than second brightness, and less than negative institute
State maximum brightness.
Optionally, according to the aperture with reference to adjustable range, the original adjustable range of preset aperture and the last adjusting
Aperture governing speed used in the area of the aperture loophole of the camera lens determines calibration aperture governing speed, including:
Right margin, the light of adjustable range are referred to reference to left margin, the aperture of adjustable range according to the aperture
Enclose the left margin of original adjustable range, the right margin of the original adjustable range of the aperture and the last light for adjusting the camera lens
Target aperture governing speed used in the area of loophole or calibration aperture governing speed are enclosed, determines that calibration aperture adjusts speed
Degree.
Optionally, it after determining aperture with reference to adjustable range, further includes:
The left side of aperture adjustable range is determined with reference to adjustable range and the original adjustable range of the aperture according to the aperture
Boundary's calibration factor and right margin calibration factor;
First amplitude is determined according to the left margin calibration factor, the right margin calibration factor and the correspondence
The correspondence after calibration between value, the second range value and dynamic PID coefficient fuzzy value three, the correspondence after the calibration
Relationship be used in the area for the aperture loophole for adjusting the camera lens next time as determining dynamic PID coefficient fuzzy value according to
According to.
Optionally, the calibration PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, root
The first range value, the second amplitude are determined according to the left margin calibration factor, the right margin calibration factor and the correspondence
The correspondence after calibration between value and dynamic PID coefficient fuzzy value three, including:
Maximum value and preset first width in the left margin calibration factor and the right margin calibration factor
Correspondence between angle value, the second range value and dynamic proportion coefficient fuzzy value three, determines the first range value, the second width
The correspondence after calibration between angle value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic integral coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic differential coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three.
A kind of device for adjusting aperture provided in an embodiment of the present invention, including memory and processor:
The memory, for storing application program;
The processor, for according to the application program stored in the memory, the method for performing above-mentioned adjustment aperture.
According to the method for adjustment aperture provided by the embodiments of the present application, according to the first range value, the second range value, dynamic
PID coefficient and preset fixed PID coefficient determine target aperture governing speed, later, are adjusted according to target aperture governing speed
The area of the aperture loophole of camera lens, wherein, dynamic PID coefficient is the first range value and table adjusted according to brightness of image needs
Show that second range value of the rate of change of brightness of the image of camera lens acquisition determines.Due to adjust aperture loophole area when not
Only account for fixed PID coefficient, it is also contemplated that dynamic PID coefficient, wherein dynamic PID coefficient are adjusted with brightness of image needs
Amplitude is related to the intrinsic brilliance amplitude of variation of image after adjusting aperture so that automatically adjusts the area of aperture loophole each time
Effect it is more preferable compared to the aperture regulating effect for the aperture regulating method for only considering fixed PID coefficient, shorten aperture and adjust automatically
The time of section.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly introduced, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for this
For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these attached drawings
His attached drawing.
Fig. 1 is a kind of step schematic diagram of method for adjusting aperture provided in an embodiment of the present invention;
Fig. 2 is the correspondence after determining calibration provided in an embodiment of the present invention and is adjusted according to the correspondence after calibration
The step schematic diagram of the flow and method of aperture;
Fig. 3 is a kind of idiographic flow schematic diagram of method for adjusting aperture provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of device for adjusting aperture provided in an embodiment of the present invention;
Fig. 5 is the structure diagram of another device for adjusting aperture provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into
It is described in detail to one step, it is clear that described embodiment is only the implementation of part of the embodiment of the present invention rather than whole
Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work
All other embodiment, shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of method for adjusting aperture provided in an embodiment of the present invention includes the following steps:
S101:The image acquired according to camera lens determines the first range value and the second range value, and the first range value is used for table
Show the amplitude that the brightness needs of the image of camera lens acquisition adjust, the second range value adjusts the aperture loophole of camera lens for expression
The intrinsic brilliance amplitude of variation of the image of area rear lens acquisition;
S102:According to pair between preset first range value, the second range value and dynamic PID coefficient fuzzy value three
It should be related to, determine and the first range value and the corresponding dynamic PID coefficient fuzzy value of the second range value;
S103:Dynamic PID coefficient is determined according to dynamic PID coefficient fuzzy value by Fuzzy Set Way;
S104:Target is determined according to the first range value, the second range value, dynamic PID coefficient and preset fixed PID coefficient
Aperture governing speed;
S105:According to target aperture governing speed, the area of the aperture loophole of camera lens is adjusted.
Using above method, the adjustment of aperture light transmission hole face machine can be realized according to determining target aperture governing speed,
Wherein, determine that target aperture is adjusted according to the first range value, the second range value, dynamic PID coefficient and preset fixed PID coefficient
Speed later, the area of the aperture loophole of camera lens is adjusted according to target aperture governing speed, dynamic PID coefficient is according to figure
Image brightness the first range value for adjusting of needs and represent the camera lens acquisition image rate of change of brightness the second range value with
And the correspondence between preset first range value, the second range value and dynamic PID coefficient fuzzy value three determines dynamic
It is determined after PID coefficient fuzzy value according to Fuzzy Set Way.Due to not only considering in the area for adjusting aperture loophole
Fixed PID coefficient, it is also contemplated that dynamic PID coefficient, amplitude that wherein dynamic PID coefficient is adjusted with brightness of image needs and
The intrinsic brilliance amplitude of variation of image is related after adjusting aperture, when being automatically adjusted according to the above method to aperture so that every
The effect of the area of primary automatic adjustment aperture loophole is compared to the aperture for the aperture regulating method for only considering fixed PID coefficient
Regulating effect is more preferable, shortens the time of aperture automatic adjustment.It in force, can be according to the prior art, according to target aperture tune
Save the area that speed adjusts the aperture loophole of camera lens.
For example, if determining that the amplitude that the brightness of the image needs that camera lens acquires adjust is needs according to the first range value
It lightens very significantly, determines that the rate of change of brightness of image for change rate very little, can be tuned up suitably determining according to the second range value
Dynamic PID coefficient value, so as to when determining aperture governing speed, larger aperture governing speed can be obtained, accelerated
The adjusting of aperture;If on the contrary, determine that the amplitude that the brightness of the image needs that camera lens acquires adjust is need according to the first range value
Very little amplitude is lightened, and determines that the rate of change of brightness of image is very big for change rate according to the second range value, then can suitably be subtracted
The value of small dynamic PID coefficient so as to obtain a smaller aperture governing speed, to prevent the amplitude of accommodation excessive, influences light
The exposure effect of circle.
Optionally, the image acquired according to camera lens determines the first range value, including:
The brightness of the current frame image acquired according to the camera lens determines the first range value with preset object brightness.
In the embodiment of the present invention, can the first amplitude be determined with preset object brightness according to the brightness of current frame image
Value, wherein object brightness represent the normal brightness of image, can be considered the bright of the image that adjustment loophole aperture rear lens acquire
The ideal value of degree, object brightness can be a preset brightness values.
In force, first range value can be determined according to formula one:
P=curLuma-LumaTarget (formula one)
Wherein, P is the first range value, and curLuma is the brightness of current frame image, and LumaTarget is bright for preset target
Degree.
In other embodiment, average brightness of the camera lens in the image of nearest a period of time acquisition can also be determined
Or the average brightness of the image of the nearest X acquisition of camera lens, it is determined according to the difference of the average brightness of image and object brightness
First range value.
Optionally, the image acquired according to camera lens determines the second range value, including:
Before the current frame image that the brightness of the current frame image acquired according to the camera lens is acquired with the camera lens
The brightness of one frame image determines the second range value, and the previous frame image is the camera lens before the current frame image is acquired
It is acquired before the area of the aperture loophole of camera lens described in Primary regulation.
It, can be according to the brightness of current frame image and the former frame of the current frame image of camera lens acquisition in the embodiment of the present invention
The brightness of image determines the first range value, wherein, previous frame image can be that camera lens is once adjusted before current frame image is acquired
Save the image acquired before the area of the aperture loophole of camera lens.
In force, second range value can be determined according to formula two:
D=curLuma-LastLuma (formula two)
Wherein, D is the second range value, and curLuma is the brightness of current frame image, and LastLuma is the bright of previous frame image
Degree.
Furthermore it is also possible to following public affairs are passed through according to the first range value, the brightness of previous frame image and preset object brightness
Formula determines the second range value:
D=P- (LastLuma-LumaTarget) (formula three)
Wherein, D is the second range value, and P is the first range value, and curLuma is the brightness of current frame image, and LastLuma is
The brightness of previous frame image, LumaTarget are preset object brightness.Wherein it is possible to the first range value is determined according to formula one
P。
In other embodiment, the average brightness of image that can also be acquired according to camera lens in nearest a period of time
Or the average brightness of the image of the nearest X acquisition of camera lens, as the second range value, X is positive integer.
Optionally, the dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, really
Fixed and first range value and the corresponding dynamic PID coefficient fuzzy value of second range value, including:According to preset
Correspondence between one range value, the second range value and dynamic proportion coefficient fuzzy value three determines and first width
Angle value and the corresponding dynamic proportion coefficient fuzzy value of second range value;And according to preset first range value, the second width
Correspondence between angle value and dynamic integral coefficient fuzzy value three determines and first range value and second width
The corresponding dynamic integral coefficient fuzzy value of angle value;And according to preset first range value, the second range value and dynamic differential
Correspondence between coefficient fuzzy value three determines that dynamic corresponding with first range value and second range value is micro-
Divide coefficient fuzzy value.
In the embodiment of the present invention, if dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential system
Number then needs to determine dynamic proportion coefficient fuzzy value, dynamic respectively according to the first range value and the second range value and correspondence
Integral coefficient fuzzy value and dynamic differential coefficient fuzzy value, further, need through Fuzzy Set Way, according to dynamic proportion system
Number fuzzy value determines dynamic proportion coefficient, and dynamic integral coefficient is determined and according to dynamically micro- according to dynamic integral coefficient fuzzy value
Coefficient fuzzy value is divided to determine dynamic differential coefficient.Specifically, when determining dynamic proportion coefficient fuzzy value, first can be preset
The correspondence of range value, the second range value and dynamic proportion coefficient fuzzy value, according to predetermined first range value and
Second range value determines corresponding dynamic proportion coefficient fuzzy value.
In force, the first range value (being denoted as P below), the second range value (being denoted as D below) and dynamic can also be preset
The correspondence of proportionality coefficient fuzzy value (being denoted as △ kp below), after the first range value P and the second range value D is determined, according to
Above-mentioned correspondence determines corresponding dynamic proportion coefficient fuzzy value.
For example, the correspondence of default first range value P as shown in Table 1, the second range value D and dynamic proportion coefficient
Table, and dynamic proportion coefficient fuzzy value is determined according to determining the first range value P and the second range value D.
Table 1
Wherein, P1~P7Represent the different values of P, the change rate that can represent aperture respectively currently has (is adjusted before this
The direction of whole aperture light transmission hole area and the degree for adjusting aperture light transmission hole area before this) or positive change rate (i.e. current light
Enclose that light transmission hole area is excessive, need to reduce light transmission hole area) degree, closer to intermediate P3Represent what current aperture needs adjusted
Degree is smaller, close to P1The degree that expression aperture is currently at negative sense is bigger, close to P7Represent that aperture is currently at positive degree
It is bigger;D1~D7It represents the different values of D, can represent negative sense position (the i.e. current aperture light transmission that aperture is currently at respectively
Hole area is too small, needs to expand light transmission hole area) or forward position (i.e. current aperture light transmission hole area is excessive, needs to reduce thoroughly
Unthreaded hole area), closer to intermediate D3Represent that the degree that current aperture needs adjust is smaller, close to D1It is negative to represent that aperture is currently at
To degree it is bigger, close to D7It is bigger to represent that aperture is currently at positive degree;△kp1~△ kp6Represent that the difference of △ kp takes
Value, can be by △ kp1~△ kp60 is respectively set to, -300, -6000, -1200, -1800, -2400 and -3000.
Wherein it is possible to take asymmetric manner that D is set1~D7And P1~P7So that determining △ kp are more in line with aperture most
Big brightness (such as 850) and the asymmetry rule of minimum brightness (such as -150).
It in one embodiment, can be by D1~D7It is respectively set to different value ranges, such as [- 100, -40),
[- 40, -10), [- 10,0), 0, (0,30], (30,80] and (80,300], by P1~P7Different value ranges is respectively set to,
Such as [- 120, -80), [- 80, -50), [- 50,0), 0, (0,50], (50,100] and (100,400].Alternatively, it is also possible to by D1
~D7And P1~P7It is respectively set to different numerical value, such as by D1~D7It is respectively set to -100, -40, -10,0,30,80 and
300, by P1~P7It is respectively set to -120, -80, -50,0,50,100 and 400.
Similarly, the first range value P, the second range value D and dynamic integral coefficient (being denoted as △ ki below) can be preset
Correspondence after the first range value and the second range value is determined, according to above-mentioned correspondence, determines corresponding dynamic integral system
Number.
Specifically, the correspondence of the first range value P as shown in Table 2, the second range value D and △ ki can be preset
Table, and △ ki are determined by the method tabled look-up according to determining the first range value P and the second range value D.
Table 2
Wherein, P1~P7And D1~D7Set-up mode can take set-up mode with system in table 1, △ ki1~△
ki7It can be respectively set to 0, -1, -2, -4, -6, -8 and -10.
Similarly, the correspondence of P, D and dynamic differential coefficient (being denoted as △ kd below) can be preset, is determining the first width
After angle value and the second range value, according to above-mentioned correspondence, corresponding dynamic differential coefficient is determined.
Specifically, the correspondence of the first range value P as shown in table 3, the second range value D and △ kd can be preset
Table, and △ kd are determined by the method tabled look-up according to determining the first range value P and the second range value D.
Table 3
Wherein, P1~P7And D1~D7Set-up mode can take set-up mode with system in table 1, △ kd1~△
kd7It can be respectively set to 0, -100, -200, -400, -800, -1200 and -1600.
In force, it determines to obscure with first range value and the corresponding dynamic PID coefficient of second range value
After value, dynamic PID coefficient is determined according to dynamic PID coefficient fuzzy value by the method for fuzzy set.
It specifically includes, the dynamic proportion system is determined according to the dynamic proportion coefficient fuzzy value by Fuzzy Set Way
Number;And the dynamic integral coefficient is determined according to the dynamic integral coefficient fuzzy value by Fuzzy Set Way;It is and logical
It crosses Fuzzy Set Way and the dynamic differential coefficient is determined according to the dynamic differential coefficient fuzzy value.
For example, after determining dynamic proportion coefficient fuzzy value for △ kp, dynamic ratio is determined using Fuzzy Set Way
Example coefficient △ Kp, the wherein membership function involved in Fuzzy Set Way are used any one in trigonometric function or Gaussian function
Kind.Dynamic proportion coefficient fuzzy value is being determined as after △ ki, using Fuzzy Set Way determine dynamic proportion coefficient △ Ki and
After determining dynamic proportion coefficient fuzzy value for △ kd, dynamic proportion coefficient △ Kd are determined using Fuzzy Set Way.
Optionally, fixed PID coefficient includes proportionality coefficient, integral coefficient and differential coefficient, according to first range value,
Second range value, the dynamic PID coefficient and preset fixed PID coefficient determine target aperture governing speed, including:
According to the integral term, second range value, dynamic of first range value, first range value about the time
Proportionality coefficient, proportionality coefficient, dynamic integral coefficient, integral coefficient, dynamic differential coefficient and differential coefficient determine target aperture tune
Save speed.
In the embodiment of the present invention, determining dynamic PID coefficient (including dynamic ratio according to the first range value and the second range value
Example coefficient, dynamic integral coefficient and dynamic differential coefficient) after, can according to the first range value, first range value about when
Between integral term, the second range value, dynamic proportion coefficient, proportionality coefficient, dynamic integral coefficient, integral coefficient, dynamic differential system
Number and differential coefficient determine target aperture governing speed.
In force, integral term I of first range value about the time can be determined according to the following formula:
Wherein, I is integral term of first range value about time t, and P is the first range value.
Furthermore it is possible to according to existing method, PID coefficient is fixed according to the hardware relative parameters setting of aperture, for example, setting
Proportionality coefficient is that -3000, integral coefficient is -10 and differential coefficient is -1600.
In force, target aperture governing speed irisSpeed can be determined according to the following formula:
IrisSpeed=P* (Kp+ Δ Kp)+I* (KK+ Δ Ki)+D* (Kd+ Δ Kd) (formula five)
Wherein, irisSpeed is target aperture governing speed, and P is the first range value, and Kp is proportionality coefficient, and △ Kp are
State proportionality coefficient, I are integral term of first range value about the time, and Ki is integral coefficient, and △ Ki are dynamic integral coefficient, and D is
Second range value, Kd are differential coefficient, and △ Kd are dynamic differential coefficient.
Optionally, after the area of aperture loophole for adjusting the camera lens at least once in preset duration, it may be determined that
The number that the area causes aperture to shake is adjusted in the preset duration and reaches preset safety value;According to causing light each time
The aperture governing speed of concussion is enclosed, determines that aperture refers to adjustable range;According to the aperture with reference to adjustable range, preset aperture
Aperture governing speed used in the area of original adjustable range and the last aperture loophole for adjusting the camera lens determines
Calibrate aperture governing speed;The area of the aperture loophole of the camera lens is adjusted according to the calibration aperture governing speed.
Using above method, it can judge to adjust the area of the aperture loophole of the camera lens and generation in preset duration
After the number of aperture concussion reaches preset safety value, aperture loophole is adjusted according to determining calibration aperture governing speed again
Area, so as to avoid due to adjust occur in the process aperture concussion number excessively cause adjust aperture during error,
Improve degree of regulation.Wherein, aperture governing speed used in the area of the last aperture loophole for adjusting the camera lens,
Can be target aperture governing speed used in the area of the last aperture loophole for adjusting the camera lens or
The last time adjusts calibration aperture governing speed used in the area of the aperture loophole of the camera lens.
In force, safety value is smaller, again according to calibration light after the area of adjusting aperture loophole in preset time
The possibility that circle governing speed is adjusted is higher, and automatic adjustment accuracy is higher;Safety value is bigger, root again after being adjusted
Lower according to the possibility that is adjusted of calibration aperture governing speed, self-regulating process takes shorter, and safety value could be provided as
2。
In one embodiment, it can determine that adjusting the area causes aperture to shake according to following methods:
After n-th adjusts the area of the aperture loophole in preset duration, determine that n-th adjusts the aperture light transmission
The first brightness of the image of camera lens acquisition and the light is adjusted according to first brightness and n-th before the area in hole
The second brightness of the image of the camera lens acquisition determines luminance delta after the area of circle loophole, and N is positive integer;
The camera lens according to first brightness, second brightness, the luminance delta, the preset duration
After maximum brightness and the minimum brightness judgement of the image of acquisition meet at least one preset concussion condition, determine that n-th is adjusted
Aperture concussion occurs after the area of the aperture loophole.
Wherein it is possible to the part or all of adjusting in will be following, as concussion condition:
Second brightness is more than the maximum brightness, and first brightness is less than the negative minimum brightness;
Second brightness is less than the negative minimum brightness, and first brightness is more than the maximum brightness;
The luminance delta is more than second brightness, and the luminance delta is more than the maximum brightness;
The luminance delta is less than second brightness, and the luminance delta is less than the negative maximum brightness.
In force, it is to acquire the duration of 25 frame frame images that can take preset duration, and it is 500 that can take maximum brightness, most
Small measurement is 100.
In one embodiment, it can determine that aperture refers to adjustable range according to following methods:
First kind aperture governing speed and the second class aperture are determined from the aperture governing speed that aperture is caused to shake
Governing speed;The right side of the integration as the circle with reference to adjustable range is carried out to the minimum value in the first kind aperture governing speed
Boundary and to the maximum value in the second class aperture governing speed carry out integration as it is described circle refer to adjustable range a left side
Boundary;
Wherein, the first kind aperture governing speed meets part or all of in the following conditions:
It is described that the first kind aperture governing speed so that the second brightness of the image of the camera lens acquisition after adjusting is more than
The maximum brightness of the image of camera lens acquisition in preset duration, and cause the first bright of the image of the camera lens acquisition before adjusting
Degree is less than the minimum brightness of the image of the camera lens acquisition in the negative preset duration;The first kind aperture governing speed makes
It obtains and second brightness is more than according to the value of luminance delta that second brightness and first brightness determine, and more than institute
State maximum brightness;
The second class aperture governing speed meets part or all of in the following conditions:
The second class aperture governing speed causes second brightness to be less than the negative minimum brightness, and more than described
Maximum brightness;The second class aperture governing speed causes the luminance delta to be less than second brightness, and is less than what is born
The maximum brightness.
In force, can using the maximum value in the second class aperture governing speed as with reference to adjustable range left margin,
The left margin with reference to adjustable range can be determined according to the following formula:
Wherein, irisLeftRange is the left margin with reference to adjustable range, and darkIrisSpeed (i) is i-th second
Class aperture governing speed, n are the quantity of the second class aperture governing speed.
In force, can using the minimum value in first kind aperture governing speed as with reference to adjustable range left margin,
The right margin with reference to adjustable range can be determined according to the following formula:
Wherein, irisRightRange is the right margin with reference to adjustable range, and lightIrisSpeed (i) is i-th the
A kind of aperture governing speed, n are the quantity of first kind aperture governing speed.
Optionally, it is determined according to the aperture with reference to adjustable range, the original adjustable range of preset aperture and the last time
Target aperture governing speed determine calibration aperture governing speed, including:According to the aperture with reference to adjustable range left margin,
The aperture is with reference to the right margin of adjustable range, the left margin of the original adjustable range of the aperture, the original adjusting model of the aperture
Target aperture governing speed used in the area of the right margin that encloses and the last aperture loophole for adjusting the camera lens or
Aperture governing speed is calibrated, determines calibration aperture governing speed
It, can be according to the following formula after left margin and right margin with reference to adjustable range is determined in the embodiment of the present invention
Determine calibration aperture governing speed:
Wherein, newIrisSpeed is calibration aperture governing speed, and origRightRange is the original adjustable range of aperture
Right margin, origLeftRange be the original adjustable range of aperture left margin, irisRightRang be with reference to adjustable range
Right margin, irisLeftRange is the left margin with reference to adjustable range, and oldIrisSpeed is the last to adjust camera lens
Target aperture governing speed used in the area of aperture loophole or calibration aperture governing speed.
After newIrisSpeed is determined, aperture can be adjusted according to determining newIrisSpeed.
Optionally, it after determining aperture with reference to adjustable range, further includes:
The left side of aperture adjustable range is determined with reference to adjustable range and the original adjustable range of the aperture according to the aperture
Boundary's calibration factor and right margin calibration factor;
First amplitude is determined according to the left margin calibration factor, the right margin calibration factor and the correspondence
The correspondence after calibration between value, the second range value and dynamic PID coefficient fuzzy value three, the correspondence after the calibration
Relationship be used in the area for the aperture loophole for adjusting the camera lens next time as determining dynamic PID coefficient fuzzy value according to
According to.
It, can be in the aperture loophole for determining to adjust the camera lens at least once in preset duration in the embodiment of the present invention
Area, and adjusted in preset duration after the number that the area causes aperture to shake reaches preset safety value, joined according to aperture
It examines adjustable range and the original adjustable range of the aperture determines the left margin calibration factor of aperture adjustable range and right margin calibration
Coefficient, and the first range value, the second range value and dynamic PID are adjusted according to left margin calibration factor and right margin calibration factor
Correspondence between coefficient fuzzy value three obtains the correspondence after the calibration between three, the correspondence after the calibration
Relationship is used for the foundation as determining dynamic PID coefficient fuzzy value when carrying out aperture adjusting next time, after the calibration
The dynamic PID coefficient fuzzy value that correspondence determines adjusts dynamic PID coefficient for determining for determining dynamic PID coefficient
Save the target aperture governing speed needed for aperture light transmission hole area.
Using above method, can be shaken according to the aperture occurred during aperture is adjusted, to preset first range value,
The correspondence after calibration between second range value and dynamic PID coefficient fuzzy value three is adjusted, and is avoided next time
The aperture carried out according to the correspondence after calibration adjusts process and aperture is caused to shake, so as to improve the essence that aperture is adjusted next time
Degree.
In force, the left margin calibration factor of aperture adjustable range is determined according to following methods:
Wherein, leftShrinkRatio is left margin calibration factor, and origLeftRange is the original adjustable range of aperture
Left margin, irisLeftRange be with reference to adjustable range left margin.
In force, the right margin calibration factor of aperture adjustable range is determined according to following methods:
Wherein, rightShrinkRatio is right margin calibration factor, and origRightRange is the original adjusting model of aperture
The right margin enclosed, irisRightRange are the right margin with reference to adjustable range.
It, can be according to left margin school after the left margin calibration factor and right margin calibration factor for determining aperture adjustable range
Quasi- coefficient and right margin calibration factor and the value for adjusting the dynamic PID coefficient fuzzy value in each correspondence, will adjust
Value afterwards is as the first range value and the corresponding dynamic PID coefficient module of the second range value identical in the correspondence after calibration
The value of paste value.
Specifically, in force, if the calibration PID coefficient fuzzy value includes dynamic proportion coefficient fuzzy value, dynamic
Integral coefficient fuzzy value and dynamic differential coefficient fuzzy value, according to the left margin calibration factor, the right margin calibration factor
And after the correspondence determines the calibration between the first range value, the second range value and dynamic PID coefficient fuzzy value three
Correspondence, including:
Maximum value and preset first width in the left margin calibration factor and the right margin calibration factor
Correspondence between angle value, the second range value and dynamic proportion coefficient fuzzy value three, determines the first range value, the second width
The correspondence after calibration between angle value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic integral coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic differential coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three.
Pair after the calibration between the first range value, the second range value and dynamic proportion coefficient fuzzy value three is determined
It should be related to, the correspondence after the calibration between the first range value, the second range value and dynamic integral coefficient fuzzy value three
After the correspondence after calibration between first range value, the second range value and dynamic differential coefficient fuzzy value three,
When adjusting aperture next time, the correspondence after being calibrated according to above three determines dynamic proportion coefficient fuzzy value, dynamic integral
Coefficient fuzzy value and dynamic differential coefficient fuzzy value, and then dynamic proportion coefficient is determined according to dynamic proportion coefficient fuzzy value,
Dynamic integral coefficient is determined according to dynamic integral coefficient fuzzy value and dynamic differential is determined according to dynamic differential coefficient fuzzy value
Coefficient, and by determining dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient for determining that target aperture is adjusted
Speed is so as to carry out the adjusting of aperture light transmission hole area.According to three calibration after correspondence determine proportionality coefficient, dynamic
Integral coefficient and dynamic differential coefficient more can accurately determine that target aperture adjusts speed when adjusting aperture next time
Degree, prevents from aperture being caused to shake in adjusting thereafter, to improve accommodation accuracy.
For example, it can determine that the dynamic proportion coefficient after each calibration in correspondence is obscured according to the following formula
The value of value:
New Δ kp=Δs kp*max (leftShrinkRatio, rightShrinkRatio) (formula 11)
Wherein, new △ kp are the first range value and the corresponding dynamic proportion system of the second range value in correspondence after calibration
The value of number fuzzy value, Δ kp are obscured for the dynamic proportion coefficient of the first range value and the second range value identical in correspondence
The value of value, leftShrinkRatio are left margin calibration factor, and rightShrinkRatio is right margin calibration factor.
For example, if leftShrinkRatio is 0.75, rightShrinkRatio 0.8, according further to table 1, Δ
The value △ kp of kp1~△ kp6Respectively 0, -300, -6000, -1200, -1800, -2400 and -3000, then pair after calibration
In should being related to, the value new △ kp of new Δs kp1~new △ kp6Respectively 0, -240, -4800, -960, -1440, -1920 and -
2400, it can be by △ kp in table 11~△ kp6Value replace with new △ kp respectively1~new △ kp6Value.
Furthermore it is possible to the dynamic proportion coefficient fuzzy value after each calibration in correspondence is determined according to the following formula
Value:
New Δ ki=Δs ki*min (leftShrinkRatio, rightShrinkRatio) (formula 12)
Wherein, new Δs ki is the first range value and the corresponding dynamic integral system of the second range value in correspondence after calibration
The value of number fuzzy value, Δ ki are obscured for the dynamic integral coefficient of the first range value and the second range value identical in correspondence
The value of value, leftShrinkRatio are left margin calibration factor, and rightShrinkRatio is right margin calibration factor.
For example, if leftShrinkRatio is 0.75, rightShrinkRatio 0.8, according further to table 1, Δ
The value △ ki of ki1~△ ki6Respectively 0, -1, -2, -4, -6, -8 and -10, then in correspondence after calibration, new Δs ki
Value new △ ki1~new △ ki6Respectively 0, -0.75, -1.5, -3, -4.5, -6 and -7.5, it can be by △ ki in table 11~
△ki6Value replace with new △ ki respectively1~new △ ki6Value.
Furthermore it is possible to the dynamic proportion coefficient fuzzy value after each calibration in correspondence is determined according to the following formula
Value:
New Δ kd=△ kd*min (leftShrinkRatio, rightShrinkRatio) (formula 13)
Wherein, new Δs kd is the first range value and the corresponding dynamic differential system of the second range value in correspondence after calibration
The value of number fuzzy value, Δ kd are obscured for the dynamic differential coefficient of the first range value and the second range value identical in correspondence
The value of value, leftShrinkRatio are left margin calibration factor, and rightShrinkRatio is right margin calibration factor.
For example, if leftShrinkRatio is 0.75, rightShrinkRatio 0.8, according further to table 1, Δ
The value △ kd of kd1~△ kd6Respectively 0, -100, -200, -400, -800, -1200 and -1600, then correspondence after calibration
In relationship, the value new △ kd of new Δs kd1~new △ kd6Respectively 0, -75, -150, -300, -600, -900 and -1200,
It can be by △ kd in table 11~△ kd6Value replace with new △ kd respectively1~new △ kd6Value.As shown in Fig. 2, this hair
A kind of school determined between the first range value, the second range value and dynamic PID coefficient fuzzy value three that bright embodiment provides
Correspondence after standard, and according to the method for the correspondence progress aperture adjusting after calibration, include the following steps:
Step 201:Adjust the area of the aperture loophole of camera lens;
Step 202:Judge to adjust whether the number that area causes aperture to shake reaches preset safety value in preset duration,
If so, performing step 203, step 204 is otherwise performed;
Step 203:According to the aperture governing speed that aperture is caused to shake each time, determine that aperture refers to adjustable range, it
Step 205 is performed afterwards;
Step 204:Confirm that aperture is adjusted to complete, terminate this flow;
Step 205:The left side of aperture adjustable range is determined with reference to adjustable range and the original adjustable range of aperture according to aperture
Boundary's calibration factor and right margin calibration factor;
Step 206:According to left margin calibration factor, right margin calibration factor and the first range value, the second range value and
Correspondence between dynamic PID coefficient fuzzy value three, determines the first range value, the second range value and dynamic PID coefficient
The correspondence after calibration between fuzzy value three;
Step 207:In the light transmission hole area for adjusting aperture next time, according to the first determining range value, the second amplitude
Correspondence after value and calibration determines dynamic PID coefficient fuzzy value;
Step 208:Dynamic PID coefficient is determined using Fuzzy Set Way according to determining dynamic PID coefficient fuzzy value;
Step 209:Target aperture governing speed is determined according to determining dynamic PID coefficient;
Step 210:The light transmission hole area of aperture is adjusted according to determining target aperture governing speed, is terminated later
This flow.
Using above method, it can determine that area is adjusted in preset duration causes the number of aperture concussion to reach preset
After safety value, the correspondence after calibration is determined, and light is determined according to the correspondence after calibration when adjusting aperture next time
Governing speed is enclosed, and then aperture adjusting is carried out according to the aperture governing speed, to avoid there is aperture concussion in adjusting next time,
Improve degree of regulation.In addition, after step 210 is performed, step 202 can also be repeated, judges aperture concussion again
Whether number reaches preset safety value.
As shown in figure 3, a kind of method for adjusting aperture provided in an embodiment of the present invention includes the following steps:
Step 301:First range value and the second range value are determined according to the image that camera lens acquires, the first range value is used for
Represent the amplitude that the brightness needs of the image of camera lens acquisition adjust, the second range value is used to represent the brightness of the image of camera lens acquisition
Change rate;
Step 302:According between preset first range value, the second range value and dynamic PID coefficient fuzzy value three
Correspondence, determine with the first range value and the corresponding dynamic PID coefficient of the second range value;
Step 303:It is determined according to dynamic PID coefficient fuzzy value using Fuzzy Set Way according to dynamic PID coefficient;
Step 304:It is determined according to the first range value, the second range value, dynamic PID coefficient and preset fixed PID coefficient
Target aperture governing speed;
Step 305:According to target aperture governing speed, the area of the aperture loophole of camera lens is adjusted;
Step 306:Judge to adjust whether the number that area causes aperture to shake reaches preset safety value in preset duration,
If so, performing step 307, step 308 is otherwise performed;
Step 307:According to the aperture governing speed that aperture is caused to shake each time, determine that aperture refers to adjustable range, it
Step 309 is performed afterwards and performs step 310;
Step 308:Confirm that aperture is adjusted to complete, terminate this flow;
Step 309:The left side of aperture adjustable range is determined with reference to adjustable range and the original adjustable range of aperture according to aperture
Boundary's calibration factor and right margin calibration factor perform step 311 later;
Step 310:According to aperture with reference to adjustable range, the original adjustable range of preset aperture and the last adjusting camera lens
Aperture loophole area used in aperture governing speed, determine calibration aperture governing speed, later perform step 312;
Step 311:According to left margin calibration factor, right margin calibration factor and the first range value, the second range value and
Correspondence between dynamic PID coefficient fuzzy value three, determines the first range value, the second range value and dynamic PID coefficient
The correspondence after calibration between fuzzy value three performs step 313 later;
Step 312:The area of the aperture loophole of camera lens is adjusted according to calibration aperture governing speed, performs step later
306;
Step 313:In the light transmission hole area for adjusting aperture next time, according to the first determining range value, the second amplitude
Correspondence after value and calibration determines dynamic PID coefficient fuzzy value;
Step 314:Dynamic PID coefficient is determined according to determining dynamic PID coefficient fuzzy value;
Step 315:Target aperture governing speed is determined according to dynamic PID coefficient;
Step 316:The light transmission hole area of aperture is adjusted according to determining target aperture governing speed, is performed later
Step 306.
It, can be according to the first range value, the second range value, dynamic PID coefficient and preset fixed PID using above method
Coefficient determines target aperture governing speed, later, the area of the aperture loophole of camera lens is adjusted according to target aperture governing speed;
It later, can be according to making each time after judging to adjust the number that aperture causes aperture to shake in preset duration and reaching safety value
The aperture governing speed shaken into aperture determines that aperture with reference to adjustable range, further determines school according to aperture with reference to adjustable range
The area of the quasi-optical aperture loophole for enclosing governing speed and the camera lens being adjusted according to the calibration aperture governing speed, to improve
Degree of regulation;In addition, after judging that aperture is adjusted in preset duration causes the number of aperture concussion to reach safety value, it can be with root
It is calibrated between the first range value, the second range value and dynamic PID coefficient fuzzy value three with reference to adjustable range according to determining aperture
Correspondence, so as to according to the correspondence after calibration determine dynamic PID coefficient fuzzy value when adjusting aperture next time, and
Dynamic PID coefficient is determined according to dynamic PID coefficient fuzzy value, to avoid the shadow shaken during adjusting next time by aperture
It rings, improves degree of regulation.
Based on same inventive concept, this discovery embodiment additionally provides a kind of device for adjusting aperture, due to the device solution
Certainly the principle of problem is similar to adjusting aperture method provided in an embodiment of the present invention, therefore the implementation of the device may refer to method
Implementation, overlaps will not be repeated.
As shown in figure 4, a kind of device for adjusting aperture provided in an embodiment of the present invention includes:
Range value determining module 401, for determining the first range value and the second range value according to the image that camera lens acquires,
First range value is used to represent the amplitude that the brightness needs of the image of the camera lens acquisition adjust, and second range value is used
In the rate of change of brightness for the image for representing the camera lens acquisition;
Dynamic PID coefficient fuzzy value determining module 402, for according to preset first range value, the second range value and
Correspondence between dynamic PID coefficient fuzzy value three determines opposite with first range value and second range value
The dynamic PID coefficient fuzzy value answered;
Dynamic PID coefficient determination module 403 determines dynamic according to dynamic PID coefficient fuzzy value using Fuzzy Set Way
PID coefficient;
Target aperture governing speed determining module 404, for according to first range value, second range value, institute
It states dynamic PID coefficient and preset fixed PID coefficient determines target aperture governing speed;
Adjustment module 405, for according to the target aperture governing speed, adjusting the face of the aperture loophole of the camera lens
Product.
Optionally, range value determining module 401, is specifically used for:
The brightness of the current frame image acquired according to the camera lens determines the first range value with preset object brightness.
Optionally, range value determining module 401, is specifically used for:
Before the current frame image that the brightness of the current frame image acquired according to the camera lens is acquired with the camera lens
The brightness of one frame image determines the second range value.
Optionally, the dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, moves
State PID coefficient fuzzy value determining module 402 is specifically used for:
According to the corresponding pass between preset first range value, the second range value and dynamic proportion coefficient fuzzy value three
System determines dynamic proportion coefficient fuzzy value corresponding with first range value and second range value;And
According to the corresponding pass between preset first range value, the second range value and dynamic integral coefficient fuzzy value three
System determines dynamic integral coefficient fuzzy value corresponding with first range value and second range value;And
According to the corresponding pass between preset first range value, the second range value and dynamic differential coefficient fuzzy value three
System determines dynamic differential coefficient fuzzy value corresponding with first range value and second range value;
Dynamic PID coefficient determination module 403 is specifically used for:
The dynamic proportion coefficient is determined according to the dynamic proportion coefficient fuzzy value by Fuzzy Set Way;And
The dynamic integral coefficient is determined according to the dynamic integral coefficient fuzzy value by Fuzzy Set Way;And
The dynamic differential coefficient is determined according to the dynamic differential coefficient fuzzy value by Fuzzy Set Way.
Optionally, the fixed PID coefficient includes proportionality coefficient, integral coefficient and differential coefficient, and target aperture adjusts speed
Degree determining module 404 is specifically used for:
According to the integral term, second range value, dynamic of first range value, first range value about the time
Proportionality coefficient, proportionality coefficient, dynamic integral coefficient, integral coefficient, dynamic differential coefficient and differential coefficient determine target aperture tune
Save speed.
Optionally, adjustment module 405 is additionally operable to:
After the area for adjusting the aperture loophole of the camera lens at least once in preset duration, the preset duration is determined
The number that the interior adjusting area causes aperture to shake reaches preset safety value;
According to the aperture governing speed that aperture is caused to shake each time, determine that aperture refers to adjustable range;
According to the aperture with reference to adjustable range, the original adjustable range of preset aperture and the last adjusting camera lens
Aperture loophole area used in aperture governing speed, determine calibration aperture governing speed;
The area of the aperture loophole of the camera lens is adjusted according to the calibration aperture governing speed.
Optionally, adjustment module 405 is specifically used for:
After n-th adjusts the area of the aperture loophole in preset duration, determine that n-th adjusts the aperture light transmission
The first brightness of the image of camera lens acquisition and the light is adjusted according to first brightness and n-th before the area in hole
The second brightness of the image of the camera lens acquisition determines luminance delta after the area of circle loophole, and N is positive integer;
The camera lens according to first brightness, second brightness, the luminance delta, the preset duration
After maximum brightness and the minimum brightness judgement of the image of acquisition meet at least one preset concussion condition, determine that n-th is adjusted
Aperture concussion occurs after the area of the aperture loophole.
Optionally, the concussion condition include it is following in it is part or all of:
Second brightness is more than the maximum brightness, and first brightness is less than the negative minimum brightness;
Second brightness is less than the negative minimum brightness, and first brightness is more than the maximum brightness;
The luminance delta is more than second brightness, and the luminance delta is more than the maximum brightness;
The luminance delta is less than second brightness, and the luminance delta is less than the negative maximum brightness.
Optionally, adjustment module 405 is specifically used for:
First kind aperture governing speed and the second class aperture are determined from the aperture governing speed that aperture is caused to shake
Governing speed;
The right side of the integration as the circle with reference to adjustable range is carried out to the minimum value in the first kind aperture governing speed
Boundary and to the maximum value in the second class aperture governing speed carry out integration as it is described circle refer to adjustable range a left side
Boundary;
Wherein, the first kind aperture governing speed meets part or all of in the following conditions:
It is described that the first kind aperture governing speed so that the second brightness of the image of the camera lens acquisition after adjusting is more than
The maximum brightness of the image of camera lens acquisition in preset duration, and cause the first bright of the image of the camera lens acquisition before adjusting
Degree is less than the minimum brightness of the image of the camera lens acquisition in the negative preset duration;
The first kind aperture governing speed to be become according to the brightness that second brightness and first brightness determine
The value of change amount is more than second brightness, and more than the maximum brightness;
The second class aperture governing speed meets part or all of in the following conditions:
The second class aperture governing speed causes second brightness to be less than the negative minimum brightness, and more than described
Maximum brightness;
The second class aperture governing speed causes the luminance delta to be less than second brightness, and less than negative institute
State maximum brightness.
Optionally, adjustment module 405 is specifically used for:
Right margin, the light of adjustable range are referred to reference to left margin, the aperture of adjustable range according to the aperture
Enclose the left margin of original adjustable range, the right margin of the original adjustable range of the aperture and the last light for adjusting the camera lens
Target aperture governing speed used in the area of loophole or calibration aperture governing speed are enclosed, determines that calibration aperture adjusts speed
Degree.
Optionally, adjustment module 405 is additionally operable to:
After determining aperture with reference to adjustable range, adjustable range and the original adjusting of the aperture are referred to according to the aperture
Range determines the left margin calibration factor of aperture adjustable range and right margin calibration factor;
First amplitude is determined according to the left margin calibration factor, the right margin calibration factor and the correspondence
The correspondence after calibration between value, the second range value and dynamic PID coefficient fuzzy value three, the correspondence after the calibration
Relationship be used in the area for the aperture loophole for adjusting the camera lens next time as determining dynamic PID coefficient fuzzy value according to
According to.
Optionally, the calibration PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, adjusts
Section module 405 is specifically used for:
Maximum value and preset first width in the left margin calibration factor and the right margin calibration factor
Correspondence between angle value, the second range value and dynamic proportion coefficient fuzzy value three, determines the first range value, the second width
The correspondence after calibration between angle value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic integral coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three;
Minimum value and preset first amplitude in the left margin calibration factor and the right margin calibration factor
Correspondence between value, the second range value and dynamic differential coefficient fuzzy value three, determines the first range value, the second amplitude
The correspondence after calibration between value and dynamic proportion coefficient fuzzy value three.
In force, a kind of device for adjusting aperture provided in an embodiment of the present invention can be real by structure as shown in Figure 5
It applies, wherein, the device 500 of the adjusting aperture includes memory 501 and processor 502:
Memory 501, for storing application program;
Processor 502, the application program for being stored according to memory 501 perform above-mentioned side provided in an embodiment of the present invention
Method.
Optionally, the device 500 for adjusting aperture further includes bus structures 503, leads between memory 501 and processor 502
Bus structures 503 are crossed to be attached.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (13)
- A kind of 1. method for adjusting aperture, which is characterized in that this method includes:The image acquired according to camera lens determines the first range value and the second range value, and first range value is used to represent described The amplitude that the brightness needs of the image of camera lens acquisition adjust, second range value are used to represent the image of the camera lens acquisition Rate of change of brightness;According to the correspondence between preset first range value, the second range value and dynamic PID coefficient fuzzy value three, really Fixed and first range value and the corresponding dynamic PID coefficient fuzzy value of second range value;Dynamic PID coefficient is determined according to the dynamic PID coefficient fuzzy value by Fuzzy Set Way;It is determined according to first range value, second range value, the dynamic PID coefficient and preset fixed PID coefficient Target aperture governing speed;According to the target aperture governing speed, the area of the aperture loophole of the camera lens is adjusted.
- 2. the method as described in claim 1, which is characterized in that the first range value is determined according to the image that camera lens acquires, including:The brightness of the current frame image acquired according to the camera lens determines the first range value with preset object brightness.
- 3. the method as described in claim 1, which is characterized in that the second range value is determined according to the image that camera lens acquires, including:The former frame of the current frame image that the brightness of the current frame image acquired according to the camera lens is acquired with the camera lens The brightness of image determines the second range value.
- 4. the method as described in claim 1, which is characterized in that the dynamic PID coefficient includes dynamic proportion coefficient, dynamic product Divide coefficient and dynamic differential coefficient, determine and first range value and the corresponding dynamic PID coefficient of second range value Fuzzy value, including:According to the correspondence between preset first range value, the second range value and dynamic proportion coefficient fuzzy value three, Determine dynamic proportion coefficient fuzzy value corresponding with first range value and second range value;AndAccording to the correspondence between preset first range value, the second range value and dynamic integral coefficient fuzzy value three, Determine dynamic integral coefficient fuzzy value corresponding with first range value and second range value;AndAccording to the correspondence between preset first range value, the second range value and dynamic differential coefficient fuzzy value three, Determine dynamic differential coefficient fuzzy value corresponding with first range value and second range value;The dynamic PID coefficient includes dynamic proportion coefficient, dynamic integral coefficient and dynamic differential coefficient, by fuzzy set side Method determines dynamic PID coefficient according to the dynamic PID coefficient fuzzy value, including:The dynamic proportion coefficient is determined according to the dynamic proportion coefficient fuzzy value by Fuzzy Set Way;AndThe dynamic integral coefficient is determined according to the dynamic integral coefficient fuzzy value by Fuzzy Set Way;AndThe dynamic differential coefficient is determined according to the dynamic differential coefficient fuzzy value by Fuzzy Set Way.
- 5. method as claimed in claim 4, which is characterized in that the fixed PID coefficient include proportionality coefficient, integral coefficient and Differential coefficient, according to first range value, second range value, the dynamic PID coefficient and preset fixed PID coefficient Determine target aperture governing speed, including:According to the integral term, second range value, dynamic proportion of first range value, first range value about the time Coefficient, proportionality coefficient, dynamic integral coefficient, integral coefficient, dynamic differential coefficient and differential coefficient determine that target aperture adjusts speed Degree.
- 6. the method as described in claim 1, which is characterized in that this method further includes:After the area for adjusting the aperture loophole of the camera lens at least once in preset duration, determine to adjust in the preset duration It saves the number that the area causes aperture to shake and reaches preset safety value;According to the aperture governing speed that aperture is caused to shake each time, determine that aperture refers to adjustable range;According to the aperture with reference to adjustable range, the original adjustable range of preset aperture and the last light for adjusting the camera lens Aperture governing speed used in the area of loophole is enclosed, determines calibration aperture governing speed;The area of the aperture loophole of the camera lens is adjusted according to the calibration aperture governing speed.
- 7. method as claimed in claim 6, which is characterized in that determine that adjusting the area causes aperture to shake according to following methods It swings:After n-th adjusts the area of the aperture loophole in preset duration, determine that n-th adjusts the aperture loophole First brightness of the image of camera lens acquisition and to adjust the aperture according to first brightness and n-th saturating before area The second brightness of the image of the camera lens acquisition determines luminance delta after the area of unthreaded hole, and N is positive integer;The camera lens acquisition according to first brightness, second brightness, the luminance delta, the preset duration Image maximum brightness and minimum brightness judgement meet at least one preset concussion condition after, determine n-th adjust described in Aperture concussion occurs after the area of aperture loophole.
- 8. the method for claim 7, which is characterized in that the concussion condition include it is following in it is part or all of:Second brightness is more than the maximum brightness, and first brightness is less than the negative minimum brightness;Second brightness is less than the negative minimum brightness, and first brightness is more than the maximum brightness;The luminance delta is more than second brightness, and the luminance delta is more than the maximum brightness;The luminance delta is less than second brightness, and the luminance delta is less than the negative maximum brightness.
- 9. method as claimed in claim 6, which is characterized in that according to cause each time aperture shake aperture governing speed, Determine that aperture refers to adjustable range, including:Determine that first kind aperture governing speed and the second class aperture are adjusted from the aperture governing speed that aperture is caused to shake Speed;Right margin of the integration as the circle with reference to adjustable range is carried out to the minimum value in the first kind aperture governing speed, And left margin of the integration as the circle with reference to adjustable range is carried out to the maximum value in the second class aperture governing speed;Wherein, the first kind aperture governing speed meets part or all of in the following conditions:It is described default that the first kind aperture governing speed so that the second brightness of the image of the camera lens acquisition after adjusting is more than The maximum brightness of the image of the camera lens acquisition in duration, and so that the first brightness of the image of the camera lens acquisition before adjusting is small In the minimum brightness of the image of camera lens acquisition described in the negative preset duration;The first kind aperture governing speed causes the luminance delta determined according to second brightness and first brightness Value be more than second brightness, and more than the maximum brightness;The second class aperture governing speed meets part or all of in the following conditions:The second class aperture governing speed causes second brightness to be less than the negative minimum brightness, and more than the maximum Brightness;The second class aperture governing speed so that the luminance delta is less than second brightness, and less than it is negative it is described most Big brightness.
- 10. method as claimed in claim 9, which is characterized in that former with reference to adjustable range, preset aperture according to the aperture Aperture governing speed used in the area of beginning adjustable range and the last aperture loophole for adjusting the camera lens, determines school Quasi-optical circle governing speed, including:It is former with reference to right margin, the aperture of adjustable range with reference to left margin, the aperture of adjustable range according to the aperture The left margin of beginning adjustable range, the right margin of the original adjustable range of the aperture and the last aperture for adjusting the camera lens are saturating Target aperture governing speed used in the area of unthreaded hole or calibration aperture governing speed, determine calibration aperture governing speed.
- 11. method as claimed in claim 6, which is characterized in that after determining aperture with reference to adjustable range, further include:The left margin school of aperture adjustable range is determined with reference to adjustable range and the original adjustable range of the aperture according to the aperture Quasi- coefficient and right margin calibration factor;First range value, are determined according to the left margin calibration factor, the right margin calibration factor and the correspondence The correspondence after calibration between two range values and dynamic PID coefficient fuzzy value three, the correspondence after the calibration For the foundation in the area for the aperture loophole for adjusting the camera lens next time as determining dynamic PID coefficient fuzzy value.
- 12. method as claimed in claim 11, which is characterized in that the calibration PID coefficient includes dynamic proportion coefficient, dynamic Integral coefficient and dynamic differential coefficient, according to the left margin calibration factor, the right margin calibration factor and the corresponding pass System determines the correspondence after the calibration between the first range value, the second range value and dynamic PID coefficient fuzzy value three, packet It includes:Maximum value and preset first range value in the left margin calibration factor and the right margin calibration factor, Correspondence between second range value and dynamic proportion coefficient fuzzy value three, determines the first range value, the second range value And the correspondence after the calibration between dynamic proportion coefficient fuzzy value three;Minimum value and preset first range value in the left margin calibration factor and the right margin calibration factor, Correspondence between two range values and dynamic integral coefficient fuzzy value three, determine the first range value, the second range value with And the correspondence after the calibration between dynamic proportion coefficient fuzzy value three;Minimum value and preset first range value in the left margin calibration factor and the right margin calibration factor, Correspondence between two range values and dynamic differential coefficient fuzzy value three, determine the first range value, the second range value with And the correspondence after the calibration between dynamic proportion coefficient fuzzy value three.
- 13. a kind of device for adjusting aperture, which is characterized in that including memory and processor:The memory, for storing application program;The processor, for according to the application program stored in the memory, performing as described in claim 1-12 is any Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711480932.0A CN108156394B (en) | 2017-12-29 | 2017-12-29 | Method and device for adjusting aperture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711480932.0A CN108156394B (en) | 2017-12-29 | 2017-12-29 | Method and device for adjusting aperture |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108156394A true CN108156394A (en) | 2018-06-12 |
CN108156394B CN108156394B (en) | 2020-05-26 |
Family
ID=62460199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711480932.0A Active CN108156394B (en) | 2017-12-29 | 2017-12-29 | Method and device for adjusting aperture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108156394B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111064902A (en) * | 2019-12-27 | 2020-04-24 | 重庆紫光华山智安科技有限公司 | Aperture control method and device and exposure control method |
CN114302069A (en) * | 2021-11-18 | 2022-04-08 | 北京旷视科技有限公司 | Aperture control method, control device, storage medium, and computer program product |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090198351A1 (en) * | 2008-02-05 | 2009-08-06 | Sony Corporation | Control circuit and camera apparatus |
CN102420553A (en) * | 2011-12-09 | 2012-04-18 | 南京理工大学 | Multi-motor proportional synchronous control algorithm based on improved adjacent cross coupling |
CN104243835A (en) * | 2013-06-19 | 2014-12-24 | 华为技术有限公司 | Automatic diaphragm control method and system |
CN104394328A (en) * | 2014-11-27 | 2015-03-04 | 天津天地伟业数码科技有限公司 | Automatic diaphragm control method |
CN106161976A (en) * | 2016-06-23 | 2016-11-23 | 深圳英飞拓科技股份有限公司 | Auto iris control method and device for protection and monitor field |
CN106973223A (en) * | 2017-03-03 | 2017-07-21 | 安霸公司 | DC aperture control systems |
-
2017
- 2017-12-29 CN CN201711480932.0A patent/CN108156394B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090198351A1 (en) * | 2008-02-05 | 2009-08-06 | Sony Corporation | Control circuit and camera apparatus |
CN102420553A (en) * | 2011-12-09 | 2012-04-18 | 南京理工大学 | Multi-motor proportional synchronous control algorithm based on improved adjacent cross coupling |
CN104243835A (en) * | 2013-06-19 | 2014-12-24 | 华为技术有限公司 | Automatic diaphragm control method and system |
CN104394328A (en) * | 2014-11-27 | 2015-03-04 | 天津天地伟业数码科技有限公司 | Automatic diaphragm control method |
CN106161976A (en) * | 2016-06-23 | 2016-11-23 | 深圳英飞拓科技股份有限公司 | Auto iris control method and device for protection and monitor field |
CN106973223A (en) * | 2017-03-03 | 2017-07-21 | 安霸公司 | DC aperture control systems |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111064902A (en) * | 2019-12-27 | 2020-04-24 | 重庆紫光华山智安科技有限公司 | Aperture control method and device and exposure control method |
CN114302069A (en) * | 2021-11-18 | 2022-04-08 | 北京旷视科技有限公司 | Aperture control method, control device, storage medium, and computer program product |
CN114302069B (en) * | 2021-11-18 | 2023-09-01 | 北京旷视科技有限公司 | Aperture control method, control device, storage medium, and computer program product |
Also Published As
Publication number | Publication date |
---|---|
CN108156394B (en) | 2020-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106713778B (en) | Exposal control method and device | |
CN102694981B (en) | Automatic exposure method for histogram equalization based on adaptive threshold segmentation | |
CN105242481B (en) | A kind of control method and device of aperture | |
CN105979162A (en) | Automatic exposure adjustment method and device for extensible dynamic range images | |
US8121404B2 (en) | Exposure control apparatus and image pickup apparatus | |
JP2020526973A (en) | Adjustment methods for automatic exposure control of areas of interest, terminal devices, and non-temporary computer-readable storage media | |
US7518643B2 (en) | Camera device and shooting method | |
CN102724404B (en) | All weather exposure gaining automatic regulation method and system | |
US11689785B2 (en) | Dual-spectrum image automatic exposure method and apparatus, and dual-spectrum image camera and machine storage medium | |
CN108377345A (en) | A kind of exposure parameter values determine method, apparatus, multi-lens camera and storage medium | |
EP2752710B1 (en) | Lens device, camera system, and exposure control method | |
US20170078551A1 (en) | Apparatus and method for adjusting camera exposure | |
CN108156394A (en) | A kind of method and device for adjusting aperture | |
US20140240561A1 (en) | Adaptive gain control image processing system and method | |
KR20050106160A (en) | Apparatus correcting image by luminance histogram | |
CN111064902B (en) | Aperture control method and device and exposure control method | |
CN102523386A (en) | Automatic exposure method based on histogram equalization | |
CN108551553A (en) | A kind of light compensating lamp control method and device | |
CN106851126A (en) | A kind of intelligent dimming method | |
CN105489193A (en) | Image adjusting method and display device | |
KR100495415B1 (en) | Auto exposure apparatus in image sensor | |
CN109819172B (en) | Automatic exposure method and system | |
CN106034208A (en) | Method and device for automatic exposure | |
CN108668090A (en) | Optical device and its automatic explosion method | |
CN112104814B (en) | Automatic exposure adjusting method and device and LED display screen correcting method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |