JPH10257493A - Motion vector detector and image encoder provided with the same - Google Patents

Motion vector detector and image encoder provided with the same

Info

Publication number
JPH10257493A
JPH10257493A JP5530297A JP5530297A JPH10257493A JP H10257493 A JPH10257493 A JP H10257493A JP 5530297 A JP5530297 A JP 5530297A JP 5530297 A JP5530297 A JP 5530297A JP H10257493 A JPH10257493 A JP H10257493A
Authority
JP
Japan
Prior art keywords
search range
image
data
range
screen
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
Application number
JP5530297A
Other languages
Japanese (ja)
Inventor
Takao Kato
貴朗 加藤
Norio Tagawa
典生 田川
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.)
Brother Industries Ltd
Xing Inc
Original Assignee
Brother Industries Ltd
Xing Inc
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 Brother Industries Ltd, Xing Inc filed Critical Brother Industries Ltd
Priority to JP5530297A priority Critical patent/JPH10257493A/en
Publication of JPH10257493A publication Critical patent/JPH10257493A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable efficient detection of a motion vector by determining the range of search on a reference picture according to prescribed conditions based on the position of the input picture in the reference picture corresponding to a desired image block position to be predicted and determining the final search range by performing correction when the search range is not settled within the reference picture. SOLUTION: When the temporarily set search range is protruded only on the time side in the horizontal direction, a rectangular range determined by (m-i,n-j), (m-i+k,n-j), (m-i+k,n+j) and (m-i,n+j) is protruded out of the reference picture. Therefore, correction is performed for adding the temporarily set search range on the plus side in the horizontal direction. Then, the search of prescribed motion detection is performed in the final search range with the same form and the same area as the search range temporarily set as the rectangular range determined by four points of (m-i+k,n-j), (m+i+k,n+j), (m+i+k,n+j) and (m-j+k,n+j).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを符号
化する際の動き補償符号化の処理に用いられ、参照画面
の所定の探索範囲を探索し、入力画面における予測した
い画像ブロックと最も相似の範囲を特定することによ
り、その位置を動きベクトルとして検出するベクトル検
出技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used for a motion compensation coding process when coding image data, searches a predetermined search range of a reference screen, and is most similar to an image block to be predicted on an input screen. The present invention relates to a vector detection technique for detecting a position as a motion vector by specifying a range of a motion vector.

【0002】[0002]

【従来の技術】ビデオ信号の圧縮方法として、近年、デ
ジタル処理による圧縮方法の開発が行われている。この
ような、デジタル処理によるビデオ信号の圧縮方法の一
例として、MPEGと呼ばれる圧縮方式の標準がある。
これらの圧縮技術では、一般に画面をマクロブロックと
呼ばれる小単位に分割し、このマクロブロック単位で圧
縮を行う。MPEG規格では、隣接する縦16画素、横
16画素の範囲を1つのマクロブロックとして、1画面
を、例えば縦45個、横30個のマクロブロックに分割
して圧縮処理を行うことになる。
2. Description of the Related Art In recent years, as a video signal compression method, a compression method by digital processing has been developed. As an example of such a video signal compression method by digital processing, there is a compression method standard called MPEG.
In these compression techniques, a screen is generally divided into small units called macroblocks, and compression is performed on a macroblock basis. According to the MPEG standard, a compression process is performed by dividing one screen into, for example, 45 macroblocks and 30 macroblocks horizontally, with a range of adjacent 16 pixels vertically and 16 pixels horizontally as one macroblock.

【0003】マクロブロックに分割した画像データは、
まず動き検出を行う。動き検出とは、直前の画面から、
圧縮しようとするマクロブロックと似ている範囲を探し
出し、対象となるマクロブロックの画素データと直前の
画面から探し出した似ている範囲の画素データの画素毎
の差分データを求め、この差分データと共に前記似てい
る範囲とマクロブロックとの距離である動きベクトルを
伝送することにより、圧縮効率を上げる手法である。動
き検出の結果としては、各画素データの差分値はそれぞ
れ小さな値になり、ばらつきが小さくなるため、後述す
るハフマン符号化による圧縮において効果の向上が期待
できる。
The image data divided into macro blocks is
First, motion detection is performed. With motion detection, from the previous screen,
A range similar to the macroblock to be compressed is searched for, and pixel-by-pixel difference data between pixel data of the target macroblock and pixel data of a similar range searched from the immediately preceding screen is obtained. This is a method of increasing the compression efficiency by transmitting a motion vector that is a distance between a similar range and a macroblock. As a result of the motion detection, the difference value of each pixel data becomes a small value, and the variation becomes small. Therefore, it is expected that the effect is improved in the compression by the Huffman coding described later.

【0004】次に、動き予測を行った画像差分データに
対して変換符号化を行う。一般的に画像圧縮ではDCT
(離散コサイン変換)を行う場合が多い。MPEG規格
において、例えば輝度信号の場合、1つのマクロブロッ
クを4つに分割し、縦横8画素の範囲に対してDCTを
行う。DCTの結果は、やはり8×8の行列に係数が並
ぶが、この係数をある規則に従って並べ替えると、周波
数成分の順に係数を並べることができる。
[0004] Next, transform coding is performed on the image difference data on which the motion prediction has been performed. Generally, DCT is used for image compression.
(Discrete cosine transform) is often performed. According to the MPEG standard, for example, in the case of a luminance signal, one macroblock is divided into four, and DCT is performed on a range of eight pixels vertically and horizontally. In the result of DCT, coefficients are also arranged in an 8 × 8 matrix. However, if the coefficients are rearranged according to a certain rule, the coefficients can be arranged in order of frequency components.

【0005】以上のようにDCTなどの変換符号化を行
うことにより、各係数は周波数成分に変換される。この
ときの画像データの特徴として、低周波成分の信号が大
きく、高周波成分の信号は小さいので、周波数成分の順
に並べた場合には、はじめのいくつかの係数に大きな値
があり、だんだんと小さい値が続くようにデータが並ぶ
ことになる。ただし変換符号化ではデータに偏りを持た
せるだけでデータ量の削減はできない。そこで、このデ
ータに対して量子化とランレングス符号化を行い、デー
タ量の削減を行う。
As described above, by performing transform coding such as DCT, each coefficient is converted into a frequency component. As a feature of the image data at this time, since the signal of the low frequency component is large and the signal of the high frequency component is small, when the components are arranged in the order of the frequency components, the first several coefficients have large values, and are gradually smaller. The data will be arranged so that the values continue. However, in transform coding, it is not possible to reduce the amount of data only by giving a bias to the data. Therefore, quantization and run-length encoding are performed on this data to reduce the amount of data.

【0006】量子化はデータの精度を落とすもので、具
体的には量子化ステップ値で各係数を割り、その商を係
数とする。これにより小さな値の係数は0になり、値の
ある係数を削減することができる。一般的に画像データ
を周波数成分に分割すると、低周波側の値は大きく、高
周波側の値は小さくなるので、量子化により、特に高周
波側の係数が0になる場合が多くなる。従って量子化
は、結果的に高周波成分のカットによるデータ量の削減
という意味合いを持つ。
[0006] The quantization reduces the precision of data. Specifically, each coefficient is divided by a quantization step value, and the quotient is used as a coefficient. As a result, the coefficient having a small value becomes 0, and the coefficient having a value can be reduced. Generally, when image data is divided into frequency components, the value on the low frequency side is large and the value on the high frequency side is small. Therefore, the coefficient particularly on the high frequency side often becomes zero due to quantization. Therefore, quantization has the meaning of reducing the data amount by cutting high-frequency components.

【0007】変換符号化と量子化によりデータに偏りが
でき、値が0となる係数も多くなるので、この係数をラ
ンレングス符号化によって圧縮する。ランレングス符号
化は係数の列の中に0値の係数(ゼロ係数)を多く持
ち、時々値を持つ係数(非ゼロ係数)がある場合に有効
であり、ゼロ係数の継続個数ラン(RUN )と、それに続
く非ゼロ係数の値(LEVEL )の組み合わせで表現するも
のである。前記量子化の結果では特に高周波成分にゼロ
係数が多くなるので、ランレングス符号化した係数の組
は、それ自体でDCTの出力よりも少ない係数になる場
合が多い。
[0007] Data is biased by the transform coding and quantization, and the number of coefficients having a value of 0 increases. Therefore, these coefficients are compressed by run-length coding. Run-length coding is effective when there are many zero-valued coefficients (zero coefficients) in a coefficient sequence and there are occasional values (non-zero coefficients). , Followed by a non-zero coefficient value (LEVEL). As a result of the quantization, particularly the high-frequency component has a large number of zero coefficients, so that a set of run-length coded coefficients themselves often has a coefficient smaller than the output of the DCT.

