CN110519513A - Anti-fluttering method and device, electronic equipment, computer readable storage medium - Google Patents

Anti-fluttering method and device, electronic equipment, computer readable storage medium Download PDF

Info

Publication number
CN110519513A
CN110519513A CN201910791295.1A CN201910791295A CN110519513A CN 110519513 A CN110519513 A CN 110519513A CN 201910791295 A CN201910791295 A CN 201910791295A CN 110519513 A CN110519513 A CN 110519513A
Authority
CN
China
Prior art keywords
attitude data
variance
image
attitude
shooting
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.)
Pending
Application number
CN201910791295.1A
Other languages
Chinese (zh)
Inventor
贾玉虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910791295.1A priority Critical patent/CN110519513A/en
Publication of CN110519513A publication Critical patent/CN110519513A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment ; Cameras comprising an electronic image sensor, e.g. digital cameras, video cameras, TV cameras, video cameras, camcorders, webcams, camera modules for embedding in other devices, e.g. mobile phones, computers or vehicles
    • H04N5/225Television cameras ; Cameras comprising an electronic image sensor, e.g. digital cameras, video cameras, camcorders, webcams, camera modules specially adapted for being embedded in other devices, e.g. mobile phones, computers or vehicles
    • H04N5/232Devices for controlling television cameras, e.g. remote control ; Control of cameras comprising an electronic image sensor
    • H04N5/23248Devices for controlling television cameras, e.g. remote control ; Control of cameras comprising an electronic image sensor for stable pick-up of the scene in spite of camera body vibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment ; Cameras comprising an electronic image sensor, e.g. digital cameras, video cameras, TV cameras, video cameras, camcorders, webcams, camera modules for embedding in other devices, e.g. mobile phones, computers or vehicles
    • H04N5/225Television cameras ; Cameras comprising an electronic image sensor, e.g. digital cameras, video cameras, camcorders, webcams, camera modules specially adapted for being embedded in other devices, e.g. mobile phones, computers or vehicles
    • H04N5/232Devices for controlling television cameras, e.g. remote control ; Control of cameras comprising an electronic image sensor
    • H04N5/23248Devices for controlling television cameras, e.g. remote control ; Control of cameras comprising an electronic image sensor for stable pick-up of the scene in spite of camera body vibration
    • H04N5/23251Motion detection
    • H04N5/23258Motion detection based on additional sensors

Abstract

This application involves a kind of anti-fluttering methods and device, electronic equipment, computer readable storage medium.The method includes obtaining shooting environmental brightness and attitude transducer attitude data collected;Determine the variance of the attitude data;The variance of the attitude data is used for the degree of jitter of characterization of electronic equipment;Target light exposure duration is determined according to the variance of the attitude data and the shooting environmental brightness;It is shot based on the target light exposure duration, obtains target image.The above method and device, electronic equipment, computer readable storage medium, can be improved the accuracy of stabilization.

Description

