JP2007195209A - Video encoding apparatus and method - Google Patents

Video encoding apparatus and method Download PDF

Info

Publication number
JP2007195209A
JP2007195209A JP2007038684A JP2007038684A JP2007195209A JP 2007195209 A JP2007195209 A JP 2007195209A JP 2007038684 A JP2007038684 A JP 2007038684A JP 2007038684 A JP2007038684 A JP 2007038684A JP 2007195209 A JP2007195209 A JP 2007195209A
Authority
JP
Japan
Prior art keywords
encoding
circuit
alpha map
image
line
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.)
Abandoned
Application number
JP2007038684A
Other languages
Japanese (ja)
Inventor
Noboru Yamaguchi
昇 山口
Takashi Ida
孝 井田
Toshiaki Watanabe
敏明 渡邊
Naoaki Kuratate
尚明 倉立
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2007038684A priority Critical patent/JP2007195209A/en
Publication of JP2007195209A publication Critical patent/JP2007195209A/en
Abandoned legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a video encoding method and an apparatus for efficiently encoding the shape information of an object. <P>SOLUTION: A video encoding apparatus is provided with: a resolution converting section 210 for enlarging or reducing a binary picture 20 to provide an output of a binary picture 21 whose resolution is converted; an encoding section 220 for encoding the binary picture 21 whose resolution is converted; a control section for controlling a generated encoding amount of the encoding section 220 by changing an enlargement/reduction rate of the resolution converting section 210 by each small region; and a multiplexer section 240 for multiplexing encoded data of the binary picture and codes the denoting information 60 of the reduction rate. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像信号を高能率に符号化し、伝送・蓄積するための画像符号化方法及び装置に関する。   The present invention relates to an image encoding method and apparatus for encoding an image signal with high efficiency and transmitting / accumulating it.

画像信号は膨大な情報量を持つため、伝送や蓄積に供する場合には圧縮符号化するのが一般的である。画像信号を高能率に符号化するには、フレーム単位の画像を、所要画素数単位でブロック分けし、その各ブロック毎に直交変換して画像の持つ空間周波数を各周波数成分に分離し、変換係数として取得してこれを符号化する。   Since an image signal has an enormous amount of information, it is generally compressed and encoded when used for transmission or storage. In order to encode an image signal with high efficiency, a frame-by-frame image is divided into blocks in units of the required number of pixels, and each block is orthogonally transformed to separate the spatial frequency of the image into each frequency component and transform Obtained as a coefficient and encoded it.

ところで、画像符号化の一つとして、『J.Y.A. Wang et al. “Applying Mid-level Vision Techniques for Video Data Compression and Manipulation”, M. I. T. Media Lab. Tech. Report No.263, Feb.1994, 』において、ミッドレベル符号化と呼ばれる範疇に属する画像符号化法が提案されている。   By the way, as one of the image coding, “JYA Wang et al.“ Applying Mid-level Vision Techniques for Video Data Compression and Manipulation ”, MIT Media Lab. Tech. Report No.263, Feb.1994,” An image coding method belonging to a category called level coding has been proposed.

この方式では、例えば、図31(a)のような背景と被写体(以後、オブジェクトと呼ぶ)からなる画像があったとして、この背景とオブジェクトを図28(b),(c)のように分けて符号化している。   In this method, for example, if there is an image composed of a background and a subject (hereinafter referred to as an object) as shown in FIG. 31A, the background and the object are divided as shown in FIGS. 28B and 28C. Are encoded.

このように、背景(図31(c))やオブジェクト(図31(b))を別々に符号化するためには、オブジェクトの形状や画面内の位置を表す副画像情報であるアルファマップ信号(図31(d)白画素がオブジェクトの画素を示す)が必要となる。なお、背景のアルファマップ信号(図31(e))は、オブジェクトのアルファマップ信号から一意に求められる。   As described above, in order to separately encode the background (FIG. 31C) and the object (FIG. 31B), an alpha map signal (sub-image information representing the shape of the object and the position in the screen) ( FIG. 31 (d) white pixels indicate object pixels). The background alpha map signal (FIG. 31E) is uniquely obtained from the alpha map signal of the object.

ところで、このアルファマップ信号を効率的に符号化する方法として、2値画像の符号化法(例えば、MMR(Modified Modified READ)符号化等)や、線図形の符号化法(チェイン符号化等)が用いられている。   By the way, as a method of efficiently encoding the alpha map signal, a binary image encoding method (for example, MMR (Modified Modified READ) encoding) or a line figure encoding method (chain encoding or the like) is used. Is used.

また、更にアルファマップの符号量を低減するために、形状の輪郭線をポリゴン近似してスプライン曲線でスムーシングする方法(J. Ostermann, “Object-based analysis-synthesis coding based on the source model of moving rigid 3D objects”, Signal Process.: Image Comm.Vol.6 No.2 pp.143-161, 1994)や、アルファマップを縮小して符号化し、拡大する際に曲線近似する方法(特開平07−152915号公報参照)などがある。
J.Y.A. Wang et al. “Applying Mid-level Vision Techniques for Video Data Compression and Manipulation”, M. I. T. Media Lab. Tech. Report No.263, Feb.1994. J. Ostermann, “Object-based analysis-synthesis coding based on the source model of moving rigid 3D objects”, Signal Process.: Image Comm.Vol.6 No.2 pp.143-161, 1994. 特開平07−152915号公報
Furthermore, in order to further reduce the amount of alpha map code, J. Ostermann, “Object-based analysis-synthesis coding based on the source model of moving rigid” 3D objects ”, Signal Process .: Image Comm. Vol.6 No.2 pp.143-161, 1994) and a method of approximating a curve when reducing and encoding an alpha map (Japanese Patent Laid-Open No. 07-152915). For example).
JYA Wang et al. “Applying Mid-level Vision Techniques for Video Data Compression and Manipulation”, MIT Media Lab. Tech. Report No.263, Feb.1994. J. Ostermann, “Object-based analysis-synthesis coding based on the source model of moving rigid 3D objects”, Signal Process .: Image Comm.Vol.6 No.2 pp.143-161, 1994. Japanese Patent Laid-Open No. 07-152915

画像を符号化する場合に、画面内を背景とオブジェクトに分割して符号化する方式があるが、この場合、背景とオブジェクトを分けるために、オブジェクトの形状や画面内の位置を表すアルファマップ信号が必要となる。そして、画像の符号化情報と共に、このアルファマップの情報も符号化してビットストリーム化し、伝送や蓄積に供する。   When encoding an image, there is a method that divides the inside of the screen into a background and an object, and in this case, in order to separate the background and the object, an alpha map signal indicating the shape of the object and the position in the screen is used. Is required. The information of the alpha map as well as the encoded information of the image is also encoded to form a bit stream for transmission and storage.

しかし、画面内を背景とオブジェクトに分割して符号化する方式の場合、従来の符号化法のように画面内を一括して符号化するのに比べ、アルファマップがある分、符号量増加が問題となり、このアルファマップの符号量増加による符号化効率の低下が問題となる。   However, in the method of encoding by dividing the inside of the screen into the background and the object, the amount of code increases by the amount of alpha map compared to the case of encoding in the screen all at once as in the conventional encoding method. There is a problem, and a decrease in encoding efficiency due to an increase in the code amount of the alpha map becomes a problem.

そこでこの発明の目的とするところは、オブジェクトの形状や画面内の位置などを表す副画像情報であるアルファマップの情報を効率良く符号化できるとともに、その復号を行うことができるようにした画像符号化装置および画像復号化装置を提供することにある。   Accordingly, an object of the present invention is to efficiently encode the information of the alpha map, which is sub-image information representing the shape of the object, the position in the screen, and the like, and an image code that can be decoded. It is to provide an encoding device and an image decoding device.

本発明は、上記目的を達成するため、2値画像を拡大・縮小する解像度変換手段と、縮小された2値画像を符号化する手段と、解像度変換手段の拡大・縮小率を符号化して上記2値画像の符号化データと併せて伝送する手段を有し、解像度変換手段の拡大縮小率を変えることで、符号化手段の発生符号量を制御する構成とする。   In order to achieve the above object, the present invention encodes the resolution conversion means for enlarging / reducing a binary image, the means for encoding the reduced binary image, and the enlargement / reduction ratio of the resolution conversion means, It has a means for transmitting together with the encoded data of the binary image, and the generated code amount of the encoding means is controlled by changing the enlargement / reduction ratio of the resolution conversion means.

また、本発明は、上記目的を達成するため、画像をその画像のオブジェクト領域と背景領域に区別するための副画像情報であるアルファマップと共に符号化して出力するようにした画像符号化装置において、前記アルファマップを解像度変換して縮小する解像度変換手段と、縮小されたアルファマップを符号化する手段と、前記解像度変換手段の縮小率を符号化して前記縮小されたアルファマップの符号化データと併せて伝送する手段を有し、解像度変換手段の縮小率を変えることで、符号化手段の発生符号量を制御する構成とすることを特徴とする。   In order to achieve the above object, the present invention provides an image encoding apparatus that encodes and outputs an image together with an alpha map that is sub-image information for distinguishing an image from an object area and a background area. Combined with resolution conversion means for reducing the resolution by converting the alpha map, means for encoding the reduced alpha map, and encoded data of the reduced alpha map by encoding the reduction rate of the resolution conversion means. Transmission means, and the generated code amount of the encoding means is controlled by changing the reduction rate of the resolution converting means.

また、本発明は、上記目的を達成するため、MMR(Modified Modified READ)符号化で用いられる2次元符号化において、垂直モードが適用される範囲を変える手段と、拡大した垂直モードの範囲に応じて、符号表を拡張する手段を有し、垂直モードが適用される範囲を表す情報を、上記2次元符号化データと併せて伝送することを特徴とする。   In order to achieve the above object, the present invention provides means for changing the range in which the vertical mode is applied in the two-dimensional encoding used in MMR (Modified Modified READ) encoding, and the expanded vertical mode range. And a means for extending the code table, wherein information representing a range to which the vertical mode is applied is transmitted together with the two-dimensional encoded data.

また、本発明は、上記目的を達成するため、画面内のオブジェクトを含む小領域を設定する手段と、小領域内のアルファマップ信号を符号化する手段を有し、画面内における小領域の位置および大きさの情報を、上記アルファマップ信号の符号化データと併せて伝送する手段を有する構成の2値画像符号化装置とする。   In order to achieve the above object, the present invention has means for setting a small region including an object in the screen and means for encoding an alpha map signal in the small region, and the position of the small region in the screen. In addition, a binary image encoding apparatus having a means for transmitting information on the size together with the encoded data of the alpha map signal is provided.

本発明ではアルファマップの縮小画像を符号化することで、符号量の増加を抑える。さらに、縮小率の情報を送ることで、所望のサイズでアルファマップを符号化することができ、アルファマップの発生符号量と形状の精度のトレードオフを図ることが可能となる。   In the present invention, an increase in code amount is suppressed by encoding a reduced image of an alpha map. Furthermore, by sending information on the reduction ratio, it is possible to encode the alpha map with a desired size, and it is possible to achieve a trade-off between the generated code amount of the alpha map and the accuracy of the shape.

また、本発明ではG4−FAX(G4規格のファクシミリ)の符号化方式である、MMRの垂直モードの範囲を拡大することが可能となり、水平方向のみではなく、垂直方向にも高い相関を有するアルファマップの性質を利用して、符号化効率を向上させることが可能となる。   Further, according to the present invention, it is possible to expand the range of the MMR vertical mode, which is a G4-FAX (G4 standard facsimile) encoding method, and alpha having high correlation not only in the horizontal direction but also in the vertical direction. It is possible to improve the coding efficiency by utilizing the property of the map.

また、本発明では、オブジェクトに対して必要最小限の領域のアルファマップを符号化することで、オブジェクトの大きさが画面に比較して小さい場合に符号化効率を向上させることができる。   Further, according to the present invention, the encoding efficiency can be improved when the size of the object is smaller than the screen by encoding the alpha map of the minimum necessary area for the object.

また、本発明は、MMR符号化のような、相対アドレス符号化(垂直モード)とランレングス符号化(水平モード)を適応的に切り換える符号化法を適用した画像符号化装置において、画面の横幅より大きいかまたは画面の横幅と等しい長さとした最大ラン長を設定すると共に、この最大ラン長までのランレングス符号を備える手段と、前記ランレングス符号を用い、2値画像を、表示のラスタ走査順に符号化すると共に、また、最大ラン長を越えるラン長を符号化する場合には、ラスタ走査の走査線を飛び越える指示である垂直方向パスモードの符号に置き換える符号化手段とを備えたことを特徴とする。   The present invention also relates to an image encoding apparatus to which an encoding method such as MMR encoding that adaptively switches between relative address encoding (vertical mode) and run length encoding (horizontal mode) is applied. A maximum run length that is greater than or equal to the horizontal width of the screen is set, and means having a run length code up to the maximum run length and the run length code are used to scan a binary image for raster scanning of the display Encoding in order, and in the case of encoding a run length exceeding the maximum run length, an encoding means for replacing with a code in a vertical pass mode, which is an instruction to skip the scanning line of raster scanning, is provided. Features.

さらに、MMR符号化のような、相対アドレス符号化とランレングス符号化を適応的に切り換える符号化法を適用して符号化された符号化情報を復号する復号化装置において、与えられた符号化情報をラスタ順に復号する復号手段と、画面幅より大きいかまたは画面幅と等しい長さとした最大ラン長を設定すると共に、復号手段により垂直方向のパスモード情報が復号されると垂直スキップモードにより上記最大ラン長対応の情報に復号する復号化手段を設けたことを特徴とする。   Furthermore, in a decoding apparatus that decodes encoded information by applying an encoding method that adaptively switches between relative address encoding and run-length encoding, such as MMR encoding, A decoding unit that decodes information in raster order, and a maximum run length that is greater than or equal to the screen width are set, and when the vertical path mode information is decoded by the decoding unit, the vertical skip mode Decoding means for decoding information corresponding to the maximum run length is provided.

本発明においては、ランレングス符号を用い、2値画像を、表示のラスタ走査順に符号化すると共に、また、最大ラン長を越えるラン長を符号化する場合には、ラスタ走査の走査線を飛び越える指示である垂直方向パスモードの符号に置き換える符号化を行って符号量を少なくする。そして、復号化は、与えられた符号化情報をラスタ順に復号し、復号手段により垂直方向のパスモード情報が復号されると垂直スキップモードにより、上記画面幅より大きいかまたは画面幅と等しい長さとした最大ラン長対応の情報に復号する。これにより、垂直方向パスモードの符号を用いて符号化したものであっても復号化できて、最大ラン長を越えるラン長を短い符号量で符号化および復号化することが可能になる。   In the present invention, a run-length code is used to encode a binary image in the order of display raster scanning. When a run length exceeding the maximum run length is encoded, the scan line of the raster scan is skipped. The code amount is reduced by performing the replacement with the code in the vertical path mode as an instruction. In decoding, the given encoded information is decoded in raster order, and when the pass mode information in the vertical direction is decoded by the decoding unit, the length is larger than the screen width or equal to the screen width by the vertical skip mode. To the information corresponding to the maximum run length. Accordingly, even a code encoded using a code in the vertical direction path mode can be decoded, and a run length exceeding the maximum run length can be encoded and decoded with a short code amount.

以上は、いずれも画面単位で、かつ、ライン方向を主体に圧縮符号化し、あるいは復号化するようにしたものであるが、MPEG等においては、画面を複数のブロック(マクロブロック)に区分し、このブロック(マクロブロック)単位で処理する方式を採用している。そのため、マクロブロック単位で圧縮符号化処理し、また、復号化処理する技術が必要である。   In the above, each is a screen unit and is mainly compression-encoded or decoded mainly in the line direction. In MPEG and the like, the screen is divided into a plurality of blocks (macroblocks). A method of processing in units of this block (macro block) is adopted. Therefore, a technique for performing compression encoding processing and decoding processing for each macroblock is required.

そのために本発明は、2値画像を所定の小領域毎に拡大・縮小する解像度変換手段と、前記小領域毎に2値化像を符号化する手段と、前記小領域毎に解像度変換手段の適用した拡大・縮小率の情報を符号化して前記2値画像の符号化データと併せて伝送する手段を有し、小領域毎に解像度変換手段の拡大・縮小率を変えることで、符号化手段の発生符号量を制御することを特徴とする2値画像符号化装置を提供する。さらにまた本発明は、前記解像度変換手段の適用した拡大・縮小率にしたがって可変長符号を切り替える。   For this purpose, the present invention provides a resolution conversion means for enlarging / reducing a binary image for each predetermined small area, a means for encoding a binary image for each small area, and a resolution conversion means for each small area. Encoding means by encoding the applied enlargement / reduction ratio information and transmitting it together with the encoded data of the binary image, and changing the enlargement / reduction ratio of the resolution converting means for each small area A binary image encoding apparatus is provided that controls the amount of generated codes. Furthermore, the present invention switches the variable length code according to the enlargement / reduction ratio applied by the resolution conversion means.

また本発明は、所定の小領域毎に解像度変換手段の情報を復号する手段と、前記解像度変換手段の適用した拡大・縮小率の情報にしたがって小領域毎に2値画像を復号化する手段と、前記解像度変換手段の適用した拡大・縮小率の情報にしたがって2値画像を拡大する解像度変換手段を有する2値画像復号化装置を提供する。   The present invention also provides means for decoding the information of the resolution conversion means for each predetermined small area, means for decoding a binary image for each small area according to the information of the enlargement / reduction ratio applied by the resolution conversion means, The present invention provides a binary image decoding apparatus having resolution conversion means for enlarging a binary image in accordance with information on the enlargement / reduction ratio applied by the resolution conversion means.

また本発明は、解像度変換手段の適用した拡大・縮小率の情報にしたがって可変長符号を切り換えることを特徴とする。   Further, the present invention is characterized in that the variable length code is switched in accordance with the information of the enlargement / reduction ratio applied by the resolution conversion means.

また本発明は、オブジェクトを含む長方形領域をM×N画素(M:水平方向の画素数.N:垂直方向の画素数)で構成される方形ブロック毎に分割する手段と、上記方形ブロックを長方形領域の左上あるいは右下から順次符号化する手段を有し、方形ブロックの全てあるいは一部に対して相対アドレス符号化を適用する2値画像符号化装置であって、方形ブロックに接する再生値を蓄える手段と、変化画素を検出する手段を有し、方形ブロックに接する再生値も含めて変化画素を検出することで、変化画素数を削減することを可能とする画像符号化装置を提供する。   The present invention also provides means for dividing a rectangular area including an object into square blocks each composed of M × N pixels (M: number of pixels in the horizontal direction. N: number of pixels in the vertical direction), and the rectangular block is rectangular. A binary image encoding apparatus having means for sequentially encoding from the upper left or lower right of an area and applying relative address encoding to all or a part of a square block, wherein a reproduction value adjacent to the square block is Provided is an image encoding device that has a means for storing and a means for detecting a change pixel, and that can detect the change pixel including a reproduction value in contact with a square block, thereby reducing the number of change pixels.

また本発明は、M×N画素で構或される方形ブロック毎に長方形領域の左上あるいは右下から順次復号化する2値画像復号化装置であって、方形ブロックに接する再生値を蓄える手段と、変化画素を検出する手段と、変化画素との相対アドレスを復号する手段を有し,方形ブロックに接する再生値も含めて変化画素を検出することを特徴とする画像復号化装置を提供する。   Further, the present invention is a binary image decoding apparatus for sequentially decoding from the upper left or lower right of a rectangular area for each square block composed of M × N pixels, and means for storing reproduction values in contact with the square block An image decoding apparatus having means for detecting a change pixel and means for decoding a relative address of the change pixel and detecting a change pixel including a reproduction value in contact with a square block is provided.

また本発明は、オブジェクトを含む長方形領域をM×N画素(M:水平方向の画素数,N:垂直方向の画素数)で構成される方形ブロック毎に分割する手段を有し、方形ブロックの全てあるいは一部に対して相対アドレス符号化を適用する2値画像符号化装置であって、方形ブロック内の符号化順序(スキャン順序)を適応的に切り換える手段と、上記切り換え情報を併せて符号化する手段を有することを特徴とする画像符号化装置を提供する。   The present invention also includes means for dividing a rectangular area including an object into square blocks each composed of M × N pixels (M: number of pixels in the horizontal direction, N: number of pixels in the vertical direction). A binary image coding apparatus that applies relative address coding to all or a part of the image coding apparatus, and includes a means for adaptively switching the coding order (scan order) in a square block and the switching information. There is provided an image encoding device characterized by comprising means for converting into an image.

また本発明は、M×N画素で構成される方形ブロック毎に復号化する2値画像復号化装置であって、方形ブロック内の復号化順序(スキャン順序)を切り換える手段と、復号化順序の切り換え情報を復号する手段を有し、上記切り換え情報に応じてM×N画素の方形ブロックを再生することを特徴とする画像復号化装置を提供する。   The present invention is also a binary image decoding apparatus for decoding for each square block composed of M × N pixels, and means for switching the decoding order (scan order) in the square block; There is provided an image decoding apparatus characterized by having means for decoding switching information and reproducing a square block of M × N pixels in accordance with the switching information.

また本発明は、オブジェクトを含む長方形領域をM×N画素(M:水平方向の画素数,N:垂直方向の画素数)で構成される方形ブロック毎に分割する手段を有し、方形ブロックの全てあるいは一部に対して相対アドレス符号化を適用する2値画像符号化装置であって、方形ブロック内のラインを交互にスキャンすることで、ラスタスキャンされた(2M)×(N/2)画素のブロックに変換する手段と、上記変換手段を適応的に用いる手段を有し、方形ブロックに上記変換手段を用いたか否かを識別する情報も併せて符号化することを特徴とする画像信号化装置を提供する。   The present invention also includes means for dividing a rectangular area including an object into square blocks each composed of M × N pixels (M: number of pixels in the horizontal direction, N: number of pixels in the vertical direction). A binary image coding apparatus that applies relative address coding to all or a part of the image data, and raster scanned (2M) × (N / 2) by alternately scanning lines in a rectangular block An image signal comprising means for converting to a block of pixels and means for adaptively using the conversion means, and also encoding information for identifying whether or not the conversion means is used for a square block A device is provided.

また本発明は、M×N画素あるいは(2M)×(N/2)画素で構成される方形ブロック毎に相対アドレスを復号化する2値画像復号化装置であって、ブロックの変換手段を用いたか否かを識別する符号を復号する手段と、ラスタスキャンされた(2M)×(N/2)画素のブロックをM×N画素のブロックに逆変換する手段を有し、前記識別情報に応じてM×N画素の方形ブロックを再生することを特徴とする画像復号化装置を提供する。   The present invention is also a binary image decoding apparatus for decoding a relative address for each square block composed of M × N pixels or (2M) × (N / 2) pixels, using block conversion means. Means for decoding a code for identifying whether or not a raster scan is performed, and means for inversely converting a raster-scanned block of (2M) × (N / 2) pixels into a block of M × N pixels, according to the identification information An image decoding apparatus is provided that reproduces a square block of M × N pixels.

また本発明は、オブジェクトの画像信号と、このオブジェクトの画像に対応し、画像をその画像のオブジェクト領域と背景領域に区別するための情報であるアルファマップとを分けて符号化する画像符号化装置において、オブジェクトの画像信号とおよびそのオブジェクトに対応するアルファマップの動き補償予測を行うと共に、動き補償予測されたアルファマップの予測誤差がしきい値よりも小さい場合には、オブジェクトの画像信号の動き補償予測値をコピーする符号化方式であって、画像信号で既に符号化されている動きベクトル(MVY )と、アルファマップの動きベクトル(MVA )との差分ベクトル(MVDA )を符号化する符号化手段と、上記差分ベクトル(MVDA )を検出する際に、上記動きベクトル(MVY )を中心として、差分ベクトル(MVDA )を小さい順から、大きい順へと検出する検出手段と、アルファマップの動き補償予測誤差がしきい値よりも小さくなった時点で、動きベクトルの検出を終了し、その時点での動きベクトルを上記差分ベクトル(MVDA )とする動きベクトル検出回路とを有することを特徴とする画像符号化装置を提供する。   The present invention also relates to an image encoding device that separately encodes an image signal of an object and an alpha map that corresponds to the image of the object and is information for distinguishing the image into an object area and a background area of the image. , The motion compensation prediction of the object image signal and the alpha map corresponding to the object is performed, and if the prediction error of the motion compensated alpha map is smaller than the threshold value, the motion of the object image signal An encoding method for copying a compensated prediction value, which encodes a difference vector (MVDA) between a motion vector (MVY) already encoded in an image signal and a motion vector (MVA) of an alpha map When detecting the difference vector (MVDA) and the means, the motion vector (MVY) is the center. , Detecting means for detecting the difference vector (MVDA) from the smallest to the largest, and when the motion compensation prediction error of the alpha map becomes smaller than the threshold, the detection of the motion vector is terminated, And a motion vector detection circuit that uses the difference vector (MVDA) as a motion vector at (1).

また本発明は、オブジェクトの画像信号と、そのオブジェクトに対応するアルファマップを分けて符号化する画像符号化装置において、オブジェクトの画像信号とおよびそのオブジェクトに対応するアルファマップの動き補償予測を行うと共に、動き補償予測されたアルファマップの予測誤差がしきい値よりも小さい場合には、オブジェクトの画像信号の動き補償予測値をコピーする符号化方式であって、動きベクトル(MVY )は符号表に従って符号化すると共に、画像信号で既に符号化されている動きベクトル(MVY )とアルファマップの動きベクトル(MVA )との差分ベクトル(MVDA )を当該差分ベクトル(MVDA )用符号表に従って符号化する手段を有し、差分ベクトル(MVDA )のダイナミックレンジが動きベクトル(MVY )を符号化する際の上記符号表のダイナミックレンジよりも小さくなるように制限することを特徴とする画像符号化装置を提供する。   The present invention also provides motion compensation prediction of an object image signal and an alpha map corresponding to the object in an image encoding apparatus that separately encodes the object image signal and the alpha map corresponding to the object. If the prediction error of the motion compensated alpha map is smaller than the threshold, the coding method is to copy the motion compensated prediction value of the image signal of the object, and the motion vector (MVY) is in accordance with the code table. A means for encoding and encoding a difference vector (MVDA) between a motion vector (MVY) already encoded with an image signal and a motion vector (MVA) of an alpha map according to a code table for the difference vector (MVDA). And the dynamic range of the difference vector (MVDA) is the motion vector (M The Y) to provide an image coding apparatus and limits to be smaller than the dynamic range of the code table in encoding.

またこの符号化装置によって符号化されたデータを復号するために本発明は、画像信号で既に再生されている動きベクトル(MVY )と差分ベクトル(MVDA )より符号表に従って画像を復号する手段と、アルファマップの動きベクトル(MVA )を生成する手段とを有し、上記符号表は、動きベクトル(MVY )用と差分ベクトル(MVDA )用をそれぞれ設けると共に、差分ベクトル(MVDA )用符号表は上記動きベクトル(MVY )を復号化する際の符号表のダイナミックレンジよりも小さいダイナミックレンジとすることを特徴とする画像復号化装置を提供する。   Further, in order to decode the data encoded by the encoding device, the present invention comprises means for decoding an image according to a code table from a motion vector (MVY) and a difference vector (MVDA) already reproduced in the image signal, Means for generating a motion vector (MVA) of an alpha map, and the code table provides a motion vector (MVY) and a difference vector (MVDA), respectively, and the code table for the difference vector (MVDA) Provided is an image decoding apparatus characterized by having a dynamic range smaller than the dynamic range of a code table used when decoding a motion vector (MVY).

また本発明は、アルファマップをブロックに区分し、そのブロック毎に符号化すると共に、その符号化はそのブロック毎のアルファマップの情報状況対応に属性を与え、その属性を符号化するようにした方式であって、各ブロックに対して、各々の属性に固有のラベルを少なくとも2ビット表現で割り当てると共に、そのラベルを割り当てたプレーンをブロックタイプのプレーンとして得る手段と、上記ラベルで構成されるブロックタイプのプレーンを、桁位置別に分解してビットプレーンに分解する手段と、各々のビットプレーンを個別に2値画像符号化する手段とを有する画像符号化装置を提供する。   Further, according to the present invention, the alpha map is divided into blocks and encoded for each block, and the encoding gives an attribute to the information status correspondence of the alpha map for each block, and the attribute is encoded. A block that is configured by assigning a label unique to each attribute to each block in at least a 2-bit representation and obtaining the assigned plane as a block-type plane for each block, and a block composed of the label There is provided an image encoding apparatus having means for decomposing a type plane into digit planes and decomposing the planes into bit planes, and means for individually binary encoding each bit plane.

またこの画像符号化装置により符号化されたデータを復号化して、アルファマップのブロック毎の属性を再生するために本発明は、各ビットプレーンを個別に2値画像復号化する手段と、ビットプレーンを合成してブロックタイプのプレーンを再生する手段とを有する画像復号化装置を提供する。   In addition, in order to decode the data encoded by the image encoding device and reproduce the attribute of each block of the alpha map, the present invention includes means for individually decoding binary images of each bit plane, And an image decoding apparatus having means for reproducing a block type plane.

また、本発明は、画像をその画像のオブジェクト領域と背景領域に区別するための情報であるアルファマップと共に符号化して出力するようにした画像符号化装置において、前記アルファマップをブロックに分割して、そのブロック毎に符号化を行い、既に符号化したブロックの一部分から切りだした参照パターンを用いてベクトル量子化のインデックステーブルをブロック毎に生成するテーブル生成手段と、前記インデックステーブルを用いてアルファマップをベクトル量子化によって符号化する手段とを有するオブジェクト画像の画像符号化装置を提供する。   Further, the present invention relates to an image encoding device that encodes and outputs an image together with an alpha map that is information for distinguishing the object area and background area of the image, and divides the alpha map into blocks. Encoding means for each block, table generating means for generating a vector quantization index table for each block using a reference pattern cut out from a part of the already encoded block, and alpha using the index table An object image coding apparatus having means for coding a map by vector quantization is provided.

また、この符号化装置により符号化されて得られた符号化ビットストリームを復号化する復号化装置として本発明は、前記ブロック毎に復号化を行い、既に復号したブロックの一部分から切りだした参照パターンを用いてベクトル量子化のインデックステーブルをブロック毎に生成するテーブル生成手段と、前記インデックステーブルを用いてアルファマップをベクトル量子化によって復号する手段とを有するオブジェクト画像の画像復号装置を提供する。   Further, as a decoding device for decoding an encoded bitstream obtained by encoding with this encoding device, the present invention performs decoding for each block, and references that have been cut out from a part of the already decoded block There is provided an image decoding apparatus for an object image having table generation means for generating a vector quantization index table for each block using a pattern, and means for decoding an alpha map by vector quantization using the index table.

本発明によれば、アルファマップの符号量を低減することができるため、従来の符号化法と比べて大幅な符号化効率の低下なしに、背景とオブジェクトを別々に符号化することができるようになる。 According to the present invention, since the code amount of the alpha map can be reduced, it is possible to separately encode the background and the object without significantly reducing the encoding efficiency as compared with the conventional encoding method. become.

以下、図面を参照して本発明の具体例を説明する。   Hereinafter, specific examples of the present invention will be described with reference to the drawings.

(第1の具体例)本発明は、図1の画像伝送システムにおける送受信装置(図1のA,B)内の、画像符号化・復号化装置に関するものであり、アルファマップ信号の高能率圧縮符号化・復号化を図ることができるようにしたものである。   (First Specific Example) The present invention relates to an image encoding / decoding device in a transmission / reception device (A, B in FIG. 1) in the image transmission system of FIG. 1, and highly efficient compression of an alpha map signal. The encoding / decoding can be achieved.

本発明では、符号化装置側において、アルファマップ信号について、解像度縮小を図り、符号化すると共に、得られた符号を縮小率情報とともに多重化して伝送や蓄積用のアルファマップ信号とすることで、アルファマップ信号を効率良く符号化できるようにする。   In the present invention, on the encoding device side, the resolution is reduced and encoded for the alpha map signal, and the obtained code is multiplexed with the reduction ratio information to obtain an alpha map signal for transmission and storage, An alpha map signal can be efficiently encoded.

また、本発明では、復号化装置側において、このような高能率符号化されたアルファマップ信号を再生する時は、アルファマップの符号化成分と、縮小率情報とを分離し、アルファマップの符号化成分は復号した後に縮小率情報に従って元の解像度に拡大するようにし、これによって元のサイズのアルファマップ信号を復元できるようにして、アルファマップを用いた符号化画像の復号も支障なく行えるようにする。   Further, in the present invention, when reproducing such a high-efficiency encoded alpha map signal on the decoding device side, the encoded component of the alpha map and the reduction rate information are separated and the code of the alpha map is encoded. After the decoding component is decoded, it is enlarged to the original resolution according to the reduction ratio information, so that the alpha map signal of the original size can be restored, so that the encoded image using the alpha map can be decoded without any trouble. To.

図2は、このような本発明における画像符号化装置のブロック図である。本発明における画像符号化装置は、図2に示すように、差分回路100、動き補償予測回路110、直交変換回路120、量子化回路130、可変長符号化回路140、逆量子化回路150、逆直交変換回路160、加算回路170、多重化回路180、アルファマップ符号化回路200とから構成される。   FIG. 2 is a block diagram of such an image coding apparatus according to the present invention. As shown in FIG. 2, the image coding apparatus according to the present invention includes a difference circuit 100, a motion compensation prediction circuit 110, an orthogonal transformation circuit 120, a quantization circuit 130, a variable length coding circuit 140, an inverse quantization circuit 150, and an inverse quantization circuit. The orthogonal transformation circuit 160, the addition circuit 170, the multiplexing circuit 180, and the alpha map encoding circuit 200 are comprised.

アルファマップ符号化回路200は、入力されたアルファマップを符号化し、この符号化された信号をアルファマップ信号として多重化回路180に出力する機能と、このアルファマップ信号を復号して局部復号信号として出力する機能を有する。   The alpha map encoding circuit 200 encodes the input alpha map and outputs the encoded signal to the multiplexing circuit 180 as an alpha map signal, and decodes the alpha map signal as a local decoded signal. Has a function to output.

特に、本アルファマップ符号化回路200は、入力されたアルファマップを符号化するにあたり、与えられた縮小率(倍率)で解像度を縮小する処理を行い、この解像度縮小処理されたものを符号化すると共に、この符号化したものと縮小率の情報(倍率情報)とを多重化してこれをアルファマップ信号として多重化回路180に出力する機能を有する。そして、局部復号信号としては、解像度縮小処理されたものを元の解像度に戻す処理をして得たものを用いる構成である。   In particular, the present alpha map encoding circuit 200 performs a process of reducing the resolution at a given reduction rate (magnification) when encoding the input alpha map, and encodes the resolution reduced process. At the same time, it has a function of multiplexing the encoded data and reduction rate information (magnification information) and outputting the multiplexed data to the multiplexing circuit 180 as an alpha map signal. As the local decoded signal, a signal obtained by performing processing for returning the resolution-reduced signal to the original resolution is used.

差分回路100は、動き補償予測回路110より供給される動き補償予測信号と入力画像信号との差分信号を算出するものであり、直交変換回路120は、差分回路100から供給された差分信号を、アルファマップの情報にしたがって、直交変換係数に変換して出力するものである。   The difference circuit 100 calculates a difference signal between the motion compensation prediction signal supplied from the motion compensation prediction circuit 110 and the input image signal, and the orthogonal transformation circuit 120 converts the difference signal supplied from the difference circuit 100 into the difference signal. According to the information of the alpha map, it is converted into an orthogonal transform coefficient and output.

量子化回路130はこの直交変換回路120により得られた直交変換係数を量子化する回路であり、可変長符号化回路140はこの量子化回路130の出力を符号化して出力するものである。多重化回路180はこの可変長符号化回路140により符号化されたものと、前記アルファマップ信号とを、動きベクトル情報等のサイド情報と共に多重化してビットストリームとして出力するものである。   The quantization circuit 130 is a circuit that quantizes the orthogonal transform coefficient obtained by the orthogonal transform circuit 120, and the variable length coding circuit 140 codes and outputs the output of the quantization circuit 130. The multiplexing circuit 180 multiplexes the signal encoded by the variable length encoding circuit 140 and the alpha map signal together with side information such as motion vector information, and outputs the result as a bit stream.

