JPH08163376A - Picture encoder and picture decoder - Google Patents

Picture encoder and picture decoder

Info

Publication number
JPH08163376A
JPH08163376A JP30189194A JP30189194A JPH08163376A JP H08163376 A JPH08163376 A JP H08163376A JP 30189194 A JP30189194 A JP 30189194A JP 30189194 A JP30189194 A JP 30189194A JP H08163376 A JPH08163376 A JP H08163376A
Authority
JP
Japan
Prior art keywords
image
pattern number
block
decoding
pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP30189194A
Other languages
Japanese (ja)
Inventor
Hajime Mizumachi
肇 水町
Makoto Matsuki
眞 松木
Tomofumi Hikage
智文 日景
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP30189194A priority Critical patent/JPH08163376A/en
Publication of JPH08163376A publication Critical patent/JPH08163376A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE: To generate a restored picture in the display and print system with the picture size of an objective picture output device independently of the picture size of an original picture. CONSTITUTION: At the time of encoding, an encoded block is inputted from an original picture 50 to a block pattern discriminator 11, and a pattern number correspondence table 31 selected by an encoded block size S is used to express this encoded block by a pattern number, and this pattern number is encoded by an entropy encoder 12 to generate encoded data. At the time of decoding, a block pattern generator 22 uses the pattern number obtained by decoding the encoded data by an entropy decoder 21 and uses a pattern table 41 selected by a designated decoded block size D to generate a decoded block corresponding to the pattern number and successively outputs the generated decoded block to generate a restored picture 70.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、画像入力機器から入力
した画像を蓄積もしくは通信し、解像度や表示および印
刷方法が異なる画像出力機器に出力する場合に、蓄積も
しくは通信の効率化のために原画像のデータ量を圧縮す
るために用いられる画像符号化器と画像復号化器に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is intended to improve the efficiency of storage or communication when an image input from an image input device is stored or communicated and output to an image output device having a different resolution, display and printing method. The present invention relates to an image encoder and an image decoder used for compressing the data amount of an original image.

【0002】[0002]

【従来の技術】従来2値画像の圧縮技術は、原画像を忠
実に再現可能で、より圧縮率を高めることを目的に開発
されているため、復元画像は原画像と同一の画像サイズ
でのみ復号化が可能である。
2. Description of the Related Art Since the conventional binary image compression technology has been developed for the purpose of faithfully reproducing the original image and further increasing the compression rate, the restored image should be of the same image size as the original image. It can be decrypted.

【0003】また、JBIG(Joint Bi-level Image ex
paerts Group) としてITUから提案されている符号化
方式では、段階的符号化方式が採用されている。
In addition, JBIG (Joint Bi-level Image ex
The coding method proposed by ITU as a paerts group) employs a stepwise coding method.

【0004】[0004]

【発明が解決しようとする課題】前者の従来技術では、
原画像を作成した画像入力装置と復元画像を出力する画
像出力装置の解像度や表示および印刷方式が異なる場
合、一旦、復号化された復元画像に画像処理を加えるこ
とにより、目的とする画像出力装置用の出力画像を生成
する必要がある。
In the former prior art,
When the resolution and the display and printing methods of the image input device that created the original image and the image output device that outputs the restored image are different, the target image output device is created by once performing image processing on the decrypted restored image. Need to generate an output image for.

【0005】後者の従来技術では、原画像とは異なる画
像サイズの復元画像の復号化が可能であるが、復元画像
の画像サイズとして選択可能な倍率は、2のべき乗分の
1倍の縮小画像であり、該当の縮小率では画像出力装置
の解像度が得られない場合や拡大が必要な場合は同様に
復号化後に画像処理を加える必要がある。
In the latter conventional technique, it is possible to decode a restored image having an image size different from that of the original image, but the magnification selectable as the image size of the restored image is a reduced image of 1 times a power of 2. Therefore, when the resolution of the image output device cannot be obtained at the corresponding reduction ratio or when enlargement is required, it is necessary to add image processing after decoding similarly.

【0006】本発明の目的は、目的の画像出力装置の画
像サイズや表示および印刷方法の復元画像を、原画像の
画像サイズに依存しない画像サイズで生成可能とする画
像符号化器を提供することにある。
It is an object of the present invention to provide an image coder capable of generating an image size of a target image output device and a restored image of a display and printing method with an image size that does not depend on the image size of an original image. It is in.

【0007】[0007]

【課題を解決するための手段】本発明の画像符号化器
は、画像データを入力する第1の手段と、該入力画像デ
ータの符号化ブロックサイズM*Nの各符号化ブロック
とこれと対応するパターン番号からなるパターン番号対
応テーブルを有し、第1の手段で入力された画像データ
から順次符号化ブロックサイズM*Nで符号化ブロック
を切り出し、前記パターン番号対応テーブを参照して該
符号化ブロックと対応するパターン番号を該符号化ブロ
ックの値として符号化する第2の手段と、該符号化ブロ
ックサイズM*Nと各符号化ブロックに対応するパター
ン番号を送信する第3の手段を有する。
An image encoder according to the present invention includes first means for inputting image data, each coded block having a coded block size M * N of the input image data, and corresponding thereto. Pattern number correspondence table consisting of pattern numbers corresponding to each other, and the coding blocks are sequentially cut out with the coding block size M * N from the image data input by the first means, and the code is referred to by referring to the pattern number correspondence table. A second means for coding a pattern number corresponding to a coded block as a value of the coded block; and a third means for transmitting the coded block size M * N and a pattern number corresponding to each coded block. Have.