Anti-fluttering method and device, electronic equipment, computer readable storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of anti-fluttering method, device, electronic equipment, computer Readable storage medium storing program for executing.
Background technique
With the development of computer technology, more and more electronic equipments can carry out shooting image, also occur various The technology that image is handled.When shooting image, often make to shoot obtained image due to the shake of electronic equipment It is relatively fuzzy.Traditional anti-fluttering method, usually electronic flutter-proof or OIS (Optical image stabilization, optics Stabilization) stabilization.However, traditional stabilization technology, has that stabilization accuracy is lower.
Summary of the invention
The embodiment of the present application provides a kind of anti-fluttering method, device, electronic equipment, computer readable storage medium, Ke Yiti The accuracy of high stabilization.
A kind of anti-fluttering method, comprising:
Obtain shooting environmental brightness and attitude transducer attitude data collected;
Determine the variance of the attitude data;The variance of the attitude data is used for the degree of jitter of characterization of electronic equipment;
Target light exposure duration is determined according to the variance of the attitude data and the shooting environmental brightness;
It is shot based on the target light exposure duration, obtains target image.
A kind of anti-shake apparatus, comprising:
Module is obtained, for obtaining shooting environmental brightness and attitude transducer attitude data collected;
Computing module, for determining the variance of the attitude data;The variance of the attitude data is set for characterizing electronics Standby degree of jitter;
Target light exposure duration determining module, for being determined according to the variance of the attitude data and the shooting environmental brightness Target light exposure duration;
Shooting module obtains target image for shooting based on the target light exposure duration.
A kind of electronic equipment, including memory and processor store computer program, the calculating in the memory When machine program is executed by the processor, so that the step of processor executes above-mentioned anti-fluttering method.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of above-mentioned method is realized when row.
Above-mentioned anti-fluttering method and device, electronic equipment, computer readable storage medium obtain shooting environmental brightness and posture Sensor attitude data collected determines the variance of attitude data, variance the trembling for characterization of electronic equipment of attitude data Traverse degree, variance can more accurately indicate that attitude data deviates the degree of mean value, according to the variance of attitude data and shooting ring Border brightness can more accurately determine target light exposure duration, can take clearer image based on target light exposure duration, mention The high accuracy of stabilization.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the schematic diagram of image processing circuit in one embodiment;
Fig. 2 is the flow chart of anti-fluttering method in one embodiment;
Fig. 3 is the flow chart that step obtains shooting environmental brightness and attitude data in one embodiment;
Fig. 4 is the flow chart that step determines the first exposure time in one embodiment;
Fig. 5 is the schematic diagram of stabilization in one embodiment;
Fig. 6 is the structural block diagram of anti-shake apparatus in one embodiment;
Fig. 7 is the schematic diagram of internal structure of electronic equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein, But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes It says, in the case where not departing from scope of the present application, the first parameter can be known as the second parameter, and similarly, it can be by second Parameter is known as the first parameter.First parameter and the second parameter both parameter, but it is not same parameters.
The embodiment of the present application provides a kind of electronic equipment.It include image processing circuit, image procossing in above-mentioned electronic equipment Circuit can use hardware and or software component realization, it may include define ISP (Image Signal Processing, image Signal processing) pipeline various processing units.Fig. 1 is the schematic diagram of image processing circuit in one embodiment.As shown in Figure 1, For purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present application.
As shown in Figure 1, image processing circuit includes ISP processor 140 and control logic device 150.Imaging device 110 captures Image data handled first by ISP processor 140, ISP processor 140 to image data analyzed with capture can be used for really The image statistics of fixed and/or imaging device 110 one or more control parameters.Imaging device 110 may include having one The camera of a or multiple lens 112 and imaging sensor 114.Imaging sensor 114 may include colour filter array (such as Bayer filter), imaging sensor 114 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 114 and wavelength Information, and the one group of raw image data that can be handled by ISP processor 140 is provided.Attitude transducer 120 (such as three-axis gyroscope, Hall sensor, accelerometer) it can be based on 120 interface type of attitude transducer parameter (such as stabilization of the image procossing of acquisition Parameter) it is supplied to ISP processor 140.120 interface of attitude transducer can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, other serial or parallel camera interfaces or above-mentioned interface combination.
In addition, raw image data can also be sent to attitude transducer 120 by imaging sensor 114, sensor 120 can base Raw image data is supplied to ISP processor 140 in 120 interface type of attitude transducer or attitude transducer 120 will be former Beginning image data is stored into video memory 130.
ISP processor 140 handles raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processor 140 can carry out raw image data at one or more images Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision It carries out.
ISP processor 140 can also receive image data from video memory 130.For example, 120 interface of attitude transducer will Raw image data is sent to video memory 130, and the raw image data in video memory 130 is available to ISP processing Device 140 is for processing.Video memory 130 can be the independence in a part, storage equipment or electronic equipment of memory device Private memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
114 interface of imaging sensor is come from or from 120 interface of attitude transducer or from video memory when receiving When 130 raw image data, ISP processor 140 can carry out one or more image processing operations, such as time-domain filtering.Processing Image data afterwards can be transmitted to video memory 130, to carry out other processing before shown.ISP processor 140 Processing data are received from video memory 130, and the processing data are carried out in original domain and RGB and YCbCr color sky Between in image real time transfer.Treated that image data may be output to display 160 for ISP processor 140, for user's viewing And/or it is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP The output of processor 140 also can be transmitted to video memory 130, and display 160 can read picture number from video memory 130 According to.In one embodiment, video memory 130 can be configured to realize one or more frame buffers.
The statistical data that ISP processor 140 determines, which can be transmitted, gives control logic device Unit 150.For example, statistical data can wrap Include vibration frequency, automatic exposure, automatic white balance, automatic focusing, the flicker detection, black level compensation, 112 yin of lens of gyroscope 114 statistical informations of imaging sensors such as shadow correction.Control logic device 150 may include executing one or more routines (such as firmware) Processor and/or microcontroller, one or more routines can statistical data based on the received, determine the control of imaging device 110 The control parameter of parameter and ISP processor 140.For example, the control parameter of imaging device 110 may include that attitude transducer 120 is controlled Parameter (such as gain, the time of integration of spectrum assignment, stabilization parameter etc.) processed, camera flash control parameter, camera stabilization The combination of displacement parameter, 112 control parameter of lens (such as focusing or zoom focal length) or these parameters.ISP control parameter can Including the gain level and color correction matrix for automatic white balance and color adjustment (for example, during RGB processing), and 112 shadow correction parameter of lens.
In one embodiment, it is obtained in objective time interval by the lens 112 of imaging device 110 and imaging sensor 114 The image of shooting, and the image shot in objective time interval is sent to ISP processor 140.Attitude transducer 120 is obtained in target Attitude data collected in period, and attitude data collected in objective time interval is sent to ISP processor 140.
After ISP processor 140 gets the image of the transmission of imaging device 110, the gray value of each image of shooting is determined, The average gray value of image is determined according to the gray value of each image of shooting;Average gray value is bright for characterizing shooting environmental Degree.
After ISP processor 140 gets attitude data, the average attitude value of attitude data is determined;According to each posture number Accordingly and average attitude value determines the variance of attitude data.
When the variance of attitude data is greater than dithering threshold, ISP processor 140 obtains the first parameter and the second parameter;The One parameter is used to control the weight of the variance of attitude data, and the second parameter is used to control the weight of shooting environmental brightness;According to appearance Variance, shooting environmental brightness, the first parameter and the second parameter of state data determine the first adjustment factor;Obtain the ginseng of imaging device Examine exposure time;The first exposure time is determined according to the first adjustment factor and reference exposure duration;First exposure time is less than ginseng Examine exposure time.
When the variance of attitude data is less than or equal to dithering threshold, ISP processor 140 obtains the second adjustment factor;It obtains Take the reference exposure duration of imaging device;The second exposure time is determined according to the second adjustment factor and reference exposure duration;Second Exposure time is equal to reference exposure duration.
Determining the first exposure time or the second exposure time are sent to control logic device 150 by ISP processor 140. After control logic device 150 gets the first exposure time or the second exposure time, control imaging device 110 is based on the first exposure Duration or the second exposure time are shot, and target image is obtained.
Shooting environmental brightness and attitude transducer attitude data collected are obtained, determines the variance of attitude data, posture The variance of data is used for the degree of jitter of characterization of electronic equipment, and variance can more accurately indicate that attitude data deviates the journey of mean value Degree, can more accurately determine target light exposure duration according to the variance of attitude data and shooting environmental brightness, be based on target light exposure Duration can take clearer image, improve the accuracy of stabilization.
Fig. 2 is the flow chart of anti-fluttering method in one embodiment.Anti-fluttering method in the present embodiment, to run in Fig. 1 Electronic equipment on for be described.As shown in Fig. 2, the anti-fluttering method includes step 202 to step 208.
Step 202, shooting environmental brightness and attitude transducer attitude data collected are obtained.
Camera can be set in electronic equipment, and the quantity of the camera of setting can be one or more.For example, setting 1,2,3,5 etc., it is not limited here.The form that camera is set to electronic equipment is unlimited, for example, it may be built-in In the camera of electronic equipment, the camera of electronic equipment can also be placed outside;It can be front camera, be also possible to postposition Camera.
In embodiment provided by the present application, the camera on electronic equipment can be any type of camera.For example, Camera can be colour imagery shot, black and white camera, depth camera, focal length camera, wide-angle imaging head etc., be not limited to This.
Correspondingly, color image is obtained by colour imagery shot, black white image is obtained by black and white camera, passes through depth It spends camera and obtains depth image, focal length image is obtained by focal length camera, wide angle picture is obtained by wide-angle camera, no It is limited to this.Camera in electronic equipment can be the camera of same type, be also possible to different types of camera.Example Such as, it can be colour imagery shot, can also be black and white camera;Can one of camera be focal length camera, Other cameras are wide-angle camera, without being limited thereto.
Shooting environmental brightness refers to the brightness of the camera of the electronic equipment environment locating when shooting image.Posture passes The high performance three-dimensional that sensor is based on MEMS (Micro-Electro-Mechanical System, MEMS) technology moves Attitude measurement system.Attitude transducer may include three-axis gyroscope, three axis accelerometer, the motion-sensings such as three axle electronic compass Device.Attitude transducer attitude data collected may include angular velocity data, acceleration information, bearing data etc..
Step 204, the variance of attitude data is determined;The variance of attitude data is used for the degree of jitter of characterization of electronic equipment.
Variance is used to indicate attitude data and deviate the degree of mean value.The variance of attitude data can be used for characterizing electronics and set Standby degree of jitter.The variance of attitude data is bigger, then the degree of attitude data deviation mean value is bigger, and the shake of electronic equipment is got over Greatly.
The variance of attitude data can obtain according to the following formula:
Wherein, SNFor the variance of attitude data, N is the quantity of attitude data, Rt-iFor each attitude data, E (R) is Average attitude value, the i.e. mean value of attitude data.
Step 206, target light exposure duration is determined according to the variance of attitude data and shooting environmental brightness.
Exposure refers to that shutter moment is opened and closed camera when shooting, is projected to a certain amount of light by camera lens photosensitive On material, to generate the process of image.Exposure time refers to project light on the photosurface of photosensitive material, fastly The duration to be opened of door.It is understood that exposure time is longer, then the light being projected on photosensitive material is more, shooting The information that obtained image obtains is also more, but the image that shooting obtains is fuzzyyer;Exposure time is shorter, then is projected to photosensitive Light on material is fewer, and the information that the image shot obtains is also fewer, but the image that shooting obtains is more clear.
Shooting environmental brighter display, the light obtained when shooting is more, then can shorten exposure time, makes the figure of shooting As apparent;Shooting environmental brightness is darker, then the light obtained when shooting is fewer, then can make shooting with prolonged exposure duration Image obtains more image informations.
According to the variance of attitude data, can more accurately characterization of electronic equipment degree of jitter, then by electronic equipment Degree of jitter combines with shooting environmental brightness, can more accurately determine target light exposure duration.
Step 208, it is shot based on target light exposure duration, obtains target image.
Target image refers to the image shot based on target light exposure duration.
It is understood that imaging sensor progressive scan is exposed line by line, until institute at the beginning of exposure There is pixel to be all exposed.When subject is relative to camera high-speed motion or fast vibration, with Rolling shutter mode Shooting, progressive scan speed is inadequate, and " tilting " may occur in shooting result, " unsteadiness " or situations such as " Partial exposure ". This Rolling shutter mode shoots the phenomenon that occurring, and is just defined as roller shutter effect.Pass through the variance and shooting environmental of attitude data The target light exposure duration that brightness determines is shot, roller shutter effect when imaging sensor can be inhibited to be imaged, so as to clap Take the photograph the image being more clear.
Above-mentioned anti-fluttering method obtains shooting environmental brightness and attitude transducer attitude data collected, determines posture number According to variance, the variance of attitude data is used for the degree of jitter of characterization of electronic equipment, and variance can more accurately indicate posture number According to the degree for deviateing mean value, when can more accurately determine target light exposure according to the variance of attitude data and shooting environmental brightness It is long, clearer image can be taken based on target light exposure duration, improve the accuracy of stabilization.
In one embodiment, as shown in figure 3, obtaining shooting environmental brightness and attitude transducer posture number collected According to, comprising:
Step 302, current time is obtained, and objective time interval is determined according to current time.
Objective time interval can be the period before current time.For example, current time 40 divides 36 seconds when being 13, when target Section can be (40 divide 33 seconds when 13, and 40 divide 36 seconds when 13).Objective time interval also may include current time.For example, current time 40 divide 36 seconds when being 13, and objective time interval can be (40 divide 33 seconds when 13, and 40 divide 37 seconds when 13).Objective time interval can also be current After moment.For example, current time 40 divides 36 seconds when being 13, objective time interval can be that (40 divide 37 seconds when 13, and 40 divide 40 when 13 Second).
Step 304, the image that camera is shot in objective time interval is obtained.
In one embodiment, the frequency of camera shooting image is obtained;When frequency is less than target frequency, frequency is mentioned Up to target frequency.
Camera shoots the frame per second of image, such as 10 frames/s, indicates 10 frame images of camera shooting per second.It is understood that It is when frame per second is less than target frame rate, frame per second to be improved to target frame rate, then camera image captured in objective time interval Quantity increase, can determine more accurate shooting environmental brightness according to more images.
Step 306, shooting environmental brightness is determined according to image.
Shooting environmental brightness refers to the brightness of the camera of the electronic equipment environment locating when shooting image.Shoot ring Border brighter display, then light acquired in the image shot is more, and brightness of image is brighter, i.e., gray value is higher.Shoot ring Border brightness is darker, then light acquired in the image shot is fewer, and brightness of image is darker, i.e., gray value is lower.Therefore, may be used To determine shooting environmental brightness according to image.
In one embodiment, shooting environmental brightness can be determined according to the gray value of image, the gray value of image is bigger, Then shooting environmental brighter display.It in other embodiments, can also be according to the pixel of each pixel in the color of image, image At least one determining shooting environmental brightness therein such as value.
Step 308, attitude transducer attitude data collected in objective time interval is obtained.
In one embodiment, the frequency acquisition of attitude transducer is obtained;When frequency is less than frequency threshold, by acquisition frequency Rate is improved to frequency threshold.
The frequency acquisition of attitude transducer refers to the quantity for the attitude data that attitude transducer acquires within the unit time, Such as 20/s, 20 attitude datas of attitude transducer acquisition per second are indicated.It is understood that when frequency acquisition is less than frequency threshold When value, frequency acquisition is improved to frequency threshold, then the quantity of attitude transducer attitude data collected in objective time interval Increase, the degree of jitter of electronic equipment can be more accurately determined according to more attitude datas.
Above-mentioned anti-fluttering method obtains current time, and determines objective time interval according to current time, obtains camera in target The image shot in period can determine more accurate shooting environmental brightness according to the image in objective time interval, obtain target Attitude transducer attitude data collected in period.
In one embodiment, the image that camera is shot in the objective time interval is obtained, comprising: will be in objective time interval The image of shooting is stored into first queue;All images are obtained from first queue.
First queue can be First Input First Output, i.e., the image first stored into first queue first takes out.When by target The image shot in section is stored into first queue, can be saved the image shot in objective time interval, be facilitated calculating objective time interval The shooting environmental brightness of interior image.
In one embodiment, attitude transducer attitude data collected in objective time interval is obtained, comprising: when by target Attitude transducer attitude data collected is stored into second queue in section;All attitude datas are obtained from second queue.
Second queue can be First Input First Output, i.e., first store to the attitude data of second queue and first take out.By target Attitude transducer attitude data collected is stored to second queue in period, can save posture collected in objective time interval Data facilitate the variance for calculating the attitude data in objective time interval.
In one embodiment, shooting environmental brightness is determined according to image, comprising: determine the gray scale of each image of shooting Value;The average gray value of the image of shooting is determined according to the gray value of each image of shooting;It is characterized and is clapped using average gray value Take the photograph ambient brightness.
The gray value of image refers to the numerical value of the black and white degree of the color of image.The gray value of image can be 0-255, 0 indicates black, and 255 indicate white.Gray value is higher, indicates that image is brighter;Gray value is lower, indicates that image is darker.
In one embodiment, the gray value of each pixel of available image, by the gray value of each pixel Gray value of the average value as image.
Image is made of several pixels, obtains the gray value of each pixel, then the gray value to each pixel It averages, and using the average value as the gray value of image.
Determine that the average gray value of the image of shooting, the average gray value are used for according to the gray value of each image of acquisition Characterize shooting environmental brightness.For example, the average gray value of the image of shooting is 240, indicate that shooting environmental brightness is brighter;Shooting The average gray value of image is 150, indicates that shooting environmental brightness is darker.
In one embodiment, shooting environmental brightness can be calculated according to following calculation formula:
Wherein, BNFor average gray value, for characterizing shooting environmental brightness, N is the number of the image shot in objective time interval Amount, Rt-iFor the gray value of each image.
In other embodiments, the maximum value of the gray value of each image or minimum value can also be characterized into shooting environmental Brightness;The median of the gray value of each image or weighted average can also be characterized shooting environmental brightness, it is without being limited thereto.
Above-mentioned anti-fluttering method determines that the gray value of each image of shooting, the gray value according to each image of shooting are true Surely the average gray value of the image shot, the average gray value can more accurately characterize shooting environmental brightness.
In one embodiment, the variance of attitude data is determined, comprising: determine being averaged for the attitude data in objective time interval Attitude value;The variance for determining attitude data according to each attitude data in objective time interval and averagely attitude value.
The average attitude value of attitude data in objective time interval can be calculated according to the following formula:
Wherein, E (R) is average attitude value, and N is the quantity of the attitude data acquired in objective time interval, Rt-iFor each appearance The value of state data.
The variance of attitude data can be calculated according to the following formula:
Wherein, SNFor the variance of the attitude data in objective time interval, N is the quantity of attitude data in objective time interval, Rt-iFor Each attitude data in objective time interval, E (R) are average attitude value.
It in other embodiments, can also trembling the maximum value of each attitude data or minimum value characterization of electronic equipment Traverse degree;It can also be unlimited by the median of each attitude data or the degree of jitter of weighted average characterization of electronic equipment In this.
Above-mentioned anti-fluttering method determines the average attitude value of the attitude data in objective time interval, according to every in objective time interval A attitude data and average attitude value determine the variance of attitude data, can more accurately determine the shake journey of electronic equipment Degree.
In one embodiment, target light exposure duration is determined according to the variance of attitude data and shooting environmental brightness, comprising: According to the variance of attitude data and shooting environmental luminance acquisition Dynamic gene;Obtain the reference exposure duration of camera;According to tune Integral divisor and reference exposure duration determine target light exposure duration.
Dynamic gene refers to the factor for adjusting target light exposure duration.Reference exposure duration refers to that camera is default Exposure time be also possible to user's root if reference exposure duration can be the preset duration of the auto exposure system of camera It is without being limited thereto according to the exposure time set.
More accurate Dynamic gene can be determined according to the variance of attitude data and shooting environmental brightness, thus according to this Dynamic gene and reference exposure duration can determine more accurate target light exposure duration.
In one embodiment, as shown in figure 4, according to the variance of attitude data and shooting environmental luminance acquisition adjustment because Son, comprising:
Step 402, when the variance of attitude data is greater than dithering threshold, the first parameter and the second parameter are obtained;First ginseng The weight for controlling the variance of attitude data is counted, the second parameter is used to control the weight of shooting environmental brightness.
When the variance of attitude data is greater than dithering threshold, indicate that shake of the electronic equipment when shooting image is larger, then It is relatively fuzzy to shoot obtained image.Therefore, it is necessary to carry out stabilization to electronic equipment, so that shooting obtains clearly image.
In one embodiment, it is pre-set to can be user for the first parameter and the second parameter.
In another embodiment, when the variance of attitude data is greater than dithering threshold, the value of the first parameter is improved.
When the variance of attitude data is greater than dithering threshold, indicate that the shake of electronic equipment is larger, the camera shooting of electronic equipment Caused by shake of the fog-level of the image obtained captured by head mainly due to electronic equipment.Therefore, the first parameter is improved Value.
Step 404, the first tune is determined according to the variance of attitude data, shooting environmental brightness, the first parameter and the second parameter Integral divisor.
The first adjustment factor can be calculated according to the following formula:
θ=ln (α1SN2BN)
Wherein, θ is the first adjustment factor, α1For the first parameter, α2For the second parameter, SNFor the variance of attitude data, BNFor Shooting environmental brightness.
Target light exposure duration is determined according to Dynamic gene and reference exposure duration, comprising:
Step 406, the first exposure time is determined according to the first adjustment factor and reference exposure duration;First exposure time is small In reference exposure duration.
In one embodiment, scaling coefficient can also be obtained;Scaling coefficient is used to adjust the size of the first adjustment factor; The first exposure time is determined according to the first adjustment factor, reference exposure duration and scaling coefficient.
First exposure time can be calculated according to the following formula:
Wherein, T 'vFor the first exposure time,For reference exposure duration, k is scaling coefficient, and θ is the first adjustment factor.
In one embodiment, the above method further include: according to the available exposure value of automatic exposure formula.Automatic exposure Formula: Ev=Av+Tv=Sv+Bv.Wherein, EvIndicate exposure value, AvIndicate aperture size, TvIndicate exposure time, SvIndicate camera shooting The sensitivity of head, BvIndicate average brightness.
Obtain the aperture size A of the camera of electronic equipmentv, and the first exposure time is obtained as Tv, then can be according to Ev =Av+TvE is calculatedv, i.e. exposure value.
When the variance of attitude data is greater than dithering threshold, indicate that the shake of electronic equipment is larger, then according to the first adjustment The first exposure time that the factor and reference exposure duration determine is less than reference exposure duration, and exposure time is shorter, can take Clearer image improves the accuracy of stabilization.
In one embodiment, the above method further include: when the variance of attitude data is less than or equal to dithering threshold, obtain Take the second adjustment factor.It is described that target light exposure duration is determined according to Dynamic gene and reference exposure duration, comprising: to be adjusted according to second Integral divisor and reference exposure duration determine the second exposure time;Second exposure time is equal to reference exposure duration.
It when the variance of attitude data is less than or equal to dithering threshold, indicates that the shake of electronic equipment is smaller, then obtains the Two Dynamic genes are equal to reference exposure duration according to the second exposure time that the second adjustment factor and reference exposure duration determine.
In one embodiment, scaling coefficient can also be obtained;Scaling coefficient is used to adjust the size of the second adjustment factor; The second exposure time is determined according to the second adjustment factor, reference exposure duration and scaling coefficient.
In one embodiment, when the variance of attitude data is less than or equal to dithering threshold, the second adjustment factor can be with It is 0, then the second exposure time can be calculated according to the following formula:
Wherein, TvFor the second exposure time,For reference exposure duration, k is scaling coefficient, and θ is the second adjustment factor. When second adjustment factor θ=0, thenThat is the second exposure time T 'vEqual to reference exposure duration
In one embodiment, as shown in figure 5, the image that imaging sensor 502 is shot in objective time interval is obtained, by mesh The image shot in the mark period is stored into first queue 504.Each image is obtained from first queue 504, and determines shooting Each image gray value, average gray value is determined according to the gray value of each image of shooting;Average gray value is used for table Levy shooting environmental brightness 506.
The attitude data collected of attitude transducer 508 in objective time interval is obtained, by posture collected in objective time interval Data are stored into second queue 510.Each attitude data is obtained from second queue 510, determines the flat of each attitude data Equal attitude value, the variance 512 that attitude data is determined according to the attitude data in second queue and averagely attitude value.
Target light exposure duration 514 is determined according to the contrast 512 of attitude data and shooting environmental brightness value 506, and by target Exposure time 514 is sent to imaging sensor 502.Imaging sensor 502 is shot based on target light exposure duration 514, obtains target Image.
It should be understood that although each step in the flow chart of Fig. 2 to Fig. 4 is successively shown according to the instruction of arrow, But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, Fig. 2 is into Fig. 4 At least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps One moment executed completion, but can execute at different times, and the execution in these sub-steps or stage sequence is also not necessarily Be successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or Alternately execute.
Fig. 6 is the structural block diagram of the anti-shake apparatus of one embodiment.As shown in fig. 6, a kind of anti-shake apparatus is provided, it is special Sign is, comprising: module 602, computing module 604, target light exposure duration determining module 606 and shooting module 608 are obtained, In:
Module 602 is obtained, for obtaining shooting environmental brightness and attitude transducer attitude data collected.
Computing module 604, for determining the variance of attitude data;The variance of attitude data is trembled for characterization of electronic equipment Traverse degree.
Target light exposure duration determining module 606, for determining target according to the variance and shooting environmental brightness of attitude data Exposure time.
Shooting module 608 obtains target image for shooting based on target light exposure duration.
Above-mentioned anti-shake apparatus obtains shooting environmental brightness and attitude transducer attitude data collected, determines posture number According to variance, the variance of attitude data is used for the degree of jitter of characterization of electronic equipment, and variance can more accurately indicate posture number According to the degree for deviateing mean value, when can more accurately determine target light exposure according to the variance of attitude data and shooting environmental brightness It is long, clearer image can be taken based on target light exposure duration, improve the accuracy of stabilization.
In one embodiment, above-mentioned acquisition module 602 is also used to obtain current time, and determines mesh according to current time Mark the period;Obtain the image that camera is shot in objective time interval;Shooting environmental brightness is determined according to image;Obtain objective time interval Interior attitude transducer attitude data collected.
In one embodiment, above-mentioned acquisition module 602 is also used to determine the gray value of each image of shooting;According to bat The gray value for each image taken the photograph determines the average gray value of the image of shooting;It is bright using average gray value characterization shooting environmental Degree.
In one embodiment, above-mentioned acquisition module 602 is also used to determine the average appearance of the attitude data in objective time interval State value;The variance for determining attitude data according to each attitude data in objective time interval and averagely attitude value.Implement at one In example, above-mentioned target light exposure duration determining module 606 is also used to variance and shooting environmental luminance acquisition tune according to attitude data Integral divisor;Obtain the reference exposure duration of camera;Target light exposure duration is determined according to Dynamic gene and reference exposure duration.
In one embodiment, above-mentioned target light exposure duration determining module 606 is also used to be greater than when the variance of attitude data When dithering threshold, the first parameter and the second parameter are obtained;First parameter is used to control the weight of the variance of attitude data, the second ginseng Count the weight for controlling shooting environmental brightness;According to the variance of attitude data, shooting environmental brightness, the first parameter and the second ginseng Number determines the first adjustment factor.Target light exposure duration is determined according to Dynamic gene and reference exposure duration, comprising: is adjusted according to first Integral divisor and reference exposure duration determine the first exposure time;First exposure time is less than reference exposure duration.
In one embodiment, above-mentioned target light exposure duration determining module 606 is also used to be less than when the variance of attitude data Or when being equal to dithering threshold, the second adjustment factor is obtained.Target light exposure duration is determined according to Dynamic gene and reference exposure duration, It include: that the second exposure time is determined according to the second adjustment factor and reference exposure duration;Second exposure time is equal to reference exposure Duration.
The division of modules is only used for for example, in other embodiments, can fill stabilization in above-mentioned anti-shake apparatus It sets and is divided into different modules as required, to complete all or part of function of above-mentioned anti-shake apparatus.
Fig. 7 is the schematic diagram of internal structure of electronic equipment in one embodiment.As shown in fig. 7, the electronic equipment includes logical Cross the processor and memory of system bus connection.Wherein, which supports entire electricity for providing calculating and control ability The operation of sub- equipment.Memory may include non-volatile memory medium and built-in storage.Non-volatile memory medium is stored with behaviour Make system and computer program.The computer program can be performed by processor, to be mentioned for realizing following each embodiment A kind of anti-fluttering method supplied.Built-in storage provides cache for the operating system computer program in non-volatile memory medium Running environment.The electronic equipment can be mobile phone, tablet computer or personal digital assistant or wearable device etc..
Realizing for the modules in anti-shake apparatus provided in the embodiment of the present application can be the form of computer program.It should Computer program can be run in terminal or server.The program module that the computer program is constituted is storable in terminal or service On the memory of device.When the computer program is executed by processor, realize the embodiment of the present application described in method the step of.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When, so that the step of processor executes anti-fluttering method.
A kind of computer program product comprising instruction, when run on a computer, so that computer executes stabilization Method.
It may include non-to any reference of memory, storage, database or other media used in the embodiment of the present application Volatibility and/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM in a variety of forms may be used , such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of anti-fluttering method characterized by comprising
Obtain shooting environmental brightness and attitude transducer attitude data collected;
Determine the variance of the attitude data;The variance of the attitude data is used for the degree of jitter of characterization of electronic equipment;
Target light exposure duration is determined according to the variance of the attitude data and the shooting environmental brightness;
It is shot based on the target light exposure duration, obtains target image.
2. the method according to claim 1, wherein the acquisition shooting environmental brightness and attitude transducer are adopted The attitude data of collection, comprising:
Current time is obtained, and objective time interval is determined according to the current time;
Obtain the image that camera is shot in the objective time interval;
Shooting environmental brightness is determined according to described image;
Obtain attitude transducer attitude data collected in the objective time interval.
3. according to the method described in claim 2, it is characterized in that, described determine shooting environmental brightness according to described image, packet It includes:
Determine the gray value of each described image of shooting;
The average gray value of the image of shooting is determined according to the gray value of each described image of shooting;
The shooting environmental brightness is characterized using the average gray value.
4. according to the method described in claim 2, it is characterized in that, the variance of the determination attitude data, comprising:
Determine the average attitude value of the attitude data in the objective time interval;
According in the objective time interval each attitude data and the average attitude value determine the variance of the attitude data.
5. the method according to claim 1, wherein the variance and the shooting according to the attitude data Ambient brightness determines target light exposure duration, comprising:
According to the variance of the attitude data and the shooting environmental luminance acquisition Dynamic gene;
Obtain the reference exposure duration of camera;
Target light exposure duration is determined according to the Dynamic gene and the reference exposure duration.
6. according to the method described in claim 5, it is characterized in that, the variance and the shooting according to the attitude data Ambient brightness obtains Dynamic gene, comprising:
When the variance of the attitude data is greater than dithering threshold, the first parameter and the second parameter are obtained;First parameter is used In the weight for the variance for controlling the attitude data, second parameter is used to control the weight of the shooting environmental brightness;
The first adjustment factor is determined according to the variance of the attitude data, shooting environmental brightness, the first parameter and the second parameter;
It is described that target light exposure duration is determined according to the Dynamic gene and the reference exposure duration, comprising:
The first exposure time is determined according to the first adjustment factor and the reference exposure duration;First exposure time is small In the reference exposure duration.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
When the variance of the attitude data is less than or equal to dithering threshold, the second adjustment factor is obtained;
It is described that target light exposure duration is determined according to the Dynamic gene and the reference exposure duration, comprising:
The second exposure time is determined according to the second adjustment factor and the reference exposure duration;Described second exposure time etc. In the reference exposure duration.
8. a kind of anti-shake apparatus characterized by comprising
Module is obtained, for obtaining shooting environmental brightness and attitude transducer attitude data collected;
Computing module, for determining the variance of the attitude data;The variance of the attitude data is for characterization of electronic equipment Degree of jitter;
Target light exposure duration determining module, for determining target according to the variance and the shooting environmental brightness of the attitude data Exposure time;
Shooting module obtains target image for shooting based on the target light exposure duration.
9. a kind of electronic equipment, including memory and processor, computer program, the computer are stored in the memory When program is executed by the processor, so that the processor executes the anti-fluttering method as described in any one of claims 1 to 7 The step of.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method as described in any one of claims 1 to 7 is realized when being executed by processor.
CN201910791295.1A 2019-08-26 2019-08-26 Anti-fluttering method and device, electronic equipment, computer readable storage medium Pending CN110519513A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910791295.1A CN110519513A (en) 2019-08-26 2019-08-26 Anti-fluttering method and device, electronic equipment, computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910791295.1A CN110519513A (en) 2019-08-26 2019-08-26 Anti-fluttering method and device, electronic equipment, computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110519513A true CN110519513A (en) 2019-11-29