【0008】ランレングス符号化で係数の削減をした後
は、それぞれの係数の組のビット数を可変長コードによ
って圧縮する。可変長コードは、出現頻度の多いデータ
に対して短いビット列を割り当て、出現頻度の少ないデ
ータに対して長いビット列を割り当てることで、全体と
してのビット量を削減するものであり、MPEG規格に
おいては、データとビット列との対応はあらかじめ規定
されている。MPEGで規定されている可変長コードで
は、比較的小さい値(LEVEL )の場合に短いビット列が
割り当てられているので、係数が小さい値ばかりなら
ば、短いビット列が割り当てられる場合が多くなり、全
体のデータ量を削減することができる。また、係数が大
きい場合は、全体のデータ量が増大することになる。こ
の係数は量子化によって値の大小を制御可能なので、D
CTの結果の傾向に応じて量子化値を増減することで、
出力データ量を制御する事が可能であり、一般的なMP
EG符号化装置は、この手法でデータ量の制御をしてい
る。
After the coefficients are reduced by the run-length coding, the number of bits of each coefficient set is compressed by a variable length code. The variable length code is to reduce the bit amount as a whole by allocating a short bit string to data having a high frequency of occurrence and allocating a long bit string to data having a low frequency of frequency. In the MPEG standard, The correspondence between the data and the bit string is defined in advance. In the variable length code specified by MPEG, a short bit string is assigned when the value is relatively small (LEVEL). Therefore, if the coefficient is only a small value, a short bit string is often assigned. Data volume can be reduced. Also, when the coefficient is large, the total data amount increases. Since the magnitude of this coefficient can be controlled by quantization,
By increasing or decreasing the quantization value according to the tendency of the result of CT,
It is possible to control the amount of output data.
The EG encoding device controls the data amount by this method.

【0009】[0009]

【発明が解決しようとする課題】以上のように、MPE
Gなどの圧縮技術では、動き検出と、DCT及び量子化
による係数の不可逆変換、そして可変長コードを採用し
てデータの効率的な圧縮を実現しいるが、このような方
式では、不可逆変換を利用しているために再生時に圧縮
前との完全に同一な情報を得ることができず、誤差を発
生することになる。この誤差は、再生画像の画質劣化の
主原因となるものであり、画質の良好な再生画像を得る
ためにはこの誤差ができるだけ小さくなるようにしなけ
ればならない。
As described above, the MPE
In compression techniques such as G, motion detection, irreversible conversion of coefficients by DCT and quantization, and efficient compression of data by using variable-length codes are realized. Due to the use, it is not possible to obtain completely the same information as before compression at the time of reproduction, and an error occurs. This error is the main cause of the deterioration of the image quality of the reproduced image, and it is necessary to minimize the error in order to obtain a reproduced image with good image quality.

【0010】MPEG規格においては、主に動き検出と
DCT係数の量子化の2つの技術で高圧縮率を実現して
いるが、画質を良好に、つまり再生画像データの誤差を
少なくするためには量子化による圧縮を一部犠牲にしな
ければならない。従って良好な画質を維持したまま圧縮
率を向上させるためには、動き検出の能力を向上させれ
ばよいことになる。動き検出は、前述したように、被圧
縮ブロックと参照ブロックの差分をとり、これを被圧縮
ブロックの画素データのかわりに使う手法であり、被圧
縮ブロックと参照ブロックとが似ているほど結果である
差分データが小さい値となるため、後段の技術で圧縮さ
れやすくなる。つまり高画質で高圧縮率の画像符号化装
置では、より動き検出能力の優れたものが求められてい
る。
In the MPEG standard, a high compression rate is realized mainly by two techniques of motion detection and DCT coefficient quantization. However, in order to improve image quality, that is, to reduce errors in reproduced image data, Some compression due to quantization must be sacrificed. Therefore, in order to improve the compression ratio while maintaining good image quality, it is necessary to improve the ability of motion detection. As described above, motion detection is a method of taking the difference between a compressed block and a reference block and using this difference instead of the pixel data of the compressed block. Since a certain difference data has a small value, it becomes easy to be compressed by the latter technology. In other words, an image coding apparatus having a high image quality and a high compression rate is required to have a higher motion detection capability.

【0011】ところで、通常の動き補償予測では、図1
2に示すように、入力画面の予測したい画像ブロックの
位置を水平、垂直方向にそれぞれ(m,n)の位置にあ
る画素とすると、参照画面における同位置(m,n)か
ら水平方向には±i、垂直方向には±j分の画素集合か
らなる探索範囲の中から最も近い画素値を探し出し、動
きベクトルの算出を行っていた。
By the way, in the ordinary motion compensation prediction, FIG.
As shown in FIG. 2, assuming that the position of the image block to be predicted on the input screen is a pixel located at the position (m, n) in the horizontal and vertical directions, respectively, In the vertical direction, the closest pixel value is searched for from the search range including the pixel set of ± j, and the motion vector is calculated.

【0012】この場合、図13に示すように、予測した
い入力画面の画像ブロック位置(m,n)が画面の例え
ば端のほうにあり、水平方向にはm−i〜m+i、垂直
方向にはn−j〜n+jの画素集合で定まる探索範囲が
参照画面内に収まらない場合も考えられる。例えば図1
3中に破線で示すように、水平のマイナス方向にkだけ
はみ出していたとすると、実際には、水平方向(m成
分)にはm−i+k〜m+i、垂直方向(n成分)には
n−j〜n+jの画素集合で定まる範囲(図13中に太
枠で示す部分)を探索範囲として動きベクトルの算出を
行っていた。
In this case, as shown in FIG. 13, the image block position (m, n) of the input screen to be predicted is located, for example, at the end of the screen, and is mi-m to m + i in the horizontal direction and in the vertical direction. It is also conceivable that the search range determined by the pixel set of n−j to n + j does not fall within the reference screen. For example, FIG.
As shown by a broken line in FIG. 3, assuming that only k protrudes in the horizontal minus direction, actually, m−i + k to m + i in the horizontal direction (m component) and n−j in the vertical direction (n component). The motion vector is calculated using a range determined by a pixel set of ~ n + j (a portion shown by a thick frame in FIG. 13) as a search range.

【0013】しかしながら、このように予測したい入力
画面の画像ブロック位置が画面の端のほうにあり、参照
画面内における実質的な探索範囲が狭くなってしまう
と、上述の図13の例で言えば、水平方向にm±i、垂
直方向にn±j画素分を探索範囲として処理する能力が
あるにもかかわらず、実際には狭い探索範囲でしか動き
ベクトルの検出ができないため、動きベクトルの検出効
率が悪くなる。これは、上述した高画質で高圧縮率の画
像符号化装置において動き検出能力のより優れたものが
求められる現状において改善したい問題点の一つであ
る。
However, if the image block position of the input screen to be predicted is located at the end of the screen, and the substantial search range in the reference screen is narrowed, in the example of FIG. In spite of the ability to process m ± i pixels in the horizontal direction and n ± j pixels in the vertical direction as the search range, motion vectors can be actually detected only in a narrow search range. Efficiency gets worse. This is one of the problems to be improved in the above-mentioned situation in which the image coding apparatus with high image quality and high compression rate is required to have better motion detection capability.

【0014】本発明は、上述した問題点を解決するため
になされたものであり、予測する入力画面の画像ブロッ
ク位置が画面のどこにあっても、効率の良い動きベクト
ルの検出を行うことができるようにすることを目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and it is possible to efficiently detect a motion vector regardless of the position of a predicted image block on an input screen. The purpose is to be.

【0015】[0015]

【課題を解決するための手段及び発明の効果】この目的
を達成するためになされた請求項1記載の発明は、動き
補償予測符号化に用いられ、参照画面の所定の探索範囲
を探索し、入力画面における予測したい画像ブロックと
最も相似の範囲を特定することにより、その位置を動き
ベクトルとして検出する動きベクトル検出装置であっ
て、前記参照画面における探索範囲を、前記入力画面の
予測したい画像ブロック位置に対応する参照画面中の位
置に基づき、所定の条件にしたがって決定する探索範囲
決定手段と、その探索範囲決定手段によって決定された
探索範囲が前記参照画面内に収まらない場合には、その
収まらない探索範囲分を、前記参照画面内であり且つ前
記参照画面内に元々収まっている探索範囲分に付加し、
最終的な探索範囲とする探索範囲補正手段と、を備えて
いることを特徴とする動きベクトル検出装置である。
Means for Solving the Problems and Effects of the Invention The invention according to claim 1 for achieving this object is used for motion compensated predictive coding, and searches a predetermined search range of a reference screen. A motion vector detecting device that detects a position as a motion vector by specifying a range most similar to an image block to be predicted on an input screen, wherein a search range on the reference screen is an image block to be predicted on the input screen. A search range determining means for determining in accordance with a predetermined condition based on a position in the reference screen corresponding to the position, and, if the search range determined by the search range determining means does not fit within the reference screen, the search A search range that is not present is added to a search range that is within the reference screen and originally fits within the reference screen,
And a search range correcting means for setting a final search range.