【0008】また、本発明の画像復号化器は、前記画像
符号化器から符号化ブロックサイズM*Nと符号化パタ
ーン番号列を受信する第1の手段と、前記符号化ブロッ
クサイズM*Nでの各パターン番号に対応する復号化ブ
ロックサイズJ*Kでのパターン番号と復号化ブロック
からなるパターン番号変換テーブルを有し、前記符号化
パターン番号列の各パターン番号に対応する該パターン
番号変換テーブルのパターン番号を求め、前記パターン
番号変換テーブルを参照して該パターン番号に対応する
復号化ブロックを用いて前記画像データを復号化する第
2の手段を有する。
Also, the image decoder of the present invention comprises first means for receiving the coding block size M * N and the coding pattern number sequence from the image coder, and the coding block size M * N. A pattern number conversion table composed of a pattern number and a decoding block in a decoding block size J * K corresponding to each pattern number in the above, and the pattern number conversion corresponding to each pattern number in the encoded pattern number sequence There is provided a second means for obtaining the pattern number of the table, referring to the pattern number conversion table, and decoding the image data using the decoding block corresponding to the pattern number.

【0009】画像符号化器の第2の手段は、パターン番
号対応テーブルを符号化ブロックサイズM*Nと復号化
ブロックサイズJ*Kの組み合わせの種類分有する。
The second means of the image encoder has pattern number correspondence tables for the types of combinations of the coding block size M * N and the decoding block size J * K.

【0010】画像復号化器の第3の手段は、パターン番
号変換テーブルを符号化ブロックサイズM*Nと復号化
ブロックサイズJ*Kの組み合わせの種類分有する。
The third means of the image decoder has pattern number conversion tables for the types of combinations of the coding block size M * N and the decoding block size J * K.

【0011】画像符号化器の第2の手段はエントロピー
符号化によりパターン番号を符号化するように構成さ
れ、画像復号化器の第2の手段はエントロピー復号化に
よりパターン番号を復号化するように構成されている。
The second means of the image encoder is arranged to encode the pattern number by entropy coding, and the second means of the image decoder is arranged to decode the pattern number by entropy decoding. It is configured.

【0012】画像として白黒画像または白黒の中間調画
像を扱う。
A black and white image or a black and white halftone image is handled as an image.

【0013】符号化ブロックサイズとしてN*Nを用
い、復号化ブロックサイズとしてJ*Jを用いる。
N * N is used as the coding block size and J * J is used as the decoding block size.

【0014】[0014]

【作用】本発明は、符号化および復号化処理をブロック
単位で行い、符号化時はブロックをそのブロック内の画
素の配置パターンと対応するパターン番号で表現した値
で符号化し、復号化時には復号化により復号化された値
をパターン番号として符号化ブロックサイズおよびブロ
ック内の画素の配置パターンとは異なる復号化ブロック
サイズおよびブロック内の画素の配置パターンにパター
ン番号を対応させて復元画像を生成するものである。予
め登録された復号ブロック内の画素の配置パターンとし
て、符号ブロック内の画素の配置パターンの拡大もしく
は縮小された配置パターンの中から必要に応じた倍率の
復号化ブロックサイズおよびブロック内の画素の配置パ
ターンを利用して復号化処理を行うことで、1つの符号
化データから、復元画像を表示もしくは印刷する画像出
力装置に直接入力可能な画像サイズで原画像を復号化す
ることができる。
According to the present invention, the encoding and decoding processes are performed on a block-by-block basis. At the time of encoding, the block is encoded by a value expressed by a pattern number corresponding to the arrangement pattern of pixels in the block, and at the time of decoding it is decoded. The decoded image size is generated by using the value decoded by the coding as a pattern number and the decoded block size and the pixel arrangement pattern in the block different from the coded block size and the pixel arrangement pattern in the block. It is a thing. As the pixel arrangement pattern in the decoding block registered in advance, the decoding block size and the pixel arrangement in the block of the magnification as necessary are selected from the enlarged or reduced arrangement pattern of the pixel arrangement pattern in the code block. By performing the decoding process using the pattern, the original image can be decoded from one piece of encoded data with an image size that can be directly input to the image output device that displays or prints the restored image.

【0015】なお、画像は白黒画像でも白黒の中間画像
でもよい。
The image may be a monochrome image or a monochrome intermediate image.

【0016】[0016]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0017】図1は本発明の一実施例の画像符号化・復
号化器の構成図である。
FIG. 1 is a block diagram of an image encoder / decoder according to an embodiment of the present invention.

