CN109194877A - Image compensation method and device, computer readable storage medium and electronic equipment - Google Patents
Image compensation method and device, computer readable storage medium and electronic equipment Download PDFInfo
- Publication number
- CN109194877A CN109194877A CN201811290317.8A CN201811290317A CN109194877A CN 109194877 A CN109194877 A CN 109194877A CN 201811290317 A CN201811290317 A CN 201811290317A CN 109194877 A CN109194877 A CN 109194877A
- Authority
- CN
- China
- Prior art keywords
- image
- camera
- exposure
- exposure information
- offset
- 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
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/73—Circuitry for compensating brightness variation in the scene by influencing the exposure time
-
- 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
- H04N23/62—Control of parameters via user interfaces
-
- 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
- H04N23/68—Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
- H04N23/682—Vibration or motion blur correction
- H04N23/685—Vibration or motion blur correction performed by mechanical compensation
- H04N23/687—Vibration or motion blur correction performed by mechanical compensation by shifting the lens or sensor position
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
This application involves a kind of image compensation method and device, computer readable storage medium and electronic equipment, image compensation method includes: control camera collection image, and obtains the exposure information of acquisition described image;When detecting that camera is shaken, the camera lens offset of camera when acquisition described image is obtained;Target designation function is determined according to the exposure information, and obtains image shift amount corresponding with the camera lens offset;Described image is compensated according to the exposure information and described image offset, image shift more can be accurately obtained according to exposure information, and then compensate to image, the clarity of image can be improved.
Description
Technical field
This application involves field of computer technology, more particularly to image compensation method and device, computer-readable storage
Medium and electronic equipment.
Background technique
Optical anti-vibration (Optical Image Stabilization, optical image stabilization) is as at present by public acceptance
A kind of stabilization technology, mainly corrected by the floating lens of camera lens " light shaft offset ", principle is by camera lens
Gyroscope detects small movement, and signal is then reached microprocessor, and processor calculates the displacement for needing to compensate immediately,
Then it by compensation lens set, is compensated according to the jitter direction of camera lens and displacement;To effectively overcome because of camera
Vibration generate image blur.
But the offset of image can be generated during shake, the mobile of camera lens can carry out actual influence to picture strip,
General optical anti-vibration technology can not solve the problems, such as image shift.
Summary of the invention
The embodiment of the present application provides a kind of image compensation method and device, computer readable storage medium and electronic equipment,
The image shift that can be generated to shake compensates, and improves the clarity of image.
A kind of image compensation method, which comprises
Camera collection image is controlled, and obtains the exposure information of acquisition described image;The camera includes optical picture
As systems stabilisation;
When detecting that camera is shaken, the camera lens offset of camera when acquisition described image is obtained;
Target designation function is determined according to the exposure information, and it is inclined to obtain image corresponding with the camera lens offset
Shifting amount;
Described image is compensated according to the exposure information and described image offset.
A kind of image compensation device, described device, comprising:
Exposure information obtains module, for controlling camera collection image, and obtains the exposure information of acquisition described image;
The camera includes optical image stabilizing system;
Camera lens offset obtains module, described in when detecting that camera is shaken, obtaining when acquiring described image
The camera lens of camera deviates;
Image shift obtains module, for determining target designation function according to the exposure information, and obtains and the mirror
The corresponding image shift amount of head offset;
Image compensation module, for being compensated according to the exposure information and described image offset to described image.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of image compensation method is realized when row.
A kind of electronic equipment, including memory and processor store computer-readable instruction in the memory, described
When instruction is executed by the processor, so that the step of processor executes image compensation method.
Above-mentioned image compensation method and device, computer readable storage medium and electronic equipment, can control camera and adopt
Collect image, and obtains the exposure information of acquisition described image;When detecting that camera is shaken, acquisition described image is obtained
The camera lens of Shi Suoshu camera deviates;Target designation function is determined according to the exposure information, and is obtained and deviated with the camera lens
Measure corresponding image shift amount;Described image is compensated according to the exposure information and described image offset, it can be with
Image shift is more accurately obtained according to exposure information, and then is compensated to image, the clarity of image can be improved.
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 block diagram of electronic equipment in one embodiment;
Fig. 2 is the flow chart of image compensation method in one embodiment;
Fig. 3 is to determine target designation function according to exposure information in one embodiment, and obtain opposite with camera lens offset
The flow chart for the image shift amount answered;
Fig. 4 is that every grade of standard exposure information is directed in one embodiment, determining to preset with what standard exposure information matched
The flow chart of calibration function;
Fig. 5 is the flow chart compensated according to exposure information and image shift amount to image in one embodiment;
Fig. 6 is the flow chart compensated according to exposure information and image shift amount to image in another embodiment;
Fig. 7 is the camera lens of camera when obtaining acquisition image in one embodiment when detecting that camera is shaken
The flow chart of offset;
Fig. 8 is the structure chart of image compensation device in one embodiment;
Fig. 9 is the schematic diagram of image processing circuit 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 image can be known as the second image, and similarly, it can be by second
Image is known as the first image.First image and the second image both image, but it is not same image.
Electronic equipment can shoot all scenery, the people etc. in scene by imaging device.Wherein, imaging device packet
OIS (Optical Image Stabilization, optical anti-vibration) system is included, that is, imaging device includes carrying OIS system
Camera.Optical anti-vibration is to reduce operator to the greatest extent by the structure of special camera lens or CCD photosensitive element
In use since shake causes image unstable.Specifically, when the gyroscope in camera detects small movement
When, signal can be reached to microprocessor and calculate the displacement for needing to compensate immediately, then by compensation lens set, according to camera lens
Jitter direction and displacement are compensated, thus the image blur for effectively overcoming the shake because of camera to generate.
Optionally, this programme can be applicable to include two or more cameras imaging device, wherein two
The camera for having OIS function is included at least in a or more than two cameras.
Above-mentioned imaging device can be using in the electronic device, and electronic equipment can be mobile phone, tablet computer, PDA
(Personal Digital Assistant, personal digital assistant), POS (Point of Sales, point-of-sale terminal), vehicle mounted electric
Brain, wearable device, digital camera etc. have take pictures, any terminal device of camera function.It should be noted that imaging device
It is settable to be not provided with connecting on an electronic device but with electronic equipment on an electronic device, it can on the screen of electronic equipment
Show the image of imaging device acquisition.
Imaging device can control camera collection image, and obtain the exposure information of acquisition image;Camera includes light
Learn image stabilization system;When detecting that camera is shaken, the camera lens offset of camera is obtained;It is determined according to exposure information
Target designation function, and obtain image shift amount corresponding with camera lens offset;According to exposure information and image shift amount pair
The image that camera acquires when shaking compensates.
Fig. 1 is the block diagram of electronic equipment in one embodiment.As shown in Figure 1, the electronic equipment includes passing through system bus
Processor, memory, display screen and the input unit of connection.Wherein, memory may include non-volatile memory medium and processing
Device.The non-volatile memory medium of electronic equipment is stored with operating system and computer program, and the computer program is by processor
To realize a kind of image compensation method provided in the embodiment of the present application when execution.The processor calculates and controls energy for providing
Power supports the operation of entire electronic equipment.Built-in storage in electronic equipment is the computer journey in non-volatile memory medium
The operation of sequence provides environment.The display screen of electronic equipment can be liquid crystal display or electric ink display screen etc., input dress
It sets and can be the touch layer covered on display screen, be also possible to the key being arranged on electronic equipment casing, trace ball or Trackpad,
It is also possible to external keyboard, Trackpad or mouse etc..The electronic equipment can be mobile phone, tablet computer, PDA (Personal
Digital Assistant, personal digital assistant), it is POS (Point of Sales, point-of-sale terminal), vehicle-mounted computer, wearable
Equipment, digital camera etc. have take pictures, any terminal device of camera function.It will be understood by those skilled in the art that showing in Fig. 1
Structure out, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme
The restriction of electronic equipment thereon, specific electronic equipment may include than more or fewer components as shown in the figure or group
Certain components are closed, or with different component layouts.
Fig. 2 is the flow chart of image compensation method in one embodiment.Image compensation method in one embodiment, packet
Include step 202- step 208.Wherein,
Step 202, camera collection image is controlled, and obtains the exposure information of acquisition image.
Camera includes optical image stabilizing system (Optical Image Stabilization, OIS).Camera packet
Include camera lens, voice coil motor, infrared fileter, imaging sensor (Sensor IC) and Digital Signal Processing (DSP) and PCB circuit
Plate.Wherein, camera lens is usually made of multiple eyeglasses, and imaging effect if camera lens has OIS function, is there is the case where shake
Under, control camera lens falls image shift canceling compensation caused by hand shaking relative to Image sensor shift.
When imaging device enters image preview interface, imaging device can control camera live preview and acquire each view
The image of angular region, alternatively, imaging device can shoot each angular field of view when imaging device enters image preview interface
Image.
Imaging device can also acquire the exposure information of the image during acquiring image.Wherein, exposure can refer to be imaged
The photosensitive element of equipment receives extraneous light, re-forms the process of image, which directly determines the light/dark of picture.It exposes
Light three elements are respectively aperture, shutter, sensitivity (ISO).
Exposure information can be regarded as shutter or sensitivity in exposure three elements.Wherein, shutter speed is often referred to simply as fast
Door refers to that from the time opened to closing, the sensitive time of CCD is controlled by shutter for imaging device shutter.Shutter speed is logical
Fractional form is commonly used to indicate, is in traditionally multiple proportion, by 1 second .1/1000 seconds 1/2 second ... series arrangements.Such as 1/
100 expression shutter openings are 0.01 second to closing, and 1/10 is 0.1 second.Sensitivity, also known as ISO value, can refer to egative film for light
Sensitivity level, in the case where aperture and constant shutter, sensitivity is higher, and the photoperceptivity of imaging device is stronger, takes
Image will be brighter;Otherwise it will be darker.
Step 204, when detecting that camera is shaken, the camera lens offset of camera is obtained.
It further include the gyro sensor whether shaken for detecting camera in imaging device.Work as gyro sensors
When the angular velocity information of device acquisition changes, then it is believed that the camera is shaken.It, can when camera is shaken
To obtain the camera lens offset of the camera.
Optionally, based in imaging device gyro sensor or based on electronic equipment it is original in gyro sensor
And/or acceleration transducer can detecte whether camera is shaken.
In one embodiment, two-dimensional coordinate can be established as X/Y plane using plane where the imaging sensor of camera
System, the origin position of two-dimensional coordinate system is not further in this application to be limited.Camera lens offset can be understood as camera lens and tremble
Vector shift of the initial position before current location and camera lens shake in two-dimensional coordinate system after dynamic, that is, after camera lens shake
Current location relative to camera lens shake before initial position vector distance.Wherein, initial position can be understood as camera lens with
Lens location when the distance between imaging sensor is one times of focal length of camera lens.Camera lens offset refers to that camera lens (convex lens) moves
Vector distance before and after dynamic, between optical center.
Further, can based in camera Hall sensor or laser technology come the shifting of camera lens in acquisition camera
Momentum, that is, camera lens deviates.Wherein, the Hall value of the angular velocity information of gyro sensor acquisition and Hall sensor acquisition
It is corresponding in timing.In the embodiment of the present application, it is known that the size of the Hall value of Hall sensor acquisition can determine that current
The size of the moment camera lens offset.In OIS system, the camera lens offset order of magnitude is other in the micron-scale.
It should be noted that can also synchronize judgement while control camera collection image and obtain camera lens offset, suddenly
The frequency acquisition of your sensor is higher than the frequency for obtaining camera collection image.That is, when camera acquires the same of a frame image
When, it can synchronize and obtain a plurality of lenses offset.For example, camera carries out Image Acquisition, synchronization hall sensing with 30Hz
Device carries out the acquisition of Hall value with 200Hz, then acquires the time of a frame image, acquires 6-7 Hall value for corresponding in timing,
And a plurality of lenses offset can be acquired.
Step 206, target designation function is determined according to exposure information, and it is inclined to obtain image corresponding with camera lens offset
Shifting amount.
Target designation function can be understood as the calibration function to match with current exposure information, different exposure information institutes
Corresponding target designation function may be identical, it is also possible to not identical.Since the unit of camera lens offset is code, image shift amount
Unit be pixel (pixel), camera lens offset is converted to by image shift amount based on the target designation function, can be by camera lens
Offset is converted to image shift amount.
During image shift amount can be understood as one acquisition image, within the scope of the same visual field, same characteristic point
Displacement before camera lens shake and after shake.For example, imaging device before shake, i.e., camera lens acquires first at first position
Coordinate position of each pixel in X/Y plane in image and the first image of record.When imaging device is shaken, camera lens meeting
It is moved in X/Y plane, i.e. camera lens acquires the second image and record at the second position (current location after moving)
The second image can be referred to as by each pixel in the coordinate position of X/Y plane relative to the offset of the first image in second image
Image shift amount.
Wherein, target designation function can be obtained according to specific calibration mode, and target designation function can be unitary two
Secondary function, Binary quadratic functions or the multiple function of binary, wherein can by camera lens X/Y plane along x-axis offset with along y-axis
Offset bring into target designation function, by calculate, to obtain corresponding image shift amount d1.Acquire a frame image meeting
Corresponding a plurality of lenses offset can correspond to then according to the target designation function and obtain multiple images offset.
Step 208, image is compensated according to exposure information and image shift amount.
Image is compensated according to the exposure information of acquisition and image shift amount.Its corresponding benefit of different exposure informations
Tactful difference is repaid, for example, compensation policy may include frame by frame or every frame compensation, piecemeal compensation, line by line or interlacing compensation etc..Its
In, unified compensation can be carried out using an image shift amount to the whole region of different frame image frame by frame or every frame compensation;Piecemeal
Compensation, line by line or interlacing compensation can for same frame image different zones carry out partition compensation, that is, can be to different areas
Domain is compensated using different image shift amounts.
Above-mentioned image compensation method can control camera collection image, and obtain the exposure information of acquisition described image;
When detecting that camera is shaken, the camera lens offset of camera when acquisition described image is obtained;According to the exposure
Information determines target designation function, and obtains image shift amount corresponding with the camera lens offset;Believed according to the exposure
Breath and described image offset compensate described image, more can accurately obtain image shift according to exposure information,
And then compensated to image, the clarity of image can be improved.
Fig. 3 is to determine target designation function according to exposure information in one embodiment, and obtain opposite with camera lens offset
The flow chart for the image shift amount answered.In one embodiment, target designation function, and acquisition and mirror are determined according to exposure information
The corresponding image shift amount of head offset, comprising:
Step 302, the standard exposure information of multiple gears and the mapping relations of multiple preset calibrations functions are constructed.
In one embodiment, exposure information is sensitivity, and sensitivity is to measure egative film for the sensitivity level of light, by quick
Sensitivity surveying and the several numerical value of measurement determine.Wherein, sensitivity include ISO100, ISO200, ISO400, ISO800,
More a gears of ISO1000, ISO1600, ISO3200, ISO6400, ISO12800 etc..During acquiring image, Ke Yizhi
Obtain the sensitivity for taking current acquired image, such as ISO400.
The standard exposure information of multiple gears can be stored in advance in electronic equipment, wherein can be by standard exposure information
Gear is set as five gears, distinguishes ISO100 (one grade), ISO500 (two grades), ISO1000 (third gear), ISO2000 (four
Shelves), ISO4000 (five grades).
Optionally, the gear of standard exposure information can also be set to six gears, difference ISO100 (one grade),
ISO200 (two grades), ISO400 (third gear), ISO800 (fourth gear), ISO1000 (five grades), ISO1600 (six grades).In the application reality
It applies in example, the numbers of gear steps of established standards exposure information and the specific value of each gear can be come according to actual needs,
This is not further to be limited.
For example, when the gear of standard exposure information is set five gears by electronic equipment, difference SO100, ISO500,
When ISO1000, ISO2000, ISO4000, electronic equipment can respectively ISO100, ISO500, ISO1000, ISO2000,
In the case where ISO4000, according to preset calibrations model to determine the preset calibrations function with calibration coefficient.Wherein, Mei Gedang
The corresponding preset calibrations model of the standard exposure information of position is assured that unique pre- bidding according to the preset calibrations module
Determine function.It is corresponding if the standard exposure information including five gears, it can also determine five corresponding preset calibrations functions
It can be denoted as F respectively1(ΔX,ΔY)、F2(ΔX,ΔY)、F3(ΔX,ΔY)、(ΔX,ΔY)、F5(ΔX,ΔY)。
For example, mapping relations are represented by ISO100 → F1(ΔX,ΔY)、ISO500→F2(ΔX,ΔY)、ISO1000→
F3(ΔX,ΔY)、ISO2000F4→(ΔX,ΔY)、ISO4000→F5(ΔX,ΔY)。
Specifically, preset calibrations function can be One- place 2-th Order function, Binary quadratic functions, the multiple function of binary etc.,
The numerical value of its sensitivity is lower, and the dimension of corresponding preset calibrations function is also more complicated, and the numerical value of sensitivity is higher,
The dimension of corresponding preset calibrations function is also simpler.
Under conditions of same aperture, if same exposure value need to be obtained, sensitivity is inversely proportional with shutter speed, that is,
Sensitivity is higher, and corresponding enabling speed is also just also small, conversely, if sensitivity is smaller, corresponding enabling speed is also
Greatly.
Optionally, in one embodiment, exposure information can be with shutter speed.Shutter speed represents the time for exposure
Length, usually under conditions of bright and clear, the required time for exposure is shorter, under the situation of insufficient light, required exposure
Time is longer.Shutter speed is usually indicated with fractional form, is in traditionally multiple proportion, by 1 second, 1/2 second ... .1/1000
The series arrangement of second.The standard exposure information of multiple gears can be stored in advance in electronic equipment, wherein can believe standard exposure
The gear of breath is set as five gears, distinguishes 1 second, 1/2 second, 1/4 second, 1/8 second, 1/16 second.Electronic equipment can be respectively 1
Second, 1/2 second, 1/4 second, 1/8 second in the case where 1/16 second, have the default of calibration coefficient according to preset calibrations model to determine
Calibration function.Wherein, as soon as the standard exposure information of each gear corresponds to a preset calibrations model, according to the preset calibrations module
It can determine unique preset calibrations function.If the standard exposure information including five gears, corresponding, five can also be determined
A corresponding preset calibrations function.Its shutter speed is faster, and the dimension of corresponding preset calibrations function is also simpler, fast
Door speed is slower, and the dimension of corresponding preset calibrations function is also more complicated.
Step 304, the gear of exposure information is determined according to the standard exposure information of multiple gears.
Exposure information when the available acquisition image of electronic equipment, the standard exposure of exposure information and multiple gears is believed
Breath compares, with the determining and immediate standard exposure information of the exposure information.For example, exposure information when acquisition image is
ISO400, the gear of standard exposure information are set as five gears, difference ISO100, ISO500, ISO1000,
ISO2000, ISO4000 are right then it was determined that being ISO500 with this and the immediate standard exposure information of the exposure information
The gear answered is two grades, that is, the gear of current exposure information is also second gear.Correspondingly, if exposure information is shutter speed,
Can determine with the immediate standard exposure information of the shutter speed, and then determine the shutter speed gear.
Step 306, according to mapping relations, the determining gear with exposure information matches in multiple preset calibrations functions
Target designation function.
If the mapping relations in electronic equipment are ISO100 → F1(ΔX,ΔY)、ISO500→F2(ΔX,ΔY)、
ISO1000→F3(ΔX,ΔY)、ISO2000F4→(ΔX,ΔY)、ISO4000→F5(Δ X, Δ Y), according to determining exposure
The gear of information can determine target designation function from five preset calibrations functions.If the gear of exposure information ISO400 is
Two grades, secondly the corresponding preset calibrations function of shelves standard exposure information ISO500 is F2(Δ X, Δ Y) then exposes two grades of standards
Preset calibrations function corresponding to optical information is referred to as target designation function.
Step 308, image shift amount corresponding with camera lens offset is determined according to target designation function.
In one embodiment, preset calibrations function can be One- place 2-th Order function, Binary quadratic functions, the multiple letter of binary
Number etc..For example, preset calibrations function F1(Δ X, Δ Y) can be indicated are as follows:
F1(Δ X, Δ Y)=ax(n)+by(n)+...+cxy+dx+ey+f;
Preset calibrations function F2 (Δ X, Δ Y) can be indicated are as follows:
F2(Δ X, Δ Y)=ax2+by2+cxy+dx+ey+f
Preset calibrations function F3 (Δ X, Δ Y) can be indicated are as follows:
F3(Δ X, Δ Y)=ax2+by2+cx+dy+e
Preset calibrations function F4 (Δ X, Δ Y) can be indicated are as follows:
F4(Δ X, Δ Y)=axy+bx+cy+d
Preset calibrations function F5 (Δ X, Δ Y) can be indicated are as follows:
F5(Δ X, Δ Y)=ax+by+c
In the above formulas, a, b, c, d, e, f are respectively calibration coefficient, are known coefficient.Fi(Δ X, Δ Y) (i=1,2,3,
4,5) for indicate present image offset, x, y respectively indicate the horizontal axis coordinate of current lens offset, ordinate of orthogonal axes.
Above-mentioned preset calibrations function is obtained according to preset rules.It should be noted that the table of preset calibrations function
It is not limited to the example above explanation up to formula, can also be indicated with other expression formulas.
If target designation function is preset calibrations function F2 (Δ X, Δ Y), then according to target designation function F2 (Δ X, Δ Y)
Available image shift amount.For example, if current camera lens offset is p (2,1), then corresponding image shift amount F2 (Δ X,
Δ Y) it is 4a+b+2c+2d+e+f, according to determining calibration coefficient, then available image shift amount F2 (Δ X, Δ Y), the figure
As offset is scalar offset.The preset calibrations function is Binary quadratic functions, comprehensively considers the x-axis offset of camera lens offset
The information of two dimensions is deviated with y-axis, camera lens offset more accurate, efficiently can be converted into image shift amount.
It in one embodiment, further include step before constructing standard exposure information and the mapping relations of preset calibrations function
300, for every grade of standard exposure information, the determining preset calibrations function to match with standard exposure information.
Fig. 4 is that every grade of standard exposure information is directed in one embodiment, determining to preset with what standard exposure information matched
The flow chart of calibration function.Specifically, it is directed to every grade of standard exposure information, the determining pre- bidding to match with standard exposure information
Determine function, comprising:
Step 402, for every grade of standard exposure information, drive motor is according to desired guiding trajectory dollying head, desired guiding trajectory
Including multiple displacement points.
Test chart is fixed in the areas imaging of camera, and controls motor according to desired guiding trajectory dollying head
Lens driving camera lens.Wherein, test chart can be CTF (Contrast Transfer Function) target, SFR
(Spatial Frequency Response) target, DB target or other customized targets.Desired guiding trajectory can be circumference, ellipse
Circle, rectangle or other desired guiding trajectories.Multiple displacement points are set on desired guiding trajectory, wherein the distance of two neighboring displacement point
Can be identical, it can not also be identical.The location information of its displacement point can be indicated with coordinate position in the xy plane.Example
Such as, displacement point qiLocation information can use coordinate position q in the xy planei(xi,yj) be indicated, that is, the of displacement point
One location information can use coordinate qi(xi,yj) be indicated.
If the gear of standard exposure information is set as five gears, difference ISO100, ISO500, ISO1000,
ISO2000,ISO4000.Then respectively in the standard exposure information of ISO100, ISO500, ISO1000, ISO2000, ISO4000
Lower driving, motor is according to desired guiding trajectory dollying head, and grouped record stores corresponding image data.
Step 404, when camera lens is moved to each displacement point, the image information of corresponding collecting test target.
When drive motor pushes the camera lens of camera mobile according to desired guiding trajectory, corresponding acquisition is surveyed in each displacement point
The image information of test-object plate.The image information of the corresponding width test chart of one displacement point, the image information can be understood as structure
At the location information of multiple pixels of the image.For example, needing six width of corresponding acquisition when the quantity of displacement point is six
The image information of test chart.
Step 406, the corresponding first location information for obtaining each displacement point and the image information in the acquisition of each displacement point
In image shift amount of the same characteristic point relative to initial position.
Electronic equipment can choose a characteristic point p in image informationi, to obtain in characteristic point piSecond confidence
Breath, characteristic point piSecond location information can also use coordinate p in the xy planei(Xi,Yj) be indicated.
Wherein, characteristic point piIt can be the corresponding photographic subjects object of pixel in the image information by entad,
Or the most bright pixel of brightness or other corresponding photographic subjects of pixel with prominent meaning in the image information
Object, here, specific location to characteristic point and defining not further limited.
It should be noted that photographic subjects object corresponding to characteristic point in the image information of multiple test charts is identical,
That is, the location information of the characteristic point in the image information of different displacement points acquisition is different, but the corresponding bat of same characteristic point
It is identical to take the photograph object.
In one embodiment, displacement point q of the camera lens in initial position0(x0,y0) it can be origin.When camera lens is first
Beginning position q0(x0,y0) when, characteristic point in the image information of retrievable test chart, this feature point can also use p0(X0,Y0) table
Show.
When camera lens is moved to displacement point q1(x1,y1) when, correspond to the characteristic point p in the image information for obtaining test chart1
(X1,Y1) and this feature point p1(X1,Y1) relative to the characteristic point p obtained in initial position0(X0,Y0) image shift amount
d1;And so on, when camera lens is moved to displacement point q6(x6,y6) when, correspond to the characteristic point in the image information for obtaining test chart
p6(X6,Y6) and in this feature point p6(X6,Y6) relative to the characteristic point p obtained in initial position0(X0,Y0) image shift
Measure d6.
Step 408, first location information and image shift are input to default bias transformation model, there is calibration to determine
The default bias transfer function of coefficient, wherein the quantity of displacement point and the quantity of calibration coefficient are associated.
The standard exposure information of different gears corresponds to different preset calibrations models, different preset calibrations model tools
There is different calibration coefficients.Wherein, preset calibrations model is different, and the quantity for the displacement point for needing to obtain is not also identical, and pre-
If the quantity of the unknowm coefficient in peg model is less than or equal to the quantity of displacement point.
Preset calibrations model can be One- place 2-th Order function model, Binary quadratic functions model, or binary is multiple
Function model, the setting of the preset calibrations model are obtained by way of study.
Corresponding preset calibrations model, and the spy that will acquire can be determined according to the gear of current standard exposure information
The first location information of transfer point is levied, the second location information and image shift amount of characteristic point corresponding with the displacement point are equal
Input value preset calibrations model determines each coefficient in the preset calibrations model, and then have calibration by analytic operation
The preset calibrations function of coefficient.Correspondingly, preset calibrations function corresponding to the standard exposure information of available each gear.
It should be noted that preset calibrations model is consistent with the expression formula of preset calibrations function, for preset calibrations model,
Calibration coefficient therein is unknown number, and for preset calibrations function, corresponding calibration coefficient is datum.
For example, can be indicated with following formula when preset calibrations model is Binary quadratic functions model:
F (Δ X, Δ Y)=ax2+by2+cxy+dx+ey+f
In formula, (Δ X, Δ Y) indicates that image shift amount, the image shift amount indicate current displacement point q (xi,yj) relative to
In initial position q (x0,y0) at obtain same characteristic point image shift amount, the image shift amount be scalar offset, that is,
Current displacement point q (xi,yj) and initial position q (x0,y0) the distance between same characteristic point.X indicates displacement point horizontal axis x's
Coordinate parameters;The coordinate parameters of y expression displacement point longitudinal axis y.
It wherein, include six unknowm coefficients a, b, c, d, e, f, six displacement points that will acquire in Binary quadratic functions model
q1(x1,y1)-q6(x6,y6) and with six characteristic point p1(X1,Y1)-p6(X6,Y6) corresponding image shift amount d1-d6Respectively
It is input to Binary quadratic functions model, so that it may parse a, b, c, d, e, f in above-mentioned equation, wherein the coefficient a of acquisition,
B, c, d, e, f bring Binary quadratic functions model into, then available corresponding preset calibrations function, wherein a, b, c, d, e, f are
The calibration coefficient of preset calibrations function.
Image compensation method in the present embodiment, according to preset calibrations model, multiple displacement points and corresponding multiple spies
Point, available corresponding preset calibrations function are levied, it is accurate, efficient which can be directly based upon camera lens offset
Acquisition image shift magnitude, calibration efficiency, precision is higher, has established good basis for compensation image.
Fig. 5 is the flow chart compensated according to exposure information and image shift amount to image in one embodiment.One
In a embodiment, image is compensated according to exposure information and image shift amount, comprising:
Step 502, determine that the levels of exposure of exposure information, levels of exposure include that level-one exposure, second level exposure and three-level expose
Light.
In one embodiment, if exposure information is sensitivity, its levels of exposure can be set according to sensitivity.Electricity
The sensitivity of sub- equipment include ISO100, ISO200, ISO400, ISO800, ISO1000, ISO1600, ISO3200,
It is isometrical can to divide exposure according to sensitivity by ISO6400, ISO12800 etc..For example, ISO500 can will be less than or equal to
Sensitivity as level-one expose, will be greater than ISO500 and less than or equal to ISO1000 sensitivity as second level exposure, will be big
It is exposed in the sensitivity of ISO1000 as three-level.Electronic equipment can be exposed according to the level-one of setting, second level exposure and three-level expose
Light determines the levels of exposure of current exposure information.
In one embodiment, if exposure information is shutter speed, its exposure etc. can be set according to shutter speed
Grade.The shutter speed of electronic equipment include 1 second, 1/2 second, 1/4 second, 1/8 second, 1/16 second etc., can according to shutter speed come
It is isometrical to divide exposure.For example, 1/2 second shutter speed of the shutter speed less than or equal to 1/8 second can be will be greater than as level-one
Exposure, will be greater than 1/8 second and the shutter speed less than or equal to 1/2 second is exposed as second level, will be greater than 1/2 second shutter speed
For three-level exposure.Electronic equipment can be exposed according to the level-one of setting, second level exposure and three-level expose to determine that current exposure is believed
The levels of exposure of breath.
It should be noted that electronic equipment divides levels of exposure according to exposure information, specific division rule is unlimited
Illustrate in the example above, the range of the exposure information of each levels of exposure can also be set according to actual needs.
Step 504, corresponding compensation policy is determined according to levels of exposure.
The corresponding image compensation strategy of each levels of exposure is different.Specifically, corresponding when levels of exposure is that level-one exposes
Compensation policy be frame by frame or every frame compensate;When levels of exposure is that second level exposes, corresponding compensation policy is piecemeal compensation;When
When levels of exposure is that three-level exposes, corresponding compensation policy is line by line or interlacing compensates.
Step 506, image is compensated according to image shift amount and compensation policy.
In one embodiment, if the corresponding levels of exposure of exposure information is that level-one exposes, can using frame by frame or
It is compensated every frame.When electronic equipment acquires a frame image, it is multiple for corresponding to the image shift amount obtained.When using frame by frame or every frame
When compensation policy compensates image, it is the smallest minimum image offset, derivative can be obtained in multiple images offset
Image shift amount differs the smallest image shift amount with average jitter amount as target image offset to every frame image or every frame
The all pixels point of image compensates.
In one embodiment, it if the corresponding levels of exposure of exposure information is that second level exposes, can be compensated with piecemeal.Electricity
When sub- equipment acquires a frame image, it is multiple for corresponding to the image shift amount obtained.For example, there is hall1-hall6 totally six at present
A Hall value, each Hall value correspond to only one image shift amount, are denoted as biaspixel1-biaspixel6, at this point, if
CMOS scans 60 rows, then can carry out piecemeal amendment, i.e. 60 rows are divided into 6 pieces, and one piece includes 10 rows, uses biaspixel1- respectively
Biaspixel6 carries out block-by-block amendment to this 6 blocks of images, that is, first piece of 10 row for including is all made of biaspixel1 as amendment
Parameter compensates and corrects, and second piece of 10 row for including is compensated and corrected using biaspixel2 as corrected parameter.
It in one embodiment, can line by line or interlacing if the corresponding levels of exposure of exposure information is that three-level exposes
Compensation.When electronic equipment acquires a frame image, it is multiple for corresponding to the image shift amount obtained.For example, there is hall1-hall6 total
Six Hall values, each Hall value correspond to only one image shift amount, and 6 image shift amounts can be denoted as respectively
Biaspixel1-biaspixel6, at this point, available biaspixel1 carries out the 1st row pixel if CMOS scans 6 rows
Compensation, compensates the 2nd row pixel with biaspixel2, can be compensated with biaspixel3 to the 3rd row pixel, uses
Biaspixel4 compensates the 4th row pixel, can use biaspixel, and 5 pair of the 5th row pixel compensates, and uses
Biaspixel6 compensates the 6th row pixel, that is, being clicked through using biaspixel1-biaspixel6 to 1-6 row pixel
Row compensates line by line, and so on, to complete the compensation to this image
Optionally, 6 image shift amount biaspixel1-biaspixel6 of acquisition are also based on, arbitrarily select 1
A, 2 or 3 image shift amounts carry out interlacing compensation to the 1st row, the 3rd row, the 5th row pixel respectively, or, respectively to the 2nd
Row, the 4th row, the 6th row pixel carry out interlacing compensation, and so on, to complete the compensation to this image.
In the present embodiment, adaptively image can be mended using different compensation policies based on different levels of exposure
It repays, the image definition under different levels of exposure can be improved.
Fig. 6 is in one embodiment when levels of exposure is second level exposure, according to image shift amount and compensation policy to figure
As the flow chart compensated.In one embodiment, when levels of exposure is that second level exposes, according to image shift amount and compensation
Strategy compensates image, comprising:
Step 602, image is identified, to identify region to be compensated and non-compensatory zone, wherein non-compensatory zone
The color of each pixel is identical, and the non-compensatory zone accounts for the ratio of image more than or equal to preset value.
In one embodiment, in the available image of electronic equipment each pixel color value;Based on described each
The color value of pixel clusters each pixel.Wherein, the color value of the pixel in each pixel classification is identical;
For every class pixel after clustering processing, the wheel for each connected region being made of the pixel in such pixel is determined
Exterior feature obtains profile set, and then obtains the area of each profile set, to filter out the profile with maximum area, and should
The corresponding region of profile is as non-compensatory zone.
Wherein, the intersection in non-compensatory zone and region to be compensated is whole image, after obtaining non-compensatory zone, judges that this is non-
Compensatory zone accounts for whole image ratio, if the ratio is greater than or equal to preset value, then it is assumed that the non-compensatory zone is effective, and then obtains
Take region to be compensated.If the ratio is less than preset value, then it is assumed that the non-compensatory zone is effective, then using whole image as to be compensated
Region.
Further, preset value can be half, and the data such as 3/5ths, 4/7ths, specific preset value is not
It is further to be limited, it can set according to actual needs.
For example, most of region is ater region in image, and only opposite if the image of acquisition is night scene image
Smaller portions are light region, then can be using black region as non-compensatory zone, and using light region as region to be compensated.
If the image of acquisition is portrait+Background, wherein portrait is foreground area, and background area is the region with same color,
Do the background area account for whole image ratio be greater than or equal to preset value, then using background area as non-compensatory zone, by people
Picture foreground area is used as band compensatory zone, and the ratio which accounts for whole image is less than preset value, then makees whole image
For region to be compensated.
It should be noted that the mode of its image recognition is not limited to the example above explanation, can also be mentioned using color characteristic
The algorithm of texture feature extraction Edge Gradient Feature is taken to be identified, here, to region to be compensated and non-compensatory zone is identified
Mode is not further to be limited.
Step 604, compensatory zone is compensated according to image shift amount and compensation policy.
The corresponding compensation policy of second level levels of exposure is piecemeal compensation, that is, according to image shift amount, it can be to be compensated
Region carries out piecemeal compensation, that is, can treat compensatory zone carries out fining compensation, and does not do any place to non-compensatory zone
Reason, to improve the clarity in region to be compensated, while improving the efficiency of image procossing.
Fig. 7 is the camera lens of camera when obtaining acquisition image in one embodiment when detecting that camera is shaken
The flow chart of offset.In one embodiment, when detecting that camera is shaken, the mirror of camera when obtaining acquisition image
Head offset, comprising:
Step 702, when detecting that camera is shaken, the multiple of camera are trembled when synchronous acquisition acquires a frame image
Momentum.
Specifically, obtain camera collection image first frequency and gyro sensor acquisition angular velocity information the
Two frequencies;That is, while camera acquires a frame image, the synchronous multiple angular speed letter for obtaining gyro sensor acquisition
Breath.Wherein, the frequency acquisition of gyro sensor is higher than the frequency for obtaining camera collection image.For example, camera is with 30Hz
Image Acquisition is carried out, synchronization is carried out the acquisition of angular velocity information with 200Hz with gyro sensor, then acquires a frame image
Time, acquire 6-7 angular velocity information for corresponding in timing.
Corresponding amount of jitter is determined according to multiple angular velocity informations of acquisition, wherein amount of jitter and angular velocity information are one by one
It is corresponding, the corresponding amount of jitter of each angular velocity information, then corresponding 6~7 amount of jitter of 6~7 angular velocity informations acquired.It trembles
Momentum can be understood as the angle information after angular velocity information integral.Wherein, the time of integration and gyro sensor acquisition angle speed
Spend the frequency dependence of information.
Step 704, the movement of motor driving cam lens is controlled according to multiple amount of jitter.
Wherein, in the imaging device further include motor for driving the camera lens of camera mobile and for controlling motor
The OIS controller of movement.When gyro sensor detects that camera is shaken, electronic equipment can be according to the more of acquisition
For a amount of jitter control motor to drive the camera lens of camera mobile, the amount of movement of camera lens is contrary with the amount of jitter, with
It is deviated caused by eliminating because of shake.
Step 706, the camera lens offset of camera, angular velocity information and Hall are determined based on the Hall value of Hall sensor
It is worth synchronous acquisition.
Wherein, in the imaging device further include Hall sensor for recording eyeglass amount of movement, Hall sensor is root
According to Hall effect make a kind of magnetic field sensor, Hall effect in essence be movement charged particle in magnetic field by Lip river
Deflection caused by logical sequence hereby power effect.Wherein, the Hall of the angular velocity information of gyro sensor acquisition and Hall sensor acquisition
Value is corresponding in timing.
Imaging device can by deviation scale of the camera lens of Hall sensor or laser recording camera on X/Y plane,
It, can be with record-shifted direction, according to the corresponding distance of each scale, and offset side and while record-shifted scale
To then obtaining camera lens offset p (xi,yj)。
It is corresponding in timing based on gyro sensor and the frequency of Hall sensor acquisition data in the present embodiment, together
When, camera acquisition reference object is different from gyro sensor acquisition data synchronous and frequency on timestamp, acquires a frame
The time of image can correspond to the multiple angular velocity informations of acquisition, and then can determine that a plurality of lenses are inclined in multiple angular velocity informations
The precision and effect of image compensation has then can be improved to be converted to multiple images offset in shifting amount.
It should be understood that although each step in the flow chart of Fig. 2-7 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-7
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
Fig. 8 is the structure chart of image compensation device in one embodiment.The embodiment of the present application also provides a kind of image benefits
Device is repaid, applied to the imaging device including optical image stabilizing system, imaging device, which is equipped with, carries optical image stabilizing system
Camera, image compensation device, comprising: exposure information obtains module 810, camera lens offset obtains module 820, image shift and obtains
Modulus block 830 and image compensation module 840.Wherein,
Exposure information obtains module 810, for controlling camera collection image, and obtains the exposure information of acquisition image;
Camera includes optical image stabilizing system;
Camera lens offset obtains module 820, and the camera lens for when detecting that camera is shaken, obtaining camera is inclined
It moves;
Image shift obtains module 830, for determining target designation function according to exposure information, and obtains and deviates with camera lens
Measure corresponding image shift amount;
Image compensation module 840, for being compensated according to exposure information and image shift amount to image.
Above-mentioned image compensation device, can control camera collection image, and obtain the exposure information of acquisition described image;
When detecting that camera is shaken, the camera lens offset of camera when acquisition described image is obtained;According to the exposure
Information determines target designation function, and obtains image shift amount corresponding with the camera lens offset;Believed according to the exposure
Breath and described image offset compensate described image, more can accurately obtain image shift according to exposure information,
And then compensated to image, the clarity of image can be improved.
In one embodiment, the exposure information includes shutter speed or sensitivity;Image shift obtains module 830,
Include:
Construction unit, for constructing the standard exposure information of multiple gears and the mapping relations of multiple preset calibrations functions,
Wherein, the standard exposure information of each gear corresponds to a preset calibrations function;
Gear determination unit determines the shelves of the exposure information for the standard exposure information according to the multiple gear
Position;
Matching unit is used for the determining and exposure in the multiple preset calibrations function according to the mapping relations
The target designation function that the gear of information matches;
Acquiring unit is deviated, for determining image corresponding with the camera lens offset according to the target designation function
Offset.
In one embodiment, image shift obtains module 830, further includes:
Function determination unit, for being directed to every grade of standard exposure information, determination and the standard exposure information phase
The preset calibrations function matched.
Image compensation method in the present embodiment, according to preset calibrations model, multiple displacement points and corresponding multiple spies
Point, available corresponding preset calibrations function are levied, it is accurate, efficient which can be directly based upon camera lens offset
Acquisition image shift magnitude, calibration efficiency, precision is higher, has established good basis for compensation image.
In one embodiment, image compensation module 840, comprising:
Level de-termination unit, for determining the levels of exposure of the exposure information, the levels of exposure include level-one exposure,
Second level exposure and three-level exposure;
Policy unit, for determining corresponding compensation policy according to the levels of exposure;
Compensating unit, for being compensated according to described image offset and the compensation policy to described image.
In one embodiment, policy unit is also used to:
When the levels of exposure is that level-one exposes, corresponding compensation policy is to compensate frame by frame or every frame;
When the levels of exposure is that second level exposes, corresponding compensation policy is piecemeal compensation;
When the levels of exposure is that three-level exposes, corresponding compensation policy is line by line or interlacing compensates.
In the present embodiment, adaptively image can be mended using different compensation policies based on different levels of exposure
It repays, the image definition under different levels of exposure can be improved.
In one embodiment, when the levels of exposure is that second level exposes, compensating unit is also used to: to described image
It is identified, to identify region to be compensated and non-compensatory zone, wherein the color phase of each pixel of the non-compensatory zone
Together, and the non-compensatory zone accounts for the ratio of image more than or equal to preset value;According to described image offset and the compensation
Strategy compensates the compensatory zone.
In the present embodiment, compensatory zone can be treated and carry out fining compensation, and it is without any processing to non-compensatory zone,
To improve the clarity in region to be compensated, while improving the efficiency of image procossing.
In one embodiment, camera lens offset obtains module 820, comprising:
Acquisition unit is shaken, when obtaining one frame described image of acquisition for synchronizing when detecting that camera is shaken
Multiple amount of jitter of the camera;
Driving unit, for controlling the movement that motor drives the cam lens according to the multiple amount of jitter;
Computing unit determines the camera lens offset of the camera for the Hall value based on Hall sensor, described to tremble
Momentum and the Hall value synchronous acquisition.
It is corresponding in timing based on gyro sensor and the frequency of Hall sensor acquisition data in the present embodiment, together
When, camera acquisition reference object is different from gyro sensor acquisition data synchronous and frequency on timestamp, acquires a frame
The time of image can correspond to the multiple angular velocity informations of acquisition, and then can determine that a plurality of lenses are inclined in multiple angular velocity informations
The precision and effect of image compensation has then can be improved to be converted to multiple images offset in shifting amount.
The division of modules is only used for for example, in other embodiments, can will scheme in above-mentioned image compensation device
As compensation device is divided into different modules as required, to complete all or part of function of above-mentioned image compensation device.
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 processor executes the image compensation method in any of the above-described embodiment.
The embodiment of the present application also provides a kind of electronic equipment.Electronic equipment includes that the imaging of optical image stabilizing system is set
Standby, memory and processor, the imaging device include the camera shooting for carrying optical image stabilizing system;It is stored in the memory
There is computer-readable instruction, when described instruction is executed by the processor, so that the processor executes any of the above-described embodiment
In image compensation method.It include image processing circuit in electronic equipment, image processing circuit can use hardware and/or software
Component is realized, it may include defines the various processing lists of ISP (Image Signal Processing, image signal process) pipeline
Member.Fig. 9 is the schematic diagram of image processing circuit in one embodiment.As shown in figure 9, for purposes of illustration only, only showing and the application
The various aspects of the relevant image compensation techniques of embodiment.
As shown in figure 9, image processing circuit includes ISP processor 940 and control logic device 950.Imaging device 910 captures
Image data handled first by ISP processor 940, ISP processor 940 to image data analyzed with capture can be used for really
The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include having one
The camera of a or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as
Bayer filter), imaging sensor 914 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 914 and wavelength
Information, and the one group of raw image data that can be handled by ISP processor 940 is provided.Sensor 920 (such as gyroscope) can be based on biography
The parameter (such as stabilization parameter) of the image compensation of acquisition is supplied to ISP processor 940 by 920 interface type of sensor.Sensor 920
Interface can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface,
The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 920 by imaging sensor 914, sensor 920 can be based on biography
920 interface type of sensor is supplied to raw image data that ISP processor 940 is handled or sensor 920 is by original graph
As data storage is into video memory 930.
ISP processor 940 handles raw image data pixel by pixel in various formats.For example, each image pixel can
Bit depth with 9,10,12 or 14 bits, ISP processor 940 can carry out one or more images to raw image data and mend
It repays operation, collect the statistical information about image data.Wherein, image compensation operation can be by identical or different bit depth precision
It carries out.
ISP processor 940 can also receive pixel data from video memory 930.For example, 920 interface of sensor will be original
Image data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processor 940
It is for processing.Video memory 930 can be independent special in a part, storage equipment or electronic equipment of memory device
It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 914 interface of imaging sensor or from 920 interface of sensor or from video memory 930
When raw image data, ISP processor 940 can carry out one or more image compensation operations, such as time-domain filtering.ISP processor
940 treated that image data can be transmitted to video memory 930, to carry out other processing before shown.At ISP
Manage device 940 from video memory 930 receive processing data, and to the processing data progress original domain in and RGB and YCbCr
Image real time transfer in color space.Image data that treated may be output to display 980, for user viewing and/or
It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor
940 output also can be transmitted to video memory 930, and display 980 can read image data from video memory 930.?
In one embodiment, video memory 930 can be configured to realize one or more frame buffers.In addition, ISP processor 940
Output can be transmitted to encoder/decoder 970, so as to encoding/decoding image data.The image data of coding can be saved,
And it is decompressed before being shown in 980 equipment of display.
Treated that image data can be transmitted to encoder/decoder 970 by ISP, so as to encoding/decoding image data.It compiles
Code image data can be saved, and show in 980 equipment of display before decompress.Treated for ISP processor 940
Image data can also first pass through the processing of encoder/decoder 970.Wherein, encoder/decoder 970 can be in mobile terminal
CPU (Central Processing Unit, central processing unit) or GPU (Graphics Processing Unit, at figure
Manage device) etc..
The statistical data that ISP processor 940 determines, which can be transmitted, gives control logic device Unit 950.For example, statistical data can wrap
Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 912 shadow compensation of lens
914 statistical information of device.Control logic device 950 may include the processor and/or micro-control for executing one or more routines (such as firmware)
Device processed, one or more routines can statistical data based on the received, determine the control parameter and ISP processing of imaging device 910
The control parameter of device 940.For example, the control parameter of imaging device 910 may include 920 control parameter of sensor (such as gain, expose
The time of integration, stabilization parameter of photocontrol etc.), camera flash control parameter, 912 control parameter of lens (such as focus or become
Focal length) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example,
RGB processing during) 912 shadow compensation parameter of gain level and color compensation matrix and lens.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage is situated between
Matter can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc..
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 image compensation method, which is characterized in that the described method includes:
Camera collection image is controlled, and obtains the exposure information of acquisition described image;The camera includes that optical imagery is steady
Determine system;
When detecting that camera is shaken, the camera lens offset of camera when acquisition described image is obtained;
Target designation function is determined according to the exposure information, and obtains image shift corresponding with the camera lens offset
Amount;
Described image is compensated according to the exposure information and described image offset.
2. the method according to claim 1, wherein the exposure information includes shutter speed or sensitivity;Institute
It states and target designation function is determined according to the exposure information, and obtain image shift amount corresponding with the camera lens offset,
Include:
Construct the standard exposure information of multiple gears and the mapping relations of multiple preset calibrations functions, wherein the institute of each gear
Standard exposure information is stated corresponding to a preset calibrations function;
The gear of the exposure information is determined according to the standard exposure information of the multiple gear;
According to the mapping relations, the determining gear with the exposure information matches in the multiple preset calibrations function
The target designation function;
Image shift amount corresponding with the camera lens offset is determined according to the target designation function.
3. according to the method described in claim 2, it is characterized in that, the building standard exposure information and preset calibrations function
Before mapping relations, further includes:
For standard exposure information described in every grade, the determining preset calibrations function to match with the standard exposure information.
4. the method according to claim 1, wherein described according to the exposure information and described image offset
Described image is compensated, comprising:
Determine that the levels of exposure of the exposure information, the levels of exposure include level-one exposure, second level exposure and three-level exposure;
Corresponding compensation policy is determined according to the levels of exposure;
Described image is compensated according to described image offset and the compensation policy.
5. according to the method described in claim 4, it is characterized in that, described determine corresponding compensation plan according to the levels of exposure
Slightly, comprising:
When the levels of exposure is that level-one exposes, corresponding compensation policy is to compensate frame by frame or every frame;
When the levels of exposure is that second level exposes, corresponding compensation policy is piecemeal compensation;
When the levels of exposure is that three-level exposes, corresponding compensation policy is line by line or interlacing compensates.
6. according to the method described in claim 5, it is characterized in that, when the levels of exposure be second level expose when, according to described
Image shift amount and the compensation policy compensate described image, comprising:
Described image is identified, to identify region to be compensated and non-compensatory zone, wherein the non-compensatory zone it is each
The color of pixel is identical, and the non-compensatory zone accounts for the ratio of image more than or equal to preset value;
The region to be compensated is compensated according to described image offset and the compensation policy.
7. acquisition is adopted the method according to claim 1, wherein described when detecting that camera is shaken
Collect the camera lens offset of camera when described image, comprising:
It is described when detecting that camera is shaken, synchronous the multiple of camera described when obtaining one frame described image of acquisition tremble
Momentum;
The movement that motor drives the cam lens is controlled according to the multiple amount of jitter;
Determine that the camera lens offset of the camera, the amount of jitter and the Hall value are same based on the Hall value of Hall sensor
Step acquisition.
8. a kind of image compensation device, which is characterized in that described device includes:
Exposure information obtains module, for controlling camera collection image, and obtains the exposure information of acquisition described image;It is described
Camera includes optical image stabilizing system;
Camera lens offset obtains module, camera shooting when for when detecting that camera is shaken, obtaining acquisition described image
The camera lens offset of head;
Image shift obtains module, for determining target designation function according to the exposure information, and obtains inclined with the camera lens
The corresponding image shift amount of shifting amount;
Image compensation module, for being compensated according to the exposure information and described image offset to described image.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The step of method as described in any one of claims 1 to 7 is realized when processor executes.
10. a kind of electronic equipment, imaging device, memory and processor including optical image stabilizing system, the imaging are set
Standby includes the camera shooting for carrying optical image stabilizing system;Computer-readable instruction is stored in the memory, which is characterized in that
When described instruction is executed by the processor, so that the processor is executed such as any one of claims 1 to 7 the method
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811290317.8A CN109194877B (en) | 2018-10-31 | 2018-10-31 | Image compensation method and apparatus, computer-readable storage medium, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811290317.8A CN109194877B (en) | 2018-10-31 | 2018-10-31 | Image compensation method and apparatus, computer-readable storage medium, and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109194877A true CN109194877A (en) | 2019-01-11 |
CN109194877B CN109194877B (en) | 2021-03-02 |
Family
ID=64941282
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811290317.8A Active CN109194877B (en) | 2018-10-31 | 2018-10-31 | Image compensation method and apparatus, computer-readable storage medium, and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109194877B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110012224A (en) * | 2019-03-26 | 2019-07-12 | Oppo广东移动通信有限公司 | Camera stabilization system, method, electronic equipment and computer readable storage medium |
CN110166697A (en) * | 2019-06-28 | 2019-08-23 | Oppo广东移动通信有限公司 | Camera anti-fluttering method, device, electronic equipment and computer readable storage medium |
CN110177223A (en) * | 2019-06-28 | 2019-08-27 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment, computer readable storage medium |
CN110291780A (en) * | 2019-05-15 | 2019-09-27 | 深圳市大疆创新科技有限公司 | Image stability augmentation control method, capture apparatus and moveable platform |
CN111028191A (en) * | 2019-12-10 | 2020-04-17 | 上海闻泰电子科技有限公司 | Anti-shake method and device for video image, electronic equipment and storage medium |
CN112129317A (en) * | 2019-06-24 | 2020-12-25 | 南京地平线机器人技术有限公司 | Information acquisition time difference determining method and device, electronic equipment and storage medium |
CN113840093A (en) * | 2020-06-24 | 2021-12-24 | 北京小米移动软件有限公司 | Image generation method and device |
CN115022540A (en) * | 2022-05-30 | 2022-09-06 | Oppo广东移动通信有限公司 | Anti-shake control method, device and system and electronic equipment |
CN115100209A (en) * | 2022-08-28 | 2022-09-23 | 电子科技大学 | Camera-based image quality correction method and system |
CN115379123A (en) * | 2022-10-26 | 2022-11-22 | 山东华尚电气有限公司 | Transformer fault detection method for inspection by unmanned aerial vehicle |
CN115942620A (en) * | 2023-01-09 | 2023-04-07 | 广州诺顶智能科技有限公司 | Crimping machine control method and system, crimping machine and readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102098438A (en) * | 2009-12-15 | 2011-06-15 | 索尼公司 | Image capturing apparatus and image capturing method |
CN102176106A (en) * | 2008-07-15 | 2011-09-07 | 佳能株式会社 | Image stabilization control apparatus and imaging apparatus |
CN102455567A (en) * | 2010-10-19 | 2012-05-16 | 佳能株式会社 | Optical apparatus, image capturing apparatus, and method for controlling optical apparatus |
US20120275032A1 (en) * | 2006-07-21 | 2012-11-01 | Nikon Corporation | Zoom lens system, imaging apparatus, and method for zooming the zoom lens system |
CN103685950A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Method and device for preventing shaking of video image |
-
2018
- 2018-10-31 CN CN201811290317.8A patent/CN109194877B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120275032A1 (en) * | 2006-07-21 | 2012-11-01 | Nikon Corporation | Zoom lens system, imaging apparatus, and method for zooming the zoom lens system |
CN102176106A (en) * | 2008-07-15 | 2011-09-07 | 佳能株式会社 | Image stabilization control apparatus and imaging apparatus |
CN102098438A (en) * | 2009-12-15 | 2011-06-15 | 索尼公司 | Image capturing apparatus and image capturing method |
CN102455567A (en) * | 2010-10-19 | 2012-05-16 | 佳能株式会社 | Optical apparatus, image capturing apparatus, and method for controlling optical apparatus |
CN103685950A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Method and device for preventing shaking of video image |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110012224B (en) * | 2019-03-26 | 2021-07-09 | Oppo广东移动通信有限公司 | Camera anti-shake system, camera anti-shake method, electronic device, and computer-readable storage medium |
CN110012224A (en) * | 2019-03-26 | 2019-07-12 | Oppo广东移动通信有限公司 | Camera stabilization system, method, electronic equipment and computer readable storage medium |
CN110291780B (en) * | 2019-05-15 | 2021-10-15 | 深圳市大疆创新科技有限公司 | Image stability augmentation control method, shooting equipment and movable platform |
WO2020227998A1 (en) * | 2019-05-15 | 2020-11-19 | 深圳市大疆创新科技有限公司 | Image stability augmentation control method, photography device and movable platform |
CN110291780A (en) * | 2019-05-15 | 2019-09-27 | 深圳市大疆创新科技有限公司 | Image stability augmentation control method, capture apparatus and moveable platform |
US11272105B2 (en) | 2019-05-15 | 2022-03-08 | SZ DJI Technology Co., Ltd. | Image stabilization control method, photographing device and mobile platform |
CN112129317A (en) * | 2019-06-24 | 2020-12-25 | 南京地平线机器人技术有限公司 | Information acquisition time difference determining method and device, electronic equipment and storage medium |
CN110177223A (en) * | 2019-06-28 | 2019-08-27 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment, computer readable storage medium |
CN110166697B (en) * | 2019-06-28 | 2021-08-31 | Oppo广东移动通信有限公司 | Camera anti-shake method and device, electronic equipment and computer readable storage medium |
CN110166697A (en) * | 2019-06-28 | 2019-08-23 | Oppo广东移动通信有限公司 | Camera anti-fluttering method, device, electronic equipment and computer readable storage medium |
CN111028191B (en) * | 2019-12-10 | 2023-07-04 | 上海闻泰电子科技有限公司 | Anti-shake method and device for video image, electronic equipment and storage medium |
CN111028191A (en) * | 2019-12-10 | 2020-04-17 | 上海闻泰电子科技有限公司 | Anti-shake method and device for video image, electronic equipment and storage medium |
WO2021115136A1 (en) * | 2019-12-10 | 2021-06-17 | 闻泰科技(深圳)有限公司 | Anti-shake method and apparatus for video image, electronic device, and storage medium |
CN113840093A (en) * | 2020-06-24 | 2021-12-24 | 北京小米移动软件有限公司 | Image generation method and device |
CN113840093B (en) * | 2020-06-24 | 2023-07-25 | 北京小米移动软件有限公司 | Image generation method and device |
CN115022540A (en) * | 2022-05-30 | 2022-09-06 | Oppo广东移动通信有限公司 | Anti-shake control method, device and system and electronic equipment |
CN115100209A (en) * | 2022-08-28 | 2022-09-23 | 电子科技大学 | Camera-based image quality correction method and system |
CN115379123A (en) * | 2022-10-26 | 2022-11-22 | 山东华尚电气有限公司 | Transformer fault detection method for inspection by unmanned aerial vehicle |
CN115379123B (en) * | 2022-10-26 | 2023-01-31 | 山东华尚电气有限公司 | Transformer fault detection method for unmanned aerial vehicle inspection |
CN115942620A (en) * | 2023-01-09 | 2023-04-07 | 广州诺顶智能科技有限公司 | Crimping machine control method and system, crimping machine and readable medium |
CN115942620B (en) * | 2023-01-09 | 2023-08-29 | 广州诺顶智能科技有限公司 | Crimping machine control method and system, crimping machine and readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN109194877B (en) | 2021-03-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109194877A (en) | Image compensation method and device, computer readable storage medium and electronic equipment | |
JP6911192B2 (en) | Image processing methods, equipment and devices | |
CN108737734B (en) | Image compensation method and apparatus, computer-readable storage medium, and electronic device | |
US10757312B2 (en) | Method for image-processing and mobile terminal using dual cameras | |
CN109194876B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN107959778B (en) | Imaging method and device based on dual camera | |
CN110290289B (en) | Image noise reduction method and device, electronic equipment and storage medium | |
CN108769528B (en) | Image compensation method and apparatus, computer-readable storage medium, and electronic device | |
CN109544620B (en) | Image processing method and apparatus, computer-readable storage medium, and electronic device | |
TWI527448B (en) | Imaging apparatus, image processing method, and recording medium for recording program thereon | |
CN101076832B (en) | Image processor and image processing method | |
CN110072052B (en) | Image processing method and device based on multi-frame image and electronic equipment | |
CN107948519A (en) | Image processing method, device and equipment | |
CN107948520A (en) | Image processing method and device | |
JP5843454B2 (en) | Image processing apparatus, image processing method, and program | |
CN108024056B (en) | Imaging method and device based on dual camera | |
CN110536057A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN110349163B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN101753825A (en) | Image sensing apparatus | |
CN109348088A (en) | Image denoising method, device, electronic equipment and computer readable storage medium | |
CN110278360A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN110213494A (en) | Image pickup method and device, electronic equipment, computer readable storage medium | |
JP2013061850A (en) | Image processing apparatus and image processing method for noise reduction | |
CN107872631A (en) | Image capturing method, device and mobile terminal based on dual camera | |
CN108053438A (en) | Depth of field acquisition methods, device and equipment |
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 |