逆量子化回路150は量子化回路130の出力を逆量子化するものであり、逆直交変換回路160はこの逆量子化回路150の出力を前記アルファマップに基いて逆直交変換するものであり、加算回路170はこの逆直交変換回路160の出力と動き補償予測回路110から与えられる予測信号(動き補償予測信号)とを加算して差分回路100に出力するものである。   The inverse quantization circuit 150 performs inverse quantization on the output of the quantization circuit 130, and the inverse orthogonal transform circuit 160 performs inverse orthogonal transform on the output of the inverse quantization circuit 150 based on the alpha map. The adder circuit 170 adds the output of the inverse orthogonal transform circuit 160 and the prediction signal (motion compensation prediction signal) given from the motion compensation prediction circuit 110 and outputs the result to the difference circuit 100.

動き補償予測回路110は、フレームメモリを有し、アルファマップ復号化回路200から与えられる局部復号信号にもとづいて動作してオブジェクト領域の信号、背景領域の信号を蓄積する機能を有する。また、動き補償予測回路110は蓄積したオブジェクト領域の画像から動き補償値を予測して予測値として出力し、また、蓄積した背景領域の画像から動き補償値を予測して予測値として出力する機能を有する。   The motion compensation prediction circuit 110 has a frame memory and has a function of accumulating an object area signal and a background area signal by operating based on a local decoded signal supplied from the alpha map decoding circuit 200. The motion compensation prediction circuit 110 also predicts a motion compensation value from the accumulated image of the object region and outputs it as a prediction value, and predicts a motion compensation value from the accumulated image of the background region and outputs it as a prediction value. Have

このような構成の本装置は、画像信号とその画像信号のアルファマップが入力される。   This apparatus configured as described above receives an image signal and an alpha map of the image signal.

アルファマップ符号化回路200では、線20を介して入力されるアルファマップを、指示された解像度縮小率(倍率)で縮小して符号化し、この符号化されたアルファマップ信号を前記解像度縮小率情報(倍率情報)とともに多重化してから線30を介して出力し、また、符号化されたアルファマップ信号を元の解像度に戻すかたちで復号して得た局部復号信号を線40を介して直交変換回路120,逆直交変換回路160及び動き補償予測回路110に出力する。   In the alpha map encoding circuit 200, the alpha map inputted via the line 20 is encoded by being reduced at an instructed resolution reduction rate (magnification), and the encoded alpha map signal is converted into the resolution reduction rate information. Multiplexed together with (magnification information) and then output via line 30, and the local decoded signal obtained by decoding the encoded alpha map signal back to its original resolution is orthogonally converted via line 40 It outputs to the circuit 120, the inverse orthogonal transform circuit 160, and the motion compensation prediction circuit 110.

本アルファマップ符号化回路200は、入力されたアルファマップを符号化するにあたり、与えられた縮小率で解像度を縮小する処理を行い、この解像度縮小処理されたものを符号化すると共に、この符号化したものと縮小率の情報とを多重化してこれをアルファマップ信号として多重化回路180に出力する。これにより、アルファマップ信号を高効率で符号化することを可能にする。   In encoding the input alpha map, the alpha map encoding circuit 200 performs a process of reducing the resolution at a given reduction rate, encodes the resolution-reduced process, and encodes the encoded alpha map. The information and the reduction ratio information are multiplexed and output to the multiplexing circuit 180 as an alpha map signal. This makes it possible to encode the alpha map signal with high efficiency.

そして、局部復号信号としては、解像度縮小処理されたものを元の解像度に戻す処理をして得たものを用い、これを線40を介して直交変換回路120,逆直交変換回路160に出力する。これにより、直交変換回路120,逆直交変換回路160での処理を元のサイズのアルファマップで行うことができるようにする。   Then, as the locally decoded signal, a signal obtained by performing processing for returning the resolution-reduced signal to the original resolution is used, and this is output to the orthogonal transform circuit 120 and the inverse orthogonal transform circuit 160 via the line 40. . As a result, the processing in the orthogonal transform circuit 120 and the inverse orthogonal transform circuit 160 can be performed with an alpha map of the original size.

画像信号は、所定画素サイズ(N×N画素)のブロックに分割された後、ブロック位置順に線10を介して差分回路100に供給される。そして、差分回路100では、この入力(画像信号)と、予測信号(オブジェクト予測回路110からの動き補償予測信号の出力)との差分信号が算出され、直交変換回路120に供給される。   The image signal is divided into blocks having a predetermined pixel size (N × N pixels), and then supplied to the difference circuit 100 via the line 10 in the order of the block positions. The difference circuit 100 calculates a difference signal between the input (image signal) and the prediction signal (output of the motion compensation prediction signal from the object prediction circuit 110) and supplies the difference signal to the orthogonal transformation circuit 120.

直交変換回路120では、供給された差分信号を線40を介して供給されるアルファマップの情報にしたがって、直交変換係数に変換した後、量子化回路130に供給する。そして、ここで量子化される。量子化回路130にて量子化された変換係数は、可変長符号化回路140において符号化されると共に、逆量子化回路150に供給される。   In the orthogonal transform circuit 120, the supplied difference signal is converted into an orthogonal transform coefficient according to the information of the alpha map supplied via the line 40, and then supplied to the quantization circuit 130. And it is quantized here. The transform coefficient quantized by the quantization circuit 130 is encoded by the variable length encoding circuit 140 and supplied to the inverse quantization circuit 150.

逆量子化回路150に供給された変換係数は、逆量子化された後、逆直交変換回路160において逆変換される。そして、加算回路170において動き補償予測回路110より供給される動き補償予測値と加算される。加算回路170の出力である局部復号画像は、動き補償予測回路110内のフレームメモリに蓄えられる。   The transform coefficient supplied to the inverse quantization circuit 150 is inversely quantized and then inversely transformed by the inverse orthogonal transform circuit 160. Then, the addition circuit 170 adds the motion compensation prediction value supplied from the motion compensation prediction circuit 110. The locally decoded image that is the output of the addition circuit 170 is stored in a frame memory in the motion compensation prediction circuit 110.

そして、動き補償予測回路110は、アルファマップ復号化回路200から与えられる局部復号信号にもとづいてオブジェクトの領域のブロックの処理のタイミングではオブジェクトの動き補償予測値を、それ以外のタイミングでは背景部分の動き補償予測値を出力して差分回路100に与える。   Then, the motion compensation prediction circuit 110 calculates the object motion compensation prediction value at the processing timing of the block of the object area based on the local decoded signal given from the alpha map decoding circuit 200, and the background portion at other timings. The motion compensation predicted value is output and given to the difference circuit 100.

すなわち、動き補償予測回路110ではアルファマップ信号の局部復号信号から現在、オブジェクトのブロック対応部分の画像信号が差分回路100に入力されているのか、あるいは背景部分のブロック対応部分の画像信号が差分回路100に入力されているのかを知り、オブジェクトのブロック対応部分の画像信号の入力期間中であれば、オブジェクトの動き補償予測信号を、そして、背景部分のブロック対応部分の画像信号入力期間中であれば、背景の動き補償予測信号を、差分回路100に与える。   That is, in the motion compensation prediction circuit 110, whether the image signal of the block corresponding portion of the object is currently input to the difference circuit 100 from the local decoded signal of the alpha map signal, or the image signal of the block corresponding portion of the background portion is the difference circuit. If it is during the input period of the image signal of the object corresponding to the block of the object, the motion compensation prediction signal of the object and the image signal input period of the block corresponding part of the background portion may be detected. For example, the background motion compensation prediction signal is supplied to the difference circuit 100.

その結果、差分回路100では、この入力された画像信号と、その画像の領域対応の予測信号との差を算出するので、入力画像がオブジェクト対応の領域のものであれば、そのオブジェクトの対応位置での予測値との差分信号が、また、入力画像が背景の領域のものであれば、その背景位置対応の予測値との差分信号が算出され、直交変換回路120に供給される。   As a result, the difference circuit 100 calculates the difference between the input image signal and the prediction signal corresponding to the region of the image. If the input image is in the region corresponding to the object, the corresponding position of the object is calculated. If the difference signal from the predicted value in FIG. 4 is a background region, the difference signal from the predicted value corresponding to the background position is calculated and supplied to the orthogonal transformation circuit 120.

直交変換回路120では、供給された差分信号を線40を介して供給されるアルファマップの情報にしたがって、直交変換係数に変換した後、量子化回路130に供給する。そしてここで量子化される。   In the orthogonal transform circuit 120, the supplied difference signal is converted into an orthogonal transform coefficient according to the information of the alpha map supplied via the line 40, and then supplied to the quantization circuit 130. And it is quantized here.

量子化回路130にて量子化された変換係数は、可変長符号化回路140において符号化されると共に、逆量子化回路150に供給される。そして、逆量子化回路150に供給された変換係数はここで逆量子化された後、逆直交変換回路160において逆変換されて加算回路170に供給される。そして、予測値切り換え回路500を介して加算回路170に供給される予測値と加算されることになる。   The transform coefficient quantized by the quantization circuit 130 is encoded by the variable length encoding circuit 140 and supplied to the inverse quantization circuit 150. The transform coefficient supplied to the inverse quantization circuit 150 is inversely quantized here, and then inverse transformed in the inverse orthogonal transform circuit 160 and supplied to the adder circuit 170. Then, the predicted value supplied to the adding circuit 170 via the predicted value switching circuit 500 is added.

加算回路170の出力である局部復号画像の信号は、動き補償予測回路110に供給され、動き補償予測回路110ではアルファマップ信号の局部復号信号から現在、オブジェクトのブロック対応の信号が加算回路170から出力されているのか、あるいは背景部分のブロック対応の信号が加算回路170から出力されているのかを知り、オブジェクトのブロック対応の信号の出力中であれば、オブジェクト用のフレームメモリに、そして、背景部分のブロック対応の信号の出力中であれば、背景用のメモリに与えるべく動作して対応のメモリに蓄えさせる。   The signal of the locally decoded image, which is the output of the adder circuit 170, is supplied to the motion compensation prediction circuit 110. The motion compensation prediction circuit 110 receives a signal corresponding to the block of the object from the adder circuit 170 from the local decode signal of the alpha map signal. Whether the signal corresponding to the block of the background portion is output or the signal corresponding to the block of the background portion is output from the adder circuit 170, and if the signal corresponding to the block of the object is being output, the frame memory for the object and the background If a signal corresponding to a partial block is being output, the signal is operated to be supplied to the background memory and stored in the corresponding memory.

そして、これにより、オブジェクト画像のみ、背景画像のみの画像がそれぞれメモリ上に得られることになる。そして、動き補償予測回路110はオブジェクト画像を利用して予測値を求め、また、背景部分の画像を利用して背景画像の予測値を求めることができる。   As a result, only the object image and only the background image are obtained on the memory. Then, the motion compensated prediction circuit 110 can obtain a predicted value using the object image, and can obtain a predicted value of the background image using the image of the background portion.

上述したように、アルファマップ符号化回路200では、入力されるアルファマップを符号化し、この符号化されたアルファマップ信号を線30を介して多重化回路180に供給している。   As described above, the alpha map encoding circuit 200 encodes the input alpha map and supplies the encoded alpha map signal to the multiplexing circuit 180 via the line 30.

また、多重化回路180には、可変長符号化回路140から出力された変換係数が線40を介して供給されている。そして、多重化回路180は供給されているこれらアルファマップ信号および変換係数の符号化値とを、動きベクトル情報等のサイド情報と共に多重化した後、線50を介して出力して本画像符号化装置の最終出力としての符号化ビットストリームとなる。   Further, the transform coefficient output from the variable length coding circuit 140 is supplied to the multiplexing circuit 180 via the line 40. Then, the multiplexing circuit 180 multiplexes the supplied alpha map signal and the encoded value of the transform coefficient together with side information such as motion vector information, and then outputs the result through the line 50 to encode the main image. It becomes an encoded bit stream as the final output of the apparatus.

以上が符号化装置の構成と作用であり、画像の誤差信号を得るにあたって、オブジェクト用および背景用の画像により動き補償予測を行うべく、アルファマップにしたがって処理中の画像の現在ブロック位置がオブジェクト領域位置であるのか、背景領域位置であるのかを判別しながら、処理中の画像の現在ブロック位置がオブジェクト領域位置であればオブジェクト用の画像から求めた予測値を用い、背景領域位置であれば背景用の画像から求めた予測値を用いて差分を求めるようにした。   The above is the configuration and operation of the encoding device. When obtaining an error signal of an image, the current block position of the image being processed according to the alpha map is the object region in order to perform motion compensation prediction using the object and background images. If the current block position of the image being processed is the object area position, the predicted value obtained from the object image is used while determining whether the current position is the position or the background area position. The difference is obtained using the predicted value obtained from the image for use.

そして、オブジェクト用および背景用の予測には動き補償予測回路に、この差分から得た画像について、アルファマップにしたがってそれぞれ対応の領域部分の画像を保持させ、予測に供するようにした。これにより、オブジェクトおよび背景それぞれで最適な動き補償予測を行うことができるようになり、質の良い画像圧縮符号化と復号化を可能にする。   For the object and background predictions, the motion compensation prediction circuit holds the images of the corresponding region portions of the images obtained from the differences according to the alpha map, and uses them for prediction. As a result, optimal motion compensation prediction can be performed for each object and background, enabling high-quality image compression encoding and decoding.

また、本発明では、アルファマップについて、解像度縮小を図り、符号化すると共に、得られた符号を縮小率情報と共に多重化して伝送や蓄積用のアルファマップ信号とするようにした。そのため、アルファマップ信号は効率良く符号化できることになり、オブジェクトの形状情報を効率良く符号化できるようになる。   In the present invention, the resolution of the alpha map is reduced and encoded, and the obtained code is multiplexed with the reduction ratio information to form an alpha map signal for transmission and storage. Therefore, the alpha map signal can be efficiently encoded, and the shape information of the object can be efficiently encoded.

また、アルファマップ信号を再生する時は、アルファマップの符号化成分と、縮小率情報とを分離し、アルファマップの符号化成分は復号した後に縮小率情報に従って元の解像度に拡大するようにしたことで、元のサイズのアルファマップを復元できるようになり、アルファマップを用いた符号化画像の復号も支障なく行えるようになる。   In addition, when reproducing the alpha map signal, the encoded component of the alpha map and the reduction rate information are separated, and the encoded component of the alpha map is decoded and enlarged to the original resolution according to the reduction rate information. Thus, the original alpha map can be restored, and the encoded image using the alpha map can be decoded without any trouble.

一方、図3は本発明が用いられる復号化装置のブロック図である。復号化装置は、図3に示すように、分離回路300、可変長復号化回路310、逆量子化回路320、逆直交変換回路330、加算回路340、動き補償予測回路350、アルファマップ復号化回路400とより構成される。   On the other hand, FIG. 3 is a block diagram of a decoding apparatus in which the present invention is used. As shown in FIG. 3, the decoding apparatus includes a separation circuit 300, a variable length decoding circuit 310, an inverse quantization circuit 320, an inverse orthogonal transformation circuit 330, an addition circuit 340, a motion compensation prediction circuit 350, and an alpha map decoding circuit. 400.

分離化回路300は入力される符号化ビットストリームを分離化処理してアルファマップ信号と画像の符号化信号等を得る回路であり、アルファマップ復号化回路400はこの分離化回路300にて分離されたアルファマップ信号を復号してアルファマップを再生する回路である。ここでは、アルファマップ復号化回路400は、供給されたアルファマップ信号からアルファマップの成分と、縮小率の情報(倍率情報)を分離し、アルファマップの成分を復号すると共に、これを縮小率の情報に基づいて解像度拡大し、元の解像度のアルファマップに復元する機能を有する。   The separation circuit 300 is a circuit that obtains an alpha map signal and a coded image signal by separating the input encoded bit stream, and the alpha map decoding circuit 400 is separated by the separation circuit 300. This circuit decodes the alpha map signal and reproduces the alpha map. Here, the alpha map decoding circuit 400 separates the alpha map component and the reduction rate information (magnification information) from the supplied alpha map signal, decodes the alpha map component, and converts this into the reduction rate information. It has the function of enlarging the resolution based on the information and restoring it to the original resolution alpha map.

可変長復号化回路310は、分離化回路300にて分離された画像の符号化信号を復号するものであり、逆量子化回路320はこの復号されたものを逆量子化して元の係数に戻すものであり、逆直交変換回路330はこの係数をアルファマップにしたがって逆直交変換して予測誤差信号に戻すものであり、加算回路340は、この予測誤差信号に動き補償予測回路350からの動き補償予測値を加算して再生画像信号として出力するものである。この再生画像信号が復号化装置の最終出力となる。   The variable length decoding circuit 310 decodes the encoded signal of the image separated by the separation circuit 300, and the inverse quantization circuit 320 inversely quantizes the decoded signal to return to the original coefficient. The inverse orthogonal transform circuit 330 performs inverse orthogonal transform on the coefficients in accordance with the alpha map to return the prediction error signal to the prediction error signal. The adder circuit 340 applies the motion compensation from the motion compensation prediction circuit 350 to the prediction error signal. The predicted value is added and output as a reproduced image signal. This reproduced image signal becomes the final output of the decoding apparatus.

動き補償予測回路350は、加算回路340から出力された再生画像信号をアルファマップにしたがってフレームメモリに蓄積することによりオブジェクト画像と背景画像とを得ると共に、この蓄積されて得られた画像からオブジェクトの動き補償予測信号、背景の動き補償予測を得るものである。   The motion compensation prediction circuit 350 obtains an object image and a background image by accumulating the reproduced image signal output from the adder circuit 340 in a frame memory according to an alpha map, and obtains an object image from the accumulated image. A motion compensation prediction signal and a background motion compensation prediction are obtained.

このような構成の復号化装置においては、符号化ビットストリームは、線70を介して分離化回路300に供給され、分離化回路300において各々の情報毎に分離されることにより、アルファマップ信号に関する符号と、画像信号の可変長符号とに分けられる。   In the decoding apparatus having such a configuration, the encoded bit stream is supplied to the demultiplexing circuit 300 via the line 70 and is separated for each piece of information by the demultiplexing circuit 300, so that the alpha map signal is related. It is divided into a code and a variable length code of the image signal.

そして、アルファマップ信号に関する符号は、線80を介してアルファマップ復号化回路400に供給され、また、画像信号の可変長符号は可変長復号化回路310にそれぞれ供給される。   The code relating to the alpha map signal is supplied to the alpha map decoding circuit 400 via the line 80, and the variable length code of the image signal is supplied to the variable length decoding circuit 310, respectively.

アルファマップ信号に関する符号はアルファマップ復号化回路400においてアルファマップ信号に再生され、線90を介して逆直交変換回路330と動き補償予測回路350に出力される。   The code relating to the alpha map signal is reproduced as an alpha map signal by the alpha map decoding circuit 400 and output to the inverse orthogonal transform circuit 330 and the motion compensation prediction circuit 350 via the line 90.

すなわち、アルファマップ復号化回路400は、供給されたアルファマップ信号からアルファマップの成分と、縮小率の情報を分離し、アルファマップの成分を復号すると共に、これを縮小率の情報に基づいて解像度拡大し、元の解像度のアルファマップに復元して逆直交変換回路330と動き補償予測回路350に出力する。   In other words, the alpha map decoding circuit 400 separates the alpha map component and the reduction ratio information from the supplied alpha map signal, decodes the alpha map component, and converts this into resolution based on the reduction ratio information. The image is enlarged, restored to the original alpha map, and output to the inverse orthogonal transform circuit 330 and the motion compensation prediction circuit 350.

一方、可変長復号化回路310では、分離化回路300から供給される符号を復号し、逆量子化回路320に供給して、ここで逆量子化する。逆量子化された変換係数は、線90を介して供給されるアルファマップにしたがって逆直交変換回路330により逆変換され、加算回路340に供給される。加算回路340では、逆直交変換回路330からの逆直交変換された信号と、動き補償予測回路350より供給される動き補償予測信号とを加算し、再生画像を得る。   On the other hand, the variable length decoding circuit 310 decodes the code supplied from the demultiplexing circuit 300 and supplies it to the inverse quantization circuit 320, where it is inversely quantized. The inversely quantized transform coefficient is inversely transformed by the inverse orthogonal transform circuit 330 according to the alpha map supplied via the line 90 and supplied to the adder circuit 340. The adder circuit 340 adds the inversely orthogonally transformed signal from the inverse orthogonal transform circuit 330 and the motion compensation prediction signal supplied from the motion compensation prediction circuit 350 to obtain a reproduced image.

本発明では、符号化装置側において、アルファマップについて、解像度縮小を図り、符号化すると共に、得られた符号を縮小率情報とともに多重化して伝送や蓄積用のアルファマップ信号とするようにした。そのため、アルファマップ信号は効率良く符号化できることになり、オブジェクトの形状情報を効率良く符号化できるようになる。   In the present invention, on the encoding device side, the resolution of the alpha map is reduced and encoded, and the obtained code is multiplexed with the reduction ratio information to form an alpha map signal for transmission and storage. Therefore, the alpha map signal can be efficiently encoded, and the shape information of the object can be efficiently encoded.

また、本発明では、復号化装置側において、このような高能率圧縮符号化されたアルファマップ信号を再生する時は、アルファマップの符号化成分と、縮小率情報とを分離し、アルファマップの符号化成分は復号した後に縮小率情報に従って元の解像度に拡大するようにしたことで、元のサイズのアルファマップを復元できるようになり、アルファマップを用いた符号化画像の復号も支障なく行えるようになる。   Also, in the present invention, when reproducing such an alpha map signal that has been subjected to such high-efficiency compression coding on the decoding device side, the encoded component of the alpha map and the reduction rate information are separated, and the alpha map Since the encoded component is expanded to the original resolution according to the reduction ratio information after decoding, the original size alpha map can be restored, and the encoded image using the alpha map can be decoded without any trouble. It becomes like this.

本発明で重要なものは、符号化装置におけるアルファマップ符号化回路200と、復号化装置におけるアルファマップ復号化回路400であり、所望の倍率で解像度縮小・拡大変換を行える機能を持たせた点に特徴がある。従って、これについて以下詳述する。   What is important in the present invention is the alpha map encoding circuit 200 in the encoding apparatus and the alpha map decoding circuit 400 in the decoding apparatus, which have a function of performing resolution reduction / enlargement conversion at a desired magnification. There is a feature. Therefore, this will be described in detail below.

すなわち、本発明の主体は、アルファマップ符号化回路200およびアルファマップ復号化回路400であり、その他の構成に関しては、本発明者等がすでに出願した特願平7−97073号に記載の任意形状画像の符号化方式の技術を用いれば良いので、ここでは深くは立ち入らない。   That is, the subject of the present invention is an alpha map encoding circuit 200 and an alpha map decoding circuit 400, and the other configurations are arbitrary shapes described in Japanese Patent Application No. 7-97073 already filed by the present inventors. Since the technique of the image coding method may be used, it does not go deep here.

図4、図5および図6を用いて、本発明の主体的要素であるアルファマップ符号化回路200の具体例の説明を、また、図7および図8を用いてアルファマップ復号化回路400の具体例の説明をする。   A specific example of the alpha map encoding circuit 200, which is a main element of the present invention, will be described with reference to FIGS. 4, 5 and 6, and the alpha map decoding circuit 400 will be described with reference to FIGS. A specific example will be described.

図4は、特開平07−152915号公報にて提案されている方法である。アルファマップ符号化回路200内では、線20を介して供給されるアルファマップ信号を、解像度変換を行う手段である解像度変換回路210にて縮小し、符号化対象となるサンプリング数を減らした後、線21を介して2値画像符号化回路220に供給してここでMMRやチェイン符号化等で符号化した後、線30を介して多重化回路180に供給する。   FIG. 4 shows a method proposed in Japanese Patent Application Laid-Open No. 07-152915. In the alpha map encoding circuit 200, the alpha map signal supplied via the line 20 is reduced by the resolution conversion circuit 210, which is a means for performing resolution conversion, and after reducing the number of samples to be encoded, The signal is supplied to the binary image encoding circuit 220 via the line 21 and is encoded by MMR, chain coding or the like, and then supplied to the multiplexing circuit 180 via the line 30.

さらに、解像度変換回路210にて縮小されたアルファマップ信号は、線21を介して解像度変換回路230に供給され、線20を介してアルファマップ符号化回路200に供給された元信号のサンプル数まで拡大された後、線40を介して出力される。   Further, the alpha map signal reduced by the resolution conversion circuit 210 is supplied to the resolution conversion circuit 230 via the line 21 and reaches the number of samples of the original signal supplied to the alpha map encoding circuit 200 via the line 20. After being magnified, it is output via line 40.

図5は、解像度変換回路210,230における縮小・拡大変換の例である。この変換の説明を、参考文献“尾上編:画像処理ハンドブック,p.630,昭晃堂”を基に説明する。   FIG. 5 shows an example of reduction / enlargement conversion in the resolution conversion circuits 210 and 230. This conversion will be described based on the reference document “Onoe: Image Processing Handbook, p. 630, Shosodo”.

図5(a)において、Pexは変換後の画素位置であり、当該Pexは図5(a)のように実数画素位置を指し示す。   In FIG. 5A, Pex is a pixel position after conversion, and the Pex indicates a real pixel position as shown in FIG.

そこで、入力信号の整数画素位置A,B,C,Dとの距離関係から、8つの領域に分けて図5(b)に示す論理式により、A〜Dの画素値Ia〜IdからPexの画素値Ipを求める。   Therefore, from the distance relationship with the integer pixel positions A, B, C, and D of the input signal, the pixel values Ia to Id of A to D are changed from Pex to Pex according to the logical expression shown in FIG. A pixel value Ip is obtained.

図4の発明ではアルファマップを縮小・拡大する際の誤差を許容する代わりに、符号量を低減することを目的としている。しかし、縮小・拡大率が固定になっていると、アルファマップ信号の誤差と符号量とのトレードオフを図ることは不可能である。   The invention of FIG. 4 aims to reduce the amount of code instead of allowing an error when reducing / enlarging the alpha map. However, when the reduction / enlargement ratio is fixed, it is impossible to trade off the error of the alpha map signal and the code amount.

図6は本発明のアルファマップ符号化回路200の構成を示す図である。図に示すように、本発明のアルファマップ符号化回路200は、解像度変換回路210,230、2値画像符号化回路220、多重化回路240とから構成されている。   FIG. 6 is a diagram showing the configuration of the alpha map encoding circuit 200 of the present invention. As shown in the figure, the alpha map encoding circuit 200 of the present invention includes resolution conversion circuits 210 and 230, a binary image encoding circuit 220, and a multiplexing circuit 240.

解像度変換回路210は解像度縮小変換用の変換回路であり、与えられる拡大率に従った縮小率でアルファマップを符号化し、また、解像度変換回路230は解像度縮拡大変換用の変換回路であって、与えられる拡大率に従った拡大率でアルファマップを符号化する機能を有する。   The resolution conversion circuit 210 is a conversion circuit for resolution reduction conversion, encodes an alpha map at a reduction rate according to a given enlargement rate, and the resolution conversion circuit 230 is a conversion circuit for resolution reduction / enlargement conversion, It has a function of encoding an alpha map at an enlargement rate according to a given enlargement rate.

解像度変換回路230は解像度変換回路210が解像度縮小変換したものを元のサイズに戻すために設けてあり、この解像度変換回路230により元のサイズに戻されたアルファマップが、線40を介して直交変換回路120,逆直交変換回路160に与えられるアルファマップ局部復号信号となる。   The resolution conversion circuit 230 is provided to restore the resolution reduced by the resolution conversion circuit 210 to the original size, and the alpha map restored to the original size by the resolution conversion circuit 230 is orthogonalized via the line 40. It becomes an alpha map local decoded signal given to the transform circuit 120 and the inverse orthogonal transform circuit 160.

2値画像符号化回路220は解像度変換回路210の出力する解像度縮小変換されたアルファマップ信号を2値画像符号化して出力するものであり、多重化回路240は2値画像符号化出力と前記与えられる拡大率の情報とを多重化して出力するものである。   The binary image encoding circuit 220 encodes and outputs a binary image encoded alpha map signal output from the resolution conversion circuit 210 and subjected to resolution reduction conversion. The multiplexing circuit 240 outputs the binary image encoded output and the given signal. The information of the enlargement ratio to be multiplexed is output.

このような構成のアルファマップ符号化回路200においては、線20を介して入力されるアルファマップを、解像度変換回路210により指定の拡大率で縮小符号化し、この符号化されたアルファマップ信号を線30を介して出力し、また、縮小符号化されたアルファマップ信号を解像度変換回路230により元の解像度に復号して得た局部復号信号を線40を介して直交変換回路120,逆直交変換回路160に出力する。   In the alpha map encoding circuit 200 having such a configuration, the alpha map input via the line 20 is reduced and encoded at a specified enlargement ratio by the resolution conversion circuit 210, and the encoded alpha map signal is converted into a line. 30, and the local decoded signal obtained by decoding the reduced-encoded alpha map signal to the original resolution by the resolution conversion circuit 230 is converted into an orthogonal transformation circuit 120 and an inverse orthogonal transformation circuit via a line 40. To 160.

すなわち、線60を介してアルファマップ符号化回路200に所望とする縮小・拡大率の設定情報を供給することで、上記トレードオフを図ることが可能となる。   That is, by supplying the desired reduction / enlargement ratio setting information to the alpha map encoding circuit 200 via the line 60, the above trade-off can be achieved.

線60を介して供給された縮小・拡大率の設定情報信号は、解像度変換回路210,230、2値画像符号化回路220に供給され、アルファマップ信号の発生符号量を制御することが可能となる。また、線60を介して供給された縮小・拡大率の符号(設定情報信号)は、多重化回路240にて、符号化されたアルファマップ信号と多重化され、線30を介して出力され、アルファマップの符号化信号として画像符号化装置の最終出力段である多重化回路180に与えられることになる。   The setting information signal of the reduction / enlargement ratio supplied via the line 60 is supplied to the resolution conversion circuits 210 and 230 and the binary image encoding circuit 220, and the generated code amount of the alpha map signal can be controlled. Become. Further, the code (setting information signal) of the reduction / enlargement ratio supplied via the line 60 is multiplexed with the encoded alpha map signal by the multiplexing circuit 240 and is output via the line 30. The encoded signal of the alpha map is supplied to the multiplexing circuit 180 which is the final output stage of the image encoding device.

一方、図7は図4のアルファマップ符号化回路に対するアルファマップ復号化回路の概念であり、図8は本発明の具体的なアルファマップ復号化回路400である。   On the other hand, FIG. 7 shows a concept of an alpha map decoding circuit for the alpha map encoding circuit of FIG. 4, and FIG. 8 shows a specific alpha map decoding circuit 400 of the present invention.

図に示すように、アルファマップ復号化回路400は、2値画像復号化回路410、解像度変換回路420、分離回路430にて構成される。分離回路430は、画像復号化装置の分離回路300で分離されて入力されたアルファマップ信号からアルファマップ信号の符号と縮小・拡大率の符号に分離する回路であり、2値画像復号化回路410はアルファマップ信号の符号を、分離回路430から分離して与えられる縮小・拡大率の符号にしたがって2値画像に戻す回路であり、解像度変換回路420はこの2値画像を、分離回路430から分離して与えられる縮小・拡大率の符号にしたがって解像度拡大変換して出力するものである。   As shown in the figure, the alpha map decoding circuit 400 includes a binary image decoding circuit 410, a resolution conversion circuit 420, and a separation circuit 430. The separation circuit 430 is a circuit that separates the alpha map signal separated and input by the separation circuit 300 of the image decoding apparatus into the code of the alpha map signal and the code of the reduction / enlargement ratio, and the binary image decoding circuit 410. Is a circuit that returns the code of the alpha map signal to a binary image according to the sign of the reduction / enlargement ratio given separately from the separation circuit 430, and the resolution conversion circuit 420 separates the binary image from the separation circuit 430. Thus, the resolution is enlarged and output in accordance with the sign of the reduction / enlargement ratio given.

図8において、線80を介してアルファマップ復号化回路400に供給された符号は、分離回路430によりアルファマップ信号の符号と縮小・拡大率の符号に分離され、各々線81および線82を介して出力される。   In FIG. 8, the code supplied to the alpha map decoding circuit 400 via the line 80 is separated into the code of the alpha map signal and the code of the reduction / enlargement ratio by the separation circuit 430, and the line 81 and the line 82 respectively. Is output.

2値画像復号化回路410では、線81を介して供給されるアルファマップ信号の符号と線82を介して供給される縮小・拡大率の符号から、縮小されたアルファマップ信号を再生し、線83を介して解像度変換回路420に供給する。解像度変換回路420では、線82を介して供給される縮小・拡大率の符号から、縮小されたアルファマップ信号を元のサイズに拡大してアルファマップ信号を再生した後、線90を介して出力する。   The binary image decoding circuit 410 reproduces the reduced alpha map signal from the code of the alpha map signal supplied via the line 81 and the code of the reduction / enlargement ratio supplied via the line 82, It is supplied to the resolution conversion circuit 420 via 83. The resolution conversion circuit 420 enlarges the reduced alpha map signal to the original size from the sign of the reduction / enlargement ratio supplied via the line 82, reproduces the alpha map signal, and then outputs it via the line 90. To do.

(第2の具体例)本発明ではアルファマップ信号の圧縮符号化に2値画像符号化を用いるが、次に、本発明の第2の具体例としてその2値画像符号化の詳細を図9および図10を用いて説明する。本具体例は、第1の具体例における2値画像符号化回路220に関するものである。   (Second Specific Example) In the present invention, binary image coding is used for compression coding of an alpha map signal. Next, as a second specific example of the present invention, details of the binary image coding will be described with reference to FIG. This will be described with reference to FIG. This specific example relates to the binary image encoding circuit 220 in the first specific example.

図10は本発明で用いる可変長符号の符号化コード例と、公知のMMR符号化での符号化コード例を対比して示す図であり、特定の状態情報をMMR符号化と本発明で用いられる可変長符号化ではどのようになるかを対比して示したものである。例えば、Pはパスモードを示し、これがMMR符号化では“0001”、本発明では“0000 001”と表し、また、V0 ,V1 ,V2 ,V3 ,V4,V5 はそれぞれ垂直モードを示しており、V0 は1ラインの同一位置、V1 は1ライン下の1画素分のずれ、V2 は1ライン下の2画素分のずれ、V3 は1ライン下の3画素分のずれ、V4 は1ライン下の4画素分のずれ、V5 は1ライン下の5画素分のずれという意味を持ち、これらをMMR符号化では“1”、“01S”、“0000 1S”、“0000 01S”、該当なし、該当なし、そして、本発明では“01”、“1S”、“001S”、“0001 S”、“0000 1S”、“0000 01S”、“0000 0001S”と表し、Hは水平モードでMMR符号化では“001”、本発明では“0000 1”と表し、さらに本発明ではESC符号を追加してこれを“0000 00001”と表し、といった具合であることを示している。   FIG. 10 is a diagram showing a comparison between an example of an encoding code of a variable length code used in the present invention and an example of an encoding code in a known MMR encoding, and specific state information is used in the MMR encoding and the present invention. This shows a comparison of what happens in the variable-length coding. For example, P represents a pass mode, which is represented as “0001” in MMR encoding, “0000 001” in the present invention, and V0, V1, V2, V3, V4, and V5 represent vertical modes, respectively. V0 is the same position on one line, V1 is one pixel below one line, V2 is two pixels below one line, V3 is one pixel below one line, V4 is one line below 4 pixel shift, V5 means 5 pixel down 1 line, these are MMR coding "1", "01S", "0000 1S", "0000 01S", not applicable, applicable None, and in the present invention, “01”, “1S”, “001S”, “0001 S”, “0000 1S”, “0000 01S”, “0000 0001S”, and H is the horizontal mode and MMR coding “001”, Invention is represents a "0000 1" indicates that further in the present invention represents this "0000 00001" by adding the ESC code, and so on.