【0018】符号化器10は解像度に依存しない符号化
を行う符号化器で、指定された符号化ブロックサイズS
にしたがい原画像50からS×Sブロックを順次入力
し、該当のブロックに対応したパターン番号を出力する
ブロックパターン判定器11と、ブロックパターン判定
器11より出力されたパターン番号をエントロピー符号
化により符号化するエントロピー符号化器12で構成さ
れている。パターン番号対応テーブル蓄積装置30は、
ブロックパターン判定器11がブロックよりパターン番
号を判定するために使用する、ブロックとパターン番号
の対応関係を記憶したパターン番号対応テーブル31を
符号化ブロックサイズに応じて1つまたは複数個蓄積し
ている。復号化器20は、解像度に依存しない復号化を
行う復号化器で、符号化データ(パターン/番号)をエ
ントロピー復号化化により復号化するエントロピー復号
化器21と、エントロピー復号化器21が復号化したパ
ターン番号に応じたブロックを指定の復号化ブロックサ
イズDで生成し、復元画像70として順次出力するブロ
ックパッターン発生器22で構成されている。パターン
テーブル蓄積装置40はブロックパターン発生器22が
パターン番号からブロックを生成するためにパターン番
号に応じた予め与えられたブロックの画像パターンを記
憶したパターン番号変換テーブル41を復号化ブロック
サイズDに応じて1つまたは複数個蓄積している。符号
化データ蓄積装置61,62はそれぞれ符号化器10の
出力および復号化器20の入力となる符号化データを蓄
積する。符号化時、原画像50を指定された符号化ブロ
ックサイズSによりブロック毎に符号化するため、ブロ
ックパターン判定器11は原画像50よりブロックを入
力し、符号化ブロックサイズSで選択されたパターン番
号対応テーブル31を用いて該当ブロックをパターン番
号で表し、そのパターン番号をエントロピー符号化器1
2により符号化することで符号化データを作成する。復
号化時、符号データをエントロピー復号化器21により
復号して得られたパターン番号を用いブロックパターン
発生器22が指定された復号化ブロックサイズDで選択
されたパターン番号変換テーブル41を用いてパターン
番号に対応したブロックを生成し、生成したブロックを
順次出力することで復元画像70を作成する。この符号
化および復号化処理において、符号化時にブロックパタ
ーン判定器11に指定する符号化ブロックサイズSと異
なる復号化ブロックサイズDを復号化時にブロックパタ
ーン発生器22に指定することにより、復元画像70を
表示もしくは印刷する画像出力装置に直接入力可能な復
元画像70を復号化する。
The encoder 10 is an encoder for performing resolution-independent encoding, and has a specified encoding block size S.
Accordingly, the S × S blocks are sequentially input from the original image 50, and the block pattern determiner 11 that outputs the pattern number corresponding to the corresponding block and the pattern number output from the block pattern determiner 11 are encoded by entropy encoding. It is composed of an entropy coder 12 for converting. The pattern number correspondence table storage device 30
One or a plurality of pattern number correspondence tables 31 that store correspondences between blocks and pattern numbers used by the block pattern determiner 11 to determine a pattern number from a block are stored according to the coding block size. . The decoder 20 is a decoder that performs resolution-independent decoding, and the entropy decoder 21 that decodes encoded data (pattern / number) by entropy decoding and the entropy decoder 21 The block pattern generator 22 is configured to generate a block corresponding to the converted pattern number with a designated decoded block size D and sequentially output it as a restored image 70. The pattern table storage device 40 stores the pattern number conversion table 41 storing the image pattern of a predetermined block corresponding to the pattern number for the block pattern generator 22 to generate the block from the pattern number, according to the decoding block size D. One or more are accumulated. The coded data storage devices 61 and 62 store the coded data serving as the output of the encoder 10 and the input of the decoder 20, respectively. At the time of encoding, since the original image 50 is encoded for each block by the designated encoding block size S, the block pattern determiner 11 inputs the block from the original image 50 and selects the pattern selected by the encoding block size S. The corresponding block is represented by a pattern number using the number correspondence table 31, and the pattern number is represented by the entropy encoder 1.
Encoded data is created by encoding with 2. At the time of decoding, the pattern number is obtained by decoding the coded data by the entropy decoder 21 and the block pattern generator 22 selects the pattern using the pattern number conversion table 41 selected by the specified decoding block size D. The restored image 70 is created by generating blocks corresponding to the numbers and sequentially outputting the generated blocks. In this encoding and decoding processing, the restored image 70 is specified by specifying the decoding block size D different from the encoding block size S specified in the block pattern determiner 11 at the time of encoding to the block pattern generator 22 at the time of decoding. The decoded image 70 that can be directly input to the image output device for displaying or printing is decoded.

【0019】図2は、ブロックパターン判定器11の処
理を説明するフローチャートである。ブロックパターン
判定器11は、まず初期化処理として処理に必要な幅サ
イズWと高さサイズHからなる、原画像50のイメージ
サイズと符号化ブロックサイズSを入力するとともに
(ステップ101,102)、エントロピー符号化器1
2の初期化を行う(ステップ103)。次に、ポインタ
i,jを初期化して(ステップ104,105)、入力
した符号化ブロックサイズSにしたがいS×S個の画素
からなるブロック単位で原画像50からブロックBij
を入力し(ステップ106)、入力された各ブロックB
ijに対してパターン番号を生成し(ステップ10
7)、そのパターン番号値をエントロピー符号化器12
に出力する(ステップ108)。本実施例では、パター
ン番号の生成において、図1で示したパターン番号対応
テーブル31は使用せず、ブロックBijのS×Sの2
次元に配置された画素を1次元に並べて得られたビット
列の値をパターン番号値として生成する。次に、ポイン
タjを+1インクリメントし(ステップ109)、j>
(W/S)かどうか判定する(ステップ110)。j>
(W/S)でなければ、ステップ106に戻り、j>
(W/S)であればポインタiを+1インクリメントす
る。次に、i>(H/S)かどうか判定する(ステップ
112)。i>(H/S)でなければステップ105に
戻り、i>(H/S)であれば、すなわち原画像50の
全ての画素に関して符号化を終了した場合、エントロピ
ー符号化器12の終了処理を行い(ステップ113)、
ブロックパターン判定器11の処理を終了する。
FIG. 2 is a flow chart for explaining the process of the block pattern determiner 11. The block pattern determiner 11 first inputs the image size of the original image 50 and the encoded block size S, which are composed of the width size W and the height size H necessary for the initialization process (steps 101 and 102), and Entropy encoder 1
2 is initialized (step 103). Next, the pointers i and j are initialized (steps 104 and 105), and the blocks Bij are converted from the original image 50 in block units of S × S pixels according to the input coding block size S.
(Step 106), and input each block B
A pattern number is generated for ij (step 10
7), the pattern number value is the entropy encoder 12
(Step 108). In this embodiment, the pattern number correspondence table 31 shown in FIG. 1 is not used in the generation of the pattern number, and the S × S 2 of the block Bij is used.
The value of the bit string obtained by arranging the pixels arranged in one dimension in one dimension is generated as the pattern number value. Next, the pointer j is incremented by +1 (step 109), and j>
It is determined whether or not (W / S) (step 110). j>
If not (W / S), the process returns to step 106 and j>
If (W / S), the pointer i is incremented by +1. Next, it is determined whether i> (H / S) (step 112). If i> (H / S) is not satisfied, the procedure returns to step 105. If i> (H / S), that is, if the coding is completed for all pixels of the original image 50, the termination process of the entropy encoder 12 is performed. (Step 113),
The process of the block pattern determiner 11 ends.

