CN102970541B - Image filtering method and device - Google Patents

Image filtering method and device Download PDF

Info

Publication number
CN102970541B
CN102970541B CN201210479363.9A CN201210479363A CN102970541B CN 102970541 B CN102970541 B CN 102970541B CN 201210479363 A CN201210479363 A CN 201210479363A CN 102970541 B CN102970541 B CN 102970541B
Authority
CN
China
Prior art keywords
motion vector
macro
macro block
region
current
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
CN201210479363.9A
Other languages
Chinese (zh)
Other versions
CN102970541A (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.)
HiSilicon Technologies Co Ltd
Original Assignee
HiSilicon Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HiSilicon Technologies Co Ltd filed Critical HiSilicon Technologies Co Ltd
Priority to CN201210479363.9A priority Critical patent/CN102970541B/en
Publication of CN102970541A publication Critical patent/CN102970541A/en
Application granted granted Critical
Publication of CN102970541B publication Critical patent/CN102970541B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image filtering method and device, belonging to the field of graph and image processing. The image filtering method comprises the following steps of: computing a motion vector of each macro block in a current region of a current frame according to searching motion vectors; computing corrective motion vectors according to the motion vectors of all the macro blocks in the current region of the current frame; correcting a searching motion vector of each macro block in a next region of the current frame according to the corrective motion vectors; and performing interpolation filtering on the current frame according to the motion vectors of the macro blocks of the current frame and a former frame. The image filtering method and device can be used for computing the motion vector of each macro block of the current frame by acquiring a motion vector of each macro block of the former frame in a coding process and combining partial motion estimation in a correcting process, so that the accurate motion vector of the current frame can be obtained by a small amount of computation on the partial motion estimation and the like, and furthermore, a good filtering effect can be achieved.

Description

