CN102143364A - Motion estimation method based on genetic search and template matching - Google Patents

Motion estimation method based on genetic search and template matching Download PDF

Info

Publication number
CN102143364A
CN102143364A CN 201110097766 CN201110097766A CN102143364A CN 102143364 A CN102143364 A CN 102143364A CN 201110097766 CN201110097766 CN 201110097766 CN 201110097766 A CN201110097766 A CN 201110097766A CN 102143364 A CN102143364 A CN 102143364A
Authority
CN
China
Prior art keywords
point
sad
template
expression
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201110097766
Other languages
Chinese (zh)
Other versions
CN102143364B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN 201110097766 priority Critical patent/CN102143364B/en
Publication of CN102143364A publication Critical patent/CN102143364A/en
Application granted granted Critical
Publication of CN102143364B publication Critical patent/CN102143364B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a motion estimation method based on genetic search and template matching, belonging to the technical field of video compression coding. The method comprises the following steps: adopting multiple methods to predict blocks to be coded in a frame to be coded so as to obtain multiple predicted motion vectors; respectively searching a point directed by each predicted motion vector in a search window, adopting three termination strategies to judge, and if the three termination strategies are met, finishing the search; using an initial template to carry out population initialization, and copying, intersecting and selecting population cycles until genetic termination conditions are met; on the basis, searching adjacent points so as to obtain matched blocks to code the blocks to be coded; and traversing a complete frame image, and coding the complete frame image. In the method, the statistic characteristics of the motion vectors are combined to set the three termination strategies, and the template matching is combined with the genetic search algorithm for use, thus ensuring the coding quality and greatly reducing the time of the motion estimation at the same time.

Description