【0016】本動きベクトル検出装置によれば、参照画
面の所定の探索範囲を探索し、入力画面における予測し
たい画像ブロックと最も相似の範囲を特定することによ
り、その位置を動きベクトルとして検出する場合、ま
ず、探索範囲決定手段が、参照画面における探索範囲
を、入力画面の予測したい画像ブロック位置に対応する
参照画面中の位置に基づき、所定の条件にしたがって決
定する。この所定の条件とは、例えば符号化対象の画像
内容に応じて適宜設定される。なお、この条件は符号化
対象の画像について処理を実行している間は基本的には
変わらない。
According to the motion vector detecting apparatus, a position is detected as a motion vector by searching a predetermined search range on the reference screen and specifying a range most similar to the image block to be predicted on the input screen. First, the search range determining means determines a search range on the reference screen based on a position on the reference screen corresponding to a position of an image block to be predicted on the input screen according to a predetermined condition. The predetermined condition is appropriately set according to, for example, the content of the image to be encoded. Note that this condition does not basically change while processing is performed on the image to be encoded.

【0017】そして、探索範囲決定手段によって決定さ
れた探索範囲が参照画面内に収まらない場合には、探索
範囲補正手段が、その収まらない探索範囲分を、参照画
面内であり且つ参照画面内に元々収まっている探索範囲
分に付加し、最終的な探索範囲とする。
If the search range determined by the search range determining means does not fit within the reference screen, the search range correcting means sets the search range that does not fit into the reference screen and within the reference screen. The final search range is added to the search range originally contained.

【0018】ところで、予測したい入力画面の画像ブロ
ック位置が画面の端のほうにある場合、従来装置では参
照画面内における実質的な探索範囲が狭くなる。例えば
図12の例で言えば、水平方向にm±i、垂直方向にn
±j画素分を探索範囲として処理する能力があるにもか
かわらず、実際には狭い探索範囲でしか動きベクトルの
検出ができないため、動きベクトルの検出効率が悪くな
っていた。
When the image block position of the input screen to be predicted is located at the end of the screen, the substantial search range in the reference screen is reduced in the conventional apparatus. For example, in the example of FIG. 12, m ± i in the horizontal direction and n in the vertical direction.
In spite of the ability to process ± j pixels as a search range, motion vectors can be actually detected only in a narrow search range, resulting in poor motion vector detection efficiency.

【0019】これに対して、本動きベクトル検出装置に
よれば、上記探索範囲決定手段によって決定された探索
範囲が参照画面内に収まらない場合には、探索範囲補正
手段が、その収まらない探索範囲分を、参照画面内であ
り且つ参照画面内に元々収まっている探索範囲分に付加
し、最終的な探索範囲とする。したがって、その探索能
力を有効に活用することができ、動き補償予測の効率を
向上させることとなる。これは、高画質で高圧縮率の画
像符号化においては動き検出能力のより優れたものが求
められる点を考えると、非常に効果的である。
On the other hand, according to the motion vector detecting device, if the search range determined by the search range determining means does not fit within the reference screen, the search range correcting means sets the search range that does not fit. The minute is added to the search range within the reference screen and originally within the reference screen, and is set as a final search range. Therefore, the search ability can be effectively used, and the efficiency of motion compensation prediction is improved. This is very effective in consideration of the fact that image coding with high image quality and high compression rate requires better motion detection capability.

【0020】なお、前記探索範囲補正手段による補正方
法としては、種々考えられる。例えば、参照画面内に収
まらない探索範囲分を、同じ形状のままで参照画面内に
元々収まっている探索範囲分に付加し、探索範囲決定手
段によって決定された探索範囲と同じ形状を確保して最
終的な探索範囲とすることもできる、また、参照画面内
に収まらない探索範囲分を、同じ面積であるが形状を変
えて参照画面内に元々収まっている探索範囲分に付加
し、最終的な探索範囲とすることもできる。
Various correction methods can be considered by the search range correction means. For example, a search range that does not fit in the reference screen is added to a search range that originally fits in the reference screen with the same shape, and the same shape as the search range determined by the search range determination unit is secured. The final search range can be used.Also, a search range that does not fit in the reference screen is added to a search range originally having the same area but changing shape and originally fit in the reference screen. It can also be a simple search range.

【0021】前者のように、参照画面内に収まらない探
索範囲分を同じ形状のままで付加する場合も、当然なが
ら面積は変わらない。つまり、どのような手法を採って
も、補正後の探索範囲が補正前、つまり探索範囲決定手
段によって決定された探索範囲と同じ面積であれば、一
応その探索能力は同じに保たれると考えられる。したが
って、このように同じ面積になるように補正することが
好ましいと言える。
As in the former case, even when a search range that does not fit in the reference screen is added with the same shape, the area does not change. In other words, regardless of the method used, if the search range after correction is the same as the search range before correction, that is, if the search range is determined by the search range determining means, the search capability is considered to be kept the same for the time being. Can be Therefore, it can be said that it is preferable to perform the correction so as to have the same area.

【0022】但し、前者のように、参照画面内に収まら
ない探索範囲分を同じ形状のままで付加すると、補正後
の探索範囲が探索範囲決定手段によって決定された探索
範囲と同じ形状でもあるので、探索能力の向上の点から
はより好ましい場合が多いと考えられる。
However, if a search range that does not fit in the reference screen is added with the same shape as in the former case, the search range after correction has the same shape as the search range determined by the search range determination means. In many cases, it is more preferable from the viewpoint of improving the search ability.

【0023】また、後者のように、参照画面内に収まら
ない探索範囲分を同じ面積であるが形状を変えて付加す
る方法としては、例えば、水平方向にはみ出した場合で
あっても、垂直方向側に付加することが考えられる。も
ちろん、水平方向と垂直方向の両方に付加してもよい。
As a method of adding a search range that does not fit in the reference screen but has the same area but a different shape as in the latter case, for example, even if the search range extends in the horizontal direction, Could be added to the side. Of course, it may be added in both the horizontal direction and the vertical direction.

【0024】そして、このような動きベクトル検出装置
を備えた画像符号化装置としては、請求項4に示すよう
な構成が考えられる。つまり、入力された画像信号を画
素の集合として形成される矩形範囲の画素データに変換
し、少なくとも動き補償を行って圧縮したデジタルデー
タとして出力可能な画像符号化装置であって、少なくと
も前記矩形範囲に含まれる画素データを一時的に蓄積す
る画像記憶手段と、動き補償のために参照される画像デ
ータを少なくとも1画面分保持する参照画像記憶手段
と、前記画像記憶手段及び参照画像記憶手段に接続され
ており、所定の範囲の画像データを前記参照画像記憶手
段から取り出し、前記画像記憶手段に蓄積されている画
素データと比較して、画素毎の差分値を算出し、画素差
分データとして出力する動き補償手段と、前記動き補償
手段から出力された画素差分データの符号化を行い、出
力データを生成する符号化手段と、前記符号化手段に接
続されており、参照用の画像を再生して参照画像記憶手
段に蓄積させる画像再生手段と、前記画像記憶手段及び
参照画像記憶手段に接続されており、参照画像記憶手段
に蓄積されている画像データを探索して、前記画像記憶
手段から得られる画素データと最も相似の範囲を特定
し、この位置を動きベクトルとして前記参照画像記憶手
段に出力する動き検出手段とを備え、前記動き検出手段
が、上述した動きベクトル検出装置として構成されてい
ることを特徴とするものである。
As an image encoding apparatus provided with such a motion vector detecting device, a configuration as described in claim 4 can be considered. That is, an image encoding device that converts an input image signal into pixel data of a rectangular range formed as a set of pixels, and that can output at least motion-compressed and compressed digital data, at least the rectangular range Image storage means for temporarily storing pixel data included in the image data, reference image storage means for holding at least one screen of image data to be referenced for motion compensation, and connection to the image storage means and the reference image storage means The image data in a predetermined range is taken out from the reference image storage means, compared with the pixel data stored in the image storage means, a difference value for each pixel is calculated, and output as pixel difference data. A motion compensating unit, an encoding unit that encodes pixel difference data output from the motion compensating unit, and generates output data; Image reproducing means connected to the image forming means, for reproducing the reference image and storing the reference image in the reference image storing means, and connected to the image storing means and the reference image storing means and stored in the reference image storing means. Motion detection means for searching for image data having the same position as the pixel data obtained from the image storage means, and outputting the position as a motion vector to the reference image storage means. The detecting means is configured as the above-described motion vector detecting device.

