[go: up one dir, main page]

CN100421455C - A method for video electronic anti-shake - Google Patents

A method for video electronic anti-shake 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
relative motion
motion vectors
motion vector
image
present frame
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.)
Expired - Fee Related
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.)
Zhongxing Technology Co 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
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

本发明公开了一种简单、有效、节省成本的视频电子防抖的方法,是首先分别采用运动估计的方法和预测的方法获得当前帧的全局相对运动矢量;其次计算两种方法获得的两个当前帧的全局相对运动矢量的差值,并根据该差值判断是否存在抖动,当存在抖动时,以所述差值作为补偿抖动的运动矢量,当不存在抖动时,使补偿抖动的运动矢量为0;再次,判断所述补偿抖动的运动矢量是否在预先设定的最大补偿运动矢量值所确定的最大补偿范围内,如果超出该范围,则以所述最大补偿运动矢量值作为所述补偿抖动的运动矢量;最后,在当前帧的总像素图像上,根据所述补偿抖动的运动矢量以及预先设定的有效像素图像大小,裁剪获得当前帧的防抖补偿后的有效图像。

Figure 200510108037

The invention discloses a simple, effective and cost-saving method for video electronic anti-shake. Firstly, the global relative motion vector of the current frame is obtained by using the motion estimation method and the prediction method respectively; secondly, the two obtained by the two methods are calculated. The difference of the global relative motion vector of the current frame, and judge whether there is shaking according to the difference, when there is shaking, use the difference as the motion vector for compensating shaking, when there is no shaking, make the motion vector for compensating shaking is 0; again, it is judged whether the motion vector for compensating for jitter is within the maximum compensation range determined by the preset maximum compensation motion vector value, and if it exceeds this range, the maximum compensation motion vector value is used as the compensation The shake motion vector; finally, on the total pixel image of the current frame, according to the shake-compensated motion vector and the preset effective pixel image size, the effective image after anti-shake compensation of the current frame is obtained by cropping.

Figure 200510108037

Description

一种视频电子防抖的方法 A method for video electronic anti-shake

技术领域 technical field

本发明涉及一种应用于视频采集和输出设备中的视频电子防抖的方法。The invention relates to a video electronic anti-shake method applied in video collection and output equipment.

技术背景technical background

随着科技的进步和发展,数码相机、数码摄像机等设备增加了许多新的功能。但是这些手持设备由于人为的因素而不可避免的引起图像的抖动。这种抖动的避免可以通过防抖技术来实现。现阶段的防抖系统主要分为两大类:光学防抖和电子防抖。光学防抖是通过镜头内置的仪器感应相机的抖动,再通过调整镜头内透镜的位置而达到防抖效果。光学防抖技术通常用于高端的数码相机和数码摄像机中。电子防抖,是通过电子手段来对图像进行处理,以减轻抖动对成像的影响。目前,电子防抖主要有三种实施手段,自动提高ISO感光度/电子图像压缩/BSS模式。CCD防抖的原理就是将CCD安置在一个可以上下左右移动的支架上,先检测出是否有抖动,由于使用陀螺传感器,抖动的检测与其他公司基本相同。然后传感器检测出抖动的方向、速度、移动量……检测的信号经过处理,计算出可以足以抵消抖动的CCD移动量。电子防抖由于造价低廉,通常用于低端的数码相机和数码摄像机中。With the advancement and development of science and technology, many new functions have been added to equipment such as digital cameras and digital video cameras. But these handheld devices inevitably cause image shaking due to human factors. This vibration avoidance can be achieved through anti-shake technology. The anti-shake system at this stage is mainly divided into two categories: optical anti-shake and electronic anti-shake. Optical anti-shake is to sense the shake of the camera through the built-in instrument of the lens, and then adjust the position of the lens in the lens to achieve the anti-shake effect. Optical image stabilization technology is commonly used in high-end digital cameras and digital video cameras. Electronic image stabilization is to process images by electronic means to reduce the impact of shaking on imaging. At present, there are three main implementation methods of electronic image stabilization, automatic increase of ISO sensitivity/electronic image compression/BSS mode. The principle of CCD anti-shake is to place the CCD on a bracket that can move up and down, left and right, and first detect whether there is shaking. Since the gyro sensor is used, the detection of shaking is basically the same as that of other companies. Then the sensor detects the direction, speed, and amount of movement of the shaking... The detected signal is processed to calculate the amount of CCD movement that can offset the shaking. Electronic image stabilization is usually used in low-end digital cameras and digital video cameras due to its low cost.

由此可见,光学防抖和电子防抖两种技术各有优缺点。光学防抖技术的防抖效果好,可以充分利用CCD的采集像素,但是需要透镜运动补偿装置,因此造价相对较高。电子防抖无需透镜运动补偿装置,造价低廉,实现简单,但是降低CCD的利用率;而采用CCD补偿方法则需要额外的CCD移动装置,也一定程度提高了造价。而且无论是光学防抖还是电子防抖,一般都需要一个运动的传感器——抖动补偿陀螺仪来感知运动的方向和强度,再采用光学方法和电子方法进行补偿。It can be seen that the two technologies of optical image stabilization and electronic image stabilization have their own advantages and disadvantages. Optical anti-shake technology has a good anti-shake effect and can make full use of the acquisition pixels of the CCD, but requires a lens motion compensation device, so the cost is relatively high. Electronic anti-shake does not require a lens motion compensation device, which is cheap and easy to implement, but reduces the utilization rate of the CCD; while the CCD compensation method requires an additional CCD moving device, which also increases the cost to a certain extent. Moreover, whether it is optical anti-shake or electronic anti-shake, a motion sensor-shake compensation gyroscope is generally required to sense the direction and intensity of motion, and then optical and electronic methods are used to compensate.

发明内容 Contents of the invention

本发明的目的是:针对现有技术的不足,提供一种实现简单、无需外接运动传感器的视频电子防抖的方法。The object of the present invention is to provide a simple video electronic anti-shake method that does not require an external motion sensor for the deficiencies of the prior art.