A kind of method for estimating based on genetic search and template matches
Technical field
The invention belongs to the technology of video compressing encoding field, relate to a kind of method for estimating based on genetic search and template matches.
Background technology
Estimation is the important step of technology of video compressing encoding, its role is to remove effectively the time redundancy of image sequence.In the video compression coding process, estimation has occupied the operand of 50%-70%, and the efficient that therefore improves estimation has great significance for accelerating video coding speed.
BMA is the method for estimating that is most widely used at present, by every two field picture being divided into the piece of a plurality of non-overlapping copies, in the search window of reference frame, search out and the highest piece of reference block similarity, calculate residual sum motion vector between the two and encode, thereby the compression that realizes video image is handled.Wherein, full search method is passed through all match block in the traversal search window, thereby reaches very high search precision, but computation complexity is too high, is difficult to requirement of real time.Be requirement of real time, occurred many fast search algorithms in succession, as: three step search methods, new three step search methods, four step search methods, hierarchical search method, diamond search method etc., and these fast algorithms are easy to be absorbed in locally optimal solution.(Genetic Algorithm GA) has global optimizing ability preferably, and in recent years, the application of this algorithm in estimation obtained increasing concern in view of genetic algorithm.
Genetic algorithm is that a kind of evolution rule by the nature survival of the fittest develops and next random search algorithm, has very high robustness, and has potential systematicness and concurrency, is very suitable for block matching motion and estimates.But traditional motion estimation algorithm based on genetic search is placed on main energy on design complicated coding method, fitness function and the genetic operator mostly, has increased algorithm complex to a great extent.Though the estimation based on genetic algorithm has global optimizing ability preferably, its too high algorithm complex needs huge calculating and storage overhead, has increased the scramble time.The search time of some improvement algorithm even suitable with full-search algorithm, this is inconsistent with the original intention that improves search speed.And traditional motion estimation algorithm based on genetic search generally adopts lower genetic iteration number of times, though improved the speed of search relatively, has reduced the precision of genetic algorithm, thereby has influenced encoding quality.
Summary of the invention
Purpose of the present invention, be exactly at traditional motion estimation algorithm based on genetic search in the deficiency aspect search speed and the search precision, a kind of method for estimating based on genetic search and template matches is provided.
For achieving the above object, the method for estimating that the present invention is based on genetic search and template matches may further comprise the steps:
(1) the previous coded frame with frame to be encoded is current reference frame; One of them block to be encoded for the treatment of coded frame adopts medium filtering, the prediction of upper strata piece, consecutive frame forecast method to predict corresponding median prediction motion vector, upper strata piece motion vectors and the consecutive frame motion vectors that obtains this block to be encoded respectively; Adopt the method for medium filtering to predict this block to be encoded simultaneously SADValue;
(2) coordinate by described block to be encoded adds the above median prediction motion vector, obtains the search center point of current reference frame; The piece that to calculate with described search center point be starting point SADValue; Judge whether to satisfy first and stop tactful condition: if satisfy, be optimum point then with described search center point, and execution in step (10); If do not satisfy, then execution in step (3).
(3) coordinate by described block to be encoded adds the above upper strata piece motion vectors and consecutive frame motion vectors respectively, corresponding upper strata piece prediction search point and the consecutive frame prediction search point of obtaining; Starting point, search center point, upper strata piece prediction search point and consecutive frame prediction search point with described block to be encoded is central point respectively, obtains the consecutive points of the level and the vertical direction of each described central point; Calculating each is that the piece of starting point and each are the piece of starting point with described consecutive points with described central point SADValue therefrom obtains current minimum SADValue;
(4) judge whether to satisfy second and stop tactful condition: if satisfy, then with described current minimum SADThe starting point that is worth pairing is as optimum point, and execution in step (10); If do not satisfy, then judge whether to satisfy the 3rd condition that stops strategy: if satisfy, execution in step (9) then; If do not satisfy, then execution in step (5);
(5) design original template with the described search center point of step (2) for the center, calculate each individuality in the initial hereditary population SADThe piece that it is starting point that value, each individuality of described initial hereditary population correspond to each point of being covered with described original template respectively;
(6) judge whether to satisfy heredity and stop strategy: if satisfy, execution in step (9) then; If do not satisfy, then in the present age hereditary population with minimum SADThe corresponding individuality of value carries out duplicating for three times, to second little SADThe corresponding individuality of value carries out duplicating and give up for twice three with maximum SADThree individualities that value is corresponding, more once to all the other each individual replicates;
(7) step (6) is duplicated each that obtain and duplicate individuality and carry out a mutation operation and obtain corresponding variation individuality, and it is individual to calculate each described variation SADValue; Select it from described duplicating individuality and the variation individuality corresponding with it SADValue smaller enters hereditary population of future generation;
(8) judge the described present age, whether hereditary population reached default population iteration threshold: if reach, execution in step (9) then; Otherwise, execution in step (6);
(9) with in the described present age hereditary population with minimum SADThe starting point of the piece that value is corresponding is as central point, obtains four consecutive points in the level and the vertical direction of this central point, each piece that to calculate with these four consecutive points respectively be starting point SADValue is therefrom chosen with minimum SADThe starting point of the piece that value is corresponding is an optimum point;
(10) to being that the match block of starting point is encoded with described optimum point; Whether the frame number of judging the coded frame between current reference frame and the described frame to be encoded less than default maximum reference frame number: if less than, with the previous coded frame of this current reference frame as current reference frame and return execution in step (2); Otherwise finish the coding of described block to be encoded, and execution in step (11);
(11) the described frame to be encoded of traversal judges whether also to exist block to be encoded; If exist, then return step (1) next block to be encoded is encoded; If do not exist, then finish.
Further, step of the present invention (2) described first stops strategy as the formula (1), if y 1=1, then the condition of the first termination strategy is satisfied in expression; Otherwise foot first with thumb down stops the condition of strategy;
Figure 2011100977662100002DEST_PATH_IMAGE001
(1)
In the formula (1), SADExpression is with the described search center point piece that is starting point SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; Pred_mvRepresent described median prediction motion vector; TH1 expression first threshold, described first threshold is calculated by formula (2);
Figure 421607DEST_PATH_IMAGE002
(2)
In the formula (2), TH_staticThe parameter that expression is default; TH_factorThe expression threshold value factor, the described threshold value factor is calculated by formula (3);
Figure 2011100977662100002DEST_PATH_IMAGE003
(3)
In the formula (3), BlocktypeThe type of representing described block to be encoded, 1 expression 16x16 type blocks, 2 expression 16x8 type blocks, 3 expression 8x16 type blocks, 4 expression 8x8 type blocks, 5 expression 8x4 type blocks, 6 expression 4x8 type blocks, 7 expression 4x4 type blocks.
Further, step of the present invention (4) described second stops strategy as the formula (4), if y 2=1, then the condition of the second termination strategy is satisfied in expression; Otherwise foot second with thumb down stops the condition of strategy;
Figure 41069DEST_PATH_IMAGE004
(4)
In the formula (4), Min_SADThe described current minimum sad value of expression step (3); Pred_SADRepresent the block to be encoded of described prediction SADValue; THThe described first threshold of 1 expression.
Further, step of the present invention (4) the described the 3rd stops strategy as the formula (5), if y 3=1, then the condition of the 3rd termination strategy is satisfied in expression; Otherwise foot the 3rd with thumb down stops the condition of strategy;
Figure 2011100977662100002DEST_PATH_IMAGE005
?(5)
In the formula (5), Abs() represents to take absolute value function; MV_x, MV_yRepresent the described current minimum of step (3) respectively SADX, the y component of the motion vector of value corresponding blocks; Pred_MV_x, Pred_MV_yX, the y component of representing the described median prediction motion vector of step (2) respectively; Min_SADThe described current minimum of expression step (3) SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; TH2 expressions, second threshold value, described second threshold value is calculated by formula (6);
Figure 920032DEST_PATH_IMAGE006
(6)
In the formula (6), TH_DSBe default parameter; TH_factorRepresent the described threshold value factor.
Further, the present invention is in the described original template of step (5), with the 8th point directly over the described search center point is template first point, with first level of described template the 8th point left is template second point, with first level of described template the 8th point to the right be template thirdly, with the 8th point under the described search center point is template the 4th point, with the 4th level of described template the 8th point left is template the 5th point, with the 4th level of described template the 8th point to the right is template the 6th point, with described search center point level the 12nd point left is template the 7th point, with described search center point level the 12nd point to the right is template the 8th point, with the 4th point directly over the described search center point is first datum mark, with the described first datum mark level the 4th point left is template the 9th point, with the described first datum mark level the 4th point to the right is template the 10th point, with the 4th point under the described search center point is second datum mark, with the described second datum mark level the 4th point left is template the ten one point, with the described second datum mark level the 4th point to the right is template the ten two point, is template the ten three point with described search center point.
Further, the described heredity of step of the present invention (6) stops strategy as the formula (7), if y 4=1, then the condition that heredity stops strategy is satisfied in expression; Otherwise foot heredity with thumb down stops the condition of strategy;
Figure 2011100977662100002DEST_PATH_IMAGE007
(7)
In the formula (7), Pred_SAD_aveRepresent the average of previous generation heredity population SADValue; SAD_aveRepresent the average of contemporary hereditary population SADValue; TH_DSThe parameter that expression is default; Minge_SADRepresent in the contemporary hereditary population minimum SADValue; THDescribed second threshold value of 2 expressions.
Further, the step of the described mutation operation of step of the present invention (7) is as follows:
1) calculates the described individual variation step-length of duplicating by formula (8); Determine the described individual variation direction of duplicating by producing a random number, described random number is got any one number in 1,2,3,4, wherein, directly over " 1 " represents that the variation direction is, under " 2 " represent that the variation direction is, " 3 " expression variation direction be level left, " 4 " expression variation direction be level to the right;
2) the described coordinate that duplicates individuality is added the variation step-length along the determined variation direction of step 1), obtain the individual coordinate of described variation;
Figure 342530DEST_PATH_IMAGE008
(8)
In the formula (8), Mutation_stepIndividual variation step-length is duplicated in expression; SAD_indThe sad value of representing current individuality; SAD_aveThe average sad value of representing contemporary hereditary population.
Compared with prior art, the invention has the beneficial effects as follows: the present invention adopts the Forecasting Methodology of multiple motion vector that the motion vector of block to be encoded is predicted in step (1), compared with prior art, has improved the precision of motion vectors; Take into full account the statistical property of motion vector simultaneously, in step (2) and step (4), designed three kinds and stopped strategy, significantly reduced search point when guaranteeing coding quality, improved the slow defective of traditional algorithm search speed; In step (5) and step (9), use template matching algorithm that the genetic search process is optimized, take into account the strong and high characteristics of template matching algorithm local optimal searching precision of genetic algorithm global optimizing ability, when accelerating convergence rate, improved search precision problem on the low side in the traditional algorithm.
Description of drawings
Fig. 1 is the method for estimating flow chart based on genetic search and template matches;
Fig. 2 is the search schematic diagram based on multiple motion vectors;
Fig. 3 is consecutive points search schematic diagram;
Fig. 4 is the initial population distribution schematic diagram;
Fig. 5 is the mutation operation schematic diagram.
Embodiment
As shown in Figure 1, below illustrate the method for estimating that the present invention is based on genetic search and template matches, its step is as follows:
(1) with frame to be encoded (with mFrame is an example) previous coded frame be current reference frame; To one of them block to be encoded of m frame (with nPiece is an example) adopt the prediction of medium filtering, upper strata piece, consecutive frame forecast method to predict respectively, correspondingly obtain the nThe median prediction motion vector of piece ( Pred_mv), upper strata piece motion vectors ( MV_uplayer) and the consecutive frame motion vectors ( MV_adj); Adopt the method prediction the of medium filtering simultaneously nPiece SAD(Sum of Absolute Difference) value obtains Pred_SAD
(2) as shown in Figure 2, by nThe coordinate of piece (is promptly put D correspondence nThe coordinate of piece) adds Pred_mv, obtain the search center point A of current reference frame; And to calculate with an A be the piece of starting point SADValue; Judge whether first condition that stops strategy satisfies: if satisfy, be optimum point then with an A, and execution in step (10); If do not satisfy, then execution in step (3).
In the present embodiment, step (2) described first stops strategy as the formula (1), if y 1=1, then the condition of the first termination strategy is satisfied in expression; Otherwise foot first with thumb down stops the condition of strategy;
(1)
In the formula (1), SADExpression is with the described search center point piece that is starting point SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; Pred_mvRepresent described median prediction motion vector; TH1 expression first threshold, described first threshold is calculated by formula (2);
(2)
In the formula (2), TH_staticThe parameter that expression is default, span is 20-200, value is 50 in the present embodiment; TH_factorThe expression threshold value factor, the described threshold value factor is calculated by formula (3);
Figure 350434DEST_PATH_IMAGE003
(3)
In the formula (3), BlocktypeThe type of representing described block to be encoded, 1 expression 16x16 type blocks, 2 expression 16x8 type blocks, 3 expression 8x16 type blocks, 4 expression 8x8 type blocks, 5 expression 8x4 type blocks, 6 expression 4x8 type blocks, 7 expression 4x4 type blocks.
The present invention is provided with first and stops strategy, has taken into full account the situation of coded image static block.In sequence image, the movement tendency between adjacent two frames is often smaller, and correspondingly, the motion vector of each piece is also smaller, and this situation is particularly evident in the static background image and the less image that moves.By judging that whether first condition that stops strategy satisfies, and can determine whether to finish search at the algorithm initial stage.With respect to traditional motion estimation algorithm based on genetic search, significantly reduced the search of static block, improved the speed of motion search.The present invention also can use other termination strategies at static block of the prior art, but what present embodiment was set first stops strategy than other termination strategies at static block, increased the estimating part of motion vector, it is more accurate to the judgement of static block to make, avoids by the disconnected decline that causes coding quality of erroneous judgement.
(3) as shown in Figure 2, by nThe coordinate of piece (some D correspondence the nThe coordinate of piece) adds respectively MV_adjWith MV_uplayer, corresponding consecutive frame prediction search point B and the upper strata piece prediction search point C of obtaining; Be central point (each central point is shown in the filled circles among Fig. 2) with an A, some B, some C and some D respectively, obtain the consecutive points (each consecutive points is shown in the open circles among Fig. 2) of the level and the vertical direction of each described central point, the consecutive points that each central point correspondence obtains constitute a little rhombus template; Calculating each is that the piece of starting point and each are the piece of starting point with described consecutive points with described central point SADValue therefrom obtains current minimum SADValue Min_SAD
(4) judge whether second condition that stops strategy satisfies: if satisfy, then with Min_SADPairing starting point is as optimum point, and execution in step (10); If do not satisfy, judge then whether the 3rd condition that stops strategy satisfies: if satisfy, execution in step (9) then; If do not satisfy, then execution in step (5).
In the present embodiment, step (4) described second stops strategy as the formula (4), if y 2=1, then the condition of the second termination strategy is satisfied in expression; Otherwise foot second with thumb down stops the condition of strategy;
Figure 687875DEST_PATH_IMAGE004
(4)
In the formula (4), Min_SADThe described current minimum of expression step (3) SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; THThe described first threshold of 1 expression.
In the present embodiment, step (4) the described the 3rd stops strategy as the formula (5), if y 3=1, then the condition of the 3rd termination strategy is satisfied in expression; Otherwise foot the 3rd with thumb down stops the condition of strategy;
?(5)
In the formula (5), Abs() represents to take absolute value function; MV_x, MV_yRepresent the described current minimum of step (3) respectively SADX, the y component of the motion vector of value corresponding blocks; Pred_MV_x, Pred_MV_yX, the y component of representing the described median prediction motion vector of step (2) respectively; Min_SADThe described current minimum of expression step (3) SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; TH2 expressions, second threshold value, described second threshold value is calculated by formula (6);
Figure 369576DEST_PATH_IMAGE006
(6)
In the formula (6), TH_DSBe default parameter, span is 50-500, and value is 150 in the present embodiment; TH_factorRepresent the described threshold value factor.
Of the present invention second, third stops strategy also can use of the prior art by judging the termination strategy of sad value size.
Compare by the termination strategy of judging the sad value size with existing, second, third of present embodiment setting stops center-biased characteristic and the Space Consistency that strategy has taken into full account motion vector; For improving the precision of motion vectors, not only motion vector is carried out median prediction, also take upper strata piece prediction, closed on the reference frame forecast method; And present embodiment has also taken into full account the statistical property of motion vector, makes that the judgement that stops strategy is more accurate, has significantly reduced search point simultaneously, has accelerated the speed of search.
(5) design original template with the described search center point A of step (2) for the center, calculate each individuality in the initial hereditary population SADValue, each individuality of described initial hereditary population is corresponding with the piece that is starting point with each point that described original template was covered respectively.
The present invention can produce initial population at random or adopt the original template of other common types of prior art to produce initial population, but as preferred implementation of the present invention, in the present embodiment, the description of original template is specific as follows:
As shown in Figure 4, the distance between adjacent horizontal line or the adjacent vertical line is 4 points, with the 8th some F directly over the described search center point A 1Be template first point; With first level of described template the 8th some F left 2Be template second point; With first level of described template the 8th some F to the right 3For template thirdly; With the 8th some F under the described search center point 4Be template the 4th point; With the 4th level of described template the 8th some F left 5Be template the 5th point; With the 4th level of described template the 8th some F to the right 6Be template the 6th point; With described search center point level the 12nd some F left 7Be template the 7th point; With described search center point level the 12nd some F to the right 8Be template the 8th point; With the 4th point directly over the described search center point is first datum mark, with the described first datum mark level the 4th some F left 9Be template the 9th point; With the described first datum mark level the 4th some F to the right 10Be template the 10th point; With the 4th point under the described search center point is second datum mark, with the described second datum mark level the 4th some F left 11Be template the ten one point; With the described second datum mark level the 4th some F to the right 12Be template the ten two point; With an A is template the ten three point.
The present invention produces initial population by fixing template is set, and effectively combines the local optimal searching ability of template matching algorithm; And it is widely distributed that template covers point, can effectively bring into play the outstanding global optimizing ability of genetic algorithm.Produce initial population with the original template that produces initial population or employing other types at random and compare, adopt the initial population of the original template generation of setting of the present invention to increase the quality of initial population in the genetic search, accelerated the search speed of estimation.
(6) judge that heredity stops strategy and whether satisfies: if satisfy, execution in step (9) then; If do not satisfy, then in the present age hereditary population with minimum SADThe corresponding individuality of value carries out duplicating for three times, to second little SADThe corresponding individuality of value carries out duplicating for twice, give up three with maximum SADThree individualities that value is corresponding, more once to all the other each individual replicates.
In the present embodiment, the described heredity of step (6) stops strategy as the formula (7), if y 4=1, then the condition that heredity stops strategy is satisfied in expression; Otherwise foot heredity with thumb down stops the condition of strategy;
Figure 160815DEST_PATH_IMAGE007
(7)
In the formula (7), Pred_SAD_aveRepresent the average of previous generation heredity population SADValue; SAD_aveRepresent the average of contemporary hereditary population SADValue; TH_DSThe parameter that expression is default; Minge_SADRepresent in the contemporary hereditary population minimum SADValue; THDescribed second threshold value of 2 expressions.
The present invention can use traditional heredity of only judging the sad value size to stop strategy, but the heredity of present embodiment stops strategy to be compared with traditional heredity termination strategy of only judging the sad value size, increased kind of the judgement of group mean sad value, can judge effectively whether population restrains, it is more accurate to make that heredity stops strategy, has increased coding quality.
(7) step (6) is duplicated each that obtain and duplicate individuality and carry out a mutation operation and obtain corresponding variation individuality, and it is individual to calculate each described variation SADValue; Select it from described duplicating individuality and the variation individuality corresponding with it SADValue smaller enters hereditary population of future generation.
In the present embodiment, the step of the described mutation operation of step (7) is specific as follows:
1) calculates the described individual variation step-length of duplicating by formula (8) Mutation_stepDetermine the described individual variation direction of duplicating by producing a random number, described random number is got any one number in 1,2,3,4, wherein, directly over " 1 " represents that the variation direction is, under " 2 " represent that the variation direction is, " 3 " expression variation direction be level left, " 4 " expression variation direction be level to the right.
2) shown in figure (5), add the variation step-length with the described coordinate (shown in the filled circles) that duplicates individuality along the determined variation direction of step 1), (1,2 or 3) obtain the individual coordinate of described variation; It is 1 o'clock individual possible position of coordinate of variation that figure intermediate cam shape is expressed as the variation step-length; It is 2 o'clock individual possible positions of coordinate of variation that square is expressed as the variation step-length; It is 3 o'clock individual possible positions of coordinate of variation that five-pointed star is expressed as the variation step-length.
Figure 803411DEST_PATH_IMAGE008
(8)
In the formula (8), SAD_indRepresent current individuality SADValue; SAD_aveRepresent the average of contemporary hereditary population SADValue.
The present invention also can use traditional bits of coded variation method, but present embodiment is taked the mode of adaptively changing variation step-length, and picked at random variation direction has increased the possibility that obtains the new individuality of high-quality by mutation operation greatly.Compare with traditional bits of coded variation method, the mutation operation method of present embodiment has been accelerated the convergence rate of population, has reduced storage demand and amount of calculation, in the estimation of multiframe reference, can significantly reduce the time of motion search.
(8) judge the described present age, whether hereditary population reached default population iteration threshold L(span of population iteration threshold is generally 3-10, and value is 5 in the present embodiment): if reached default population iteration threshold L, execution in step (9) then; If do not reach default population iteration threshold L, execution in step (6) then;
(9) as shown in Figure 3, with in the described present age hereditary population with minimum SADThe starting point E of the piece that value is corresponding is as central point (shown in the filled circles of Fig. 3), level and vertical direction at an E obtain four consecutive points (shown in the open circles of Fig. 3), these four consecutive points constitute a little rhombus template, each piece that to calculate with these four consecutive points respectively be starting point SADValue is therefrom chosen with minimum SADThe starting point of the piece that value is corresponding is an optimum point;
(10) to being that the match block of starting point is encoded with described optimum point; Judge current reference frame and mWhether (span of maximum reference frame number is 1-16 normally less than default maximum reference frame number for the frame number of the coded frame between the frame, value is 10 in the present embodiment): if less than, with the previous coded frame of this current reference frame as current reference frame and return execution in step (2); Otherwise finish nThe coding of piece, execution in step (11);
(11) traversal the mFrame judges whether also to exist block to be encoded; If exist, then return step (1) next block to be encoded is encoded; If do not exist, then finish.

Claims (7)

1. method for estimating based on genetic search and template matches is characterized in that comprising may further comprise the steps:
(1) the previous coded frame with frame to be encoded is current reference frame; One of them block to be encoded for the treatment of coded frame adopts medium filtering, the prediction of upper strata piece, consecutive frame forecast method to predict corresponding median prediction motion vector, upper strata piece motion vectors and the consecutive frame motion vectors that obtains this block to be encoded respectively; Adopt the method for medium filtering to predict this block to be encoded simultaneously SADValue;
(2) coordinate by described block to be encoded adds the above median prediction motion vector, obtains the search center point of current reference frame; The piece that to calculate with described search center point be starting point SADValue; Judge whether to satisfy first and stop tactful condition: if satisfy, be optimum point then with described search center point, and execution in step (10); If do not satisfy, then execution in step (3);
(3) coordinate by described block to be encoded adds the above upper strata piece motion vectors and consecutive frame motion vectors respectively, corresponding upper strata piece prediction search point and the consecutive frame prediction search point of obtaining; Starting point, search center point, upper strata piece prediction search point and consecutive frame prediction search point with described block to be encoded is central point respectively, obtains the consecutive points of the level and the vertical direction of each described central point; Calculating each is that the piece of starting point and each are the piece of starting point with described consecutive points with described central point SADValue therefrom obtains current minimum SADValue;
(4) judge whether to satisfy second and stop tactful condition: if satisfy, then with described current minimum SADThe starting point that is worth pairing is as optimum point, and execution in step (10); If do not satisfy, then judge whether to satisfy the 3rd condition that stops strategy: if satisfy, execution in step (9) then; If do not satisfy, then execution in step (5);
(5) design original template with the described search center point of step (2) for the center, calculate each individuality in the initial hereditary population SADThe piece that it is starting point that value, each individuality of described initial hereditary population correspond to each point of being covered with described original template respectively;
(6) judge whether to satisfy heredity and stop strategy: if satisfy, execution in step (9) then; If do not satisfy, then in the present age hereditary population with minimum SADThe corresponding individuality of value carries out duplicating for three times, to second little SADThe corresponding individuality of value carries out duplicating and give up for twice three with maximum SADThree individualities that value is corresponding, more once to all the other each individual replicates;
(7) step (6) is duplicated each that obtain and duplicate individuality and carry out a mutation operation and obtain corresponding variation individuality, and it is individual to calculate each described variation SADValue; Select it from described duplicating individuality and the variation individuality corresponding with it SADValue smaller enters hereditary population of future generation;
(8) judge the described present age, whether hereditary population reached default population iteration threshold: if reach, execution in step (9) then; Otherwise, execution in step (6);
(9) with in the described present age hereditary population with minimum SADThe starting point of the piece that value is corresponding is as central point, obtains four consecutive points in the level and the vertical direction of this central point, each piece that to calculate with these four consecutive points respectively be starting point SADValue is therefrom chosen with minimum SADThe starting point of the piece that value is corresponding is an optimum point;
(10) to being that the match block of starting point is encoded with described optimum point; Whether the frame number of judging the coded frame between current reference frame and the described frame to be encoded less than default maximum reference frame number: if less than, with the previous coded frame of this current reference frame as current reference frame and return execution in step (2); Otherwise finish the coding of described block to be encoded, and execution in step (11);
(11) the described frame to be encoded of traversal judges whether also to exist block to be encoded; If exist, then return step (1) next block to be encoded is encoded; If do not exist, then finish.
2. the method for estimating based on genetic search and template matches according to claim 1 is characterized in that: step (2) described first stops strategy as the formula (1), if y 1=1, then the condition of the first termination strategy is satisfied in expression; Otherwise foot first with thumb down stops the condition of strategy;
Figure 2011100977662100001DEST_PATH_IMAGE001
(1)
In the formula (1), SADExpression is with the described search center point piece that is starting point SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; Pred_mvRepresent described median prediction motion vector; TH1 expression first threshold, described first threshold is calculated by formula (2);
Figure 544555DEST_PATH_IMAGE002
(2)
In the formula (2), TH_staticThe parameter that expression is default; TH_factorThe expression threshold value factor, the described threshold value factor is calculated by formula (3);
Figure 2011100977662100001DEST_PATH_IMAGE003
(3)
In the formula (3), BlocktypeThe type of representing described block to be encoded, 1 expression 16x16 type blocks, 2 expression 16x8 type blocks, 3 expression 8x16 type blocks, 4 expression 8x8 type blocks, 5 expression 8x4 type blocks, 6 expression 4x8 type blocks, 7 expression 4x4 type blocks.
3. the method for estimating based on genetic search and template matches according to claim 1 is characterized in that, step (4) described second stops strategy as the formula (4), if y 2=1, then the condition of the second termination strategy is satisfied in expression; Otherwise foot second with thumb down stops the condition of strategy;
Figure 346420DEST_PATH_IMAGE004
(4)
In the formula (4), Min_SADThe described current minimum sad value of expression step (3); Pred_SADRepresent the block to be encoded of described prediction SADValue; THThe described first threshold of 1 expression.
4. the method for estimating based on genetic search and template matches according to claim 1 is characterized in that, step (4) the described the 3rd stops strategy as the formula (5), if y 3=1, then the condition of the 3rd termination strategy is satisfied in expression; Otherwise foot the 3rd with thumb down stops the condition of strategy;
Figure 2011100977662100001DEST_PATH_IMAGE005
?(5)
In the formula (5), Abs() represents to take absolute value function; MV_x, MV_yRepresent the described current minimum of step (3) respectively SADX, the y component of the motion vector of value corresponding blocks; Pred_MV_x, Pred_MV_yX, the y component of representing the described median prediction motion vector of step (2) respectively; Min_SADThe described current minimum of expression step (3) SADValue; Pred_SADRepresent the block to be encoded of described prediction SADValue; TH2 expressions, second threshold value, described second threshold value is calculated by formula (6);
Figure 396284DEST_PATH_IMAGE006
(6)
In the formula (6), TH_DSBe default parameter; TH_factorRepresent the described threshold value factor.
5. the method for estimating based on genetic search and template matches according to claim 1, it is characterized in that, in the described original template of step (5), with the 8th point directly over the described search center point is template first point, with first level of described template the 8th point left is template second point, with first level of described template the 8th point to the right be template thirdly, with the 8th point under the described search center point is template the 4th point, with the 4th level of described template the 8th point left is template the 5th point, with the 4th level of described template the 8th point to the right is template the 6th point, with described search center point level the 12nd point left is template the 7th point, with described search center point level the 12nd point to the right is template the 8th point, with the 4th point directly over the described search center point is first datum mark, with the described first datum mark level the 4th point left is template the 9th point, with the described first datum mark level the 4th point to the right is template the 10th point, with the 4th point under the described search center point is second datum mark, with the described second datum mark level the 4th point left is template the ten one point, with the described second datum mark level the 4th point to the right is template the ten two point, is template the ten three point with described search center point.
6. the method for estimating based on genetic search and template matches according to claim 1 is characterized in that, the described heredity of step (6) stops strategy as the formula (7), if y 4=1, then the condition that heredity stops strategy is satisfied in expression; Otherwise foot heredity with thumb down stops the condition of strategy;
(7)
In the formula (7), Pred_SAD_aveRepresent the average of previous generation heredity population SADValue; SAD_aveRepresent the average of contemporary hereditary population SADValue; TH_DSThe parameter that expression is default; Minge_SADRepresent in the contemporary hereditary population minimum SADValue; THDescribed second threshold value of 2 expressions.
7. the method for estimating based on genetic search and template matches according to claim 1 is characterized in that, the step of the described mutation operation of step (7) is as follows:
1) calculates the described individual variation step-length of duplicating by formula (8); Determine the described individual variation direction of duplicating by producing a random number, described random number is got any one number in 1,2,3,4, wherein, directly over " 1 " represents that the variation direction is, under " 2 " represent that the variation direction is, " 3 " expression variation direction be level left, " 4 " expression variation direction be level to the right;
2) the described coordinate that duplicates individuality is added the variation step-length along the determined variation direction of step 1), obtain the individual coordinate of described variation;
Figure 682909DEST_PATH_IMAGE008
(8)
In the formula (8), Mutation_stepIndividual variation step-length is duplicated in expression; SAD_indThe sad value of representing current individuality; SAD_aveThe average sad value of representing contemporary hereditary population.
CN 201110097766 2011-04-19 2011-04-19 Motion estimation method based on genetic search and template matching Expired - Fee Related CN102143364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110097766 CN102143364B (en) 2011-04-19 2011-04-19 Motion estimation method based on genetic search and template matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110097766 CN102143364B (en) 2011-04-19 2011-04-19 Motion estimation method based on genetic search and template matching