【0025】この場合の動き検出手段は、動きベクトル
検出装置として上述したように、その探索能力を有効に
活用することができ、動き補償予測の効率を向上させる
こととなるため、高画質で高圧縮率の画像符号化装置を
実現することができる。また、請求項5に示すものは、
上述したエンコード装置において、符号化手段は、動き
補償手段から出力された画素差分データに対して変換符
号化を施して出力する変換符号化手段と、変換符号化手
段から出力された変換符号化データを可変長のコードに
変換して出力する可変長符号化手段とを備え、画像再生
手段は、変換符号化手段からの出力に対し逆変換を施し
て再生画素データを作成する逆変換符号化手段を備えて
いることを特徴とする。
As described above, the motion detecting means in this case can effectively utilize its search capability and improve the efficiency of motion compensation prediction as described above as a motion vector detecting device, so that high image quality and high image quality can be obtained. An image encoding device having a compression ratio can be realized. What is set forth in claim 5 is:
In the above-described encoding device, the encoding unit performs transformation encoding on the pixel difference data output from the motion compensation unit and outputs the result, and the encoded transformation data output from the transformation encoding unit. And a variable-length encoding unit that converts the output from the conversion encoding unit into a variable-length code and outputs the output. The image reproduction unit performs inverse conversion on the output from the conversion encoding unit to generate reproduced pixel data. It is characterized by having.

【0026】この場合には、逆量子化手段及び逆直交変
換手段によって画素データが再生され、これは圧縮デー
タのデコード時の再生画像と等しくなる。従って、動き
予測手段において、この画素データを参照データとして
データ変換手段から出力された矩形範囲の画素データと
の差分データを作成すれば、量子化などの誤差を補正す
ることができ、また差分データの出力なので、生のデー
タを出力するよりもデータ量が削減できる。
In this case, the pixel data is reproduced by the inverse quantization means and the inverse orthogonal transform means, and this becomes equal to the reproduced image at the time of decoding the compressed data. Therefore, if the motion prediction means creates difference data from the pixel data in the rectangular range output from the data conversion means using the pixel data as reference data, errors such as quantization can be corrected. Output, the amount of data can be reduced compared to the output of raw data.

【0027】なお、上述した変換符号化手段としては、
例えば直交変換手段と量子化手段とで構成することがで
きるが、例えば直交変換手段のみでも構わない。そし
て、その直交変換手段による直交変換としては一般的に
DCT(離散コサイン変換)が採用されることが多い
が、その他の直交変換、例えば離散フーリエ変換(DF
T)等を採用してもよい。また、可変長符号化手段とし
ては、変換符号化手段から出力された変換符号化データ
を例えばランレングス符号化によって圧縮し、さらに可
変長コードに変換するものとすることが考えられる。
The above-mentioned transform coding means includes:
For example, it can be composed of an orthogonal transformation unit and a quantization unit, but for example, only the orthogonal transformation unit may be used. In general, DCT (Discrete Cosine Transform) is often adopted as the orthogonal transform by the orthogonal transform means, but other orthogonal transform such as discrete Fourier transform (DF)
T) or the like may be employed. Further, as the variable-length encoding means, it is conceivable to compress the transformed encoded data output from the transform encoding means by, for example, run-length encoding, and further convert the data into a variable-length code.

【0028】[0028]

【発明の実施の形態】以下、本発明を具体化した一実施
形態を図面を参照して説明する。図1は、本発明の一実
施形態である動きベクトル検出装置を備えたMPEG規
格準拠の画像符号化装置の概略構成を示すブロック図で
ある。本画像符号化装置は、入力としてNTSC方式に
準拠した白黒の画像信号を受け、これに対して圧縮処理
を行い圧縮ストリームとして出力する。この圧縮ストリ
ームはMPEG規格に類似した構造をもつ。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an image coding apparatus conforming to the MPEG standard provided with a motion vector detecting apparatus according to an embodiment of the present invention. The image encoding apparatus receives a black-and-white image signal conforming to the NTSC system as an input, performs a compression process on the signal, and outputs the result as a compressed stream. This compressed stream has a structure similar to the MPEG standard.

【0029】図1に示すように、本画像符号化装置は、
入力された画像信号を受けてこれを画素単位のデジタル
データとして蓄積し、16×16画素の範囲であるマク
ロブロック単位(これが本発明の「矩形範囲」に相当す
る。)に画素データを出力するための画像記憶手段1
と、その画像記憶手段1から出力される画素データと、
後述する参照画像記憶手段5から出力される直前の画像
の画素データとをそれぞれ受け取り、画素毎の差分デー
タを算出して出力する動き補償手段2と、動き補償手段
2の出力する差分データに対して圧縮のための符号化を
行い、その結果を圧縮ストリームとして外部に出力する
と共に符号化したデータを内部再生のために後述する画
像再生手段4に出力する符号化手段3と、符号化手段3
から受けた符号化データを基に画素データを再生する画
像再生手段4と、画像再生手段4から再生画像を受け取
り、これを蓄積して動き検出手段6及び動き補償手段2
に対して必要な画素データを供給する参照画像記憶手段
5と、画像記憶手段1からマクロブロック単位に画素デ
ータを受け取り、これに対応する探索範囲に含まれる直
前画像の画素データを参照画像記憶手段5から参照した
マクロブロックに最も相似の範囲を探索し、その結果で
ある動きベクトルを参照画像記憶手段5に対して出力す
る動き検出手段6とを備えている。
As shown in FIG. 1, the present image encoding apparatus comprises:
An input image signal is received, stored as digital data in pixel units, and pixel data is output in macroblock units (corresponding to a “rectangular range” of the present invention) in a range of 16 × 16 pixels. Storage means 1 for
And pixel data output from the image storage means 1;
The motion compensation unit 2 receives pixel data of an image immediately before output from a reference image storage unit 5 described later, calculates difference data for each pixel, and outputs the difference data. Encoding means 3 for performing encoding for compression, outputting the result to the outside as a compressed stream, and outputting the encoded data to an image reproducing means 4 to be described later for internal reproduction;
Image reproducing means 4 for reproducing pixel data based on the coded data received from the image reproducing means 4; receiving a reproduced image from the image reproducing means 4;
And a reference image storage unit 5 for supplying necessary pixel data to the reference image storage unit 1. The pixel data is received from the image storage unit 1 in units of macroblocks, and the pixel data of the immediately preceding image included in the corresponding search range is stored in the reference image storage unit. And a motion detecting means 6 for searching a range most similar to the macroblock referred to from No. 5 and outputting a motion vector as a result to the reference image storing means 5.

【0030】上述した各手段1〜6の内部構成及び基本
的な動作を、図2〜7を参照して説明する。まず前記画
像記憶手段1は、図3に示すように、画像メモリ11と
遅延回路12を備える。外部入力である画像信号は、第
1フィールドと第2フィールドの2つのフィールドで構
成される走査線数525本のインターレース信号であ
り、画像記憶手段1では、この内の480本、詳しくは
第1フィールド及び第2フィールドからそれぞれ所定の
240本ずつの走査線に対し、各走査線から720個の
画素データを取り出して画像メモリ11に取り込む。画
素データは一画素あたり8ビットのデータであり、画像
の輝度を示すものである。
The internal structure and basic operation of each of the above-mentioned units 1 to 6 will be described with reference to FIGS. First, the image storage means 1 includes an image memory 11 and a delay circuit 12, as shown in FIG. The image signal, which is an external input, is an interlaced signal having 525 scanning lines composed of two fields, a first field and a second field. For predetermined 240 scanning lines respectively from the field and the second field, 720 pixel data are taken out from each scanning line and taken into the image memory 11. The pixel data is 8-bit data per pixel, and indicates the luminance of an image.

【0031】また、画像メモリ11は1フレームの画像
を取り込むことができる。画像メモリ11に読み込まれ
蓄積された画素データは、縦横16画素単位のマクロブ
ロック毎に並べ替えて読み出され、動き検出の対象とし
て、動き検出手段6に対して出力される。
The image memory 11 can take in one frame of image. The pixel data read and stored in the image memory 11 is rearranged and read for each macroblock in units of 16 pixels in length and width, and is output to the motion detection means 6 as a target of motion detection.

【0032】また、この画素データは遅延回路12でも
取り込まれ、ここで一定期間遅延させて動き補償用の基
画像として動き補償手段2に対して出力される。この遅
延期間は、動き検出手段6が動き検出用基画素データを
受け取ってから、動きベクトルを決定してその示す範囲
の画素データを動き補償手段2に出力するまでの期間に
相当している。
The pixel data is also captured by the delay circuit 12, where it is delayed for a certain period and output to the motion compensating means 2 as a base image for motion compensation. The delay period corresponds to a period from when the motion detecting unit 6 receives the basic pixel data for motion detection to when the motion vector is determined and the pixel data in the range indicated by the motion vector is output to the motion compensating unit 2.