为了解决上述技术问题,本发明所采取的技术方案是:一种视频电子防抖的方法,包括如下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for video electronic anti-shake, comprising the following steps:

(1)采用运动估计方法计算当前帧以及当前帧之前若干帧视频图像的全局相对运动矢量;(1) adopt motion estimation method to calculate the current frame and the global relative motion vector of several frame video images before the current frame;

(2)根据当前帧之前若干帧的全局相对运动矢量预测当前帧的全局相对运动矢量;(2) Predict the global relative motion vector of the current frame according to the global relative motion vectors of several frames before the current frame;

(3)计算步骤(1)和步骤(2)中获得的当前帧的全局相对运动矢量的差值,并根据该差值判断是否存在抖动,当存在抖动时,以所述差值作为补偿抖动的运动矢量,当不存在抖动时,使补偿抖动的运动矢量为0;(3) Calculate the difference between the global relative motion vector of the current frame obtained in step (1) and step (2), and judge whether there is jitter according to the difference, and when there is jitter, use the difference as compensation jitter The motion vector of , when there is no jitter, the motion vector for compensating jitter is 0;

(4)判断所述补偿抖动的运动矢量是否在预先设定的最大补偿运动矢量值所确定的最大补偿范围内,如果超出该范围,则以所述最大补偿运动矢量值作为所述补偿抖动的运动矢量;(4) Judging whether the motion vector for compensating jitter is within the maximum compensation range determined by the preset maximum compensation motion vector value, if it exceeds this range, use the maximum compensation motion vector value as the compensation for jitter motion vector;

(5)在当前帧的总像素图像上,根据所述补偿抖动的运动矢量以及预先设定的有效像素图像大小,裁剪获得当前帧的防抖补偿后的有效图像。(5) On the total pixel image of the current frame, according to the shake-compensated motion vector and the preset size of the effective pixel image, crop the effective image after the anti-shake compensation of the current frame.

优选的,所述步骤(1)和步骤(2)中的当前帧之前的若干帧视频图像可以为各帧的有效图像;并且当前帧的视频图像可以是进行过预裁剪的,其预裁剪的方法具体可以是:首先获得前一帧有效图像的相对于总像素图像中心位置的绝对位移;然后根据该绝对位移值获得裁剪区域中心位置,再根据预先设定的有效像素的图像大小,以裁剪区域中心位置确定裁剪区域,最后对当前帧的总像素图像进行裁剪,从而获得大小为所述有效像素图像大小的当前帧视频图像。Preferably, several frames of video images before the current frame in the step (1) and step (2) can be effective images of each frame; and the video images of the current frame can be pre-cut, and its pre-cut The specific method can be as follows: first obtain the absolute displacement of the previous effective image relative to the center position of the total pixel image; then obtain the center position of the clipping area according to the absolute displacement value, and then use the preset effective pixel image size to crop The center position of the area determines the clipping area, and finally the total pixel image of the current frame is clipped, so as to obtain the video image of the current frame whose size is the size of the effective pixel image.

优选的,所述步骤(1)具体可以为:Preferably, the step (1) can specifically be:

(10)、采用运动估计的方法计算各帧图像中搜索块的相对运动矢量;(10), adopt the method for motion estimation to calculate the relative motion vector of search block in each frame image;

(11)、统计所述各搜索块的相对运动矢量幅度的频度,获得其中频度最高的相对运动矢量值,计算所述相对运动矢量的方差;(11), count the frequency of the relative motion vector magnitude of each search block, obtain the relative motion vector value with the highest frequency, and calculate the variance of the relative motion vector;

(12)、判断所述频度最高的相对运动矢量值是否超过了图像中搜索块的相对运动矢量的方差与给定阈值的乘积,如果没有超过,则表明当前帧图像的全局相对运动矢量不明显,置当前帧的全局相对运动矢量为0;否则,以所述频度最高的相对运动矢量值作为当前帧的全局相对运动矢量。(12), judging whether the relative motion vector value with the highest frequency exceeds the product of the variance of the relative motion vector of the search block in the image and a given threshold, if not exceeded, it indicates that the global relative motion vector of the current frame image is not Obviously, set the global relative motion vector of the current frame to 0; otherwise, use the relative motion vector value with the highest frequency as the global relative motion vector of the current frame.

优选的,所述搜索块可以为一帧图像中的所有宏块或块。Preferably, the search block may be all macroblocks or blocks in a frame of image.

优选的,所述搜索块可以为一帧图像中的预定大小的数据块,并且所述数据块相互之间间隔一定距离。Preferably, the search blocks may be data blocks of a predetermined size in one frame of image, and the data blocks are spaced apart from each other by a certain distance.

优选的,所述步骤(2)可以采用曲线拟合的方法预测当前帧的全局相对运动矢量,具体为:Preferably, said step (2) can adopt the method of curve fitting to predict the global relative motion vector of current frame, specifically:

(20)、根据当前帧的前若干帧的全局相对运动矢量,确定一个p次的多项式:(20), according to the global relative motion vector of several frames before the current frame, determine a polynomial of degree p:

P(x)=wpxp+wp-1xp-1+...+w0 P(x)=w p x p +w p-1 x p-1 +...+w 0

其中,x为相对帧号,P(x)是相对帧号为x的图像帧的全局相对运动矢量,p为可描述全局相对运动矢量轨迹的阶数,由全局运动模式确定;Wherein, x is the relative frame number, P(x) is the global relative motion vector of the image frame whose relative frame number is x, and p is the order number that can describe the global relative motion vector trajectory, determined by the global motion mode;

(21)、采用所述多项式计算获得当前帧的全局相对运动矢量,即为预测所得的全局相对运动矢量。(21) Using the polynomial calculation to obtain the global relative motion vector of the current frame, which is the predicted global relative motion vector.

优选的,所述步骤(3)中,根据步骤(1)和步骤(2)中获得的当前帧的全局相对运动矢量的差值判断是否存在抖动的方法具体可以包括:Preferably, in the step (3), the method for judging whether there is shaking according to the difference of the global relative motion vector of the current frame obtained in the step (1) and the step (2) may specifically include:

(30)、计算当前帧的前若干帧的全局相对运动矢量的方差;(30), calculating the variance of the global relative motion vector of several frames before the current frame;

(31)、如果:|预测得到的当前帧的全局相对运动矢量一运动估计得到的当前帧的全局相对运动矢量|>K*当前帧的前若干帧的全局相对运动矢量的方差,则表示当前帧存在抖动,否则认为不存在抖动,其中1≤K≤2。(31), if: |The global relative motion vector of the current frame obtained by prediction—the global relative motion vector of the current frame obtained by motion estimation|>K*the variance of the global relative motion vectors of several frames before the current frame, then it means that the current There is jitter in the frame, otherwise it is considered that there is no jitter, where 1≤K≤2.

优选的,所述步骤(5)中,在当前帧的总像素图像上,根据补偿抖动的运动矢量以及预先设定的有效像素图像大小,裁剪获得当前帧的防抖补偿后的有效图像的方法具体可以包括:Preferably, in the step (5), on the total pixel image of the current frame, according to the motion vector for compensating the jitter and the preset effective pixel image size, the method of clipping to obtain the effective image after the anti-shake compensation of the current frame Specifically can include:

(50)、以当前帧的总像素图像的中心位置为中心点,根据补偿抖动的运动矢量获得补偿中心点;(50), take the center position of the total pixel image of the current frame as the center point, and obtain the compensation center point according to the motion vector of the compensation shake;

(51)、以所述补偿中心点为中心,根据所述有效像素图像大小,在当前帧的总像素图像上确定裁剪区域;(51), taking the compensation center point as the center, according to the size of the effective pixel image, determine the clipping area on the total pixel image of the current frame;

(52)、输出所述裁剪区域内的图像像素为防抖补偿后的有效图像。(52) Outputting the image pixels in the clipping area as an effective image after anti-shake compensation.

优选的,所述各步骤中对全局相对运动矢量的处理均可以是分别从水平方向和垂直方向进行的,从而最终获得的当前帧的全局相对运动矢量是由全局相对运动矢量的水平分量和垂直分量构成的,所获得的抖动补偿的运动矢量也由其水平分量和垂直分量构成,进而对抖动的判断以及裁剪获得有效图像也是分别从水平方向和垂直方向进行。Preferably, the processing of the global relative motion vector in each step can be carried out from the horizontal direction and the vertical direction respectively, so that the global relative motion vector of the current frame obtained finally is composed of the horizontal component and the vertical component of the global relative motion vector. component, the obtained motion vector for shake compensation is also composed of its horizontal component and vertical component, and then judging the shake and cropping to obtain an effective image are also carried out from the horizontal direction and the vertical direction respectively.

优选的,所述步骤(12)中具体可以根据比较式:频度最高的相对运动矢量值<图像中搜索块的相对运动矢量的方差*阈值,其中1≤阈值≤2,判断所述频度最高的相对运动矢量值是否超过了图像中搜索块的相对运动矢量的方差与给定阈值的乘积。Preferably, in the step (12), the frequency can be judged according to the comparison formula: the relative motion vector value with the highest frequency<the variance of the relative motion vector of the search block in the image*threshold, where 1≤threshold≤2 Whether the highest relative motion vector value exceeds the product of the variance of the relative motion vectors of the search block in the image and the given threshold.

在上述技术方案中,本发明所提出的一种视频电子防抖方法和装置,是通过对图像序列进行运动估计,分析拍摄景物的运动情况,从而进行运动补偿消除抖动。本发明相对现有技术,无需外接运动传感器,完全通过数字图像处理方法实现运动的估计、抖动图像的补偿,并具有实现简单、有效、低成本等的特点,可以应用于数码摄像机、摄像头等视频采集装置中。In the above technical solution, the present invention proposes a video electronic anti-shake method and device, which perform motion compensation to eliminate shaking by performing motion estimation on image sequences and analyzing the motion of the shot scene. Compared with the prior art, the present invention does not need an external motion sensor, and realizes motion estimation and shake image compensation completely through digital image processing methods, and has the characteristics of simple, effective, low-cost, etc., and can be applied to digital video cameras, cameras, etc. in the collection device.

附图说明 Description of drawings

附图1为本发明一种视频电子防抖方法的原理图;Accompanying drawing 1 is the schematic diagram of a kind of video electronic anti-shake method of the present invention;

附图2为本发明一种视频电子防抖方法的防抖补偿前后图像示意图;Accompanying drawing 2 is a schematic diagram of images before and after anti-shake compensation of a video electronic anti-shake method of the present invention;

附图3为本发明一种视频电子防抖方法的流程图;Accompanying drawing 3 is the flowchart of a kind of video electronic anti-shake method of the present invention;

附图4为本发明一种视频电子防抖方法具体实施的硬件的电路原理方框图;Accompanying drawing 4 is the block diagram of the circuit principle of the hardware of a kind of video electronic anti-shake method concrete implementation of the present invention;

附图5为本发明中裁剪后的三帧图像相对于总象素图像的位置关系示意图;Accompanying drawing 5 is the schematic diagram of the position relation of the three frame images after cutting among the present invention with respect to total pixel image;

附图6为本发明所采用的一种较佳运动估计方法的示意图;Accompanying drawing 6 is a schematic diagram of a preferred motion estimation method adopted in the present invention;

附图7为本发明的一个实际的防抖实例的示意图。Accompanying drawing 7 is a schematic diagram of an actual anti-shake example of the present invention.

具体实施方式 Detailed ways

下面将结合说明书附图及具体实施例对本发明作进一步详细说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