なお、図10での符号中の“S”は、a1とb1の位置関係が左か右かを示すためのsign bitである。   Note that “S” in the reference numerals in FIG. 10 is a sign bit indicating whether the positional relationship between a1 and b1 is left or right.

また、図9は、MMR符号化で用いられている2値画像の2次元符号化を説明する図である。   FIG. 9 is a diagram for explaining two-dimensional encoding of a binary image used in MMR encoding.

この第2の具体例における2次元符号化では、例えば、図9(a)に示したように、参照ラインと符号化ライン上の5つの変化画素の位置関係を符号化するケースを例に説明する。但し、a1とb1の距離が3画素以内のときは垂直モード(V)とし、その距離を符号化し、それ以外の場合には水平モード(H)とすることにする。   In the two-dimensional encoding in the second specific example, for example, as shown in FIG. 9A, a case where the positional relationship between five change pixels on the reference line and the encoding line is encoded will be described as an example. To do. However, when the distance between a1 and b1 is within 3 pixels, the vertical mode (V) is set, and the distance is encoded, and otherwise the horizontal mode (H) is set.

ここで図9において、“a0”は符号化ライン上の起点変化画素であり、“a1”は符号化ライン上で“a0”よりも右にある最初の変化画素であり、“a2”は符号化ライン上で“a1”の次の変化画素であり、“b1”は参照ライン上で“a0”よりも右側にあって、しかも、“a0”と反対色の最初の変化画素である。   Here, in FIG. 9, “a0” is the starting change pixel on the encoding line, “a1” is the first change pixel on the right of “a0” on the encoding line, and “a2” is the code The change pixel next to “a1” on the conversion line, “b1” is on the right side of “a0” on the reference line, and is the first change pixel of the opposite color to “a0”.

また、“b2”は参照ライン上で“b1”の次の変化画素を示している。   “B2” indicates the next changed pixel of “b1” on the reference line.

この場合でのMMR符号化の手順は、つぎのようになる。   The procedure of MMR encoding in this case is as follows.

[1] 図9(b)に示すように、は参照ライン上での上記変化画素b2が、符号化ライン上での上記最初の変化画素a1よりも左側にあるときには、1ライン分の画素数分、飛ぶことを意味するパスモード(P)とし、符号化ライン上での上記起点変化画素a0の位置をb2の直下に移す。    [1] As shown in FIG. 9B, when the change pixel b2 on the reference line is on the left side of the first change pixel a1 on the encoding line, the number of pixels for one line. The path mode (P), which means flying, is moved, and the position of the starting point change pixel a0 on the encoding line is moved directly below b2.

[2] 図9(c)に示すような関係の場合には、変化画素b2がa1よりも左側にないのでパスモードとはならず、しかも、a1とb1の距離が3画素以内であるので、このときは垂直モード(V)とし、その距離を符号化し、a0をa1の位置に移す。    [2] In the case of the relationship shown in FIG. 9C, since the change pixel b2 is not on the left side of a1, the pass mode is not achieved, and the distance between a1 and b1 is within 3 pixels. In this case, the vertical mode (V) is set, the distance is encoded, and a0 is moved to the position a1.

[3] 図9(d)に示すように、それ以外の場合には、水平モード(H)とし、a0〜a1の長さとa1〜a2までの長さを符号化し、a0をa2の位置に移す。    [3] As shown in FIG. 9D, in other cases, the horizontal mode (H) is set, the lengths a0 to a1 and the lengths a1 to a2 are encoded, and a0 is set to the position a2. Transfer.

以上の各々のモード情報は、図10の可変長符号で符号化され、水平モードにおけるラン長はMH(Modified Huffman)にて符号化される(テレビジョン学会編:画像情報圧縮,オーム社,参照)。これがMMR符号化を用いた場合の符号化例である。   Each of the above mode information is encoded by the variable length code of FIG. 10, and the run length in the horizontal mode is encoded by MH (Modified Huffman) (Edition of Television Information: Image Information Compression, Ohmsha, see ). This is an example of encoding when MMR encoding is used.

一方、本具体例の手法の場合、図9に示す如き参照ラインと符号化ラインとの関係において、a1とb1の距離がM(:整数)画素以内のときは垂直モード(V)とする。ここで、a1とb1の距離がN(:整数,M≧N)画素以内のときは可変長符号化し、N画素よりも大きな場合はESC符号(エスケープ符号)と固定長符号で符号化するようにする。   On the other hand, in the case of the method of this specific example, the vertical mode (V) is set when the distance between a1 and b1 is within M (: integer) pixels in the relationship between the reference line and the coding line as shown in FIG. Here, when the distance between a1 and b1 is within N (: integer, M ≧ N) pixels, variable length coding is performed, and when the distance is larger than N pixels, coding is performed using an ESC code (escape code) and a fixed length code. To.

なお、この固定長符号は、(M−N+1)の値を2のベキ乗にしておけば、log2 (M−N+1)ビットの固定長符号となる。図10は、N=5とした場合の可変長符号の例である。 This fixed length code is a log 2 (M−N + 1) bit fixed length code if the value of (M−N + 1) is a power of 2. FIG. 10 is an example of a variable length code when N = 5.

さらに、2値画像符号化回路220で符号化されるアルファマップ信号の縮小画像の水平方向の画素数は分かっているので、例えばこの水平方向の画素数が“128”画素であった場合、log2 (M−N+1)の最大値は7ビットとなるため、3ビットの付加情報を付けることでMの値を変えることもできる。 Further, since the number of pixels in the horizontal direction of the reduced image of the alpha map signal encoded by the binary image encoding circuit 220 is known, for example, when the number of pixels in the horizontal direction is “128” pixels, log 2 Since the maximum value of (M−N + 1) is 7 bits, the value of M can be changed by attaching 3-bit additional information.

また、MMR符号化では水平モードにおいてラン長をMHで符号化しているが、ラン長の発生頻度分布がアルファマップ信号の水平方向の画素数によって変動する。従って、ラン長をアルファマップ信号の水平方向の画素数に応じて固定長符号化しても良い(水平方向の画素数が“128”画素の場合には、ラン長は7ビットで固定長符号化される)。   In MMR encoding, the run length is encoded with MH in the horizontal mode, but the frequency distribution of the run length varies depending on the number of pixels in the horizontal direction of the alpha map signal. Accordingly, the run length may be fixed-length encoded according to the number of pixels in the horizontal direction of the alpha map signal (if the number of pixels in the horizontal direction is “128” pixels, the run length is 7 bits and the fixed-length encoding is performed. )

さらに、動画像符号化の場合には、フレーム間の相関が高い場合に、図28のように、2値画像符号化回路220は、2次元符号化回路221、ラインメモリ222、フレームメモリ223とより構成し、ラインメモリ222に前ラインの画像を保持させるようにし、このラインメモリ222に蓄積されている前ラインを参照するだけでなく、さらに前フレームで符号化したアルファマップ信号をフレームメモリ223に蓄積しておくようにし、前フレームのラインを参照して2次元符号化回路221において符号化するようにした方が符号化効率が高くなる場合がある。   Further, in the case of moving image coding, when the correlation between frames is high, as shown in FIG. 28, the binary image coding circuit 220 includes a two-dimensional coding circuit 221, a line memory 222, and a frame memory 223. The line memory 222 holds the image of the previous line, and not only refers to the previous line stored in the line memory 222 but also the alpha map signal encoded in the previous frame is converted into the frame memory 223. In some cases, the encoding efficiency may be higher when the two-dimensional encoding circuit 221 performs encoding with reference to the previous frame line.

また、図2および図3の動き補償予測回路110,350で用いる動きベクトルを用いて、前フレームの参照ラインを動き補償しても良い。   In addition, the motion vector used in the motion compensation prediction circuits 110 and 350 in FIGS. 2 and 3 may be used to compensate the motion of the reference line of the previous frame.

このように、本具体例の手法の場合、図9に示す如き参照ラインと符号化ラインとの関係において、a1とb1の距離がM(:整数)画素以内のときは垂直モード(V)とし、かつ、a1とb1の距離がN(:整数,M≧N)画素以内のときは可変長符号化し、N画素よりも大きな場合はESC符号(エスケープ符号)と固定長符号で符号化する方式としたことにより、MMR符号化を用いる場合に比べて高い圧縮率で符号化できるようになる。   Thus, in the case of the method of this specific example, when the distance between a1 and b1 is within M (: integer) pixels in the relationship between the reference line and the coding line as shown in FIG. 9, the vertical mode (V) is set. In addition, when the distance between a1 and b1 is within N (: integer, M ≧ N) pixels, variable length coding is performed, and when the distance is larger than N pixels, coding is performed using an ESC code (escape code) and a fixed length code. As a result, encoding can be performed at a higher compression rate than when MMR encoding is used.

具体的手法を、次に説明する。   A specific method will be described next.

[第2の具体例のその1]さらに高能率圧縮符号化を図ることができるようにした別の例を説明する。   [Part 1 of the second specific example] Another example in which high-efficiency compression coding can be achieved will be described.

<方式1>図11は2値画像の符号化法である公知のMMRの符号化手順を表すフローチャートである。すなわち、符号化ライン上の起点変化画素a0の画素位置情報を初期化し(S101)、符号化ライン上で“a0”位置よりも右にある最初の変化画素a1を検出し(S102)、参照ライン上で“a0”位置よりも右側にあって、しかも、“a0”位置の画素と反対色の最初の変化画素b1と、参照ライン上で“b1”位置の次に表れる変化画素b2を検出し(S103)、次にb2とa1の画素位置関係がb2<a1であるか否かを調べ(S104)、b2<a1であれば、パスモード(P)にしてa0の画素位置情報をb2の画素位置情報にセットし(S105,S106)、S103の処理に戻る。   <Method 1> FIG. 11 is a flowchart showing a known MMR encoding procedure which is a binary image encoding method. That is, the pixel position information of the starting point change pixel a0 on the encoding line is initialized (S101), the first change pixel a1 on the right of the “a0” position on the encoding line is detected (S102), and the reference line The first change pixel b1 that is on the right side of the “a0” position and opposite to the pixel at the “a0” position and the change pixel b2 that appears next to the “b1” position on the reference line are detected. (S103) Next, it is checked whether or not the pixel position relationship between b2 and a1 is b2 <a1 (S104). If b2 <a1, the pass mode (P) is set and the pixel position information of a0 is set to b2. The pixel position information is set (S105, S106), and the process returns to S103.

S104での判断の結果、b2<a1でなければ、|a1−b1|≦N(Nはある閾値)であるか否かを判断し(S107)、その結果、|a1−b1|≦Nであれば垂直モード(V)にしてa0の画素位置をa1の画素位置にし(S108,S109)、S110の処理に入る。S110ではa0が“WIDTH ”(画像の横幅方向の画素数)対応の位置であるか否かを判断し、そうでなければS102の処理に戻る。S110での判定の結果、a0が“WIDTH ”対応の位置であれば、画像の最後であるか否かを調べ(S111)、画像の最後で無ければS101の処理に戻る。S110での判定の結果、画像の最後であったならば、処理を終了する。   If b2 <a1 as a result of the determination in S104, it is determined whether or not | a1-b1 | ≦ N (N is a threshold) (S107), and as a result, | a1-b1 | ≦ N. If there is, the vertical mode (V) is set, the pixel position of a0 is changed to the pixel position of a1 (S108, S109), and the process of S110 is started. In S110, it is determined whether or not a0 is a position corresponding to “WIDTH” (the number of pixels in the horizontal width direction of the image). Otherwise, the process returns to S102. As a result of the determination in S110, if a0 is a position corresponding to “WIDTH”, it is checked whether it is the end of the image (S111), and if it is not the end of the image, the process returns to S101. If the result of determination in S110 is the end of the image, processing ends.

S107での判定の結果、|a1−b1|≦Nでなければa2を検出し(S112)、水平モード(H)にして“a0”の画素位置を“a2”の画素位置にし(S113,S114)、S110の処理に入る。S110では“a0”が“WIDTH ”であるかを判断し、そうでなければS102の処理に戻る。   If | a1-b1 | ≦ N as a result of the determination in S107, a2 is detected (S112), the horizontal mode (H) is set, and the pixel position “a0” is changed to the pixel position “a2” (S113, S114). ), The process enters S110. In S110, it is determined whether “a0” is “WIDTH”. Otherwise, the process returns to S102.

なお、“WIDTH ”は図12に示すように、1画面の水平方向1ラインの画素数(ラスタ走査の1ラインの画素数)である。   As shown in FIG. 12, “WIDTH” is the number of pixels in one horizontal line of one screen (the number of pixels in one line of raster scanning).

すなわち、MMRの符号化は1ライン単位で処理を進めるもので、ラスタ走査の1ライン毎に符号化処理を行って符号化してゆく方式である。   In other words, MMR encoding is performed in units of lines, and is performed by performing encoding processing for each line of raster scanning.

ここで、本発明での符号化処理の適用対象となるアルファマップ信号、すなわち、オブジェクトと背景とを区別するための2値画像は、図12(a)に例示される様な、ラスタ走査1ライン毎に変化点が2点程度の単純図形の揚合が殆どである。そして、図11に示したMMRの符号化のように、ラスタ走査の1ライン毎に符号化処理を行うと、符号化すベき変化画素はオブジェクトと背景の境界部のみであるにもかかわらず、画面の右端も変化画素として符号化しなくてはならないため、圧縮符号量の点から考えて効率的でない。   Here, an alpha map signal to which the encoding process according to the present invention is applied, that is, a binary image for distinguishing between an object and a background is a raster scan 1 as illustrated in FIG. Most of the simple figures have about 2 change points for each line. When the encoding process is performed for each line of raster scanning as in the MMR encoding shown in FIG. 11, the change pixel to be encoded is only the boundary between the object and the background. Since the right end of the screen must also be encoded as a change pixel, it is not efficient in terms of the compression code amount.

従って、ここで説明する本発明方式においては、ライン内で“a1”や“b1”を検出するのではなく、図13に示すように、ラスタスキャン順で“a1”や“b1”を検出するようにし、これによって境界部の変化画素のみを符号化できるようにする。   Therefore, in the method of the present invention described here, “a1” and “b1” are not detected in the line, but “a1” and “b1” are detected in the raster scan order as shown in FIG. Thus, only the change pixels at the boundary can be encoded.

MMR符号化のように、ライン毎に符号化処理を行う場合には、“a1”や“b1”は、当該ライン左端からのアドレスであったが、本発明方式においては、ラスタ走査順に“a1”や“b1”を検出して符号化処理するために、“a1”および“b1”は以下のように定義される。   When encoding processing is performed for each line as in MMR encoding, “a1” and “b1” are addresses from the left end of the line, but in the method of the present invention, “a1” "A1" and "b1" are defined as follows in order to detect "" and "b1" and perform the encoding process.

a1= abs_a1−(int)(abs _a0/WIDTH)*WIDTHb1= abs_b1−((int)(abs_a0/WIDTH)−1)*WIDTH
ここで、 abs_a1(abs_b1,abs_a0)は画面左上端からのラスタ順のアドレスである。なお、“*”は乗算を、また、“(int)(x)”はxの小数点以下切り捨てを意味する。
a1 = abs_a1- (int) (abs_a0 / WIDTH) * WIDTHb1 = abs_b1-((int) (abs_a0 / WIDTH) -1) * WIDTH
Here, abs_a1 (abs_b1, abs_a0) is an address in raster order from the upper left corner of the screen. “*” Means multiplication, and “(int) (x)” means truncation after the decimal point of x.

この際の参照ラインは、図13(c),(d)のクロスハッチ掛け領域で表されるように、a0位置の画素から“WIDTH ”相当分の画素数遡った位置までの領域である。ここで、図13(c)は図13(a)の、図13(d)は図13(b)の参照ラインである。   The reference line at this time is an area from the pixel at the a0 position to a position retroactive to the number of pixels corresponding to “WIDTH”, as represented by the cross-hatched areas in FIGS. 13 (c) and 13 (d). Here, FIG. 13 (c) is a reference line of FIG. 13 (a), and FIG. 13 (d) is a reference line of FIG. 13 (b).

そのため、本発明方式では、パスモードの符号P、水平モードの符号H、そして白画素及び黒画素のランレングス符号を使用して図14に示す如きに符号化する。   Therefore, in the method of the present invention, encoding is performed as shown in FIG. 14 using a pass mode code P, a horizontal mode code H, and run length codes of white and black pixels.

ここで、Pはパスモード符号であって、2次元符号化のテーブルに含まれる符号であり、また、Hは水平モード符号であって、これも2次元符号化のテーブルに含まれる符号であり、これらに続く白及び斜線の長方形は、白画素及び黒画素のランレングス符号を表している。   Here, P is a pass mode code, which is a code included in the two-dimensional encoding table, and H is a horizontal mode code, which is also a code included in the two-dimensional encoding table. The white and hatched rectangles following these represent run-length codes of white pixels and black pixels.

しかし、上記のようにラスタ順で符号化処理を行うようにすると、図14(a)の画像の場合では複数ラインに亙って変化画素が無いので、この場合には、図14(b)のように画像の水平方向の構成画素数(WIDTH )を越えるラン長が発生することとなってしまう。   However, if the encoding process is performed in the raster order as described above, in the case of the image of FIG. 14A, there are no change pixels over a plurality of lines. In this case, in FIG. As a result, a run length exceeding the number of constituent pixels (WIDTH) in the horizontal direction of the image occurs.

そのため、本発明方式ではこれに対処するために、垂直方向にラインをパスするための符号として、垂直パスモード符号Vをさらに用意した。   Therefore, in the system of the present invention, in order to cope with this, a vertical pass mode code V is further prepared as a code for passing a line in the vertical direction.

そして、最大ラン長が画像の水平方向の構成画素数 WIDTHを越える場合には、垂直パスモード(V)を適用する。垂直パスモード符号Vは 垂直方向にラインをパスする指示であるため、ラン長がこの“ WIDTH”相当の値以上であっても次のライン内に出現する場合には表現できなくなるので、その場合のための符号として水平モード(ランレングス符号化)からのエスケープ符号を用意した。   When the maximum run length exceeds the number of constituent pixels WIDTH in the horizontal direction of the image, the vertical pass mode (V) is applied. Since the vertical pass mode code V is an instruction to pass the line in the vertical direction, even if the run length is greater than or equal to this “WIDTH” value, it cannot be expressed if it appears in the next line. An escape code from the horizontal mode (run-length encoding) was prepared as a code for.

この垂直パスモードでは、水平モードで使用されるラン長の最大値は水平方向の画素数 WIDTHとし、ラン長がこの WIDTH相当の値となる場合では、これを表す符号として水平モード(ランレングス符号化)からのエスケープ符号を用いるようにする。   In this vertical pass mode, the maximum run length used in the horizontal mode is the number of pixels in the horizontal direction WIDTH. If the run length is a value equivalent to this WIDTH, the horizontal mode (run length code) )).

図15は、垂直パスモードの例である。図15(a)の例では、ランレングス符号化からのエスケープ符号と垂直モード符号を用いて垂直パスモードを形成する例である。なお、a0からまるまる1ラインを飛び越えてその次のラインにa1が表れる図15(b)の如きの例の場合には、白ランの長さが画像の水平方向の構成画素数“WIDTH ”より大きくても、パスモードを使用して表現することができるので、垂直パスモードで符号化する必要はない。   FIG. 15 is an example of the vertical path mode. The example of FIG. 15A is an example in which a vertical path mode is formed using an escape code and a vertical mode code from run-length encoding. In the case of the example shown in FIG. 15B in which a1 appears on the next line after jumping over a whole line from a0, the length of the white run is determined from the number of constituent pixels “WIDTH” in the horizontal direction of the image. Even if it is large, it can be expressed using the pass mode, so there is no need to encode in the vertical pass mode.

さらに、図15(c)の例では、a0からまるまる3ラインを飛び越えてその次のラインにa1が表れているが、この場合にそのライン数分を飛び越える(つまり、パスさせる)ことを指示するための垂直パスモードの符号(VP)を可変長符号テーブル内に用意し、この垂直パスモードの符号VPを使用して対処する例である。この場合の表現はパスさせるライン数を垂直モードで表現するもので、この符号VPの表す情報は、“水平モード(H)+最大ラン長”と等価である。   Furthermore, in the example of FIG. 15C, a1 appears on the next line after jumping over the whole three lines from a0. In this case, it is instructed to jump over the number of lines (that is, to pass). In this example, a vertical path mode code (VP) is prepared in a variable-length code table, and this vertical path mode code VP is used. In this case, the number of lines to be passed is expressed in the vertical mode, and the information represented by the code VP is equivalent to “horizontal mode (H) + maximum run length”.

なお、図15(c)のように、パスさせるライン数を垂直モードで表現するのではなく、次の変化画素のアドレス(SP(a1))を符号化してもよい。   As shown in FIG. 15C, the number of lines to be passed may not be expressed in the vertical mode, but the address (SP (a1)) of the next change pixel may be encoded.

本発明の符号化手法が適用されるアルファマップ信号、すなわち、オブジェクトと背景とを区別するための2値画像では、図16(a)のように最初の数ラインには変化画素が無い場合が多い。本発明では垂直パスモードVPを使用することができることから、図16(a)のような画像の場合に、図16(b)、(c)のように画面の先頭から垂直パスモードを適用することで、符号量の縮減が図れるようになる。   In an alpha map signal to which the encoding method of the present invention is applied, that is, a binary image for distinguishing an object from a background, there may be no change pixel in the first few lines as shown in FIG. Many. Since the vertical pass mode VP can be used in the present invention, the vertical pass mode is applied from the top of the screen as shown in FIGS. 16B and 16C in the case of an image as shown in FIG. As a result, the amount of code can be reduced.

図16(b)の例は、垂直モード符号V0 を使用してパスさせるライン数を表現する方法である。この例の場合は、パスさせるライン数が4ライン分であるので、垂直モード符号V0 を4つ並べる。そして、a1が表れるラインについては、そのラインの先頭からa1までの白ラン長と水平モード符号Hを用いて“H+白ラン長”で表し、さらにa1からa2までの間の黒画素数を並べて“V0 ”+“V0 ”+“V0 ”+“V0 ”+“H”+“白画素数を示すランレングス符号”+“黒画素数を示すランレングス符号”なるかたちで表現する。   The example of FIG. 16B is a method of expressing the number of lines to be passed using the vertical mode code V0. In this example, since the number of lines to be passed is four lines, four vertical mode codes V0 are arranged. For the line in which a1 appears, the white run length from the head of the line to a1 and the horizontal mode code H are used to represent “H + white run length”, and the number of black pixels from a1 to a2 is arranged. It is expressed in the form of “V0” + “V0” + “V0” + “V0” + “H” + “run length code indicating the number of white pixels” + “run length code indicating the number of black pixels”.

また、図16(c)の例は、画面内の最初の変化画素のアドレス(SP(a1))を符号化するようにした方法であり、“SP(a1)+黒画素数を示すランレングス符号”なるかたちで表現する。   In addition, the example of FIG. 16C is a method in which the address (SP (a1)) of the first changed pixel in the screen is encoded, and “SP (a1) + run length indicating the number of black pixels” is used. Expressed in the form of “sign”.

従って、このような手法を、アルファマップ信号の符号化に適用することで、高能率の圧縮符号化が可能になる。   Therefore, by applying such a method to the encoding of the alpha map signal, highly efficient compression encoding becomes possible.

<方式2>以上の例では、水平モードでは、(a1−a0)、(a2−a1)をランレングス符号化しているが、これはMMRの水平モードの表現法を継承しているだけである。そこで、ここでは、水平モードでは(a1−a0)だけをランレングス符号化し、a2が他のモード(例えば、垂直モード)で符号化できる場合には、当該a2を他のモードで符号化するような符号化方式を提案する。   <Method 2> In the above example, (a1-a0) and (a2-a1) are run-length encoded in the horizontal mode, but this only inherits the MMR horizontal mode expression method. . Therefore, here, in the horizontal mode, only (a1-a0) is run-length encoded, and when a2 can be encoded in another mode (for example, vertical mode), the a2 is encoded in the other mode. A new coding scheme is proposed.

図17は、このような方式を適用する場合の符号化手順を説明するフローチャートである。ここでの処理は、まず、符号化ライン上の起点変化画素a0の画素位置情報を初期化し(S201)、符号化ライン上で“a0”位置よりも右にある最初の変化画素a1の検出処理をし(S202)、参照ライン上で“a0”位置よりも右側にあって、しかも、“a0”位置の画素と反対色の最初の変化画素b1と、参照ライン上で“b1”位置の次に表れる変化画素b2の検出処理をし(S203)、次にb1が検出されたか否かをチェックする(S204)。その結果、b1が検出されていれば次にa0からa1までの間の画素数が2*WIDTHより小さいか調べ(S205)、小さければb2<a1であるか否かを調べる(S206)。   FIG. 17 is a flowchart for explaining an encoding procedure when such a method is applied. In this process, first, pixel position information of the starting point change pixel a0 on the encoding line is initialized (S201), and detection processing of the first change pixel a1 on the right of the “a0” position on the encoding line is performed. (S202), on the reference line to the right of the “a0” position, the first change pixel b1 of the opposite color to the pixel at the “a0” position, and the “b1” position on the reference line. Is detected (S203), and then it is checked whether b1 is detected (S204). As a result, if b1 is detected, it is checked whether the number of pixels between a0 and a1 is smaller than 2 * WIDTH (S205), and if it is smaller, it is checked whether b2 <a1 (S206).

その結果、b2<a1の関係にあれば、パスモード(P)にしてa0の画素位置情報をb2の画素位置情報にセットし(S207,S208)、S203の処理に戻る。   As a result, if the relationship of b2 <a1 is established, the pass mode (P) is set, the pixel position information of a0 is set to the pixel position information of b2 (S207, S208), and the process returns to S203.

一方、S206において、b2<a1でなければ、|a1−b1|≦9であるか否かを判断し(S209)、その結果、|a1−b1|≦9であれば垂直モード(V)にしてa0の画素位置をa1の画素位置にし(S210,S211)、S212の処理に入る。S212では画像の最後か否かを判断し、最後であれば処理を終了し、最後でなければS202の処理に戻る。   On the other hand, if b2 <a1 is not satisfied in S206, it is determined whether or not | a1-b1 | ≦ 9 (S209). As a result, if | a1-b1 | ≦ 9, the vertical mode (V) is set. Then, the pixel position of a0 is changed to the pixel position of a1 (S210, S211), and the process of S212 is started. In S212, it is determined whether or not it is the last of the image. If it is the last, the process ends. If not, the process returns to S202.

また、S209での判断の結果、|a1−b1|≦9でなかったときには、a2の検出処理をし、a1とa2との間の画素数が画像の水平方向構成画素数“WIDTH ”以下であるかを判断し(S214)、そうであれば垂直モードとし(S215)、a0をa2にセットする(S216)。そして、S212の判断処理に移る。   If it is not | a1-b1 | ≦ 9 as a result of the determination in S209, the detection processing of a2 is performed, and the number of pixels between a1 and a2 is equal to or less than the number of horizontal constituent pixels “WIDTH”. It is determined whether there is (S214). If so, the vertical mode is set (S215), and a0 is set to a2 (S216). Then, the process proceeds to S212.

S214での判断の結果、a1とa2との間の画素数が画像の水平方向構成画素数“WIDTH ”以下でなければ、垂直パスモードとし(S217)、a0をa2にセットする(S218)。そして、S212の判断処理に移る。   If the result of determination in S214 is that the number of pixels between a1 and a2 is not less than the number of pixels constituting the horizontal direction of the image “WIDTH”, the vertical pass mode is set (S217), and a0 is set to a2 (S218). Then, the process proceeds to S212.

また、S205での判断の結果、a0からa1までの間の画素数が2*WIDTHより小さくなればa2の検出処理を行い(S219)、次に垂直パスモードとし(S217)、a0をa2にセットする(S218)。そして、S212の判断処理に移る。   If the result of determination in S205 is that the number of pixels between a0 and a1 is smaller than 2 * WIDTH, a2 detection processing is performed (S219), then the vertical pass mode is set (S217), and a0 is set to a2. Set (S218). Then, the process proceeds to S212.

これにより、水平モードでは(a1−a0)だけをランレングス符号化し、a2が他のモード(例えば、垂直モード)で符号化できる場合には、当該a2を他のモードで符号化するといった符号化方式が実現できることになる。   Thus, in the horizontal mode, only (a1-a0) is run-length encoded, and when a2 can be encoded in another mode (for example, vertical mode), the a2 is encoded in another mode. The method can be realized.

[第2の具体例のその2]ここでは、前フレームのラインを参照ラインとすることで、フレーム間の相関を利用して符号化処理効率を向上させるようにする具体例を説明する。図18は、本発明を適用した符号化/復号化装置のブロック構成図である。図中、2000は符号化/復号化回路であり、画像データを符号化処理して出力し、また、入力された符号化画像データを復号化して出力する回路である。2100はラスタ走査に対応するライン単位の画像情報を保持するラインメモリであり、フレーム内の参照ラインとフレーム間の参照ラインの画像情報を保持するものである。また、2200はセレクタ、2300a,2300bはそれぞれフレーム画像を保持するフレームメモリ、2400は動き補償予測回路である。   [Second Example of Second Example] Here, a specific example will be described in which the line of the previous frame is used as a reference line to improve the encoding processing efficiency using the correlation between frames. FIG. 18 is a block diagram of an encoding / decoding device to which the present invention is applied. In the figure, reference numeral 2000 denotes an encoding / decoding circuit, which encodes and outputs image data, and decodes and outputs input encoded image data. Reference numeral 2100 denotes a line memory that holds image information in units of lines corresponding to raster scanning, and holds image information of reference lines in a frame and reference lines between frames. Further, 2200 is a selector, 2300a and 2300b are frame memories for holding frame images, and 2400 is a motion compensation prediction circuit.

フレームメモリ2300aおよび2300bは現フレームの画像データをそれぞれ保持するメモリであり、動き補償予測回路2400はフレームメモリ2300bの画像データから動き補償予測を行ってその動き補償予測済みの画像データを出力するものである。   The frame memories 2300a and 2300b are memories that respectively hold the image data of the current frame, and the motion compensation prediction circuit 2400 performs motion compensation prediction from the image data of the frame memory 2300b and outputs the motion compensated image data. It is.

また、セレクタ2200は符号化/復号化回路2000の出力するモード切り替え信号により、動き補償予測回路2400の出力する画像データまたはフレームメモリ2300aからの画像データのいずれか一方を選択してラインメモリ2100に出力する回路である。また、ラインメモリ2100はこのセレクタ2200を介して得られた画像データをライン単位で保持し、符号化/復号化回路2000に渡し、符号化/復号化回路2000はこのライン単位の画像データを用いて符号化もしくは復号化処理する回路である。   In addition, the selector 2200 selects either the image data output from the motion compensation prediction circuit 2400 or the image data from the frame memory 2300a according to the mode switching signal output from the encoding / decoding circuit 2000, and stores it in the line memory 2100. It is a circuit to output. Also, the line memory 2100 holds the image data obtained via the selector 2200 in units of lines and passes them to the encoding / decoding circuit 2000. The encoding / decoding circuit 2000 uses the image data in units of lines. This is a circuit that performs encoding or decoding processing.

このような構成の本システムにおいて、符号化/復号化回路2000は入力される画像情報をラインメモリ2100の内容を参照しながらラスタ走査の順に従って符号化して出力OUTより出力し、また、この符号化した内容は復号化してフレームメモリ2300a,2300bに入力して蓄える。フレームメモリ2300a,2300b内の復号化された画像の情報は読み出されてセレクタ2200に、あるいは動き補償予測回路2400を介して動き補償予測処理され、セレクタ2200に与えられる。   In this system having such a configuration, the encoding / decoding circuit 2000 encodes input image information in the order of raster scanning while referring to the contents of the line memory 2100, and outputs the encoded image information from the output OUT. The converted contents are decrypted and input to and stored in the frame memories 2300a and 2300b. The decoded image information in the frame memories 2300a and 2300b is read out and subjected to motion compensation prediction processing via the selector 2200 or via the motion compensation prediction circuit 2400, and is provided to the selector 2200.

セレクタ2200は、符号化/復号化回路2000より線10を介して供給されるモード切り換え信号(フレーム内/フレーム間)に従って、入力切り替えされ、ラインメモリ2100はこのセレクタ2200を介してフレームメモリ2300a,2300bからの画像情報が与えられることにより、ラインメモリ2100には、モード切り換え信号(フレーム内/フレーム間)に応じて、選択入力されることになるフレーム内の参照ラインとフレーム間の参照ラインのいずれかが逐次蓄えられる。   The selector 2200 performs input switching according to a mode switching signal (intra-frame / between frames) supplied from the encoding / decoding circuit 2000 via the line 10, and the line memory 2100 receives frame memory 2300a, Given the image information from 2300b, the line memory 2100 is supplied with the reference line in the frame and the reference line between the frames to be selected and input in accordance with the mode switching signal (intra-frame / inter-frame). Either one is stored sequentially.

ここで、フレームメモリ2300a,2300bには符号化/復号化回路2000により符号化/復号化処理されることにより得られた当該フレームの復号済みの画素値と、復号済みの参照フレームの画素値が蓄えられている。なお、フレーム間の参照ラインは、動き補償予測回路2400にて動き補償した信号を用いても良い。   Here, in the frame memories 2300a and 2300b, the decoded pixel value of the frame obtained by the encoding / decoding processing by the encoding / decoding circuit 2000 and the pixel value of the decoded reference frame are stored. It is stored. Note that, as a reference line between frames, a signal subjected to motion compensation by the motion compensation prediction circuit 2400 may be used.

また図19(a),(b)のクロスハッチ部は、ラスタ順に符号化する場合のフレーム内とフレーム間の参照ラインの例である。図19(a)はフレーム内の参照ラインであり、以後、これを“ABOVE LINE”と呼ぶことにする。図19(b)はフレーム間の参照ラインであり、参照フレーム内のa0と同じ、あるいは動き補償後のアドレスa0´に対して図のように設定されるもので、以後、これを“PREVIOUS LINE ”と呼ぶことにする。   19A and 19B are examples of reference lines within and between frames when encoding is performed in raster order. FIG. 19A shows a reference line in a frame, which is hereinafter referred to as “ABOVE LINE”. FIG. 19B shows a reference line between frames, which is the same as a0 in the reference frame or is set as shown in the figure with respect to the address a0 ′ after motion compensation. This is hereinafter referred to as “PREVIOUS LINE”. I will call it.

参照ラインを切り換えるためのモード情報は、符号化/復号化回路2000により、例えば、複数のラインで構成されるブロックライン毎に別途符号化される。   The mode information for switching the reference line is separately encoded by the encoding / decoding circuit 2000, for example, for each block line composed of a plurality of lines.

図20は、本具体例の符号化手順を表すフローチャートであり、符号化/復号化回路2000は、まず、初めに符号化ライン上の起点変化画素a0の画素位置情報を初期化し(S301)、次に起点画素a0が属するラインのモードがフレーム内(INTRA)であるか否かを調べる(S302)。その結果、フレーム内(INTRA)であれば“ABOVE LINE”をラインメモリ2100に読み込む(S302)が、フレーム内(INTRA)でなければ“PREVIOUS LINE ”を図18のラインメモリ2100に読み込むように制御する(S309)。   FIG. 20 is a flowchart showing the encoding procedure of this example. The encoding / decoding circuit 2000 first initializes the pixel position information of the starting point change pixel a0 on the encoding line (S301). Next, it is checked whether or not the mode of the line to which the origin pixel a0 belongs is within the frame (INTRA) (S302). As a result, if it is within the frame (INTRA), “ABOVE LINE” is read into the line memory 2100 (S302). If not within the frame (INTRA), “PREVIOUS LINE” is read into the line memory 2100 of FIG. (S309).