【0033】前記動き補償手段2は、図3に示すように
減算回路21で構成されていて、画像記憶手段1から得
る動き補償用基画素データと、参照画像記憶手段5から
得られる動き補償用参照画素データを減算回路21に入
力し、動き補償用基画素データ(A)から動き補償用参
照画素データ(B)を減じた値(Y)を「画素差分デー
タ」として符号化手段3に出力する。なお、演算(Y=
A−B)は画素データ毎に行う。
The motion compensating means 2 comprises a subtraction circuit 21 as shown in FIG. 3, and includes motion compensation basic pixel data obtained from the image storing means 1 and motion compensating pixel data obtained from the reference image storing means 5. The reference pixel data is input to the subtraction circuit 21 and the value (Y) obtained by subtracting the motion compensation reference pixel data (B) from the motion compensation base pixel data (A) is output to the encoding unit 3 as “pixel difference data”. I do. Note that the operation (Y =
AB) is performed for each pixel data.

【0034】前記符号化手段3は、図4に示すように、
DCT変換回路31と、量子化回路32と、ランレング
ス符号化回路33と、ハフマン符号化回路34とを備え
ている。そして、動き補償手段2の出力する画素差分デ
ータをマクロブロック単位で取り込んで、DCT変換回
路31及び量子化回路32によるDCT変換及び量子化
を行ってデータ量の削減を行う。この量子化回路32か
らの出力は、内部での画像再生のために「係数データ」
として画像再生手段4に対して出力される。同時にこの
量子化回路32からの出力はランレングス符号化回路3
3及びハフマン符号化回路34を通して符号化され、
「圧縮ストリーム」として外部に対して出力される。
The encoding means 3, as shown in FIG.
A DCT transform circuit 31, a quantization circuit 32, a run-length encoding circuit 33, and a Huffman encoding circuit 34 are provided. Then, the pixel difference data output from the motion compensating means 2 is fetched in macroblock units, and the DCT conversion circuit 31 and the quantization circuit 32 perform DCT conversion and quantization to reduce the data amount. The output from the quantization circuit 32 is “coefficient data” for internal image reproduction.
Is output to the image reproducing means 4. At the same time, the output from the quantization circuit 32 is output to the run-length encoding circuit 3
3 and through the Huffman encoding circuit 34,
It is output to the outside as a “compressed stream”.

【0035】前記画像再生手段4は、図7に示すよう
に、逆量子化回路41とIDCT(逆DCT)変換回路
42とを備えている。入力として符号化手段3から取り
込まれた係数データは、逆量子化回路41にて逆量子化
され、さらにIDCT変換回路42においてIDCT変
換されて再生画素データが取り出される。画像再生手段
4からの出力はこの再生画素データであり、参照画像記
憶手段5に対して出力される。
As shown in FIG. 7, the image reproducing means 4 includes an inverse quantization circuit 41 and an IDCT (inverse DCT) conversion circuit 42. The coefficient data fetched from the encoding means 3 as an input is inversely quantized by an inverse quantization circuit 41, and further subjected to IDCT conversion by an IDCT conversion circuit 42 to obtain reproduced pixel data. The output from the image reproducing means 4 is this reproduced pixel data, which is output to the reference image storing means 5.

【0036】前記参照画像記憶手段5は、直前の画像を
参照のために保持している記憶手段であり、図8に示す
ように、参照メモリ51と、入力セレクタ52と、出力
セレクタ53及び出力セレクタ54を備えている。
画像再生手段4からの「再生画素データ」を入力セレク
タ52を介して取り込み、これを対応する参照メモリ5
1に書き込む。参照メモリ51は512キロバイトの容
量のメモリであって、[バンク1」及び[バンク2]の
2バンク構成になっており、どちらか一方のバンクに書
き込みが行える。各画素のメモリ上の配置は、図9にて
説明した画像メモリ11におけるメモリ上の配置に準じ
る。書き込まれていないバンクの画素データには直前の
画像の画素データが格納されており、出力はこちらから
行う。
The reference image storage means 5 is a storage means for holding the immediately preceding image for reference, and as shown in FIG. 8, a reference memory 51, an input selector 52, an output selector 53 and an output selector 53. A selector 54 is provided.
The “reproduced pixel data” from the image reproducing means 4 is fetched via the input selector 52, and is input to the corresponding reference memory 5.
Write to 1. The reference memory 51 is a memory having a capacity of 512 kilobytes and has a two-bank configuration of [bank 1] and [bank 2], and writing can be performed in one of the banks. The arrangement of each pixel on the memory conforms to the arrangement on the memory in the image memory 11 described with reference to FIG. The pixel data of the immediately preceding image is stored in the pixel data of the unwritten bank, and the output is performed from here.

【0037】参照画像記憶手段5からの出力としては、
出力セレクタ53を介して出力する「動き補償用参照
画素データ」と出力セレクタ54を介して出力する
「動き検出用参照画素データ」の2つがある。動き検出
用参照画素データは動き検出手段6の決定する順序で画
素データを出力する。また、動き補償用画素データは動
き検出手段6の出力である動きベクトルと基マクロブロ
ックの位置からアドレスを算出し、このマクロブロック
と同じ範囲の画素データを所定の順序で、すなわちマク
ロブロックの最上行を横方向に移動し、これを順次縦方
向の次の行にて繰り返す順序で行なう。
The output from the reference image storage means 5 is as follows:
There are two types, “motion compensation reference pixel data” output via the output selector 53 and “motion detection reference pixel data” output via the output selector 54. The reference pixel data for motion detection outputs pixel data in the order determined by the motion detection means 6. The motion compensation pixel data is calculated from the motion vector output from the motion detection means 6 and the address of the base macroblock, and the pixel data in the same range as the macroblock is determined in a predetermined order, that is, the top of the macroblock. Rows are moved in the horizontal direction, and this is sequentially repeated in the next row in the vertical direction.

【0038】前記動き検出手段6は、図7に示すよう
に、画像記憶手段1から出力される動き検出用基画素デ
ータを取り込み、この動き検出用基画素データを基準と
して、参照画像記憶手段5から直前画像の画素データを
動き検出用参照画素データとして読み出し、動き検出用
基画素データと相似の画素範囲を探索する。相似の判断
は、例えば各画素毎の差分値の絶対値和によって行う。
As shown in FIG. 7, the motion detecting means 6 fetches the motion detection base pixel data output from the image storage means 1 and uses the motion detection base pixel data as a reference to store the reference image storage means 5. , Pixel data of the immediately preceding image is read out as reference pixel data for motion detection, and a pixel range similar to the base pixel data for motion detection is searched. The similarity is determined, for example, by the sum of absolute values of the difference values for each pixel.

【0039】参照画面における探索範囲は、基本的に
は、基画素データのマクロブロックの画面上の位置を水
平方向及び垂直方向の座標形式(m,n)で示した場
合、図13でも示したように、上下に±i画素、左右に
±j画素分広げた範囲を探索範囲とする。つまり、矩形
範囲の角4点が、(m−i,n−j)、(m+i,n−
j)、(m−i,n+j)、(m+i,n+j)で定ま
る範囲である。
The search range on the reference screen is basically shown in FIG. 13 when the position of the macroblock of the basic pixel data on the screen is indicated in the horizontal and vertical coordinate formats (m, n). As described above, the range extended by ± i pixels vertically and ± j pixels horizontally is defined as the search range. That is, the four corners of the rectangular range are (mi, nj), (m + i, n-
j), (mi, n + j), and (m + i, n + j).

【0040】但し、このようにして設定した探索範囲
が、図13に示すように参照画面自体からはみ出してし
まう可能性もある。本実施形態においては、その場合に
は所定の補正処理を施して探索範囲を補正するのである
が、その詳細については後述することとして、構成の説
明を続ける。
However, there is a possibility that the search range set in this way may extend out of the reference screen itself as shown in FIG. In this embodiment, in this case, a predetermined correction process is performed to correct the search range. The details will be described later, and the description of the configuration will be continued.

【0041】この動き検出手段6の内部構成としては、
図7に示すように基画素メモリ61と動きベクトル算出
回路62とを備えており、まず画像記憶手段1から出力
される「動き検出用基画素データ」が、マクロブロック
範囲毎に順に基画素メモリ61に格納される。動きベク
トル算出回路62は、参照画像記憶手段5に格納されて
いる直前の画像から「動き検出用参照画素データ」を読
み出し、これを動きベクトル算出回路62で基画素メモ
リ61の画素データと比較していき、最も相似な範囲へ
のベクトルを動きベクトルとして求める。そして、この
「動きベクトル」は参照画像記憶手段5へ出力される。
The internal structure of the motion detecting means 6 is as follows.
As shown in FIG. 7, a basic pixel memory 61 and a motion vector calculating circuit 62 are provided. First, “motion detecting basic pixel data” output from the image storage unit 1 is sequentially stored in the basic pixel memory for each macroblock range. 61 is stored. The motion vector calculation circuit 62 reads “motion detection reference pixel data” from the immediately preceding image stored in the reference image storage unit 5, and compares this with the pixel data of the base pixel memory 61 by the motion vector calculation circuit 62. Then, a vector to the most similar range is obtained as a motion vector. Then, the “motion vector” is output to the reference image storage unit 5.

【0042】以上が各手段1〜6の内部構成及び基本的
な動作の説明であったが、本発明の特徴は、動きベクト
ルを算出するため基画素データのマクロブロックの画面
上の位置(m,n)に基づいて探索範囲を設定する場合
に、参照画面からはみ出ないような探索範囲にすること
にある。それは、具体的な動作として動き検出手段6の
動きベクトル算出回路62での探索範囲の決定にかかる
処理動作を参照すれば理解し易いので、その処理内容を
図8に示すフローチャートに従って説明する。なお、こ
の意味で、動きベクトル算出回路62が「探索範囲決定
手段」及び「探索範囲補正手段」にも相当することとな
る。
The above is a description of the internal structure and basic operation of each of the means 1 to 6. The feature of the present invention is that the position (m) of the macroblock of the base pixel data on the screen for calculating the motion vector is calculated. , N), the search range is set so as not to protrude from the reference screen. This can be easily understood by referring to the processing operation related to the determination of the search range in the motion vector calculation circuit 62 of the motion detection means 6 as a specific operation, and the processing will be described with reference to the flowchart shown in FIG. In this sense, the motion vector calculation circuit 62 also corresponds to “search range determination means” and “search range correction means”.