【0020】図3は、エントロピー符号化器12の処理
のフローチャートであって、エントロピー符号化として
JBIGで採用されている算術符号化を用いた実施例で
ある。
FIG. 3 is a flow chart of the processing of the entropy encoder 12, which is an embodiment using the arithmetic encoding adopted in JBIG as the entropy encoding.

【0021】エントロピー符号化器12は、図3(a)
に示すように、カテゴリ符号化(ステップ201)とビ
ット符号化(ステップ202)を行う。
The entropy encoder 12 is shown in FIG.
As shown in, category coding (step 201) and bit coding (step 202) are performed.

【0022】カテゴリ符号化は、図3(b)に示すフロ
ーチャートで行われ、与えられたパターン番号の値を2
進数で表現するのに要するビット数を符号化するための
処理であり、表1に示すようにパターン番号値をカテゴ
リMと比較することによりパターン番号の値を2進数で
表現するのに要するビット数を求め、ビット数個のオン
ビット(1)と1個のオフビット(0)とした符号ビッ
トを算術符号化により符号化する。
The category coding is performed by the flow chart shown in FIG. 3B, and the value of the given pattern number is set to 2
This is a process for encoding the number of bits required to express in a binary number, and the bits required to express the value of the pattern number in a binary number by comparing the pattern number value with the category M as shown in Table 1. The number is obtained, and the code bits, which are the number of bits of on-bit (1) and one off-bit (0), are encoded by arithmetic encoding.

【0023】[0023]

【表1】 まず、処理に先立ち、カテゴリMの初期値および算術符
号化で用いられるテンプレートTの初期値を設定する
(ステップ301)。次に、パターン番号値Vとカテゴ
リ値Mを比較することにより、カテゴリ値M=2n
(n:ビット数)で表される2進数で表現するのに要す
るビット数がn以下か否かを判定する(ステップ30
2)。ステップ302の判定によりパターン番号値が、
カテゴリ値Mで表現されるビット数では表現できない場
合には、ビット“1”をテンプレートTにて算術符号化
する(ステップ303)。次に、カテゴリ値Mを左へ1
ビットシフト(M=M<<1=M*2)、つまりM=2
n+1 としてカテゴリ値Mを更新するとともに、テンプレ
ートTに1を加えテンプレート値も更新する(ステップ
304)。この後、この更新されたカテゴリ値Mとパタ
ーン番号値Vを比較するためにステップ302へ戻る。
ステップ302の判定によりパターン番号値Vが、カテ
ゴリ値Mで表現されるビット数で表現可能と判定された
場合には、ビット“0”をテンプレートTにて算術符号
化する(ステップ305)。
[Table 1] First, prior to the processing, the initial value of the category M and the initial value of the template T used in the arithmetic coding are set (step 301). Next, by comparing the pattern number value V and the category value M, the category value M = 2 n
It is determined whether or not the number of bits required to represent a binary number represented by (n: number of bits) is n or less (step 30).
2). The pattern number value is determined by the determination in step 302
If it cannot be represented by the number of bits represented by the category value M, the bit "1" is arithmetically encoded by the template T (step 303). Next, move the category value M to the left by 1.
Bit shift (M = M << 1 = M * 2), that is, M = 2
The category value M is updated as n + 1 , 1 is added to the template T, and the template value is also updated (step 304). Then, the process returns to step 302 to compare the updated category value M with the pattern number value V.
If it is determined in step 302 that the pattern number value V can be represented by the number of bits represented by the category value M, the bit "0" is arithmetically encoded by the template T (step 305).

【0024】以上により、復号化時は、ビット“0”が
算術復号化にて復号化されるまでの算術復号化によって
復号化されたビット“1”の数をカウントすることによ
り、パターン番号値Vを2進数で表現するのに要するビ
ット数を知ることができる。ビット符号化は、図3
(c)に示すフローチャートで行われ、パターン番号を
カテゴリ符号化で求められたビット数で算術符号化によ
り符号化する。
As described above, at the time of decoding, the pattern number value is obtained by counting the number of bits "1" decoded by arithmetic decoding until the bit "0" is decoded by arithmetic decoding. It is possible to know the number of bits required to express V in a binary number. Bit encoding is shown in FIG.
It is performed by the flowchart shown in (c), and the pattern number is encoded by arithmetic encoding with the number of bits obtained by category encoding.