そして、次にa1の検出処理をし(S304)、さらにb1,b2の検出処理をし(S305)、次にb2とa1の画素位置関係がb2<a1であるか否かを調べ(S306)、b2<a1であれば、パスモード(P)にしてa0の画素位置情報をb2の画素位置情報にセットし(S307,S308)、S304の処理に戻る。   Next, a1 detection processing is performed (S304), b1 and b2 detection processing is performed (S305), and then whether or not the pixel positional relationship between b2 and a1 is b2 <a1 is checked (S306). If b2 <a1, the pass mode (P) is set, the pixel position information of a0 is set to the pixel position information of b2 (S307, S308), and the process returns to S304.

S306の処理において、b2とa1の画素位置関係がb2<a1でなければ、|a1−b1|≦N(Nはある閾値)であるか否かを判断し(S310)、その結果、|a1−b1|≦Nであれば垂直モード(V)にしてa0の画素位置をa1の画素位置にし(S311,S312)、S313の処理に入る。S313ではa0が“WIDETH”(画像の横幅方向の画素数)対応の位置であるか否かを判断し、そうでなければS304の処理に戻る。S313での判定の結果、a0が“WIDETH”対応の位置であれば、画像の最後であるか否かを調べ(S314)、画像の最後で無ければS301の処理に戻る。S314での判定の結果、画像の最後であったならば、処理を終了する。   If the pixel positional relationship between b2 and a1 is not b2 <a1 in the process of S306, it is determined whether or not | a1-b1 | ≦ N (N is a certain threshold value) (S310). As a result, | a1 If −b1 | ≦ N, the vertical mode (V) is set, the pixel position of a0 is changed to the pixel position of a1 (S311 and S312), and the process of S313 is started. In S313, it is determined whether or not a0 is a position corresponding to “WIDETH” (the number of pixels in the horizontal width direction of the image). If not, the process returns to S304. As a result of the determination in S313, if a0 is a position corresponding to “WIDETH”, it is checked whether or not it is the end of the image (S314), and if it is not the end of the image, the process returns to S301. If the result of determination in S314 is the end of the image, processing ends.

S310での判定の結果、|a1−b1|≦Nでなければa2を検出し(S315)、水平モード(H)にして“a0”の画素位置を“a2”の画素位置にし(S316,S317)、S313の処理に入る。   If | a1-b1 | ≦ N as a result of determination in S310, a2 is detected (S315), the horizontal mode (H) is set, the pixel position “a0” is changed to the pixel position “a2” (S316, S317). ), The process enters S313.

すなわち、以上の手順は、起点画素a0が属するラインのモードがフレーム内(INTRA)の場合には“ABOVE LINE”を、また、フレーム間“(INTRA)”の場合には“PREVIOUS LINE ”を図18のラインメモリ2100に読み込む。“PREVIOUSLINE ”を参照ラインとするとき、符号化ラインと全く同じか、あるいは誤差が非常に小さい場合には、“NOT CODED ”すなわち、符号化ラインを符号化せずに参照ラインの信号をそのままコピーするというものであり、“PREVIOUS LINE ”を参照ラインとするとき、符号化ラインと全く同じか、あるいは誤差が非常に小さい場合には、符号化ラインを符号化せずに参照ラインの信号をそのままコピーすることで、発生符号量を削減することができる。   That is, the above procedure displays “ABOVE LINE” when the mode of the line to which the origin pixel a0 belongs is within the frame (INTRA), and “PREVIOUS LINE” when the mode between the frames is “(INTRA)”. 18 line memory 2100 is read. When “PREVIOUSLINE” is used as the reference line, if it is exactly the same as the encoded line or the error is very small, “NOT CODED”, that is, the signal of the reference line is copied as it is without encoding the encoded line. When “PREVIOUS LINE” is used as a reference line, if the code line is exactly the same or the error is very small, the signal of the reference line is left as it is without encoding the code line. By copying, the amount of generated codes can be reduced.

図21は、この方式を使用した場合での人物像アルファマップに対するブロックライン毎の、モードの切り換えの例である。ブロックラインとは、隣接する複数のライン単位で構成したブロックを示しており、頭頂部近傍に相当する部分が占める第0および第1ブロックラインではそれぞれ“INTRA ”、顔部分に相当する部分が占める第2〜第4ブロックラインでは互いの違いが少ないのでそれぞれ“NOT CODED ”、肩部胸部近傍に相当する部分が占める第5〜第8ブロックラインではそれぞれ“INTRA ”のラインモードとなっていることを示している。   FIG. 21 is an example of mode switching for each block line with respect to the human image alpha map when this method is used. The block line is a block composed of a plurality of adjacent lines. The 0th and 1st block lines occupied by the portion corresponding to the vicinity of the top of the head are respectively “INTRA” and the portion corresponding to the face portion. Since there is little difference between the 2nd to 4th block lines, the line mode is “NOT CODED”, and the 5th to 8th block lines occupied by the area corresponding to the vicinity of the shoulder chest are “INTRA”. Is shown.

また図22は、ラスタ順に符号化する場合に、“NOT CODED ”となるブロックラインの符号化をスキップする際の具体例を説明するものである。本発明では、起点画素a0が属するラインの属性(“INTRA ”/“INTER ”/“NOT CODED ”により、モード切り換えを行っている。しかし、ラスタ順に符号化する場合には、a1がa0と同じライン上にあるとは限らない。したがって、復号時にa1がa0と同じライン上か否かは不明である。   FIG. 22 illustrates a specific example of skipping encoding of a block line that becomes “NOT CODED” when encoding is performed in raster order. In the present invention, the mode is switched by the attribute (“INTRA” / “INTER” / “NOT CODED”) of the line to which the origin pixel a0 belongs. However, when encoding in raster order, a1 is the same as a0. Therefore, it is not clear whether a1 is on the same line as a0 at the time of decoding.

そこで、図22のように、a0が当該ブロックライン上での最後の変化画素であり、かつ、次のブロックラインのモードが“ NOT CODED”(非符号化)である場合には、スキップ符号SKにより次の“CODED ”(符号化)となるブロックラインにスキップし、このスキップ先のブロックラインの先頭画素を新たなa0(new a0)とすると共に、このスキップされるブロックラインの領域についてはすべて符号化する。   Therefore, as shown in FIG. 22, when a0 is the last changed pixel on the block line and the mode of the next block line is “NOT CODED” (uncoded), the skip code SK is used. To skip to the next “CODED” (encoded) block line and set the first pixel of this skip-destination block line to a new a0 (new a0), and all the block line areas to be skipped Encode.

つまり、a0が存在するブロックラインB1があり、そのブロックラインB1のモードが“INTER ”であるとし、当該ブロックラインB1の次に、モードが“NOT CODED”のブロックラインが3つ繋がり(B2〜B4)、その次にモードが“INTER ”であるブロックラインB5が繋がっているので、当該B5のブロックラインの先頭にa0を移してnew a0とし、符号SKを用いてa0からnew a0にスキップし、ブロックラインB1からB4までについてはすべて“CODED ”、すなわち、符号化することになる。また、この符号SKの可変長符号は“垂直モード”/“水平モード”/“パスモード”の可変長符号と共に設計される。   That is, there is a block line B1 in which a0 exists, and the mode of the block line B1 is “INTER”. Next to the block line B1, three block lines whose mode is “NOT CODED” are connected (B2 to B2). B4) Next, since block line B5 whose mode is “INTER” is connected, a0 is moved to the beginning of the block line of B5 to be new a0, and the code SK is used to skip from a0 to new a0. The block lines B1 to B4 are all "CODED", that is, encoded. The variable length code of the code SK is designed together with variable length codes of “vertical mode” / “horizontal mode” / “pass mode”.

図23は以上の符号化手順を表すフローチャートであり、図17の点線で囲まれた部分を変更したものである。符号化ライン上の起点変化画素a0の画素位置情報を初期化し(S201)、次に起点画素a0が属するラインのモードがフレーム内(INTRA)であるか否かを調べる(S1201)。その結果、フレーム内(INTRA)であれば“ABOVE LINE”をラインメモリ100に読み込む(S1202)が、フレーム内(INTRA)でなければ“PREVIOUS LINE ”を図18のラインメモリ2100に読み込む(S1203)。さらにa0が属するラインのモードが“NOT CODED LINE”、つまり、符号化しないラインでないかを調べ(S1203)、符号化しないラインであればS201の処理に移り、符号化しないラインであれば、次にa1の検出処理をし(S202)、さらにb1,b2の検出処理をし(S203)、S204の処理に入るといった処理形態である。   FIG. 23 is a flowchart showing the above encoding procedure, in which the part surrounded by the dotted line in FIG. 17 is changed. The pixel position information of the starting point change pixel a0 on the encoded line is initialized (S201), and then it is checked whether the mode of the line to which the starting point pixel a0 belongs is in frame (INTRA) (S1201). As a result, if it is within the frame (INTRA), “ABOVE LINE” is read into the line memory 100 (S1202), but if it is not within the frame (INTRA), “PREVIOUS LINE” is read into the line memory 2100 of FIG. . Further, it is checked whether the mode of the line to which a0 belongs is “NOT CODED LINE”, that is, a line that is not encoded (S1203). If the line is not encoded, the process proceeds to S201. In this processing mode, a1 is detected (S202), b1 and b2 are further detected (S203), and S204 is entered.

以上、前フレームの符号化済みの信号を復号化して蓄え、かつ、当該前フレームの信号を参照することで、画像の符号化中の領域が符号化済みの領域の画像状態に近似しているか否かを調べ、近似しているとき、その領域の画像の符号化をせずに、代わりに、上記復号済みフレーム内の信号を上記符号化中のフレームにコピーすると共に、コピーされた部分をスキップして、次の符号化すべき領域の符号化をするよう符号化処理するようにしたことにより、コピーされた部分を符号化しないで処理能率を向上させることができるようになる。   As described above, whether the encoded region of the image approximates the image state of the encoded region by decoding and storing the encoded signal of the previous frame and referring to the signal of the previous frame If the image of the region is not encoded, the signal in the decoded frame is copied to the frame being encoded, and the copied portion is replaced. By skipping and performing the encoding process so as to encode the next region to be encoded, the processing efficiency can be improved without encoding the copied portion.

[第2の具体例のその3]ここでは、参照ラインを複数用いて予測の性能を向上させることで、発生符号量を縮減する具体例を説明する。   [No. 3 of the second specific example] Here, a specific example of reducing the amount of generated codes by improving the prediction performance using a plurality of reference lines will be described.

図24は、本発明の符号化ラインと参照ラインの関係を説明する図である。ここで、新たにc1とc2の定義を行う。   FIG. 24 is a diagram illustrating the relationship between the encoding line and the reference line according to the present invention. Here, c1 and c2 are newly defined.

c1:a0よりも右側で、a0と反対色の最初の変化画素c2:c1の次の変化画素本発明は、a1を符号化する際に、c1とb1の変位から、b1とa1の変位を予測するものであり、以下の式で得られるdiffを垂直モードで符号化する。   c1: The first change pixel c2: c1 in the color opposite to a0 on the right side of a0 The present invention changes the displacement of b1 and a1 from the displacement of c1 and b1 when encoding a1. This is a prediction, and the diff obtained by the following equation is encoded in the vertical mode.

diff=b1-a1+f{b1-c1)ここで、f(x)はb1とa1との変位を推定する予測関数である。また、次式は微小ノイズによる予測効率の低下を防止するために、c1とb1の変位の絶対値がしきい値thよりも小さい場合に予測値を0とする予測関数の例である。   diff = b1-a1 + f {b1-c1) where f (x) is a prediction function for estimating the displacement between b1 and a1. Further, the following equation is an example of a prediction function that sets the predicted value to 0 when the absolute value of the displacement of c1 and b1 is smaller than the threshold th in order to prevent a decrease in prediction efficiency due to minute noise.

f(x)=0 (abs(x)<th)
f(x)=sign(x) (abs(x)≧th)
sign{x)=−1 (x<0)
sign{x)= 0 (x=0)
sign{x)= 1 (x>0)
但し、c2がb1より左端にある時、あるいはabs(b1-c1)が、あるしきい値よりも大きい場合は、通常の垂直モードで符号化する。
f (x) = 0 (abs (x) <th)
f (x) = sign (x) (abs (x) ≧ th)
sign {x) =-1 (x <0)
sign {x) = 0 (x = 0)
sign {x) = 1 (x> 0)
However, when c2 is at the left end of b1, or when abs (b1-c1) is larger than a certain threshold value, encoding is performed in the normal vertical mode.

図25は、本具体例の符号化手順を表すフローチャートであり、第1の垂直モードは従来の垂直モードであり、第2の垂直モードは、参照ラインを2ラインとする垂直モードで、本発明で採用した新しいモードである。   FIG. 25 is a flowchart showing the encoding procedure of this example. The first vertical mode is a conventional vertical mode, and the second vertical mode is a vertical mode with two reference lines. This is a new mode adopted in

ここでの処理は、まず、符号化ライン上の起点変化画素a0の画素位置情報を初期化し(S401)、符号化ライン上で“a0”位置よりも右にある最初の変化画素a1の検出処理をし(S402)、参照ライン上で“a0”位置よりも右側にあって、しかも、“a0”位置の画素と反対色の最初の変化画素b1と、参照ライン上で“b1”位置の次に表れる変化画素b2の検出処理をし(S403)、次にb1がa1より小さいか判断する(S404)。その結果、b1がa1より小さい場合はパスモード(P)にし(S405)、次にa0の画素位置情報をb2の画素位置情報にセットし(S406)、S403の処理に戻る。   In this process, first, pixel position information of the starting point change pixel a0 on the encoding line is initialized (S401), and detection processing of the first change pixel a1 on the right of the “a0” position on the encoding line is performed. (S402) on the reference line to the right of the “a0” position, and the first change pixel b1 of the opposite color to the pixel at the “a0” position, and the “b1” position next to the reference line. Is detected (S403), and it is then determined whether b1 is smaller than a1 (S404). As a result, when b1 is smaller than a1, the pass mode (P) is set (S405), the pixel position information of a0 is set to the pixel position information of b2 (S406), and the process returns to S403.

S405の判断において、b1がa1より小さくなかったときはc1,c2の検出処理をし(S407)、c2がb1より小さいか判断する(S408)。その結果、c2がb1より小さかったときは|a1−b1|≦Nであるか判断し(S409)、|a1−b1|≦Nであったときは、第1の垂直モード(V)とし(S410)、a0の画素位置をa1の画素位置にし(S411)、S412の処理に入る。   If it is determined in S405 that b1 is not smaller than a1, c1 and c2 are detected (S407), and it is determined whether c2 is smaller than b1 (S408). As a result, if c2 is smaller than b1, it is determined whether | a1-b1 | ≦ N (S409). If | a1-b1 | ≦ N, the first vertical mode (V) is set ( S410), the pixel position of a0 is set to the pixel position of a1 (S411), and the process of S412 is entered.

S412では、a0の位置が水平方向の画素数であるWIDTH の値対応の位置であるか判断し、そうでなければS402の処理に戻り、そうであればS413に移り画像の終りであるか判断し、終りであれば処理を終了し、終りでなければS401の処理に戻る。   In S412, it is determined whether the position of a0 is a position corresponding to the value of WIDTH, which is the number of pixels in the horizontal direction. If not, the process returns to S402, and if so, the process proceeds to S413 to determine whether it is the end of the image. If the process is over, the process ends. If not, the process returns to S401.

一方、S408の判断において、c2<b1でなければ|diff|≦Nであるか調べ(S418)、その結果、そうでなければa2を検出処理し(S414)、水平モードとし(S415)、a0をa2にセットする(S417)。そして、S412の処理に入る。S418の判断の結果、|diff|≦Nであれば、第2の垂直モードとし(S419)、a0をa2にセットする(S420)。そして、S412の処理に入る。   On the other hand, if c2 <b1 is not satisfied in the determination of S408, whether or not | diff | ≦ N is checked (S418). If not, a2 is detected (S414), and the horizontal mode is set (S415). Is set to a2 (S417). Then, the process enters S412. If | diff | ≦ N as a result of the determination in S418, the second vertical mode is set (S419), and a0 is set to a2 (S420). Then, the process enters S412.

一方、S409の判断において、|a1−b1|≦Nでなかったときには、a2を検出処理し(S414)、水平モードとし(S415)、a0をa2にセットする(S417)。そして、S412の処理に入る。   On the other hand, if it is not | a1-b1 | ≦ N in the determination of S409, a2 is detected (S414), the horizontal mode is set (S415), and a0 is set to a2 (S417). Then, the process enters S412.

以上の処理により、参照ラインを複数用いて予測の性能を向上させることができるようにし、この予測の性能向上により、発生符号量を縮減することができるようになる。   With the above processing, the prediction performance can be improved by using a plurality of reference lines, and the generated code amount can be reduced by the improvement in the prediction performance.

[応用例]次に本発明の手法による高能率圧縮符号化の応用例として、上述のように2値ではなく、多値のアルファマップを符号化する場合の具体例を説明する。図26は、多値のアルファマップを説明する図である。図26(a)、はオブジェクトと背景を合成する際に境界部での不連続性を防止するために、合成の重み付けを多値で表現したものの例である。また図26(b)は、キャプションの一部を半透明に合成する際の例である(半透明重ね合わせ)。   [Application Example] Next, as an application example of high-efficiency compression encoding by the method of the present invention, a specific example in the case of encoding a multi-value alpha map instead of binary as described above will be described. FIG. 26 is a diagram illustrating a multi-value alpha map. FIG. 26 (a) shows an example in which the weighting of the synthesis is expressed in multiple values in order to prevent discontinuity at the boundary when the object and the background are synthesized. FIG. 26B shows an example when a part of the caption is synthesized to be translucent (translucent overlay).

ここで、オブジェクトの信号をSo、背景の信号をSb、重み付けの値(Alpha Value)をaとすると、合成信号Scは次式で表される。ここで、Alpha Valueは8ビットで表現されている。   Here, if the object signal is So, the background signal is Sb, and the weighting value (Alpha Value) is a, the combined signal Sc is expressed by the following equation. Here, Alpha Value is expressed by 8 bits.

Sc=((255-a)*Sb+a*So)/255このような、アルファマップを符号化する場合には、図27(a)のように、アルファマップの値が0か否かを表すシェープ情報(Shape )と、アルファマップにおける画素のグレースケール情報(階調情報)であるアルファバリュー情報(Alpha Value )とに分離して符号化する。すなわち、図27(b)のように、シェープ情報Shape を本発明の2値画像符号化法を実施するためのシェープコーディング部2500に与え、ここで本発明の2値画像符号化法により、シェープ情報Shape を符号化し、Shape 情報の再生信号にしたがって、多値画像用の符号化を行うアルファバリューコーディング部2600により、アルファバリュー情報Alpha Value を符号化すれば良い。   Sc = ((255−a) * Sb + a * So) / 255 When encoding an alpha map like this, as shown in FIG. 27A, it is determined whether the alpha map value is 0 or not. It encodes separately into shape information (Shape) to be expressed and alpha value information (Alpha Value) which is gray scale information (gradation information) of pixels in the alpha map. That is, as shown in FIG. 27 (b), the shape information Shape is given to the shape coding unit 2500 for carrying out the binary image coding method of the present invention, where the shape information is shaped by the binary image coding method of the present invention. The alpha value information Alpha Value may be encoded by the alpha value coding unit 2600 that encodes the information shape and performs multi-value image encoding according to the reproduction signal of the shape information.

このようにすると、2値ではなく、多値のアルファマップを符号化することができるようになる。   In this way, it is possible to encode a multi-value alpha map instead of a binary value.

(第3の具体例)次に、本発明の第3の具体例として、画面全体に占めるオブジェクト部分の領域がかなり小さい場合での符号量低減技術を、図29と図30を用いて説明する。   (Third Specific Example) Next, as a third specific example of the present invention, a code amount reduction technique when the area of the object portion occupying the entire screen is quite small will be described with reference to FIGS. 29 and 30. FIG. .

図29(a)に示されるような画面全体に占めるオブジェクト部分の領域がかなり小さい場合において、画面全体のアルファマップ信号を符号化するのではなく、図29(b)のようなオブジェクトを含む小領域のアルファマップ信号を符号化した方が符号量が低減される場合がある。   When the area of the object portion occupying the entire screen as shown in FIG. 29A is quite small, the alpha map signal of the entire screen is not encoded, but the small object including the object as shown in FIG. The amount of code may be reduced when the alpha map signal of the region is encoded.

そして、この場合、小領域の大きさと、画面内での位置関係がわからなければならない。   In this case, the size of the small area and the positional relationship within the screen must be known.

そこで、小領域の位置を表すための小領域左上端Sの位置アドレスと、小領域の(水平,垂直)方向の大きさ(h,v)とを付加情報として別途符号化する。さらに、前記Sや前記(h,v)の符号量を低減するために、図29(a)において破線で区切られた、符号化の処理単位であるブロックの整数倍となる様に小領域を設定することで、Sや(h,v)をブロックのアドレスで表現することもできる。   Therefore, the position address of the upper left end S of the small area for representing the position of the small area and the size (h, v) in the (horizontal, vertical) direction of the small area are separately encoded as additional information. Further, in order to reduce the code amount of S and (h, v), a small area is formed so as to be an integral multiple of a block that is a processing unit of encoding, which is divided by a broken line in FIG. By setting, S and (h, v) can be expressed by block addresses.

図30は、上記の処理の流れを説明するブロック図であり、図30(a),(b)は各々送信側、受信側のブロック図である。   FIG. 30 is a block diagram illustrating the flow of the above processing, and FIGS. 30A and 30B are block diagrams on the transmission side and the reception side, respectively.

送信側は、オブジェクト領域検出回路500、アルファマップ符号化回路200、多重化回路510とから構成されている。オブジェクト領域検出回路500は、アルファマップからオブジェクト部分の領域を検出する回路であり、小領域のアルファマップ信号と、Sや(h,v)の値とを検出するものである。   The transmission side includes an object area detection circuit 500, an alpha map encoding circuit 200, and a multiplexing circuit 510. The object area detection circuit 500 is a circuit that detects the area of the object portion from the alpha map, and detects the alpha map signal of the small area and the values of S and (h, v).

また、アルファマップ符号化回路200は小領域のアルファマップを符号化する回路であり、既に詳述した如きのものである。多重化回路510はこの符号化されたアルファマップと、オブジェクト領域検出回路500の出力するSや(h,v)の値とを多重化して出力する回路である。   The alpha map encoding circuit 200 is a circuit for encoding an alpha map of a small area, and has already been described in detail. The multiplexing circuit 510 is a circuit that multiplexes and outputs the encoded alpha map and the S and (h, v) values output from the object area detection circuit 500.

また、受信側は、分離化回路520、アルファマップ復号化回路400、アルファマップ復元回路530から構成されている。分離化回路520は、ビットストリームから、小領域のアルファマップ信号と、Sや(h,v)の値の符号化成分とを分離するものであり、アルファマップ復号化回路400は小領域のアルファマップ信号を復号して元のサイズのアルファマップを得る回路であり、アルファマップ復元回路530はSや(h,v)の値の符号化成分からSや(h,v)の値を復元する回路である。   The receiving side includes a separation circuit 520, an alpha map decoding circuit 400, and an alpha map restoration circuit 530. The separation circuit 520 separates the small area alpha map signal and the encoded component of the value of S and (h, v) from the bit stream, and the alpha map decoding circuit 400 performs the small area alpha map. A circuit that decodes a map signal to obtain an alpha map of the original size, and an alpha map restoration circuit 530 restores the value of S or (h, v) from the encoded component of the value of S or (h, v). It is.

このような構成において、線20を介して画面全体のアルファマップ信号が供給されたオブジェクト領域検出回路500では、図29(b)のような小領域のアルファマップ信号を線22を介してアルファマップ符号化回路200に供給すると共に、Sや(h,v)の値を符号化して、線23を介してアルファマップ符号化回路200と多重化回路510に供給する。   In such a configuration, the object area detection circuit 500 to which the alpha map signal of the entire screen is supplied via the line 20 is used to convert the alpha map signal of a small area as shown in FIG. In addition to being supplied to the encoding circuit 200, the values of S and (h, v) are encoded and supplied to the alpha map encoding circuit 200 and the multiplexing circuit 510 via the line 23.

多重化回路510では、線24を介して供給される符号化された小領域のアルファマップ信号と、線23を介して供給される符号化されたSや(h,v)の値を多重化した後、線30を介して出力する。   The multiplexing circuit 510 multiplexes the encoded small region alpha map signal supplied via the line 24 and the encoded S and (h, v) values supplied via the line 23. And then output via line 30.

一方、線80を介して分離化回路520に供給された符号は、小領域のアルファマップ信号に関する符号と、Sや(h,v)に関する符号に分離され、各々線84と線86を介して出力される。アルファマップ復元回路530では、線85を介して供給される再生された小領域のアルファマップ信号と、線86を介して供給されるSや(h,v)の値から、画面全体のアルファマップ信号を復元し、線90を介して出力する。   On the other hand, the code supplied to the separation circuit 520 via the line 80 is separated into a code related to the small area alpha map signal and a code related to S and (h, v). Is output. In the alpha map restoration circuit 530, the alpha map of the entire screen is obtained from the reproduced small area alpha map signal supplied via the line 85 and the S and (h, v) values supplied via the line 86. The signal is recovered and output via line 90.

この結果、図29(a)に示されるような画面全体に占めるオブジェクト部分の領域がかなり小さい場合において、画面全体のアルファマップ信号を符号化するのではなく、図29(b)のようなオブジェクトを含む小領域のアルファマップ信号を符号化して符号量低減を図ることができるようになる。   As a result, when the area of the object portion occupying the entire screen as shown in FIG. 29A is quite small, the alpha map signal of the entire screen is not encoded, but the object as shown in FIG. It is possible to reduce the code amount by encoding the alpha map signal of a small area including.

(第4の具体例)次に、第4の具体例として、図4のサンプリング変換(拡大・縮小変換)により発生する斜め方向の不連続性を滑らかにする技術を、図4と図33および図34を用いて説明する。   (Fourth Specific Example) Next, as a fourth specific example, a technique for smoothing the discontinuity in the oblique direction caused by the sampling conversion (enlargement / reduction conversion) of FIG. This will be described with reference to FIG.

2値画像の縮小拡大を繰り返すと、斜めの線あるいは、曲線の滑らかさが失われ易い。アルファマップ信号は2値画像の情報であるから、縮小拡大を繰り返すと、このような現象を起こし易く、しかも、画面内の目的の部分を抽出したり、認識するために用いるのがアルファマップ信号であるから、このような滑らかさが失われることは、画質の劣化に繋がる。そこで、この滑らかさを失うという問題を解消する技術が必要となる。   If the reduction and enlargement of the binary image is repeated, the smoothness of the diagonal lines or curves is likely to be lost. Since the alpha map signal is binary image information, such a phenomenon is likely to occur when the enlargement and reduction are repeated, and the alpha map signal is used for extracting or recognizing a target portion in the screen. Therefore, such a loss of smoothness leads to deterioration of image quality. Therefore, a technique for solving the problem of losing smoothness is required.

本具体例は、図4の構成においてサンプリング変換(拡大・縮小変換)により発生する斜め方向の不連続性を滑らかにする2値画像の処理方法に関するものである。   This example relates to a binary image processing method for smoothing the discontinuity in the oblique direction caused by sampling conversion (enlargement / reduction conversion) in the configuration of FIG.

図33は、スムーシング処理(平滑化処理)を説明するための図である。ここで、図33の(a)は元のサイズの2値画像、図33の(b)はこれを縮小して得た2値画像である。図33においては、オブジェクト領域は黒丸印で、また、バックグラウンド(背景)領域は白丸印で示してある。   FIG. 33 is a diagram for explaining the smoothing process (smoothing process). Here, FIG. 33A is a binary image of the original size, and FIG. 33B is a binary image obtained by reducing this. In FIG. 33, the object area is indicated by a black circle, and the background area is indicated by a white circle.

本具体例では、図4の構成において解像度変換回路210や解像度変換回路230によるサンプリング変換(拡大・縮小変換)がなされることにより発生する斜め方向の不連続性を滑らかにするために、バックグラウンド領域の画素(白丸)一つ一つについて、それを中心にして、その上下左右の画素、つまり、隣接画素を調べ、そのうち、2画素以上がオブジェクト領域の画素(黒丸)であったときは、そのバックグラウンド領域の画素を、オブジェクト領域に含める処理を行う。   In this specific example, in order to smooth the discontinuity in the oblique direction that is generated by the sampling conversion (enlargement / reduction conversion) by the resolution conversion circuit 210 or the resolution conversion circuit 230 in the configuration of FIG. For each pixel (white circle) in the area, the upper, lower, left, and right pixels, that is, adjacent pixels are examined, and when two or more pixels are pixels (black circles) in the object area, A process of including the pixels in the background area in the object area is performed.

すなわち、今、バックグラウンド領域にある一つの画素である検査対象画素が図33(b)における二重丸印で示す位置の画素である場合のように、その隣接画素に、2画素以上、オブジェクト領域の画素(黒丸)があったときは、その二重丸印で示す位置の画素(つまり、検査対象画素)を黒丸印の画素にしてオブジェクト領域の画素にする。黒丸印の画素が例えば、“1”、白丸印が“0”であるとすると、二重丸印で示す位置の画素(画素値“0”)を、画素値“1”に置き換える処理をする。   That is, two or more pixels are adjacent to the adjacent pixel as in the case where the pixel to be inspected that is one pixel in the background area is a pixel at a position indicated by a double circle in FIG. When there is an area pixel (black circle), the pixel at the position indicated by the double circle (that is, the pixel to be inspected) is changed to a black circle pixel to be a pixel in the object area. For example, assuming that the black circle is “1” and the white circle is “0”, the pixel at the position indicated by the double circle (pixel value “0”) is replaced with the pixel value “1”. .

具体的にはつぎのようにする。図34に示すように、上記画像処理を行う装置としては、2フレーム分のメモリ621,622を用意し、スムーシング処理を行う対象の2値画像データを、それぞれのフレームメモリ621,622に保持させるようにする。そして、そのうちの一方のフレームメモリを検査用画像の保持メモリとし、他方を作業用メモリとする。そして、制御手段623により、これらフレームメモリ621,622をつぎのように制御し、また、これらフレームメモリ621,622の保持内容を用いてつぎのように演算処理する。   Specifically: As shown in FIG. 34, two frames of memories 621 and 622 are prepared as apparatuses for performing the image processing, and binary image data to be subjected to the smoothing process is held in the respective frame memories 621 and 622. Like that. One of the frame memories is used as an inspection image holding memory, and the other is used as a working memory. Then, the control means 623 controls the frame memories 621 and 622 as follows, and uses the contents held in the frame memories 621 and 622 to perform arithmetic processing as follows.

2値画像データが入力されると、制御手段623はこの2値画像データを、検査用画像の保持メモリと作業用メモリとに格納するように制御する(S1)。   When the binary image data is input, the control means 623 controls to store the binary image data in the inspection image holding memory and the work memory (S1).

つぎに制御手段623は、検査用画像の保持メモリに保持された画像の画素一つずつについて、その画素を検査対象画素としたときに、それに隣接する4方の画素の値を調べる(S2)。そして、検査対象画素の値が“0”であって、それに隣接する4方の画素のうち、値が“1”を持つ画素が2画素分以上あるかを調べ(S3)、2画素分以上ある場合には、その検査対象画素の画素の値を“1”に書き替える(S4)。この書き替えは作業用メモリに対して該当の画素位置のものを“1”にすることで行う。   Next, the control means 623 examines the values of the four pixels adjacent to each pixel of the image held in the inspection image holding memory when the pixel is set as the inspection target pixel (S2). . Then, the value of the pixel to be inspected is “0”, and it is checked whether there are two or more pixels having the value “1” among the four adjacent pixels (S3). If there is, the value of the pixel to be inspected is rewritten to “1” (S4). This rewriting is performed by setting the pixel at the corresponding pixel position to “1” in the working memory.

全ての画素についてこの処理が済むと、制御手段623はこの作業用メモリにある修正済みの2値画像データを読出し(S5)、スムーシング処理済みの2値画像データとして出力する。   When this process is completed for all the pixels, the control means 623 reads the corrected binary image data in the working memory (S5) and outputs it as the smoothed binary image data.

この処理の結果、滑らかさが失われた2値画像データは、輪郭部の滑らかさが回復することになる。   As a result of this processing, the smoothness of the contour portion of the binary image data whose smoothness has been lost is restored.

滑らかさが大きく失われている2値画像データの場合は、上記処理を複数回繰り返す。すなわち、作業用メモリにある修正済みの2値画像データを検査用画像の保持メモリにコピーし(S6)、再び、S2以降の処理を行う。圧縮と拡大の率や回数が決まれば、そのシステムの場合、滑らかさ喪失の度合いがどの程度であるかは分かるので、状況対応に適宜な繰り返し回数を定めて、上記の処理を繰り返した後、処理済みの2値画像データとして作業用メモリの2値画像データを読出して最終処理済み出力とするよう、制御手段623に制御させる。   In the case of binary image data in which smoothness is largely lost, the above process is repeated a plurality of times. That is, the corrected binary image data in the working memory is copied to the inspection image holding memory (S6), and the processes after S2 are performed again. If the rate and number of compression and expansion are determined, you can see how much smoothness is lost in that system, so after determining the appropriate number of repetitions for the situation and repeating the above processing, The control unit 623 is controlled to read the binary image data in the working memory as the processed binary image data and to obtain the final processed output.

この結果、滑らかさが大きく損なわれた2値画像データであっても、滑らかな輪郭に修正することができるようになる。そのため、この図34の画像処理手段を図4の構成における解像度変換回路210の出力段に設けておけば、輪郭の滑らかな2値画像データを後段に与えることができるようになる。   As a result, even binary image data whose smoothness is greatly impaired can be corrected to a smooth outline. Therefore, if the image processing means of FIG. 34 is provided at the output stage of the resolution conversion circuit 210 in the configuration of FIG. 4, binary image data having a smooth outline can be provided to the subsequent stage.

以上、種々の例を説明したが、以上の具体例は要するにオブジェクトスケーラビリティを実現するに当たって必要となるアルファマップについて、解像度縮小を図り、符号化すると共に、得られた符号を縮小率情報と共に多重化して伝送や蓄積用のアルファマップ信号とするようにしたことを特徴としている。そのため、アルファマップ信号は効率良く符号化できることになり、オブジェクトの形状情報を効率良く符号化できるようになる。   Although various examples have been described above, in the above specific examples, the resolution is reduced and encoded with respect to the alpha map necessary for realizing object scalability, and the obtained code is multiplexed with the reduction ratio information. This is characterized in that the alpha map signal is used for transmission and storage. Therefore, the alpha map signal can be efficiently encoded, and the shape information of the object can be efficiently encoded.

また、アルファマップ信号を再生する時は、アルファマップの符号化成分と、縮小率情報とを分離し、アルファマップの符号化成分は復号した後に縮小率情報に従って元の解像度に拡大するようにしたことで、元のサイズのアルファマップを復元できるようになり、アルファマップを用いた符号化画像の復号も支障なく行えるようになる。   In addition, when reproducing the alpha map signal, the encoded component of the alpha map and the reduction rate information are separated, and the encoded component of the alpha map is decoded and enlarged to the original resolution according to the reduction rate information. Thus, the original alpha map can be restored, and the encoded image using the alpha map can be decoded without any trouble.

また、本発明はブロックライン毎に処理が可能であるため、図32に示すように、ブロックライン毎にそのブロックライン対応部分のアルファマップの符号を伝送し、受信側ではブロックライン毎に復号することも可能である。   Further, since the present invention can perform processing for each block line, as shown in FIG. 32, the code of the alpha map corresponding to the block line is transmitted for each block line, and is decoded for each block line on the receiving side. It is also possible.