【0043】図8のフローチャートは、画像記憶手段1
から出力される「動き検出用基画素データ」毎に行われ
る。最初のステップS10では、予測したい画像ブロッ
クの位置である動き検出用基画素データの位置(m,
n)を認識する。続くS20では、S10で認識した予
測したい画像ブロック位置(m、n)に基づいて参照画
面における探索範囲を仮設定する。この仮設定される探
索範囲は、予測したい画像ブロック位置(m、n)に対
して、上下に±i画素、左右に±j画素分広げた範囲で
ある。つまり、矩形範囲の角4点が、(m−i,n−
j)、(m+i,n−j)、(m−i,n+j)、(m
+i,n+j)で定まる範囲である。
The flowchart of FIG.
This is performed for each "motion-detection base pixel data" output from the. In the first step S10, the position of the motion detection base pixel data (m,
n). At S20, a search range on the reference screen is provisionally set based on the image block position (m, n) to be predicted recognized at S10. The temporarily set search range is a range extended by ± i pixels vertically and ± j pixels horizontally from the image block position (m, n) to be predicted. That is, the four corners of the rectangular range are (mi, n-
j), (m + i, n-j), (mi, n + j), (m
+ I, n + j).

【0044】続くS30では、このS20にて仮設定さ
れた探索範囲が参照画面内に収まるかどうかを判断す
る。具体的には、水平方向(m方向)における参照画面
の最大値mmax と(m+i)の比較及び最小値mmin と
(m−i)の比較、垂直方向(n方向)における参照画
面の最大値nmax と(n+j)の比較及び最小値nmin
と(n−j)の比較によって行なう。
In subsequent S30, it is determined whether the search range provisionally set in S20 falls within the reference screen. Specifically, comparison of the maximum value mmax of the reference screen in the horizontal direction (m direction) with (m + i), comparison of the minimum value mmin with (mi), maximum value nmax of the reference screen in the vertical direction (n direction) And (n + j) and minimum value nmin
And (n-j).

【0045】そして、S20にて仮設定した探索範囲が
参照画面内に収まる場合は(S30:YES)、S40
にて、S20で仮設定した探索範囲を最終的な探索範囲
として決定して本処理ルーチンを終了する。一方、S2
0にて仮設定した探索範囲が参照画面内に収まらない場
合は(S30:NO)、S50へ移行して、参照画面内
に収まるように探索範囲を補正し、S60では、その補
正した探索範囲を最終的な探索範囲として決定して本処
理ルーチンを終了する。このようにS40あるいはS6
0にて決定された探索範囲に対して所定の動き検出のた
めの探索を行なう。
If the search range temporarily set in S20 falls within the reference screen (S30: YES), the process proceeds to S40.
At S20, the search range provisionally set in S20 is determined as the final search range, and the present processing routine ends. On the other hand, S2
If the search range temporarily set at 0 is not within the reference screen (S30: NO), the process proceeds to S50, where the search range is corrected so as to be within the reference screen, and at S60, the corrected search range is set. Is determined as the final search range, and this processing routine ends. Thus, S40 or S6
A search for predetermined motion detection is performed in the search range determined at 0.

【0046】ここで、S50における探索範囲の補正に
ついて説明する。図9に示すように、仮設定した探索範
囲が破線で示すように水平方向(m成分)のマイナス側
にkだけはみ出した場合には、図9中にで示す範囲、
つまり(m−i,n−j)、(m−i+k,n−j)、
(m−i+k,n+j)、(m−i,n+j)で定まる
矩形範囲が参照画面からはみ出してしまう。したがっ
て、この場合の補正は、図9中の範囲と同じ形状の範
囲を、仮設定した探索範囲の水平方向(m成分)のプ
ラス側に付け足す補正を行なう。そのため、最終的な探
索範囲は、図9中に太枠で示すように、(m−i+k,
n−j)、(m+i+k,n−j)、(m+i+k,n
+j)、(m−i+k,n+j)の4点で定まる矩形範
囲となる。これは、仮設定した探索範囲と同じ形状で同
じ面積となる。
Here, the correction of the search range in S50 will be described. As shown in FIG. 9, when the temporarily set search range protrudes by k on the negative side in the horizontal direction (m component) as shown by a broken line, the range shown in FIG.
That is, (mi, nj), (mi + k, nj),
A rectangular range defined by (mi + k, n + j) and (mi, n + j) protrudes from the reference screen. Therefore, the correction in this case is performed by adding a range having the same shape as the range in FIG. 9 to the plus side in the horizontal direction (m component) of the temporarily set search range. Therefore, the final search range is (m−i + k,
n−j), (m + i + k, n−j), (m + i + k, n)
+ J) and (mi-k, n + j). This has the same shape and the same area as the temporarily set search range.

【0047】もちろん、図9に示したのは仮設定した探
索範囲が参照画面からはみ出す一例として、水平方向
(m成分)のマイナス側にはみ出した場合を説明した
が、同じ水平方向(m成分)でもプラス側にはみ出す場
合、つまり(m+i)がmmax よりも大きくなる場合も
ある。また、垂直方向(n成分)でも同様にプラス・マ
イナス両方向にはみ出す場合が考えられる。そして、こ
れらについては、図9で説明したのと同様の補正、つま
りマイナス側にはみ出していれば、はみ出した範囲
(図9参照)と同形状(つまり同面積でもある)の範囲
(図9参照)をプラス側に付け足せばよく、プラス側
にはみ出していれば、逆にマイナス側に付け足せばよ
い。
Of course, FIG. 9 shows an example in which the provisionally set search range protrudes from the reference screen and protrudes to the negative side in the horizontal direction (m component). However, there is a case where it protrudes to the plus side, that is, (m + i) becomes larger than mmax. Similarly, there may be a case where the projection extends in both the plus and minus directions in the vertical direction (n component). These are corrected in the same manner as described with reference to FIG. 9, that is, if they protrude to the minus side, they have the same shape (that is, the same area) as the protruding range (see FIG. 9) (see FIG. 9). ) May be added to the plus side, and if it protrudes to the plus side, it may be added to the minus side.