【0025】まず、ビット符号化のときに用いる算術符
号化のテンプレート値Tを初期設定する(ステップ40
1)。次に、カテゴリ符号化(V)(図3(b))で求
められたカテゴリ値Mを1ビット右シフトする(ステッ
プ402)。これによりカテゴリ値M=M/2に更新さ
れる。次に、カテゴリ値Mが0と等しくなることによ
り、カテゴリ符号化で進められたパターン番号値Vを2
進数で表現するのに要するビット数の符号化を行ったこ
とが判定できる。したがって、ここでカテゴリ値Mと
“0”を比較する(ステップ403)。等しければ処理
を終了する。等しくなければ、カテゴリ値Mとパターン
番号値Vとの論理積(アンド)をとることによりパター
ン番号値Vの中の符号化対象のビット値Bitを求める
(ステップ404)。次に、符号化対象のビット値であ
るBitが“0”か“1”かを判定する(ステップ40
5)。ステップ405の判定により符号化対象のBit
が“0”の場合、ビット“0”を算術符号化により符号
化する(ステップ406)。符号化後ステップ402へ
戻る。ステップ405の判定により符号化対象のBit
が“1”の場合、ビット“1”を算術符号化により符号
化する(ステップ407)。符号化後ステップ402へ
戻る。
First, a template value T for arithmetic coding used for bit coding is initialized (step 40).
1). Next, the category value M obtained by the category coding (V) (FIG. 3B) is right-shifted by 1 bit (step 402). As a result, the category value is updated to M = M / 2. Next, by making the category value M equal to 0, the pattern number value V advanced in category coding is set to 2
It can be determined that the encoding of the number of bits required to express it in a base number is performed. Therefore, here, the category value M is compared with "0" (step 403). If they are equal, the processing ends. If they are not equal, the bit value Bit to be encoded in the pattern number value V is obtained by taking the logical product (AND) of the category value M and the pattern number value V (step 404). Next, it is determined whether Bit, which is the bit value to be encoded, is "0" or "1" (step 40).
5). Bit to be encoded according to the determination in step 405
Is 0, bit "0" is encoded by arithmetic encoding (step 406). After encoding, the process returns to step 402. Bit to be encoded according to the determination in step 405
If is "1", the bit "1" is encoded by arithmetic encoding (step 407). After encoding, the process returns to step 402.

【0026】図4は、ブロックパターン発生器22の処
理のフローチャートである。ブロックパターン発生器2
2は、まず初期化処理として必要な幅サイズWと高さサ
イズHからなる、原画像のイメージサイズと符号化ブロ
ックサイズSおよび復号化ブロックサイズDを入力する
とともに(ステップ501,502)、エントロピー復
号化器21の初期化を行う(ステップ503)。これに
より、復元画像の横ブロック数(W/S)および縦ブロ
ック数(H/S)が求められ、各々のブロックに対して
エントロピー復号化器21にパターン番号の復号化を要
求し(ステップ506)、得られたパターン番号をキー
として、符号化ブロックサイズSと復号化ブロックサイ
ズDが異なる場合は、復号化ブロックサイズDにより選
択されたパターン番号変換テーブル41を検索すること
によりD×Dからなる復元画素ブロックBijを発生し
順次出力し、復元画像70を生成する。符号化ブロック
サイズSと復号化ブロックサイズDが等しい場合は、ブ
ロックパターン判定器11の処理(図2)と逆の手順で
パターン番号の1次元に並べて得られたビット列の値を
ブロックBijのD×Dの2次元に配列に並べて得られ
たブロックBijを用いて復元画像70を生成する(ス
テップ504〜511)。全てのブロックに対する復号
化処理が終了した場合、エントロピー復号化器21の終
了処理を行い(ステップ512)、ブロックパターン発
生器22の処理を終了する。
FIG. 4 is a flowchart of the process of the block pattern generator 22. Block pattern generator 2
2 inputs the image size of the original image, the coding block size S, and the decoding block size D, which consist of the width size W and the height size H required for the initialization process (steps 501 and 502) and entropy. The decoder 21 is initialized (step 503). As a result, the number of horizontal blocks (W / S) and the number of vertical blocks (H / S) of the restored image are obtained, and the entropy decoder 21 is requested to decode the pattern number for each block (step 506). ), Using the obtained pattern number as a key, when the coding block size S and the decoding block size D are different, the pattern number conversion table 41 selected by the decoding block size D is searched to change from D × D. The restored pixel block Bij is generated and sequentially output to generate the restored image 70. When the encoding block size S and the decoding block size D are equal, the value of the bit string obtained by arranging in one dimension of the pattern number in the procedure reverse to the process of the block pattern determiner 11 (FIG. 2) is set to D of the block Bij. The restored image 70 is generated using the blocks Bij obtained by arranging in a two-dimensional array of × D (steps 504 to 511). When the decoding process for all blocks is completed, the entropy decoder 21 is terminated (step 512), and the process of the block pattern generator 22 is terminated.

【0027】図5はエントロピー復号化器21の処理の
フローチャートである。
FIG. 5 is a flowchart of the processing of the entropy decoder 21.

【0028】エントロピー符号化器12は、図5(a)
に示すように、カテゴリ復号化(ステップ601)とビ
ット復号化(ステップ602)を行う。
The entropy encoder 12 is shown in FIG.
As shown in, category decoding (step 601) and bit decoding (step 602) are performed.

【0029】カテゴリ復号化は、図5(b)に示すフロ
ーチャートで行われ、算術符号化により1ビット毎に復
号化し、復号化ビットとしてオフビット(0)が検出さ
れるまでのオンビット(1)の数によりエントロピー符
号化器12がパターン番号を符号化したビット数を求め
る。
The category decoding is performed according to the flow chart shown in FIG. 5 (b), decoding is performed bit by bit by arithmetic coding, and an on bit (1) until an off bit (0) is detected as a decoded bit. ), The entropy encoder 12 obtains the number of bits that code the pattern number.