Publications (2)

Publication Number Publication Date
CN102143364A true CN102143364A (en) 2011-08-03
CN102143364B CN102143364B (en) 2012-11-14

Family

ID=44410552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110097766 Expired - Fee Related CN102143364B (en) 2011-04-19 2011-04-19 Motion estimation method based on genetic search and template matching

Country Status (1)

Country Link
CN (1) CN102143364B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104380742A (en) * 2012-01-30 2015-02-25 奥兰吉公司 Encoding and decoding by means of selective inheritance
CN105007493A (en) * 2015-07-17 2015-10-28 珠海市杰理科技有限公司 Match searching method and system based on motion search window
CN105338354A (en) * 2015-09-29 2016-02-17 北京奇艺世纪科技有限公司 Motion vector estimation method and device
CN112991521A (en) * 2021-03-26 2021-06-18 清华大学 Point cloud anisotropic neighborhood searching method based on entropy energy

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212681A (en) * 2007-12-25 2008-07-02 海信集团有限公司 Quick motion search method
CN101951521A (en) * 2010-10-30 2011-01-19 上海交通大学 Video image motion estimation method for extent variable block

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212681A (en) * 2007-12-25 2008-07-02 海信集团有限公司 Quick motion search method
CN101951521A (en) * 2010-10-30 2011-01-19 上海交通大学 Video image motion estimation method for extent variable block

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《Circuits and Systems for Video Technology,IEEE Transactions on》 20090407 Lai-Mi Po et al. Novel Directional Gradient Descent Searches for Fast Block Motion Estimation 第19卷, 第8期 *
《ELECTRONICS LETTERS》 20050120 H.So et al. Fast motion estimation using modified diamond search patterns 第41卷, 第2期 *
《光学与光电技术》 20040830 许波 等 一种新的基于自适应模板的相关跟踪算法 第2卷, 第4期 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104380742A (en) * 2012-01-30 2015-02-25 奥兰吉公司 Encoding and decoding by means of selective inheritance
CN104380742B (en) * 2012-01-30 2018-11-13 奥兰吉公司 By way of coding method, coding/decoding method, encoder, decoder and the system of selectivity heredity
CN105007493A (en) * 2015-07-17 2015-10-28 珠海市杰理科技有限公司 Match searching method and system based on motion search window
CN105007493B (en) * 2015-07-17 2018-06-29 珠海市杰理科技股份有限公司 Matching searching method and system based on motion search window
CN105338354A (en) * 2015-09-29 2016-02-17 北京奇艺世纪科技有限公司 Motion vector estimation method and device
CN105338354B (en) * 2015-09-29 2019-04-05 北京奇艺世纪科技有限公司 A kind of motion vector estimation method and apparatus
CN112991521A (en) * 2021-03-26 2021-06-18 清华大学 Point cloud anisotropic neighborhood searching method based on entropy energy

Also Published As

Publication number Publication date
CN102143364B (en) 2012-11-14

Similar Documents

Publication Publication Date Title
CN110087087A (en) VVC interframe encode unit prediction mode shifts to an earlier date decision and block divides and shifts to an earlier date terminating method
CN102714736B (en) Method and apparatus for encoding and decoding motion vector based on reduced motion vector predictor candidates
CN104539962B (en) It is a kind of merge visually-perceptible feature can scalable video coding method
CN106131547B (en) The high-speed decision method of intra prediction mode in Video coding
CN103260031B (en) Method and apparatus for encoding/decoding to motion vector
CN103873861B (en) Coding mode selection method for HEVC (high efficiency video coding)
CN105306947B (en) video transcoding method based on machine learning
CN102143364B (en) Motion estimation method based on genetic search and template matching
CN106131546B (en) A method of determining that HEVC merges and skip coding mode in advance
CN103546758B (en) A kind of fast deep graphic sequence inter mode decision fractal coding
CN102801976A (en) Inter-frame module selecting method based on three-dimensional wavelet video code
CN103327327B (en) For the inter prediction encoding unit selection method of high-performance video coding HEVC
CN103313058B (en) The HEVC Video coding multimode optimization method realized for chip and system
CN102752588A (en) Video encoding and decoding method using space zoom prediction
CN105120290A (en) Fast coding method for depth video
CN107318016A (en) A kind of HEVC inter-frame forecast mode method for rapidly judging based on zero piece of distribution
CN106791828B (en) Video transcoding method and its transcoder based on machine learning
CN102291581A (en) Realizing method of self-adaptive motion estimation supporting frame field
KR100947447B1 (en) Method and its apparatus for fast mode decision in multi-view video coding
CN102164283A (en) Sub-pixel motion estimation method based on AVS (audio video standard)
CN101877790B (en) Panoramic video coding-oriented quick global motion estimation method
CN108495138A (en) A kind of integer pixel motion estimation method based on GPU
CN100592797C (en) Fast motion estimating method
CN110198442A (en) A kind of intra-frame prediction method, device and storage medium for Video coding
CN100385957C (en) Kinematic vector predicting 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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121114

Termination date: 20150419

EXPY Termination of patent right or utility model