すなわち、一般的なMMRでは画像をその水平方向ライン内でのみ変化画素を検出するのに対して、第1ないし第4の具体例ではMMRを用いてはいるが、画像をラスタスキャン順に複数ラインにまたがって変化画素を検出している。そのため、ブロックライン毎に処理が可能であるから、図32に示すように、ブロックライン毎にそのブロックライン対応部分のアルファマップの符号を伝送し、受信側ではブロックライン毎に復号することも可能である。   That is, in general MMR, a change pixel is detected only within a horizontal line of an image, whereas in the first to fourth specific examples, MMR is used, but an image is divided into a plurality of lines in the raster scan order. The change pixel is detected across the two. Therefore, since processing is possible for each block line, as shown in FIG. 32, it is possible to transmit the code of the alpha map corresponding to the block line for each block line and to decode for each block line on the receiving side. It is.

<マクロブロック単位での符号化、復号化処理>以上の各具体例は、任意形状の部分画像像毎に再生可能な符号化方式の機能であるオブジェクトスケーラビリティを実現する際に必要となるアルファマップの符号化において、一画面全体あるいは、ブロックライン単位で符号化を行う方法であり、2値画像で表現されたアルファマップを、FAXの符号化方式であるMMR(Modified Modified READ)に基づいた符号化方法にて符号化する手法であった。そして、MMRは基本的にライン単位での符号化法である。   <Encoding and Decoding Processing in Macroblock Units> Each of the above specific examples is an alpha map necessary for realizing object scalability, which is a function of an encoding method that can be reproduced for each partial image of an arbitrary shape. Is an encoding method based on MMR (Modified Modified READ), which is a FAX encoding method, in which encoding is performed on an entire screen or on a block line basis. This is a method of encoding by the encoding method. MMR is basically a coding method in units of lines.

一方、動画像の標準符号化方式であるMPEG等の既存の画像符号化方式は、一般に画面全体を16×16画素で構成されるマクロブロックMBに分割した上で、各マクロブロックMB単位で符号化処理が行われている。従って、このような場合にはアルファマップの符号化法もマクロブロックMB単位での符号化を可能にすることが望ましい。しかし、マクロブロックMBは画面の一部分であるために、ライン単位での符号化法であるMMRに基づいて一つ一つのマクロブロックMBを符号化すると符号化効率が低下するおそれがある。   On the other hand, an existing image coding method such as MPEG, which is a standard coding method for moving images, generally divides the entire screen into macroblocks MB composed of 16 × 16 pixels, and then codes each macroblock MB. Is being processed. Therefore, in such a case, it is desirable that the encoding method of the alpha map also enables encoding in units of macroblock MB. However, since the macroblock MB is a part of the screen, if each macroblock MB is encoded based on MMR, which is an encoding method in units of lines, the encoding efficiency may be reduced.

そこで、マクロブロック単位で効率的に符号化処理し、また、復号化処理することのできるようにした符号化技術を次に説明する。   An encoding technique that enables efficient encoding processing and decoding processing in units of macroblocks will be described next.

(第5の具体例)本発明にかかるマクロブロック単位での符号化、復号化処理の第1の手法を第5の具体例として、図35、図36および図37を参照しながら説明する。この具体例において必要なシステム構成は基本的には図2および図3の如きで良く、以下説明する処理は符号化処理については、図2におけるアルファマップ符号化回路200においてなされ、復号化処理については図3におけるアルファマップ復号化回路400においてなされるように仕組みを整えておけば良い。   (Fifth Specific Example) A first specific method of encoding and decoding in units of macroblocks according to the present invention will be described as a fifth specific example with reference to FIGS. 35, 36 and 37. FIG. The system configuration required in this specific example may basically be as shown in FIGS. 2 and 3, and the processing described below is performed in the alpha map encoding circuit 200 in FIG. The mechanism may be arranged so as to be performed in the alpha map decoding circuit 400 in FIG.

図35は、アルファマップの画面内を例えば、画素サイズが16×16画素といった所定の複数画素構成によるマクロブロックMB単位に分割した図であり、正方形の升目で示したものが分割の境界線であり、升目一つ一つがマクロブロックMBである。   FIG. 35 is a diagram in which the screen of the alpha map is divided into macroblock MB units having a predetermined plurality of pixel configurations such as a pixel size of 16 × 16 pixels, for example, and a square border indicates a division boundary line. Yes, each square is a macroblock MB.

アルファマップはオブジェクトの情報を画素毎に2値で示すものであるから、画素は白か黒のいずれかであり、従って、図35に示されるように、アルファマップの画面における各マクロブロックMBはその中身の状態は“all_white”(全て白)、“all_black”(全て黒)、“others”(その他)の3つの種類のいずれかに分類される。   Since the alpha map indicates the object information in binary for each pixel, the pixel is either white or black. Therefore, as shown in FIG. 35, each macro block MB in the alpha map screen is The state of the contents is classified into one of three types: “all_white” (all white), “all_black” (all black), and “others” (others).

人物像のアルファマップである図35のような画面の場合、背景は“白”、人物部分は“黒”であるから、マクロブロックMBは符号(MBwh)を付して示す背景部分のみのものと、符号(MBbk)を付して示す人物部分のみのもの、そして、符号(MBot)を付して示す背景部分と人物部分両方を含むものとに分けることができる。そして、この場合、符号化の必要な部分は(MBot)なる部分であり、図35より明かなように、(MBot)なる部分はオブジェクトOJにおける輪郭部分の入ったマクロブロック、すなわち、図36に示す如き部分のマクロブロックのみにMMRベースの符号化法を適用すれば良いことが分かる。(MBot)なる部分のマクロブロックは、人物の輪郭領域に位置するマクロブロックであり、背景部分と人物部分両方を含む部分である。   In the case of the screen as shown in FIG. 35, which is an alpha map of a human image, the background is “white” and the human part is “black”, so the macroblock MB is only the background part indicated by a symbol (MBwh). And only the person portion indicated by the reference sign (MBbk), and those including both the background portion indicated by the reference sign (MBot) and the person portion. In this case, the part that needs to be encoded is the part (MBot), and as is clear from FIG. 35, the part (MBot) is the macroblock including the contour part in the object OJ, that is, FIG. It can be seen that the MMR-based encoding method should be applied only to the macroblocks in the portions as shown. The macroblock of the part (MBot) is a macroblock located in a person's outline area, and is a part including both a background part and a person part.

ところで、図37のようなマクロブロックMBに、第1から第4の具体例の手法を適用すると、検出される変化画素は図37(a)において黒丸で示した位置になる。なお、以後の図では簡単のため、マクロブロックMBのサイズを8×8画素で構成されるブロックとして例示している。   By the way, when the techniques of the first to fourth specific examples are applied to the macroblock MB as shown in FIG. 37, the detected change pixel is at the position indicated by the black circle in FIG. In the following drawings, for the sake of simplicity, the size of the macro block MB is illustrated as a block composed of 8 × 8 pixels.

一方、マクロブロックMBを画面左上からラスタスキャン順に符号化して送信し、ラスタスキャン順に受信して復号化を行うとすると、今、符号化あるいは復号化処理しようとしている対象のマクロブロックMBの上辺に接する画素群(“top referece”)と、当該マクロブロックMBの左辺に接する画素群(“left reference”)は、図37(b)に示されるように送受信両端において既知の値となる。すなわち、ラスタスキャン順に処理してゆくので、top refereceとleft referenceは既に処理した隣接のマクロブロックMBの情報であるから既知の値である。   On the other hand, if the macroblock MB is encoded and transmitted in the raster scan order from the upper left of the screen and is received and decoded in the raster scan order, then the macroblock MB is placed on the upper side of the target macroblock MB to be encoded or decoded. The pixel group in contact (“top reference”) and the pixel group in contact with the left side of the macroblock MB (“left reference”) have known values at both transmission and reception ends as shown in FIG. That is, since the processing is performed in the raster scan order, the top referece and the left reference are information of adjacent macro blocks MB that have already been processed, and are known values.

マクロブロックMB単位で考えた場合、ラスタスキャン順に処理してゆく方式ではそのマクロブロックMBでの左辺に接する画素においては、それが図37(a)に黒丸印を付して示すように変化画素であった場合にはそれは変化画素として符号化しなければならないから、画面単位で符号化する場合に比べて極めて冗長な情報となる。   When considered in units of macro blocks MB, in the method of processing in the raster scan order, the pixels that contact the left side of the macro block MB are changed pixels as indicated by the black circles in FIG. In this case, since it must be encoded as a change pixel, the information becomes extremely redundant as compared with the case of encoding on a screen basis.

そこで、このような冗長さを解消するために、本発明では、マクロブロックMBの左端の画素に関しては同じライン上の“left reference”の値との変化を検出すると共に、参照領域内で“pred_color ”と反対色となる最初の変化画素を”b1”と定義する。すると、変化画素は図37(b)の黒丸印の位置となり、図37(a)に比べて冗長な変化画素が大幅に削減される。   Therefore, in order to eliminate such redundancy, in the present invention, a change from the value of “left reference” on the same line is detected for the leftmost pixel of the macroblock MB, and “pred_color” is detected in the reference area. The first change pixel having a color opposite to “is defined as“ b1 ”. Then, the changed pixel is located at the black circle in FIG. 37 (b), and redundant changed pixels are greatly reduced compared to FIG. 37 (a).

ここで、“pred_color ”に該当するのは“a0_color ”(previous line )と“ ref_color ”(current line)となる。なお、“current line”とは、起点変化画素“a0”が属するラインのことであり、“previous line ”とは、“current line”の1ライン上のラインのことであり、“a0_color ”とは起点変化画素“a0”の値(black or white(白値または黒値))であり、“ ref_color ”とは“current line”と同じラインの“left refeence ”の値である。   Here, “a0_color” (previous line) and “ref_color” (current line) correspond to “pred_color”. Note that “current line” is a line to which the starting point change pixel “a0” belongs, “previous line” is a line on one line of “current line”, and “a0_color” is It is the value (black or white (white value or black value)) of the starting point change pixel “a0”, and “ref_color” is the value of “left refeence” of the same line as “current line”.

ここで、“top reference ”は、図37(b)に示されるマクロブロックMBの上辺に接する画素群を指し、“left reference”は、図37(b)に示されるマクロブロックMBの左辺に接する画素群を指す。   Here, “top reference” refers to a pixel group that touches the upper side of the macroblock MB shown in FIG. 37B, and “left reference” touches the left side of the macroblock MB shown in FIG. 37B. Refers to a pixel group.

なお、オブジェクトを含む方形領域を符号化対象としている場合に、マクロブロックMBの上辺あるいは左辺が方形領域の上端あるいは左端に接しているときは、“top reference ”および“left reference”の値は全て、“white ”(白)とする。   When the rectangular area including the object is the encoding target and the upper side or the left side of the macroblock MB is in contact with the upper end or the left end of the rectangular area, the values of “top reference” and “left reference” are all , “White” (white).

また、第1ないし第4の具体例に示した発明では、複数ラインの再生値を用いて相対アドレスの変化量を予測する方法が記載されている。このような場合には、前記の“top reference ”および“left reference”を複数ライン蓄えておく必要がある。また、マクロブロックMB毎に符号化する順序を右下から順次符号化するようにしてもよい。この場合、マクロブロックMBの下辺に接する再生値と右辺に接する再生値を用いる。   In the inventions shown in the first to fourth specific examples, a method for predicting a change amount of a relative address using reproduction values of a plurality of lines is described. In such a case, it is necessary to store a plurality of lines of the “top reference” and “left reference”. The order of encoding for each macroblock MB may be sequentially encoded from the lower right. In this case, a reproduction value in contact with the lower side of the macroblock MB and a reproduction value in contact with the right side are used.

また、動き補償予測が適用される場合には、図2と図3の構成における動き補償予測回路110および350において、画像信号と同様にアルファマップ信号の動き補償予測も生成することができる。上記の“top reference ”および“left reference”は、送信側および受信側とも同じ信号が得られれば良いため、“top reference ”および“left reference”には,動き補償予測値を用いても良い。また、第1ないし第4の具体例に示したように、動き補償予測値との相対アドレス符号化を適用しても良い。   When motion compensated prediction is applied, motion compensated prediction of an alpha map signal can also be generated in the motion compensated prediction circuits 110 and 350 in the configurations of FIGS. Since the above “top reference” and “left reference” only need to obtain the same signal on both the transmission side and the reception side, motion compensated prediction values may be used for “top reference” and “left reference”. Further, as shown in the first to fourth specific examples, relative address encoding with the motion compensation predicted value may be applied.

以上は、マクロブロックMB単位でラスタスキャン順に圧縮符号化し、ラスタスキャン順(xyスキャンにおけるx方向スキャンのスキャン順)に復号化処理する場合の例であった。しかし、マクロブロックMB単位で圧縮符号化し、復号化する場合に、画像の状態によってはラスタスキャン順に行うよりも垂直方向(xy方向におけるy方向スキャン順)に処理するようにした方が効率の良い圧縮処理ができる場合があり、従って、ラスタスキャン順にしたり、垂直方向にスキャンを切り換えたりして、画像の状況対応に種々切り換えて処理することができるようにした方式も実現できれば有用である。そこで、このような方式を次に第6の具体例として説明する。   The above is an example in the case where compression encoding is performed in the order of raster scanning in units of macroblock MB and decoding processing is performed in the order of raster scanning (scanning order of x-direction scanning in xy scanning). However, when compression encoding and decoding is performed in units of macroblock MB, it is more efficient to perform processing in the vertical direction (y direction scan order in the xy direction) than in the raster scan order depending on the state of the image. There are cases where compression processing can be performed. Therefore, it would be useful to realize a system that can perform processing by changing variously according to the situation of the image by changing the scan order in the raster scan order or in the vertical direction. Such a system will be described as a sixth specific example.

(第6の具体例)図38を用いて本発明の第6の具体例を説明する。この具体例において必要なシステム構成も基本的には図2および図3の如きで良く、以下説明する処理は符号化処理については、図2におけるアルファマップ符号化回路200においてなされ、復号化処理については図3におけるアルファマップ復号化回路400においてなされるように仕組みを整えておけば良い。   (Sixth Specific Example) A sixth specific example of the present invention will be described with reference to FIG. The system configuration required in this specific example may basically be as shown in FIGS. 2 and 3, and the processing described below is performed in the alpha map encoding circuit 200 in FIG. The mechanism may be arranged so as to be performed in the alpha map decoding circuit 400 in FIG.

図38(b)は第1ないし第5の具体例におけるスキャン順序(左から右ヘスキャンする(水平スキャンSh ))であり、図38(a)はこのスキャン順序によってスキャンされることにより、検出された変化画素(黒丸で示した画素)の例である。   FIG. 38B shows a scan order (scanning from left to right (horizontal scan Sh)) in the first to fifth specific examples, and FIG. 38A is detected by scanning in this scan order. This is an example of the changed pixels (pixels indicated by black circles).

この場合、第5の具体例における変化画素の検出方法を用いても、変化画素は12個検出される。そこで、この具体例では図38(d)に示すように、マクロブロックMBの行のアドレスと列のアドレスを入れ換えることによって、縦方向のスキャン順序(上から下にスキャンする(垂直スキャンSv ))で変化画素を検出する。このようにすると、図38(b)のスキャン方法で12個検出された変化画素は、図38(c)に示すように8個に減る。このように、画像の状態によってはスキャン方向を変えることで変化画素の数を減らすことができる。   In this case, 12 change pixels are detected even when the change pixel detection method in the fifth specific example is used. Therefore, in this specific example, as shown in FIG. 38 (d), the scanning order in the vertical direction (scanning from top to bottom (vertical scanning Sv)) is performed by switching the row address and column address of the macroblock MB. A change pixel is detected by. In this way, twelve changed pixels detected by the scanning method of FIG. 38B are reduced to eight as shown in FIG. 38C. Thus, depending on the state of the image, the number of change pixels can be reduced by changing the scanning direction.

本発明では、変化画素間の変化量が同じ場合、変化画素の数が少ない方が発生符号量が少なくなるため、図38の例では、(b)に比べて(d)のスキャン順の方が発生符号量が少なくなる。   In the present invention, when the amount of change between the changed pixels is the same, the smaller the number of changed pixels, the smaller the amount of generated code. Therefore, in the example of FIG. However, the amount of generated code is reduced.

従って、図38(b)のスキャン順序と図38(d)のスキャン順序を適応的に切り換えることによって、符号量の削減ができる場合がある。この場合、復号化処理側で再生できるようにするために、スキャン順序を識別する情報を別途符号化してデータに付加しておく必要がある。そして、このスキャン順序を識別する情報に基づき、方向を切り換えながら復号するようにする。   Therefore, the code amount may be reduced by adaptively switching the scan order of FIG. 38B and the scan order of FIG. 38D. In this case, in order to be able to reproduce on the decoding processing side, it is necessary to separately encode information for identifying the scan order and add it to the data. Then, decoding is performed while switching the direction based on the information for identifying the scan order.

以上は、マクロブロックMB単位で圧縮符号化し、復号化する場合に、画像の状態によってはラスタスキャン順に行うよりも垂直方向(xy方向におけるy方向スキャン順)に処理するようにした方が効率の良い圧縮符号化処理ができる場合があり、従って、ラスタスキャン順にしたり、垂直方向にスキャンを切り換えて処理をしたりするといった具合に、画像の状況対応に方向を種々切り換えて処理することができるようにした方式を実現するものであった。   As described above, when compression encoding and decoding is performed in units of macro blocks MB, it is more efficient to perform processing in the vertical direction (y-direction scan order in the xy direction) than in the raster scan order depending on the state of the image. In some cases, it is possible to perform good compression coding processing. Therefore, it is possible to process by changing the direction according to the situation of the image, for example, in the order of raster scanning or by switching the scanning in the vertical direction. It was what realized the method.

しかし、正方ブロックであるマクロブロックMBを、正方ブロックのまま、処理する方式にかえて、正方ブロックを横長の長方形ブロックに並び替えるかたちにしてから処理すると、符号量を少なくすることができる場合もあるのでそれを次に第7の具体例として説明する。   However, if the macroblock MB, which is a square block, is processed as a square block instead of being processed, the code amount can be reduced by processing the square block after rearranging it into a horizontally long rectangular block. This will be described as a seventh specific example.

(第7の具体例)図39を用いて本発明の第7の具体例を説明する。この具体例において必要なシステム構成も基本的には図2および図3の如きで良く、以下説明する処理は符号化処理については、図2におけるアルファマップ符号化回路200においてなされ、復号化処理については図3におけるアルファマップ復号化回路400においてなされるように仕組みを整えておけば良い。   (Seventh Specific Example) A seventh specific example of the present invention will be described with reference to FIG. The system configuration required in this specific example may basically be as shown in FIGS. 2 and 3, and the processing described below is performed in the alpha map encoding circuit 200 in FIG. The mechanism may be arranged so as to be performed in the alpha map decoding circuit 400 in FIG.

本具体例は、マクロブロックMB毎に独立に符号化するため、第5の具体例における“top reference ”および“left reference”の値を用いない例である。図39(a)は、本具体例のスキャン順序を説明する図である。図39(a)における左側の図のように、マクロブロックMBを構成するn×n画素構成の正方ブロックを、図39(a)における右側の図のようにライン毎に交互にスキャン方向を切り換えることで、ラスタスキャンされた長方形ブロックを作成する。すなわち、正方ブロックにおいて左上の画素よりラインに沿って水平に右側へスキャンし(S1)、右端に達すると次にその下のラインの画素に移り、右端から左端にラインに沿って水平に左側へスキャンし(S2)、左端に達すると次にその下のラインの画素に移り、左端から右端にラインに沿って水平に右側へスキャンし(S3)といった具合に、ジグザグにスキャンを進める。そして、スキャンの2ライン分をスキャン順に繋いで1ラインを倍にし、垂直方向(縦方向)にはライン数を少なくするかたちとして長方形ブロックを作成する。つまり、方形ブロックにおけるジグザグスキャンのS1,S2,S3,S4,S5,S6,…を、S1の次にS2を繋いで最上位置の1ラインとし、その下のラインはS3とS4を繋いだものとし、さらにその下のラインはS5とS6とを繋いだものとする,…といった具合である。   This example is an example in which the values of “top reference” and “left reference” in the fifth example are not used because encoding is performed independently for each macroblock MB. FIG. 39A is a diagram for explaining the scan order of this example. As shown on the left side of FIG. 39A, the scan direction of the square block of the n × n pixel configuration constituting the macroblock MB is alternately switched for each line as shown on the right side of FIG. 39A. Thus, a raster scanned rectangular block is created. That is, in the square block, the pixel is scanned horizontally to the right along the line from the upper left pixel (S1). When the right end is reached, the next pixel is moved to the lower line, and from the right end to the left end, the line is horizontally shifted left. Scan (S2), and when it reaches the left end, it moves to the pixel of the line below it, scans horizontally from the left end to the right end along the line (S3), and so on. Then, two lines of the scan are connected in the scan order to double one line, and a rectangular block is created so that the number of lines is reduced in the vertical direction (vertical direction). That is, S1, S2, S3, S4, S5, S6,... Of zigzag scan in a square block are connected to S2 next to S1 to be the uppermost line, and the lower line is connected to S3 and S4. In addition, the lower line is assumed to connect S5 and S6, and so on.

このように、正方ブロックを横長の長方形ブロックに並び替えるかたちにスキャンすることで、図39(b)の場合には変化画素の数が正方ブロックでは10個あったものが長方形ブロックでは5個に低減される。   In this way, by scanning the square block into a horizontally long rectangular block, in the case of FIG. 39B, the number of changed pixels is 10 in the square block but 5 in the rectangular block. Reduced.

但し、このようにすると変化画素間の相関は低下するため、符号化にあたり、正方ブロックに対して設計された可変長符号を用いると、逆に符号量が増加してしまう場合もある。しかし、この場合、長方形ブロックに対しては、長方形ブロック用の可変長符号を新たに設計してテーブルとして用意し、この長方形ブロック用可変長符号テーブルを用いて符号化するようにすればよい。   However, since the correlation between the changed pixels is lowered in this way, the amount of code may be increased conversely when a variable length code designed for a square block is used for encoding. However, in this case, for the rectangular block, a variable length code for the rectangular block may be newly designed and prepared as a table, and the encoding may be performed using the variable length code table for the rectangular block.

また、この具体例を適用しても図39(c)のような場合には、図からも分かるように変化画素の数は変わらず、逆に変化画素間の相関が低下しているために、長方形ブロックに変換するとむしろ発生符号量が増加してしまう。   Further, even if this specific example is applied, in the case as shown in FIG. 39C, the number of change pixels does not change as shown in the figure, and conversely, the correlation between the change pixels decreases. If converted into a rectangular block, the amount of generated code rather increases.

画像の状態は様々であり、従って、正方ブロックと長方形ブロックとを適応的に切り換えることで、発生符号量の削減を図ることができる場合があることから、手法としてこの具体例のようなものも、十分に意義がある。   There are various image states. Therefore, there are cases where the amount of generated codes can be reduced by adaptively switching between a square block and a rectangular block. Is meaningful enough.

ところで、マクロブロックMB単位の処理とはいっても、いつでもマクロブロックMBのサイズそのままに、圧縮処理するというのは能率的でない場合も多い。例えば、縦の垂直な帯線のみが入っている場合のように、マクロブロックMB内においてどのラインも同じ画像の状況を呈しているような時は、ラインを間引くかたちで圧縮しても解像度を落とすことなく高い忠実度で再生することが可能である。このような画像に対して最適な手法を次に第8の具体例として説明する。   By the way, even if the processing is performed in units of macroblock MB, it is often inefficient to perform compression processing with the size of the macroblock MB as it is. For example, when all the lines in the macro block MB have the same image status as in the case where only vertical vertical lines are included, the resolution can be reduced even if the lines are compressed. It is possible to reproduce with high fidelity without dropping. Next, an optimum method for such an image will be described as an eighth example.

(第8の実施例)図6および図8および図40を用いて本発明の第8の具体例を説明する。この具体例において必要なシステム構成も基本的には図2および図3の如きで良く、以下説明する処理は符号化処理については、図2におけるアルファマップ符号化回路200においてなされ、復号化処理については図3におけるアルファマップ復号化回路400においてなされるように仕組みを整えておけば良い。   (Eighth Embodiment) An eighth embodiment of the present invention will be described with reference to FIGS. 6, 8 and 40. FIG. The system configuration required in this specific example may basically be as shown in FIGS. 2 and 3, and the processing described below is performed in the alpha map encoding circuit 200 in FIG. The mechanism may be arranged so as to be performed in the alpha map decoding circuit 400 in FIG.

本具体例は、第1の具体例において用いた2値画像を縮小した後に符号化する方法を、マクロブロックMB単位での処理に適用した場合の問題点を解決するものである。   This specific example solves the problem when the method of encoding after reducing the binary image used in the first specific example is applied to processing in units of macroblock MBs.

上述したように、符号化回路および復号化回路は基本的には第1の具体例で用いたものを採用することができ、ここではアルファマップ符号化回路200は既に説明した図6の構成を、また、アルファマップ復号化回路400は既に説明した図8の構成を採用する。従って、各構成要素の動作および信号の流れは既に第1の具体例で詳細に説明したので、ここでは深く立ち入らない。   As described above, the encoding circuit and the decoding circuit can basically adopt the ones used in the first specific example. Here, the alpha map encoding circuit 200 has the configuration shown in FIG. The alpha map decoding circuit 400 employs the configuration shown in FIG. Therefore, since the operation of each component and the signal flow have already been described in detail in the first specific example, they do not go into depth here.

図40は2値画像を縮小する例を示す図である。図40の(a)は、第1の具体例で説明した手法による縮小例であり、縮小フィルタにより縮小した例である。図40の(a)においては、変換比率CRが“1”のもの(縮小なしの状態のもの)、変換比率CRが“1/2”のもの(1/2縮小の状態のもの)、変換比率CRが“1/4”のもの(1/4縮小の状態のもの)を示しており、いずれも方形のブロックの状態のまま間引き処理した結果を示している。   FIG. 40 is a diagram illustrating an example of reducing a binary image. FIG. 40A shows an example of reduction by the method described in the first specific example, which is an example of reduction by a reduction filter. In FIG. 40A, the conversion ratio CR is “1” (no reduction), the conversion ratio CR is “1/2” (1/2 reduction), and the conversion The ratio CR is “1/4” (1/4 reduction state), and all show the results of the thinning process in the square block state.

また、図40の(b)は第7の具体例で説明したライン間引きにより垂直方向に縮小した例である。図40の(b)においては、変換比率CRが“1”のものが縮小なしの状態のもの、変換比率CRが“1/2”のもの(1/2縮小の状態のもの)、変換比率CRが“1/4”のもの(1/4縮小の状態のもの)を示しており、いずれも方形のブロックから間引き処理を行ってかつ長方形ブロックへの変換を行った状態に処理した結果を示している。   FIG. 40B shows an example of reduction in the vertical direction by line thinning described in the seventh specific example. In FIG. 40B, a conversion ratio CR of “1” is a state without reduction, a conversion ratio CR is “1/2” (a state of 1/2 reduction), and a conversion ratio. CR indicates “1/4” (1/4 reduction state), and in each case, the results of processing to a state where a rectangular block is thinned and converted to a rectangular block Show.

ここで、変換比率CR(“Conversion Ratio”)は、図6のアルファマップ符号化回路200における線60を介して供給される縮小率である。第1の具体例あるいはMMRでは、変化画素“b1”と変化画素“a1”のアドレスの差分(b1−a1)の値がしきい値以下ならば、長さ(a1−a0)のランと長さ(a2−a1)のランを符号化している(水平モード)。   Here, the conversion ratio CR (“Conversion Ratio”) is a reduction ratio supplied via the line 60 in the alpha map encoding circuit 200 of FIG. In the first specific example or MMR, if the value of the address difference (b1-a1) between the change pixel “b1” and the change pixel “a1” is less than or equal to the threshold value, the length (a1-a0) run and length The run (a2-a1) is encoded (horizontal mode).

また、符号化をマクロブロックMB毎に行うため、生起し得るラン長の種類は、各CRの値に対して一意に定まる。ここで、図40(a)のように、方形形状のブロックのまま、水平,垂直方向共に間引いて縮小した場合には、変換比率CRが変わることによってラン長の頻度分布が大きく変わる。従って、各CR対応にランレングス用の可変長符号を各々用意しておくことで、各CR対応に可変長符号化を行うようすれば、符号化効率の改善が図れる。   Also, since encoding is performed for each macroblock MB, the types of run lengths that can occur are uniquely determined for each CR value. Here, as shown in FIG. 40A, when the rectangular block is thinned out and reduced in both the horizontal and vertical directions, the frequency distribution of the run length changes greatly by changing the conversion ratio CR. Therefore, by preparing a variable length code for run length corresponding to each CR, if variable length coding is performed for each CR, the coding efficiency can be improved.

なお、第1の具体例のように、最大ラン長を画面(マクロブロックMB)の水平画素数とすれば、ラン長の種類は最大でも17(0〜16)であるから、複数の可変長符号を用意しても可変長符号表を蓄えるメモリの負担は小さい。   As in the first specific example, if the maximum run length is the number of horizontal pixels of the screen (macroblock MB), the type of run length is 17 (0 to 16) at the maximum. Even if the code is prepared, the load on the memory for storing the variable length code table is small.

また,図40(b)の例では,変換比率CRを小さくすると変化画素間の相関が低下するため、変換比率CRが異なれば、相対アドレスの頻度分布の偏りが大きく異なる。従って、各CRに対して各々最適な可変長符号を切り換えることで、発生符号量の削減が図れる。なお、相対アドレスの絶対値の種類は最大でも16種類(0〜15)であるため、複数の可変長符号表を用意してもメモリの負担は少ない。   In the example of FIG. 40B, since the correlation between the changed pixels decreases when the conversion ratio CR is decreased, the deviation in the frequency distribution of the relative addresses is greatly different if the conversion ratio CR is different. Therefore, the amount of generated code can be reduced by switching the optimum variable length code for each CR. Since the absolute value types of relative addresses are 16 types (0 to 15) at the maximum, the burden on the memory is small even if a plurality of variable length code tables are prepared.

また、図40(a)の例では、生起し得る相対アドレスの絶対値の最大値が異なるため、上記の水平モードヘ切り換えるしきい値を、各CRの対して切り換えても良い。また、マクロブロックMB毎に変換比率CRあるいは縮小方法(例えば、図40(a)や図40(b)に示す如きの形式等)を画像の状態に合わせて適応的に切り換えることで、符号量制御を行うことができる。   In the example of FIG. 40A, since the maximum absolute value of the relative address that can occur is different, the threshold value for switching to the horizontal mode may be switched for each CR. Also, the code amount can be changed by adaptively switching the conversion ratio CR or the reduction method (for example, the format shown in FIGS. 40A and 40B) according to the state of the image for each macroblock MB. Control can be performed.

以上、第5ないし第8の具体例によれば、マクロブロックMB単位でのアルファマップ符号化においても大幅な符号量の増加を招くことなく符号化が可能となり、また、復号することができるようになる。   As described above, according to the fifth to eighth specific examples, even in alpha map encoding in units of macroblock MB, encoding can be performed without causing a significant increase in code amount, and decoding can be performed. become.

なお、本発明は上述した各種の具体例に限定されるものではなく、種々変形して実施可能である。   The present invention is not limited to the various specific examples described above, and can be implemented with various modifications.

(応用例)最後に、本発明の応用例として本発明の動画像符号化/復号化装置を適用した動画像伝送システムの実施形態を図41を用いて説明する。   (Application Example) Finally, as an application example of the present invention, an embodiment of a video transmission system to which the video encoding / decoding apparatus of the present invention is applied will be described with reference to FIG.

図41(a)に示すように、このシステムは、パーソナルコンピュータ(PC)1001に備え付けられたカメラ1002より入力された動画像信号は、PC1001に組み込まれた動画像符号化装置によって符号化される。この動画像符号化装置から出力される符号化データは、他の音声やデータの情報と多重化された後、無線機1003により無線で送信され、他の無線機1004によって受信される。   As shown in FIG. 41A, in this system, a moving image signal input from a camera 1002 provided in a personal computer (PC) 1001 is encoded by a moving image encoding device incorporated in the PC 1001. . The encoded data output from the moving image encoding apparatus is multiplexed with other audio and data information, then transmitted wirelessly by the wireless device 1003 and received by the other wireless device 1004.

無線機1004で受信された信号は、動画像信号の符号化データおよび音声やデータの情報に分解される。これらのうち、動画像信号の符号化データはワークステーション(EWS)1005に組み込まれた動画像復号化装置によって復号され、EWS1005のディスプレイに表示される。   A signal received by the wireless device 1004 is decomposed into encoded data of a moving image signal and information of voice and data. Among these, the encoded data of the moving image signal is decoded by a moving image decoding device incorporated in the workstation (EWS) 1005 and displayed on the display of the EWS 1005.

一方、EWS1005に備え付けられたカメラ1006より入力された動画像信号は、EWS1006に組み込まれた動画像符号化装置を用いて上記と同様に符号化される。動画像信号の符号化データは、他の音声やデータの情報と多重化され、無線機1004により無線で送信され、無線機1003によって受信される。無線機1003によって受信された信号は、動画像信号の符号化データおよび音声やデータの情報に分解される。これらのうち、動画像信号の符号化データはPC1001に組み込まれた動画像復号化装置によって復号され、PC1001のディスプレイに表示される。   On the other hand, a moving image signal input from a camera 1006 provided in the EWS 1005 is encoded in the same manner as described above using a moving image encoding device incorporated in the EWS 1006. The encoded data of the moving image signal is multiplexed with other audio and data information, transmitted wirelessly by the wireless device 1004, and received by the wireless device 1003. A signal received by the wireless device 1003 is decomposed into encoded data of a moving image signal and information of voice and data. Among these, the encoded data of the moving image signal is decoded by a moving image decoding device incorporated in the PC 1001 and displayed on the display of the PC 1001.

図41(b)は、図41(a)におけるPC1001およびEWS1005に組み込まれた動画像符号化装置の、そして、図41(c)は、図41(a)におけるPC1001およびEWS1005に組み込まれた動画像復号化装置の構成を概略的に示すブロック図である。   41 (b) shows the moving picture coding apparatus incorporated in the PC 1001 and EWS 1005 in FIG. 41 (a), and FIG. 41 (c) shows the moving picture incorporated in the PC 1001 and EWS 1005 in FIG. 41 (a). It is a block diagram which shows schematically the structure of an image decoding apparatus.

図41(b)に示す動画像符号化装置は、カメラなどの画像入力部1101からの画像信号を入力して誤り耐性処理部1103を有する情報源符号化部1102と、伝送路符号化部1104を有し、情報源符号化部1101においては予測残差信号の離散コサイン変換(DCT)と生成されたDCT係数の量子化などが行われ、伝送路符号化部1104においては可変長符号化や符号化データの誤り検出および誤り訂正符号化などが行われる。伝送路符号化部1104から出力される符号化データは無線機1105に送られ、送信される。情報源符号化部1101における処理や、伝送路符号化部1104における可変長符号化処理は、本発明の各具体例で説明した如きの処理手法を適用する。   The moving picture encoding apparatus shown in FIG. 41B receives an image signal from an image input unit 1101 such as a camera, and has an information source encoding unit 1102 having an error tolerance processing unit 1103, and a transmission path encoding unit 1104. The information source coding unit 1101 performs discrete cosine transform (DCT) of the prediction residual signal and quantization of the generated DCT coefficient, and the transmission path coding unit 1104 performs variable length coding and the like. Error detection and error correction encoding of encoded data are performed. The encoded data output from the transmission path encoding unit 1104 is sent to the wireless device 1105 and transmitted. The processing method as described in each specific example of the present invention is applied to the processing in the information source encoding unit 1101 and the variable length encoding processing in the transmission path encoding unit 1104.

一方、図41(c)に示す動画像復号化装置は、無線機1201によって受信された符号化データを入力して伝送路符号化部1104と逆の処理を行う伝送路復号化部1202と、伝送路復号化部1201の出力信号を入力して情報源符号化部1102と逆の処理を行う誤り耐性処理部1204を有する情報源復号化部1203を有し、情報源復号化部1203で復号化された画像はディスプレイなどの画像出力部1025によって出力される。   On the other hand, the moving picture decoding apparatus shown in FIG. 41 (c) receives the encoded data received by the wireless device 1201, and performs a reverse process to the transmission line encoding unit 1104. It has an information source decoding unit 1203 having an error resilience processing unit 1204 that receives the output signal of the transmission path decoding unit 1201 and performs the reverse process of the information source encoding unit 1102. The information source decoding unit 1203 The converted image is output by an image output unit 1025 such as a display.