【0030】まず、処理に先立ちカテゴリMの初期値お
よび算術符号化で用いられるテンプレートTの初期値を
設定する(ステップ701)。次に、テンプレートTに
より1ビット算術符号化により復号化し、復号化値をE
とする(ステップ702)。次に、ステップ702によ
る復号化値Eが“0”とは、符号化時にパターン番号V
を2進数で表現するのに要したビット数個の“1”を符
号化した後に、“0”を区切り記号として符号化してい
るため、Eが“0”となった場合、カテゴリ復号化が終
了したことを示している。したがって、Eと“0”を比
較する(ステップ703)。等しい場合は、カテゴリ復
号化処理を終了する。等しくなければ、ステップ702
による復号化値Eとして“1”が復号化された数だけM
を1ビットシフト(M=M<<1=M*2)としてカテ
ゴリ値を更新するとともに、次の算術復号化を行うため
のテンプレート値Tを更新し(ステップ704)、ステ
ップ702へ戻る。
First, prior to the processing, the initial value of the category M and the initial value of the template T used in arithmetic coding are set (step 701). Next, the template T is used for decoding by 1-bit arithmetic coding, and the decoded value is E
(Step 702). Next, when the decoded value E in step 702 is “0”, the pattern number V
Is encoded as a delimiter after encoding "1", which is the number of bits required to express B as a binary number, the category decoding is performed when E becomes "0". It has been finished. Therefore, E is compared with "0" (step 703). If they are equal, the category decoding process ends. If not, step 702
As many as the number "1" is decoded as the decoding value E by M
Is updated by 1 bit (M = M << 1 = M * 2) and the template value T for the next arithmetic decoding is updated (step 704), and the process returns to step 702.

【0031】ビット復号化は図5(c)に示すフローチ
ャートで行われ、カテゴリ復号化により求められた数の
ビットを算術符号化により復号化することによりパター
ン番号値を復号化する。
The bit decoding is performed by the flowchart shown in FIG. 5C, and the pattern number value is decoded by decoding the number of bits obtained by the category decoding by arithmetic coding.

【0032】まず、ビット復号化時に用いる算術符号化
のテンプレート値Tの初期設定を行うとともにパターン
番号値Vを0としてクリアする(ステップ801)。次
に、カテゴリ復号化(図5(b))で求められたカテゴ
リ値Mを1ビット右シフトする(ステップ802)。こ
れによりカテゴリ値M=M/2に更新される。カテゴリ
値Mが“0”となることで、パターン番号値Vを2進数
で表現するのに要したビット数分の復号化を行ったこと
が判定できる。したがって、ここで、カテゴリ値Mを
“0”と比較する(ステップ803)。等しければVの
値をパターン番号値として返却し、処理を終了する。カ
テゴリ値Mが“0”でなければ、ビット値として、ビッ
ト算術符号化により復号化しEに代入する(ステップ8
04)。次に、Eが“0”か否かを判定する(ステップ
805)。Eが“0”と等しい場合は、対象のビットを
パターン番号値Vに設定する必要がないため、ステップ
802へ戻る。ステップ805にてビット値が“1”の
場合、カテゴリ値Mが該当のビット位置を表しているた
め、パターン値Vとカテゴリ値Mの論理和(オア)をと
ることにより、パターン値Vの該当のビットを設定する
(ステップ806)。図6は符号化ブロックサイズSを
2として符号化した原画像50を復号化ブロックサイズ
Dを3として復号化処理を行い、原画像50の1.5倍
の復号画像70を復元する例を示す図である。
First, a template value T for arithmetic coding used during bit decoding is initialized and the pattern number value V is cleared to 0 (step 801). Next, the category value M obtained in the category decoding (FIG. 5B) is right-shifted by 1 bit (step 802). As a result, the category value is updated to M = M / 2. When the category value M becomes “0”, it can be determined that the decoding is performed by the number of bits required to express the pattern number value V in binary. Therefore, here, the category value M is compared with "0" (step 803). If they are equal, the value of V is returned as the pattern number value, and the process ends. If the category value M is not "0", the bit value is decoded by bit arithmetic coding and substituted into E (step 8).
04). Next, it is determined whether E is "0" (step 805). If E is equal to “0”, it is not necessary to set the target bit to the pattern number value V, and the process returns to step 802. If the bit value is "1" in step 805, the category value M represents the corresponding bit position, and therefore the logical sum (OR) of the pattern value V and the category value M is taken to find the corresponding pattern value V. Is set (step 806). FIG. 6 shows an example in which an original image 50 coded with a coding block size S of 2 is subjected to a decoding process with a decoding block size D of 3, and a decoded image 70 that is 1.5 times the original image 50 is restored. It is a figure.

【0033】本例では原画像50が2×2画素のブロッ
ク毎に符号化され、例として図6中の51で示した2×
2画素ブロックの符号化処理および復号化処理に着目し
てその処理の概要を説明する。
In this example, the original image 50 is coded for each block of 2 × 2 pixels, and as an example, 2 × shown by 51 in FIG.
Focusing on the encoding processing and the decoding processing of the 2-pixel block, the outline of the processing will be described.

【0034】図6中の2×2画素ブロック51に対して
ブロックパターン判定器11により、図6に示したパタ
ーン番号対応テーブルを用いて対応するパターン番号1
4が得られる。このパターン番号14をエントロピー符
号化器12により図3のフローチャートでエントロピー
符号化することによりエントロピー符号が得られ、符号
化される。
For the 2 × 2 pixel block 51 in FIG. 6, the block pattern determiner 11 uses the pattern number correspondence table shown in FIG.
4 is obtained. The pattern number 14 is entropy-encoded by the entropy encoder 12 in the flowchart of FIG. 3 to obtain an entropy code.