Image filtering method and device
Technical field
The present invention relates to graph and image processing field, particularly a kind of image filtering method and device.
Background technology
Time-domain filtering based on motion compensation (Motion compensation) is a kind of image processing method for restraint speckle.
General principle based on the time-domain filtering of motion compensation is: suppose that current frame image and the previous frame image coefficient carried out in time-domain filtering process are alpha(x, y), wherein (x, y) represents the position of pixel in a two field picture, is also transverse and longitudinal coordinate; The pixel value of current frame image is curr(x, y), the pixel value of previous frame image is prev(x, y); Then in current frame image, the filtered pixel value of each pixel is:
pix_value(x,y)=alpha(x,y)*prev(x+mvx,y+mvy)+(1-alpha(x,y))*curr(x,y);
Wherein, (mvx, mvy) is respectively current frame image relative to the horizontal component of the motion vector of previous frame image and vertical component.
Obviously, in above-mentioned filtering, motion vector (mvx, mvy) whether accurately and filter factor alpha(x, y) value be rationally whether the condition of outbalance.Motion vector is more accurate, and the value of filter factor is more reasonable, and filter effect is better.In order to the filter effect obtained, existing a kind of image filtering method, extra overall motion estimation is adopted to obtain motion vector (mvx accurately, mvy), then reconstructed image prev(x after the coding of previous frame image is utilized, y) with current frame original image curr(x, y) carry out above-mentioned filter process, choosing of filter factor, adopts method for filtering interpolation.
But existing image filtering method, owing to adopting extra overall motion estimation and sound decision mechanism, the amount of calculation of needs is very large, and also comparatively complicated when realizing.
Summary of the invention
In view of this, embodiments provide a kind of image filtering method and device, comparatively large and realize complicated problem with the amount of calculation solving existing image filtering method.Described technical scheme is as follows:
First aspect, provides a kind of time-domain filtering method, and described method comprises:
Calculate the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
According to the motion vector computation correction motion vector of macro blocks all in current region in described present frame;
According to described correction motion vector, the searching motion vector of each macro block in next region in described present frame is revised, to calculate the motion vector of each macro block in next region described according to revised searching motion vector;
According to the motion vector of each macro block in described present frame and described former frame, filtering interpolation is carried out to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately.
In the first possible execution mode of first aspect, the described motion vector calculating each macro block in current region in present frame according to searching motion vector, specifically comprises:
If described current region is first region in present frame, the pixel pointed by the searching motion vector of current macro is defined as initial search point;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block;
Or,
If described current region is the region in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block.
In conjunction with the first possible execution mode of first aspect or first aspect, in the execution mode that the second is possible, the described motion vector computation correction motion vector according to macro blocks all in current region in described present frame, specifically comprises:
The horizontal component of the motion vector of macro blocks all in current region in described present frame and vertical component are added up respectively, obtains the first motion cumulative vector;
By in described current region in described former frame same position corresponding region in the horizontal component of motion vector of all macro blocks and vertical component add up respectively, obtain the second motion cumulative vector;
Described first motion cumulative vector and described second motion cumulative vector are subtracted each other and obtains described correction motion vector.
In conjunction with the first possible execution mode of first aspect, first aspect or the possible execution mode of the second of first aspect, in the execution mode that the third is possible, describedly according to described correction motion vector, the searching motion vector of each macro block in next region in described present frame to be revised, specifically comprises:
By the motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described correction motion vector addition.
The execution mode possible in conjunction with the second of the first possible execution mode of first aspect, first aspect, first aspect or the third possible execution mode of first aspect, in the 4th kind of possible execution mode, the described motion vector according to each macro block in described present frame and former frame also comprise before carrying out time-domain filtering to described present frame:
Relation according to motion vector of macro block each in described present frame and the motion vector of adjacent macroblocks judges whether described macro block is real motion;
Calculate the texture information of each macro block;
The described motion vector according to each macro block in described present frame and former frame carry out filtering interpolation to described present frame, and correspondence comprises:
When current macro is static and texture information is smooth, carry out adaptive-filtering;
When current macro is static and texture information is complicated, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is smooth, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is complicated, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
In conjunction with execution mode, the third possible execution mode of first aspect or the 4th kind of possible implementation of first aspect that the second of the first possible execution mode of first aspect, first aspect, first aspect is possible, in the 5th kind of possible execution mode, described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
Second aspect, provides a kind of image filtering device, and described device comprises:
Motion estimation module, for calculating the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
Corrected Calculation module, for the motion vector computation correction motion vector of all macro blocks in current region in the present frame that calculates according to described motion estimation module;
Starting point correcting module, correction motion vector for calculating according to described corrected Calculation module is revised the searching motion vector of each macro block in next region in described present frame, so that described motion estimation module calculates the motion vector of each macro block in next region described according to revised searching motion vector;
Time-domain filtering module, carries out filtering interpolation for the motion vector of each macro block in the present frame that calculates according to described motion estimation module and described former frame to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately.
In the first possible execution mode of second aspect, described motion estimation module, specifically comprises: the first determining unit and/or the second determining unit, match search unit and vector calculation unit;
Described first determining unit, if be first region in present frame for described current region, is defined as initial search point by the pixel pointed by the searching motion vector of current macro;
Described second determining unit, if for the region that described current region is in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Described match search unit, for centered by the initial search point that the initial search point determined by described first determining unit or described second determining unit are determined, searches for the coupling macro block of described current macro in described former frame in preset range;
Described vector calculation unit, for according to described match search unit searches to coupling macro block obtain the motion vector of described current macro.
In conjunction with the first possible execution mode of second aspect or second aspect, in the execution mode that the second is possible, described corrected Calculation module, specifically comprises: the first summing elements, the second summing elements and corrected Calculation unit;
Described first summing elements, adds up respectively for the horizontal component of the motion vector by macro blocks all in current region in described present frame and vertical component, obtains the first motion cumulative vector;
Described second summing elements, adds up respectively for the horizontal component of the motion vector by macro blocks all in the corresponding region of described current region same position in described former frame and vertical component, obtains the second motion cumulative vector;
Described corrected Calculation unit, obtains described correction motion vector for described first motion cumulative vector and described second motion cumulative vector being subtracted each other.
In conjunction with the first possible execution mode of second aspect, second aspect or the possible execution mode of the second of second aspect, in the execution mode that the third is possible, described starting point correcting module, specifically for by the motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described correction motion vector addition.
The execution mode possible in conjunction with the second of the first possible execution mode of second aspect, second aspect, second aspect or the third possible execution mode of second aspect, in the 4th kind of possible execution mode, described device, also comprises: motion judging module and texture computing module;
Described motion judging module, the relation for the motion vector of each macro block in the described present frame that calculates according to described motion estimation module and the motion vector of adjacent macroblocks judges whether described macro block is real motion;
Described texture computing module, for calculating the texture information of each macro block;
Described time-domain filtering module, correspondence comprises: adaptive-filtering unit, the first filter unit and the second filter unit;
Described adaptive-filtering unit, for be static when current macro and texture information is smooth time, carry out adaptive-filtering;
Described first filter unit, for be static when current macro and texture information for time complicated, adopt the first filter factor to carry out filtering;
Described first filter unit, also for when current macro is motion and texture information is smooth, adopts the first filter factor to carry out filtering;
Described second filter unit, for when current macro is motion and texture information is complexity, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
In conjunction with execution mode, the third possible execution mode of second aspect or the 4th kind of possible implementation of second aspect that the second of the first possible execution mode of second aspect, second aspect, second aspect is possible, in the 5th kind of possible execution mode, described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
The third aspect, provide a kind of time-domain filtering equipment, it is characterized in that, described equipment comprises processor, described processor for perform arbitrary in the various possible implementation as first aspect and first aspect as described in time-domain filtering method.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the image filtering method that one embodiment of the invention provides;
Fig. 2 is the method flow diagram of the image filtering method that another embodiment of the present invention provides;
Fig. 3 is the structural representation of previous frame image and current frame image in one embodiment of the invention;
Fig. 4 is the structural representation of the image filtering device that one embodiment of the invention provides;
Fig. 5 is the structural representation of the image filtering device that another embodiment of the present invention provides;
Fig. 6 is the structural representation of the image filtering device that another embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the method flow diagram of the image filtering method that one embodiment of the invention provides.This image filtering method, comprising:
Step 101, calculates the motion vector of each macro block in current region in present frame according to searching motion vector, searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
Wherein, current region comprises at least two adjacent macro blocks; Current macro is a certain macro block calculated in current region.
Step 102, according to the motion vector computation correction motion vector of macro blocks all in current region in present frame;
Step 103, revises, to calculate the motion vector of each macro block in next region according to revised searching motion vector the searching motion vector of each macro block in next region in present frame according to correction motion vector;
Wherein, next region comprises at least two adjacent macro blocks.
Step 104, carries out filtering interpolation according to the motion vector of each macro block in present frame and former frame to present frame.
In sum, the image filtering method that the present embodiment provides, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.
Please refer to Fig. 2, it illustrates the method flow diagram of the image filtering method that another embodiment of the present invention provides.This image filtering method, comprising:
Step 201, calculates the motion vector of each macro block in current region in present frame according to searching motion vector, searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
In the present embodiment, need in conjunction with video coding process to realize the calculating of the motion vector of each macro block in present frame.Suppose in video coding process, completed the Video coding of previous frame image, thus the motion vector of each macro block in the previous frame image produced in video coding process can be obtained.
Then, when calculating the motion vector of each macro block in present frame, the motion vector of the corresponding macro block being in same position in former frame with current macro in present frame can be defined as the searching motion vector of current macro.Incorporated by reference to reference to figure 3, that schematically shows the structural representation of previous frame image and current frame image, the motion vector a being in the corresponding macro block 304 of same position in the former frame obtained in an encoding process with current macro 302 can be confirmed as the searching motion vector of current macro 302.
It should be noted that, in the process of searching motion vector determining current macro 302, if the coding mode of the corresponding macro block 304 in previous frame image is intra-frame macro block, then the motion vector a of this corresponding macro block 304 is set to the searching motion vector as current macro 302 after zero;
If the coding mode of the corresponding macro block 304 in previous frame image is inter macroblocks, then directly obtain the searching motion vector of motion vector a as current macro 302 of this corresponding macro block 304.
Meanwhile, introduce the concept in last region, current region and next region herein in the current frame, last region, current region and next region are the region comprising at least two macro blocks.Under normal circumstances, last region, current region and next region are the region comprising the capable macro block of n, n be more than or equal to 1 integer, the concrete size in region can be specified voluntarily by developer.In figure 3, be with last region, current region and next region the region comprising 1 row macro block to illustrate.Meanwhile, if 7 macro blocks composition first areas of the first row from top to bottom in present frame in Fig. 3; 7 macro block composition second areas of the second row; 7 macro block composition the 3rd regions of the third line; 7 macro block composition the 4th regions of fourth line; 7 macro block composition the 5th regions of fifth line.Wherein, the order in region is identical with the coded sequence of macro block, is generally from left to right, from top to bottom; First area comprises first macro block (macro block in the most upper left corner) in present frame, then according to from left to right, is followed successively by second area, the 3rd region, the 4th region etc. from top to bottom, repeats no more.
With current region for the first area shown in Fig. 3 is example, now, because first area is first region in present frame, calculate the motion vector of each macro block in current region in present frame, comprising:
Pixel pointed by the searching motion vector of current macro is defined as initial search point; Centered by initial search point, in preset range, search for the coupling macro block of current macro in former frame; The motion vector of current macro is obtained according to coupling macro block.
Also namely, first the pixel A pointed by the searching motion vector a of current macro 302 is defined as initial search point; Then centered by initial search point A, search for the coupling macro block of current macro 302 in former frame in preset range, preset range can be the search window of 16 pixel * 16 pixels, and way of search can be both full-pixel point search; In search procedure, select the coupling macro block of current macro 302 according to predetermined matching criterior.This predetermined matching criterior can be adopt SAD(Sum of Absolute Difference, absolute difference and), namely in search procedure, select the candidate macroblock of minimum SAD as coupling macro block.Finally, the motion vector of current macro can be calculated according to the coupling macro block searched.
Will be appreciated that, the classification of current macro in this step, the pre-sizing of search window and way of search and step-size in search all can adopt various classification well-known to those skilled in the art, size and mode; The predetermined matching criterior taked is not limited to absolute difference and SAD, and this is a kind of, absolute error and STAD and squared difference and SSD etc. after rate distortion coefficients R DO, Hadleman can also be adopted to convert.Specifically different according to different implementation environment and enforcement technical staff.
Step 202, according to the motion vector computation correction motion vector of macro blocks all in current region in present frame;
After calculating the motion vector of all macro blocks in current region in present frame, correction motion vector can be calculated.Specifically:
The horizontal component of the motion vector of macro blocks all in current region in present frame and vertical component are added up respectively, obtains the first motion cumulative vector;
By in current region in former frame same position corresponding region in the horizontal component of motion vector of all macro blocks and vertical component add up respectively, obtain the second motion cumulative vector;
First motion cumulative vector and the second motion cumulative vector are subtracted each other and obtains correction motion vector.
Still for current region in present frame for the first area in Fig. 3, after the motion vector calculating 7 macro blocks in first area, can by the horizontal component of the motion vector of these 7 macro blocks and vertical component corresponding addition acquisition first motion cumulative vector (acc_mvx, acc_mvy) separately; Then acquisition second motion cumulative vector (pre_acc_mvx is added by corresponding separately to the horizontal component and vertical component that are in the motion vector of 7 macro blocks of the corresponding region of same position in former frame with first area, pre_acc_mvy), also add up by the searching motion vector of each macro block in first area, then by result (acc_mvx-pre_acc_mvx that the first motion cumulative vector and the second motion cumulative vector subtract each other, acc_mvy-pre_acc_mvy) as correction motion vector (offset_mvx, offset_mvy).
Step 203, revises, to calculate the motion vector of each macro block in next region according to revised searching motion vector the searching motion vector of each macro block in next region in present frame according to correction motion vector;
After the correction motion vector (offset_mvx, offset_mvy) obtaining current region, start the computational process of the vectors in next region.But, now need to revise the searching motion vector of each macro block in next region according to the correction motion vector of current region, then calculate the motion vector of each macro block in next region according to revised searching motion vector.
Correction motion vector according to current region is revised the searching motion vector of each macro block in next region, specifically refers to: by the motion vector of the corresponding macro block of same position in former frame of each macro block in next region in present frame and correction motion vector addition.Such as, next region is the second area in Fig. 3, then can by the searching motion vector of second area in present frame, also be each macro block motion vector of the corresponding macro block of same position and correction motion vector addition of first area in former frame in second area, thus obtain revised searching motion vector.
Then, be again circulated to the motion vector that step 201 starts to calculate each macro block in second area, now second area is using as new current region, and first area will as last region, and the 3rd region will as next region.Due to the region that second area is in present frame after first region, therefore calculate the motion vector of each macro block in current region in present frame, comprising:
After revising according to the searching motion vector of correction motion vector to current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point, searches for the coupling macro block of current macro in former frame in preset range; The motion vector of current macro is obtained according to coupling macro block.
Also namely, first revise according to the searching motion vector of correction motion vector to the current macro being positioned at second area of first area, the pixel degree pointed by revised searching motion vector obtained is defined as initial search point; Then centered by initial search point, search for the coupling macro block of current macro in former frame in preset range, preset range can be the search window of 16 pixel * 16 pixels, and way of search can be both full-pixel point search; In search procedure, select the coupling macro block of current macro according to predetermined matching criterior.This predetermined matching criterior can be adopt SAD(Sum of Absolute Difference, absolute difference and), namely in search procedure, select the candidate macroblock of minimum SAD as coupling macro block.Finally, the motion vector of current macro can be calculated according to the coupling macro block searched.
Repeat said process, calculate the motion vector of all macro blocks in all regions in present frame.
Step 204, the relation according to motion vector of macro block each in present frame and the motion vector of adjacent macroblocks judges whether macro block is real motion, meanwhile, calculates the texture information of each macro block;
After the motion vector calculating each macro block in present frame, can also judge whether macro block is real motion according to the relation of motion vector of macro block each in present frame and the motion vector of adjacent macroblocks.Specifically, adjacent macroblocks comprises the left adjacent block of current macro, left-upper neighboring block and upper adjacent block, and certainly, adjacent macroblocks also may comprise upper right adjacent block etc.
This step specifically can be as follows:
The motion vector supposing to calculate current macro is (mvx, mvy), and the motion vector of adjacent macroblocks is (mvx n, mvy n), if max (| mvx-mvx n|) be less than predetermined threshold, simultaneously max (| mvy-mvy n|) being also less than predetermined threshold, then current macro is real motion;
If the motion vector (mvx of current macro, mvy) be all 0, and current macro is less than predetermined threshold with the inter-frame complexity mating macro block in former frame, such as, current macro is less than predetermined threshold with the SAD mating macro block of former frame), then current macro is static.
Meanwhile, the texture information calculating each macro block is also needed;
Judge macro block whether be real motion before, simultaneously or afterwards, also need the texture information calculating each macro block, to judge that the texture information calculating each macro block while macro block is whether for real motion illustrates in the present embodiment.The content that the concrete account form of texture information is well known to those skilled in the art, then this repeats no more.Through calculating, can learn that the texture information of each macro block is flat site or complex region.
Step 205, carries out filtering interpolation according to the motion vector of each macro block in present frame and former frame to present frame.
The motion vector of each macro block in present frame can be obtained to 203 through step 201;
Can obtain each macro block in present frame is in step 204 real motion or static; And the texture information of each macro block is flat site or complex region in present frame;
Now, when current macro is static and texture information is smooth, adaptive-filtering is carried out;
When current macro is static and texture information is complicated, adopts the first filter factor to carry out filtering, also claim moderate strength filtering;
When current macro is motion and texture information is smooth, adopt the first filter factor to carry out filtering, also claim moderate strength filtering;
When current macro is motion and texture information is complicated, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor, also claims high equal strength filtering.
Also namely, suppose that current frame image and the previous frame image coefficient carried out in time-domain filtering process are alpha(x, y), wherein (x, y) represents the position of pixel in a two field picture, is also transverse and longitudinal coordinate; The pixel value of current frame image is curr(x, y), the pixel value of previous frame image is prev(x, y); Then in current frame image, the filtered pixel value of each pixel is:
pix_value(x,y)=alpha(x,y)*prev(x+mvx,y+mvy)+(1-alpha(x,y))*curr(x,y);
Wherein, (mvx, mvy) is respectively current frame image relative to the horizontal component of the motion vector of previous frame image and vertical component.
Wherein, coefficient alpha(x, y) specifically determine according to adaptive-filtering, the first filter factor or the second filter factor.
In sum, the image filtering method that the present embodiment provides, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.In addition, by combining, the sound of macro block being adjudicated and point situation filtering interpolation, when can realize not increasing the use of too many logical resource, carrying out the effect of time-domain filtering as far as possible in high quality.
Following embodiment is apparatus of the present invention embodiment, may be used for performing the inventive method embodiment.For the ins and outs do not disclosed in apparatus of the present invention embodiment, please refer to the inventive method embodiment.
Please refer to Fig. 4, it illustrates the block diagram of the image filtering device that one embodiment of the invention provides.This image filtering device, comprising: motion estimation module 420, corrected Calculation module 440, starting point correcting module 460 and time-domain filtering module 480.
Motion estimation module 420, for calculating the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro.
Corrected Calculation module 440, for the motion vector computation correction motion vector of all macro blocks in current region in the present frame that calculates according to described motion estimation module 420.
Starting point correcting module 460, correction motion vector for calculating according to described corrected Calculation module 440 is revised the searching motion vector of each macro block in next region in described present frame, so that described motion estimation module 420 calculates the motion vector of each macro block in next region described according to revised searching motion vector.
Time-domain filtering module 480, carries out filtering interpolation for the motion vector of each macro block in the present frame that calculates according to described motion estimation module 420 and described former frame to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately.
In sum, the image filtering device that the present embodiment provides, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.
Please refer to Fig. 5, it illustrates the block diagram of the image filtering device that another embodiment of the present invention provides.Compared with embodiment illustrated in fig. 4, the image filtering device that the present embodiment provides not only comprises motion estimation module 420, corrected Calculation module 440, starting point correcting module 460 and time-domain filtering module 480; Also comprise motion judging module 472 and texture computing module 474.
Motion estimation module 420, for calculating the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro.
Corrected Calculation module 440, for the motion vector computation correction motion vector of all macro blocks in current region in the present frame that calculates according to described motion estimation module 420.
Starting point correcting module 460, correction motion vector for calculating according to described corrected Calculation module 440 is revised the searching motion vector of each macro block in next region in described present frame, so that described motion estimation module 420 calculates the motion vector of each macro block in next region described according to revised searching motion vector.
Time-domain filtering module 480, carries out filtering interpolation for the motion vector of each macro block in the present frame that calculates according to described motion estimation module 420 and described former frame to described present frame.
More specifically say:
Described motion estimation module 420, specifically comprises: the first determining unit 422 and/or the second determining unit 424, match search unit 426 and vector calculation unit 428.
Described first determining unit 422, if be first region in present frame for described current region, is defined as initial search point by the pixel pointed by the searching motion vector of current macro;
Described second determining unit 424, if for the region that described current region is in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Described match search unit 426, for centered by the initial search point that the initial search point determined by described first determining unit 422 or described second determining unit 424 are determined, in preset range, search for the coupling macro block of described current macro in described former frame;
Described vector calculation unit 428, the coupling macro block for searching according to described match search unit 426 obtains the motion vector of described current macro.
Described corrected Calculation module 440, specifically comprises: the first summing elements 442, second summing elements 444 and corrected Calculation unit 446;
Described first summing elements 442, adds up respectively for the horizontal component of the motion vector by macro blocks all in current region in described present frame and vertical component, obtains the first motion cumulative vector;
Described second summing elements 444, adds up respectively for the horizontal component of the motion vector by macro blocks all in the corresponding region of described current region same position in described former frame and vertical component, obtains the second motion cumulative vector;
Described corrected Calculation unit 446, the second motion cumulative vector calculated for the first motion cumulative vector of being calculated by described first summing elements 442 and described second summing elements 444 subtracts each other and obtains described correction motion vector.
Described starting point correcting module 460, specifically for the correction motion vector addition motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described corrected Calculation unit 446 calculated.
Described motion judging module 472, the relation for the motion vector of each macro block in the described present frame that calculates according to described motion estimation module 420 and the motion vector of adjacent macroblocks judges whether described macro block is real motion;
Described texture computing module 474, for calculating the texture information of each macro block;
Described time-domain filtering module 480, correspondence comprises: adaptive-filtering unit 482, first filter unit 484 and the second filter unit 486;
Described adaptive-filtering unit 482, for be static when current macro and texture information is smooth time, carry out adaptive-filtering;
Described first filter unit 484, for be static when current macro and texture information for time complicated, adopt the first filter factor to carry out filtering;
Described first filter unit 484, also for when current macro is motion and texture information is smooth, adopts the first filter factor to carry out filtering;
Described second filter unit 486, for when current macro is motion and texture information is complexity, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
Described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
In above-mentioned first determining unit, the second determining unit, the second accumulated unit and the previous frame image required for starting point correcting module, the motion vector of certain macro block can obtain from video encoder (not specifically illustrating), video encoder can be outside the image filtering device that provides of the present embodiment or within part.
In sum, the image filtering device that the present embodiment provides, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.In addition, by combining, the sound of macro block being adjudicated and point situation filtering interpolation, when can realize not increasing the use of too many logical resource, carrying out the effect of time-domain filtering as far as possible in high quality.
Please refer to Fig. 6, it illustrates the structural representation of the image filtering device that yet another embodiment of the invention provides.This image filtering device comprises processor 620 and memory 640.
Wherein, memory 640 is for the data of storage of processor 620 or application program.
Processor 620, for calculating the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
Processor 620, also for the motion vector computation correction motion vector according to macro blocks all in current region in described present frame;
Processor 620, also for revising the searching motion vector of each macro block in next region in described present frame according to described correction motion vector, to calculate the motion vector of each macro block in next region described according to revised searching motion vector;
Processor 620, also for carrying out filtering interpolation according to the motion vector of each macro block in described present frame and described former frame to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately.
In sum, the image filtering device that the present embodiment provides, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.
As more preferably embodiment, processor 620 can also have following function:
Processor 620, if also for first region that described current region is in present frame, be defined as initial search point by the pixel pointed by the searching motion vector of current macro;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block;
Or,
Processor 620, if also for region that described current region is in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block.
Specifically, processor 620, also adds up respectively for the horizontal component of the motion vector by macro blocks all in current region in described present frame and vertical component, obtains the first motion cumulative vector;
By in described current region in described former frame same position corresponding region in the horizontal component of motion vector of all macro blocks and vertical component add up respectively, obtain the second motion cumulative vector;
Described first motion cumulative vector and described second motion cumulative vector are subtracted each other and obtains described correction motion vector.
Specifically, processor 620, also for by the motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described correction motion vector addition.
Specifically, processor 620, also for judging according to the relation of motion vector of macro block each in described present frame and the motion vector of adjacent macroblocks whether described macro block is real motion;
Calculate the texture information of each macro block;
When current macro is static and texture information is smooth, carry out adaptive-filtering;
When current macro is static and texture information is complicated, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is smooth, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is complicated, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
Described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
In sum, the more preferably image filtering device that provides of embodiment, by adopting the motion vector obtaining each macro block in former frame in cataloged procedure, local motion estimation in conjunction with makeover process employing calculates the motion vector of each macro block in present frame, the amount of calculation that causes is comparatively large and realize complicated problem owing to adopting overall motion estimation to solve existing image filtering method, reach the amount of calculation only needing local motion estimation etc. little, still can obtain present frame motion vector comparatively accurately, thus realize filter effect preferably.In addition, by combining, the sound of macro block being adjudicated and point situation filtering interpolation, when can realize not increasing the use of too many logical resource, carrying out the effect of time-domain filtering as far as possible in high quality.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a time-domain filtering method, is characterized in that, described method comprises:
Calculate the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
According to the motion vector computation correction motion vector of macro blocks all in current region in described present frame;
According to described correction motion vector, the searching motion vector of each macro block in next region in described present frame is revised, to calculate the motion vector of each macro block in next region described according to revised searching motion vector;
According to the motion vector of each macro block in described present frame and described former frame, filtering interpolation is carried out to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately;
The described motion vector computation correction motion vector according to macro blocks all in current region in described present frame, specifically comprises:
The horizontal component of the motion vector of macro blocks all in current region in described present frame and vertical component are added up respectively, obtains the first motion cumulative vector;
By in described current region in described former frame same position corresponding region in the horizontal component of motion vector of all macro blocks and vertical component add up respectively, obtain the second motion cumulative vector;
Described first motion cumulative vector and described second motion cumulative vector are subtracted each other and obtains described correction motion vector;
Describedly according to described correction motion vector, the searching motion vector of each macro block in next region in described present frame to be revised, specifically comprises:
By the motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described correction motion vector addition.
2. time-domain filtering method according to claim 1, is characterized in that, the described motion vector calculating each macro block in current region in present frame according to searching motion vector, specifically comprises:
If described current region is first region in present frame, the pixel pointed by the searching motion vector of current macro is defined as initial search point;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block;
Or,
If described current region is the region in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Centered by described initial search point, in preset range, search for the coupling macro block of described current macro in described former frame;
The motion vector of described current macro is obtained according to described coupling macro block.
3. time-domain filtering method according to claim 1 and 2, is characterized in that, the described motion vector according to each macro block in described present frame and former frame also comprise before carrying out filtering interpolation to described present frame:
Relation according to motion vector of macro block each in described present frame and the motion vector of adjacent macroblocks judges whether described macro block is real motion;
Calculate the texture information of each macro block;
The described motion vector according to each macro block in described present frame and former frame carry out filtering interpolation to described present frame, and correspondence comprises:
When current macro is static and texture information is smooth, carry out adaptive-filtering;
When current macro is static and texture information is complicated, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is smooth, the first filter factor is adopted to carry out filtering;
When current macro is motion and texture information is complicated, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
4. time-domain filtering method according to claim 1 and 2, is characterized in that, described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
5. an image filtering device, is characterized in that, described device comprises:
Motion estimation module, for calculating the motion vector of each macro block in current region in present frame according to searching motion vector, described searching motion vector is the motion vector of the corresponding macro block being in same position in the former frame of cataloged procedure acquisition with current macro;
Corrected Calculation module, for the motion vector computation correction motion vector according to macro blocks all in current region in described present frame;
Starting point correcting module, correction motion vector for calculating according to described corrected Calculation module is revised the searching motion vector of each macro block in next region in described present frame, so that described motion estimation module calculates the motion vector of each macro block in next region described according to revised searching motion vector;
Time-domain filtering module, carries out filtering interpolation for the motion vector of each macro block in the present frame that calculates according to described motion estimation module and described former frame to described present frame;
Wherein, described current region and next region described comprise at least two adjacent macro blocks separately;
Described corrected Calculation module, specifically comprises: the first summing elements, the second summing elements and corrected Calculation unit;
Described first summing elements, adds up respectively for the horizontal component of the motion vector by macro blocks all in current region in described present frame and vertical component, obtains the first motion cumulative vector;
Described second summing elements, adds up respectively for the horizontal component of the motion vector by macro blocks all in the corresponding region of described current region same position in described former frame and vertical component, obtains the second motion cumulative vector;
Described corrected Calculation unit, obtains described correction motion vector for described first motion cumulative vector and described second motion cumulative vector being subtracted each other;
Described starting point correcting module, specifically for by the motion vector of the corresponding macro block of same position in described former frame of each macro block in next region in described present frame and described correction motion vector addition.
6. image filtering device according to claim 5, is characterized in that, described motion estimation module, specifically comprises: the first determining unit and/or the second determining unit, match search unit and vector calculation unit;
Described first determining unit, if be first region in present frame for described current region, is defined as initial search point by the pixel pointed by the searching motion vector of current macro;
Described second determining unit, if for the region that described current region is in present frame after first region, after revising according to the searching motion vector of correction motion vector to described current macro in last region, the pixel pointed by revised searching motion vector obtained is defined as initial search point;
Described match search unit, for centered by the initial search point that the initial search point determined by described first determining unit or described second determining unit are determined, searches for the coupling macro block of described current macro in described former frame in preset range;
Described vector calculation unit, for according to described match search unit searches to coupling macro block obtain the motion vector of described current macro.
7. the image filtering device according to claim 5 or 6, is characterized in that, described device, also comprises: motion judging module and texture computing module;
Described motion judging module, the relation for the motion vector of each macro block in the described present frame that calculates according to described motion estimation module and the motion vector of adjacent macroblocks judges whether described macro block is real motion;
Described texture computing module, for calculating the texture information of each macro block;
Described time-domain filtering module, correspondence comprises: adaptive-filtering unit, the first filter unit and the second filter unit;
Described adaptive-filtering unit, for be static when current macro and texture information is smooth time, carry out adaptive-filtering;
Described first filter unit, for be static when current macro and texture information for time complicated, adopt the first filter factor to carry out filtering;
Described first filter unit, also for when current macro is motion and texture information is smooth, adopts the first filter factor to carry out filtering;
Described second filter unit, for when current macro is motion and texture information is complexity, adopt the second filter factor to carry out filtering, described second filter factor is greater than described first filter factor.
8. the image filtering device according to claim 5 or 6, is characterized in that, described current region and next region described specifically comprise the capable macro block of n separately, described n be more than or equal to 1 integer.
CN201210479363.9A 2012-11-22 2012-11-22 Image filtering method and device Active CN102970541B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210479363.9A CN102970541B (en) 2012-11-22 2012-11-22 Image filtering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210479363.9A CN102970541B (en) 2012-11-22 2012-11-22 Image filtering method and device

Publications (2)

Publication Number Publication Date
CN102970541A CN102970541A (en) 2013-03-13
CN102970541B true CN102970541B (en) 2015-05-27

Family

ID=47800384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210479363.9A Active CN102970541B (en) 2012-11-22 2012-11-22 Image filtering method and device

Country Status (1)

Country Link
CN (1) CN102970541B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104349080B (en) * 2013-08-07 2018-12-14 联想(北京)有限公司 A kind of image processing method and electronic equipment
CN110636304B (en) * 2019-10-23 2021-11-12 威创集团股份有限公司 YCbCr444 and YCbCr422 conversion method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1444406A (en) * 2003-01-24 2003-09-24 杭州国芯科技有限公司 Vidio motion estimation method
CN1770880A (en) * 2004-11-05 2006-05-10 中兴通讯股份有限公司 Time-domain filtering method for video code
CN1925614A (en) * 2005-08-30 2007-03-07 深圳清华大学研究院 Rapid movement estimating method
CN101662678A (en) * 2008-08-29 2010-03-03 华为技术有限公司 Method and device for motion compensated temporal filter
CN102724504A (en) * 2012-06-14 2012-10-10 华为技术有限公司 Filtering method and filtering device for video coding
CN102740073A (en) * 2012-05-30 2012-10-17 华为技术有限公司 Coding method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060105408A (en) * 2005-04-01 2006-10-11 엘지전자 주식회사 Method for scalably encoding and decoding video signal
KR100643269B1 (en) * 2004-01-13 2006-11-10 삼성전자주식회사 Video/Image coding method enabling Region-of-Interest

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1444406A (en) * 2003-01-24 2003-09-24 杭州国芯科技有限公司 Vidio motion estimation method
CN1770880A (en) * 2004-11-05 2006-05-10 中兴通讯股份有限公司 Time-domain filtering method for video code
CN1925614A (en) * 2005-08-30 2007-03-07 深圳清华大学研究院 Rapid movement estimating method
CN101662678A (en) * 2008-08-29 2010-03-03 华为技术有限公司 Method and device for motion compensated temporal filter
CN102740073A (en) * 2012-05-30 2012-10-17 华为技术有限公司 Coding method and device
CN102724504A (en) * 2012-06-14 2012-10-10 华为技术有限公司 Filtering method and filtering device for video coding