本实施例提出的电子防抖方法无需外加运动补偿传感器获得运动状态,而是引入了视频编码技术的运动估计方法,通过运动估计方法计算每帧的全局相对运动矢量,从而获得当前帧的全局相对运动矢量MVN的估计值,并通过先前若干帧的全局相对运动矢量MV1,MV2,...,MVN-1预测当前帧的全局相对运动矢量MVN。如果MVN和MVN之间存在的差异大于某一给定阈值T,则认为发生了抖动,需要进行运动补偿;否则保持原图像而不进行补偿。其原理如图1所示。The electronic anti-shake method proposed in this embodiment does not need to add a motion compensation sensor to obtain the motion state, but introduces the motion estimation method of video coding technology, and calculates the global relative motion vector of each frame through the motion estimation method, thereby obtaining the global relative motion vector of the current frame. The estimated value of the motion vector MV N , and predict the global relative motion vector MV N of the current frame through the global relative motion vectors MV 1 , MV 2 , . . . , MV N -1 of several previous frames. If the difference between MV N and MV N is greater than a given threshold T, it is considered that shaking has occurred and motion compensation is required; otherwise, the original image is kept without compensation. Its principle is shown in Figure 1.

本实施例为了实现电子防抖,不能够利用全部视频采集装置的CCD的采集像素值,因此有效的像素数小于CCD的总像素数,这是实现电子防抖必然出现的情况。而有效像素数相对总像素数的比例是由防抖所支持的抖动幅度有关系的。假定本实施例所支持的最大抖动通过相对移动范围作为指标,给定CCD的有效像素区域为CCD总像素区域的中心,则最大的抖动的补偿范围不能超出CCD总像素的区域,因此本实施例中预先设定在水平方向上的最大补偿运动矢量值为XMAX,垂直方向上的最大补偿运动矢量值为YMAX,则在水平方向的最大补偿范围为[-XMAX,XMAX],在垂直方向上的最大补偿范围为[-YMAX,YMAX]。如果抖动总范围位于这个范围内,则可以进行补偿实现电子防抖;如果超过这个范围,则不进行电子防抖。CCD总像素,有效像素以及防抖补偿后的有效像素的关系如图2所示。In order to realize electronic anti-shake in this embodiment, the acquisition pixel values of CCDs of all video acquisition devices cannot be utilized, so the effective number of pixels is less than the total number of pixels of CCD, which is an inevitable situation for realizing electronic anti-shake. The ratio of the number of effective pixels to the total number of pixels is related to the shake amplitude supported by the anti-shake. Assuming that the maximum jitter supported by this embodiment is taken as an index by the relative movement range, and the effective pixel area of a given CCD is the center of the total pixel area of the CCD, then the compensation range of the maximum jitter cannot exceed the area of the total pixel area of the CCD, so this embodiment The maximum compensation motion vector value in the horizontal direction is preset in XMAX, and the maximum compensation motion vector value in the vertical direction is YMAX, then the maximum compensation range in the horizontal direction is [-XMAX, XMAX], and the maximum compensation range in the vertical direction is [-XMAX, XMAX]. The maximum compensation range is [-YMAX, YMAX]. If the total range of jitter is within this range, compensation can be performed to implement electronic anti-shake; if it exceeds this range, electronic anti-shake will not be performed. The relationship between the total pixels of the CCD, the effective pixels and the effective pixels after anti-shake compensation is shown in Figure 2.

参考图3,本实施例一种视频电子防抖方法的具体流程为:Referring to Fig. 3, the specific flow of a video electronic anti-shake method in this embodiment is as follows:

步骤1、采用运动估计方法计算当前帧以及当前帧之前若干帧视频图像的全局相对运动矢量;Step 1, adopting the motion estimation method to calculate the global relative motion vector of the current frame and several frames of video images before the current frame;

步骤2、根据当前帧之前若干帧的全局相对运动矢量预测当前帧的全局相对运动矢量;Step 2, predicting the global relative motion vector of the current frame according to the global relative motion vectors of several frames before the current frame;

步骤3、计算步骤1和步骤2中获得的当前帧的全局相对运动矢量的差值,并根据该差值判断是否存在抖动,当存在抖动时,以所述差值作为补偿抖动的运动矢量,当不存在抖动时,使补偿抖动的运动矢量为0;Step 3, calculating the difference between the global relative motion vector of the current frame obtained in step 1 and step 2, and judging whether there is jitter according to the difference, when there is jitter, using the difference as a motion vector for compensating jitter, When there is no jitter, make the motion vector for compensating jitter 0;

步骤4、判断所述补偿抖动的运动矢量是否在预先设定的最大补偿运动矢量值所确定的最大补偿范围内,如果超出该范围,则以所述最大补偿运动矢量值作为所述补偿抖动的运动矢量;Step 4. Judging whether the motion vector for compensating jitter is within the maximum compensation range determined by the preset maximum compensation motion vector value, and if it exceeds this range, use the maximum compensation motion vector value as the compensation jitter motion vector;

步骤5、在当前帧的总像素图像上,根据所述补偿抖动的运动矢量以及预先设定的有效像素图像大小,裁剪获得当前帧的防抖补偿后的有效图像。Step 5. On the total pixel image of the current frame, according to the shake-compensated motion vector and the preset size of the effective pixel image, crop and obtain the effective image of the current frame after anti-shake compensation.

在上述步骤中,步骤1和步骤2的顺序可以调换。为了使当前帧的全局相对运动矢量估计和预测准确但又计算量相对较小,本实施例中采用当前帧之前的F帧图像。In the above steps, the order of Step 1 and Step 2 can be reversed. In order to make the estimation and prediction of the global relative motion vector of the current frame accurate but with a relatively small amount of calculation, the F frame images before the current frame are used in this embodiment.

在上述步骤中,用于进行运动估计的视频图像可以为总像素图像,也可以为补偿抖动后的有效像素大小的有效图像。本实施例中采用有效图像。In the above steps, the video image used for motion estimation may be a total pixel image, or an effective image with an effective pixel size after compensation for dithering. Valid images are used in this embodiment.

本实施例同时提供一种视频电子防抖的装置,包括运动估计计算模块、全局相对运动矢量计算模块、全局相对运动矢量存储模块、补偿抖动的运动矢量计算模块和抖动补偿模块,另外还包括预裁剪模块、全局相对运动矢量修正模块和参考帧存储模块。This embodiment also provides a video electronic anti-shake device, including a motion estimation calculation module, a global relative motion vector calculation module, a global relative motion vector storage module, a motion vector calculation module for compensating jitter, and a jitter compensation module. Clipping module, global relative motion vector correction module and reference frame storage module.