【0035】復号化時は、符号化されたエントロピー符
号をエントロピー復号化器21により図5のフローチャ
ートでエントロピー復号化することによりパターン番号
14が得られる。ブロックパターン発生器22は、図6
に示したパターン番号変換テーブルを用いることにより
パターン番号14に対応した3×3画素からなる復号化
ブロック71を得ることにより、復号化を行う。
At the time of decoding, the pattern number 14 is obtained by entropy decoding the encoded entropy code by the entropy decoder 21 in the flowchart of FIG. The block pattern generator 22 is shown in FIG.
Decoding is performed by using the pattern number conversion table shown in (1) to obtain the decoding block 71 composed of 3 × 3 pixels corresponding to the pattern number 14.

【0036】このような処理を各ブロックに施すことで
図6の原画像50は復号化画像70に復元される。
By subjecting each block to such processing, the original image 50 of FIG. 6 is restored to the decoded image 70.

【0037】以上に示したように、図6は図示したパタ
ーン番号変換テーブルを用いることで原画像50の画像
サイズとは異なる1.5倍の復号画像70を復元した例
であり、同様に任意のパターン番号変換テーブルを用い
ることでパターン番号変換テーブルに応じた倍率での復
号画像を復元できる。
As shown above, FIG. 6 shows an example in which the decoded image 70 of 1.5 times different from the image size of the original image 50 is restored by using the pattern number conversion table shown in the figure. By using the pattern number conversion table of, the decoded image at the magnification corresponding to the pattern number conversion table can be restored.

【0038】[0038]

【発明の効果】以上説明したように本発明は、ブロック
単位での符号化を用い、符号化時のブロックサイズと復
号化時のブロックサイズを任意に選択可能とし、符号化
ブロックサイズと復号化ブロックサイズの比の画像サイ
ズで復元画像を生成することにより、復号化ブロックサ
イズを指定することで目的の画像出力装置の画像サイズ
や表示および印刷方式の復元画像を、原画像の画像サイ
ズに依存しない任意の画像サイズで生成できる効果があ
る。
As described above, according to the present invention, the block size at the time of coding and the block size at the time of decoding can be arbitrarily selected by using the coding on a block-by-block basis. By generating a restored image with an image size that is a ratio of the block size, by specifying the decoding block size, the image size of the target image output device and the restored image of the display and printing method depend on the image size of the original image. There is an effect that it can be generated with any image size.

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

【図1】本発明の一実施例画像符号化・復号化器の構成
図である。
FIG. 1 is a configuration diagram of an image encoder / decoder according to an embodiment of the present invention.

【図2】図1の実施例におけるブロックパターン判定器
11の処理のフローチャートである。
FIG. 2 is a flowchart of processing of a block pattern determiner 11 in the embodiment of FIG.

【図3】図1の実施例におけるエントロピー符号化器1
2の処理のフローチャートである。
3 is an entropy encoder 1 in the embodiment of FIG.
It is a flowchart of the process of 2.

【図4】図1の実施例におけるエントロピー復号化器2
1の処理のフローチャートである。
4 is an entropy decoder 2 in the embodiment of FIG.
It is a flowchart of the process of 1.

【図5】図1の実施例におけるブロックパターン生成器
22の処理のフローチャートである。
5 is a flowchart of a process of a block pattern generator 22 in the embodiment of FIG.

【図6】図1の実施例の動作例を説明する説明図であ
る。
FIG. 6 is an explanatory diagram illustrating an operation example of the embodiment of FIG.

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