これらでの復号化処理は、本発明の各具体例で説明した如きの処理手法を適用する。   For these decoding processes, the processing method as described in each specific example of the present invention is applied.

(第9の具体例)
<アルファマップ用の動きベクトル(MV)を符号化する方式の具体例>上述の[第2の具体例その2]は、フレーム間の相関を利用して符号化する方法であって、前フレームのラインを参照ラインとすることで、フレーム間の相関を利用して符号化処理効率を向上させるようにする具体例であった。この方法は、MBライン単位(マクロブロックにおけるライン方向の1ライン単位)での処理であるが、当然、MB単位で処理するようにしても、一般性は失われない。
(Ninth example)
<Specific Example of Method for Encoding Motion Vector (MV) for Alpha Map> The above-mentioned [second specific example 2] is a method of encoding using correlation between frames, and includes the previous frame This is a specific example in which the reference line is used as a reference line to improve the encoding processing efficiency using the correlation between frames. This method is processing in MB line units (one line unit in the line direction in the macroblock), but naturally, even if processing is performed in MB units, generality is not lost.

そこで、フレーム間の相関を利用して符号化するにあたり、マクロブロック単位で符号化することで、符号化処理効率向上を計るようにする具体例を次に説明する。   Accordingly, a specific example will be described below in which encoding is performed in units of macroblocks in order to improve the encoding processing efficiency when encoding using correlation between frames.

本具体例では、MB単位(マクロブロック単位)で、アルファマップの動き補償予測(MC)信号と、当該MB(マクロブロック)の信号との相関を評価し、その評価値が予め設定されたしきい値よりも小さい場合には、当該MBにMC信号をコピーし(以後、コピー符号化と呼ぶ)、しきい値よりも大きかった場合には、当該MBを本発明で提供するような2値画像符号化法により符号化するシステムである。   In this specific example, the correlation between the motion compensated prediction (MC) signal of the alpha map and the MB (macroblock) signal is evaluated in MB units (macroblock units), and the evaluation value is set in advance. If the threshold value is smaller than the threshold value, the MC signal is copied to the MB (hereinafter referred to as copy encoding). If the threshold value is larger than the threshold value, the MB value is a binary value provided by the present invention. This is a system for encoding by an image encoding method.

コピー符号化を実施するにあたり、“アルファマップのMV(動きベクトル)”と、“Y(輝度)信号のMV(動きベクトル)”との相関が非常に高い場合には、Y信号で求めたMVをそのまま使用することで、“アルファマップのMV”についての符号量を用いることなしに、コピー符号化が可能となる。   When performing the copy encoding, if the correlation between “alpha map MV (motion vector)” and “Y (luminance) signal MV (motion vector)” is very high, the MV obtained from the Y signal By using as it is, copy encoding can be performed without using the code amount for “MV of alpha map”.

特願平8−116542号には、アルファマップとY信号とをブレンドした信号(この処理は、一般にアルファブレンディングと呼ばれる)を用いてMV(動きベクトル)を検出することで、アルファマップとY信号との共通のMV(このMV(動きベクトル)をMVYAと表記する)を検出する発明が記載されている。即ち、アルファマップとY信号との共通の動きベクトルである“MVYA”を利用してアルファマップをMC(動き補償予測)すれば、アルファマップのコピー符号化でのMVの情報は必要ない。つまり、アルファマップのコピー符号化にあたっては、アルファマップの動きベクトルの情報は無くて良い。   In Japanese Patent Application No. 8-116542, an alpha map and a Y signal are detected by detecting a MV (motion vector) using a signal obtained by blending an alpha map and a Y signal (this process is generally called alpha blending). And a common MV (this MV (motion vector) is expressed as MVYA). That is, if the alpha map is MC (motion compensated prediction) using “MVYA”, which is a common motion vector of the alpha map and the Y signal, MV information is not necessary for alpha map copy coding. In other words, in the case of alpha map copy encoding, there is no need for information on the motion vector of the alpha map.

しかし、この場合、アルファマップの符号量は削減されるものの、反面、Y信号においては最適なMVが検出されないため、Y信号のMC誤差値(アルファマップの動き補償予測信号の誤差値)が大きくなり、符号化システム全体での符号化効率が低下するおそれがある。   However, in this case, although the code amount of the alpha map is reduced, on the other hand, since the optimum MV is not detected in the Y signal, the MC error value of the Y signal (the error value of the motion compensated prediction signal of the alpha map) is large. Therefore, the coding efficiency of the entire coding system may be reduced.

例えば、Y信号に対しての最適な動きベクトルMVY を検出した場合や、アルファマップに対しての最適な動きベクトルMVA を検出した場合がこれに該当し、このような場合には符号化効率の低下が避けられない。   For example, the case where the optimum motion vector MVY for the Y signal is detected and the case where the optimum motion vector MVA for the alpha map is detected fall under this case. A decline is inevitable.

具体的には、図42における(a)や(b)のような場合が、符号化効率の低下するおそれがある例である。これらのうち、図42(a)に示すケースは、Y信号に対しての最適な動きベクトルMVY を検出した場合を示しており、ある時点でのあるマクロブロックの部分画像に着目して説明すると、前フレームで検出したY信号に対しての動きベクトルMVY の指し示す位置が、後フレームでの当該部分画像の出現位置に一致している様子を示している。ここで用いられる誤差評価値は、例えば、オブジェクトに含まれる画素値における誤差値である。   Specifically, cases such as (a) and (b) in FIG. 42 are examples in which the coding efficiency may decrease. Of these cases, the case shown in FIG. 42 (a) shows a case where the optimum motion vector MVY for the Y signal is detected, and will be described by focusing on a partial image of a macroblock at a certain point in time. This shows that the position indicated by the motion vector MVY with respect to the Y signal detected in the previous frame matches the appearance position of the partial image in the subsequent frame. The error evaluation value used here is, for example, an error value in a pixel value included in the object.

また、図42(b)はアルファマップに対して最適な動きベクトルMVA を検出した場合を示しており、ある時点でのあるマクロブロック部分でのアルファマップ内容に着目して説明すると、前フレームで検出したマクロブロック部分でのアルファマップ内容に対する動きベクトルMVA の指し示す位置が、後フレームでの当該アルファマップ内容部分の出現位置に一致している様子を示している。ここで用いられる誤差値は、例えば、アルファマップのミスマッチ画素数である。   FIG. 42 (b) shows a case where an optimal motion vector MVA is detected for the alpha map. If attention is paid to the alpha map contents at a certain macroblock portion at a certain time point, This shows that the position indicated by the motion vector MVA with respect to the alpha map content in the detected macroblock portion matches the appearance position of the alpha map content portion in the subsequent frame. The error value used here is, for example, the number of mismatched pixels in the alpha map.

なお、MVYAは、MVY よりもMVA と類似なMV(動きベクトル)となるため、アルファマップ符号化の符号量は、最適な値MVA を用いた場合と比較してもほとんど増加しない。   Since MVYA is an MV (motion vector) similar to MVA than MVY, the code amount of alpha map encoding hardly increases even when compared with the case where the optimum value MVA is used.

一方、“MVY ”を共通のMVとして用いても、アルファマップのMC誤差(動き補償予測誤差)が大きくなるため、コピー符号化が選択されず、アルファマップ符号化の効率が向上しない。   On the other hand, even if “MVY” is used as a common MV, the MC error (motion compensation prediction error) of the alpha map increases, so that copy coding is not selected and the efficiency of alpha map coding does not improve.

そこで、これを打開するためには、図42(c)に一例を示すように、アルファマップに対しての最適な動きベクトルであるMVA と輝度信号に対しての最適な動きベクトルであるMVY の差分であるMVDA を求め、この求めたMVDAを効率よく符号化するようにする。このようにMVA とMVY の差分を求めて、これを符号化することで、Y信号(輝度信号)の符号化効率を低下させずに、アルファマップの符号化効率を向上させることが可能となる。   Therefore, in order to overcome this problem, as shown in FIG. 42 (c), an optimal motion vector MVA for the alpha map and an optimal motion vector MVY for the luminance signal are shown. The difference MVDA is obtained, and the obtained MVDA is efficiently encoded. Thus, by obtaining the difference between MVA and MVY and encoding it, the encoding efficiency of the alpha map can be improved without reducing the encoding efficiency of the Y signal (luminance signal). .

ところで、MVA とMVY の差分であるMVDA が大きな値となった場合には、動きベクトルの符号量よりも、当該ブロックを2値画像符号化する際の符号量の方が小さくなる場合がある。また、MVDA はMVY からの差分ベクトルであるから、そのダイナミックレンジは小さい。   By the way, when MVDA, which is the difference between MVA and MVY, becomes a large value, the code amount when the block is binary-coded may be smaller than the code amount of the motion vector. Since MVDA is a difference vector from MVY, its dynamic range is small.

そこで、MVDA の探索範囲の最大値をMVY の探索範囲よりも小さくなるように制限することで、MVDA の符号量と、2値画像符号化における符号量とのトレードオフを図るようにすると良い。また、MVDA の探索範囲を制限することで、MVDA 用の符号表は、MVY を符号化する(実際に符号化されるのは、MVY の予測誤差であり、この予測誤差のダイナミックレンジは、MVY のダイナミックレンジの2倍となる)符号表よりも小さくなる。従って、MVDA 用に小さな可変長符号表を設計することで、より符号化効率が改善される。   Therefore, by limiting the maximum value of the MVDA search range to be smaller than the MVY search range, a trade-off between the code amount of MVDA and the code amount in binary image coding may be achieved. In addition, by limiting the search range of MVDA, the code table for MVDA encodes MVY (what is actually encoded is a prediction error of MVY, and the dynamic range of this prediction error is MVY Smaller than the code table). Therefore, the coding efficiency is further improved by designing a small variable length code table for MVDA.

<MVA を検出する具体例>つぎに、第9の具体例を実施するにあたり、アルファマップに対しての最適な動きベクトルMVA を検出する必要があるが、その具体例を説明する。   <Specific Example of Detecting MVA> Next, in implementing the ninth specific example, it is necessary to detect the optimum motion vector MVA for the alpha map. A specific example will be described.

既に、Y信号の方でMVY (Y信号に対しての最適な動きベクトル)は送られているものとすると、MVY で指し示される位置を中心として、MVA とMVYの差分であるMVDA は検出される。前述した通り、アルファマップのコピー符号化は、アルファマップのMC誤差(動き補償予測誤差)が、あるしきい値よりも小さくなった時に実行される。そこで、中心位置から外側への順序で誤差を評価し、最初に誤差がしきい値よりも小さくなった位置のMVDA を用いることにする。   Assuming that MVY (optimal motion vector for Y signal) has already been sent in the Y signal, MVDA, which is the difference between MVA and MVY, is detected around the position indicated by MVY. The As described above, alpha map copy encoding is executed when the MC error (motion compensation prediction error) of the alpha map becomes smaller than a certain threshold value. Therefore, the error is evaluated in the order from the center position to the outside, and the MVDA at the position where the error becomes smaller than the threshold value is used first.

これにより、最も小さなMVDA が検出されて、これが使用されることになり、一般に、MVDA の大きさが小さければ小さいほど、短い符号が割り当てられることになるために、MVDA は効率よく符号化されることとなる。   This detects and uses the smallest MVDA, and in general, the smaller the size of the MVDA, the shorter code will be assigned, so the MVDA is efficiently encoded. It will be.

以上は動きベクトルの符号化であったが、マクロブロックの属性情報をフレーム単位で符号化する方式も考えられる。従って、次にこれを第10の具体例として説明する。   The above is the encoding of the motion vector. However, a method of encoding the attribute information of the macroblock on a frame basis is also conceivable. Therefore, this will be described as a tenth specific example.

(第10の具体例)第10の具体例として、各マクロブロックの属性情報をフレーム単位で符号化する方式の具体例を説明する。   (Tenth Specific Example) As a tenth specific example, a specific example of a method of encoding attribute information of each macroblock in units of frames will be described.

第6の具体例における図38には、本発明で提供するようなブロックベースで2値画像符号化する場合の各ブロック(マクロブロックMB)の属性が表されている。また、このブロック(MB)の属性情報は、2値画像符号化情報とは別途に符号化する必要がある。   FIG. 38 in the sixth specific example shows the attributes of each block (macroblock MB) when performing binary image coding on a block basis as provided in the present invention. Further, the attribute information of this block (MB) needs to be encoded separately from the binary image encoding information.

図43(a)は、上述した図38を書き直したものである。この図においては、“白”部分のみのマクロブロックをMBwhとし、背景部分と人物部分両方を含むマクロブロックをMBotとし、“黒”部分のみのマクロブロックをMBbkとしてある。そして、“白”部分のみのマクロブロックであるMBwhを“0”、背景部分と人物部分両方を含むマクロブロックであるMBotを“1”、“黒”部分のみのマクロブロックであるMBbkを“3”とラベル付けしたとすると、図43の(a)は、図43(b)のようなblock typeの情報となり、このblock typeの情報がMBの属性情報である。   FIG. 43A is a rewrite of FIG. 38 described above. In this figure, a macroblock having only the “white” portion is denoted as MBwh, a macroblock including both the background portion and the person portion is denoted as MBot, and a macroblock having only the “black” portion is denoted as MBbk. Then, MBwh which is a macro block including only the “white” portion is “0”, MBot which is a macro block including both the background portion and the person portion is “1”, and MBbk which is a macro block including only the “black” portion is “3”. 43 (a) becomes block type information as shown in FIG. 43 (b), and this block type information is MB attribute information.

ラベルは“1”,“2”,“3”の三種であり、これらは2ビットあれば表現できる。つまり、十進数の“1”は2進表現で“01”、十進数の“2”は2進表現で“10”、十進数の“3”は2進表現で“11”であり、2ビットあれば表現できる。   There are three types of labels, “1”, “2”, and “3”, and these can be expressed with 2 bits. That is, the decimal number “1” is “01” in binary representation, the decimal number “2” is “10” in binary representation, and the decimal number “3” is “11” in binary representation. If it is a bit, it can be expressed.

このようにblock type情報は、2ビットで表現できるため、その上位ビット(MSB )と下位ビット(LSB )をビットプレーンに分解すると、図43(c)の様になる。なお、図43(c)において、Bpoは元のblock typeの情報が(MBの属性情報)であり、BplはBpoをビットプレーンに分解して得た下位ビット(LSB )のビットプレーンであり、BpmはBpoを分解して得た上位ビット(MSB )のビットプレーンである。   Since the block type information can be represented by 2 bits in this way, when the upper bit (MSB) and the lower bit (LSB) are decomposed into bit planes, the result is as shown in FIG. In FIG. 43 (c), Bpo is the original block type information (MB attribute information), and Bpl is the lower-order bit (LSB) bit plane obtained by breaking Bpo into bit planes. Bpm is a bit plane of upper bits (MSB) obtained by decomposing Bpo.

一般に、図43(a)のように、オブジェクトか否かを表す、アルファマップのブロック属性情報を、図43(b)の様にラベル付けすることで、図43(c)におけるBpl,Bpmの様に上位および下位のビットのプレーンに分解したときに、何れのビットプレーンにおいても“0”と“1”は、かたまり易くなる。即ち、MSBにおいても、LSBにおいても、相関が保てることになる。   In general, as shown in FIG. 43 (a), the block attribute information of the alpha map indicating whether or not the object is labeled as shown in FIG. 43 (b), so that Bpl and Bpm in FIG. In this way, when the plane is broken down into upper and lower bit planes, “0” and “1” are easily collected in any bit plane. That is, the correlation can be maintained in both the MSB and the LSB.

図44は、図43(c)の各ビットプレーンを、本発明で提供するブロックベースのMMRで符号化する例である。この図に示すように、ビットプレーンに分解し、各ビットプレーンを高能率な2値画像符号化方式により符号化する事で、ブロックの属性情報の符号量をブロック毎に符号化する場合に比べて、大幅に削減することができるようになる。   FIG. 44 shows an example in which each bit plane of FIG. 43C is encoded by the block-based MMR provided in the present invention. As shown in this figure, by dividing into bit planes and encoding each bit plane using a highly efficient binary image encoding method, the code amount of the attribute information of the block is compared with the case of encoding for each block. Can be greatly reduced.

また、ブロックの属性を符号化する2値画像符号化と、各ブロックを符号化する2値画像符号化の符号化法を同一のものとする事で、符号化システム全体の複雑さを緩和することができる。   In addition, the complexity of the entire encoding system is reduced by making the encoding method of the binary image encoding for encoding the attribute of the block the same as the encoding method of the binary image encoding for encoding each block. be able to.

以上が、ブロックの属性情報を符号化する方式の具体例であるが、ブロックの属性情報の符号化方式には別の方法もあるので、これを次に説明する。   The above is a specific example of a method for encoding block attribute information, but there is another method for encoding block attribute information, which will be described next.

図45は、時刻 n と時刻 n-1 におけるあるマクロブロックの属性情報の一例を表している。図2(a)の様に、オブジェクトの左上を領域の境界部に接するように、方形領域を設定すると、図45における(a)に示した時刻 n でのブロックの属性情報の例と(b)に示した時刻 n-1 でのブロックの属性情報の例のように、時間的に近いフレームのアルファマップ間では、非常に似たラベル付けが行われる。従って、このような場合には、フレーム間においてラベルの相関が高いため、既に符号化済みのフレームのラベルを利用して、現フレームのラベルを符号化することで、大幅に符号化効率が改善されることになる。   FIG. 45 shows an example of attribute information of a certain macroblock at time n and time n-1. As shown in FIG. 2A, when the rectangular area is set so that the upper left of the object is in contact with the boundary of the area, an example of block attribute information at time n shown in FIG. As in the example of the attribute information of the block at time n-1 shown in (), very similar labeling is performed between alpha maps of frames close in time. Therefore, in such a case, since the correlation of labels between frames is high, encoding efficiency is greatly improved by encoding the label of the current frame using the label of the already encoded frame. Will be.

また、一般に、時刻 n と、時刻 n-1 の領域のサイズが異なる場合がある。この場合、一例として、図46に示す手順で、時刻 n-1 での領域を 時刻 nのサイズに合わせる。例えば、時刻 n におけるマクロブロックが、時刻 n-1におけるマクロブロックの行より1行長く、1列短い場合は、図46(a)のように、行の短い時刻 n-1 におけるマクロブロックの右端の1列をカットし、その後、下部の1行分をその下にコピーして行を増やす。この状態が図46(b)である。   In general, the size of the area at time n and time n-1 may be different. In this case, as an example, the area at time n-1 is adjusted to the size of time n by the procedure shown in FIG. For example, if the macroblock at time n is one row longer than the macroblock row at time n-1 and one column shorter, the right end of the macroblock at time n-1 with a short row as shown in FIG. Is cut, and then the lower row is copied below to increase the number of rows. This state is shown in FIG.

また、時刻 n-1 におけるマクロブロックが、時刻 n のマクロブロックより列が1列短く、1行長い場合は、下端の1行をカットし、その後、そのマクロブロック右端の1列をその隣りにコピーして1列増やす。   If the macroblock at time n-1 is one column shorter and one row longer than the macroblock at time n, the bottom row is cut, and then the rightmost column of the macroblock is placed next to it. Copy and increase one column.

サイズが合わないときは、このようにしてサイズを合わせる。なお、サイズの合わせ方は前記の方法に限ったものではない。そして、最終的に、図46(b)の様に、時刻 n のサイズに合わせられた、時刻 n-1 のラベルを、ここでは便宜上、時刻 n-1' のラベルと表記して以下の説明に用いることにする。   If the size does not match, adjust the size in this way. Note that the method of adjusting the size is not limited to the above method. Finally, as shown in FIG. 46 (b), the label at time n-1 adjusted to the size at time n is expressed as the label at time n-1 'here for convenience. I will use it.

図47(a)は、時刻 n での上述のマクロブロックの属性情報と、時刻 n-1' での上述のマクロブロックの属性情報の差分、つまり各画素位置での各ラベルの差分を、同一画素位置のもの同士で取った結果を示している。ここで、Sは“ラベルが一致している”ことを示し、Dは“ラベルが不一致である”ことを示す。   FIG. 47A shows the difference between the above-described macroblock attribute information at time n and the above-described macroblock attribute information at time n−1 ′, that is, the difference between each label at each pixel position. The result taken between the pixel positions is shown. Here, S indicates “labels match”, and D indicates “labels do not match”.

一方、図47(b)は、時刻 n での上述のマクロブロックの属性情報における隣接画素位置のラベルの差分をとった結果を示している。ここで、左端のラベルは、1ライン上の右端の画素位置でのラベルとの差を取り、左上端の画素位置でのラベルは、“0”との差を取ることにしている。以後、便宜的に図47(a)をフレーム間符号化、図47(b)をフレーム内符号化と呼ぶことにする。   On the other hand, FIG. 47B shows the result of taking the difference in the label of adjacent pixel positions in the above-described macroblock attribute information at time n. Here, the leftmost label takes a difference from the label at the rightmost pixel position on one line, and the label at the upper left pixel position takes a difference from “0”. Hereinafter, for convenience, FIG. 47A is referred to as interframe coding, and FIG. 47B is referred to as intraframe coding.

図47より、フレーム間符号化の方がフレーム内符号化に比べてSの割合が多く、フレーム間符号化の方が予測が当たるため、符号量の削減を図ることができる。   From FIG. 47, since the ratio of S is larger in inter-frame coding than in intra-frame coding, and prediction is performed in inter-frame coding, the amount of code can be reduced.

図49は、各ラベルを符号化するための可変長符号表の例である。ここでは符号化対象となるラベルが、その予測値(フレーム間:前フレームのラベル、フレーム内:隣のラベル)と一致している場合(Sの場合)には1ビットで符号化し、一致していない場合(Dの場合)には、2ビットで符号化することにする。このようにすると、符号量を少なくすることができる。   FIG. 49 is an example of a variable length code table for encoding each label. Here, if the encoding target label matches the predicted value (between frames: the label of the previous frame, within the frame: the adjacent label) (in the case of S), it is encoded with 1 bit and matches. If not (in the case of D), encoding is performed with 2 bits. In this way, the code amount can be reduced.

また、フレーム間符号化の場合には、Sの割合が多いため、複数のラベルをまとめて符号化することで、更に符号化効率の向上が図られる。   In the case of interframe coding, since the ratio of S is large, coding efficiency can be further improved by collectively coding a plurality of labels.

図48は、ライン毎にライン内のラベルの差分が全てSか否かを、1ビットの符号で示す例である。これにより、ライン内が全てSでないラインのみラベルを符号化すれば良いため、符号量が大幅に削減されることが分かる。   FIG. 48 shows an example in which, for each line, whether or not all the label differences in the line are S is indicated by a 1-bit code. As a result, it is only necessary to encode the labels only for the lines in which the lines are not all S, and it can be seen that the amount of codes is greatly reduced.

なお、フレーム間での相関が極端に小さい場合、フレーム内符号化に比べて符号化効率が低下する恐れがある。この場合は、1ビットの符号でフレーム内符号化を行うか、フレーム間符号化を行うかを切り換えられるようにしておき、フレーム内符号化で符号化できるようにする。当然のことながら、最初に符号化するフレームは、参照するラベルが無いため、フレーム内符号化を行う。この際、フレーム間/フレーム内を切り換える符号は必要ない。   In addition, when the correlation between frames is extremely small, there is a possibility that the encoding efficiency may be reduced as compared with intra-frame encoding. In this case, it is possible to switch between intra-frame encoding with 1-bit code or inter-frame encoding so that encoding can be performed with intra-frame encoding. As a matter of course, since the frame to be encoded first has no reference label, intra-frame encoding is performed. At this time, a code for switching between frames / within frames is not necessary.

図50は、前述した本具体例のシステムのブロック図であり、このブロック図を参照して処理の流れを説明する。この図50の構成において、破線で囲まれた部分が前述した本具体例に係わる部分である。図50(a)は符号化装置であり、オブジェクト領域検出回路3100、ブロック化回路3110、ラベル付け回路3120、ブロック符号化回路3130、ラベルメモリ3140、サイズ変更回路3150、ラベル符号化回路3160、多重化回路(MUX)3170とより構成されている。   FIG. 50 is a block diagram of the system of this specific example described above, and the flow of processing will be described with reference to this block diagram. In the configuration shown in FIG. 50, a portion surrounded by a broken line is a portion related to the specific example described above. FIG. 50A shows an encoding device, which includes an object area detection circuit 3100, a blocking circuit 3110, a labeling circuit 3120, a block encoding circuit 3130, a label memory 3140, a size changing circuit 3150, a label encoding circuit 3160, and a multiplexing circuit. And a circuit (MUX) 3170.

これらのうち、オブジェクト領域検出回路3100は、入力されたアルファマップ信号を元に、そのアルファマップ信号においてオブジェクトを含んでいる部分についての方形領域を検出して、その方形領域のサイズに関する情報と共に当該方形領域のアルファマップ信号を出力するものである。ブロック化回路3110は、この方形領域のアルファマップ信号をマクロブロック化する回路であり、ラベル付け回路3120は、このマクロブロック化されたアルファマップ信号についてそのブロック毎に、そのマクロブロックでのアルファマップ信号内容の属性(MBwh(白のみ)、MBot(白と黒の混合)、MBbk(黒のみ))を判定し、各属性に対応するラベル(“0”、“1”、“3”)を割り当てる回路である。   Among these, the object area detection circuit 3100 detects a square area of a portion including the object in the alpha map signal based on the input alpha map signal, and includes the information about the size of the square area. This outputs an alpha map signal of a rectangular area. The blocking circuit 3110 is a circuit that converts the alpha map signal in the rectangular region into a macro block, and the labeling circuit 3120 is an alpha map in the macro block for each block of the macro block converted alpha map signal. Determine the attributes (MBwh (white only), MBot (white and black), MBbk (black only)) of the signal contents, and label ("0", "1", "3") corresponding to each attribute It is a circuit to assign.

ブロック符号化回路3130は、ラベルが“1”(MBot)のもののマクロブロックについて、そのマクロブロック内のアルファマップ信号を符号化する回路であり、ラベルメモリ3140は、ラベル付け回路3120より供給されるラベル情報とラベルメモリ出力線3020を介してオブジェクト領域検出回路3100から与えられる領域のサイズ情報を蓄積すると共に、この蓄積したラベル情報とサイズ情報を併せてサイズ変更回路3150に供給するためのメモリである。サイズ変更回路3150は、ラベルメモリ3140より供給される、時刻 n-1のフレームのラベル情報とサイズ情報と、オブジェクト領域検出回路3100から与えられる、時刻 n のフレームのサイズ情報とから、時刻 n-1 のラベル情報を時刻 n のサイズに相当する様にサイズを変更する回路であり、ラベル符号化回路3160は、このサイズ変更されたラベル情報を予測値として、ラベル付け回路3120より供給されるラベル情報を符号化する回路である。   The block encoding circuit 3130 is a circuit that encodes an alpha map signal in a macroblock having a label of “1” (MBot), and the label memory 3140 is supplied from the labeling circuit 3120. A memory for storing label information and area size information given from the object area detection circuit 3100 via the label memory output line 3020 and supplying the accumulated label information and size information to the size changing circuit 3150 together. is there. The size changing circuit 3150 uses the label information and size information of the frame at time n−1 supplied from the label memory 3140 and the size information of the frame at time n given from the object area detection circuit 3100 to generate a time n−. 1 is a circuit that changes the size of the label information so as to correspond to the size of time n, and the label encoding circuit 3160 uses the label information that has been changed in size as a predicted value to provide a label that is supplied from the labeling circuit 3120 It is a circuit that encodes information.

また、多重化回路3170は、ラベル符号化回路3160の得た符号化情報と、ブロック符号化回路3130より供給される符号化情報と、オブジェクト領域検出回路3100から与えられるサイズ情報とを多重化して出力する回路である。   The multiplexing circuit 3170 multiplexes the encoding information obtained by the label encoding circuit 3160, the encoding information supplied from the block encoding circuit 3130, and the size information given from the object area detection circuit 3100. It is a circuit to output.

このような構成の符号化装置は、線3010を介して供給されるアルファマップ信号は、オブジェクト領域検出回路3100により、オブジェクトを含む方形領域を検出する。この方形領域のサイズに関する情報は線3020を介して出力され、領域内部のアルファマップ信号は、ブロック化回路3110に供給される。ブロック化回路3110は、この領域内部のアルファマップ信号についてマクロブロック化する。マクロブロック化されたアルファマップ信号は、ラベル付け回路3120とブロック符号化回路3130に供給される。   In the encoding apparatus having such a configuration, the alpha map signal supplied via the line 3010 detects a square area including an object by the object area detection circuit 3100. Information about the size of this rectangular area is output via line 3020 and the alpha map signal inside the area is supplied to blocking circuit 3110. The blocking circuit 3110 converts the alpha map signal inside this area into a macro block. The alpha block signal that has been macroblocked is supplied to a labeling circuit 3120 and a block coding circuit 3130.

ラベル付け回路3120では、マクロブロック毎の属性(MBwh、MBot、MBbk)を判定し、各属性に対応するラベル(“0”、“1”、“3”)を割り当てる。このラベル情報は、ブロック符号化回路3130、ラベルメモリ3140、ラベル符号化回路3160に供給される。   The labeling circuit 3120 determines the attributes (MBwh, MBot, MBbk) for each macroblock and assigns labels (“0”, “1”, “3”) corresponding to the attributes. This label information is supplied to the block encoding circuit 3130, the label memory 3140, and the label encoding circuit 3160.

ブロック符号化回路3130では、ラベルが“1”(MBot)のとき、ブロック内のアルファマップ信号が符号化され、その符号化情報は多重化回路3170に供給される。ラベルメモリ3140には、ラベル付け回路3120より供給されるラベル情報とラベルメモリ出力線3020を介する領域のサイズ情報が蓄積され、ラベル情報とサイズ情報を併せてラベルメモリ出力線3030を介して、サイズ変更回路3150に供給される。   In the block encoding circuit 3130, when the label is “1” (MBot), the alpha map signal in the block is encoded, and the encoded information is supplied to the multiplexing circuit 3170. The label memory 3140 stores the label information supplied from the labeling circuit 3120 and the size information of the area via the label memory output line 3020, and the label information and the size information are combined via the label memory output line 3030. This is supplied to the change circuit 3150.

サイズ変更回路3150では、ラベルメモリ出力線3030を介して供給される、時刻 n-1 のフレームのラベル情報とサイズ情報と、線3020を介して供給される、時刻 n のサイズ情報とから、時刻 n-1 のラベル情報を時刻 n のサイズに相当する様にサイズを変更したラベル情報をラベル符号化回路3160に供給する。ラベル符号化回路3160では、サイズ変更回路3150より供給されるラベル情報を予測値として、ラベル付け回路3120より供給されるラベル情報を符号化し、その符号化情報は多重回路3170に供給される。多重化回路3170では、ブロック符号化回路3130とラベル符号化回路3160より供給される符号化情報と、線3020を介して供給されるサイズ情報とを多重化した後、線3040を介して出力する。   In the size changing circuit 3150, the time information is obtained from the label information and size information of the frame at time n−1 supplied through the label memory output line 3030 and the size information at time n supplied through the line 3020. The label information whose size is changed so that the label information of n−1 corresponds to the size of time n is supplied to the label encoding circuit 3160. The label encoding circuit 3160 encodes the label information supplied from the labeling circuit 3120 using the label information supplied from the size changing circuit 3150 as a predicted value, and the encoded information is supplied to the multiplexing circuit 3170. The multiplexing circuit 3170 multiplexes the encoding information supplied from the block encoding circuit 3130 and the label encoding circuit 3160 and the size information supplied via the line 3020, and then outputs the multiplexed information via the line 3040. .

以上が符号化装置の構成と作用である。次に復号化装置の構成と作用を説明する。   The above is the configuration and operation of the encoding device. Next, the configuration and operation of the decoding apparatus will be described.

図50(b)に示す符号化装置は、分離化回路(DMUX)3200、ラベル復号化回路3210、サイズ変更回路3220、ラベルメモリ3230、ブロック復号化回路3240より構成される。これらのうち、分離化回路3200は、線3050を介して供給される符号化情報を分離する回路であり、ラベル復号化回路3210は、サイズ変更回路3220より供給される、時刻 n-1 のラベル情報のサイズを変更した情報を予測値として、時刻 n のラベル情報を再生する回路である。   The encoding apparatus shown in FIG. 50B includes a separation circuit (DMUX) 3200, a label decoding circuit 3210, a size changing circuit 3220, a label memory 3230, and a block decoding circuit 3240. Among these, the separation circuit 3200 is a circuit that separates encoded information supplied via the line 3050, and the label decoding circuit 3210 is a label at time n-1 supplied from the size changing circuit 3220. This is a circuit that reproduces label information at time n by using information whose information size is changed as a predicted value.

また、サイズ変更回路3220は、サイズ変更回路3150と同様の働きをする回路であって、ラベルメモリ3230より供給される、時刻 n-1 のフレームのラベル情報とサイズ情報と、分離化回路3200から分離して与えられる、時刻 n のフレームのサイズ情報とから、時刻 n-1 のラベル情報を時刻 n のサイズに相当する様にサイズを変更する回路であり、ラベルメモリ3230は、ラベルメモリ3140と同様の働きをする回路であって、ラベル復号化回路3210より復号化されて供給されるラベル情報と、分離化回路3200から与えられる領域のサイズ情報を蓄積すると共に、この蓄積したラベル情報とサイズ情報を併せてサイズ変更回路3220に供給するためのメモリである。   The size changing circuit 3220 is a circuit that functions in the same manner as the size changing circuit 3150, and is supplied from the label memory 3230 and includes the label information and size information of the frame at time n−1, and the separation circuit 3200. This is a circuit that changes the size of the label information at time n-1 so as to correspond to the size at time n from the size information of the frame at time n given separately, and the label memory 3230 A circuit having the same function, which stores label information decoded and supplied from the label decoding circuit 3210 and area size information given from the separation circuit 3200, and stores the stored label information and size. This is a memory for supplying information to the size changing circuit 3220 together.

また、ブロック復号化回路3240は、ラベル復号化回路3210より供給される、再生されたラベル情報にしたがって、ブロック毎にアルファマップ信号を再生する回路である。   The block decoding circuit 3240 is a circuit that reproduces an alpha map signal for each block in accordance with the reproduced label information supplied from the label decoding circuit 3210.

このような構成の復号化装置の作用を説明する。分離化回路3200では、線3050を介して供給される符号化情報を分離して、ブロック復号化回路3240とラベル復号化回路3210に供給すると共に、線3060を介してサイズ情報を出力する。ラベル復号化回路3210では、サイズ変更回路3220より供給される、時刻 n-1 のラベル情報のサイズを変更した情報を予測値として、時刻 n のラベル情報を再生する。   The operation of the decoding apparatus having such a configuration will be described. The demultiplexing circuit 3200 demultiplexes the encoded information supplied via the line 3050, supplies it to the block decoding circuit 3240 and the label decoding circuit 3210, and outputs size information via the line 3060. The label decoding circuit 3210 reproduces the label information at time n by using the information supplied from the size changing circuit 3220 and changing the size of the label information at time n−1 as a predicted value.

再生されたラベル情報はブロック復号化回路3240とラベルメモリ3230に供給される。ブロック復号化回路3240では、ラベル復号化回路3210より供給される、再生されたラベル情報にしたがって、ブロック毎にアルファマップ信号を再生する。なお、サイズ変更回路3220はサイズ変更回路3150と、ラベルメモリ3230は、ラベルメモリ3140と、各々同一の動作をするため、ここでは深く説明しない。   The reproduced label information is supplied to the block decoding circuit 3240 and the label memory 3230. The block decoding circuit 3240 reproduces the alpha map signal for each block according to the reproduced label information supplied from the label decoding circuit 3210. The size changing circuit 3220 and the label memory 3230 operate in the same manner as the size changing circuit 3150 and the label memory 3140, respectively, and thus will not be described in detail here.