下面将结合附图4给出的本实施例具体实施的硬件电路原理方框图,详细说明本实施例的方法的原理。The principle of the method of this embodiment will be described in detail below in conjunction with the schematic block diagram of the hardware circuit implemented in this embodiment shown in FIG. 4 .

(1)预裁剪模块(1) Pre-cutting module

该模块输入为视频采集和输出装置的视频采集模块(如CCD)采集的当前帧的总像素图像以及所选定的当前帧之前各帧的全局相对运动矢量,输出为实际显示的图像大小(即有效像素大小)的图像。The module input is the total pixel image of the current frame collected by the video acquisition module (such as CCD) of the video acquisition and output device and the global relative motion vector of each frame before the selected current frame, and the output is the actual displayed image size (i.e. effective pixel size) of the image.

假定CCD采集的总像素图像大小为M×N,有效像素的图像大小为M′×N′。我们用MVX(i)和MVY(i)表示第i帧图像相对于第i-1帧图像的相对运动矢量。当i=1时,有效像素图像位于总像素图像的中心位置,表示视频序列中的第一帧图像,这时初始值分别为MVX(1)=0,MVY(1)=0。我们还需要第i帧相对于总像素中心位置的绝对位移(也就是第1帧的相对运动矢量),分别用SMVX(i)和SMVY(i)表示。该值由下式得到:Assume that the total pixel image size collected by the CCD is M×N, and the image size of effective pixels is M′×N′. We use MV X (i) and MV Y (i) to denote the relative motion vectors of the i-th frame image relative to the i-1-th frame image. When i=1, the effective pixel image is located at the center of the total pixel image, representing the first frame image in the video sequence, and the initial values are MV X (1)=0 and MV Y (1)=0 respectively. We also need the absolute displacement of the i-th frame relative to the total pixel center position (that is, the relative motion vector of the first frame), represented by SMV X (i) and SMV Y (i) respectively. This value is obtained by:

SMVSMV Xx (( ii )) == &Sigma;&Sigma; kk == 11 ii MVMV Xx (( kk ))

SMVSMV YY (( ii )) == &Sigma;&Sigma; kk == 11 ii MVMV YY (( kk ))

绝对位移在每帧图像防抖运算中有着重要的作用,绝对位移不能超越总像素与有效像素图像之间的约束关系,可以表示为:Absolute displacement plays an important role in the anti-shake operation of each frame image. The absolute displacement cannot exceed the constraint relationship between the total pixel and the effective pixel image, which can be expressed as:

-XMAX≤SMVX(i)≤XMAX-XMAX≤SMV X (i)≤XMAX

-YMAX≤SMVY(i)≤YMAX-YMAX≤SMV Y (i)≤YMAX

当输入第i帧M×N大小图像,根据i-1的SMVX(i)和SMVY(i)在当前帧的总像素图像上确定裁剪区域中心位置,然后根据预先设定的有效像素的图像大小对当前的第i帧图像进行裁剪,形成M′×N′的图像。对于第一帧数据由于SMVX(1)=0和SMVY(1)=0,因此实际裁剪的区域为图像的中心位置的M′×N′的图像。图5所示为裁剪后的三帧图像相对于总象素图像的位置关系示意图。其中,图像A为CCD采集的总象素图像大小,其中心位置为o点;图像B为裁剪后的第1帧图像,其中心位置与图像A的中心位置重合;图像C为裁剪后的第(i-1)帧图像,其中心位置为o′,其相对图像B的绝对(也就是相对于第1帧的相对位移)位移为SMVx(i-1)和SMVy(i-1);图像D为裁剪后的第i帧(即当前帧)图像,其中心位置为o″,其相对图像B的绝对位移为SMVxi和SMVyi,其相对图像C的相对运动矢量为MVX(i)和MVY(i)。When the i-th frame of M×N size image is input, the center position of the clipping area is determined on the total pixel image of the current frame according to the SMV X (i) and SMV Y (i) of i-1, and then according to the preset effective pixel Image size Crop the current i-th frame image to form an M'×N' image. For the first frame of data, since SMV X (1)=0 and SMV Y (1)=0, the actual clipped area is an image of M′×N′ at the center of the image. FIG. 5 is a schematic diagram showing the positional relationship of the cropped three frames of images relative to the total pixel image. Among them, image A is the size of the total pixel image collected by the CCD, and its center position is point o; image B is the first frame image after cropping, and its center position coincides with the center position of image A; image C is the first frame after cropping (i-1) frame image, its center position is o′, and its absolute (that is, the relative displacement relative to the first frame) displacement relative to image B is SMV x (i-1) and SMV y (i-1) ; Image D is the cropped i-th frame (i.e. current frame) image, its central position is o ", its absolute displacement relative to image B is SMV x i and SMV y i, and its relative motion vector relative to image C is MV X (i) and MV Y (i).

(2)运动估计计算模块(2) Motion estimation calculation module

运动估计计算模块输入为裁剪后的M′×N′的第i帧图像和第i-1帧图像作为参考帧图像。输出为第i帧图像相对于第i-1帧图像的相对运动矢量。The input of the motion estimation calculation module is the cropped M′×N′ i-th frame image and i-1-th frame image as reference frame images. The output is the relative motion vector of the i-th frame image relative to the i-1th frame image.

运动估计方法可以采用基于视频压缩方法中的运动估计方法,以块和宏块为搜索块而进行运动估计。这时通过运动估计可以获取图像中每个宏块或块的相对运动矢量,作为全局相对运动矢量计算模块的输入。The motion estimation method can use the motion estimation method based on the video compression method, and perform motion estimation with blocks and macroblocks as search blocks. At this time, the relative motion vector of each macroblock or block in the image can be obtained through motion estimation, which can be used as the input of the global relative motion vector calculation module.

本实施例推荐采用MPEG和H.26X等视频编码标准中的运动估计模块直接应用到本实施例的运动估计模块。这些方法已经可以很容易实现,直接应用,缺点是通常视频编码器中的运动估计方法运算量较大。This embodiment recommends that the motion estimation module in video coding standards such as MPEG and H.26X be directly applied to the motion estimation module of this embodiment. These methods can be easily implemented and applied directly, but the disadvantage is that the motion estimation method in the video encoder usually has a large amount of calculation.

本实施例同时提出一种简化的运动估计方法,这种方法无需对所有的图像的数据块进行运动估计可以大大减少运算量,提高实际应用价值。This embodiment also proposes a simplified motion estimation method. This method does not need to perform motion estimation on all image data blocks, which can greatly reduce the amount of calculation and improve the practical application value.

参考附图6所示,该运动估计方法中,搜索块不采用视频编码器中描述的宏块和块的方式,本方法中的搜索块是可以自定义的,通常选择8×8,16×16大小的数据块,而且搜索块的选择并不是整个图像,而是以某间隔的部分数据块。搜索这些数据块的在给定的区域内的最佳匹配位置。与参考位置的相对位置即为运动矢量。运动匹配方法仍可以采用视频编码器中常用的搜索算法和匹配准则,为公知技术这里不作详述。As shown in Figure 6, in this motion estimation method, the search block does not use the macroblock and block mode described in the video encoder. The search block in this method can be customized, usually 8×8, 16× 16 data blocks, and the selection of the search block is not the whole image, but some data blocks at certain intervals. These data blocks are searched for the best matching locations within a given region. The relative position to the reference position is the motion vector. The motion matching method can still use the search algorithm and matching criteria commonly used in video encoders, which are well-known technologies and will not be described in detail here.

(3)全局相对运动矢量计算模块(3) Global relative motion vector calculation module

本模块输入的是运动估计模块获得的多个搜索块的相对运动矢量,输出为通过运动估计方法得到的当前帧的全局相对运动矢量。The input of this module is the relative motion vectors of multiple search blocks obtained by the motion estimation module, and the output is the global relative motion vector of the current frame obtained by the motion estimation method.

假定运动估计模块搜索的结果是L个相对运动矢量。分别统计水平和垂直运动矢量幅度的频度,假定频度最高的相对运动矢量值分别为mvxF,mvyF。对相对运动矢量进行统计分析,计算方差分别为Dx和DyAssume that the result of the search by the motion estimation module is L relative motion vectors. The frequencies of the horizontal and vertical motion vector magnitudes are counted separately, assuming that the relative motion vector values with the highest frequency are mvx F and mvy F respectively. Statistical analysis is performed on the relative motion vectors, and the variances are calculated as D x and D y , respectively.

本实施例中通过运动估计方法获得全局相对运动矢量的原则是:判断当前的全局相对运动是否超过了图像中块的相对运动矢量的方差与给定阈值的乘积,如果方差比较大,说明图像内的运动状态较为复杂,而全局的相对一致的运动不明显,反之,则说明全局相对一致的运动明显,存在全局相对运动矢量。The principle of obtaining the global relative motion vector through the motion estimation method in this embodiment is: to judge whether the current global relative motion exceeds the product of the variance of the relative motion vector of the block in the image and a given threshold, if the variance is relatively large, it means The motion state of is relatively complex, but the global relatively consistent motion is not obvious, on the contrary, it shows that the global relatively consistent motion is obvious, and there is a global relative motion vector.

具体实施为:The specific implementation is:

如果mvxF<Dx·Tx,表明当前图像的水平方向全局相对运动矢量不明显,有全局相对运动矢量的水平分量MVX(i)=0;否则表明存在全局相对运动矢量的水平分量MVX(i)=mvxFIf mvx F < D x T x , it indicates that the global relative motion vector in the horizontal direction of the current image is not obvious, and there is a horizontal component MVX(i)=0 of the global relative motion vector; otherwise, it indicates that there is a horizontal component MVX(i) of the global relative motion vector i) = mvx F .

如果mvyF<Dy·Ty,表明当前图像的垂直方向全局相对运动矢量不明显,有全局相对运动矢量的垂直分量MVY(i)=0;否则表明存在全局相对运动矢量的垂直分量MVY(i)=mvyFIf mvy F <D y ·T y , it indicates that the global relative motion vector in the vertical direction of the current image is not obvious, and there is a vertical component of the global relative motion vector MVY(i)=0; otherwise, it indicates that there is a vertical component of the global relative motion vector MVY( i) = mvy F .

对于给定的阈值Tx和Ty分别根据具体应用而定,这里推荐1≤Tx,Ty≤2。The given thresholds T x and T y are determined according to specific applications, and here it is recommended that 1≤T x and T y ≤2.

(4)补偿抖动的运动矢量计算模块(4) Motion vector calculation module for jitter compensation

该模块输入的是前F-1帧的全局相对运动矢量MVX(i)和MVY(i),其中1≤i≤F-1。输出是当前帧的补偿抖动的图像运动矢量CMVX(F)和CMVY(F)。The input to this module is the global relative motion vectors MVX(i) and MVY(i) of the previous F-1 frame, where 1≤i≤F-1. The output is the shake compensated image motion vectors CMVX(F) and CMVY(F) for the current frame.

一种常用的方法采用曲线拟合,假定有前F-1帧的数据可以确定一个P次的多项式A commonly used method uses curve fitting, assuming that the data of the previous F-1 frame can determine a polynomial of degree P

P(x)=wPxP+wP-1xP-1+...+w0 P(x)=w P x P +w P-1 x P-1 +...+w 0

这里x是相对帧号,我们可以选择F-1帧的第一帧为1,第二帧为2,第F-1帧为F-1,当前帧为F。输出P(x)是水平或者垂直方向的全局相对运动矢量。这里的p根据实际情况设定,为可描述全局运动矢量轨迹的阶数。对于多种正常的全局运动模式,如匀速航拍,从速度0变为匀速航拍等都可以通过一个P次的多项式来描述。如当全局运动模式为匀速航拍时,p取1,当匀加速时,p取2。通常在计算时,p值根据实际支持的运动要求选取,p越高描述的运动也就越复杂,一般p≤5就能够满足通常的运动要求了。Here x is the relative frame number, we can choose the first frame of F-1 frame as 1, the second frame as 2, the F-1th frame as F-1, and the current frame as F. The output P(x) is the global relative motion vector in the horizontal or vertical direction. Here, p is set according to the actual situation, and is the order that can describe the trajectory of the global motion vector. For a variety of normal global motion modes, such as constant-speed aerial photography, changing from speed 0 to constant-speed aerial photography, etc., can be described by a P-degree polynomial. For example, when the global motion mode is uniform speed aerial photography, p takes 1, and when the uniform acceleration, p takes 2. Usually, when calculating, the p value is selected according to the actual supported sports requirements. The higher the p, the more complex the described sports will be. Generally, p≤5 can meet the usual sports requirements.

通过对前F-1帧图像的拟合,分别对水平方向和垂直方向的当前帧的全局相对运动矢量进行预测,可以得到预测的当前帧全局相对运动矢量为MVX(F)和MVY(F)。By fitting the image of the previous F-1 frame, the global relative motion vector of the current frame in the horizontal direction and the vertical direction is respectively predicted, and the predicted global relative motion vector of the current frame can be obtained as MVX(F) and MVY(F) .

同时计算前F帧全局相对运动矢量的方差分别为:DMVX(F)和DMVY(F),并且对于预先给定的系数K,可以通过下式决定补偿抖动的运动矢量:At the same time, the variances of the global relative motion vectors of the previous F frames are calculated as: DMVX(F) and DMVY(F), and for the predetermined coefficient K, the motion vector for compensating the jitter can be determined by the following formula:

如果|MVX(F)-MVX(F)|>K·DMVX(F),则表示当前水平方向可能存在抖动,则需要进行补偿,则有CMVX(F)=MVX(F)-MVX(F),否则认为不存在抖动,属于正常移动范围,则有CMVX(F)=0。If |MVX(F)-MVX(F)|>K·DMVX(F), it means that there may be jitter in the current horizontal direction, and compensation is required, then CMVX(F)=MVX(F)-MVX(F) , otherwise it is considered that there is no jitter and it belongs to the normal moving range, then CMVX(F)=0.

如果|MVY(F)-MVY(F)|>K·DMVY(F),则表示当前垂直方向可能存在抖动,则需要进行补偿,则有CMVY(F)=MVY(F)-MVY(F),否则认为不存在抖动,属于正常移动范围,则有CMVY(F)=0。If |MVY(F)-MVY(F)|>K·DMVY(F), it means that there may be jitter in the current vertical direction, and compensation is required, then CMVY(F)=MVY(F)-MVY(F) , otherwise it is considered that there is no jitter and it belongs to the normal moving range, then CMVY(F)=0.

这里的系数K推荐为1≤K≤2。The coefficient K here is recommended to be 1≤K≤2.

如前所述,由于本实施例只有在抖动补偿范围内才进行有效的抖动补偿,因此,判断式As mentioned above, since this embodiment can only perform effective shake compensation within the range of shake compensation, the judgment formula

-XMAX ≤CMVX(F)≤XMAX-XMAX≤CMVX(F)≤XMAX

-YMAX ≤CMVY(F)≤YMAX-YMAX≤CMVY(F)≤YMAX

是否成立,如果成立,表明抖动总范围位于最大补偿范围内,直接输出补偿抖动的运动矢量的水平分量CMVX(F),和垂直分量CMVY(F)。如果其中之一不成立或二者均不成立,即在水平方向和/或垂直方向超出了最大补偿范围,则以所述最大补偿运动矢量值XMAX和/或YMAX作为所述补偿抖动的运动矢量的水平分量和/或垂直分量输出。Whether it is true, if it is true, it indicates that the total range of jitter is within the maximum compensation range, and directly output the horizontal component CMVX(F) and vertical component CMVY(F) of the motion vector for compensating the jitter. If one of them is not true or both are not true, that is, the maximum compensation range is exceeded in the horizontal direction and/or vertical direction, then the maximum compensation motion vector value XMAX and/or YMAX is used as the level of the motion vector for the compensation shake component and/or vertical component output.

(5)抖动补偿模块(5) Jitter compensation module

该模块输入的是补偿抖动的运动矢量CMVX(F)和CMVY(F)和当前帧大小为M×N总像素图像,根据运动矢量裁剪相应位置的M′×N′大小的有效像素区域,从而输出为防抖补偿后的有效像素区域。具体为:The input of this module is motion vector CMVX(F) and CMVY(F) for compensating jitter and the current frame size is M×N total pixel image, and the effective pixel area of M′×N′ size at the corresponding position is cut according to the motion vector, thus The output is the effective pixel area after anti-shake compensation. Specifically:

首先,以当前帧的总像素图像的中心位置为中心点(如图5中的o点),根据补偿抖动的运动矢量获得补偿中心点(如图5中的o″点);First, take the central position of the total pixel image of the current frame as the center point (such as the o point in Figure 5), and obtain the compensation center point (such as the o "point in Figure 5) according to the motion vector of the compensation shake;

然后,以所述补偿中心点(如图5中的o″点)为中心,根据所述有效像素图像大小M′×N′,在当前帧的总像素图像上确定裁剪区域;Then, take the compensation center point (such as o " point in Fig. 5) as the center, and determine the clipping area on the total pixel image of the current frame according to the effective pixel image size M' * N';

最后,输出所述裁剪区域内的图像像素为防抖补偿后的有效图像。Finally, the image pixels in the clipping area are output as the effective image after anti-shake compensation.

(6)全局相对运动矢量修正模块(6) Global relative motion vector correction module

由于进行了防抖的补偿,所以第F帧相对于第F-1帧的相对运动位置发生了变化,因此需要对第F帧的全局相对运动矢量进行修正。Due to the anti-shake compensation, the relative motion position of the Fth frame relative to the F-1th frame has changed, so the global relative motion vector of the Fth frame needs to be corrected.

本模块输入当前帧的补偿抖动的运动矢量CMVX(F)和CMVY(F)以及运动估计所得的当前帧的全局相对运动矢量MVX(F)和MXY(F),从而根据下式修正,This module inputs motion vectors CMVX(F) and CMVY(F) for compensating jitter of the current frame and the global relative motion vectors MVX(F) and MXY(F) of the current frame obtained by motion estimation, thereby correcting according to the following formula,

MVX(F)=MVX(F)-CMVX(F)MVX(F)=MVX(F)-CMVX(F)

MVY(F)=MVY(F)-CMVY(F),MVY(F)=MVY(F)-CMVY(F),

并输出至所述全局相对运动矢量存储模块进行存储and output to the global relative motion vector storage module for storage

(7)全局相对运动矢量存储模块(7) Global relative motion vector storage module

由于在防抖补偿运动矢量的计算需要前面F帧的全局相对运动矢量。因此通过Global Vector Memory保存前F帧的全局相对运动矢量。Because the calculation of the anti-shake compensation motion vector requires the global relative motion vector of the previous F frame. Therefore, the global relative motion vector of the previous F frame is saved through the Global Vector Memory.

(8)参考帧存储模块(8) Reference frame storage module

由于采用了运动估计的方法,因此需要前一帧的图像作为参考帧,则将前一帧图像保存在参考帧存储模块中,用于当前帧图像的运动估计。Since the method of motion estimation is adopted, the image of the previous frame is required as a reference frame, and the image of the previous frame is stored in the reference frame storage module for motion estimation of the current frame image.

一个实际的防抖实例如图7所示。数码摄像机拍摄的帧序为Frame 1,Frame2,Frame 3,Frame 4。随着抖动的发生,不断的进行补偿,但是补偿的区域限制在总像素区域的范围内。An actual anti-shake example is shown in Figure 7. The frame sequence of the digital video camera is Frame 1, Frame2, Frame 3, Frame 4. As the jitter occurs, compensation is performed continuously, but the compensation area is limited within the range of the total pixel area.

本实施例的优势在于基于运动估计的防抖方法无需外加运动传感器设备,而单纯从数字图像处理角度进行运动矢量的预测,实现防抖。本实施例消除了由于摄像机移动拍摄情况下图像由于防抖而造成的跳动现象。The advantage of this embodiment is that the anti-shake method based on motion estimation does not need an additional motion sensor device, but simply predicts the motion vector from the perspective of digital image processing to achieve anti-shake. This embodiment eliminates the bouncing phenomenon of the image caused by anti-shake when the camera moves and shoots.

本实施例的防抖技术是基于动态图像防抖的,可以应用于摄像头、数码摄像机等设备。The anti-shake technology in this embodiment is based on dynamic image anti-shake, and can be applied to cameras, digital video cameras, and other equipment.

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 A method for video electronic anti-shake Expired - Fee Related CN100421455C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101080377A CN100421455C (en) 2005-10-09 2005-10-09 A method for video electronic anti-shake

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101080377A CN100421455C (en) 2005-10-09 2005-10-09 A method for video electronic anti-shake

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 Expired - Fee Related CN100421455C (en) 2005-10-09 2005-10-09 A method for video electronic anti-shake

Country Status (1)

Country Link
CN (1) CN100421455C (en)

Families Citing this family (18)

* 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 of Correcting Panoramic 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 南方电网科学研究院有限责任公司 Motion compensation method based on main motion direction 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 camera method and mobile terminal
CN106303249B (en) * 2016-08-26 2020-05-19 华为技术有限公司 Video stabilization 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, device, forest fire prevention system and electronic equipment
CN110213479B (en) * 2019-04-30 2021-05-04 北京迈格威科技有限公司 A kind of video shooting anti-shake method and device
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, device and electronic device
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
CN115103119B (en) * 2022-06-21 2025-03-18 维沃移动通信有限公司 Shooting method, device and electronic equipment
CN117939296B (en) * 2023-12-13 2025-02-18 荣耀终端有限公司 Data processing method and related device

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) A video electronic anti-shake device
CN100421455C (en) A method for video electronic anti-shake
KR100683849B1 (en) Decoder with digital image stabilization and digital image stabilization
JP3604864B2 (en) Video encoding device
KR100477647B1 (en) Motion correction apparatus for image and method thereof
US7649549B2 (en) Motion stabilization in video frames using motion vectors and reliability blocks
US8059157B2 (en) Method and system for digital image stabilization
JP2902966B2 (en) Camera shake correction device and video camera using the same
US9055217B2 (en) Image compositing apparatus, image compositing method and program recording device
US20140307110A1 (en) Motion blur-free capture of low light high dynamic range images
KR100426174B1 (en) Method for controlling a camera using video compression algorithm
US9924097B2 (en) Apparatus, method and recording medium for image stabilization
JP4814380B2 (en) Imaging apparatus, integrated circuit, and imaging method
JP2008541508A (en) Movement stabilization
CN102326389A (en) moving image shooting device
JP4420906B2 (en) Imaging device
JP4250583B2 (en) Image capturing apparatus and image restoration method
KR20040049214A (en) Apparatus and Method for searching motion vector with high speed
USRE43491E1 (en) Image shake correction image processing apparatus and program
US20080212719A1 (en) Motion vector detection apparatus, and image coding apparatus and image pickup apparatus using the same
US20100013919A1 (en) Method and apparatus for low cost motion detection
CN100551057C (en) A kind of method and encoder of realizing video code anti-shake based on dynamic image
JP4523024B2 (en) Image coding apparatus and image coding method
KR0185841B1 (en) A motion extimator for a video coder
KR100748174B1 (en) Image stabilization and correction device

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
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: VIMICRO Corp.

CP01 Change in the name or title of a patent holder
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: Zhongxing Technology Co.,Ltd.

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

Patentee before: Zhongxing Technology Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080924