【0048】また、図10に示すように、水平方向(m
成分)と垂直方向(n成分)の両方に同時にはみ出す場
合も考えられるが、この場合も同様に、はみ出した範囲
と同形状の範囲を参照画面内側に付け足せばよい。
具体的には、水平方向(m成分)にマイナス側にkだけ
はみ出し、垂直方向(n成分)にはプラス側にlだけは
み出した場合を考えると、補正後の探索範囲は、(m−
i+k,n−j−l)、(m+i+k,n−j−l)、
(m+i+k,n+j−l)、(m−i+k,n+j−
l)の4点で定まる矩形範囲となる。当然ながら、これ
は仮設定した探索範囲と同じ形状で同じ面積となる。
As shown in FIG. 10, the horizontal direction (m
Component and the vertical direction (n-component) may be simultaneously projected. In this case, however, a range having the same shape as the extended range may be added to the inside of the reference screen.
Specifically, considering a case in which the image protrudes by k on the negative side in the horizontal direction (m component) and protrudes by 1 on the positive side in the vertical direction (n component), the search range after correction is (m−
i + k, n-j-l), (m + i + k, n-j-l),
(M + i + k, n + j-l), (mi-k, n + j-
1) The rectangular range is determined by the four points. As a matter of course, this has the same shape and the same area as the provisionally set search range.

【0049】このように、本実施形態の画像符号化装置
によれば、動きベクトルを検出する際、予測したい画像
ブロックの位置(m,n)に基づいて仮設定した探索範
囲が参照画面内に収まらない場合には、その収まらない
探索範囲分を、参照画面内であり且つ参照画面内に元々
収まっている探索範囲分に付加し、最終的な探索範囲と
する補正を行なう。したがって、その探索能力を有効に
活用することができ、動き補償予測の効率を向上させる
こととなる。これは、高画質で高圧縮率の画像符号化に
おいては動き検出能力のより優れたものが求められる点
を考えると、非常に効果的である。
As described above, according to the image coding apparatus of the present embodiment, when detecting a motion vector, the search range temporarily set based on the position (m, n) of the image block to be predicted is included in the reference screen. If the search range does not fit, the search range that does not fit is added to the search range within the reference screen and originally within the reference screen, and correction is performed to make the final search range. Therefore, the search ability can be effectively used, and the efficiency of motion compensation prediction is improved. This is very effective in consideration of the fact that image coding with high image quality and high compression rate requires better motion detection capability.

【0050】以上、本発明はこのような実施例に何等限
定されるものではなく、本発明の主旨を逸脱しない範囲
において種々なる形態で実施し得る。例えば、上記実施
形態では、図8のS50での探索範囲の補正として、参
照画面内に収まらない探索範囲分を、同じ形状のままで
参照画面内に元々収まっている探索範囲分に付加し、S
20にて仮設定した探索範囲と同じ形状を確保して最終
的な探索範囲としているが、参照画面内に収まらない探
索範囲分を、同じ面積であるが形状を変えて参照画面内
に元々収まっている探索範囲分に付加し、最終的な探索
範囲とすることもできる。例えば、図11に示すよう
に、水平方向(m成分)にはみ出している場合(範囲
参照)に、垂直方向(n成分)側に付け足すこともでき
る(範囲,参照)。但し、この場合には、範囲+
範囲の面積が範囲の面積と同じになるように調整す
る必要はある。
As described above, the present invention is not limited to the above embodiments, and can be implemented in various forms without departing from the gist of the present invention. For example, in the above embodiment, as the correction of the search range in S50 of FIG. 8, the search range that does not fit in the reference screen is added to the search range that originally fits in the reference screen with the same shape, S
Although the same shape as the search range provisionally set in 20 is secured as the final search range, the search range that does not fit in the reference screen originally fits in the reference screen with the same area but a different shape. The final search range can be added to the search range. For example, as shown in FIG. 11, in the case where the image protrudes in the horizontal direction (m component) (see range), it can be added to the vertical direction (n component) side (range, see). However, in this case, the range +
It is necessary to adjust the area of the range to be the same as the area of the range.

【0051】上記実施形態のように、参照画面内に収ま
らない探索範囲分を同じ形状のままで付加する場合も当
然ながら面積は変わらない。つまり、どのような手法を
採っても、補正後の探索範囲が補正前、つまり仮設定し
た探索範囲と同じ面積であれば、一応その探索能力は同
じに保たれると考えられる。したがって、このように同
じ面積になるように補正することが好ましいと言える。
As in the above embodiment, even when a search range that does not fit in the reference screen is added with the same shape, the area does not change. That is, no matter what method is used, if the search range after the correction is the same as the area before the correction, that is, the same area as the temporarily set search range, it is considered that the search capability is kept the same for the time being. Therefore, it can be said that it is preferable to perform the correction so as to have the same area.

【0052】但し、前者のように、参照画面内に収まら
ない探索範囲分を同じ形状のままで付加すると、補正後
の探索範囲が仮設定された探索範囲と同じ形状でもある
ので、探索能力の向上の点からはより好ましい場合が多
いと考えられる。また、上記実施形態においては、DC
T変換回路31と量子化回路32によって変換符号化手
段を構成したが、例えばDCT変換回路31のみでも構
わない。但し量子化回路32で量子化することによって
圧縮効果は高まるので、DCT変換回路31とセットで
用いる方が好ましい。また、DCT変換回路31は、直
交変換手段の一例であるが、直交変換としてはDCT
(離散コサイン変換)の他の直交変換、例えば離散フー
リエ変換(DFT)等を採用してもよい。
However, as in the former case, if a search range that does not fit in the reference screen is added with the same shape, the search range after correction has the same shape as the temporarily set search range. It is considered that it is often more preferable from the viewpoint of improvement. In the above embodiment, DC
Although the transform coding means is constituted by the T transform circuit 31 and the quantization circuit 32, for example, only the DCT transform circuit 31 may be used. However, since the compression effect is enhanced by the quantization by the quantization circuit 32, it is preferable to use the DCT conversion circuit 31 as a set. The DCT transform circuit 31 is an example of the orthogonal transform means.
Other orthogonal transforms (discrete cosine transform), for example, a discrete Fourier transform (DFT) may be adopted.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の一実施形態である画像圧縮用の画像
符号化装置のブロック図である。
FIG. 1 is a block diagram of an image encoding apparatus for image compression according to an embodiment of the present invention.

【図2】 実施形態における画像記憶手段の構成図であ
る。
FIG. 2 is a configuration diagram of an image storage unit according to the embodiment.

【図3】 実施形態における動き補償手段の構成図であ
る。
FIG. 3 is a configuration diagram of a motion compensation unit in the embodiment.

【図4】 実施形態における符号化手段の構成図であ
る。
FIG. 4 is a configuration diagram of an encoding unit in the embodiment.

【図5】 実施形態における画像再生手段の構成図であ
る。
FIG. 5 is a configuration diagram of an image reproducing unit according to the embodiment.

【図6】 実施形態における参照画像記憶手段の構成図
である。
FIG. 6 is a configuration diagram of a reference image storage unit in the embodiment.

【図7】 実施形態における動き検出手段の構成図であ
る。
FIG. 7 is a configuration diagram of a motion detection unit in the embodiment.

【図8】 動き検出手段における探索範囲決定処理を示
すフローチャートである。
FIG. 8 is a flowchart showing a search range determining process in the motion detecting means.

【図9】 予測する入力画面の画像ブロック位置が画面
の端の方にあった場合の探索範囲補正を示す説明図であ
る。
FIG. 9 is an explanatory diagram showing search range correction when an image block position of an input screen to be predicted is located at an end of the screen.

【図10】 予測する入力画面の画像ブロック位置が画
面の端の方にあり、水平・垂直方向共にはみ出している
場合の探索範囲補正を示す説明図である。
FIG. 10 is an explanatory diagram showing search range correction when an image block position of an input screen to be predicted is located at an edge of the screen and protrudes in both the horizontal and vertical directions.

【図11】 予測する入力画面の画像ブロック位置が画
面の端の方にあった場合の探索範囲補正の別方法を示す
説明図である。
FIG. 11 is an explanatory diagram showing another method of search range correction when an image block position of an input screen to be predicted is located at an end of the screen.

【図12】 予測する入力画面の画像ブロック位置に対
する参照画面における探索範囲を示す説明図である。
FIG. 12 is an explanatory diagram showing a search range on a reference screen with respect to an image block position of an input screen to be predicted.

【図13】 予測する入力画面の画像ブロック位置が画
面の端の方にあった場合の従来の探索範囲を示す説明図
である。
FIG. 13 is an explanatory diagram showing a conventional search range when an image block position of an input screen to be predicted is located at an end of the screen.

【符号の説明】[Explanation of symbols]

1…画像記憶手段 2…動き補償手段 3…符号化手段 4…画像再生手段 5…参照画像記憶手段 6…動き検出手段 10…画像メモリ 11…遅延回路 21…演算回路 31…DCT変換回
路 32…量子化回路 33…ランレングス
符号化回路 34…ハフマン符号化回路 41…逆量子化回路 42…IDCT変換回路 51…参照メモリ 52…入力セレクタ 53…出力セレクタ
54…出力セレクタ 61…基画素メモリ 62…動きベクトル算出回路
DESCRIPTION OF SYMBOLS 1 ... Image storage means 2 ... Motion compensation means 3 ... Encoding means 4 ... Image reproduction means 5 ... Reference image storage means 6 ... Motion detection means 10 ... Image memory 11 ... Delay circuit 21 ... Operation circuit 31 ... DCT conversion circuit 32 ... Quantizer 33 Run-length encoder 34 Huffman encoder 41 Inverse quantizer 42 IDCT converter 51 Reference memory 52 Input selector 53 Output selector 54 Output selector 61 Base pixel memory 62 Motion vector calculation circuit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 動き補償予測符号化に用いられ、参照画
面の所定の探索範囲を探索し、入力画面における予測し
たい画像ブロックと最も相似の範囲を特定することによ
り、その位置を動きベクトルとして検出する動きベクト
ル検出装置であって、 前記参照画面における探索範囲を、前記入力画面の予測
したい画像ブロック位置に対応する参照画面中の位置に
基づき、所定の条件にしたがって決定する探索範囲決定
手段と、 その探索範囲決定手段によって決定された探索範囲が前
記参照画面内に収まらない場合には、その収まらない探
索範囲分を、前記参照画面内であり且つ前記参照画面内
に元々収まっている探索範囲分に付加し、最終的な探索
範囲とする探索範囲補正手段と、 を備えていることを特徴とする動きベクトル検出装置。
1. A method for detecting a predetermined search range on a reference screen, specifying a range most similar to an image block to be predicted on an input screen, and detecting the position as a motion vector. A search range determining means for determining a search range in the reference screen based on a position in the reference screen corresponding to an image block position to be predicted in the input screen, according to a predetermined condition; If the search range determined by the search range determination means does not fit within the reference screen, the search range that does not fit is replaced by the search range that is within the reference screen and originally fits within the reference screen. And a search range correcting means for adding a final search range to the search range.
【請求項2】 前記探索範囲補正手段は、前記参照画面
内に収まらない探索範囲分を、同じ形状のままで前記参
照画面内に元々収まっている探索範囲分に付加し、前記
探索範囲決定手段によって決定された探索範囲と同じ形
状を確保して最終的な探索範囲とすることを特徴とする
請求項1に記載の動きベクトル検出装置。
2. The search range correction unit adds a search range that does not fit in the reference screen to a search range that originally fits in the reference screen while keeping the same shape. 2. The motion vector detecting device according to claim 1, wherein the same shape as the search range determined by the above is secured as a final search range.
【請求項3】 前記探索範囲補正手段は、前記参照画面
内に収まらない探索範囲分を、同じ面積であるが形状を
変えて前記参照画面内に元々収まっている探索範囲分に
付加し、最終的な探索範囲とすることを特徴とする請求
項1に記載の動きベクトル検出装置。
3. The search range correction means adds a search range that does not fit in the reference screen to a search range originally having the same area but changing shape and that fits in the reference screen. The motion vector detecting device according to claim 1, wherein the motion vector is set as a general search range.
【請求項4】 入力された画像信号を画素の集合として
形成される矩形範囲の画素データに変換し、少なくとも
動き補償を行って圧縮したデジタルデータとして出力可
能な画像符号化装置であって、 少なくとも前記矩形範囲に含まれる画素データを一時的
に蓄積する画像記憶手段と、 動き補償のために参照される画像データを少なくとも1
画面分保持する参照画像記憶手段と、 前記画像記憶手段及び参照画像記憶手段に接続されてお
り、所定の範囲の画像データを前記参照画像記憶手段か
ら取り出し、前記画像記憶手段に蓄積されている画素デ
ータと比較して、画素毎の差分値を算出し、画素差分デ
ータとして出力する動き補償手段と、 前記動き補償手段から出力された画素差分データの符号
化を行い、出力データを生成する符号化手段と、 前記符号化手段に接続されており、参照用の画像を再生
して参照画像記憶手段に蓄積させる画像再生手段と、 前記画像記憶手段及び参照画像記憶手段に接続されてお
り、参照画像記憶手段に蓄積されている画像データを探
索して、前記画像記憶手段から得られる画素データと最
も相似の範囲を特定し、この位置を動きベクトルとして
前記参照画像記憶手段に出力する動き検出手段とを備
え、 前記動き検出手段が、前記請求項1〜3のいずれかに記
載の動きベクトル検出装置として構成されていることを
特徴とする画像符号化装置。
4. An image coding apparatus capable of converting an input image signal into pixel data in a rectangular range formed as a set of pixels, and outputting the digital data as compressed digital data after at least performing motion compensation. Image storage means for temporarily storing pixel data included in the rectangular range; and at least one image data referred to for motion compensation.
A reference image storage unit for holding a screen, and a pixel which is connected to the image storage unit and the reference image storage unit, extracts image data of a predetermined range from the reference image storage unit, and stores the pixel data in the image storage unit. A motion compensation unit that calculates a difference value for each pixel in comparison with the data and outputs the pixel difference data as pixel difference data; and an encoding unit that encodes the pixel difference data output from the motion compensation unit and generates output data. Means, connected to the encoding means, an image reproducing means for reproducing an image for reference and storing it in the reference image storage means; and a reference image connected to the image storage means and the reference image storage means. The image data stored in the storage means is searched, and a range most similar to the pixel data obtained from the image storage means is specified. An image encoding device, comprising: a motion detection unit that outputs to a reference image storage unit, wherein the motion detection unit is configured as the motion vector detection device according to claim 1. .
【請求項5】 前記符号化手段は、前記動き補償手段か
ら出力された画素差分データに対して変換符号化を施し
て出力する変換符号化手段と、前記変換符号化手段から
出力された変換符号化データを可変長のコードに変換し
て出力する可変長符号化手段とを備え、 前記画像再生手段は、前記変換符号化手段からの出力に
対し逆変換を施して再生画素データを作成する逆変換符
号化手段を備えていることを特徴とする請求項4に記載
の画像符号化装置。
5. The transform encoding means for transform-encoding the pixel difference data output from the motion compensation means and outputting the result, and the transform code output from the transform encoding means. Variable-length encoding means for converting the encoded data into a variable-length code and outputting the converted data, wherein the image reproducing means performs inverse transform on the output from the transform encoding means to generate reproduced pixel data. The image encoding device according to claim 4, further comprising a transform encoding unit.
JP5530297A 1997-03-10 1997-03-10 Motion vector detector and image encoder provided with the same Pending JPH10257493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5530297A JPH10257493A (en) 1997-03-10 1997-03-10 Motion vector detector and image encoder provided with the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5530297A JPH10257493A (en) 1997-03-10 1997-03-10 Motion vector detector and image encoder provided with the same

Publications (1)

Publication Number Publication Date
JPH10257493A true JPH10257493A (en) 1998-09-25

Family

ID=12994786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5530297A Pending JPH10257493A (en) 1997-03-10 1997-03-10 Motion vector detector and image encoder provided with the same

Country Status (1)

Country Link
JP (1) JPH10257493A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000036841A1 (en) * 1998-12-15 2000-06-22 Matsushita Electric Industrial Co., Ltd. Method and apparatus for image processing
JP2008250794A (en) * 2007-03-30 2008-10-16 Casio Comput Co Ltd Image processing device and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000036841A1 (en) * 1998-12-15 2000-06-22 Matsushita Electric Industrial Co., Ltd. Method and apparatus for image processing
US6791625B1 (en) 1998-12-15 2004-09-14 Matsushita Electric Industrial Co., Ltd. Video processing apparatus for performing address generation and control, and method therefor
JP2008250794A (en) * 2007-03-30 2008-10-16 Casio Comput Co Ltd Image processing device and program

Similar Documents

Publication Publication Date Title
US5398078A (en) Method of detecting a motion vector in an image coding apparatus
US6985635B2 (en) System and method for providing a single-layer video encoded bitstreams suitable for reduced-complexity decoding
US5506621A (en) Image processing method and apparatus
JP3097665B2 (en) Time-lapse recorder with anomaly detection function
US5991445A (en) Image processing apparatus
US5703649A (en) Digital video signal coding apparatus and method, and coded video signal decoding apparatus and method
US6909750B2 (en) Detection and proper interpolation of interlaced moving areas for MPEG decoding with embedded resizing
KR100272120B1 (en) Quantization control circuit
KR20030086330A (en) Image processing device, image processing method, image processing program, and recording medium
US20060280243A1 (en) Image coding apparatus and image coding program
JPH05115010A (en) Picture decoder
US6473465B1 (en) Method and apparatus for video coding at high efficiency
JP2001309384A (en) Picture compressor
JPH11308617A (en) Digital image coder and motion vector detector used therefor
JPH10257493A (en) Motion vector detector and image encoder provided with the same
JP2824222B2 (en) Video data compensation method and compensation device
US6064696A (en) Encoding apparatus
JP2740746B2 (en) Video compression device
US6266448B1 (en) Method of and apparatus for compressing and encoding digitized moving picture signals
JPH11239350A (en) Motion vector detection method for moving image signal and motion vector detection circuit in inter-frame encoding device
JPH10126789A (en) Encoder
KR100210124B1 (en) Data deformatting circuit of picture encoder
JP3356337B2 (en) Image processing apparatus and image processing method
US7260315B2 (en) Signal processing apparatus
JP2629997B2 (en) Motion compensated interframe coding device