以上、マクロブロック単位にしたアルファマップをラベル付けし、既に符号化済みのフレームのマクロブロックのラベルを利用して、現フレームのマクロブロックのラベルを符号化するようにした符号化装置と復号化装置の例を説明した。時間的に近いフレームのアルファマップ間では、そのマクロブロックは非常に似たラベル付けが行われる。従って、このような場合には、フレーム間においてラベルの相関が高いため、既に符号化済みのフレームのラベルを利用して、現フレームのラベルを符号化することで、大幅に符号化効率を図ることができるようになる。   As described above, an encoding device and a decoding unit that label an alpha map in units of macroblocks and use the macroblock label of an already encoded frame to encode the macroblock label of the current frame. An example of an apparatus has been described. The macroblocks are labeled very similar between alphamaps in near temporal frames. Therefore, in such a case, since the correlation between the labels is high between the frames, encoding of the label of the current frame by using the label of the already encoded frame greatly improves the encoding efficiency. Will be able to.

次にベクトル量子化による符号化システムを説明する。   Next, an encoding system using vector quantization will be described.

(第11の具体例)アルファマップを効率よく符号化するために、第11の具体例として、アルファマップを矩形のブロックに分割して、そのブロック毎に符号化を行い、既に符号化したブロックの一部分から切り出した参照パターンを用いてベクトル量子化のインデックステーブルをブロック毎に生成し、そのインデックステーブルを用いてアルファマップをベクトル量子化によって符号化する方式の具体例を説明する。   (Eleventh Specific Example) In order to efficiently encode the alpha map, as an eleventh specific example, the alpha map is divided into rectangular blocks, and each block is encoded. A specific example of a method of generating a vector quantization index table for each block using a reference pattern cut out from a part of the image and encoding an alpha map by vector quantization using the index table will be described.

以下、本発明の具体例を図面を用いて説明する。   Hereinafter, specific examples of the present invention will be described with reference to the drawings.

<ベクトル量子化を用いた符号化回路の構成>図51は、ベクトル量子化を用いた本発明の符号化回路の一具体例を示すブロック図である。本符号化回路はメモリ1605、ベクトル量子化器1607、インデックステーブル生成器1609、ベクトル逆量子化器1613とより構成される。   <Configuration of Encoding Circuit Using Vector Quantization> FIG. 51 is a block diagram showing a specific example of the encoding circuit of the present invention using vector quantization. This encoding circuit includes a memory 1605, a vector quantizer 1607, an index table generator 1609, and a vector inverse quantizer 1613.

メモリ1605は、符号化が終わった部分を復号したアルファマップを保持するためのメモリである。また、インデックステーブル生成器1609は、このメモリ1605の保持情報を元に各種画素パターンのインデックステーブル1612を生成する装置であって、複数のマクロブロック各々の画素パターンと個別のインデックス番号を対応づけるテーブルを生成するものである。ベクトル量子化器1607は、入力されたアルファマップ信号1606とインデックステーブル生成器1609からのインデックステーブル1612とを元に、インデックステーブル1612にある画素パターンのうちでアルファマップ信号1606との誤差が小さなもののインデックス1614を求め、そのインデックス1614を出力するものである。   A memory 1605 is a memory for holding an alpha map obtained by decoding a portion after encoding. The index table generator 1609 is a device for generating an index table 1612 for various pixel patterns based on the information held in the memory 1605, and is a table for associating pixel patterns of individual macroblocks with individual index numbers. Is generated. Based on the input alpha map signal 1606 and the index table 1612 from the index table generator 1609, the vector quantizer 1607 has a small error from the alpha map signal 1606 among the pixel patterns in the index table 1612. An index 1614 is obtained and the index 1614 is output.

ベクトル逆量子化器1613は、ベクトル量子化器1607の出力するインデックス1614と、インデックステーブル生成器1609の出力するインデックステーブル1612とを用い、インデックス1614に対応する画素パターンを求めると共に、その求めた画素パターンを、復号したアルファマップ1615としてメモリ1605に与える装置である。   The vector inverse quantizer 1613 obtains a pixel pattern corresponding to the index 1614 by using the index 1614 output from the vector quantizer 1607 and the index table 1612 output from the index table generator 1609, and the obtained pixel This is a device that gives a pattern to the memory 1605 as a decoded alpha map 1615.

本具体例におけるこのような構成の符号化回路は、図2に示した画像符号化装置全体の中では、アルファマップ符号化回路200の部分に配置される。また、本符号化回路にはアルファマップ信号が入力され、このアルファマップ信号をベクトル量子化して得たインデクッス1614を回路出力とする。アルファマップの画面は、図59に示したようにブロックに分割され、左上のブロックから順に符号化される。ここで、横線を引いた領域5−1がオブジェクト領域、それ以外が背景領域5−2である。   The encoding circuit having such a configuration in this specific example is disposed in the alpha map encoding circuit 200 in the entire image encoding apparatus shown in FIG. In addition, an alpha map signal is input to this encoding circuit, and an index 1614 obtained by vector quantization of the alpha map signal is used as a circuit output. The alpha map screen is divided into blocks as shown in FIG. 59, and encoded sequentially from the upper left block. Here, an area 5-1 with a horizontal line drawn is an object area, and the other area is a background area 5-2.

図60に、画面の途中まで符号化が終わった様子を示す。図60においては、太線で囲った部分5−3が既に符号化が終わった部分を示しており、現在はブロック5−4を符号化している様子を示している。そして、図61に示すように、現の符号化ブロック5−4の符号化には、それに隣接する画素列が上部参照パターン5−10及び左部参照パターン5−11として用いられる。   FIG. 60 shows a state where encoding has been completed to the middle of the screen. In FIG. 60, a portion 5-3 surrounded by a thick line indicates a portion that has already been encoded, and currently shows a state in which the block 5-4 is encoded. Then, as shown in FIG. 61, adjacent pixel columns are used as the upper reference pattern 5-10 and the left reference pattern 5-11 for encoding of the current encoding block 5-4.

なお、上部参照パターン5−10の画素値を左からT1,T2,...,TBと呼び、左部参照パターン5−11の画素値を上からL1,L2,...,LBと呼ぶこととする。Bはブロックの一辺の画素数(ブロックサイズ)である。   The pixel values of the upper reference pattern 5-10 are referred to as T1, T2,..., TB from the left, and the pixel values of the left reference pattern 5-11 are referred to as L1, L2,. I will do it. B is the number of pixels on one side of the block (block size).

図51に戻り、説明を続ける。本発明の符号化回路はメモリ1605、ベクトル量子化器1607、インデックステーブル生成器1609、ベクトル逆量子化器1613とより構成されるが、これらのうち、メモリ1605には既に符号化が終わった部分を復号したアルファマップが保持されている。アルファマップ信号1606は、ベクトル量子化器1607に入力される。また、メモリ1605からは、既に符号化が終わった部分から上部と左部の参照パターン1608が読み出され、インデックステーブル生成器1609に送られる。   Returning to FIG. 51, the description will be continued. The encoding circuit according to the present invention includes a memory 1605, a vector quantizer 1607, an index table generator 1609, and a vector inverse quantizer 1613. Of these, the memory 1605 has already been encoded. An alpha map obtained by decoding is stored. The alpha map signal 1606 is input to the vector quantizer 1607. Also, the upper and left reference patterns 1608 are read from the memory 1605 from the already encoded portion and sent to the index table generator 1609.

インデックステーブル生成器1609では、参照パターン1608に応じてベクトル量子化(吹抜「TV画像の多次元信号処理」日刊工業新聞社、昭和63年、pp.261−262)で用いるインデックステーブル1612が生成され、ベクトル量子化器1607とベクトル逆量子化器1613に送られる。   The index table generator 1609 generates an index table 1612 used in vector quantization (blowout “multi-dimensional signal processing of TV images”, Nikkan Kogyo Shimbun, 1988, pp. 261-262) according to the reference pattern 1608. Are sent to the vector quantizer 1607 and the vector inverse quantizer 1613.

ここで、インデックステーブルとは、複数のマクロブロック各々の画素パターンと個別のインデックス番号を対応づけるものである。   Here, the index table associates the pixel patterns of each of the plurality of macroblocks with individual index numbers.

ベクトル量子化器1607では、インデックステーブル生成器1609から出力されたインデックステーブル1612にある画素パターンのうちでアルファマップ信号1606との誤差が小さなもののインデックス1614が求められ、そのインデックス1614は出力され、また、ベクトル逆量子化器1613にも送られる。   The vector quantizer 1607 obtains an index 1614 having a small error from the alpha map signal 1606 among the pixel patterns in the index table 1612 output from the index table generator 1609, and outputs the index 1614. To the vector inverse quantizer 1613.

ベクトル逆量子化器1613では、インデックステーブル1612を用いてインデックス1614に対応する画素パターンが求められる。そして、その求められた画素パターンは、復号したアルファマップ1615としてベクトル逆量子化器1613からメモリ1605に送られることになる。   The vector inverse quantizer 1613 obtains a pixel pattern corresponding to the index 1614 using the index table 1612. The obtained pixel pattern is sent from the vector inverse quantizer 1613 to the memory 1605 as a decoded alpha map 1615.

ここで、インデックステーブル生成器1609の具体例について触れておく。   Here, a specific example of the index table generator 1609 will be described.

<インデックステーブル生成器1609の具体例>図53、図54、図55に示すブロック図はそれぞれインデックステーブル生成器1609の具体例である。   <Specific Example of Index Table Generator 1609> The block diagrams shown in FIGS. 53, 54, and 55 are specific examples of the index table generator 1609, respectively.

まず、図53に示す構成のインデックステーブル生成器1609の場合は、幾つか用意されたタイプのうちのいずれかを指定すると、その指定されたもののインデックステーブルを生成する方式であって、使用するタイプを指定するためのタイプ決定器1616、インデックステーブルを生成する生成器1619、生成したインデックステーブルを保持するメモリ1621とを備えている。   First, in the case of the index table generator 1609 having the configuration shown in FIG. 53, when any one of several prepared types is specified, an index table is generated for the specified type. Are provided, a type determiner 1616 for designating, a generator 1619 for generating an index table, and a memory 1621 for holding the generated index table.

このような構成のインデックステーブル生成器1609では、参照パターン1608はタイプ決定器1616に送られる。   In the index table generator 1609 having such a configuration, the reference pattern 1608 is sent to the type determiner 1616.

画素パターンは傾向を変えて幾つ化のタイプが選べるようになっており、所望のものを指定すると、タイプ決定器1616は、幾つか用意されたタイプのうちの当該指定のものを、使用決定して、そのタイプ1617の情報とパラメータ1618の情報が生成器1619に送る。生成器1619ではこれらの情報を受けて指定のタイプのインデックステーブル1620を生成し、この生成されたインデックステーブル1620をメモリ1621に一時的に保持させる。インデックステーブル1622は符号化の過程で適宜出力される。   The pixel pattern can change its tendency so that any number of types can be selected. When a desired one is designated, the type determiner 1616 decides to use the designated one of several types. Then, the information of the type 1617 and the information of the parameter 1618 are sent to the generator 1619. The generator 1619 receives this information, generates a specified type of index table 1620, and temporarily stores the generated index table 1620 in the memory 1621. The index table 1622 is output as appropriate during the encoding process.

タイプ決定器1616での処理アルゴリズムを示したフローチャートを図68に示す。タイプ決定器1616は、まず初めに、S1: 図61で説明した上部参照パターン5−10の画素値T1と左部参照パターン5−11の画素値L1が等しいか否かを判断し、その結果、等しい場合はS2に進み、等しくない場合はS4に進む。   A flowchart showing the processing algorithm in the type determiner 1616 is shown in FIG. First, the type determiner 1616 determines whether or not the pixel value T1 of the upper reference pattern 5-10 described in FIG. 61 and the pixel value L1 of the left reference pattern 5-11 described in FIG. If equal, the process proceeds to S2. If not equal, the process proceeds to S4.

S2: マクロブロックの行方向画素列のうち、左から順にみた場合に、画素値が前の画素値と異なった値を示した最初の画素位置をRTとし、列方向に上から順にみた場合に、画素値が前の画素値と異なった値を示した最初の画素位置をRLとすると、前記RTがB(マクロブロックの一辺の画素数(ブロックサイズ))に等しく、かつ、RLがBに等しい場合はS5に進み、そうでない場合はS3に進む。なお、もう少しRT、RLについて詳しく触れておくと、RTは、T1からT2、T3、...と順に見ていった時、Tkで初めてT1と違う値になった時のk−1である。但し、マクロブロックの行方向最後の画素位置TBまで、全てがT1と等しい場合はRL=Bとする(Bは図61で説明したブロックサイズである)。例えば、図63(B=16)の場合はRT=10である。   S2: When the first pixel position in which the pixel value shows a different value from the previous pixel value when viewed from the left in the row direction pixel column of the macroblock is RT, and when viewed from the top in the column direction When the first pixel position where the pixel value is different from the previous pixel value is RL, RT is equal to B (number of pixels on one side of the macroblock (block size)) and RL is set to B If equal, the process proceeds to S5, and if not, the process proceeds to S3. If RT and RL are mentioned in more detail, RT is defined as T1 to T2, T3,. . . And in order, k-1 when Tk becomes a value different from T1 for the first time. However, if all the pixel positions TB in the row direction of the macroblock are equal to T1, RL = B is set (B is the block size described in FIG. 61). For example, in the case of FIG. 63 (B = 16), RT = 10.

同様ににRLはL1,L2,...に関するもので、図63の場合はRL=6である。   Similarly, RL is L1, L2,. . . In the case of FIG. 63, RL = 6.

S3:RTがBに等しいか、あるいは、RLがBに等しい場合はS6に進み、そうでない場合はS7に進む。   S3: If RT is equal to B or RL is equal to B, the process proceeds to S6, and if not, the process proceeds to S7.

S4:RTがBに等しく、かつ、RLがBに等しい場合はS8に進み、そうでない場合はS9に進む。   S4: If RT is equal to B and RL is equal to B, the process proceeds to S8, and if not, the process proceeds to S9.

S5: タイプM=1とする。S10に進む。   S5: Type M = 1. Proceed to S10.

S6: タイプM=2とする。S10に進む。   S6: Set type M = 2. Proceed to S10.

S7: タイプM=3とする。S10に進む。   S7: Type M = 3. Proceed to S10.

S8: タイプM=4とする。S10に進む。   S8: Type M = 4. Proceed to S10.

S9: タイプM=5とする。S10に進む。   S9: Type M = 5. Proceed to S10.

S10: MとRT、RLに応じてインデックステーブルを作成する。   S10: An index table is created according to M, RT, and RL.

このアルゴリズムを用いる場合は、図53のタイプ決定器1616が出力するパラメータ1618はRTとRLである。また、タイプ決定器1616は図56に示すように構成される。図56に示す構成は、判定器1623、RT,RL検出器1624からなり、参照パターン1608は判定器1623と、RT,RL検出器1624に入力される。RT,RL検出器ではRTとRLが検出され、パラメータ1618として出力されるとともに判定器1623にも送られる。判定器1623では、図68のアルゴリズムでタイプ1617を決定し、出力する。   When this algorithm is used, the parameters 1618 output from the type determiner 1616 in FIG. 53 are RT and RL. The type determiner 1616 is configured as shown in FIG. The configuration shown in FIG. 56 includes a determiner 1623 and an RT / RL detector 1624, and the reference pattern 1608 is input to the determiner 1623 and the RT / RL detector 1624. The RT and RL detectors detect RT and RL, and are output as parameters 1618 and also sent to the determiner 1623. The determiner 1623 determines the type 1617 using the algorithm of FIG. 68 and outputs it.

次にタイプMとRT、RLを用いたインデックステーブルの構成例を図70に示す。まずM=1は、上部参照パターンと左部参照パターンのアルファマップの画素値が全て等しい場合であるから、図70(a)に示したような、上辺と左辺をよぎる境界線が無い画素パターンのうちから、予め決める幾つかを生成する。   Next, FIG. 70 shows a configuration example of an index table using types M, RT, and RL. First, M = 1 is a case where the pixel values of the alpha map of the upper reference pattern and the left reference pattern are all equal to each other. Therefore, as shown in FIG. 70A, there is no pixel pattern having no boundary line between the upper side and the left side. Some of these are generated in advance.

この図で斜線はT1と等しい値を表す。つまり、T1がオブジェクト領域にある場合は斜線がオブジェクトで白が背景、T1が背景領域にある場合はその逆である。   In this figure, the diagonal line represents a value equal to T1. That is, if T1 is in the object area, the diagonal line is the object and white is the background, and vice versa if T1 is in the background area.

次にM=2は、上部参照パターンと左部参照パターンのいずれかを境界線がよぎり、他方は画素値が全て等しい場合である。   Next, M = 2 is a case where the boundary line crosses either the upper reference pattern or the left reference pattern, and the other is the case where the pixel values are all equal.

図70(b)は左部参照パターンを境界線がよぎる(RL<B)場合の例で、左辺の上からRLの点を起点に境界線の角度を様々に変えたものなどである。上部参照パターンを境界線がよぎる場合は上辺の左からRTの点を起点に境界線をひく。   FIG. 70B shows an example in which the boundary line crosses the left reference pattern (RL <B), in which the angle of the boundary line is changed variously starting from the RL point on the left side. When the boundary line crosses the upper reference pattern, the boundary line is drawn starting from the RT point from the left of the upper side.

また、M=3では図70(c)に示したように上辺のRTと左辺のRLで境界線がよぎるようにする。   Further, when M = 3, as shown in FIG. 70C, the boundary line is crossed by RT on the upper side and RL on the left side.

最後にM=4ではT1とL1の間に境界線があるので図70(d)のように左上の頂点を起点に境界線をひく。また、参照パターンとして図64(b)に示すように上部、左部とも複数ラインを用いるようにすると図64(a)に点線で示したように境界線の向きも推定できるので、その推定した境界線を用いて画素パターンを生成することができる。   Finally, since there is a boundary line between T1 and L1 at M = 4, the boundary line is drawn starting from the upper left vertex as shown in FIG. 70 (d). Further, if a plurality of lines are used as the reference pattern as shown in FIG. 64 (b) for both the upper part and the left part, the direction of the boundary line can also be estimated as shown by the dotted line in FIG. 64 (a). A pixel pattern can be generated using the boundary line.

以上でインデックステーブル生成器1609の第1の具体例である図53の詳細な説明を終えて、インデックステーブル生成器1609の第2の具体例を図54に示す。   The detailed description of FIG. 53, which is the first specific example of the index table generator 1609, has been completed, and the second specific example of the index table generator 1609 is shown in FIG.

[インデックステーブル生成器1609の第2の具体例]図54に示す構成のインデックステーブル生成器1609は、タイプ決定器1616、メモリ1625,1626,1627、スイッチ1628を備えている。このインデックステーブル生成器1609では、符号化に先だって各タイプに応じたインデックステーブルが作られるようにしてあり、それぞれタイプ別にメモリ1625,1626,1627のうちの専用のものに格納させる。従って、メモリ1625,1626,1627はいずれか一つのタイプのものを専用に格納してある。   [Second Specific Example of Index Table Generator 1609] The index table generator 1609 having the configuration shown in FIG. 54 includes a type determiner 1616, memories 1625, 1626, and 1627, and a switch 1628. In the index table generator 1609, an index table corresponding to each type is created prior to encoding, and each type is stored in a dedicated one of the memories 1625, 1626, and 1627. Therefore, the memories 1625, 1626, and 1627 store one of the types exclusively.

スイッチ1628はこれらのメモリ1625,1626,1627のいずれかを選択してその選択したメモリに格納されているインデックステーブルを利用できるようにするためのものである。   The switch 1628 is for selecting any one of these memories 1625, 1626, and 1627 so that an index table stored in the selected memory can be used.

このようなインデックステーブル生成器1609において、参照パターン1608によって、タイプ決定器1616でタイプ1617が決まるのは図53に示した具体例と同じである。但し、この具体例ではパラメータ1618はタイプ決定器1616から出力されない。また、符号化に先だって作られる、各タイプに応じたインデックステーブルが、それぞれ異なるメモリ1625、1626、1627に保持されている。   In such an index table generator 1609, the type determiner 1616 determines the type 1617 by the reference pattern 1608 in the same way as the specific example shown in FIG. However, in this specific example, the parameter 1618 is not output from the type determiner 1616. In addition, index tables corresponding to each type created prior to encoding are held in different memories 1625, 1626, and 1627, respectively.

そして、タイプ1617によってスイッチ1628が切り替えられ、そのタイプ1617に応じたインデックステーブル1622が出力される。   Then, the switch 1628 is switched by the type 1617, and the index table 1622 corresponding to the type 1617 is output.

この具体例は図53の例と比較してメモリが多く必要であるが、インデックスを生成する演算が不要であるという利点がある。   Although this specific example requires more memory than the example of FIG. 53, there is an advantage that an operation for generating an index is unnecessary.

インデックステーブル生成器1609のさらに別の構成例を示す。   Another configuration example of the index table generator 1609 will be shown.

<インデックステーブル生成器1609の第3の具体例>インデックステーブル生成器の第3の具体例を図55に示す。図55では、評価器1629、メモリ1630、スイッチ1632、メモリ1634から構成している。   <Third Specific Example of Index Table Generator 1609> FIG. 55 shows a third specific example of the index table generator. 55 includes an evaluator 1629, a memory 1630, a switch 1632, and a memory 1634.

この例では先の例と異なってタイプ判定は行わず、参照パターンと予め用意する画素パターンの境界線が連続的につながる度合いを表す評価値を求めて利用する。   In this example, unlike the previous example, type determination is not performed, and an evaluation value indicating the degree of continuous connection between the reference pattern and the boundary line of the pixel pattern prepared in advance is obtained and used.

この評価値は図65(b)に示すように、上部参照パターンT1,T2,..と画素パターンの上端の画素列H1,H2,..、及び、左部参照パターンL1,L2,..と左端の画素列V1,V2,... を比較して、Ti=Hi となるi={1,2,3,..,B}の数と、Lj=Vj となるj={1,2,3,..,B}の数の和である。   As shown in FIG. 65 (b), the evaluation values are represented by upper reference patterns T1, T2,..., Upper end pixel columns H1, H2,..., And left reference patterns L1, L2,. And the leftmost pixel column V1, V2, ..., the number of i = {1,2,3,., B} where Ti = Hi and j = {1, 2,3, .., B}.

従って、図65(a)の場合は、i=1,2,3, j=1,2,3,6,7,8において等しくなるので、評価値は“9”となる。   Therefore, in the case of FIG. 65A, since i = 1, 2, 3, j = 1, 2, 3, 6, 7, 8, the evaluation value is “9”.

図55に戻り、説明を続ける。上記メモリ1630には図70に示したものなど、様々な画素パターンが予め保持されており、評価器1629は、参照パターンと予め用意した画素パターン(メモリ1630から与えられる)の境界線が連続的につながる度合いを表す評価値を求める装置である。スイッチ1632はメモリ1630の出力を開閉するためのスイッチであり、メモリ1634は、このスイッチ1632を介して与えられる情報を保持するものである。スイッチ1632は評価値対応に評価器1629が出力する開閉信号により開閉制御される。   Returning to FIG. 55, the description will be continued. Various pixel patterns such as the one shown in FIG. 70 are stored in the memory 1630 in advance, and the evaluator 1629 has a continuous boundary line between the reference pattern and the pixel pattern prepared in advance (given from the memory 1630). It is an apparatus which calculates | requires the evaluation value showing the degree connected to. The switch 1632 is a switch for opening and closing the output of the memory 1630, and the memory 1634 holds information given through the switch 1632. The switch 1632 is controlled to be opened / closed by an open / close signal output from the evaluator 1629 corresponding to the evaluation value.

符号化装置の構成要素であるメモリ1605から読み出される参照パターン1608は、この評価器1629に送られる。また、メモリ1630からは図70に示したものなど、予め保持された様々な画素パターン1631が、逐次、評価器1629とスイッチ1632に送られる。   The reference pattern 1608 read from the memory 1605 that is a component of the encoding device is sent to the evaluator 1629. Also, various pixel patterns 1631 held in advance such as the one shown in FIG. 70 are sequentially sent from the memory 1630 to the evaluator 1629 and the switch 1632.

評価器1629では先に説明した参照パターン1608と画素パターン1631の評価値を求める。そして、その評価値が所定値よりも小さい場合には評価器1629はスイッチ1632を接続するような切替え信号1633をスイッチ1632に送る。   The evaluator 1629 obtains the evaluation values of the reference pattern 1608 and the pixel pattern 1631 described above. If the evaluation value is smaller than the predetermined value, the evaluator 1629 sends a switch signal 1633 to the switch 1632 to connect the switch 1632.

この場合は、画素パターン1631はメモリ1634に記録されてインデックステーブルに載る。逆に評価値が所定値よりも大きい場合には接続を切るような切替え信号1633がスイッチ1632に送られて、画素パターン1631はメモリ1634に送られない。   In this case, the pixel pattern 1631 is recorded in the memory 1634 and placed on the index table. Conversely, when the evaluation value is larger than the predetermined value, a switching signal 1633 for disconnecting is sent to the switch 1632, and the pixel pattern 1631 is not sent to the memory 1634.

メモリ1630に用意された画素パターンのうちの所定の個数の評価が終ったら、メモリ1634に記録された画素パターンに順にインデックスを付加して、インデックステーブル1622として出力する。この評価は、メモリ1634に所定の個数の画素パターンが記録された時に終了する方法もある。   When a predetermined number of pixel patterns prepared in the memory 1630 have been evaluated, an index is sequentially added to the pixel patterns recorded in the memory 1634 and output as an index table 1622. There is also a method in which this evaluation is completed when a predetermined number of pixel patterns are recorded in the memory 1634.

また、メモリ1630にある画素パターンのうち評価値の大きいものから順に所定の数の画素パターンを選択する方法もある。この場合はメモリ1634に所定の数の画素パターン1631とその評価値を記録するようにする。   There is also a method of selecting a predetermined number of pixel patterns in order from the largest evaluation value among the pixel patterns in the memory 1630. In this case, a predetermined number of pixel patterns 1631 and their evaluation values are recorded in the memory 1634.

そして、記録されている評価値のうちで最も小さなものよりも、現在評価中の画素パターンの評価値が大きい場合にそれらを入れ替えればよい。   Then, when the evaluation value of the currently evaluated pixel pattern is larger than the smallest evaluation value recorded, they may be replaced.

以上の図55の具体例は比較的大規模なメモリ1630が必要であるが、タイプ決定の演算が不要となる利点がある。   The specific example of FIG. 55 described above requires a relatively large memory 1630, but has the advantage of not requiring a type determination operation.

なお、図53、図54、図55の具体例は、応用システムで許容される演算量とメモリ量によってそれぞれ適当なものを採用すればよい。   It should be noted that the specific examples of FIGS. 53, 54, and 55 may be appropriately selected depending on the calculation amount and memory amount allowed in the application system.

以上で図51のインデックステーブル生成器1609の説明を終る。   The description of the index table generator 1609 in FIG.

<ベクトル量子化器1607のアルゴリズム>次に図51のベクトル量子化器1607でのアルゴリズムを図69に示す。ここでC(i)は入力されたアルファマップの原画像と画素パターンの誤差の許容条件で、例えば、B×B画素のブロックの場合、「16個の(B/4)×(B/4)画素ブロックに分割し(図66参照)、そのいずれのブロックにおいても、原画像と画素パターンiの各画素の誤差の絶対値和がαを超えない。」というものである。但し、αはしきい値である。また、各画素の誤差の絶対値和とは、具体的にはミスマッチ画素数のことであり、具体的にはαは0画素,1画素,2画素,…,B2 /16画素といった具合に定めるものである。 <Algorithm of Vector Quantizer 1607> FIG. 69 shows an algorithm of the vector quantizer 1607 of FIG. Here, C (i) is an allowable condition for an error of the input alpha map original image and pixel pattern. For example, in the case of a block of B × B pixels, “16 (B / 4) × (B / 4)”. It is divided into pixel blocks (see FIG. 66), and the absolute value sum of errors of each pixel of the original image and the pixel pattern i does not exceed α in any block. ” Where α is a threshold value. Further, the sum of absolute values of errors of each pixel, specifically that of mismatches number of pixels, in particular α is 0 pixels, 1 pixel, 2 pixels, ..., and so on B 2/16 pixels It is determined.

最低限、この条件をクリアしないと、その画素パターンは選択されない。また、EはB×B画素全体での誤差の絶対値和である。図69に示すフローチャートを説明する。   If this condition is not cleared at least, the pixel pattern is not selected. E is the sum of absolute values of errors in the entire B × B pixel. The flowchart shown in FIG. 69 will be described.

S11: インデックスi=0 とする。S12に進む。   S11: Index i = 0. Proceed to S12.

S12: 画素パターンiがC(i)を満たす場合はS15に進む。そうでない場合はS13に進む。   S12: If the pixel pattern i satisfies C (i), the process proceeds to S15. Otherwise, the process proceeds to S13.

S13: i=1 とする。   S13: i = 1.

S14: 画素パターンiがC(i)を満たす場合はS15に進む。そうでない場合はS16に進む。   S14: If the pixel pattern i satisfies C (i), the process proceeds to S15. Otherwise, the process proceeds to S16.

S15: Mini=iとする。そして、S23に進む。   S15: Mini = i. Then, the process proceeds to S23.

S16: MinEに十分大きな値を代入し、Mini=-1 とする。S17に進む。   S16: A sufficiently large value is substituted for MinE, and Mini = -1. Proceed to S17.

S17: i にi+1 を代入する。そして、S18に進む。   S17: i + 1 is substituted into i. Then, the process proceeds to S18.

S18: 画素パターンiがC(i)を満たす場合はS19に進む。そうでない場合はS21に進む。   S18: If the pixel pattern i satisfies C (i), the process proceeds to S19. Otherwise, the process proceeds to S21.

S19: EがMinEよりも小さい場合はS20に進む。そうでない場合はS21に進む。   S19: If E is smaller than MinE, the process proceeds to S20. Otherwise, the process proceeds to S21.

S20: MinEにEを代入し、Mini=iとする。そして、S21に進む。   S20: Substitute E into MinE and set Mini = i. Then, the process proceeds to S21.

S21: i がインデックスの最後の値Nと等しい場合はS22に進む。そうでない場合はS17に進む。   S21: If i is equal to the last value N of the index, the process proceeds to S22. Otherwise, the process proceeds to S17.

S22: Mini=-1 である場合は該当ブロックにはインデックスは決定せずに終了する。そうでない場合はS23に進む。   S22: If Mini = -1, the corresponding block is terminated without determining an index. Otherwise, the process proceeds to S23.

S23: Miniを該当ブロックのインデックスとして出力して終了する。   S23: Mini is output as the index of the corresponding block, and the process ends.

本アルゴリズムでは、画素パターン“0”と画素パターン“1”は、Eを計算せずにC(i)さえ満たせば直ちにそれに決定している。   In this algorithm, the pixel pattern “0” and the pixel pattern “1” are determined as soon as C (i) is satisfied without calculating E.

このようにすると、“0”と“1”のインデックスに、他のインデックスよりも短い符号を割り当てている場合に、符号量を少なくできるという効果が期待できる。例えば、ブロック内が全てオブジェクト領域とか、逆に全て背景領域といった画素パターンを、“0”や“1”に割り当てる。   In this way, when a code shorter than the other indexes is assigned to the indexes “0” and “1”, an effect that the code amount can be reduced can be expected. For example, pixel patterns such as all the object areas in the block or all the background areas are assigned to “0” and “1”.

また、インデックスが決定されなかったブロックについては、図67のフローチャートに示すように、ベクトル量子化(VQ)とは別の符号化手法を用いて符号化するといった方法がある。   Further, as shown in the flowchart of FIG. 67, there is a method in which a block for which no index is determined is encoded using an encoding method different from vector quantization (VQ).

すなわち、図67のフローチャートは、インデックスが決定されなかったブロックについての符号化は、まず、ベクトル量子化(VQ)で符号化する(S24)。そして、インデックスが決定されれば終了し(S25)。そうでなければS26に進む。S26では、MMRで符号化して終了する。   That is, in the flowchart of FIG. 67, the encoding for the block for which the index has not been determined is first performed by vector quantization (VQ) (S24). If the index is determined, the process ends (S25). Otherwise, the process proceeds to S26. In S26, encoding is performed by MMR and the process ends.

このような処理をする符号化装置を図71に示す。図71に示す符号化装置は、ベクトル量子化回路1642、MMR符号化回路1643、切り替え器1644、合成器1646とから構成されている。   FIG. 71 shows an encoding apparatus that performs such processing. The encoding apparatus shown in FIG. 71 includes a vector quantization circuit 1642, an MMR encoding circuit 1643, a switch 1644, and a combiner 1646.

アルファマップ信号1606はベクトル量子化回路1642とMMR符号化回路1643に入力される。   The alpha map signal 1606 is input to the vector quantization circuit 1642 and the MMR encoding circuit 1643.

ベクトル量子化回路1642は図51に示した構成のものを採用しており、このベクトル量子化回路1642からの出力であるインデックス1614が、切り替え器1644に送られる。同時に、切り替え信号1645も切り替え器1644と合成器1646に送られる。   The vector quantization circuit 1642 employs the configuration shown in FIG. 51, and an index 1614 that is an output from the vector quantization circuit 1642 is sent to the switch 1644. At the same time, a switching signal 1645 is also sent to the switcher 1644 and the combiner 1646.

また、MMR符号化回路1643では、アルファマップ信号1606がMMRによって符号化され、MMR符号1647が切り替え器1644に送られる。切り替え器1644はMMR符号化回路1643からの出力であるMMR符号1647と、ベクトル量子化回路1642からの出力であるインデックス1614とが入力されており、切り替え器1644は切り替え信号1645に応じてこれらのうちの一方を選択して通すように、回路切り替えをする。   Further, in the MMR encoding circuit 1643, the alpha map signal 1606 is encoded by MMR, and the MMR code 1647 is sent to the switch 1644. The switch 1644 receives an MMR code 1647 that is an output from the MMR encoding circuit 1643 and an index 1614 that is an output from the vector quantization circuit 1642, and the switch 1644 receives these according to the switch signal 1645. Switch circuits so that one of them is selected and passed.

切り替え器1644に与えられる切り替え信号1645は、MMR符号化回路1643が出力するものであり、インデックス1614が決定された場合にはインデックス1614が、インデックスが決定されなかった場合にはMMR符号1647がアルファマップの符号1648として選択されるようにMMR符号化回路1643は決定すべく動作する。   The switching signal 1645 supplied to the switching unit 1644 is output from the MMR encoding circuit 1643. When the index 1614 is determined, the index 1614 is displayed. When the index is not determined, the MMR code 1647 is set to alpha. The MMR encoding circuit 1643 operates to determine to be selected as the code 1648 of the map.

このようにして切り替え器1644にて選択されて出力されたインデックス1614または、アルファマップの符号1648は信号を多重化する合成器1646に送られ、この合成器1646でベクトル量子化回路1462から得られる上述のような切り替え信号1645と多重化され、符号1649として出力される。   The index 1614 or alpha map code 1648 selected and output in this way by the switch 1644 is sent to the synthesizer 1646 that multiplexes the signals, and is obtained from the vector quantization circuit 1462 by the synthesizer 1646. The signal is multiplexed with the switching signal 1645 as described above and output as a reference numeral 1649.

なおこの具体例で、MMRが選択された場合、そのブロックの復号したアルファマップ1615はMMR符号化回路1643からベクトル量子化回路の内部のメモリ1605に送られる。ここで、MMR符号化回路1643の具体例を示す。   In this specific example, when MMR is selected, the decoded alpha map 1615 of the block is sent from the MMR encoding circuit 1643 to the memory 1605 inside the vector quantization circuit. Here, a specific example of the MMR encoding circuit 1643 is shown.

