CN100421455C - Video electronic flutter-proof method - Google Patents

Video electronic flutter-proof method Download PDF

Info

Publication number
CN100421455C
CN100421455C CNB2005101080377A CN200510108037A CN100421455C CN 100421455 C CN100421455 C CN 100421455C CN B2005101080377 A CNB2005101080377 A CN B2005101080377A CN 200510108037 A CN200510108037 A CN 200510108037A CN 100421455 C CN100421455 C CN 100421455C
Authority
CN
China
Prior art keywords
motion vectors
relative motion
present frame
image
motion vector
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.)
Active
Application number
CNB2005101080377A
Other languages
Chinese (zh)
Other versions
CN1744674A (en
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.)
Mid Star Technology Ltd By Share Ltd
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2005101080377A priority Critical patent/CN100421455C/en
Publication of CN1744674A publication Critical patent/CN1744674A/en
Application granted granted Critical
Publication of CN100421455C publication Critical patent/CN100421455C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The present invention discloses a video electronic flutter-proof method having the advantages of simplicity, effectiveness and cost saving. Firstly, the global relative motion vector of current frames is obtained by respectively using a method for motion estimation and a prediction method. Secondly, the difference value of the global relative motion vector of the two current frames obtained by the two methods is calculated to judge whether flutter exists. When the flutter exists, the difference value is used as the motion vector for compensating the flutter; when the flutter does not exist, the motion vector for compensating the flutter is 0. Then, the motion vector for compensating the flutter is judged whether the motion vector is within the maximal compensation range determined by preestablished maximal compensation motion vector values. If the motion vector exceeds the maximal compensation range, the maximal compensation motion vector values are used as the motion vector for compensating the flutter. Finally, on the total pixel image of the current frames, an effective image after the current frames are in flutter-proof compensation is cut according to the motion vector for compensating the flutter and the size of a preestablished effective pixel image.

Description

A kind of method of video electronic flutter-proof
Technical field
The present invention relates to a kind of method that is applied to the video electronic flutter-proof in video acquisition and the output equipment.
Technical background
Along with the progress and the development of science and technology, equipment such as digital camera, Digital Video have increased many new functions.But these handheld devices inevitably cause the shake of image owing to artificial factor.The avoiding and to realize by anti-shake technology of this shake.The anti-shake system of present stage mainly is divided into two big classes: the anti-shake and electronic flutter-proof of optics.Optics is anti-shake to be by the shake of the built-in instrument induction camera of camera lens, reaches anti-shake effect by the position of adjusting lens in the camera lens again.The anti-shake technology of optics is generally used in the high-end digital camera and Digital Video.Electronic flutter-proof is to come image is handled by electronically, to alleviate the influence of shake to imaging.At present, electronic flutter-proof mainly contains three kinds of enforcement means, improves ISO photosensitivity/electronic image compression/BSS pattern automatically.The anti-shake principle of CCD is exactly that CCD is placed on the support that can move up and down, and detects earlier whether shake is arranged, owing to use gyrosensor, the detection of shake and other companies are basic identical.Sensor goes out direction, speed, the amount of movement of shake then ... the signal that detects calculates the CCD amount of movement that can be enough to offset shake through handling.Electronic flutter-proof is generally used in the digital camera and Digital Video of low side owing to cheap.
This shows that optics is anti-shake respectively to have pluses and minuses with two kinds of technology of electronic flutter-proof.The anti-shake technology of optics anti-shake effective can make full use of the collection pixel of CCD, but need the lens movement compensation arrangement, so cost is higher relatively.Electronic flutter-proof need not the lens movement compensation arrangement, and is cheap, realizes simply, still reduces the utilance of CCD; Adopt the CCD compensation method then to need extra CCD mobile device, also to a certain degree improved cost.And no matter be the anti-shake or electronic flutter-proof of optics, generally all need a motion transducer---the jitter compensation gyroscope comes the direction and the intensity of perceive motion, adopt optical means and electronic method to compensate again.
Summary of the invention
The objective of the invention is:, provide a kind of method simple, that need not the video electronic flutter-proof of external motion sensor that realizes at the deficiencies in the prior art.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: a kind of method of video electronic flutter-proof comprises the steps:
(1) adopts method for estimating calculating present frame and the present frame overall relative motion vectors of some frame video images before;
(2) according to the overall relative motion vectors of the overall relative motion vectors prediction present frame of some frames before the present frame;
(3) difference of the overall relative motion vectors of the present frame that obtains in calculation procedure (1) and the step (2), and judge whether to exist shake according to this difference, and when having shake, the motion vector of shaking by way of compensation with described difference, when not having shake, the motion vector that makes compensate for jitter is 0;
(4) judge that the motion vector of described compensate for jitter is whether in the determined maximum compensation range of predefined maximum compensating motion vector value, if exceed this scope, then with the motion vector of described maximum compensating motion vector value as described compensate for jitter;
(5) on total pixel image of present frame, according to the motion vector and the predefined valid pixel image size of described compensate for jitter, the effective image after the anti-shake compensation of cutting acquisition present frame.
Preferably, the some frame video images before the present frame in described step (1) and the step (2) can be effective image of each frame; And the video image of present frame can carry out pre-cut, and the method for its pre-cut specifically can be: at first obtain the absolute displacement with respect to total pixel image center of the effective image of former frame; Obtain the center, clipping region according to this absolute displacement value then, again according to the image size of predefined valid pixel, determine the clipping region with the center, clipping region, total pixel image to present frame carries out cutting at last, is the current frame video image of described valid pixel image size thereby obtain size.
Preferably, described step (1) is specifically as follows:
(10), the method for employing estimation is calculated the relative motion vectors of search block in each two field picture;
(11), the frequency of relative motion vectors amplitude of described each search block of statistics, obtain the relative motion vectors value that wherein frequency is the highest, calculate the variance of described relative motion vectors;
(12), judge whether the highest relative motion vectors value of described frequency has surpassed the variance of the relative motion vectors of search block and the product of given threshold value in the image, if do not surpass, the overall relative motion vectors that then shows current frame image is not obvious, and the overall relative motion vectors of putting present frame is 0; Otherwise, with the overall relative motion vectors of the highest relative motion vectors value of described frequency as present frame.
Preferably, described search block can be all macro blocks or the piece in the two field picture.
Preferably, described search block can be the data block of the pre-sizing in the two field picture, and described data block keeps at a certain distance away each other.
Preferably, described step (2) can adopt the overall relative motion vectors of the method prediction present frame of curve fit, is specially:
(20), according to the overall relative motion vectors of preceding some frames of present frame, determine a multinomial of p time:
P(x)=w px p+w p-1x p-1+...+w 0
Wherein, x is relative frame number, and P (x) is that relative frame number is the overall relative motion vectors of the picture frame of x, and p is determined by the global motion pattern for describing the exponent number of overall relative motion vectors track;
(21), adopt described polynomial computation to obtain the overall relative motion vectors of present frame, be the overall relative motion vectors that forecasting institute gets.
Preferably, in the described step (3), judge whether to exist the method for shake specifically can comprise according to the difference of the overall relative motion vectors of the present frame that obtains in step (1) and the step (2):
(30), the variance of the overall relative motion vectors of preceding some frames of calculating present frame;
(31) if: | the overall relative motion vectors of the present frame that overall relative motion vectors one estimation of the present frame that obtains of prediction obtains | the variance of the overall relative motion vectors of preceding some frames of>K* present frame, represent that then there is shake in present frame, otherwise think not have shake, wherein 1≤K≤2.
Preferably, in the described step (5), on total pixel image of present frame, according to the motion vector and the predefined valid pixel image size of compensate for jitter, the method for the effective image after the anti-shake compensation of cutting acquisition present frame specifically can comprise:
(50), be central point with the center of total pixel image of present frame, obtain the compensation central point according to the motion vector of compensate for jitter;
(51), be the center with described compensation central point, according to described valid pixel image size, on total pixel image of present frame, determine the clipping region;
(52), the image pixel in the described clipping region of output is the effective image after the anti-shake compensation.
Preferably, processing to overall relative motion vectors in described each step all can be carried out from horizontal direction and vertical direction respectively, thereby the overall relative motion vectors of the final present frame that obtains is horizontal component and the vertical component by overall relative motion vectors to be constituted, the motion vector of the jitter compensation that is obtained also is made of its horizontal component and vertical component, and then to obtain effective image also be to carry out from horizontal direction and vertical direction respectively to the judgement of shake and cutting.
Preferably, specifically can be according to comparison expression in the described step (12): the variance * threshold value of the relative motion vectors of search block in the highest relative motion vectors value<image of frequency, 1≤threshold value≤2 wherein judge whether the highest relative motion vectors value of described frequency has surpassed the variance of the relative motion vectors of search block and the product of given threshold value in the image.
In technique scheme, a kind of video electronic flutter-proof method and apparatus proposed by the invention is by image sequence being carried out estimation, analyze the motion conditions of photographed, eliminating shake thereby carry out motion compensation.The relative prior art of the present invention, need not external motion sensor, realize the estimation of motion, the compensation of dither image by digital image processing method fully, and have realize simple, effectively, the characteristics of low cost etc., can be applied in Digital Video, the first-class video acquisition device of shooting.
Description of drawings
Accompanying drawing 1 is the schematic diagram of a kind of video electronic flutter-proof method of the present invention;
Accompanying drawing 2 is image schematic diagram before and after the anti-shake compensation of a kind of video electronic flutter-proof method of the present invention;
Accompanying drawing 3 is the flow chart of a kind of video electronic flutter-proof method of the present invention;
Accompanying drawing 4 is the circuit block diagram of the concrete hardware of implementing of a kind of video electronic flutter-proof method of the present invention;
Accompanying drawing 5 three two field pictures after for cutting among the present invention concern schematic diagram with respect to the position of total pixel image;
Accompanying drawing 6 is the schematic diagram of a kind of preferable method for estimating of the present invention;
Accompanying drawing 7 is the schematic diagram of the anti-shake example of a reality of the present invention.
Embodiment
Below in conjunction with Figure of description and specific embodiment the present invention is described in further detail.
The electronic flutter-proof method that present embodiment proposes need not to add the motion compensation transducer and obtains motion state, but introduced the method for estimating of video coding technique, calculate the overall relative motion vectors of every frame by method for estimating, thereby obtain the overall relative motion vectors MV of present frame NEstimated value, and the overall relative motion vectors MV by previous some frames 1, MV 2..., MV N-1The overall relative motion vectors MV of prediction present frame NIf MV NAnd MV NBetween the difference that exists greater than a certain given threshold value T, then think shake taken place, need carry out motion compensation; Otherwise keep original image and do not compensate.Its principle as shown in Figure 1.
Present embodiment can not utilize the collection pixel value of the CCD of all videos harvester in order to realize electronic flutter-proof, and therefore effectively pixel count is less than the total pixel number of CCD, and this is the situation that realizes that electronic flutter-proof must occur.And the ratio of the relative total pixel number of valid pixel number is related by the anti-shake jitter amplitude of supporting.Suppose maximum jitter that present embodiment supports by relative shifting range as index, the effective pixel area of given CCD is the center of the total pixel region of CCD, then the compensation range of Zui Da shake can not exceed the zone of the total pixel of CCD, therefore preestablishing the maximum compensating motion vector value of going up in the horizontal direction in the present embodiment is XMAX, maximum compensating motion vector value on the vertical direction is YMAX, then maximum compensation range in the horizontal direction is [XMAX, XMAX], maximum compensation range in vertical direction is [YMAX, YMAX].If the shake total size is positioned at this scope, then can compensate the realization electronic flutter-proof; If surpass this scope, then do not carry out electronic flutter-proof.The total pixel of CCD, the relation of the valid pixel after valid pixel and the anti-shake compensation as shown in Figure 2.
With reference to figure 3, the idiographic flow of a kind of video electronic flutter-proof method of present embodiment is:
The overall relative motion vectors of some frame video images before step 1, employing method for estimating calculating present frame and the present frame;
Step 2, according to the overall relative motion vectors of the overall relative motion vectors prediction present frame of some frames before the present frame;
The difference of the overall relative motion vectors of the present frame that obtains in step 3, calculation procedure 1 and the step 2, and judge whether to exist shake according to this difference, and when having shake, the motion vector of shaking by way of compensation with described difference, when not having shake, the motion vector that makes compensate for jitter is 0;
Step 4, judge that the motion vector of described compensate for jitter is whether in the determined maximum compensation range of predefined maximum compensating motion vector value, if exceed this scope, then with the motion vector of described maximum compensating motion vector value as described compensate for jitter;
Step 5, on total pixel image of present frame, according to the motion vector and the predefined valid pixel image size of described compensate for jitter, cutting obtains the effective image after the anti-shake compensation of present frame.
In above-mentioned steps, the order of step 1 and step 2 can be changed.For the overall relative motion vectors that makes present frame estimate with prediction accurately but amount of calculation is relative less, adopt the F two field picture before the present frame in the present embodiment.
In above-mentioned steps, the video image that is used to carry out estimation can be total pixel image, also can be effective image of the valid pixel size after the compensate for jitter.Adopt effective image in the present embodiment.
Present embodiment provides a kind of device of video electronic flutter-proof simultaneously, comprise the motion vector computation module and the jitter compensation module of estimation computing module, overall relative motion vectors computing module, overall relative motion vectors memory module, compensate for jitter, also comprise pre-cut module, overall relative motion vectors correcting module and reference frame storing module in addition.
Below in conjunction with the concrete hardware circuit principle block diagram of implementing of present embodiment that accompanying drawing 4 provides, describe the principle of the method for present embodiment in detail.
(1) pre-cut module
This module is input as the overall relative motion vectors of each frame before total pixel image of the present frame that the video acquisition module (as CCD) of video acquisition and output device gathers and the selected present frame, is output as the image of the image size (being the valid pixel size) of actual displayed.
Suppose that total pixel image size that CCD gathers is M * N, the image size of valid pixel is M ' * N '.We use MV X(i) and MV Y(i) expression i two field picture is with respect to the relative motion vectors of i-1 two field picture.When i=1, the valid pixel image is positioned at the center of total pixel image, first two field picture in the expression video sequence, and at this moment initial value is respectively MV X(1)=0, MV Y(1)=0.We also need the absolute displacement (the just relative motion vectors of 1st frame) of i frame with respect to total pixel center position, use SMV respectively X(i) and SMV Y(i) expression.This value is obtained by following formula:
SMV X ( i ) = Σ k = 1 i MV X ( k )
SMV Y ( i ) = Σ k = 1 i MV Y ( k )
Absolute displacement has important effect in the anti-shake computing of every two field picture, absolute displacement can not surmount the restriction relation between total pixel and the valid pixel image, can be expressed as:
-XMAX≤SMV X(i)≤XMAX
-YMAX≤SMV Y(i)≤YMAX
When input i frame M * N sized images, according to the SMV of i-1 X(i) and SMV Y(i) on total pixel image of present frame, determine the center, clipping region, according to the image size of predefined valid pixel current i two field picture is carried out cutting then, form the image of M ' * N '.For first frame data because SMV XAnd SMV (1)=0 Y(1)=0, therefore the zone of actual cutting is the image of the M ' * N ' of the center of image.Figure 5 shows that three two field pictures after the cutting concern schematic diagram with respect to the position of total pixel image.Wherein, image A is total pixel image size that CCD gathers, and its center is the o point; Image B is the 1st two field picture after the cutting, and its center overlaps with the center of image A; Image C is (i-1) two field picture after the cutting, and its center is o ', and absolute the relative displacement of the 1st frame (just with respect to) displacement of its relative image B is SMV x(i-1) and SMV y(i-1); Image D is i frame (the being present frame) image after the cutting, and its center is o ", the absolute displacement of its relative image B is SMV xI and SMV yI, the relative motion vectors of its relative image C is MV X(i) and MV Y(i).
(2) estimation computing module
The estimation computing module is input as the i two field picture of the M ' * N ' after the cutting and i-1 two field picture as the reference two field picture.Be output as the relative motion vectors of i two field picture with respect to the i-1 two field picture.
Method for estimating can adopt based on the method for estimating in the video-frequency compression method, is that search block is carried out estimation with piece and macro block.At this moment can obtain the relative motion vectors of each macro block in the image or piece by estimation, as the input of overall relative motion vectors computing module.
Present embodiment recommend to adopt MPEG and H.26X waits motion estimation module in the video encoding standard to be applied directly to the motion estimation module of present embodiment.These methods can be easy to realize that directly use, shortcoming is that the method for estimating operand in the common video encoder is bigger.
Present embodiment proposes a kind of method for estimating of simplification simultaneously, and this method need not that the data block of all images is carried out estimation can significantly reduce operand, improves actual application value.
With reference to the accompanying drawings shown in 6, in this method for estimating, search block does not adopt the macro block described in the video encoder and the mode of piece, search block in this method is can be self-defining, usually select 8 * 8, the data block of 16 * 16 sizes, and the selection of search block is not entire image, but with certain partial data piece at interval.Search for the best match position in given zone of these data blocks.Be motion vector with the relative position of reference position.The motion match method still can adopt searching algorithm and matching criterior commonly used in the video encoder, for known technology is not described further here.
(3) overall relative motion vectors computing module
What this module was imported is the relative motion vectors of a plurality of search block of motion estimation module acquisition, is output as the overall relative motion vectors of the present frame that obtains by method for estimating.
The result who supposes the motion estimation module search is a L relative motion vectors.Add up the frequency of level and vertical motion vector amplitude respectively, suppose that the highest relative motion vectors value of frequency is respectively mvx F, mvy FRelative motion vectors is carried out statistical analysis, calculate variance and be respectively D xAnd D y
The principle that obtains overall relative motion vectors by method for estimating in the present embodiment is: judge whether current overall relative motion has surpassed the variance of the relative motion vectors of piece and the product of given threshold value in the image, if variance ratio is bigger, motion state in the key diagram picture is comparatively complicated, and the consistent relatively motion of the overall situation is not obvious, otherwise, the motion that the then explanation overall situation is consistent relatively is obvious, has overall relative motion vectors.
Be embodied as:
If mvx F<D xT x, show that the horizontal direction overall situation relative motion vectors of present image is not obvious, the horizontal component MVX (i)=0 of overall relative motion vectors is arranged; Otherwise show horizontal component MVX (the i)=mvx that has overall relative motion vectors F
If mvy F<D yT y, show that the vertical direction overall situation relative motion vectors of present image is not obvious, the vertical component MVY (i)=0 of overall relative motion vectors is arranged; Otherwise show vertical component MVY (the i)=mvy that has overall relative motion vectors F
For given threshold value T xAnd T yDecide according to concrete the application respectively, recommend 1≤T here x, T y≤ 2.
(4) the motion vector computation module of compensate for jitter
That this module is imported is overall relative motion vectors MVX (i) and MVY (i), the wherein 1≤i≤F-1 of preceding F-1 frame.Output is the image motion vector CMVX (F) and the CMVY (F) of the compensate for jitter of present frame.
A kind of method commonly used adopts curve fit, supposes that the data that preceding F-1 frame is arranged can determine a multinomial of P time
P(x)=w Px P+w P-1x P-1+...+w 0
Here x is relative frame number, and first frame that we can select the F-1 frame is that 1, the second frame is that 2, the F-1 frames are F-1, and present frame is F.Output P (x) is the overall relative motion vectors of level or vertical direction.The p here sets according to actual conditions, for describing the exponent number of global motion vector track.For multiple normal global motion pattern, as at the uniform velocity taking photo by plane, become from speed 0 and at the uniform velocity to take photo by plane etc. and can describe by a multinomial of P time.As when the global motion pattern when at the uniform velocity taking photo by plane, p gets 1, when even the acceleration, p gets 2.Usually when calculating, the p value requires to choose according to the motion of actual support, and the motion of the high more description of p is also just complicated more, and general p≤5 just can be satisfied common motion and required.
By match, respectively the overall relative motion vectors of the present frame of horizontal direction and vertical direction is predicted that can obtain predicted current frame overall situation relative motion vectors is MVX (F) and MVY (F) to preceding F-1 two field picture.
The variance of F frame overall situation relative motion vectors is respectively before calculating simultaneously: DMVX (F) and DMVY (F), and, can determine the motion vector of compensate for jitter by following formula for COEFFICIENT K given in advance:
If | MVX (F)-MVX (F) |>KDMVX (F), represent that then may there be shake in the present level direction, then needs to compensate, CMVX (F)=MVX (F)-MVX (F) is then arranged, otherwise think not have shake, belong to normal moving range, CMVX (F)=0 is then arranged.
If | MVY (F)-MVY (F) |>KDMVY (F), represent that then may there be shake in current vertical direction, then needs to compensate, CMVY (F)=MVY (F)-MVY (F) is then arranged, otherwise think not have shake, belong to normal moving range, CMVY (F)=0 is then arranged.
The COEFFICIENT K here is recommended as 1≤K≤2.
As previously mentioned, because present embodiment only just carries out effective jitter compensation in the jitter compensation scope, therefore, the judgement formula
-XMAX?≤CMVX(F)≤XMAX
-YMAX?≤CMVY(F)≤YMAX
Whether set up,, show that the shake total size is positioned at maximum compensation range, directly exports the horizontal component CMVX (F) and the vertical component CMVY (F) of the motion vector of compensate for jitter if set up.If one of them is false or the two all is false, promptly in the horizontal direction and/or vertical direction exceeded maximum compensation range, then with described maximum compensating motion vector value XMAX and/or YMAX horizontal component and/or vertical component output as the motion vector of described compensate for jitter.
(5) jitter compensation module
The input of this module be the motion vector CMVX (F) of compensate for jitter and CMVY (F) and present frame big or small be the total pixel image of M * N, according to the effective pixel area of the M ' * N ' size of motion vector cutting relevant position, thereby be output as effective pixel area after the anti-shake compensation.Be specially:
At first, be central point (as the point of the o among Fig. 5) with the center of total pixel image of present frame, obtain compensation central point (as the o among Fig. 5 " point) according to the motion vector of compensate for jitter;
Then, be the center with described compensation central point (as the o among Fig. 5 " point), according to described valid pixel image size M ' * N ', on total pixel image of present frame, determine the clipping region;
At last, exporting image pixel in the described clipping region is effective image after the anti-shake compensation.
(6) overall relative motion vectors correcting module
Owing to carried out anti-shake compensation,, therefore need revise the overall relative motion vectors of F frame so the F frame with respect to the relative motion position of F-1 frame variation has taken place.
The overall relative motion vectors MVX (F) and the MXY (F) of the motion vector CMVX (F) of the compensate for jitter of this module input present frame and the present frame of CMVY (F) and estimation gained, thereby according to the following formula correction,
MVX(F)=MVX(F)-CMVX(F)
MVY(F)=MVY(F)-CMVY(F),
And export described overall relative motion vectors memory module to and store
(7) overall relative motion vectors memory module
Owing to need the overall relative motion vectors of front F frame in the calculating of anti-shake compensating motion vector.Therefore the overall relative motion vectors of F frame before preserving by Global Vector Memory.
(8) reference frame storing module
Owing to adopted the method for estimation, therefore the image that needs former frame then is kept at the former frame image in the reference frame storing module as the reference frame, is used for the estimation of current frame image.
The anti-shake example of a reality as shown in Figure 7.The frame preface that Digital Video is taken is Frame 1, Frame2, and Frame 3, and Frame 4.Generation along with shake constantly compensates, but the region limits of compensation is in the scope of total pixel region.
The advantage of present embodiment is to need not to add motion sensor device based on the anti-fluttering method of estimation, and carries out the prediction of motion vector from the Digital Image Processing angle merely, realizes anti-shake.Present embodiment eliminated since video camera follow shot situation hypograph owing to the anti-shake jumping phenomena that causes.
It is anti-shake that the anti-shake technology of present embodiment is based on dynamic image, can be applied to equipment such as camera, Digital Video.

Claims (9)

1. the method for a video electronic flutter-proof comprises the steps:
(1) adopt method for estimating calculating present frame and the present frame overall relative motion vectors of some frame video images before, be specially:
(10), the method for employing estimation is calculated the relative motion vectors of search block in each two field picture;
(11), the frequency of relative motion vectors amplitude of described each search block of statistics, obtain the relative motion vectors value that wherein frequency is the highest, calculate the variance of described relative motion vectors;
(12), judge whether the highest relative motion vectors value of described frequency has surpassed the variance of the relative motion vectors of search block and the product of given threshold value in the image, if do not surpass, the overall relative motion vectors that then shows current frame image is not obvious, and the overall relative motion vectors of putting present frame is 0; Otherwise, with the overall relative motion vectors of the highest relative motion vectors value of described frequency as present frame;
(2) according to the overall relative motion vectors of the overall relative motion vectors prediction present frame of some frames before the present frame;
(3) difference of the overall relative motion vectors of the present frame that obtains in calculation procedure (1) and the step (2), and judge whether to exist shake according to this difference, and when having shake, the motion vector of shaking by way of compensation with described difference, when not having shake, the motion vector that makes compensate for jitter is 0;
(4) judge that the motion vector of described compensate for jitter is whether in the determined maximum compensation range of predefined maximum compensating motion vector value, if exceed this scope, then with the motion vector of described maximum compensating motion vector value as described compensate for jitter;
(5) on total pixel image of present frame, according to the motion vector and the predefined valid pixel image size of described compensate for jitter, the effective image after the anti-shake compensation of cutting acquisition present frame.
2. method according to claim 1, it is characterized in that: the some frame video images before the present frame in described step (1) and the step (2) are effective image of each frame; And the video image of present frame carried out pre-cut, the method for its pre-cut specifically: at first obtain the absolute displacement with respect to total pixel image center of the effective image of former frame; Obtain the center, clipping region according to this absolute displacement value then, again according to the image size of predefined valid pixel, determine the clipping region with the center, clipping region, total pixel image to present frame carries out cutting at last, is the current frame video image of described valid pixel image size thereby obtain size.
3. as method as described in the claim 2, it is characterized in that: described search block is all macro blocks or the piece in the two field picture.
4. as method as described in the claim 2, it is characterized in that: described search block is the data block of the pre-sizing in the two field picture, and described data block keeps at a certain distance away each other.
5. as method as described in the claim 2, it is characterized in that: described step (2) adopts the overall relative motion vectors of the method prediction present frame of curve fit, is specially:
(20), according to the overall relative motion vectors of preceding some frames of present frame, determine a multinomial of p time:
P(x)=w px p+w p-1x p-1+...+w 0
Wherein, x is relative frame number, and P (x) is that relative frame number is the overall relative motion vectors of the picture frame of x,
P is determined by the global motion pattern for describing the exponent number of overall relative motion vectors track;
(21), adopt described polynomial computation to obtain the overall relative motion vectors of present frame, be the overall relative motion vectors that forecasting institute gets.
6. as method as described in the claim 5, it is characterized in that: in the described step (3), judge whether to exist the method for shake specifically to comprise according to the difference of the overall relative motion vectors of the present frame that obtains in step (1) and the step (2):
(30), the variance of the overall relative motion vectors of preceding some frames of calculating present frame;
(31) if: | the overall relative motion vectors of the present frame that the overall relative motion vectors-estimation of the present frame that obtains of prediction obtains | the variance of the overall relative motion vectors of preceding some frames of>K* present frame, represent that then there is shake in present frame, otherwise think not have shake, wherein 1≤K≤2.
7. as method as described in the claim 6, it is characterized in that: in the described step (5), on total pixel image of present frame, according to the motion vector and the predefined valid pixel image size of compensate for jitter, the method for the effective image after the anti-shake compensation of cutting acquisition present frame specifically comprises:
(50), be central point with the center of total pixel image of present frame, obtain the compensation central point according to the motion vector of compensate for jitter;
(51), be the center with described compensation central point, according to described valid pixel image size, on total pixel image of present frame, determine the clipping region;
(52), the image pixel in the described clipping region of output is the effective image after the anti-shake compensation.
8. as method as described in the claim 7, it is characterized in that: in the described step (12) specifically according to comparison expression: the variance * threshold value of the relative motion vectors of search block in the highest relative motion vectors value<image of frequency, 1≤threshold value≤2 wherein judge whether the highest relative motion vectors value of described frequency has surpassed the variance of the relative motion vectors of search block and the product of given threshold value in the image.
9. as method as described in the claim 8, it is characterized in that: the processing to overall relative motion vectors in described each step is all carried out from horizontal direction and vertical direction respectively, thereby the overall relative motion vectors of the final present frame that obtains is horizontal component and the vertical component by overall relative motion vectors to be constituted, the motion vector of the jitter compensation that is obtained also is made of its horizontal component and vertical component, and then to obtain effective image also be to carry out from horizontal direction and vertical direction respectively to the judgement of shake and cutting.
CNB2005101080377A 2005-10-09 2005-10-09 Video electronic flutter-proof method Active CN100421455C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101080377A CN100421455C (en) 2005-10-09 2005-10-09 Video electronic flutter-proof method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101080377A CN100421455C (en) 2005-10-09 2005-10-09 Video electronic flutter-proof method

Publications (2)

Publication Number Publication Date
CN1744674A CN1744674A (en) 2006-03-08
CN100421455C true CN100421455C (en) 2008-09-24

Family

ID=36139847

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101080377A Active CN100421455C (en) 2005-10-09 2005-10-09 Video electronic flutter-proof method

Country Status (1)

Country Link
CN (1) CN100421455C (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246250B (en) * 2008-01-07 2010-09-08 北京思比科微电子技术有限公司 Anti-shake focusing method and system
CN101231456B (en) * 2008-01-31 2010-11-24 北京航空航天大学 Method for correcting panorama video jitter using angle sensor
CN102348046B (en) * 2010-07-30 2014-08-27 富士通株式会社 Video shake removing method and video shake removing device
CN105450907B (en) * 2014-07-31 2018-10-16 北京展讯高科通信技术有限公司 The scaling method and device of intelligent terminal and its Video Stabilization system model parameter
CN104869285B (en) * 2015-05-20 2018-09-18 南方电网科学研究院有限责任公司 A kind of motion compensation process based on direction of primary motion identification
CN107124542B (en) * 2016-02-25 2020-03-27 珠海格力电器股份有限公司 Image anti-shake processing method and device
CN106161932B (en) * 2016-06-30 2019-09-27 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN106303249B (en) * 2016-08-26 2020-05-19 华为技术有限公司 Video anti-shake method and device
CN108632501B (en) * 2017-03-23 2020-07-03 展讯通信(上海)有限公司 Video anti-shake method and device and mobile terminal
JP6990985B2 (en) * 2017-04-25 2022-01-12 キヤノン株式会社 Image shake correction device and method, image pickup device and image pickup system
CN110674665B (en) * 2018-07-03 2023-06-30 杭州海康威视系统技术有限公司 Image processing method and device, forest fire prevention system and electronic equipment
CN110213479B (en) * 2019-04-30 2021-05-04 北京迈格威科技有限公司 Anti-shake method and device for video shooting
CN112367460B (en) * 2020-10-23 2022-10-11 上海掌门科技有限公司 Video anti-shake method and device
CN112333441A (en) * 2020-10-28 2021-02-05 维沃移动通信有限公司 Camera detection method and device and electronic equipment
CN116095484B (en) * 2021-10-29 2024-04-09 华为技术有限公司 Video anti-shake method and device and electronic equipment
CN113794842B (en) * 2021-11-16 2022-02-08 广东皓耘科技有限公司 Video image processing method, device and system, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5909242A (en) * 1993-06-29 1999-06-01 Sanyo Electric Co., Ltd. Video camera with electronic picture stabilizer
CN1330493A (en) * 2000-06-28 2002-01-09 三星电子株式会社 Decoder with digital image stability function and image stability method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5909242A (en) * 1993-06-29 1999-06-01 Sanyo Electric Co., Ltd. Video camera with electronic picture stabilizer
CN1330493A (en) * 2000-06-28 2002-01-09 三星电子株式会社 Decoder with digital image stability function and image stability method

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
"机载电子稳像技术研究". 钟平.博士论文,中国科学院长春光学与精密机械与物理研究所. 2004
"机载电子稳像技术研究". 钟平.博士论文,中国科学院长春光学与精密机械与物理研究所. 2004 *
基于全搜索块匹配法的电子图像稳定. 冯驰,张怡.计算机应用,第23卷第6期. 2004
基于全搜索块匹配法的电子图像稳定. 冯驰,张怡.计算机应用,第23卷第6期. 2004 *
实现图像稳定的快速算法. 葛卫龙,雷选华.红外与激光工程,第33卷第1期. 2004
实现图像稳定的快速算法. 葛卫龙,雷选华.红外与激光工程,第33卷第1期. 2004 *
航空光电侦察平台关键技术及其发展. 贾平,张葆.光学精密工程,第11卷第1期. 2003
航空光电侦察平台关键技术及其发展. 贾平,张葆.光学精密工程,第11卷第1期. 2003 *

Also Published As

Publication number Publication date
CN1744674A (en) 2006-03-08

Similar Documents

Publication Publication Date Title
CN100389601C (en) Video electronic flutter-proof device
CN100421455C (en) Video electronic flutter-proof method
US9124807B2 (en) Imaging apparatus, control method therefor, and storage medium
CN101690236B (en) Apparatus and method for estimating motion due to hand trembling and image pickup device using the same
US20100271554A1 (en) Method And Apparatus For Motion Estimation In Video Image Data
CN101690171B (en) Imaging device, integrated circuit, and imaging method
KR20120072352A (en) Digital image stabilization method with adaptive filtering
CN102870403A (en) Image processing device, image capture device, program, and image processing method
CN100574380C (en) Formation method and imaging device
KR100775104B1 (en) Image stabilizer and system having the same and method thereof
KR20090107911A (en) Image processing device, image picking-up device, image processing method, and program
CN102067607B (en) Image synthesizing and encoding method, image synthesizing and encoding device, and imaging system
CN100551057C (en) A kind of method and encoder of realizing video code anti-shake based on dynamic image
CN103634513A (en) Image processing apparatus and control method thereof
CN110351508B (en) Anti-shake processing method and device based on video recording mode and electronic equipment
CN108270945A (en) A kind of motion compensation denoising method and device
CN113014817A (en) Method and device for acquiring high-definition high-frame video and electronic equipment
JP2010226646A (en) Video processing apparatus
CN114390188A (en) Image processing method and electronic equipment
JP6086619B2 (en) Encoding apparatus and encoding method
JP6508926B2 (en) Image pickup apparatus and control method of image pickup apparatus
JP2003078808A (en) Device and method for detecting motion vector, device and method for correcting camera shake and imaging apparatus
US20090322956A1 (en) System and method for motion estimation of digital video using multiple recursion rules
CN100407766C (en) Method and apparatus for processing image, recording medium and computer program
JP2011259390A (en) Flicker detector

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20171220

Address after: 519031 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105, -23898 (central office)

Patentee after: Zhongxing Technology Co., Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor

Patentee before: Beijing Vimicro Corporation

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 519031 -23898, 105 room 6, Baohua Road, Hengqin New District, Zhuhai, Guangdong (centralized office area)

Patentee after: Mid Star Technology Limited by Share Ltd

Address before: 519031 -23898, 105 room 6, Baohua Road, Hengqin New District, Zhuhai, Guangdong (centralized office area)

Patentee before: Zhongxing Technology Co., Ltd.

CP01 Change in the name or title of a patent holder