JP4210910B2 - Motion vector correction apparatus, motion vector correction method, and program - Google Patents

Motion vector correction apparatus, motion vector correction method, and program Download PDF

Info

Publication number
JP4210910B2
JP4210910B2 JP2003065769A JP2003065769A JP4210910B2 JP 4210910 B2 JP4210910 B2 JP 4210910B2 JP 2003065769 A JP2003065769 A JP 2003065769A JP 2003065769 A JP2003065769 A JP 2003065769A JP 4210910 B2 JP4210910 B2 JP 4210910B2
Authority
JP
Japan
Prior art keywords
motion vector
correction
deviation
average value
motion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003065769A
Other languages
Japanese (ja)
Other versions
JP2004274628A (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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2003065769A priority Critical patent/JP4210910B2/en
Publication of JP2004274628A publication Critical patent/JP2004274628A/en
Application granted granted Critical
Publication of JP4210910B2 publication Critical patent/JP4210910B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は動き検出装置、動き検出方法及びプログラムに関し、例えば映像信号の符号化に用いる動き検出装置に適用して好適なものである。
【0002】
【従来の技術】
従来、MPEG(Moving Picture Experts Group)2方式等の映像信号高能率符号化方法において、相前後する少なくとも2つの画像間の相関を利用した動き補償予測処理に用いる動きベクトルの検出方法として、ブロックマッチング法が用いられている(例えば、特許文献1参照)。
【0003】
かかるブロックマッチング法においては、画像を所定サイズのブロックに分割し、現フレームのブロックと、前フレームにおける所定の探索範囲内の複数の候補ブロックとをパターン照合して誤差(これをME(Motion Estimation )残差と呼ぶ)を求める。そしてブロックマッチング法においては、ME残差が最小となる候補ブロックを選択し、当該選択した候補ブロックと現フレームのブロックとのずれを、当該現フレームのブロックの動きベクトルとして検出する。
【0004】
【特許文献1】
特開2001−285873公報
【0005】
【発明が解決しようとする課題】
上述したようにブロックマッチング法では、単にME残差が最小となるブロックに基づいて、各ブロック毎に局所的に動きベクトルを検出している。このため、画面全体で偏った動きがある場合(パニング等)や画面全体の動きが少ない場合等において、本来ならば近隣のブロック間で動きベクトルが揃うべきところが、互いにばらついた動きベクトルを誤検出してしまうことがある。
【0006】
このように、誤検出によって近隣のブロック間で動きベクトルにばらつきが生じた場合、復号後の映像にばたつきが発生して映像品質が低下してしまうという問題があった。
【0007】
本発明は以上の点を考慮してなされたもので、検出した動きベクトルを補正して復号後の映像のばたつきを低減し、映像品質の低下を防止し得る動き検出装置を提案しようとするものである。
【0008】
【課題を解決するための手段】
かかる課題を解決するため本発明においては、画像を所定の大きさの複数のブロックに分割して当該ブロックごとに検出した動きベクトルそれぞれに対し、当該動きベクトルを含む補正参照範囲内の動きベクトルの偏差を算出する偏差算出手段と、偏差算出手段によって算出された偏差が閾値以上である補正対象の動きベクトルに対しては、補正参照範囲内の動きベクトルを単純平均して平均値を算出し、偏差が閾値未満である補正対象の動きベクトルに対しては、補正参照範囲内の動きベクトルを重み付け平均して平均値を算出する平均値算出手段と、補正対象の動きベクトルを平均値算出手段によって算出された平均値で置き換えることにより、当該補正対象の動きベクトルを補正する動きベクトル補正手段とを動きベクトル補正装置に設けた。
【0011】
こうすることにより、誤検出等によって近隣のブロック間で動きベクトルにばらつきが生じた場合でも、動きベクトルのばらつき度合いに応じた適応的な補正を行うことができる。
【0012】
【発明の実施の形態】
以下図面について、本発明の一実施の形態を詳述する。
【0013】
(1)映像信号符号化装置の構成
図1は全体として映像信号符号化装置1を示し、外部から入力されるアナログ映像信号S1をMPEG2方式を用いて高能率圧縮符号化し、符号化データD7として出力するようになされている。すなわち映像信号符号化装置1のアナログ/ディジタル変換部2は、ビデオテープレコーダ等の映像信号供給装置(図示せず)から入力されるアナログ映像信号S1をディジタル変換してディジタル映像信号D1を生成し、これを画面並替部3に送出する。
【0014】
画面並替部3は所定の符号化シーケンスに従い、ディジタル映像信号D1の各フレーム画像に対し、Iピクチャ(イントラ符号化フレーム)、Pピクチャ(順方向予測符号化フレーム)又はBピクチャ(双方向予測符号化フレーム)のうちのどのピクチャタイプとして処理するかを指定する。そして画面並替部3は、ディジタル映像信号D1の各フレーム画像をそのピクチャタイプに応じた符号化順に並び替え、さらに当該フレーム画像を16画素×16ラインのマクロブロックに分割し、これを画像データD2として演算回路4及び動きベクトル検出部15に送出する。
【0015】
このとき演算回路4には、画像データD2のピクチャタイプに応じた予測画像データD3(後述)が動き補償部15から供給されている。演算回路4は、画像データD2から予測画像データD3を減算することにより予測残差としての演算データD4を生成し、これをDCT(Discrete Cosine Transform 、離散コサイン変換)部5に送出する(Iピクチャは予測符号化を行わないので予測画像データD3は供給されず、演算回路4は画像データD2をそのまま演算データD4としてDCT部5に送出する)。
【0016】
DCT部5は演算データD4に対し、マクロブロックを4分割した8画素×8ラインのブロック単位でDCT変換処理を施してDCT係数化し、これをDCT係数データD5として量子化部6に送出する。量子化部6はDCT係数データD5に対して量子化処理を施して量子化DCT係数データD6を生成し、これを可変長符号化部7及び逆量子化部10に送出する。
【0017】
可変長符号化部7は、量子化DCT係数データD6に対して可変長符号化処理を施すことによりそのデータ量を削減し、これを符号化データD7としてバッファメモリ8を介して外部に出力する。このときレート制御部9はバッファメモリ8内における符号化データD7の蓄積量を常に監視しており、当該蓄積量の増減に応じて量子化部6におけるDCT係数データD5の量子化ステップを可変することにより、符号化データD7のデータレートを所定範囲内に制御する。
【0018】
一方、逆量子化部10は量子化DCT係数データD6を逆量子化処理してDCT係数データD8に復元し、これを逆DCT部11に送出する。逆DCT部11は、DCT係数データD8に対して逆DCT変換処理を施して予測残差に相当する演算データD9を生成し、これを演算回路12に送出する。
【0019】
このとき演算回路12には演算回路4と同様に、演算データD9のピクチャタイプに応じた予測画像データD3が動き補償部15から供給されている。演算回路12は、予測画像データD3に予測残差としての演算データD9を加算することにより画像データを再生し、これを参照画像データD10としてフレームメモリ13に格納する(Iピクチャは予測符号化を行わないので予測画像データD3は供給されず、演算回路22は演算データD9をそのまま参照画像データD10としてフレームメモリ13に格納する)。
【0020】
一方動き検出部14は、画像データD2とフレームメモリ13に記憶されている参照画像データD10のマクロブロックとの間でブロックマッチングを行い動きベクトルを検出する。実際上この動きベクトルは、画像における水平方向成分及び垂直方向成分で表される直交座標データである。
【0021】
さらに動き検出部14は、検出した動きベクトルを本願発明の特徴である動きベクトル補正処理(後述)に従って適宜補正して動きベクトルデータD12を生成し、これを動き補償部15に供給する。上述したように動き補償部15は、フレームメモリ13に記憶されている参照画像データD10を動きベクトルデータD12を用いて動き補償することにより、画像データD2に対する予測画像データD3を生成し、これを演算回路4及び12に供給する。
【0022】
そして画像信号符号化装置1は、演算回路4において画像データD2から予測画像データD3を減算し、その予測残差としての演算データD4に対して上述したようにDCT、量子化及び可変長符号化処理を施すことにより、アナログ映像信号S1を高能率圧縮符号化して符号化データD7を生成する。
【0023】
(2)動きベクトル検出及び補正処理
次に、動き検出部14による動きベクトル検出及び補正処理を説明する。図2に示すように動き検出部14は、動きベクトル検出回路21、動きベクトル保存メモリ22及び動きベクトル補正回路23で構成される。
【0024】
動きベクトル検出回路21は、画面並替部3(図1)から供給される画像データD2の各マクロブロックについて、フレームメモリ13(図1)に記憶されている参照画像データD10のマクロブロックとの間でブロックマッチングを行い、ME残差が最小となるマクロブロックへの動きベクトルを検出し、これを仮動きベクトルデータD11として動きベクトル保存メモリ22に格納する。
【0025】
動きベクトル補正回路23は、動きベクトル保存メモリ22に格納されている仮動きベクトルデータD11の各動きベクトルに対し、その周囲の動きベクトルを加味した補正を行う。すなわち動きベクトル補正回路23は、図3に示すように、補正対象となるマクロブロックの動きベクトルである対象ベクトルx及びその周囲のマクロブロックの動きベクトルである参照ベクトルa〜hの、計9個の動きベクトルを補正参照範囲と設定し、当該補正参照範囲内の対象ベクトルx及び参照ベクトルa〜hに対する偏差σを算出する。この偏差σは、対象ベクトルx自身を含む周囲の動きベクトルのばらつき度合いに相当する。
【0026】
そして動きベクトル補正回路23は、算出した偏差σが所定の閾値以上の場合、対象ベクトルx周辺における動きベクトルのばらつきが大きいとして、式(1)に示す補正式を用いて対象ベクトルx及びその周囲の参照ベクトルa〜hの平均を取ることにより、対象ベクトルxに対して周囲の影響を加味した補正を行い、補正ベクトルXを生成する。
【0027】
【数1】

Figure 0004210910
【0028】
このとき動きベクトル補正回路23は、ベクトル値が「0」の参照ベクトルが存在する場合、当該ベクトル値「0」の参照ベクトルを上述の補正式に組み込まず、分母の値もその分小さくして補正を行う。
【0029】
これに対して偏差σが閾値未満の場合は、対象ベクトルx周辺における動きベクトルのばらつきが小さいとして、動きベクトル補正回路23は上述した補正を行うことなく、対象ベクトルxをそのまま補正ベクトルXとする。
【0030】
そして動きベクトル補正回路23は、このようにして補正した補正ベクトルXを、動きベクトルデータD12として動き補償部15(図1)に供給する。
【0031】
次に、上述した動き検出部14による動きベクトル検出及び補正処理を、図4に示すフローチャートを用いて詳細に説明する。すなわち動き検出部14は、ルーチンRT1の開始ステップから入ってステップSP1に移る。
【0032】
ステップSP1において、動き検出部14の動きベクトル検出回路21は、画面並替部3から供給される画像データD2とフレームメモリ13に記憶されている参照画像データD10との間でブロックマッチングを行うことにより、各マクロブロックの動きベクトルを検出し、次のステップSP2に移る。
【0033】
ステップSP2において、動き検出部14の動きベクトル検出回路21は、検出した各マクロブロックの動きベクトルを仮動きベクトルデータD11として動きベクトル保存メモリ22に格納し、次のステップSP3に移る。
【0034】
ステップSP3において、動き検出部14の動きベクトル補正回路23は、動きベクトル保存メモリ22に格納されている仮動きベクトルデータD11の各動きベクトル(すなわち対象ベクトルx)について、その補正参照範囲内の動きベクトル(対象ベクトルx及び参照ベクトルa〜h)に対する偏差σを算出し、次のステップSP4に移る。
【0035】
ステップSP4において、動き検出部14の動きベクトル補正回路23は、算出した各対象ベクトルxについての偏差σと所定の閾値とを比較して、対象ベクトルxそれぞれに対する補正の可否を判断する。
【0036】
すなわちステップSP4において、偏差σが閾値以上の場合、このことは対象ベクトルx周辺の動きベクトルのばらつきが大きいことを表しており、このとき動きベクトル補正回路23はステップSP5に移り、上述した式(1)に示す補正式を用いて対象ベクトルx及びその周囲の参照ベクトルa〜hの平均を取ることにより、対象ベクトルxを補正して補正ベクトルXを生成し、ステップSP7に移る。
【0037】
これに対してステップSP4において、偏差σが閾値未満の場合、このことは対象ベクトルx周辺の動きベクトルのばらつきが小さいことを表しており、このとき動きベクトル補正回路23はステップSP5に移り、対象ベクトルxを補正することなく、対象ベクトルxをそのまま補正ベクトルXとし、ステップSP7に移る。
【0038】
そして、ステップSP7において動きベクトル補正回路23は、このようにして補正した補正ベクトルXを動きベクトルデータD12として動き補償部15に出力し、ステップSP1に戻って再度ステップSP1〜SP7を繰り返す。
【0039】
(3)動作及び効果
以上の構成において、動き検出部14の動きベクトル検出回路21は、画面並替部3から供給される画像データD2の各マクロブロックについて、フレームメモリ13に記憶されている参照画像データD10との間でブロックマッチングを行い、ME残差が最小となるマクロブロックへの動きベクトルを検出して仮動きベクトルデータD11を生成し、動きベクトルメモリ22に格納する。
【0040】
動き検出部14の動きベクトル補正回路23は、動きベクトルメモリ22から仮動きベクトルデータD11を読み出し、当該動きベクトルデータD11の各動きベクトルそれぞれを対象ベクトルxとして、当該対象ベクトルxを中心とした補正参照範囲内における動きベクトルの偏差σを算出する。
【0041】
そして動きベクトル補正回路23は、算出した偏差σが閾値以上の場合、補正参照範囲内の動きベクトルのばらつきが大きいものとして、補正参照範囲内の動きベクトルの平均を取ることにより、対象ベクトルxに対し周囲の影響を加味した補正を施して補正ベクトルXを生成する。
【0042】
以上の構成によれば、検出した各マクロブロックの動きベクトルについて、その補正参照範囲内の動きベクトルの偏差をそれぞれ算出し、偏差が閾値以上の場合、当該補正参照範囲内の動きベクトルを加味した補正を行うようにしたことにより、誤検出等によって近隣のブロック間で動きベクトルにばらつきが生じた場合でも、動きベクトルを平均化して、復号後の映像のばたつきを回避して映像品質の低下を防止することができる。
【0043】
(4)他の実施の形態
なお上述の実施の形態においては、対象ベクトルx及びその周囲の参照ベクトルa〜hを単純平均して対象ベクトルxを補正するようにしたが、本発明はこれに限らず、対象ベクトルx及びその周囲の参照ベクトルa〜hを重み付け平均して当該対象ベクトルxを補正するようにしてもよい。
【0044】
例えば次式に示すように、対象ベクトルx自身の重み付けを大きくし、当該対象ベクトルxからの距離が離れるにつれて重み付けを小さくするようにすれば、対象ベクトルxの影響を残した弱い補正を施すことができる。
【0045】
【数2】
Figure 0004210910
【0046】
さらには、算出した偏差σの大小に応じて、補正の強弱を調整することも考えられる。例えば、偏差σが閾値以上でばらつきが大きいと判断した場合は、(1)式を用いて強い補正を施し、偏差σが閾値未満でばらつきが小さいと判断した場合は、(2)式を用いて弱い補正を施すようにすれば、動きベクトルのばらつき度合いに応じた適応的な補正を行うことができる。
【0047】
また、パニングやチルト等によって画像全体で特定方向の動きが生じている場合に、これに応じて重み付けを変化させることも考えられる。例えば、パニングによって画像全体で水平方向の動きが生じている場合、次式に示すように水平方向に関する動きベクトルの重み付けを大きくすることにより、画像全体の動きを考慮した適応的な補正を行うことができる。
【0048】
【数3】
Figure 0004210910
【0049】
この場合、上述した特定方向の動きを検出する方法としては、例えば画面全体の動きベクトルの平均値を用いることができる。また、ユーザが視覚的判断によって上述した特定方向の動きを検出し、当該検出した特定方向の動きをユーザが動きベクトル補正回路23に指定するようにしてもよい。
【0050】
さらに上述の実施の形態においては、補正参照範囲内の動きベクトルの偏差が閾値以上の場合に補正を行うようにしたが、本発明はこれに限らず、逆に偏差が閾値未満の場合に補正を行うようにしてもよい。
【0051】
さらに上述の実施の形態においては、補正参照範囲内の動きベクトルの偏差の大小に基づいて補正の実行を判断するようにしたが、本発明はこれに限らず、補正を行うマクロブロックをユーザが任意に指定するようにしてもよい。
【0052】
さらに上述の実施の形態においては、対象ベクトルxを中心とした9個の動きベクトルを参照範囲としてベクトル補正を行うようにしたが、本発明はこれに限らず、例えば図5に示すように、対象ベクトルxを中心とした5×5=25個の動きベクトルを参照範囲としてベクトル補正を行う等、様々な参照範囲でベクトル補正を行ってもよい。この場合、参照範囲が大きいほど参照ベクトルの影響が大きくなって強い補正が施され、画像全体の動きベクトルが均一化されるのに対し、参照範囲が小さいほど周囲の動きベクトルの影響が小さくなって弱い補正が施される。
【0053】
【発明の効果】
上述のように本発明によれば、画像を所定の大きさの複数のブロックに分割して当該ブロックごとに検出した動きベクトルそれぞれに対し、当該動きベクトルを含む補正参照範囲内の動きベクトルの偏差を算出する偏差算出手段と、偏差算出手段によって算出された偏差が閾値以上である補正対象の動きベクトルに対しては、補正参照範囲内の動きベクトルを単純平均して平均値を算出し、偏差が閾値未満である補正対象の動きベクトルに対しては、補正参照範囲内の動きベクトルを重み付け平均して平均値を算出する平均値算出手段と、補正対象の動きベクトルを平均値算出手段によって算出された平均値で置き換えることにより、当該補正対象の動きベクトルを補正する動きベクトル補正手段とを動きベクトル補正装置に設けたことにより、誤検出等によって近隣のブロック間で動きベクトルにばらつきが生じた場合でも、動きベクトルのばらつき度合いに応じた適応的な補正を行うことができ、かくして復号後の映像のばたつきを回避して映像品質の低下を防止することができる。
【図面の簡単な説明】
【図1】映像信号符号化装置の全体構成を示すブロック図である。
【図2】本発明による動き検出部の構成を示すブロック図である。
【図3】補正参照範囲の説明に供する略線図である。
【図4】動きベクトル検出・補正処理手順を示すフローチャートである。
【図5】他の実施の形態の補正参照範囲の説明に供する略線図である。
【符号の説明】
1……映像信号符号化装置、2……A/D変換部、3……画面並替部、4、12……演算器、5……DCT変換部、6……量子化部、7……可変長符号化部、8……バッファメモリ、9……レート制御部、10……逆量子化部、11……逆DCT変換部、13……フレームメモリ、14……動き検出部、15……動き補償部、21……動きベクトル検出回路、22……動きベクトル保存メモリ、23……動きベクトル補正回路。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a motion detection device, a motion detection method, and a program, and is suitable for application to, for example, a motion detection device used for encoding a video signal.
[0002]
[Prior art]
Conventionally, block matching as a motion vector detection method used for motion compensation prediction processing using a correlation between at least two successive images in a video signal high-efficiency encoding method such as MPEG (Moving Picture Experts Group) 2 method. The method is used (for example, refer to Patent Document 1).
[0003]
In such a block matching method, an image is divided into blocks of a predetermined size, and a block of the current frame is pattern-matched with a plurality of candidate blocks within a predetermined search range in the previous frame, and an error (this is called ME (Motion Estimation). ) Called the residual). In the block matching method, a candidate block having the smallest ME residual is selected, and a deviation between the selected candidate block and the current frame block is detected as a motion vector of the current frame block.
[0004]
[Patent Document 1]
Japanese Patent Laid-Open No. 2001-285873
[Problems to be solved by the invention]
As described above, in the block matching method, a motion vector is detected locally for each block based simply on the block having the smallest ME residual. For this reason, when there is a biased movement on the entire screen (panning, etc.) or when there is little movement on the entire screen, where motion vectors should normally be aligned between neighboring blocks, erroneously detected motion vectors that differ from each other May end up.
[0006]
As described above, when the motion vector varies between neighboring blocks due to erroneous detection, there is a problem that the video after decoding is fluttered and the video quality is deteriorated.
[0007]
The present invention has been made in consideration of the above points, and intends to propose a motion detection apparatus that corrects a detected motion vector to reduce fluttering of a video after decoding and can prevent deterioration of video quality. It is.
[0008]
[Means for Solving the Problems]
In order to solve such a problem, in the present invention, an image is divided into a plurality of blocks having a predetermined size, and for each motion vector detected for each block , a motion vector within the correction reference range including the motion vector is calculated . A deviation calculating means for calculating a deviation, and for a motion vector to be corrected whose deviation calculated by the deviation calculating means is equal to or greater than a threshold, a mean is calculated by simply averaging the motion vectors in the correction reference range, For a motion vector to be corrected whose deviation is less than a threshold value, an average value calculating means for calculating an average value by weighted averaging of the motion vectors in the correction reference range, and an average value calculating means for calculating the motion vector to be corrected by replacing the calculated average value, the vector correction unit motion and motion vector correction means for correcting the motion vector of the corrected Digits.
[0011]
In this way, even when motion vectors vary between neighboring blocks due to erroneous detection or the like, adaptive correction according to the degree of motion vector variation can be performed.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0013]
(1) Configuration of Video Signal Encoding Device FIG. 1 shows a video signal encoding device 1 as a whole, and an analog video signal S1 input from the outside is subjected to high-efficiency compression encoding using the MPEG2 system as encoded data D7. It is designed to output. That is, the analog / digital conversion unit 2 of the video signal encoding device 1 digitally converts the analog video signal S1 input from a video signal supply device (not shown) such as a video tape recorder to generate a digital video signal D1. This is sent to the screen rearrangement unit 3.
[0014]
The screen rearrangement unit 3 follows the predetermined coding sequence and performs I picture (intra coding frame), P picture (forward prediction coding frame) or B picture (bidirectional prediction) for each frame image of the digital video signal D1. The picture type to be processed is specified. Then, the screen rearrangement unit 3 rearranges the frame images of the digital video signal D1 in the order of encoding according to the picture type, and further divides the frame image into 16 pixel × 16 line macroblocks, which are converted into image data. The result is sent to the arithmetic circuit 4 and the motion vector detection unit 15 as D2.
[0015]
At this time, predicted image data D3 (described later) corresponding to the picture type of the image data D2 is supplied from the motion compensation unit 15 to the arithmetic circuit 4. The arithmetic circuit 4 subtracts the predicted image data D3 from the image data D2 to generate arithmetic data D4 as a prediction residual, and sends this to a DCT (Discrete Cosine Transform) unit 5 (I picture) Since no predictive coding is performed, the predicted image data D3 is not supplied, and the arithmetic circuit 4 sends the image data D2 as it is to the DCT unit 5 as the arithmetic data D4).
[0016]
The DCT unit 5 performs DCT conversion processing on the operation data D4 in units of blocks of 8 pixels × 8 lines obtained by dividing the macroblock into four to generate DCT coefficients, which are sent to the quantization unit 6 as DCT coefficient data D5. The quantization unit 6 performs quantization processing on the DCT coefficient data D5 to generate quantized DCT coefficient data D6, which is sent to the variable length coding unit 7 and the inverse quantization unit 10.
[0017]
The variable length encoding unit 7 reduces the amount of data by performing variable length encoding processing on the quantized DCT coefficient data D6, and outputs this as encoded data D7 to the outside via the buffer memory 8. . At this time, the rate control unit 9 constantly monitors the accumulation amount of the encoded data D7 in the buffer memory 8, and varies the quantization step of the DCT coefficient data D5 in the quantization unit 6 according to the increase / decrease of the accumulation amount. Thus, the data rate of the encoded data D7 is controlled within a predetermined range.
[0018]
On the other hand, the inverse quantization unit 10 performs inverse quantization processing on the quantized DCT coefficient data D6 to restore the DCT coefficient data D8, and sends this to the inverse DCT unit 11. The inverse DCT unit 11 performs inverse DCT transform processing on the DCT coefficient data D8 to generate computation data D9 corresponding to the prediction residual, and sends this to the computation circuit 12.
[0019]
At this time, similarly to the arithmetic circuit 4, the prediction circuit data D 3 corresponding to the picture type of the arithmetic data D 9 is supplied from the motion compensation unit 15 to the arithmetic circuit 12. The arithmetic circuit 12 reproduces the image data by adding the operation data D9 as the prediction residual to the prediction image data D3, and stores this in the frame memory 13 as the reference image data D10 (the I picture is subjected to prediction encoding). Since the prediction image data D3 is not supplied, the calculation circuit 22 stores the calculation data D9 in the frame memory 13 as the reference image data D10.
[0020]
On the other hand, the motion detection unit 14 detects a motion vector by performing block matching between the image data D2 and the macroblock of the reference image data D10 stored in the frame memory 13. In practice, this motion vector is orthogonal coordinate data represented by a horizontal component and a vertical component in the image.
[0021]
Furthermore, the motion detection unit 14 appropriately corrects the detected motion vector according to a motion vector correction process (described later) that is a feature of the present invention to generate motion vector data D12, and supplies this to the motion compensation unit 15. As described above, the motion compensation unit 15 generates the predicted image data D3 for the image data D2 by performing motion compensation on the reference image data D10 stored in the frame memory 13 using the motion vector data D12. This is supplied to the arithmetic circuits 4 and 12.
[0022]
Then, the image signal encoding device 1 subtracts the predicted image data D3 from the image data D2 in the arithmetic circuit 4, and performs DCT, quantization and variable length encoding on the arithmetic data D4 as the prediction residual as described above. By performing the processing, the analog video signal S1 is subjected to high-efficiency compression encoding to generate encoded data D7.
[0023]
(2) Motion Vector Detection and Correction Processing Next, motion vector detection and correction processing by the motion detection unit 14 will be described. As shown in FIG. 2, the motion detection unit 14 includes a motion vector detection circuit 21, a motion vector storage memory 22, and a motion vector correction circuit 23.
[0024]
The motion vector detection circuit 21 calculates the macroblock of the image data D2 supplied from the screen rearrangement unit 3 (FIG. 1) and the macroblock of the reference image data D10 stored in the frame memory 13 (FIG. 1). Block matching is performed between them, and a motion vector to a macroblock having the smallest ME residual is detected, and this is stored in the motion vector storage memory 22 as temporary motion vector data D11.
[0025]
The motion vector correction circuit 23 corrects each motion vector of the temporary motion vector data D11 stored in the motion vector storage memory 22 in consideration of the surrounding motion vectors. That is, as shown in FIG. 3, the motion vector correction circuit 23 includes a total of nine target vectors x that are motion vectors of macroblocks to be corrected and reference vectors a to h that are motion vectors of surrounding macroblocks. Is set as the correction reference range, and a deviation σ with respect to the target vector x and the reference vectors a to h within the correction reference range is calculated. This deviation σ corresponds to the degree of variation of surrounding motion vectors including the target vector x itself.
[0026]
Then, when the calculated deviation σ is equal to or greater than a predetermined threshold, the motion vector correction circuit 23 assumes that the variation of the motion vector around the target vector x is large, and uses the correction formula shown in Expression (1) to correct the target vector x and its surroundings. By taking an average of the reference vectors a to h, a correction that takes into account the influence of the surroundings is performed on the target vector x, and a correction vector X is generated.
[0027]
[Expression 1]
Figure 0004210910
[0028]
At this time, if there is a reference vector with a vector value “0”, the motion vector correction circuit 23 does not incorporate the reference vector with the vector value “0” in the above correction equation, and reduces the denominator value accordingly. Make corrections.
[0029]
On the other hand, when the deviation σ is less than the threshold value, the motion vector correction circuit 23 assumes that the target vector x is directly used as the correction vector X without performing the above-described correction, assuming that the variation of the motion vector around the target vector x is small. .
[0030]
The motion vector correction circuit 23 supplies the correction vector X corrected in this way to the motion compensation unit 15 (FIG. 1) as motion vector data D12.
[0031]
Next, motion vector detection and correction processing by the motion detection unit 14 described above will be described in detail with reference to the flowchart shown in FIG. That is, the motion detection unit 14 enters from the start step of the routine RT1 and proceeds to step SP1.
[0032]
In step SP1, the motion vector detection circuit 21 of the motion detection unit 14 performs block matching between the image data D2 supplied from the screen rearrangement unit 3 and the reference image data D10 stored in the frame memory 13. Thus, the motion vector of each macroblock is detected, and the process proceeds to the next step SP2.
[0033]
In step SP2, the motion vector detection circuit 21 of the motion detection unit 14 stores the detected motion vector of each macroblock in the motion vector storage memory 22 as temporary motion vector data D11, and proceeds to the next step SP3.
[0034]
In step SP3, the motion vector correction circuit 23 of the motion detection unit 14 moves each motion vector (that is, the target vector x) of the temporary motion vector data D11 stored in the motion vector storage memory 22 within the correction reference range. Deviation σ with respect to the vector (target vector x and reference vectors a to h) is calculated, and the process proceeds to the next step SP4.
[0035]
In step SP4, the motion vector correction circuit 23 of the motion detector 14 compares the calculated deviation σ for each target vector x with a predetermined threshold value, and determines whether correction is possible for each target vector x.
[0036]
That is, if the deviation σ is greater than or equal to the threshold value in step SP4, this means that the motion vector around the target vector x has a large variation. At this time, the motion vector correction circuit 23 proceeds to step SP5, and the above equation ( By taking the average of the target vector x and the surrounding reference vectors a to h using the correction formula shown in 1), the target vector x is corrected to generate a correction vector X, and the process proceeds to step SP7.
[0037]
On the other hand, when the deviation σ is less than the threshold value in step SP4, this indicates that the variation of the motion vector around the target vector x is small. At this time, the motion vector correction circuit 23 moves to step SP5, and the target The target vector x is directly used as the correction vector X without correcting the vector x, and the process proceeds to step SP7.
[0038]
In step SP7, the motion vector correction circuit 23 outputs the correction vector X corrected in this way as motion vector data D12 to the motion compensation unit 15, returns to step SP1, and repeats steps SP1 to SP7 again.
[0039]
(3) Operation and Effect In the above configuration, the motion vector detection circuit 21 of the motion detection unit 14 refers to each macroblock of the image data D2 supplied from the screen rearrangement unit 3 stored in the frame memory 13. Block matching is performed with the image data D10, a motion vector to a macroblock with the smallest ME residual is detected, temporary motion vector data D11 is generated, and stored in the motion vector memory 22.
[0040]
The motion vector correction circuit 23 of the motion detector 14 reads the provisional motion vector data D11 from the motion vector memory 22, makes each motion vector of the motion vector data D11 the target vector x, and corrects the target vector x as the center. A deviation σ of the motion vector within the reference range is calculated.
[0041]
Then, when the calculated deviation σ is equal to or larger than the threshold, the motion vector correction circuit 23 determines that the motion vector in the correction reference range is large and takes the average of the motion vectors in the correction reference range to obtain the target vector x. On the other hand, a correction vector X is generated by performing correction in consideration of the influence of surroundings.
[0042]
According to the above configuration, the motion vector deviation within the correction reference range is calculated for each detected motion vector of the macroblock, and when the deviation is equal to or greater than the threshold, the motion vector within the correction reference range is taken into account. By making corrections, even if motion vectors vary between neighboring blocks due to false detection, etc., motion vectors are averaged to avoid video flutter after decoding and reduce video quality. Can be prevented.
[0043]
(4) Other Embodiments In the above-described embodiment, the target vector x and the surrounding reference vectors a to h are simply averaged to correct the target vector x. The target vector x and the surrounding reference vectors a to h may be weighted and averaged to correct the target vector x.
[0044]
For example, as shown in the following equation, if the weight of the target vector x itself is increased and the weight is decreased as the distance from the target vector x increases, a weak correction that leaves the influence of the target vector x is applied. Can do.
[0045]
[Expression 2]
Figure 0004210910
[0046]
Furthermore, it is conceivable to adjust the strength of correction according to the calculated deviation σ. For example, when it is determined that the deviation σ is greater than or equal to the threshold and the variation is large, strong correction is performed using the equation (1), and when it is determined that the deviation σ is less than the threshold and the variation is small, the equation (2) is used. Therefore, adaptive correction according to the degree of motion vector variation can be performed.
[0047]
In addition, when a movement in a specific direction occurs in the entire image due to panning, tilt, or the like, it is conceivable to change the weighting according to this. For example, when horizontal movement occurs in the entire image due to panning, adaptive correction considering the movement of the entire image is performed by increasing the weight of the motion vector in the horizontal direction as shown in the following equation: Can do.
[0048]
[Equation 3]
Figure 0004210910
[0049]
In this case, as a method of detecting the motion in the specific direction described above, for example, an average value of motion vectors of the entire screen can be used. Alternatively, the user may detect the motion in the specific direction described above by visual judgment, and the user may specify the detected motion in the specific direction to the motion vector correction circuit 23.
[0050]
Furthermore, in the above-described embodiment, the correction is performed when the deviation of the motion vector within the correction reference range is equal to or greater than the threshold value. May be performed.
[0051]
Further, in the above-described embodiment, the execution of correction is determined based on the magnitude of the motion vector deviation within the correction reference range. However, the present invention is not limited to this, and the user selects a macroblock to be corrected. It may be arbitrarily specified.
[0052]
Furthermore, in the above-described embodiment, the vector correction is performed using the nine motion vectors centered on the target vector x as a reference range. However, the present invention is not limited to this, for example, as shown in FIG. Vector correction may be performed in various reference ranges, such as performing vector correction using 5 × 5 = 25 motion vectors centered on the target vector x as a reference range. In this case, the larger the reference range, the greater the influence of the reference vector and the stronger correction is performed, and the motion vector of the entire image is made uniform. On the other hand, the smaller the reference range, the smaller the influence of surrounding motion vectors. Weak correction.
[0053]
【The invention's effect】
As described above, according to the present invention, for each motion vector detected for each block by dividing the image into a plurality of blocks of a predetermined size, the deviation of the motion vector within the corrected reference range including the motion vector For the deviation calculation means for calculating the deviation, and for the motion vector to be corrected whose deviation calculated by the deviation calculation means is equal to or greater than the threshold, the average value is calculated by simply averaging the motion vectors within the correction reference range. For a motion vector to be corrected whose threshold is less than a threshold value, an average value calculating means for calculating an average value by weighted averaging of the motion vectors in the correction reference range, and a motion vector to be corrected are calculated by the average value calculating means. by replacing average value, in particular provided in the vector correction unit motion and motion vector correction means for correcting the motion vector of the corrected , Even if the variation in the motion vectors between neighboring blocks by erroneous detection or the like occurs, to avoid can perform adaptive compensation in accordance with the degree of dispersion of the motion vector, thus flapping of the video after decoding the video Quality degradation can be prevented.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of a video signal encoding apparatus.
FIG. 2 is a block diagram illustrating a configuration of a motion detection unit according to the present invention.
FIG. 3 is a schematic diagram for explaining a correction reference range;
FIG. 4 is a flowchart showing a motion vector detection / correction processing procedure.
FIG. 5 is a schematic diagram for explaining a correction reference range according to another embodiment;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Video signal encoding apparatus, 2 ... A / D conversion part, 3 ... Screen rearrangement part, 4, 12 ... Operation unit, 5 ... DCT conversion part, 6 ... Quantization part, 7 ... ... Variable length coding unit, 8... Buffer memory, 9... Rate control unit, 10 .. inverse quantization unit, 11 .. inverse DCT conversion unit, 13. ... Motion compensation unit, 21... Motion vector detection circuit, 22... Motion vector storage memory, 23.