<MMR符号化回路1643の具体例>(ブロックベース符号化の具体例)図74(a)は、ブロック単位で符号化する場合の変化画素の関係を表す図である。また、図74(b)は、b1を検出する為の参照領域を表す図である。ブロックベース符号化においては、以下のように変化画素の符号化を単純化して符号化しても良い。なお、以下の処理は、第6の具体例にあるように、スキャンの順序を切り換えても良いし、第8の具体例にあるように、縮小されたブロックに適用しても良い。   <Specific Example of MMR Encoding Circuit 1643> (Specific Example of Block-Based Encoding) FIG. 74 (a) is a diagram showing the relationship of changed pixels when encoding is performed in units of blocks. FIG. 74 (b) is a diagram showing a reference area for detecting b1. In block-based encoding, encoding of changed pixels may be simplified as follows. The following processing may be performed by switching the scan order as in the sixth specific example, or may be applied to a reduced block as in the eighth specific example.

単純化した変化画素の符号化は次のようにして行う。今、変化画素ai(i=0〜1)、b1の画面左上からのアドレスを各々、abs_ai(i=0〜1)、abs_b1と表記すると、r_ai(i=0〜1)およびr_b1の値は、以下の式で求められる。   Simplified change pixel encoding is performed as follows. Now, if the addresses of the change pixels ai (i = 0 to 1) and b1 from the upper left of the screen are expressed as abs_ai (i = 0 to 1) and abs_b1, respectively, the values of r_ai (i = 0 to 1) and r_b1 are Is obtained by the following equation.

r- a0= abs- a0−(int) ( abs- a0/WIDTH )*WIDTHr- a1= abs- a0−(int) ( abs- a0/WIDTH )*WIDTH *WIDTHr- b1= abs- b1−(int) ((int)(abs- a0/WIDTH)−1)*WIDTH上記式において、*は乗算を、(int)(x)はxの小数点以下切り捨てを意味しており、WIDTHはブロックの水平方向の画素数を示している。 r - a0 = abs - a0-(int) (abs - a0 / WIDTH) * WIDTHr - a1 = abs - a0-(int) (abs - a0 / WIDTH) * WIDTH * WIDTHr - b1 = abs - b1-(int ) ((int) (abs a0 / WIDTH) −1) * WIDTH In the above equation, * indicates multiplication, (int) (x) indicates truncation after the decimal point of x, and WIDTH indicates the horizontal direction of the block. The number of pixels is shown.

“r_a1−r_b1”あるいは、“r_a1−r_a0”の値を符号化することで、再生値が得られる。    A reproduction value can be obtained by encoding the value of “r_a1-r_b1” or “r_a1-r_a0”.

図75は、MMRをブロックベースで符号化する場合のフローチャートである。以後、フローチャートに従って符号化処理を説明する。ここでの処理は、まず、起点変化画素の位置を初期化し(S501)、初期位置(ブロックの左上画素)での画素値を1ビットで符号化する(S502)、次に初期位置において参照変化画素b1を検出する(S503)。   FIG. 75 is a flowchart for encoding MMR on a block basis. Hereinafter, the encoding process will be described according to the flowchart. In this process, first, the position of the starting point change pixel is initialized (S501), the pixel value at the initial position (the upper left pixel of the block) is encoded with 1 bit (S502), and then the reference change is performed at the initial position. The pixel b1 is detected (S503).

ここで、b1が検出されなかった場合には、参照領域に変化画素が存在しないことから垂直モードが使えないため、垂直パスモードの状態を“TRUE”とし、b1が検出された場合は垂直モードが使えるため、垂直パスモードの状態を“FALSE”とする。   Here, when b1 is not detected, the vertical mode cannot be used because there is no change pixel in the reference region. Therefore, the state of the vertical pass mode is set to “TRUE”, and when b1 is detected, the vertical mode is set. Therefore, the vertical path mode is set to “FALSE”.

以上で初期状態のセッティングを終了し、符号化ループの処理に移る。まず、変化画素a1を検出し(S505)、変化画素a1が検出されたか否かを判定し(S506)、変化画素a1が検出されなかった場合には、以後、変化画素が無いため、符号化の終了を示す符号化処理の終了符号(EOMB)を符号化する(S507)。   The initial setting is thus completed, and the process proceeds to the encoding loop process. First, the change pixel a1 is detected (S505), and it is determined whether or not the change pixel a1 is detected (S506). If the change pixel a1 is not detected, then there is no change pixel, so that encoding is performed. An end code (EOMB) of the encoding process indicating the end of is encoded (S507).

また、S506での判定の結果、変化画素a1が検出された場合には、垂直パスモードの状態を判定する(S508)。ここで、垂直パスモードの状態が“TRUE”ならば、垂直パスモードの符号化処理(S516)を行い、垂直パスモードの状態が“FALSE”ならば、b1を検出する(S509)。   If the change pixel a1 is detected as a result of the determination in S506, the state of the vertical pass mode is determined (S508). If the vertical path mode state is “TRUE”, vertical path mode encoding processing (S516) is performed. If the vertical path mode state is “FALSE”, b1 is detected (S509).

次に、b1が検出されたか否かを判定し(S510)。b1が検出されなかった場合には。水平モードのステップ(S513)に進み。b1が検出された場合には、”r_a1−r_b1”の絶対値がしきい値(VTH)よりも大きいか否かを判定し(S511)、その結果、しきい値以下の場合には、垂直モードのステップ(S512)に進み、しきい値よりも大きい場合には、水平モードのステップ(S513)に進む。   Next, it is determined whether or not b1 is detected (S510). If b1 is not detected. Proceed to step (S513) in the horizontal mode. When b1 is detected, it is determined whether or not the absolute value of “r_a1−r_b1” is larger than the threshold value (VTH) (S511). The process proceeds to the mode step (S512), and if larger than the threshold value, the process proceeds to the horizontal mode step (S513).

水平モードのステップ(S513)では、“r_a1−r_a0”の値が符号化される。ここで、“r_a1一r_a0”の値が“WIDTH”よりも小さいか否かを判定し(S514)、その結果、“WIDTH”以上の場合には、垂直パスモードの状態を“TRUE”として(S515)、垂直パスモードのステップ(S516)に進み、垂直パスモードのステップ(S516)が終了したら、垂直パスモードの状態を“FALSE”とする。   In the horizontal mode step (S513), the value of “r_a1-r_a0” is encoded. Here, it is determined whether or not the value of “r_a1r_a0” is smaller than “WIDTH” (S514). If the result is “WIDTH” or more, the vertical path mode state is set to “TRUE” ( S515), the process proceeds to the step (S516) of the vertical path mode, and when the step (S516) of the vertical path mode is completed, the state of the vertical path mode is set to “FALSE”.

以上、垂直モード、水平モード、垂直パスモードの何れかが終了した後(alまでの符号化が終了した後)、a1の位置を新たなa0の位置として(S518)。S505の処理に戻る。   As described above, after any of the vertical mode, the horizontal mode, and the vertical pass mode is finished (after the encoding up to al is finished), the position of a1 is set as a new position of a0 (S518). The process returns to S505.

図73は、VLCテーブルの例である。ここで、垂直パスモードの状態が“TRUE”の場合には、符号の種類はVO、H、EOMBの3種類しか生起しないため、垂直パスモードの状態に応じて、VLCを切り換える事ができる。なお、垂直パスモードの状態が“TRUE”の場合、EOMBはa0がブロックの左上の位置(初期位置)にある場合のみ生起する。従って、この場合には、図73の“0”うちの符号が用いられる。   FIG. 73 is an example of a VLC table. Here, when the state of the vertical path mode is “TRUE”, only three types of codes, VO, H, and EOMB, occur, so that the VLC can be switched according to the state of the vertical path mode. When the state of the vertical path mode is “TRUE”, EOMB occurs only when a0 is at the upper left position (initial position) of the block. Therefore, in this case, the code out of “0” in FIG. 73 is used.

なお、ベクトル量子化は用いずにMMR符号化のみを用いる場合は、上述の具体例を、直接、図2のアルファマップ符号化回路200に用いればよい。   When only MMR coding is used without using vector quantization, the above-described specific example may be used directly in the alpha map coding circuit 200 of FIG.

インデックスが決定されなかったブロックについての符号化は、MMRなど他の符号化方法を用いる以外に、図62のように、マクロブロックをさらに小さなブロックに再分割して、ベクトル量子化をやり直す方法もある。図では標準的なサイズのマクロブロックを、さらに小さなブロックに再分割するにあたり、当該小さなブロックのサイズbはb=B/2とした。   For the coding of blocks for which the index has not been determined, there is a method of re-dividing the macro block into smaller blocks and performing vector quantization again as shown in FIG. 62, in addition to using other coding methods such as MMR. is there. In the figure, when a macro block of a standard size is subdivided into smaller blocks, the size b of the small block is b = B / 2.

この場合は各ブロックの参照部分が既に符号化しているように、“A→B→C→D”か、“A→C→B→D”の順で符号化する。   In this case, encoding is performed in the order of “A → B → C → D” or “A → C → B → D” so that the reference portion of each block has already been encoded.

ブロックの再分割は、誤差が許容範囲に収まるようになるまで行う。こうすればインデックスの数が増えて符号量が増加するが、誤差を許容量以下に抑えられる。   The block is subdivided until the error falls within the allowable range. In this way, the number of indexes increases and the amount of codes increases, but the error can be suppressed to an allowable amount or less.

以上で符号化装置の具体例の説明を終わるが、最後に図57にこの符号化装置全体のフローチャートを示す。   This is the end of the description of the specific example of the encoding apparatus. Finally, FIG. 57 shows a flowchart of the entire encoding apparatus.

S27: 参照パターンによってインデックステーブルを生成する。   S27: An index table is generated according to the reference pattern.

S28:生成したインデックステーブルを用いてベクトル量子化を行い終了する。このような処理を行う。   S28: Vector quantization is performed using the generated index table, and the process ends. Such processing is performed.

<復号装置の具体例>次に、復号装置の具体例を図52に示す。図52に示した回路は、ベクトル逆量子化を行うベクトル逆量子化器1636、ベクトル逆量子化されて得られた情報を保持するメモリ1637、インデックステーブルを生成するインデックステーブル生成器1639とから構成されており、これを図3に示した画像復号装置全体の中ではアルファマップ復号化回路400の部分に配置する。   <Specific Example of Decoding Device> Next, a specific example of the decoding device is shown in FIG. The circuit shown in FIG. 52 includes a vector inverse quantizer 1636 that performs vector inverse quantization, a memory 1637 that holds information obtained by vector inverse quantization, and an index table generator 1639 that generates an index table. This is arranged in the alpha map decoding circuit 400 in the whole image decoding apparatus shown in FIG.

ベクトル逆量子化器1636にはインデックス1635が入力される。メモリ1637には既に復号したアルファマップが保持されており、そこから、参照パターン1638がインデックステーブル生成器1639に送られる。このインデックステーブル生成器1639は符号化装置のそれと同じものである。   An index 1635 is input to the vector inverse quantizer 1636. The memory 1637 holds the already decoded alpha map, from which a reference pattern 1638 is sent to the index table generator 1639. This index table generator 1639 is the same as that of the encoding device.

生成されたインデックステーブル1640はベクトル逆量子化器1636に送られる。ベクトル逆量子化器1636からメモリ1637には復号したアルファマップ1641が送られる。   The generated index table 1640 is sent to the vector inverse quantizer 1636. The decoded alpha map 1641 is sent from the vector inverse quantizer 1636 to the memory 1637.

図58が図52に示した復号装置の処理の流れを示すフローチャートである。このフローチャートを説明すると、まず、インデックステーブル生成器1639は、参照パターンによってインデックステーブルを生成する(S29)。そして、生成したインデックステーブルを用いてベクトル逆量子化器1636はインデックス1635のベクトル逆量子化を行い(S30)、終了する。   FIG. 58 is a flowchart showing the flow of processing of the decoding apparatus shown in FIG. Explaining this flowchart, first, the index table generator 1639 generates an index table based on the reference pattern (S29). Then, using the generated index table, the vector inverse quantizer 1636 performs vector inverse quantization of the index 1635 (S30), and the process ends.

図72には図71に示した符号化装置で生成される符号の復号を行う復号装置を示す。この復号装置は、切り替え信号1652とアルファマップの符号1653が多重化された信号を分離する分離器1651、この分離器1651で分離された切り替え信号1652により回路切り替えしてベクトル逆量子化器1654またはMMR復号器1657のうちの一方に与える切り替え器1655、切り替え器1655を介して与えられる分離器1651からの分離されたアルファマップの符号1653をベクトル逆量子化するベクトル逆量子化器1654、切り替え信号1652により回路切り替えしてベクトル逆量子化器1654またはMMR復号器1657のうちの一方を出力する切り替え器1656からなる。   FIG. 72 shows a decoding apparatus that decodes codes generated by the encoding apparatus shown in FIG. The decoding apparatus includes a separator 1651 that separates a switching signal 1652 and a signal in which an alpha map code 1653 is multiplexed, and a vector dequantizer 1654 or a circuit switching by switching the circuit using the switching signal 1652 separated by the separator 1651. A switch 1655 applied to one of the MMR decoders 1657, a vector inverse quantizer 1654 for vector dequantizing the code 1653 of the separated alpha map from the separator 1651 provided via the switch 1655, a switching signal The switching circuit 1656 includes a switching unit 1656 that outputs one of the vector inverse quantizer 1654 and the MMR decoder 1657 by switching the circuit.

このような構成において、切り替え信号1652とアルファマップの符号1653の多重化信号である符号1650は、分離器1651に入力される。分離器1651では符号1650が切り替え信号1652とアルファマップの符号1653に分割され、切り替え信号1652は切り替え器1655と切り替え器1656に、アルファマップの符号1653は切り替え器1656にそれぞれ送られる。   In such a configuration, a code 1650 that is a multiplexed signal of the switching signal 1652 and the alpha map code 1653 is input to the separator 1651. In the separator 1651, the code 1650 is divided into a switching signal 1652 and an alpha map code 1653, the switching signal 1652 is sent to the switch 1655 and the switch 1656, and the alpha map code 1653 is sent to the switch 1656.

切り替え器1656では切り替え信号1652によって、アルファマップの符号1653がベクトル逆量子化器1654かMMR復号器1657のいずれかに送られる。ベクトル逆量子化器1654とMMR復号器1657では、アルファマップの符号1653が入力された時にはアルファマップ1658を再生し、切り替え器1655を通って出力される。   The switch 1656 sends the alpha map code 1653 to either the vector inverse quantizer 1654 or the MMR decoder 1657 according to the switch signal 1652. In the vector inverse quantizer 1654 and the MMR decoder 1657, when the alpha map code 1653 is inputted, the alpha map 1658 is reproduced and outputted through the switch 1655.

以上で第11の具体例としての復号装置の具体例の説明を終わる。   This is the end of the description of the specific example of the decoding device as the eleventh specific example.

以上述べてきたように、本発明によればアルファマップを効率良く符号化することが可能となり、従って、アルファマップの符号量を低減することができるために、大幅な符号化効率の低下なしに、背景とオブジェクトを別々に符号化することができるようになる。   As described above, according to the present invention, it is possible to efficiently encode an alpha map, and therefore the code amount of the alpha map can be reduced, so that there is no significant reduction in encoding efficiency. The background and the object can be encoded separately.

なお、種々の具体例について説明したが、本発明はこれらに限定されることなく、変形して実施可能である。   Although various specific examples have been described, the present invention is not limited to these and can be modified.

本発明を説明するための図であって、本発明による画像符号化装置および画像復号化装置が適用される画像伝送システムの一例を示す図。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram illustrating an example of an image transmission system to which an image encoding device and an image decoding device according to the present invention are applied. 本発明を説明するための図であって、本発明による符号化装置の全体の概略的な構成を示すブロック図。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram for explaining the present invention, and is a block diagram showing an overall schematic configuration of an encoding apparatus according to the present invention. 本発明を説明するための図であって、本発明による復号化装置の全体の概略的な構成を示すブロック図。FIG. 2 is a diagram for explaining the present invention, and is a block diagram showing a schematic configuration of the entire decoding device according to the present invention. 従来のアルファマップ符号化回路の構成を示すブロック図。The block diagram which shows the structure of the conventional alpha map encoding circuit. 2値画像の解像度変換回路の例。An example of a resolution conversion circuit for a binary image. 本発明を説明するための図であって、本発明による第1の具体例の符号化回路を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the encoding circuit of the 1st specific example by this invention. 従来の復号化回路を説明する図。The figure explaining the conventional decoding circuit. 本発明を説明するための図であって、本発明による第1の具体例の復号化回路を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the decoding circuit of the 1st specific example by this invention. MMRの2次元符号化を説明する図。The figure explaining the two-dimensional encoding of MMR. 本発明で用いられる可変長符号の符号化例とMMR符号化での符号化例を示す図。The figure which shows the encoding example of the variable-length code used by this invention, and the encoding example in MMR encoding. MMRの符号化手順を説明するフローチャート。The flowchart explaining the encoding procedure of MMR. MMRの符号化手順を説明する図、The figure explaining the encoding procedure of MMR, 本発明を説明するための図であって、本発明方式におけるラスタ順に符号化する手順を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the procedure encoded in the raster order in this invention system. 本発明を説明するための図であって、本発明方式における垂直パスモードが必要となる例を表す図。It is a figure for demonstrating this invention, Comprising: The figure showing the example for which the vertical path | pass mode in a system of this invention is needed. 本発明を説明するための図であって、垂直パスモードの第1の例を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the 1st example of vertical pass mode. 本発明を説明するための図であって、垂直パスモードの第2の例を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the 2nd example of vertical pass mode. 本発明を説明するための図であって、ラスタ順に符号化する場合の符号化手順を説明するためのフローチャート。It is a figure for demonstrating this invention, Comprising: The flowchart for demonstrating the encoding procedure in the case of encoding in raster order. 本発明を説明するための図であって、フレーム間の参照ラインを用いる符号化/復号化装置のブロック図。FIG. 2 is a diagram for explaining the present invention, and is a block diagram of an encoding / decoding device using a reference line between frames. 本発明を説明するための図であって、フレーム内とフレーム間の参照ラインを説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the reference line in a flame | frame and between frames. 本発明を説明するための図であって、フレーム間の参照ラインを用いる符号化手順を説明するためのフローチャート。It is a figure for demonstrating this invention, Comprising: The flowchart for demonstrating the encoding procedure using the reference line between frames. 本発明を説明するための図であって、本発明での符号化モードの切り換えを説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating switching of the encoding mode in this invention. 本発明を説明するための図であって、本発明でのブロックラインのスキップを説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the skip of the block line in this invention. 本発明を説明するための図であって、本発明でのNOT CODED モードを用いる場合の符号化手順を説明するためのフローチャート。It is a figure for demonstrating this invention, Comprising: The flowchart for demonstrating the encoding procedure in the case of using NOT CODED mode in this invention. 本発明を説明するための図であって、本発明における複数の参照ラインを用いる場合を説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the case where the some reference line in this invention is used. 本発明を説明するための図であって、本発明における2つの参照ラインを用いる場合での符号化手順のフローチャート。It is a figure for demonstrating this invention, Comprising: The flowchart of the encoding procedure in the case of using two reference lines in this invention. 本発明を説明するための図であって、適用対象とする一例としての多値のアルファマップを説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the multi-value alpha map as an example made into an application object. 本発明を説明するための図であって、本発明での多値のアルファマップの符号化法を適用するための構成例を説明するためのブロック図。It is a figure for demonstrating this invention, Comprising: The block diagram for demonstrating the structural example for applying the encoding method of the multi-value alpha map in this invention. 本発明を説明するための図であって、本発明における第2の具体例を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the 2nd specific example in this invention. 本発明を説明するための図であって、本発明における第3の具体例を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the 3rd specific example in this invention. 本発明を説明するための図であって、本発明における第3の具体例を説明するブロック図。It is a figure for demonstrating this invention, Comprising: The block diagram explaining the 3rd specific example in this invention. アルファマップを説明する図。The figure explaining an alpha map. 本発明の他の例を説明するための図。The figure for demonstrating the other example of this invention. 本発明を説明するための図であって、本発明における第4の具体例を説明する図。It is a figure for demonstrating this invention, Comprising: The figure explaining the 4th example in this invention. 本発明を説明するための図であって、本発明における第4の具体例を実現する装置構成例を示すブロック図。It is a figure for demonstrating this invention, Comprising: The block diagram which shows the apparatus structural example which implement | achieves the 4th specific example in this invention. 本発明を説明するための図であって、マクロブロックMBを説明するための図。The figure for demonstrating this invention, Comprising: The figure for demonstrating macroblock MB. 本発明における第5の具体例を説明するための図。The figure for demonstrating the 5th example in this invention. 本発明を説明するための図であって、本発明における第5の具体例を説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the 5th example in this invention. 本発明を説明するための図であって、本発明における第6の具体例を説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the 6th specific example in this invention. 本発明を説明するための図であって、本発明における第7の具体例を説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the 7th example in this invention. 本発明を説明するための図であって、本発明における第8の具体例を説明するための図。It is a figure for demonstrating this invention, Comprising: The figure for demonstrating the 8th example in this invention. 本発明の応用例を説明するための図。The figure for demonstrating the application example of this invention. 本発明の第8の具体例を説明するための図であって、アルファマップのMV検出及び符号化を表す図。It is a figure for demonstrating the MV detection and encoding of an alpha map for demonstrating the 8th example of this invention. 本発明の第9の具体例を説明するための図であって、アルファマップのブロック属性をビットプレーンに分解する図。It is a figure for demonstrating the 9th example of this invention, Comprising: The figure which decomposes | disassembles the block attribute of an alpha map into a bit plane. 本発明の第9の具体例を説明するための図であって、アルファマップのブロック属性のビットプレーンを符号化する例。It is a figure for demonstrating the 9th example of this invention, Comprising: The example which encodes the bit plane of the block attribute of an alpha map. 本発明の第10の具体例を説明するための図であって、時刻 n と時刻 n-1におけるあるマクロブロックの属性情報の一例を表した図(アルファマップのブロック属性のフレーム間相関を示す図)。It is a figure for demonstrating the 10th specific example of this invention, Comprising: The figure showing an example of the attribute information of a certain macroblock in the time n and the time n-1 (the correlation between frames of the block attribute of an alpha map is shown) Figure). 本発明の第10の具体例を説明するための図であって、時刻 n-1 のラベルのサイズを、時刻 n のラベルのサイズに合わせる手順の例を示す図。It is a figure for demonstrating the 10th specific example of this invention, Comprising: The figure which shows the example of the procedure which matches the size of the label of the time n-1 with the size of the label of the time n. 本発明の第10の具体例を説明するための図であって、フレーム間符号化と、フレーム内符号化を表す図。It is a figure for demonstrating the 10th specific example of this invention, Comprising: The figure showing inter-frame coding and intra-frame coding. 本発明の第10の具体例を説明するための図であって、ライン毎にまとめて符号化する例を表す図。It is a figure for demonstrating the 10th specific example of this invention, Comprising: The figure showing the example encoded collectively for every line. 本発明の第10の具体例を説明するための図であって、各ラベルを符号化するための可変長符号表の例。It is a figure for demonstrating the 10th specific example of this invention, Comprising: The example of the variable-length code table for encoding each label. 本発明の第10の具体例を説明するための図であって、本発明の復号化装置および符号装置の構成例を示すブロック図である。It is a figure for demonstrating the 10th specific example of this invention, Comprising: It is a block diagram which shows the structural example of the decoding apparatus and encoding apparatus of this invention. 本発明の第11の具体例を説明するための図であって、ベクトル量子化を用いた本発明の符号化装置の具体例を示すブロック図。It is a figure for demonstrating the 11th example of this invention, Comprising: The block diagram which shows the example of the encoding apparatus of this invention using vector quantization. 本発明の第11の具体例を説明するための図であって、ベクトル量子化を用いた本発明の復号装置の具体例を示すブロック図。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The block diagram which shows the specific example of the decoding apparatus of this invention using vector quantization. 本発明の第11の具体例を説明するための図であって、本発明システムに用いるインデックステーブル生成器1609の例を示すブロック図。It is a figure for demonstrating the 11th example of this invention, Comprising: The block diagram which shows the example of the index table generator 1609 used for this invention system. 本発明の第11の具体例を説明するための図であって、本発明システムに用いるインデックステーブル生成器の第2の具体例を示すブロック図。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The block diagram which shows the 2nd specific example of the index table generator used for this invention system. 本発明の第11の具体例を説明するための図であって、本発明システムに用いるインデックステーブル生成器の第3の具体例を示すブロック図。It is a figure for demonstrating the 11th example of this invention, Comprising: The block diagram which shows the 3rd example of the index table generator used for this invention system. 本発明の第11の具体例を説明するための図であって、本発明システムに用いるタイプ決定器1616の具体例を示すブロック図。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The block diagram which shows the specific example of the type determination device 1616 used for this invention system. 本発明の第11の具体例を説明するための図であって、本具体例における符号化装置全体の処理の流れを示すフローチャート。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The flowchart which shows the flow of a process of the whole encoding apparatus in this specific example. 本発明の第11の具体例を説明するための図であって、図52に示した本具体例における復号装置の処理の流れを示すフローチャート。FIG. 53 is a diagram for describing an eleventh specific example of the present invention, and is a flowchart showing a processing flow of the decoding apparatus in the specific example shown in FIG. 52. 本発明の第11の具体例を説明するための図であって、アルファマップの例を示す図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure which shows the example of an alpha map. 本発明の第11の具体例を説明するための図であって、途中まで符号化、復号されたアルファマップの例を示す図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure which shows the example of the alpha map encoded and decoded to the middle. 本発明の第11の具体例を説明するための図であって、参照部分を示す図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure which shows a reference part. 本発明の第11の具体例を説明するための図であって、ブロックを再分割した時の参照部分を説明する図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure explaining a reference part when a block is subdivided. 本発明の第11の具体例を説明するための図であって、RTとRLを説明するための図。It is a figure for demonstrating the 11th example of this invention, Comprising: RT is a figure for RL. 本発明の第11の具体例を説明するための図であって、境界線の向きの推定を説明するための図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure for demonstrating estimation of the direction of a boundary line. 本発明の第11の具体例を説明するための図であって、本発明で使用する評価値の計算例を説明するための図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure for demonstrating the example of calculation of the evaluation value used by this invention. 本発明の第11の具体例を説明するための図であって、許容誤差条件を判定するためのブロックを説明する図。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The figure explaining the block for determining an allowable error condition. 本発明の第11の具体例を説明するための図であって、本発明の具体例を示すフローチャート。It is a figure for demonstrating the 11th example of this invention, Comprising: The flowchart which shows the example of this invention. 本発明の第11の具体例を説明するための図であって、本発明で用いるタイプ決定器1616での処理アルゴリズムを示すフローチャート。It is a figure for demonstrating the 11th example of this invention, Comprising: The flowchart which shows the processing algorithm in the type determiner 1616 used by this invention. 本発明の第11の具体例を説明するための図であって、図51のベクトル量子化器1607において用いるアルゴリズムを説明するフローチャート。It is a figure for demonstrating the 11th example of this invention, Comprising: The flowchart explaining the algorithm used in the vector quantizer 1607 of FIG. 本発明の第11の具体例を説明するための図であって、本発明に用いるタイプMとRT、RLを用いたインデックステーブルの構成例を示す図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure which shows the structural example of the index table using type M, RT, and RL used for this invention. 本発明の第11の具体例を説明するための図であって、本発明の符号化装置の具体例を示すブロック図。It is a figure for demonstrating the 11th specific example of this invention, Comprising: The block diagram which shows the specific example of the encoding apparatus of this invention. 本発明の第11の具体例を説明するための図であって、図71に示した符号化装置で生成される符号の復号を行う復号装置の具体例を示すブロック図。FIG. 72 is a diagram for describing an eleventh specific example of the present invention, and is a block diagram illustrating a specific example of a decoding device that decodes codes generated by the encoding device illustrated in FIG. 71. 本発明の第11の具体例を説明するための図であって、本発明に用いるVLCテーブルの例を示す図。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure which shows the example of the VLC table used for this invention. 本発明の第11の具体例を説明するための図であって、ブロック単位で符号化する場合の変化画素の関係を表す図およびb1を検出する為の参照領域を表す図(ブロックベース符号化の変化画素の関係と参照領域を表す図)。It is a figure for demonstrating the 11th example of this invention, Comprising: The figure showing the relationship of the change pixel at the time of encoding in a block unit, and the figure showing the reference area for detecting b1 (block-based encoding) The diagram showing the relationship between the change pixels and the reference region). 本発明の第11の具体例を説明するための図であって、MMRをブロックベースで符号化する場合のフローチャート。It is a figure for demonstrating the 11th example of this invention, Comprising: The flowchart in the case of encoding MMR on a block basis.

符号の説明Explanation of symbols

100…差分回路
110,350…動き補償予測回路
120…直交変換回路
130…量子化回路
140…可変長符号化回路
150,320…逆量子化回路
160,330…逆直交変換回路
170,340…加算回路
180,240,510…多重化回路
200…アルファマップ符号化回路
210,230,420…解像度変換回路
220…2値画像符号化回路
221…2次元符号化回路
222…ラインメモリ
223…フレームメモリ
300,430,520…分離化回路
310…可変長復号化回路
400…アルファマップ復号化回路
410…2値画像復号化回路
500…オブジェクト領域検出回路
530…アルファマップ復元回路
621,622…フレームメモリ
623…制御手段
1613…ベクトル逆量子化器
1605…メモリ
1607…ベクトル量子化器
1609,1639…インデックステーブル生成器
1636…逆量子化器
1637…メモリ
2000…符号化/復号化回路
2100…ラインメモリ
2200…セレクタ
2300…フレームメモリ
2400…動き補償予測回路
2500…シェープコーディング部(2値画像符号化回路)
2600…アルファバリューコーディング部(多値画像符号化回路)。
DESCRIPTION OF SYMBOLS 100 ... Difference circuit 110, 350 ... Motion compensation prediction circuit 120 ... Orthogonal transformation circuit 130 ... Quantization circuit 140 ... Variable length coding circuit 150, 320 ... Inverse quantization circuit 160, 330 ... Inverse orthogonal transformation circuit 170, 340 ... Addition Circuits 180, 240, 510 ... Multiplexing circuit 200 ... Alpha map encoding circuits 210, 230, 420 ... Resolution conversion circuit 220 ... Binary image encoding circuit 221 ... Two-dimensional encoding circuit 222 ... Line memory 223 ... Frame memory 300 , 430, 520 ... separation circuit 310 ... variable length decoding circuit 400 ... alpha map decoding circuit 410 ... binary image decoding circuit 500 ... object area detection circuit 530 ... alpha map restoration circuits 621, 622 ... frame memory 623 ... Control means 1613 ... Vector inverse quantizer 1605 ... Memory 1607 ... Kuttle quantizers 1609, 1639 ... index table generator 1636 ... inverse quantizer 1637 ... memory 2000 ... encoding / decoding circuit 2100 ... line memory 2200 ... selector 2300 ... frame memory 2400 ... motion compensation prediction circuit 2500 ... shape coding Part (binary image encoding circuit)
2600: Alpha value coding unit (multi-valued image coding circuit).

Claims (4)

2値画像を所定の小領域毎に分割する分割ステップと、
前記2値画像を前記小領域毎に拡大・縮小して解像度変換された2値画像を出力する解像度変換ステップと、
前記解像度変換された2値画像を符号化する符号化ステップと、
前記解像度変換ステップの拡大・縮小率を前記小領域毎に変えることにより前記符号化ステップの発生符号量を制御する制御ステップと、
前記2値画像の符号化データと前記拡大・縮小率の情報を示す符号とを多重化する多重化ステップとを具備することを特徴とする画像符号化方法。
A dividing step of dividing the binary image into predetermined small regions;
A resolution conversion step of outputting a binary image whose resolution has been converted by enlarging or reducing the binary image for each small area;
An encoding step of encoding the resolution-converted binary image;
A control step for controlling the generated code amount of the encoding step by changing the enlargement / reduction ratio of the resolution conversion step for each small area;
An image encoding method comprising: a multiplexing step of multiplexing encoded data of the binary image and a code indicating information on the enlargement / reduction ratio.
前記符号化ステップは、前記解像度変換ステップの拡大・縮小率にしたがって可変長符号を切り換えることを特徴とする請求項1記載の画像符号化方法。   2. The image encoding method according to claim 1, wherein the encoding step switches a variable length code according to an enlargement / reduction ratio of the resolution conversion step. 2値画像を所定の小領域毎に分割する分割手段と、
前記2値画像を前記小領域毎に拡大・縮小して解像度変換された2値画像を出力する解像度変換手段と、
前記解像度変換された2値画像を符号化する符号化手段と、
前記解像度変換手段の拡大・縮小率を前記小領域毎に変えることにより前記符号化手段の発生符号量を制御する制御手段と、
前記2値画像の符号化データと前記拡大・縮小率の情報を示す符号とを多重化する多重化手段とを具備することを特徴とする画像符号化装置。
Dividing means for dividing the binary image into predetermined small regions;
Resolution conversion means for outputting a binary image whose resolution has been converted by enlarging or reducing the binary image for each of the small areas;
Encoding means for encoding the resolution-converted binary image;
Control means for controlling the generated code amount of the encoding means by changing the enlargement / reduction ratio of the resolution conversion means for each small area;
An image encoding apparatus comprising: a multiplexing unit that multiplexes encoded data of the binary image and a code indicating information on the enlargement / reduction ratio.
前記符号化手段は、前記解像度変換手段の拡大・縮小率にしたがって可変長符号を切り換えることを特徴とする請求項3記載の画像符号化装置。   4. The image encoding apparatus according to claim 3, wherein the encoding unit switches the variable length code in accordance with an enlargement / reduction ratio of the resolution conversion unit.
JP2007038684A 1995-09-29 2007-02-19 Video encoding apparatus and method Abandoned JP2007195209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007038684A JP2007195209A (en) 1995-09-29 2007-02-19 Video encoding apparatus and method

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP27699095 1995-09-29
JP28102895 1995-10-27
JP6145196 1996-03-18
JP9891896 1996-04-19
JP2007038684A JP2007195209A (en) 1995-09-29 2007-02-19 Video encoding apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP8237053A Division JPH104549A (en) 1995-09-29 1996-09-06 Image coder and image decoder

Publications (1)

Publication Number Publication Date
JP2007195209A true JP2007195209A (en) 2007-08-02

Family

ID=38450464

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007038684A Abandoned JP2007195209A (en) 1995-09-29 2007-02-19 Video encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP2007195209A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013205947A (en) * 2012-03-27 2013-10-07 Fujitsu Ten Ltd Image processing device, image processing method, and image processing program
KR101760420B1 (en) * 2011-01-04 2017-07-21 엘지전자 주식회사 Apparatus and method for processing sharpness of video signal, Broadcasting Signal Receiver

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101760420B1 (en) * 2011-01-04 2017-07-21 엘지전자 주식회사 Apparatus and method for processing sharpness of video signal, Broadcasting Signal Receiver
JP2013205947A (en) * 2012-03-27 2013-10-07 Fujitsu Ten Ltd Image processing device, image processing method, and image processing program

Similar Documents

Publication Publication Date Title
US6088486A (en) Video coding and video decoding apparatus
US7308031B2 (en) Video encoding apparatus and video decoding apparatus
US6330364B1 (en) Video coding and video decoding apparatus
JP2007202169A (en) Video decoding method and apparatus
JP2007195209A (en) Video encoding apparatus and method
JPH104549A (en) Image coder and image decoder
JP2007166664A (en) Image encoding method and device
JP2007195210A (en) Video decoding method and apparatus
JP2007166665A (en) Image decoding method and device
US6754268B1 (en) Video coding and video decoding apparatus
JP2007166663A (en) Image decoding method and device
JP2007166662A (en) Image encoding method and device
JP2004350307A (en) Image encoding device and image decoding device
JP2004343788A (en) Video encoding apparatus, video decoding apparatus and recording medium with video encoded data recorded thereon
JP2004320808A (en) Image coding apparatus
JP2004320807A (en) Image coding and apparatuses decoding

Legal Events

Date Code Title Description
A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20100125