JP2011205693A - Image decoding apparatus and image encoding apparatus - Google Patents
Image decoding apparatus and image encoding apparatus Download PDFInfo
- Publication number
- JP2011205693A JP2011205693A JP2011131970A JP2011131970A JP2011205693A JP 2011205693 A JP2011205693 A JP 2011205693A JP 2011131970 A JP2011131970 A JP 2011131970A JP 2011131970 A JP2011131970 A JP 2011131970A JP 2011205693 A JP2011205693 A JP 2011205693A
- Authority
- JP
- Japan
- Prior art keywords
- image
- prediction
- prediction mode
- target block
- feature vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、画像復号装置及び画像符号化装置に関し、より詳細には、画像を複数のブロックに分割しブロック毎に入力画像と予測画像の差分画像を符号化して生成した符号化データを、復号して画像を再生する画像復号装置、及びその符号化データを生成する画像符号化装置に関するものである。 The present invention relates to an image decoding apparatus and an image encoding apparatus, and more specifically, decodes encoded data generated by dividing an image into a plurality of blocks and encoding a difference image between an input image and a predicted image for each block. The present invention relates to an image decoding apparatus that reproduces an image and an image encoding apparatus that generates encoded data thereof.
近年、画像のデータ量増加に伴い、画像の空間的な相関を利用して画像を符号化することで画像のデータ量を削減する画像符号化技術の重要性が増している。 In recent years, with the increase in the amount of image data, the importance of image encoding techniques that reduce the amount of image data by encoding images using the spatial correlation of images has increased.
特に、画像を複数の小領域(ブロック)に分割して符号化を行うブロックベースの画像符号化方式は、動画像符号化方式H.264/AVC(非特許文献1)において採用されており、広く用いられている。 In particular, a block-based image encoding method for encoding an image by dividing an image into a plurality of small regions (blocks) is a moving image encoding method H.264. H.264 / AVC (Non-Patent Document 1) is widely used.
非特許文献1で採用されているブロックベースの画像符号化方式は、動画像におけるフレーム内の空間的な相関を利用して符号化を行う。そのため、動画像符号化において利用される画像符号化方式は画面内予測方式とも呼ばれる。
The block-based image encoding method employed in Non-Patent
非特許文献1に記載の画面内予測方式では、符号化対象であるブロックの予測画像を生成するために、隣接するブロックの局所復号画像を利用する。しかしながら、その場合には隣接ブロックと符号化対象ブロック間の相関のみしか予測画像の生成に利用することができない。すなわち、符号化対象ブロックから離れた場所に位置する領域と当該符号化対象ブロックとの間の相関を利用することができない。従って、生成される予測画像と原画像の差が大きい、すなわち予測画像の精度が低いという問題があった。
In the intra prediction method described in Non-Patent
そのため、符号化対象ブロックから離れた場所に位置する領域における局所復号画像に基づいて予測画像を生成する画面内予測方式が提案されている。なお、そのような方式においては、予測画像の生成に用いる領域に関する位置情報を復号時に特定する必要がある。位置情報を特定する方法の一例として、位置情報を符号化する方法が挙げられる。 Therefore, an intra-screen prediction method has been proposed in which a predicted image is generated based on a locally decoded image in a region located at a location away from the encoding target block. In such a method, it is necessary to specify position information regarding a region used for generating a predicted image at the time of decoding. An example of a method for specifying position information is a method for encoding position information.
非特許文献2及び特許文献1では、その位置情報を特定するためにテンプレートマッチングと呼ばれる探索を用いる方式が提案されている。この方式では、テンプレートマッチングを用いることで位置情報を符号化することなく特定できる。そのため、位置情報を符号化する場合に較べて符号化データのデータ量を削減することができる。
Non-Patent
ここで、非特許文献2及び特許文献1に記載されているテンプレートマッチングを用いた予測画像生成処理について、さらに詳しく説明する。なお、以下では簡単のため、図1に示すように画像を正方形のブロックに分割して、左上からラスタスキャン順に処理を行うものとして説明する。また、ブロック単位の処理を説明する場合においては、k番目のブロックが処理対象であるものとしてそのブロックを処理対象ブロックBkと呼ぶ。また、処理対象ブロックBkを処理する時点で、符号化又は復号処理が完了していて局所復号画像が存在する領域を復号済領域と呼ぶこととする。
Here, the predicted image generation processing using template matching described in
以下、図21のフローチャートに従って、テンプレートマッチングを用いた予測画像生成処理の手順を説明する。まず、最小評価値Dminの値を最大値に設定する(ステップS101)。次に、処理対象ブロックBkに対応する複数の候補領域の中から、処理対象となる候補領域を順次選択する(ステップS102)。なお、候補領域としては、「候補領域の大きさ及び形状はブロックBkのものと一致する」且つ「候補領域は復号済領域内に位置する」という2つの条件を満たす領域(N個あるとする)を用いる。そして、選択された候補領域(候補領域Rn)に対して、ループ終了(ステップS106)までの、ステップS103〜S105の処理を行う。 Hereinafter, the procedure of the predicted image generation process using template matching will be described with reference to the flowchart of FIG. First, the minimum evaluation value Dmin is set to the maximum value (step S101). Next, candidate areas to be processed are sequentially selected from among a plurality of candidate areas corresponding to the processing target block Bk (step S102). In addition, as candidate areas, it is assumed that there are N areas satisfying the two conditions of “the size and shape of the candidate area match those of the block Bk” and “the candidate area is located in the decoded area” (N number) ) Is used. Then, the processes in steps S103 to S105 up to the end of the loop (step S106) are performed on the selected candidate area (candidate area Rn).
ステップS103では、処理対象ブロックBkと候補領域Rnの間の類似度を表す評価値Dsを以下の方法で計算する。なお、各ブロック/候補領域に関連付けられた所定の形状の領域のことを、ブロック/候補領域に対するテンプレートとして定義する。以下では簡単のため、図22に示すようなブロック/候補領域の上辺及び左辺に隣接するブロック外の画素群及びブロックの左上に位置する画素を含むカギ型の領域を当該ブロック/候補領域に対するテンプレートとして用いることとする。 In step S103, the evaluation value Ds representing the similarity between the processing target block Bk and the candidate region Rn is calculated by the following method. A region having a predetermined shape associated with each block / candidate region is defined as a template for the block / candidate region. In the following, for simplicity, a key-type area including a pixel group outside the block adjacent to the upper side and the left side of the block / candidate area and a pixel located at the upper left of the block / candidate area as shown in FIG. It will be used as.
ブロックBkに対するテンプレート上の画素群と、候補領域Rnに対するテンプレート上の画素群の間の相関を表す量として、評価値Dsを次の式により求める。 As an amount representing the correlation between the pixel group on the template for the block Bk and the pixel group on the template for the candidate region Rn, an evaluation value Ds is obtained by the following equation.
ここで、lBk(io,jo)、lRn(io,jo)は、それぞれ処理対象ブロックBk又は候補領域Rnにおいて、ブロック/候補領域内の左上の画素から水平方向にio画素、垂直方向にjo画素離れた場所に位置する画素の画素値を表す。また、Tはテンプレート上の各画素のブロック/候補領域内の左上の画素に対する相対位置の集合である。例えば、テンプレートが図22に示すカギ型の形状である場合には、集合Tは次式で表される。
T={(-1,-1), (0,-1), (1,-1), (2,-1), (3,-1), (-1,0), (-1,1), (-1,2), (-1,3)}
Here, lBk (io, jo) and lRn (io, jo) are respectively io pixels in the horizontal direction and jo pixels in the vertical direction from the upper left pixel in the block / candidate area in the processing target block Bk or candidate area Rn. It represents the pixel value of a pixel located at a distant place. T is a set of relative positions with respect to the upper left pixel in the block / candidate area of each pixel on the template. For example, when the template has a key shape shown in FIG. 22, the set T is expressed by the following equation.
T = {(-1, -1), (0, -1), (1, -1), (2, -1), (3, -1), (-1,0), (-1, 1), (-1,2), (-1,3)}
ステップS104では、ステップS101又はステップS105にて設定された最小評価値Dmin以下の値を評価値Dsがもつ場合はステップS105に進む。そうでない場合、ループを終了し、次の候補領域を選択してステップS103へ移行する。ステップS105では、最小評価値Dminの値を評価値Dsとする。そして、予測画像候補として候補領域Rnを設定する。その後、ループを終了し、次の候補領域を選択してステップS103へ移行する。N回のループが終了した時点で、ステップS105にて設定された予測画像候補を処理対象ブロックBkの予測画像として出力する(ステップS107)。 In step S104, if the evaluation value Ds has a value equal to or smaller than the minimum evaluation value Dmin set in step S101 or step S105, the process proceeds to step S105. Otherwise, the loop is terminated, the next candidate area is selected, and the process proceeds to step S103. In step S105, the value of the minimum evaluation value Dmin is set as the evaluation value Ds. Then, a candidate area Rn is set as a predicted image candidate. Thereafter, the loop is terminated, the next candidate area is selected, and the process proceeds to step S103. When N loops are completed, the predicted image candidate set in step S105 is output as the predicted image of the processing target block Bk (step S107).
以上に示した手順によって、処理対象ブロックBkに対する予測画像を生成することができる。その際、予測画像として利用する領域の位置をテンプレートマッチングにより特定するので、その領域の位置情報をサイド情報として符号化する必要がない。すなわち、テンプレートマッチングを用いることで、余分なサイド情報を符号化することなく、符号化対象ブロックから離れた場所に位置する領域の局所復号画像に基づいて精度の高い予測画像が生成できるため、符号化効率を向上させることができる。 A predicted image for the processing target block Bk can be generated by the procedure described above. At this time, since the position of the area used as the predicted image is specified by template matching, it is not necessary to encode the position information of the area as side information. That is, by using template matching, a highly accurate predicted image can be generated based on a local decoded image in a region located away from the encoding target block without encoding extra side information. Efficiency can be improved.
また、特許文献2では、ブロックマッチングによって予測領域位置の探索を行う技術が提案されている。図23は従来技術(特許文献2)における画像符号化装置の構成を示すブロック図である。図23に示す画像符号化装置100は、入力される差分画像に対し直交変換を行う直交変換部101と、直交変換の結果得られる変換係数の量子化を行う量子化部102と、量子化部102の逆操作にあたる逆量子化を行う逆量子化部103と、直交変換部101の逆操作にあたる逆直交変換を行う逆直交変換部104と、画像を一時的に記憶するフレームメモリ105とを備える。さらに、画像符号化装置100は、処理対象ブロックに対する予測画像を生成する画面内予測部106と、入力画像と復号済画像を入力として、予測領域位置を決定する予測領域探索部107と、入力データに対し可変長符号化を行う可変長符号化部108とを備える。
次に、図24に示したフローチャートを参照して、画像符号化装置100の概略動作を説明する。まず、画像を構成するブロックを符号化処理順に従って選択し(ステップS111)、選択されたブロックを符号化対象ブロックBkとして、ループ終了(ステップS117)までの、ステップS112〜S116の処理を行う。
Next, the schematic operation of the
ステップS112では、予測領域探索部107が、入力画像上で処理対象ブロックBkに対応する領域と相関の高い領域をフレームメモリ105に記録されている復号済画像領域内から選択して、予測領域位置を求める。なお、処理対象ブロックBkとある領域の間の相関は、領域内全ての画素における対応する画素間の誤差の自乗和により推定することができる。
In step S112, the prediction
ステップS113では、求めた予測領域位置を画面内予測部106に入力し、画面内予測部106が、当該予測領域位置が示す復号済画像上の領域に基づいて予測画像を生成する。ステップS114では、符号化対象ブロックとステップS113にて生成された予測画像の差分である予測残差画像を、直交変換部101、量子化部102の順に入力し、直交変換、量子化処理を施し、変換係数レベル画像を得る。
In step S113, the obtained prediction region position is input to the
ステップS115では、この変換係数レベル画像を、逆量子化部103、逆直交変換部104の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS113にて生成された予測画像と足し合わすことで、当該符号化対象ブロックBkの局所復号画像を得て、それをフレームメモリ105に記録する。ステップS116では、変換係数レベル画像及び予測領域位置を可変長符号化部108にも入力し、可変長符号化を施した後、符号化データとして出力する。そして、全ての符号化対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置100は入力画像を符号化し、その入力画像に対応する符号化データを出力することができる。
In step S115, the transform coefficient level image is input in the order of the inverse quantization unit 103 and the inverse
図25は従来技術(特許文献2)における画像復号装置の構成を示すブロック図である。図25で示す画像復号装置110は、図23における逆量子化部103、逆直交変換部104、フレームメモリ105、画面内予測部106とそれぞれ同じ機能を有する逆量子化部112、逆直交変換部113、フレームメモリ114、画面内予測部115を備え、さらに、可変長符号化された入力データに対し、復号処理を行う可変長復号部111を備える。
FIG. 25 is a block diagram showing a configuration of an image decoding device according to the prior art (Patent Document 2). An image decoding apparatus 110 illustrated in FIG. 25 includes an
次に、図26に示したフローチャートを参照して、画像復号装置110の概略動作を説明する。まず、符号化処理順に従って復号対象ブロックを順次選択し(ステップS121)、選択されたブロックを復号対象ブロックBkとして、ループ終了(ステップS126)までの、ステップS122〜S125の処理を行う。 Next, the schematic operation of the image decoding apparatus 110 will be described with reference to the flowchart shown in FIG. First, decoding target blocks are sequentially selected according to the encoding processing order (step S121), and the processing of steps S122 to S125 is performed up to the end of the loop (step S126) using the selected block as the decoding target block Bk.
ステップS122では、可変長復号部111が、復号対象ブロックにBk対応する符号化データを復号して変換係数レベル画像及び予測領域位置を再生する。ステップS123では、予測領域位置情報を画面内予測部115に入力し、当該予測領域位置が示す復号済画像上の領域に基づいて予測画像を生成する。ステップS124では、変換係数レベル画像を、逆量子化部112、逆直交変換部113の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS123にて生成された予測画像と足し合わされることで、当該復号対象ブロックBkの復号画像を生成する。ステップS125では、生成された復号画像を局所復号画像としてフレームメモリ105へ記録すると共に、復号画像として出力する。そして、全て復号対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置100で生成した符号化データを入力として、その符号化データに対応する復号画像を画像復号装置110により出力することができる。
In step S122, the variable
以上説明した通り、特許文献2に記載された画像符号化装置では、処理対象ブロックとの相関が高い領域をブロックマッチングにより復号済画像領域内から探索し、その領域の位置(予測領域位置)を処理対象ブロックの位置に対する予測領域の位置の変位として符号化する。そして、画像復号装置では、復号された予測領域位置に基づいて処理対象ブロックの予測画像を生成する。このように、特許文献2に記載の画像符号化/復号装置では、処理対象ブロックから空間的に離れた位置にある領域に基づいて予測画像を生成することができる。
As described above, in the image encoding device described in
しかしながら、非特許文献2及び特許文献1に記載のごときテンプレートマッチングを用いた予測画像生成処理を行う場合、多数の候補領域と処理対象ブロックとの間の評価値を計算する必要がある。そのため、符号化及び復号時における処理量が多いという問題があった。
However, when performing predicted image generation processing using template matching as described in
テンプレートマッチングの処理量を低減するための方法としては、候補領域の数を削減するという方法が考えられる。例えば図27において斜線で示したように、処理対象ブロックBkから一定の距離の範囲内にある復号済画像上の領域を、候補領域(候補ブロック)Rnが存在し得る領域として設定することで、候補ブロック数を削減することができる。言い換えると、前述のテンプレートマッチングを用いた予測画像生成処理の手順において、候補領域を次の(I)〜(III)の3つの条件を満たす領域として定義することで、処理量を低減することができる。 As a method for reducing the template matching processing amount, a method of reducing the number of candidate regions is conceivable. For example, as indicated by hatching in FIG. 27, by setting a region on the decoded image within a certain distance from the processing target block Bk as a region where the candidate region (candidate block) Rn can exist, The number of candidate blocks can be reduced. In other words, it is possible to reduce the processing amount by defining candidate regions as regions that satisfy the following three conditions (I) to (III) in the above-described predicted image generation processing procedure using template matching. it can.
(I)候補領域の大きさ及び形状は、ブロックBkのものと一致する。
(II)候補領域は復号済領域内に位置する。
(III)候補領域Rnの位置VRnとブロックBkの位置VBkが次の条件式を満たす。
‖VRn−VBk‖≦LS1
ここで、LS1はテンプレートマッチングによる探索範囲の広さを定める所定の定数である。例えばLS1=16[画素]といった値を設定する。
(I) The size and shape of the candidate area matches that of the block Bk.
(II) The candidate area is located within the decoded area.
(III) The position VRn of the candidate region Rn and the position VBk of the block Bk satisfy the following conditional expression.
‖VRn−VBk‖ ≦ LS1
Here, LS1 is a predetermined constant that determines the size of the search range by template matching. For example, a value such as LS1 = 16 [pixel] is set.
しかし、上述した方法によって候補領域に制限を設けた場合、候補領域の位置が処理対象ブロックの近辺に限定されてしまう。そのため、処理対象ブロックから距離LS1より離れた位置に、その処理対象ブロックと類似の特徴を有する領域がある場合には、その領域を予測画像の導出に用いることができない。従って、図27に示すように候補ブロックの存在する範囲を制限した場合、制限しない場合に較べて生成される予測画像の精度は低下してしまう。 However, when the candidate area is limited by the above-described method, the position of the candidate area is limited to the vicinity of the processing target block. For this reason, if there is a region having a feature similar to that of the processing target block at a position away from the processing target block by the distance LS1, that region cannot be used for derivation of the predicted image. Therefore, as shown in FIG. 27, when the range where the candidate block exists is limited, the accuracy of the predicted image generated is lower than when the range is not limited.
一方、特許文献2に記載の画像符号化装置では、予測領域位置を処理対象ブロックの位置を基準として符号化するため、処理対象ブロックの位置と予測領域位置の間の距離が大きい場合に、処理対象ブロックの位置から予測領域位置への変位を符号化した際の符号量が大きくなるという問題がある。
On the other hand, in the image encoding device described in
本発明は、上述のごとき実状に鑑みてなされたものであり、符号化又は復号の処理対象ブロックに対する予測画像を、局所的に復号した画像から探索して生成するに際し、精度良く探索でき、且つ候補ブロック数を削減して処理量を低減することが可能な、画像復号装置及び画像符号化装置を提供することを、その目的とする。 The present invention has been made in view of the actual situation as described above, and can accurately search when generating a predicted image for a block to be encoded or decoded from a locally decoded image, and An object of the present invention is to provide an image decoding device and an image encoding device capable of reducing the processing amount by reducing the number of candidate blocks.
上述のごとき課題を解決するために、本発明の第1の技術手段は、符号化データから復号された差分画像を予測画像と足し合わせることで、複数のブロックに分割された画像における各ブロックの画像を再生する画像復号装置において、処理対象ブロックの近傍領域内の画素値に基づいて、該処理対象ブロックの特徴ベクトルを導出する特徴ベクトル導出手段と、前記処理対象ブロックに対応する特徴ベクトルと復号済ブロックに対応する特徴ベクトルとを比較して類似度を計算し、前記類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を中心として、該中心から所定の距離以内の領域を、探索範囲に決定する探索範囲決定手段と、前記探索範囲の中から前記処理対象ブロックに類似する領域を、予測領域として選択する予測領域決定手段と、前記予測領域の画像に基づいて前記処理対象ブロックに対する予測画像を生成する予測画像生成手段とを備えることを特徴としたものである。 In order to solve the above-described problems, the first technical means of the present invention adds the difference image decoded from the encoded data to the predicted image, thereby obtaining each block in the image divided into a plurality of blocks. In an image decoding apparatus for reproducing an image, feature vector deriving means for deriving a feature vector of the processing target block based on a pixel value in a neighborhood region of the processing target block, and a feature vector corresponding to the processing target block and decoding A similarity is calculated by comparing the feature vector corresponding to the completed block, and a region within a predetermined distance from the center is searched with the position of the decoded block corresponding to the feature vector having the highest similarity as the center. Search range determining means for determining a range, and prediction for selecting a region similar to the processing target block from the search range as a prediction region A range determining means is obtained by comprising: a prediction image generation unit that generates a predicted image for the current block based on the image of the prediction region.
第2の技術手段は、第1の技術手段において、当該画像復号装置は、前記予測画像生成手段とは別に、前記処理対象ブロックに対する予測画像を生成する1又は複数の異なる予測画像生成手段と、予測モードを復号する予測モード復号手段とをさらに備え、前記符号化データより復号される予測モードに応じて使用する予測画像生成手段を選択し、該選択された予測画像生成手段により予測画像を生成することを特徴としたものである。 According to a second technical means, in the first technical means, the image decoding apparatus, apart from the predicted image generating means, one or a plurality of different predicted image generating means for generating a predicted image for the processing target block; A prediction mode decoding means for decoding the prediction mode, selecting a prediction image generation means to be used according to a prediction mode decoded from the encoded data, and generating a prediction image by the selected prediction image generation means It is characterized by doing.
第3の技術手段は、第2の技術手段において、前記予測モード復号手段は、前記処理対象ブロックの予測モードを推定する推定予測モードを導出し、前記処理対象ブロックの予測モードと前記推定予測モードが一致するか否かの情報を符号化データより読み出し、一致する場合は、前記処理対象ブロックの予測モードとして前記推定予測モードを復号し、一致しない場合は、予測モードを示す情報を符号化データから読み出して、前記処理対象ブロックの予測モードとして、前記読み出した予測モードを復号することを特徴としたものである。 A third technical means is the second technical means, wherein the prediction mode decoding means derives an estimated prediction mode for estimating a prediction mode of the processing target block, and the prediction mode of the processing target block and the estimated prediction mode Is read from the encoded data. If they match, the estimated prediction mode is decoded as the prediction mode of the processing target block. If they do not match, information indicating the prediction mode is encoded data. And the read prediction mode is decoded as the prediction mode of the processing target block.
第4の技術手段は、複数のブロックに分割された画像における各ブロック毎に、入力画像と予測画像の差分画像を符号化する画像符号化装置において、処理対象ブロックの近傍領域内の画素値に基づいて、該処理対象ブロックの特徴ベクトルを導出する特徴ベクトル導出手段と、前記処理対象ブロックに対応する特徴ベクトルと復号済ブロックに対応する特徴ベクトルとを比較して類似度を計算し、前記類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を中心として、該中心から所定の距離以内の領域を、探索範囲に決定する探索範囲決定手段と、前記探索範囲の中から前記処理対象ブロックに類似する領域を、予測領域として選択する予測領域決定手段と、前記予測領域の画像に基づいて前記処理対象ブロックに対する予測画像を生成する予測画像生成手段とを備えることを特徴としたものである。 According to a fourth technical means, in an image encoding apparatus that encodes a difference image between an input image and a predicted image for each block in an image divided into a plurality of blocks, pixel values in a neighborhood region of the processing target block are obtained. Based on the feature vector deriving means for deriving the feature vector of the processing target block, the feature vector corresponding to the processing target block is compared with the feature vector corresponding to the decoded block, and the similarity is calculated. Centering on the position of the decoded block corresponding to the feature vector having the highest degree, search range determining means for determining a region within a predetermined distance from the center as a search range, and the processing target block from the search range Prediction region determining means for selecting a region similar to the prediction region, and prediction for the processing target block based on the image of the prediction region It is obtained by comprising: a prediction image generation means for generating an image.
第5の技術手段は、第4の技術手段において、当該画像符号化装置は、前記予測画像生成手段とは別に、前記処理対象ブロックに対する予測画像を生成する1又は複数の異なる予測画像生成手段と、当該画像符号化装置の備える各予測画像生成手段によって生成された予測画像と入力画像を比較することで1つの予測画像生成手段を選択する予測画像判定手段と、該選択された1つの予測画像生成手段を示す予測モードを符号化する予測モード符号化手段とをさらに備え、前記選択された1つの予測画像生成手段により生成された予測画像を、前記処理対象ブロックにおける予測画像とすることを特徴としたものである。 According to a fifth technical means, in the fourth technical means, the image encoding device comprises one or a plurality of different predicted image generating means for generating a predicted image for the processing target block separately from the predicted image generating means. A predicted image determination unit that selects one predicted image generation unit by comparing a predicted image generated by each predicted image generation unit included in the image encoding device with an input image, and the selected one predicted image A prediction mode encoding unit that encodes a prediction mode indicating a generation unit, wherein the prediction image generated by the selected one prediction image generation unit is a prediction image in the processing target block. It is what.
第6の技術手段は、第5の技術手段において、前記予測モード符号化手段は、前記処理対象ブロックの予測モードを推定する推定予測モードを導出し、前記処理対象ブロックの予測モードと前記推定予測モードが一致するか否かの情報を符号化し、前記予測モードが前記推定予測モードと一致しない場合は、前記選択された1つの予測画像生成手段を示す予測モードの情報を符号化することを特徴としたものである。 A sixth technical means is the fifth technical means, wherein the prediction mode encoding means derives an estimated prediction mode for estimating a prediction mode of the processing target block, and the prediction mode of the processing target block and the estimated prediction Information on whether or not the modes match is encoded, and when the prediction mode does not match the estimated prediction mode, information on a prediction mode indicating the selected one prediction image generation unit is encoded. It is what.
本発明によれば、画像復号装置又は画像符号化装置において、復号又は符号化の処理対象ブロックに対する予測画像を、局所的に復号した画像から探索して生成するに際し、精度良く探索でき、且つ候補ブロック数を削減して処理量を低減することが可能となる。 According to the present invention, in the image decoding device or the image encoding device, when the predicted image for the block to be decoded or encoded is searched for and generated from the locally decoded image, the search can be performed with high accuracy and the candidate can be searched. It is possible to reduce the processing amount by reducing the number of blocks.
(第1の実施形態)
図1を参照しながら、図2〜図8に基づき本発明の第1の実施形態に係る画像符号化装置及び画像復号装置について説明する。図1は、本発明に係る画像符号化装置又は画像復号装置において、符号化対象又は復号対象となる処理対象ブロックの一例、及びその処理対象ブロックの処理順序の一例を説明するための図である。なお、本発明に係る以下の説明においても、従来技術の説明の際と同様に、図1に示すように画像を正方形のブロックに分割して、画像上で左上からラスタスキャン順にブロックの符号化処理又は復号処理を実行するものとする。また、その際に分割されたブロックのサイズは簡単のため4×4画素であるものとする。
(First embodiment)
With reference to FIG. 1, an image encoding device and an image decoding device according to the first embodiment of the present invention will be described based on FIGS. FIG. 1 is a diagram for explaining an example of a processing target block to be encoded or decoded and an example of a processing order of the processing target block in the image encoding device or the image decoding device according to the present invention. . In the following description of the present invention, as in the description of the prior art, the image is divided into square blocks as shown in FIG. 1, and the blocks are encoded in the raster scan order from the upper left on the image. It is assumed that processing or decryption processing is executed. In addition, the size of the block divided at that time is assumed to be 4 × 4 pixels for simplicity.
図2は、本発明の第1の実施形態に係る画像符号化装置の一構成例を示すブロック図で、図3は、図2の画像符号化装置における動作例を概略的に説明するためのフロー図である。 FIG. 2 is a block diagram showing a configuration example of the image coding apparatus according to the first embodiment of the present invention, and FIG. 3 is a diagram for schematically explaining an operation example in the image coding apparatus of FIG. FIG.
図2で例示する画像符号化装置1は、複数のブロックに分割された画像における各ブロック毎に、入力画像と予測画像の差分画像を符号化する装置である。画像符号化装置1は、入力される差分画像に対し、直交変換を行う直交変換部11と、直交変換の結果得られる変換係数の量子化を行う量子化部12と、量子化部12の逆操作にあたる逆量子化を行う逆量子化部13と、直交変換部11の逆操作にあたる逆直交変換を行う逆直交変換部14と、画像を一時的に記憶するフレームメモリ15と、処理対象ブロックに対する予測画像を生成する画面内予測部16と、入力データに対し可変長符号化を行う可変長符号化部17とを備える。
The
次に、図3を参照して画像符号化装置1の概略動作例を説明する。まず、画像を構成するブロックを符号化処理順に従って選択し(ステップS1)、選択されたブロックを符号化対象ブロックBkとして、ループ終了(ステップS6)までの、ステップS2〜S5の処理を行う。
Next, a schematic operation example of the
ステップS2では、画面内予測部16が、入力画像上で当該符号化対象ブロックBkの位置に対応する領域の画像を推定する予測画像を生成する。なお、画面内予測部16における予測画像生成処理は、本発明における特長的な処理であるため、詳細は後述する。ステップS3では、符号化対象ブロックBkとステップS2で生成した予測画像の差分である予測残差画像を、直交変換部11、量子化部12の順に入力し、直交変換、量子化処理を施し、変換係数レベル画像を得る。
In step S2, the
ステップS4では、この変換係数レベル画像を、逆量子化部13、逆直交変換部14の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS2にて生成された予測画像と足し合わすことで、当該符号化対象ブロックBkの局所復号画像を得て、それをフレームメモリ15に記録する。ステップS5では、変換係数レベル画像を可変長符号化部17にも入力し、可変長符号化を施した後、符号化データとして出力する。そして、全ての符号化対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置1は入力画像を符号化し、その入力画像に対応する符号化データを出力することができる。
In step S4, the transform coefficient level image is input in the order of the
図4は、本発明の第1の実施形態に係る画像復号装置の一構成例を示すブロック図で、図5は、図4の画像復号装置における動作例を概略的に説明するためのフロー図である。 FIG. 4 is a block diagram showing a configuration example of the image decoding apparatus according to the first embodiment of the present invention, and FIG. 5 is a flowchart for schematically explaining an operation example in the image decoding apparatus of FIG. It is.
図4で例示する画像復号装置2は、符号化データから復号された差分画像を予測画像と足し合わせることで、複数のブロックに分割された画像における各ブロックの画像を再生する装置である。画像復号装置2は、図2における逆量子化部13、逆直交変換部14、フレームメモリ15、画面内予測部16とそれぞれ同じ機能を有する逆量子化部22、逆直交変換部23、フレームメモリ24、画面内予測部25を備え、さらに、可変長符号化された入力データに対し、復号処理を行う可変長復号部21を備える。
The
次に、図5を参照して画像復号装置2の概略動作例を説明する。まず、符号化処理順に従って復号対象ブロックBkを順次選択し(ステップS11)、選択されたブロックを復号対象ブロックBkとして、ループ終了(ステップS16)までの、ステップS12〜S15の処理を行う。
Next, a schematic operation example of the
ステップS12では、画面内予測部25が、復号対象ブロックBkに対応する予測画像を生成する。ステップS13では、可変長復号部21が、復号対象ブロックBkに対応する符号化データを復号して変換係数レベル画像を生成する。ステップS14では、変換係数レベル画像を、逆量子化部22、逆直交変換部23の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS12にて生成された予測画像と足し合わすことで、当該復号対象ブロックBkの復号画像を生成する。ステップS5では、生成された復号画像を、局所復号画像としてフレームメモリ24に記憶すると共に、復号画像として出力する。そして、全ての復号対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置1で生成した符号化データを入力として、その符号化データに対応する復号画像を画像復号装置2により出力することができる。
In step S12, the
画像符号化装置1及び画像復号装置2は、画面内予測部16,25で例示するように、双方、次の特徴ベクトル導出手段、特徴ベクトル記録部、探索範囲決定手段、予測領域決定手段、及び予測画像生成手段を備える。特徴ベクトル導出手段は、処理対象ブロック近傍領域内の画素値に基づいて、該処理対象ブロック近傍の画像の性質を表す特徴ベクトルを求める。特徴ベクトル記録部は、特徴ベクトル導出手段で求めた特徴ベクトルを記録(記憶)する。探索範囲決定手段は、処理対象ブロックに対応する特徴ベクトルと特徴ベクトル記録部に記録された特徴ベクトルとを比較して、探索範囲を決定する。予測領域決定手段は、その探索範囲の中から処理対象ブロックに類似する領域を、予測領域として選択する。予測画像生成手段は、その予測領域の画像に基づいて処理対象ブロックに対する予測画像を生成する。
The
次に、図2に示した画像符号化装置1及び図4に示した画像復号装置2における特長的な構成要素である画面内予測部16,25について、図6〜図8を参照して詳細に説明する。図6は、図2及び図4における画面内予測部の一構成例を示すブロック図、図7は、図6の画面内予測部における予測画像生成動作の一例を説明するためのフロー図、図8は、図6における予測領域決定部でテンプレートマッチングを実行する際の候補領域の一例を示す概念図である。
Next, the in-
図6で例示する画面内予測部16,25は、指定されるブロック周辺の所定の領域内の局所復号画像の画素値に基づいて該ブロックの周辺領域の性質を表す特徴ベクトル(周辺特徴ベクトル)を出力する周辺特徴ベクトル計算部31と、入力される周辺特徴ベクトルを対応するブロックの位置と関連付けて保持する周辺特徴ベクトル記録部32とを備える。周辺特徴ベクトル計算部31は特徴ベクトル導出手段の一例であり、周辺特徴ベクトル記録部32は特徴ベクトル記録部の一例である。
The in-
また、画面内予測部16,25は、処理対象ブロックに対する周辺特徴ベクトルと周辺特徴ベクトル記録部32に記録されている周辺特徴ベクトルを比較することでテンプレートマッチングの探索中心を決定する探索中心決定部33を備える。探索中心決定部33は、探索範囲決定手段の一例に含まれる部位であり、探索範囲決定手段は、ここで決定(設定)された探索中心から所定の距離以内の領域を探索範囲に決定する(探索範囲と設定する)ことになる。
In addition, the
さらに、画面内予測部16,25は、入力される探索中心に基づいてテンプレートマッチングを行うことで、処理対象ブロックに対する予測画像の導出に用いる領域の位置(予測領域位置)を出力する予測領域決定部34と、入力される予測領域位置及び復号済画像に基づいて処理対象ブロックに対する予測画像を生成する予測画像生成部35とを備える。予測領域決定部34は予測領域決定手段の一例であり、この例ではテンプレートマッチングによって探索範囲の中から処理対象ブロックに類似する領域を予測領域として選択している。また、予測画像生成部35は予測画像生成手段の一例である。
Furthermore, the
次に、図7及び図8を参照して画面内予測部16,25における予測画像生成動作例を説明する。まず、処理対象ブロックBkが画面の左端又は上端に位置するか否かを判定し(ステップS21)、位置する場合はステップS27へ進む。それ以外の場合はステップS22〜S26を順次実行する。
Next, a predicted image generation operation example in the in-
ステップS22では、周辺特徴ベクトル計算部31において、処理対象ブロックBkに対する周辺特徴ベクトルPBkを計算する。この際、ブロックBaに対する周辺特徴ベクトルPBaは以下の式により計算されるものとする。
In step S22, the peripheral feature
ここで、Qは周辺特徴ベクトルPBaの各要素を量子化するための量子化ステップであり、1以上の任意の実数を設定する。ここで、上記の式により導出される周辺特徴ベクトルPBaの意味を補足説明しておく。FHa,mはブロックBaの上辺に接するテンプレート上の画素を離散コサイン変換した際の変換係数を表す。すなわち、FHa,mはブロックBaの上辺に接するテンプレート上の領域の水平方向の各周波数成分の大きさを表す量である。同様に、FV,mはブロックBaの左辺に接するテンプレート上の領域の鉛直方向の各周波数成分の大きさを表す量である。また、fHa,m、fVa,mはそれぞれFHa,m、FVa,mを量子化ステップQにより量子化した値である。従って、周辺特徴ベクトルPBaはブロックBaの周辺領域の水平方向及び鉛直方向の周波数成分を含むベクトルである。 Here, Q is a quantization step for quantizing each element of the peripheral feature vector PBa, and an arbitrary real number of 1 or more is set. Here, the meaning of the peripheral feature vector PBa derived by the above formula will be supplementarily described. FHa, m represents a transform coefficient when a pixel on the template that is in contact with the upper side of the block Ba is subjected to discrete cosine transform. That is, FHa, m is an amount representing the size of each frequency component in the horizontal direction of the area on the template that is in contact with the upper side of the block Ba. Similarly, FV, m is an amount representing the magnitude of each frequency component in the vertical direction of the area on the template that is in contact with the left side of the block Ba. Further, fHa, m, fVa, m are values obtained by quantizing FHa, m, FVa, m by the quantization step Q, respectively. Accordingly, the peripheral feature vector PBa is a vector including horizontal and vertical frequency components of the peripheral region of the block Ba.
このように、周辺特徴ベクトル計算部31は、処理対象ブロック上端に隣接する領域の画素値を周波数変換及び量子化して得られる水平周波数成分と、処理対象ブロック左端に隣接する領域の画素値を周波数変換及び量子化して得られる垂直周波数成分とを、それぞれ要素とするベクトルを、処理対象ブロックに対応する特徴ベクトルとする。
As described above, the peripheral feature
ステップS23では、探索中心決定部33が、まず周辺特徴ベクトル記録部32に記録されている周辺特徴ベクトルの中から、ステップS22で求めた周辺特徴ベクトルPBkに類似した性質を持つ周辺特徴ベクトルを選択する。具体的には、周辺特徴ベクトル記録部32に記録されている全ての周辺特徴ベクトルについて、周辺特徴ベクトルPBkとの類似度Sを計算して、類似度Sを最大とする周辺特徴ベクトルを選択する。なお、2つの周辺特徴ベクトルPBaとPBbの間の類似度Sは次式により計算する。
In step S23, the search
ステップS23では、続いて探索中心決定部33が、周辺特徴ベクトル記録部32から、選択された周辺特徴ベクトルに関連付けられているブロックの位置を読み出し、読み出したブロック位置をテンプレートマッチングにおける探索中心Vcとする。
In step S23, subsequently, the search
このように、探索中心決定部33は、処理対象ブロックに対応する特徴ベクトルと周辺特徴ベクトル記録部32に記録されている復号済のブロックに対応する特徴ベクトルとを比較して類似度を計算し、その類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を探索範囲の中心に設定する。
As described above, the search
ステップS24では、予測領域決定部34が、ステップS23で求めた探索中心位置Vcに基づいてテンプレートマッチングを行うことで予測領域位置VRを決定する。このステップS24における処理は、従来技術として説明した、テンプレートマッチングを用いた画面内予測方式における予測領域位置の決定処理(図21)と基本的に同一の処理とするが、候補領域に対して以下の制約を加える。すなわち、候補領域は次の(i)〜(iii)の3つの条件を満たす領域とする。
In step S24, the prediction
(i)候補領域の大きさ及び形状は、ブロックBkのものと一致する。
(ii)候補領域は復号済領域内に位置する。
(iii)候補領域の位置VRnとステップS23で求めた探索中心の位置Vcが次の条件式を満たす。
‖VRn−Vc‖≦LS2
(I) The size and shape of the candidate area matches that of the block Bk.
(Ii) The candidate area is located within the decoded area.
(Iii) The position VRn of the candidate area and the position Vc of the search center obtained in step S23 satisfy the following conditional expression.
‖VRn−Vc‖ ≦ LS2
ここで、LS2は探索範囲の広さ(上記所定の距離)を表す所定の定数であり、探索範囲決定手段で決定・設定される。例えばLS2=16[画素]といった値を設定する。なお、上記の式は図8に示すように、探索中心位置Vcから距離LS以内に候補ブロックBの位置を制限することを意味する。 Here, LS2 is a predetermined constant representing the width of the search range (the predetermined distance), and is determined and set by the search range determination means. For example, a value such as LS2 = 16 [pixel] is set. As shown in FIG. 8, the above formula means that the position of the candidate block B is limited within the distance LS from the search center position Vc.
ステップS25では、予測画像生成部35が、ステップS24で求めた予測領域位置VRによって示される位置に対応する復号済画像上の4×4画素領域を予測画像として出力する。ステップS26では、周辺特徴ベクトルPBkを当該処理対象ブロックの位置と関連付けて、周辺特徴ベクトル記録部32に記録し、処理を終了する。
In step S25, the predicted
一方、ステップS27では、各画素値に所定の値を設定した4×4画素から成る画像を処理対象ブロックBkの予測画像として出力し、処理を終了する。なお、例えば画素値のとり得る値の範囲の中間値を、その所定の値として用いることができる。 On the other hand, in step S27, an image composed of 4 × 4 pixels in which a predetermined value is set for each pixel value is output as a predicted image of the processing target block Bk, and the process ends. For example, an intermediate value in a range of possible pixel values can be used as the predetermined value.
以上の手順により画面内予測部16,25は、処理対象ブロックBkに対する予測画像を生成することができる。この手順において候補領域の位置が復号済画像領域の一部に制限されているため、従来技術に較べて、テンプレートマッチングにおいて生成される予測画像の精度を保った上で、テンプレートマッチング処理に要する処理量を低減することができる。また、この手順においては周辺特徴ベクトルを比較することで、処理対象ブロックと類似した特性を持つ領域をテンプレートマッチングの探索中心として設定する。そのため、処理対象ブロックと類似した画像を持つ領域が、当該処理対象ブロックから空間的に離れた位置にある場合でも、その領域を予測画像とすることができる。
Through the above procedure, the in-
第1の実施形態における予測画像生成処理で採用可能な、他の記録方法、記録した情報の消去(スライス単位のリフレッシュ)、特徴ベクトルの類似度に応じた探索範囲の切り替え、並びに、他の探索中心決定方法について説明する。 Other recording methods, deletion of recorded information (slice-by-slice refresh), search range switching according to feature vector similarity, and other searches that can be employed in the prediction image generation processing in the first embodiment The center determination method will be described.
周辺特徴ベクトル記録部32における記録方法としては、他の方法を採用することができる。すなわち、前述した第1の実施形態における予測画像生成処理では、ステップS26において周辺特徴ベクトルPBkを周辺特徴ベクトル記録部32に記録している。その際に、周辺特徴ベクトルPBkと同一もしくは類似の周辺特徴ベクトルPBaが既に記録されている場合には、必ずしも両方の周辺特徴ベクトルを記録しておく必要はない。例えば、周辺特徴ベクトルPBkとブロックBkの位置情報により、既存の周辺特徴ベクトルPBa及びブロックBaの位置情報を上書きしても構わない。その場合、周辺特徴ベクトル記録部32のメモリ容量を少なく抑えることができるという利点がある。
As a recording method in the peripheral feature
また、周辺特徴ベクトル記録部32で記録した情報を消去するようにしてもよい。すなわち、前述した第1の実施形態における予測画像生成処理では、周辺特徴ベクトル記録部32に記録した情報を消去しないものとしたが、本発明はこれに限らない。例えば、符号化単位/復号単位として、処理順の連続する複数の処理対象ブロックをまとめた領域(スライス)を考えて、画像を複数のスライスに分割して符号化/復号処理を行うようにしてもよい。
The information recorded by the peripheral feature
そして、スライス内で処理順が最も早い処理対象ブロックの符号化/復号処理を開始する前(好ましくは直前)に、周辺特徴ベクトル記録部32の情報を全て消去する。これにより符号化単位/復号単位毎の処理が可能となる。その場合、テンプレートマッチングにおける候補領域の位置を同一スライス内に制限することによって、各スライスを独立に符号化/復号できるようになるため、符号化/復号処理の並列性が高まるという利点がある。
Then, before starting (preferably immediately before) the encoding / decoding process of the processing target block having the earliest processing order in the slice, all information in the peripheral feature
また、特徴ベクトルの類似度に応じて探索範囲を切り替えてもよい。すなわち、前述した第1の実施形態における探索範囲決定手段(予測領域決定部34の処理として説明)では、探索範囲の広さを表す値LS2を所定の定数であるとしたが、本発明はこれに限らない。例えば、探索中心決定部33において探索中心を決定する際に得られる類似度Sの最大値Smaxを参照して、Smaxの大きさに応じてLS2の値を決定しても構わない。以下、LS2の決定手順について詳しく説明する。
The search range may be switched according to the similarity of the feature vectors. That is, in the search range determining means (explained as the process of the prediction region determining unit 34) in the first embodiment described above, the value LS2 representing the width of the search range is a predetermined constant. Not limited to. For example, the value LS2 may be determined according to the size of Smax with reference to the maximum value Smax of the similarity S obtained when the search
まず、LS2の候補としてLS2a,LS2bの2つの値を用意しておく。ここでLS2aはLS2bよりも大きい値であるものとする。また、Smaxの大きさを判定する閾値TH1をあらかじめ定めておく。そして、LS2を次式により決定する。
LS2 = Ls2a(Smax<TH1), Ls2b(Smax≧TH1)
First, two values LS2a and LS2b are prepared as candidates for LS2. Here, it is assumed that LS2a is larger than LS2b. Further, a threshold TH1 for determining the magnitude of Smax is determined in advance. Then, LS2 is determined by the following equation.
LS2 = Ls2a (Smax <TH1), Ls2b (Smax ≧ TH1)
Smaxが小さい場合は、探索中心の周辺領域の特性と処理対象ブロックの周辺領域の特性の間の類似度が低いことを意味する。逆にSmaxが大きい場合は類似度が高いことを意味する。また、前記類似度が高い場合は探索中心近辺に処理対象ブロックに近い性質を持つ領域が存在する可能性が高いので、テンプレートマッチングの探索範囲を狭く設定できる。逆に前記類似度が低い場合は前記可能性が低いので、探索範囲を広く設定する必要がある。従って、前述の式によりLS2を設定することで、Smaxが大きい場合に探索範囲を狭くできるため、テンプレートマッチングに要する処理量を低減できる。 When Smax is small, it means that the degree of similarity between the characteristics of the peripheral area of the search center and the characteristics of the peripheral area of the processing target block is low. Conversely, when Smax is large, it means that the similarity is high. Further, when the similarity is high, there is a high possibility that there is an area close to the processing target block in the vicinity of the search center, so that the template matching search range can be set narrow. On the contrary, when the similarity is low, the possibility is low, so it is necessary to set a wide search range. Therefore, by setting LS2 according to the above-described equation, the search range can be narrowed when Smax is large, so that the processing amount required for template matching can be reduced.
このように、探索範囲決定手段は、計算により求めた類似度のうち最も高い類似度を記録しておき、最も低い類似度の値が所定の閾値未満である場合には第一の距離を所定の距離として設定し、所定の閾値以上である場合には第一の距離より小さい第二の距離を所定の距離として設定するようにしてもよい。 In this way, the search range determination means records the highest similarity among the similarities obtained by calculation, and determines the first distance when the lowest similarity value is less than a predetermined threshold value. If the distance is equal to or greater than a predetermined threshold, a second distance smaller than the first distance may be set as the predetermined distance.
また、探索中心決定部33における探索中心決定方法としては、他の方法を採用することができる。すなわち、探索中心決定部33では、周辺特徴ベクトル記録部32に記録されている全ての周辺特徴ベクトルと、処理対象ブロックBkの周辺特徴ベクトルPBkとの間の類似度Sをそれぞれ計算して探索中心位置を決定するものとしたが、本発明はこれに限らない。
Further, as a search center determination method in the search
例えば、探索中心決定部33におけるステップS23(探索中心位置決定処理)を、以下のステップS23−1〜S23−3(図示せず)を順に施す処理に置き換えることもできる。まず、ステップS23−1では、周辺特徴ベクトル記録部32に記録されている全ての周辺特徴ベクトルについて、周辺特徴ベクトルPBkとの間の類似度S0を計算する。ここで、周辺特徴ベクトルPBaと周辺特徴ベクトルPBbの間の類似度S0は次式で計算する。
For example, step S23 (search center position determination process) in the search
そして、類似度S0が所定の閾値TH0以下となる周辺特徴ベクトルを類似度の大きいベクトルとして記録して、類似度S0が閾値TH0未満となる周辺特徴ベクトルを類似度の小さいベクトルとして記録する。 Then, peripheral feature vectors whose similarity S0 is equal to or less than a predetermined threshold TH0 are recorded as vectors having high similarity, and peripheral feature vectors whose similarity S0 is less than the threshold TH0 are recorded as vectors having low similarity.
ステップS23−2では、ステップS23−1において、類似度の大きいベクトルとして記録された全ての周辺特徴ベクトルについて、周辺特徴ベクトルPBkとの間の類似度Sを計算する。類似度Sは、探索中心決定部33におけるステップS23で説明した計算式により求める。
In step S23-2, the similarity S between the peripheral feature vectors PBk is calculated for all the peripheral feature vectors recorded as vectors having a high similarity in step S23-1. The similarity S is obtained by the calculation formula described in step S23 in the search
ステップS23−3では、ステップS23−2において求めた類似度Sを最大とする周辺特徴ベクトルを選択して、その周辺特徴ベクトルに関連付けられているブロックの位置を周辺特徴ベクトル記録部32から読み出す。そして、読み出したブロックの位置をテンプレートマッチングにおける探索中心Vcとする。
In step S23-3, the peripheral feature vector that maximizes the similarity S obtained in step S23-2 is selected, and the position of the block associated with the peripheral feature vector is read from the peripheral feature
以上示したステップS23−1〜S23−3の処理は、周辺特徴ベクトルの部分ベクトルを用いて比較することで探索中心位置の候補を絞り込み、その後に周辺特徴ベクトル全体を比較することで探索中心位置を決定する処理に相当する。この処理では、計算に要する処理量が少ない類似度S0を始めに計算して探索中心位置の候補を絞り込むことで、計算に要する処理量が多い類似度Sの計算回数を減らすことができる。従って、探索中心位置の決定に必要な処理量を減らすことができる。 The processing in steps S23-1 to S23-3 described above is performed by narrowing down search center position candidates by comparing using partial vectors of the peripheral feature vectors, and then comparing the entire peripheral feature vectors. It corresponds to the process of determining. In this process, by calculating the similarity S0 with a small processing amount required for calculation first and narrowing down the search center position candidates, the number of calculations of the similarity S having a large processing amount can be reduced. Therefore, it is possible to reduce the amount of processing necessary for determining the search center position.
このように、探索中心決定部33は、処理対象ブロックに対応する特徴ベクトルと周辺特徴ベクトル記録部32に記録されている復号済ブロックに対応する特徴ベクトルとを比較して第一の類似度を計算し、第一の類似度が予め設定している所定の閾値よりも高い復号済みブロックに対応する特徴ベクトルのみ、処理対象ブロックに対応する特徴ベクトルとの間の第二の類似度(第一の類似度よりも複雑な計算により導出される類似度)を計算し、第二の類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を探索範囲の中心に設定するようにしてもよい。
As described above, the search
(第2の実施形態)
図9〜図14に基づき本発明の第2の実施形態に係る画像符号化装置及び画像復号装置について説明する。第1の実施形態に係る画像符号化装置では、決定された探索中心位置に基づいてテンプレートマッチングを行うことで予測領域位置を決定したが、ここで説明する第2の実施形態に係る画像符号化装置では、決定された探索中心位置に基づいてブロックマッチングにより予測領域位置の探索を行い、予測領域位置の探索中心位置からの変位を符号化している。このように、まずブロックの周辺特徴量に基づいて探索中心を決定し当該探索中心から予測領域位置への変位を符号化することで、予測領域位置の符号化に要する符号量を低減することができる。
(Second Embodiment)
An image encoding device and an image decoding device according to the second embodiment of the present invention will be described with reference to FIGS. In the image coding apparatus according to the first embodiment, the prediction region position is determined by performing template matching based on the determined search center position, but the image coding according to the second embodiment described here is performed. In the apparatus, the predicted region position is searched by block matching based on the determined search center position, and the displacement of the predicted region position from the search center position is encoded. As described above, first, the search center is determined based on the peripheral feature amount of the block, and the displacement from the search center to the prediction region position is encoded, thereby reducing the amount of code required for encoding the prediction region position. it can.
図9は、本発明の第2の実施形態に係る画像符号化装置の一構成例を示すブロック図で、図10は、図9の画像符号化装置における動作例を概略的に説明するためのフロー図である。 FIG. 9 is a block diagram showing a configuration example of an image encoding device according to the second embodiment of the present invention, and FIG. 10 is a diagram for schematically explaining an operation example in the image encoding device of FIG. FIG.
図9で例示する画像符号化装置4は、図2における直交変換部11、量子化部12、逆量子化部13、逆直交変換部14、フレームメモリ15とそれぞれ同じ機能を有する直交変換部41、量子化部42、逆量子化部43、逆直交変換部44、フレームメモリ45を備える。
The
さらに、画像符号化装置4は、入力画像と復号済画像を入力として予測領域探索における探索中心を決定すると共に、入力される予測領域位置の示す復号済画像上の領域に基づいて予測画像を生成する画面内予測部55と、入力画像と復号済画像と探索中心を入力として、予測領域位置を決定する予測領域探索部47と、入力データに対し可変長符号化を行う可変長符号化部48とを備える。予測領域探索部47及び画面内予測部46は、ブロックマッチングによって探索範囲の中から処理対象ブロックに類似する領域を予測領域として選択する符号化側の予測領域決定手段と、その予測領域の画像に基づき予測画像を生成する予測画像生成手段との一例である。
Further, the
次に、図10を参照して画像符号化装置4の概略動作例を説明する。まず、画像を構成するブロックを符号化処理順に従って選択し(ステップS31)、選択されたブロックを符号化対象ブロックBkとして、ループ終了(ステップS38)までの、ステップS32〜S37の処理を行う。
Next, a schematic operation example of the
ステップS32では、画面内予測部46が、処理対象ブロックBkの周辺領域に近い特性を有する探索中心を決定する。この処理は本発明における特長的な処理であり、詳細は後述する。ステップS33では、予測領域探索部47が、ステップS32にて得られた探索中心を中心に、入力画像上の処理対象ブロックBkと相関の高い領域をフレームメモリ45に記録されている復号済画像内から選択して、選択した領域の位置を予測領域位置とする。
In step S32, the in-
ステップS34では、この予測領域位置を画面内予測部46に入力し、当該予測領域位置が示す復号済画像上の領域に基づいて予測画像を生成する。このようにして、予測領域探索部47及び画面内予測部46は、ブロックマッチングによって探索範囲の中から処理対象ブロックに類似する領域を予測領域として選択する。ステップS35では、符号化対象ブロックBkとステップS34にて生成された予測画像の差分である予測残差画像を、直交変換部41、量子化部42の順に入力し、直交変換、量子化処理を施して、変換係数レベル画像を得る。
In step S34, the predicted region position is input to the
ステップS36では、変換係数レベル画像を、逆量子化部43、逆直交変換部44の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS34にて生成された予測画像と足し合わすことで、当該符号化対象ブロックBkの局所復号画像を得て、それをフレームメモリ45に記録する。
In step S36, the transform coefficient level image is input in the order of the
ステップS37では、変換係数レベル画像及び予測領域位置を、可変長符号化部48にも入力し、可変長符号化を施した後、符号化データとして出力する。ここで、予測領域位置は探索中心からの相対的な位置として符号化される。このように、探索範囲の中心から処理対象ブロックに類似する領域(予測領域)への変位も、画像符号化装置4で符号化され、出力される。そして、全ての符号化対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置4は入力画像を符号化し、その入力画像に対応する符号化データを出力することができる。
In step S37, the transform coefficient level image and the prediction region position are also input to the variable
図11は、本発明の第2の実施形態に係る画像復号装置の一構成例を示すブロック図で、図12は、図11の画像復号装置における動作例を概略的に説明するためのフロー図である。 FIG. 11 is a block diagram showing a configuration example of an image decoding apparatus according to the second embodiment of the present invention, and FIG. 12 is a flowchart for schematically explaining an operation example in the image decoding apparatus of FIG. It is.
図11で例示する画像復号装置5は、図9における逆量子化部43、逆直交変換部44、フレームメモリ45、画面内予測部46とそれぞれ同じ機能を有する逆量子化部52、逆直交変換部53、フレームメモリ54、画面内予測部55を備える。
The
さらに、画像復号装置5は、予測領域の探索中心からの相対的な位置及び探索中心を入力として、予測領域位置を決定する予測領域位置計算部56と、可変長符号化された入力データに対し、復号処理を行う可変長復号部51とを備える。予測領域位置計算部56は、符号化データから復号して得た、探索範囲の中心から処理対象ブロックに類似する領域への変位に基づいて、処理対象ブロックに類似する領域の位置を決定(選択)する復号側の予測領域決定手段の一例である。
Further, the
次に、図12を参照して画像復号装置5の概略動作例を説明する。まず、符号化処理順に従って復号対象ブロックBkを順次選択し(ステップS41)、選択されたブロックを復号対象ブロックBkとして、ループ終了(ステップS48)までの、ステップS42〜S47の処理を行う。
Next, a schematic operation example of the
ステップS42では、可変長復号部51が、復号対象ブロックBkに対応する符号化データを復号して、変換係数レベル画像及び予測領域の探索中心からの相対的な位置を再生する。
In step S42, the variable
ステップS43では、画面内予測部55が予測領域の探索中心を決定する。この処理は本発明における特長的な処理であり、詳細は後述する。ステップS44では、予測領域位置計算部56が、ステップS43にて決定された探索中心に、ステップS42で再生された予測領域の探索中心からの相対的な位置を加えることで、予測領域位置を決定する。このようにして、予測領域位置計算部56は、ステップS42により符号化データから復号して得た、探索範囲の中心から処理対象ブロックに類似する領域への変位(相対的な位置)に基づいて、処理対象ブロックに類似する領域(予測領域)の位置を決定する。
In step S43, the in-
ステップS45では、予測領域位置を画面内予測部55に入力し、当該予測領域位置が示す復号済画像上の領域に基づいて予測画像を生成する。ステップS46では、変換係数レベル画像を、逆量子化部52、逆直交変換部53の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS42にて生成された予測画像と足し合わすことで、当該復号対象ブロックBkの復号画像を生成する。
In step S45, the predicted region position is input to the
ステップS47では、生成された復号画像を、局所復号画像としてフレームメモリ54へ記録すると共に、復号画像として出力する。そして、全ての復号対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置4で生成した符号化データを入力として、その符号化データに対応する復号画像を画像復号装置5により出力することができる。
In step S47, the generated decoded image is recorded in the
次に、図9に示した画像符号化装置4及び図11に示した画像復号装置5における特長的な構成要素である画面内予測部46,55について、図13及び図14を参照して詳細に説明する。図13は、図9及び図11における画面内予測部の一構成例を示すブロック図で、図14は、図13の画面内予測部における探索中心決定動作の一例を説明するためのフロー図である。
Next, the in-
図13で例示する画面内予測部46,55は、図6における周辺特徴ベクトル計算部31、周辺特徴ベクトル記録部32、探索中心決定部33、予測画像生成部35とそれぞれ同じ機能を有する周辺特徴ベクトル計算部61、周辺特徴ベクトル記録部62、探索中心決定部63、予測画像生成部65を備える。
The
次に、図14を参照して画面内予測部46,55における探索中心決定動作例を説明する。まず、処理対象ブロックBkが画面の左端又は上端に位置するか否かを判定し(ステップS51)、位置する場合はステップS56へ進む。それ以外の場合はステップS52〜S55を順次実行する。
Next, an example of the search center determination operation in the in-
ステップS52では、周辺特徴ベクトル計算部61において、処理対象ブロックBkに対する周辺特徴ベクトルPBkを計算する。この際、ブロックBaに対する周辺特徴ベクトルPBaは第1の実施形態で説明した方法で計算する。ステップS53では、ステップS52にて導出した周辺特徴ベクトルPBkを周辺特徴ベクトル記録部62に記録する。
In step S52, the peripheral feature vector calculation unit 61 calculates a peripheral feature vector PBk for the processing target block Bk. At this time, the peripheral feature vector PBa for the block Ba is calculated by the method described in the first embodiment. In step S53, the peripheral feature vector PBk derived in step S52 is recorded in the peripheral feature
ステップS54では、探索中心決定部63では、まず周辺特徴ベクトル記録部62に記録されている周辺特徴ベクトルの中から、ステップS52で求めた周辺特徴ベクトルPBkに類似した性質を持つ周辺特徴ベクトルを選択する。この際の選択方法は第1の実施形態で説明した方法とする。
In step S54, the search
ステップS55では、探索中心決定部63が、周辺特徴ベクトル記録部62から、選択された周辺特徴ベクトルに関連付けられているブロックの位置を読み出す。そして、読み出したブロック位置を探索中心として出力し、処理を終了する。
In step S55, the search
一方、ステップS56では、処理対象ブロックBkの位置を探索中心として出力して処理を終了する。以上に示した手順により、画面内予測部46,55は処理対象ブロックBkの周辺特徴ベクトルと、周辺特徴ベクトル記録部62に記録されている周辺特徴ベクトルに基づいて、探索中心を決定する。
On the other hand, in step S56, the position of the processing target block Bk is output as the search center, and the process ends. By the procedure described above, the in-
以上説明した通り、第2の実施形態に係る画像符号化装置では、処理対象ブロックから空間的に離れた位置の領域に基づいて予測画像を生成することができる。また、この画像符号化装置では、予測領域位置を特定するための情報を、探索中心から予測領域位置への変位として符号化する。ここで、処理対象ブロック近傍の領域の特性と、探索中心周辺の領域の特性は近いため、探索中心から予測領域位置への変位は小さい確率が高い。そのためこの変位のばらつきが少なくなるため、この変位を少ないデータ量で符号化できる。従って、第2の実施形態に係る画像符号化装置では、予測領域位置を表す情報を少ないデータ量で符号化することができる。 As described above, the image coding apparatus according to the second embodiment can generate a predicted image based on a region at a position spatially separated from the processing target block. Further, in this image encoding device, information for specifying the prediction region position is encoded as a displacement from the search center to the prediction region position. Here, since the characteristics of the area near the processing target block are close to the characteristics of the area around the search center, there is a high probability that the displacement from the search center to the predicted area position is small. For this reason, since the variation of the displacement is reduced, the displacement can be encoded with a small amount of data. Therefore, the image encoding device according to the second embodiment can encode information representing the prediction region position with a small amount of data.
(第3の実施形態)
図15〜図20に基づき本発明の第3の実施形態に係る画像符号化装置及び画像復号装置について説明する。第1,第2の実施形態に係る画像符号化/復号装置では唯一の画面内予測方式によって予測画像を生成したが、ここで説明する第3の実施形態に係る画像符号化装置では複数の画面内予測方式のうち最適な方式を選択して、選択された方式により予測画像を生成している。すなわち、この画像符号化装置では、合計少なくとも2つの予約画像生成手段と、各予測画像生成手段によって生成された予測画像と入力画像を比較することで1つの予測画像生成手段を選択する予測画像判定手段とを備え、選択された1つの予測画像生成手段により生成された予測画像を、処理対象ブロックにおける予測画像とする。さらに、この画像符号化装置では、復号可能なように、選択された1つの予測画像生成手段を示す予測モードを符号化する予測モード符号化手段を備える。
(Third embodiment)
An image encoding device and an image decoding device according to the third embodiment of the present invention will be described with reference to FIGS. In the image encoding / decoding devices according to the first and second embodiments, a predicted image is generated by the only intra-screen prediction method. However, the image encoding device according to the third embodiment described here has a plurality of screens. An optimal method is selected from the intra prediction methods, and a predicted image is generated by the selected method. That is, in this image encoding apparatus, a predicted image determination in which at least two reserved image generation units in total and one predicted image generation unit are selected by comparing the input image with the predicted image generated by each predicted image generation unit. A predicted image generated by one selected predicted image generating unit is used as a predicted image in the processing target block. Further, the image encoding device includes a prediction mode encoding unit that encodes a prediction mode indicating one selected prediction image generation unit so that decoding is possible.
なお、以下の説明では各画面内予測方式を特定するための情報を予測モードと呼ぶ。また、特に断りのない限り、次の4つの画面内予測方式のうちブロック毎に1つの予測方式を選択して予測画像を生成することとする。 In the following description, information for specifying each intra-screen prediction method is referred to as a prediction mode. Unless otherwise specified, one prediction method is selected for each block from the following four intra-screen prediction methods to generate a predicted image.
テンプレートマッチングを用いる予測方式(TM予測)
処理対象ブロックに隣接する画素の平均値を用いる予測方式(DC予測)
処理対象ブロックの左側に隣接する画素の画素値を用いる予測方式(H予測)
処理対象ブロックの上側に隣接する画素の画素値を用いる予測方式(V予測)
Prediction method using template matching (TM prediction)
Prediction method using the average value of pixels adjacent to the processing target block (DC prediction)
Prediction method using pixel values of pixels adjacent to the left side of the processing target block (H prediction)
Prediction method (V prediction) using pixel values of pixels adjacent to the upper side of the processing target block
図15は、本発明の第3の実施形態に係る画像符号化装置の一構成例を示すブロック図で、図16は、図15の画像符号化装置における動作例を概略的に説明するためのフロー図である。 FIG. 15 is a block diagram showing a configuration example of an image encoding device according to the third embodiment of the present invention, and FIG. 16 is a diagram for schematically explaining an operation example in the image encoding device of FIG. FIG.
図15で例示する画像符号化装置7は、図2における直交変換部11、量子化部12、逆量子化部13、逆直交変換部14、フレームメモリ15とそれぞれ同じ機能を有する直交変換部71、量子化部72、逆量子化部73、逆直交変換部74、フレームメモリ75を備える。さらに、画像符号化装置7は、入力される複数の予測画像それぞれを入力画像と比較することで一つの予測画像を選択して、該予測画像に対応する予測モードを出力する画面内予測判定部77と、入力される予測モードに基づいて、復号済画像を利用して予測画像を生成する画面内予測部76と、入力データに対し、可変長符号化を行う可変長符号化部78とを備える。ここで、画面内予測部76は、合計少なくとも2つの予約画像生成手段を有する。
An image encoding device 7 illustrated in FIG. 15 includes an
次に、図16を参照して画像符号化装置7の概略動作例を説明する。まず、画像を構成するブロックを符号化処理順に従って選択し(ステップS61)、選択されたブロックを符号化対象ブロックBkとして、ループ終了(ステップS68)までの、ステップS62〜S67の処理を行う。 Next, a schematic operation example of the image encoding device 7 will be described with reference to FIG. First, blocks constituting an image are selected in accordance with the encoding processing order (step S61), and the processing of steps S62 to S67 up to the end of the loop (step S68) is performed with the selected block as the encoding target block Bk.
ステップS62では、画面内予測判定部77が、TM予測、DC予測、H予測、V予測の各予測モードを画面内予測部76に入力して、予測画像Im_TM、Im_DC、Im_H、Im_Vを得る。なお、画面内予測部76における、各予測モードに対応する予測画像生成処理の詳細は後述する。
In step S62, the in-screen
ステップS63では、画面内予測判定部77が、ステップS62で得られた各予測画像の入力画像に対する評価値Rを以下の式により計算し、評価値を最小とする予測画像に対応する予測モードを処理対象ブロックに適用する予測モードとして設定する。
In step S63, the in-screen
ここで、lIm(i,j)は評価対象である予測画像(4×4画素ブロック)内の各画素の画素値を表す。また、LBk(i,j)は入力画像における処理対象ブロックBk内の各画素の画素値を表す。 Here, lIm (i, j) represents the pixel value of each pixel in the predicted image (4 × 4 pixel block) to be evaluated. LBk (i, j) represents the pixel value of each pixel in the processing target block Bk in the input image.
ステップS64では、画面内予測部76が、ステップS63にて設定された予測モードに対応する予測画像を生成する。ステップS65では、符号化対象ブロックBkとステップS64にて生成された予測画像の差分である予測残差画像を、直交変換部71、量子化部72の順に入力し、直交変換、量子化処理を施して、変換係数レベル画像を得る。
In step S64, the in-
ステップS66では、その変換係数レベル画像を、逆量子化部73、逆直交変換部74の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS64にて生成された予測画像と足し合わすことで、当該符号化対象ブロックBkの局所復号画像を得て、それをフレームメモリ75に記録する。
In step S66, the transform coefficient level image is input in the order of the inverse quantization unit 73 and the inverse
ステップS67では、変換係数レベル画像及びステップS63にて設定された予測モードを、可変長符号化部78にも入力し、可変長符号化を施した後、符号化データとして出力する。そして、全ての符号化対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置7は入力画像を符号化し、その入力画像に対応する符号化データを出力することができる。
In step S67, the transform coefficient level image and the prediction mode set in step S63 are also input to the variable
図17は、本発明の第3の実施形態に係る画像復号装置の一構成例を示すブロック図で、図18は、図17の画像復号装置における動作例を概略的に説明するためのフロー図である。 FIG. 17 is a block diagram showing a configuration example of an image decoding apparatus according to the third embodiment of the present invention, and FIG. 18 is a flowchart for schematically explaining an operation example in the image decoding apparatus of FIG. It is.
図17で例示する画像復号装置8は、図15における逆量子化部73、逆直交変換部74、フレームメモリ75、画面内予測部76とそれぞれ同じ機能を有する逆量子化部82、逆直交変換部83、フレームメモリ84、画面内予測部85を備え、さらに、図4における可変長復号部21と同じ機能を有する可変長復号部81を備える。ここで、画面内予測部85は、合計少なくとも2つの予約画像生成手段を有する。
The image decoding apparatus 8 illustrated in FIG. 17 includes an
次に、図18を参照して画像復号装置8の概略動作例を説明する。まず、符号化処理順に従って復号対象ブロックBkを順次選択し(ステップS71)、選択されたブロックを復号対象ブロックBkとして、ループ終了(ステップS76)までの、ステップS72〜S75の処理を行う。 Next, a schematic operation example of the image decoding device 8 will be described with reference to FIG. First, the decoding target block Bk is sequentially selected in accordance with the encoding processing order (step S71), and the processing of steps S72 to S75 up to the end of the loop (step S76) is performed using the selected block as the decoding target block Bk.
ステップS72では、可変長復号部81が、復号対象ブロックBkに対応する符号化データを復号して、変換係数レベル画像及び予測モードを再生する。このように、画像復号装置8は、予測モードを復号する予測モード復号手段を備えるものとする。ステップS73では、画面内予測部85が、フレームメモリ84に記録されている復号済画像を利用して、ステップS72で再生された予測モードに対応する予測画像を生成する。このように、画像復号装置8は、符号化データより復号される予測モードに応じて使用する予測画像生成手段を選択し、選択された予測モードで予測画像を生成する。
In step S72, the variable
ステップS74では、ステップS72で再生された変換係数レベル画像を、逆量子化部82、逆直交変換部83の順に入力し、逆量子化処理、逆直交変換を施した後、ステップS73にて生成された予測画像と足し合わすことで、当該復号対象ブロックBkの復号画像を生成する。
In step S74, the transform coefficient level image reproduced in step S72 is input in the order of the
ステップS75では、生成された復号画像を、局所復号画像としてフレームメモリ84へ記録すると共に、復号画像として出力する。そして、全ての復号対象ブロック分に相当するK回のループが終了した時点で処理を終了する。以上に示した手順により、画像符号化装置7で生成した符号化データを入力として、その符号化データに対応する復号画像を画像復号装置8により出力することができる。
In step S75, the generated decoded image is recorded in the
次に、図15に示した画像符号化装置7及び図17に示した画像復号装置8における特長的な構成要素である画面内予測部76,85について、図19及び図20を参照して詳細に説明する。図19は、図15及び図17における画面内予測部の一構成例を示すブロック図で、図20は、図19の画面内予測部における予測画像生成動作の一例を説明するためのフロー図である。
Next, the in-
図19で例示する画面内予測部76,85は、図6における周辺特徴ベクトル計算部31、周辺特徴ベクトル記録部32、探索中心決定部33、予測領域決定部34、予測画像生成部35とそれぞれ同じ機能を有する周辺特徴ベクトル計算部91、周辺特徴ベクトル記録部92、探索中心決定部93、予測領域決定部94、予測画像生成部95を備える。
The
さらに、画面内予測部76,85は、局所復号画像を利用してDC予測による予測画像を生成するDC予測画像生成部96と、局所復号画像を利用してH予測による予測画像を生成するH予測画像生成部97と、局所復号画像を利用してV予測による予測画像を生成するV予測画像生成部98と、入力される予測モードに応じて、対応する予測画像を選択するためのスイッチ99とを備える。
Furthermore, the
次に、図20を参照して画面内予測部76,85における予測画像生成動作例を説明する。まず、周辺特徴ベクトル計算部91が、処理対象ブロックBkに対する周辺特徴ベクトルPBkを計算する(ステップS81)。周辺特徴ベクトルPBkの具体的な計算方法は、第1の実施形態において説明した方法を用いるため、詳細は省略する。次に、周辺特徴ベクトル計算部91がその周辺特徴ベクトルPBkを周辺特徴ベクトル記録部92に渡し、周辺特徴ベクトル記録部92がその周辺特徴ベクトルPBkを当該処理対象ブロックBkの位置と関連付けて記録する(ステップS82)。
Next, an example of a predicted image generation operation in the in-
続いて、スイッチ99が、予測モード値の評価によって選ばれた結果として入力された予測モードに応じて、各予測画像生成部95〜98のいずれかからの入力を出力するように、内部スイッチを切り替える(ステップS83)。ステップS83では、予測モードがTM予測である場合は、予測画像生成部95の出力が予測画像となるよう出力を切り替えてステップS84へ移行する。また、予測モードがDC予測である場合は、DC予測画像生成部96の出力が予測画像となるよう出力を切り替えてステップS85へ移行する。また、予測モードがH予測である場合は、H予測画像生成部97の出力が予測画像となるよう出力を切り替えてステップS86へ移行する。また、予測モードがV予測である場合は、V予測画像生成部98の出力が予測画像となるよう出力を切り替えてステップS87へ移行する。
Subsequently, the internal switch is set so that the
ステップS84では、探索中心決定部93がテンプレートマッチングにおける探索中心Vcを決定して、予測領域決定部94に出力する。そして、予測領域決定部94がその探索中心Vcから予測領域位置VRを決定して、予測画像生成部95に出力する。さらに、予測画像生成部95がその予測領域位置VRから予測画像を生成し、生成した予測画像をスイッチ99経由で出力して、処理を終了する。なお、ステップS84における具体的な処理については、第1の実施形態における予測画像生成処理のステップS22〜S25(図7)と同様であるため、詳細は省略する。
In step S <b> 84, the search
ステップS85では、DC予測画像生成部96が、下式により予測画像Im_DCを生成し、生成した予測画像Im_DCをスイッチ99経由で出力して、処理を終了する。下式において、lIm_DC(i,j)は4×4画素からなる予測画像Im_DC内の各画素の画素値を表す。
In step S85, the DC predicted
ステップS86では、H予測画像生成部97が、下式により予測画像Im_Hを生成し、生成した予測画像Im_Hをスイッチ99経由で出力して、処理を終了する。下式において、i=0,1,2,3、j=0,1,2,3とし、lIm_H(i,j)は4×4画素からなる予測画像Im_H内の各画素の画素値を表す。
lIm_H(i,j)=lBk(−1,j)
In step S86, the H predicted
lIm_H (i, j) = lBk (−1, j)
ステップS87では、V予測画像生成部98が、下式により予測画像Im_Vを生成し、生成した予測画像Im_Vをスイッチ99経由で出力して、処理を終了する。下式において、i=0,1,2,3、j=0,1,2,3とし、lIm_V(i,j)は4×4画素からなる予測画像Im_V内の各画素の画素値を表す。
lIm_V(i,j)=lBk(i,−1)
In step S87, the V predicted
lIm_V (i, j) = lBk (i, -1)
以上の処理により、画面内予測部76,85は入力された予測モードに応じた予測画像を生成して出力することができる。このように、第3の実施形態に係る画像符号化装置では、テンプレートマッチングを用いる予測を含む複数の予測方式の中から1つの予測方式を選択して、選択した予測方式に基づく予測画像を用いて入力画像を符号化することができる。テンプレートマッチングを用いた予測方式は、対象ブロックと空間的に離れた場所に位置する領域と対象ブロック上の画像の相関が高い場合に効果の高い方式である。一方、処理対象ブロックに隣接する領域と処理対象ブロック上の画像の相関が高い場合には、隣接ブロックの画像に基づいて予測する方式の方が高い効果が望める。従って、ブロック毎に両方式のうち最適な方式を選択することで、高い効果が望める。すなわち、入力画像を高い圧縮率で符号化することが可能である。
Through the above processing, the in-
第3の実施形態における予測画像生成処理で採用可能な、他の予測モードについて例を挙げる。第3の実施形態における画像符号化装置7は、TM予測、DC予測、H予測、V予測の4つの予測方式を候補として、その予測方式候補の中からブロック毎に1つの方式を選択して予測画像を生成するものとしたが、本発明はこれに限らない。例えば、第2の実施形態において説明した図9の画像符号化装置4や従来技術で説明した図23の画像符号化装置100における予測方式を、予測方式の候補として加えても構わない。もしくは、H.264/AVCにおいて規定されている画面内予測方式を予測方式の候補として加えても構わない。
Examples of other prediction modes that can be employed in the predicted image generation processing in the third embodiment will be described. The image encoding device 7 according to the third embodiment selects four prediction methods of TM prediction, DC prediction, H prediction, and V prediction as candidates, and selects one method for each block from the prediction method candidates. Although the predicted image is generated, the present invention is not limited to this. For example, the prediction method in the
また、第3の実施形態における予測画像生成処理では、画像符号化装置7において可変長符号化部78がブロック毎に予測モードを符号化するものと説明したが、例えば、以下の手順により予測モード情報を符号化するようにしてもよい。
In the predictive image generation process according to the third embodiment, it has been described that the variable
まず、処理対象ブロックの予測モードを推定する推定予測モードを、隣接ブロックの予測モードに基づいて導出する。推定予測モードの決定方法は、次の(a)〜(d)の通りとする。 First, an estimated prediction mode for estimating the prediction mode of the processing target block is derived based on the prediction mode of the adjacent block. The method of determining the estimated prediction mode is as follows (a) to (d).
(a)上又は左に位置する隣接ブロックの予測モードがTM予測の場合、TM予測を推定予測モードとする。
(b)他方、上又は左に位置する隣接ブロックの予測モードがH予測の場合、H予測を推定予測モードとする。
(c)他方、上又は左に位置する隣接ブロックの予測モードがV予測の場合、V予測を推定予測モードとする。
(d)他方、DC予測を推定予測モードとする。
(A) When the prediction mode of the adjacent block located above or on the left is TM prediction, TM prediction is set as the estimated prediction mode.
(B) On the other hand, when the prediction mode of the adjacent block located above or to the left is H prediction, the H prediction is set as the estimated prediction mode.
(C) On the other hand, when the prediction mode of the adjacent block located above or to the left is V prediction, V prediction is set as the estimated prediction mode.
(D) On the other hand, DC prediction is set to the estimated prediction mode.
次に、予測モードと推定予測モードが一致する場合には、ビット「0」を符号化して処理を終了する。一方、一致しない場合には、ビット「1」を符号化して、予測モードがTM予測ならビット列「00」、DC予測ならビット列「11」、H予測ならビット列「10」、V予測ならビット列「01」を符号化する。 Next, when the prediction mode and the estimated prediction mode match, the bit “0” is encoded, and the process ends. On the other hand, if they do not match, bit “1” is encoded. If the prediction mode is TM prediction, bit string “00”, if DC prediction, bit string “11”, if H prediction, bit string “10”, if V prediction, bit string “01”. Is encoded.
このように、予測モード符号化手段は、処理対象ブロックの予測モードを推定する推定予測モードを導出し、処理対象ブロックの予測モードと推定予測モードが一致するか否かの情報を符号化し、予測モードがその推定予測モードと一致しない場合は選択された1つの予測モードの情報を符号化するよう構成することが好ましい。 As described above, the prediction mode encoding means derives an estimated prediction mode for estimating the prediction mode of the processing target block, encodes information on whether or not the prediction mode of the processing target block matches the estimated prediction mode, and performs prediction. When the mode does not coincide with the estimated prediction mode, it is preferable to encode the information of one selected prediction mode.
上記の手順により、予測モード情報を符号化できる。隣接するブロック間における予測モードの相関は高いため、推定予測モードが予測モードと一致する可能性は高い。そのため、上記の方式によると、短い符号が符号化される可能性が高くなる。従って、上記の方法によると、予測モードを直接符号化する場合に較べて、予測モード情報の符号化に要する符号量を削減することができる。 The prediction mode information can be encoded by the above procedure. Since the correlation between prediction modes between adjacent blocks is high, there is a high possibility that the estimated prediction mode matches the prediction mode. Therefore, according to the above method, there is a high possibility that a short code is encoded. Therefore, according to the above method, the amount of code required for encoding the prediction mode information can be reduced as compared with the case where the prediction mode is directly encoded.
また、このようにして符号化して予測モードは、同様に推定予測モードを導出することで、符号化データから画像復号装置8で復号することができる。より具体的には、予測モード復号手段が、処理対象ブロックの予測モードを推定する推定予測モードを導出し、処理対象ブロックの予測モードと推定予測モードが一致するか否かの情報を符号化データより読み出す。予測モード復号手段は、一致する場合には処理対象ブロックの予測モードとして推定予測モードを復号し、一致しない場合には予測モードを示す情報を符号化データから読み出して、処理対象ブロックの予測モードとして、読み出した予測モードを復号するとよい。 In addition, the prediction mode can be decoded from the encoded data by the image decoding device 8 by similarly deriving the estimated prediction mode. More specifically, the prediction mode decoding unit derives an estimated prediction mode for estimating the prediction mode of the processing target block, and information indicating whether the prediction mode of the processing target block matches the estimated prediction mode is encoded data. Read from. The prediction mode decoding means decodes the estimated prediction mode as the prediction mode of the processing target block if they match, and reads information indicating the prediction mode from the encoded data if they do not match, as the prediction mode of the processing target block The read prediction mode may be decoded.
以上、図1〜図20を参照しながら、本発明に係る画像符号化装置及び画像復号装置について各実施形態を説明してきたが、その処理の流れを説明したように、本発明はこのような処理手順でなる画像符号化方法や画像復号方法としての形態も採用してもよい。 As described above, the embodiments of the image encoding device and the image decoding device according to the present invention have been described with reference to FIGS. 1 to 20. As described above, the present invention is A form as an image encoding method or an image decoding method consisting of processing procedures may also be adopted.
また、上述した本発明に係る画像符号化装置や画像復号装置は、処理速度の観点からはハードウェアで構成とすることが望ましいが、その機能の一部をファームウェアとして既存の画像符号化器や画像復号器に実行可能に組み込んでもよいし、例えばLSI(Large Scale Integrated Circuit)チップに実行可能に組み込んでもよい。さらには、本発明に係る画像符号化装置や画像復号装置の機能の全てをソフトウェアとして、汎用コンピュータに実行可能に搭載してもよい。汎用コンピュータは、一般的に、CPU(Central Processing Unit)等の演算処理装置、プログラム格納領域としてのROM(Read Only Memory)等、作業領域としてのRAM(Random Access Memory)等、データ等の記憶領域としてのHDD(ハードディスクドライブ)等のハードウェアを備える。上述のソフトウェアをROM(又は書き換え可能ROM)やHDD等に格納しておき、CPUが格納されたソフトウェアをRAM上に読み出して実行するようにしておけばよい。いずれの場合でも、本発明に係る画像符号化や画像復号の機能を果たすことができる。 In addition, the image encoding device and the image decoding device according to the present invention described above are preferably configured by hardware from the viewpoint of processing speed, but an existing image encoder or a part of the function is used as firmware. It may be incorporated into an image decoder in an executable manner, or may be incorporated into an LSI (Large Scale Integrated Circuit) chip, for example. Furthermore, all the functions of the image encoding device and the image decoding device according to the present invention may be installed as software in an executable manner on a general-purpose computer. A general-purpose computer generally has a storage area for data such as an arithmetic processing unit such as a CPU (Central Processing Unit), a ROM (Read Only Memory) as a program storage area, a RAM (Random Access Memory) as a work area, etc. Hardware such as a hard disk drive (HDD). The above-described software may be stored in a ROM (or rewritable ROM), HDD, or the like, and the software stored in the CPU may be read onto the RAM and executed. In either case, the image encoding and image decoding functions according to the present invention can be achieved.
また、このようなプログラム(ファームウェアやソフトウェア)は、それを記録したコンピュータ読み取り可能な記録媒体としての配布することや、ネットワーク経由或いは放送波などで配信することができ、対応する機器に実行可能に組み込むことができる。 In addition, such a program (firmware or software) can be distributed as a computer-readable recording medium on which the program is recorded, or can be distributed via a network or broadcast wave, and can be executed on a corresponding device. Can be incorporated.
1,4,7…画像符号化装置、2,5,8…画像復号装置、11,41,71…直交変換部、12,42,72…量子化部、13,22,43,52,73,82…逆量子化部、14,23,44,53,74,83…逆直交変換部、15,24,45,54,75,84…フレームメモリ、16,25,46,55,76,85…画面内予測部、17,48,78…可変長符号化部、21,51,81…可変長復号部、31,61,91…周辺特徴ベクトル計算部、32,62,92…周辺特徴ベクトル記録部、33,63,93…探索中心決定部、34,94…予測領域決定部、35,65,95…予測画像生成部、47…予測領域探索部、56…予測領域位置計算部、77…画面内予測判定部、96…DC予測画像生成部、97…H予測画像生成部、98…V予測画像生成部、99…スイッチ。
DESCRIPTION OF
Claims (6)
処理対象ブロックの近傍領域内の画素値に基づいて、該処理対象ブロックの特徴ベクトルを導出する特徴ベクトル導出手段と、
前記処理対象ブロックに対応する特徴ベクトルと復号済ブロックに対応する特徴ベクトルとを比較して類似度を計算し、前記類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を中心として、該中心から所定の距離以内の領域を、探索範囲に決定する探索範囲決定手段と、
前記探索範囲の中から前記処理対象ブロックに類似する領域を、予測領域として選択する予測領域決定手段と、
前記予測領域の画像に基づいて前記処理対象ブロックに対する予測画像を生成する予測画像生成手段とを備えることを特徴とする画像復号装置。 In an image decoding apparatus that reproduces an image of each block in an image divided into a plurality of blocks by adding a difference image decoded from encoded data to a predicted image,
Feature vector deriving means for deriving a feature vector of the processing target block based on a pixel value in a neighborhood region of the processing target block;
The feature vector corresponding to the block to be processed and the feature vector corresponding to the decoded block are compared to calculate the similarity, and the position of the decoded block corresponding to the feature vector having the highest similarity is used as the center. A search range determining means for determining a region within a predetermined distance from the center as a search range;
A prediction region determining means for selecting a region similar to the processing target block from the search range as a prediction region;
An image decoding apparatus comprising: a predicted image generation unit configured to generate a predicted image for the processing target block based on an image of the prediction region.
前記符号化データより復号される予測モードに応じて使用する予測画像生成手段を選択し、該選択された予測画像生成手段により予測画像を生成することを特徴とする請求項1に記載の画像復号装置。 The image decoding apparatus further includes one or a plurality of different prediction image generation means for generating a prediction image for the processing target block, and a prediction mode decoding means for decoding a prediction mode, separately from the prediction image generation means,
The image decoding according to claim 1, wherein a prediction image generation unit to be used is selected according to a prediction mode decoded from the encoded data, and a prediction image is generated by the selected prediction image generation unit. apparatus.
前記処理対象ブロックの予測モードを推定する推定予測モードを導出し、
前記処理対象ブロックの予測モードと前記推定予測モードが一致するか否かの情報を符号化データより読み出し、
一致する場合は、前記処理対象ブロックの予測モードとして前記推定予測モードを復号し、
一致しない場合は、予測モードを示す情報を符号化データから読み出して、前記処理対象ブロックの予測モードとして、前記読み出した予測モードを復号することを特徴とする請求項2に記載の画像復号装置。 The prediction mode decoding means includes
Deriving an estimated prediction mode for estimating the prediction mode of the processing target block,
Read from the encoded data whether the prediction mode of the block to be processed and the estimated prediction mode match,
If they match, decode the estimated prediction mode as the prediction mode of the processing target block,
3. The image decoding apparatus according to claim 2, wherein, when they do not match, information indicating a prediction mode is read from encoded data, and the read prediction mode is decoded as a prediction mode of the processing target block.
処理対象ブロックの近傍領域内の画素値に基づいて、該処理対象ブロックの特徴ベクトルを導出する特徴ベクトル導出手段と、
前記処理対象ブロックに対応する特徴ベクトルと復号済ブロックに対応する特徴ベクトルとを比較して類似度を計算し、前記類似度が最も高い特徴ベクトルに対応する復号済ブロックの位置を中心として、該中心から所定の距離以内の領域を、探索範囲に決定する探索範囲決定手段と、
前記探索範囲の中から前記処理対象ブロックに類似する領域を、予測領域として選択する予測領域決定手段と、
前記予測領域の画像に基づいて前記処理対象ブロックに対する予測画像を生成する予測画像生成手段とを備えることを特徴とする画像符号化装置。 In an image encoding device that encodes a difference image between an input image and a predicted image for each block in an image divided into a plurality of blocks,
Feature vector deriving means for deriving a feature vector of the processing target block based on a pixel value in a neighborhood region of the processing target block;
The feature vector corresponding to the block to be processed and the feature vector corresponding to the decoded block are compared to calculate the similarity, and the position of the decoded block corresponding to the feature vector having the highest similarity is used as the center. A search range determining means for determining a region within a predetermined distance from the center as a search range;
A prediction region determining means for selecting a region similar to the processing target block from the search range as a prediction region;
An image coding apparatus comprising: a predicted image generation unit configured to generate a predicted image for the processing target block based on an image of the prediction region.
前記選択された1つの予測画像生成手段により生成された予測画像を、前記処理対象ブロックにおける予測画像とすることを特徴とする請求項4に記載の画像符号化装置。 In addition to the predicted image generating unit, the image encoding device includes one or a plurality of different predicted image generating units that generate a predicted image for the processing target block, and each predicted image generating unit included in the image encoding device. A prediction image determination unit that selects one prediction image generation unit by comparing the generated prediction image and an input image, and a prediction mode encoding that encodes a prediction mode indicating the selected one prediction image generation unit And further comprising means,
The image coding apparatus according to claim 4, wherein the predicted image generated by the selected one predicted image generation unit is a predicted image in the processing target block.
前記処理対象ブロックの予測モードを推定する推定予測モードを導出し、
前記処理対象ブロックの予測モードと前記推定予測モードが一致するか否かの情報を符号化し、
前記予測モードが前記推定予測モードと一致しない場合は、前記選択された1つの予測画像生成手段を示す予測モードの情報を符号化することを特徴とする請求項5に記載の画像符号化装置。 The prediction mode encoding means includes
Deriving an estimated prediction mode for estimating the prediction mode of the processing target block,
Encode information on whether or not the prediction mode of the block to be processed and the estimated prediction mode match,
6. The image encoding apparatus according to claim 5, wherein when the prediction mode does not coincide with the estimated prediction mode, information of a prediction mode indicating the selected one prediction image generation unit is encoded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011131970A JP2011205693A (en) | 2011-06-14 | 2011-06-14 | Image decoding apparatus and image encoding apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011131970A JP2011205693A (en) | 2011-06-14 | 2011-06-14 | Image decoding apparatus and image encoding apparatus |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007141894A Division JP4767908B2 (en) | 2007-05-29 | 2007-05-29 | Image decoding apparatus and image encoding apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011205693A true JP2011205693A (en) | 2011-10-13 |
Family
ID=44881736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011131970A Pending JP2011205693A (en) | 2011-06-14 | 2011-06-14 | Image decoding apparatus and image encoding apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011205693A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014525183A (en) * | 2011-11-03 | 2014-09-25 | グーグル インコーポレイテッド | Method and apparatus for image compression storing encoding parameters in a 2D matrix |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1013832A (en) * | 1996-06-25 | 1998-01-16 | Nippon Telegr & Teleph Corp <Ntt> | Moving picture recognizing method and moving picture recognizing and retrieving method |
WO2007004678A1 (en) * | 2005-07-05 | 2007-01-11 | Ntt Docomo, Inc. | Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program |
-
2011
- 2011-06-14 JP JP2011131970A patent/JP2011205693A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1013832A (en) * | 1996-06-25 | 1998-01-16 | Nippon Telegr & Teleph Corp <Ntt> | Moving picture recognizing method and moving picture recognizing and retrieving method |
WO2007004678A1 (en) * | 2005-07-05 | 2007-01-11 | Ntt Docomo, Inc. | Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014525183A (en) * | 2011-11-03 | 2014-09-25 | グーグル インコーポレイテッド | Method and apparatus for image compression storing encoding parameters in a 2D matrix |
US8977066B2 (en) | 2011-11-03 | 2015-03-10 | Google Inc. | Image compression using sub-resolution images |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6073405B2 (en) | Video decoding method and apparatus | |
RU2688252C1 (en) | Video encoding and decoding with high resistance to errors | |
US8369628B2 (en) | Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, and video decoding program | |
JP5422168B2 (en) | Video encoding method and video decoding method | |
JP5321426B2 (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
US8229233B2 (en) | Method and apparatus for estimating and compensating spatiotemporal motion of image | |
KR101083379B1 (en) | Motion vector searching method and device, and record medium having recorded the program therefor | |
JP5590269B1 (en) | Video encoding method, video encoding apparatus, and video encoding program | |
JP2006025430A (en) | Method of selecting coding mode, and device thereof | |
US20170257631A1 (en) | Block size determining method and program recording medium | |
US20200059657A1 (en) | Image processing apparatus and method | |
JP2009272702A (en) | Motion vector searching apparatus and control method thereof | |
JP4767908B2 (en) | Image decoding apparatus and image encoding apparatus | |
JP2011205693A (en) | Image decoding apparatus and image encoding apparatus | |
JP6019797B2 (en) | Moving picture coding apparatus, moving picture coding method, and program | |
KR101711896B1 (en) | Method and apparatus for encoding video using coding information in upper depth and current depth | |
JP2012120108A (en) | Interpolation image generating apparatus and program, and moving image decoding device and program | |
JP5887020B1 (en) | Video decoding method | |
JP6363975B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
JP2011254396A (en) | Moving image decoding apparatus, moving image decoding method and moving image decoding program | |
BR112014017608B1 (en) | VIDEO DECODER FOR DECODING AN ENCODED STREAM WITH A VIDEO CODING SYSTEM |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110713 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130305 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130625 |