Claims (5)

画像を所定の大きさの複数のブロックに分割して当該ブロックごとに検出した動きベクトルそれぞれに対し、当該動きベクトルを含む補正参照範囲内の上記動きベクトルの偏差を算出する偏差算出手段と、
上記偏差算出手段によって算出された偏差が閾値以上である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを単純平均して平均値を算出し、上記偏差が上記閾値未満である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを重み付け平均して平均値を算出する平均値算出手段と、
上記補正対象の動きベクトルを上記平均値算出手段によって算出された平均値で置き換えることにより、当該補正対象の動きベクトルを補正する動きベクトル補正手段と
を具えることを特徴とする動きベクトル補正装置。
Deviation calculating means for dividing a motion vector detected for each block by dividing the image into a plurality of blocks having a predetermined size, and calculating a deviation of the motion vector within the correction reference range including the motion vector ;
For the motion vector to be corrected whose deviation calculated by the deviation calculating means is greater than or equal to a threshold value, an average value is calculated by simply averaging the motion vectors in the correction reference range, and the deviation is the threshold value. For the motion vector to be corrected that is less than, an average value calculating means for calculating an average value by weighted averaging the motion vectors in the correction reference range;
A motion vector correction apparatus comprising: a motion vector correction unit configured to correct the motion vector to be corrected by replacing the motion vector to be corrected with an average value calculated by the average value calculation unit .
上記平均値算出手段は、
上記偏差が上記閾値未満である補正対象の上記動きベクトルに対しては、当該補正対象の動きベクトル自身の重み付けを大きくし、当該補正対象の動きベクトルからの距離が離れるにつれて重み付けを小さくするようにして、上記補正参照範囲内の上記動きベクトルを重み付け平均する
ことを特徴とする請求項1に記載の動きベクトル補正装置。
The average value calculating means is:
For the motion vector of the correction target whose deviation is less than the threshold value, the weight of the motion vector of the correction target itself is increased, and the weight is decreased as the distance from the motion vector of the correction target increases. The motion vector correction apparatus according to claim 1, wherein the motion vectors within the correction reference range are weighted averaged .
上記平均値算出手段は、
上記偏差が上記閾値未満である補正対象の上記動きベクトルに対しては、上記画像全体に生じている特定方向の動きに関する動きベクトルの重み付けを大きくするようにして、上記補正参照範囲内の上記動きベクトルを重み付け平均する
ことを特徴とする請求項に記載の動きベクトル補正装置。
The average value calculating means is:
For the motion vector to be corrected whose deviation is less than the threshold, the motion vector within the correction reference range is increased by increasing the weight of the motion vector related to the motion in a specific direction occurring in the entire image. The motion vector correction apparatus according to claim 1 , wherein the vectors are weighted and averaged .
画像を所定の大きさの複数のブロックに分割して当該ブロックごとに検出した動きベクトルそれぞれに対し、当該動きベクトルを含む補正参照範囲内の上記動きベクトルの偏差を算出する偏差算出ステップと、
上記偏差算出ステップで算出した偏差が閾値以上である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを単純平均して平均値を算出し、上記偏差が上記閾値未満である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを重み付け平均して平均値を算出する平均値算出ステップと、
上記補正対象の動きベクトルを上記平均値算出ステップで算出した平均値で置き換えることにより、当該補正対象の動きベクトルを補正する動きベクトル補正ステップと
を具えることを特徴とする動きベクトル補正方法。
A deviation calculating step of calculating a deviation of the motion vector within the correction reference range including the motion vector for each of the motion vectors detected for each block by dividing the image into a plurality of blocks of a predetermined size ;
For the motion vector to be corrected whose deviation calculated in the deviation calculating step is greater than or equal to a threshold value, an average value is calculated by simply averaging the motion vectors in the correction reference range, and the deviation is less than the threshold value. An average value calculating step for calculating an average value by weighted averaging the motion vectors in the correction reference range,
A motion vector correction method comprising: a motion vector correction step of correcting the correction target motion vector by replacing the correction target motion vector with the average value calculated in the average value calculation step .
コンピュータに対して、
画像を所定の大きさの複数のブロックに分割して当該ブロックごとに検出した動きベクトルそれぞれに対し、当該動きベクトルを含む補正参照範囲内の上記動きベクトルの偏差を偏差算出手段が算出する偏差算出ステップと、
平均値算出手段が、上記偏差算出ステップで算出した偏差が閾値以上である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを単純平均して平均値を算出し、上記偏差が上記閾値未満である補正対象の上記動きベクトルに対しては、上記補正参照範囲内の上記動きベクトルを重み付け平均して平均値を算出する平均値算出ステップと、
上記補正対象の動きベクトルを上記平均値算出ステップで算出した平均値で置き換えることにより、当該補正対象の動きベクトルを動きベクトル補正手段が補正する動きベクトル補正ステップと
を実行させるための動きベクトル補正プログラム。
Against the computer,
Deviation calculation in which deviation calculation means calculates the deviation of the motion vector within the correction reference range including the motion vector for each of the motion vectors detected for each block by dividing the image into a plurality of blocks of a predetermined size Steps,
The average value calculating means calculates the average value by simply averaging the motion vectors in the correction reference range for the motion vector to be corrected whose deviation calculated in the deviation calculating step is equal to or greater than a threshold value. For the motion vector to be corrected whose deviation is less than the threshold, an average value calculating step of calculating an average value by weighted averaging the motion vectors in the correction reference range;
A motion vector correcting step in which the motion vector correcting means corrects the motion vector to be corrected by replacing the motion vector to be corrected with the average value calculated in the average value calculating step;
Motion vector correction program for executing
JP2003065769A 2003-03-11 2003-03-11 Motion vector correction apparatus, motion vector correction method, and program Expired - Fee Related JP4210910B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003065769A JP4210910B2 (en) 2003-03-11 2003-03-11 Motion vector correction apparatus, motion vector correction method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003065769A JP4210910B2 (en) 2003-03-11 2003-03-11 Motion vector correction apparatus, motion vector correction method, and program