Family

ID=68626981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910791295.1A Pending CN110519513A (en) 2019-08-26 2019-08-26 Anti-fluttering method and device, electronic equipment, computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110519513A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140145078A1 (en) * 2006-02-17 2014-05-29 Hitachi High-Technologies Corporation Scanning electron microscope and a method for imaging a specimen using the same
CN106375676A (en) * 2016-09-20 2017-02-01 广东欧珀移动通信有限公司 Photographing control method and device of terminal equipment, and terminal equipment
CN107404618A (en) * 2017-08-01 2017-11-28 努比亚技术有限公司 A kind of image pickup method and terminal
CN107615744A (en) * 2016-04-27 2018-01-19 华为技术有限公司 A kind of image taking determination method for parameter and camera device
CN108683858A (en) * 2018-08-16 2018-10-19 Oppo广东移动通信有限公司 It takes pictures optimization method, device, storage medium and terminal device
CN109618091A (en) * 2018-10-23 2019-04-12 天津天地伟业信息系统集成有限公司 Merge the video anti-fluttering method and device of gyroscope

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140145078A1 (en) * 2006-02-17 2014-05-29 Hitachi High-Technologies Corporation Scanning electron microscope and a method for imaging a specimen using the same
CN107615744A (en) * 2016-04-27 2018-01-19 华为技术有限公司 A kind of image taking determination method for parameter and camera device
CN106375676A (en) * 2016-09-20 2017-02-01 广东欧珀移动通信有限公司 Photographing control method and device of terminal equipment, and terminal equipment
CN107404618A (en) * 2017-08-01 2017-11-28 努比亚技术有限公司 A kind of image pickup method and terminal
CN108683858A (en) * 2018-08-16 2018-10-19 Oppo广东移动通信有限公司 It takes pictures optimization method, device, storage medium and terminal device
CN109618091A (en) * 2018-10-23 2019-04-12 天津天地伟业信息系统集成有限公司 Merge the video anti-fluttering method and device of gyroscope