10 符号化器 11 ブロックパターン判定器 12 エントロピー符号化器 20 復号化器 21 エントロピー復号化器 22 ブロックパターン発生器 30 パターン番号対応テーブル蓄積装置 31 パターン番号対応テーブル 40 パターン番号変換テーブル蓄積装置 41 パターン番号変換テーブル 50 原画像 51 2×2画素ブロック 61,62 符号化データ蓄積装置 70 復元画像 71 3×3画素復号化ブロック S 符号化ブロックサイズ D 復号化ブロックサイズ 10 Encoder 11 Block Pattern Determinator 12 Entropy Encoder 20 Decoder 21 Entropy Decoder 22 Block Pattern Generator 30 Pattern Number Correspondence Table Storage Device 31 Pattern Number Correspondence Table 40 Pattern Number Conversion Table Storage Device 41 Pattern Number Conversion table 50 Original image 51 2 × 2 pixel block 61, 62 Encoded data storage device 70 Restored image 71 3 × 3 pixel decoding block S Encoding block size D Decoding block size

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 画像データを入力する第1の手段と、 符号化ブロックサイズM*Nの各符号化ブロックと、こ
れと対応するパターン番号からなるパターン番号対応テ
ーブルを有し、第1の手段で入力された画像データから
順次符号化ブロックサイズM*Nで符号化ブロックを切
り出し、前記パターン番号対応テーブを参照して該符号
化ブロックと対応するパターン番号を該符号化ブロック
の値として符号化する第2の手段と、 該符号化ブロックサイズM*Nと各符号化ブロックに対
応するパターン番号を送信する第3の手段を有する画像
符号化器。
1. A first means for inputting image data, a pattern number correspondence table comprising each coding block of a coding block size M * N and a pattern number corresponding to the coding block, the first means. A coded block is sequentially cut out with a coded block size M * N from the image data input by, and a pattern number corresponding to the coded block is coded as a value of the coded block with reference to the pattern number corresponding table. An image encoder having a second means for performing the above, and a third means for transmitting the coded block size M * N and a pattern number corresponding to each coded block.
【請求項2】 請求項1記載の画像符号化器から符号化
ブロックサイズM*Nと符号化パターン番号列を受信す
る第1の手段と、 前記符号化ブロックサイズM*Nでの各パターン番号に
対応する復号化ブロックサイズJ*Kでのパターン番号
と復号化ブロックからなるパターン番号変換テーブルを
有し、前記符号化パターン番号列の各パターン番号に対
応する前記パターン番号変換テーブルのパターン番号を
求め、前記パターン番号変換テーブルを参照して該パタ
ーン番号に対応する復号化ブロックを用いて前記画像デ
ータを復号化する第2の手段を有する画像復号化器。
2. A first means for receiving a coded block size M * N and a coded pattern number sequence from the image encoder according to claim 1, and each pattern number in the coded block size M * N. Has a pattern number conversion table composed of a pattern number in the decoding block size J * K and a decoding block corresponding to, and the pattern number of the pattern number conversion table corresponding to each pattern number of the encoded pattern number sequence An image decoder having a second means for obtaining the image data, referring to the pattern number conversion table, and using the decoding block corresponding to the pattern number.
【請求項3】 前記第2の手段は、前記パターン番号対
応テーブルを前記符号化ブロックサイズM*Nと前記復
号化ブロックサイズJ*Kの組み合わせの種類分有する
請求項1記載の画像符号化器。
3. The image encoder according to claim 1, wherein the second means has the pattern number correspondence tables for the types of combinations of the coding block size M * N and the decoding block size J * K. .
【請求項4】 前記第2の手段は、前記パターン番号変
換テーブルを前記符号化ブロックサイズM*Nと前記復
号化ブロックサイズJ*Kの組み合わせの種類分有する
請求項2記載の画像復号化器。
4. The image decoder according to claim 2, wherein the second means has the pattern number conversion tables for the types of combinations of the coding block size M * N and the decoding block size J * K. .
【請求項5】 前記第2の手段はエントロピー符号化に
よりパターン番号を符号化するように構成されている請
求項1または3項記載の画像符号化器。
5. The image encoder according to claim 1, wherein the second means is configured to encode the pattern number by entropy coding.
【請求項6】 前記第2の手段はエントロピー復号化に
よりパターン番号を復号化するように構成されている請
求項2または4記載の画像復号化器。
6. The image decoder according to claim 2, wherein the second means is configured to decode the pattern number by entropy decoding.
【請求項7】 前記画像として白黒画像を扱う請求項
1,3,5いずれか1項記載の画像符号化器。
7. The image encoder according to claim 1, wherein a black and white image is treated as the image.
【請求項8】 前記画像として白黒画像を扱う請求項
2.4.6のいずれか1項記載の画像復号化器。
8. The image decoder according to any one of claims 2.4.6, wherein a black and white image is treated as the image.
【請求項9】 前記画像として白黒の中間調画像を扱う
請求項1,3,5のいずれか1項記載の画像符号化器。
9. The image encoder according to claim 1, wherein a black and white halftone image is treated as the image.
【請求項10】 前記画像として白黒の中間調画像を扱
う請求項2,4.6のいずれか1項記載の画像復号化
器。
10. The image decoder according to claim 2, wherein a black and white halftone image is used as the image.
【請求項11】 前記符号化ブロックサイズM*NのM
とNが等しい請求項1,3,5のいずれか1項記載の画
像符号化器。
11. M of the coding block size M * N
The image encoder according to claim 1, wherein N and N are equal.
【請求項12】 前記復号化ブロックサイズJ*KのJ
とKが等しい請求項2,4,6のいずれか1項記載の画
像復号化器。
12. The J of the decoding block size J * K
7. The image decoder according to claim 2, wherein K and K are equal.
JP30189194A 1994-12-06 1994-12-06 Picture encoder and picture decoder Pending JPH08163376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30189194A JPH08163376A (en) 1994-12-06 1994-12-06 Picture encoder and picture decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30189194A JPH08163376A (en) 1994-12-06 1994-12-06 Picture encoder and picture decoder

Publications (1)

Publication Number Publication Date
JPH08163376A true JPH08163376A (en) 1996-06-21

Family

ID=17902382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30189194A Pending JPH08163376A (en) 1994-12-06 1994-12-06 Picture encoder and picture decoder

Country Status (1)

Country Link
JP (1) JPH08163376A (en)

Similar Documents

Publication Publication Date Title
US5442458A (en) Method and associated apparatus for encoding bitplanes for improved coding efficiency
JP3978478B2 (en) Apparatus and method for performing fixed-speed block-unit image compression with estimated pixel values
CN1155221C (en) Method and system for encoding and decoding method and system
JPH0793586B2 (en) Data compression model selection method and system
JP3631256B2 (en) Tree-coded lossless image compression
JP2006121718A (en) Method of encoding picture data and apparatus therefor
Alzina et al. 2D-pattern matching image and video compression: Theory, algorithms, and experiments
JPH04144485A (en) Image processor
JP2511158B2 (en) Image compression device
JP2007306513A (en) Method and device for image data compression
JP2824910B2 (en) How to combine data into an image
JPH08163376A (en) Picture encoder and picture decoder
JP2000217003A (en) Coding system and decoding system
JPH05260311A (en) Method for expanding compressed image data
JP3084187B2 (en) Binary image encoding device and binary image decoding device
KR100495001B1 (en) Image compression encoding method and system
JP2513654B2 (en) Image coding device
Xavier Statistical Theory of Communication
JPH10262249A (en) Expansion method and device for image compression data
JP3146092B2 (en) Encoding device and decoding device
JPH08331389A (en) Image coding method and device therefor
JP3732329B2 (en) Pseudo halftone image encoding apparatus and encoding method
JP2002199226A (en) Image data compression device and image data compression method
Memon et al. Ordering color maps for lossless compression
JPH1075445A (en) Shape information coder and shape information decoder