Publications (2)

Publication Number Publication Date
JP2004274628A JP2004274628A (en) 2004-09-30
JP4210910B2 true JP4210910B2 (en) 2009-01-21

Family

ID=33126665

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003065769A Expired - Fee Related JP4210910B2 (en) 2003-03-11 2003-03-11 Motion vector correction apparatus, motion vector correction method, and program

Country Status (1)

Country Link
JP (1) JP4210910B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006186504A (en) * 2004-12-27 2006-07-13 Sony Corp Apparatus and method of image processing, recording medium, and program
JP4504230B2 (en) * 2005-03-02 2010-07-14 株式会社東芝 Moving image processing apparatus, moving image processing method, and moving image processing program
JP4799330B2 (en) * 2006-09-08 2011-10-26 株式会社東芝 Frame interpolation circuit, frame interpolation method, and display device
FR2907301A1 (en) * 2006-10-12 2008-04-18 Thomson Licensing Sas METHOD OF INTERPOLATING A COMPENSATED IMAGE IN MOTION AND DEVICE FOR CARRYING OUT SAID METHOD
US20080247465A1 (en) * 2007-04-05 2008-10-09 Jun Xin Method and System for Mapping Motion Vectors between Different Size Blocks
JP2008311781A (en) * 2007-06-12 2008-12-25 Ntt Docomo Inc Motion picture encoder, motion picture decoder, motion picture encoding method, motion picture decoding method, motion picture encoding program and motion picture decoding program
JP4982345B2 (en) * 2007-12-10 2012-07-25 株式会社東芝 Frame interpolation circuit, frame interpolation method, and display device
JP4600530B2 (en) 2008-06-17 2010-12-15 ソニー株式会社 Image processing apparatus, image processing method, and program
JP2010288006A (en) * 2009-06-10 2010-12-24 Sharp Corp Moving picture data processor, imaging device and moving picture reproduction device