Similar Documents

Publication Publication Date Title
US9912875B2 (en) Imaging device and imaging method capable of generating a bulb exposure image derived from relatively bright image combination#data and relatively dark image combination data
CN108322669B (en) Image acquisition method and apparatus, imaging apparatus, and readable storage medium
JP4181923B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US7546026B2 (en) Camera exposure optimization techniques that take camera and scene motion into account
CN108200354B (en) Control method and apparatus, imaging device, computer device, and readable storage medium
CN104065868B (en) Image capture apparatus and control method thereof
CN108737734B (en) Image compensation method and apparatus, computer-readable storage medium, and electronic device
JP5898466B2 (en) Imaging device, control method thereof, and program
CN101800855B (en) Imaging apparatus
US7916181B2 (en) Method and device for creating high dynamic range pictures from multiple exposures
US8941744B2 (en) Image sensors for establishing an image sharpness value
CN101441387B (en) Imaging apparatus
JP4423678B2 (en) Imaging apparatus, imaging method, and program
CN107948519B (en) Image processing method, device and equipment
CN105594191B (en) Imaging device, image processing device, and image processing method
RU2562918C2 (en) Shooting device, shooting system and control over shooting device
JP5300590B2 (en) Image processing apparatus and method
JP5445363B2 (en) Image processing apparatus, image processing method, and image processing program
EP1583033A2 (en) Digital cameras with luminance correction
US20080112644A1 (en) Imaging device
US7664293B2 (en) Image sensing apparatus and control method thereof
CN104219436B (en) Optical devices and its control method
JP2006184679A (en) Imaging apparatus, camera shake compensation system, portable telephone and hand shake compensation method
JP4705664B2 (en) Buffer management for adaptive buffer values using accumulation and averaging
US20090051792A1 (en) Digital single-lens reflex camera

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