Also Published As

Publication number Publication date
CN102970541A (en) 2013-03-13

Similar Documents

Publication Publication Date Title
KR101003105B1 (en) Method for encoding and decoding video signal using motion compensation based on affine transform and apparatus thereof
KR100870115B1 (en) Method for forming image using block matching and motion compensated interpolation
US8705611B2 (en) Image prediction encoding device, image prediction encoding method, image prediction encoding program, image prediction decoding device, image prediction decoding method, and image prediction decoding program
JP3538055B2 (en) Motion vector detection device
TWI455588B (en) Bi-directional, local and global motion estimation based frame rate conversion
CN111050182B (en) Motion vector prediction method, video coding method, related equipment and device
JP2012516637A5 (en)
US20090066800A1 (en) Method and apparatus for image or video stabilization
US10453207B2 (en) Method and system for global motion estimation and compensation
CN105100807A (en) Motion vector post-processing based frame rate up-conversion method
JP2008541508A (en) Movement stabilization
JP2007053767A (en) Method and apparatus for iteratively calculating set of global motion parameters from motion vectors allocated to blocks into which each image is divided for image or image sequence
JP2006254349A (en) Motion vector detecting method and apparatus, and computer program for executing motion vector detection processing on computer
CN116684637B (en) Prediction refinement method, apparatus, and medium using optical flow for encoding video data
CN102970541B (en) Image filtering method and device
JP4796696B2 (en) Method and apparatus for computer-aided motion compensation of digitized images and computer-readable recording medium
CN112261413A (en) Video encoding method, encoding device, electronic device, and storage medium
JPWO2009048112A1 (en) Moving picture decoder, moving picture decoding method, and moving picture decoding program
CN107124617B (en) Method and system for generating random vector in motion estimation motion compensation
CN112055221B (en) Inter-frame prediction method, video coding method, electronic device and storage medium
US20130148738A1 (en) Global Motion Vector Estimation
CN107645663A (en) The determination method and device of a kind of motion estimation search range
JP3309519B2 (en) Motion vector detection device
CN106998437B (en) Method and device for reconstructing video image
KR20200134302A (en) Image processing apparatus and method

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