Also Published As

Publication number Publication date
JP2004274628A (en) 2004-09-30

Similar Documents

Publication Publication Date Title
JP4529919B2 (en) Adaptive quantization apparatus and adaptive quantization program
US7171052B2 (en) Apparatus and method for correcting motion of image
US9225993B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program
US6628711B1 (en) Method and apparatus for compensating for jitter in a digital video image
US7133447B2 (en) Motion estimation method using adaptive mode decision
WO2009084340A1 (en) Moving image encoder and moving image decoder
JP3968712B2 (en) Motion prediction compensation apparatus and method
JP5133290B2 (en) Video encoding apparatus and decoding apparatus
JP2000278694A (en) Encoding device, image processor, image processing system, encoding method and storage medium
JP4210910B2 (en) Motion vector correction apparatus, motion vector correction method, and program
US20070009037A1 (en) Apparatus for and method of decoding moving picture, and computer product
JP2646921B2 (en) Adaptive quantizer
JP4557752B2 (en) Moving image processing apparatus, moving image processing method, and moving image processing program
US20080212719A1 (en) Motion vector detection apparatus, and image coding apparatus and image pickup apparatus using the same
JP2004529569A (en) Detection and proper interpolation of interlaced moving area for MPEG decoding with embedded resizing function
US7864859B2 (en) Method and circuit for coding mode determinations recognizing auto exposure control of input image
US20040105589A1 (en) Moving picture compression/coding apparatus and motion vector detection method
KR101848221B1 (en) Encoding device and encoding method
US8699575B2 (en) Motion vector generation apparatus, motion vector generation method, and non-transitory computer-readable storage medium
JPH0832969A (en) Motion vector detector
JP3418799B2 (en) Motion vector correction control method
JP5913929B2 (en) Moving picture coding apparatus, control method therefor, and computer program
JP2005303555A (en) Moving image encoding apparatus and its method
JPH05103313A (en) Method and device for processing picture information
JP4533157B2 (en) Image decoding method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080111

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20081002

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081015

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111107

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111107

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees