JPH0575874A - Binary data encoding method and decoding method - Google Patents

Binary data encoding method and decoding method

Info

Publication number
JPH0575874A
JPH0575874A JP23490791A JP23490791A JPH0575874A JP H0575874 A JPH0575874 A JP H0575874A JP 23490791 A JP23490791 A JP 23490791A JP 23490791 A JP23490791 A JP 23490791A JP H0575874 A JPH0575874 A JP H0575874A
Authority
JP
Japan
Prior art keywords
symbol
binary data
code
appearance probability
symbol 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.)
Withdrawn
Application number
JP23490791A
Other languages
Japanese (ja)
Inventor
Nobuhito Matsushiro
信人 松代
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP23490791A priority Critical patent/JPH0575874A/en
Publication of JPH0575874A publication Critical patent/JPH0575874A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide a binary data encoding method compressing document pictures including characters/graphics with high efficiency and the decoding method in a FAX, etc. CONSTITUTION:The symbol pattern of a symbol group to be encoded is limited by a symbol pattern limitation means 1 by using advance knowledge of the symbol pattern. In a symbol occurrence probability estimation means 2, the occurrence probability of the symbol is estimated from the symbol pattern limited by the means 1. In a code arithmetic means 3, a mapping is performed for the limited symbol pattern in a code space according to the occurrence probability of the symbol estimated by the means 2 and the value.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ファクシミリ装置(F
AX)等において、文字・図形等を含む文書画像から読
取った2値データ系列を圧縮したり、あるいはその圧縮
データを復号するための算術符号化法を用いた2値デー
タ符号化方法及びその復号化方法に関するものである。
BACKGROUND OF THE INVENTION The present invention relates to a facsimile machine (F
AX), etc., a binary data encoding method using an arithmetic encoding method for compressing a binary data series read from a document image including characters, figures, etc., or decoding the compressed data, and decoding thereof. It relates to the method of conversion.

【0002】[0002]

【従来の技術】従来、このような分野の技術としては、
例えば次のような文献に記載されるものがあった。 文献;IBM J.RES.DEVELOP、32
[6](1988−11)(米)R.B.Arps等
“ア マルチ−パーパス ブイエルエスアイチップフォ
ア アダプティブ データ コンプレッション オブバ
イレベル イメージズ(A multi-purpose VLSI chip fo
r adaptive data compression of bilevel image)”
P.775−795 前記文献には、算術符号化法を用いて2値データ系列を
圧縮する2値データ符号化方法の技術が記載されてい
る。この2値データ符号化方法では、次のような符号化
アルゴリズムにより、2値データ系列を符号化する。
2. Description of the Related Art Conventionally, as a technique in such a field,
For example, some documents were described in the following documents. Reference; IBM J. RES. DEVELOP,32
[6] (1988-11) (US) R.A. B. Arps etc.
"A Multi-purpose Buyer SII Chip Fo
Adaptive Data Compression Observer
E-level Images (A multi-purpose VLSI chip fo
r adaptive data compression of bilevel image) ”
P. 775-795 The above-mentioned document describes a binary data sequence using an arithmetic coding method.
The technique of the binary data encoding method to compress is described.
It In this binary data encoding method, the following encoding is performed.
An algorithm encodes a binary data sequence.

【0003】例えば、2値情報源から発生される長さN
のシンボル系列SN=s1 2 …sN (si =0,1)
を考える。情報源の2個のシンボルのうち、劣勢シンボ
ル(シンボル出現確率が低い方のシンボル)LSの出現
確率をPL 、優勢シンボルMSの出現確率をPM とす
る。また、符号をC、符号空間長をAとする。先ず、次
式(1)のように初期化する。 C(λ)=0 (λ;空系列) A(λ)=1 ・・・(1) そして、以下の処理により、シンボル系列SN の符号化
を行う。
For example, a length N generated from a binary information source.
Symbol sequence S N = s 1 s 2 ... s N (s i = 0,1)
think of. Of the two symbols of the information source, the appearance probability of the inferior symbol (the symbol having a lower symbol appearance probability) LS is P L , and the appearance probability of the superior symbol MS is P M. The code is C and the code space length is A. First, initialization is performed according to the following expression (1). C (λ) = 0 (λ; empty sequence) A (λ) = 1 (1) Then, the symbol sequence S N is encoded by the following processing.

【0004】現在、i−1番目までのシンボルが処理さ
れ、シンボル系列Si-1 =s1 2 …si-1 に対して、
C(Si-1 ),A(Si-1 )が与えられているとすれ
ば、次のシンボルsi を符号化した後のC(Si ),A
(Si )は次式(2),(3)で決定される。
Currently, up to the i-1th symbol is processed, and for the symbol sequence S i-1 = s 1 s 2 ... s i-1 ,
If C (S i-1 ) and A (S i-1 ) are given, then C (S i ), A after encoding the next symbol s i
(S i ) is determined by the following equations (2) and (3).

【0005】[0005]

【数1】 [Equation 1]

【0006】Aの値は、0.75≦A≦1.5を満足す
るように左シフトすることとしている。これと同時に、
Cレジスタ(符号レジスタ)もAレジスタ(符号空間長
レジスタ)をシフトした回数だけ左シフトしなければな
らない。これを再正規化(有限長のレジスタで浮動小数
点演算を実現すること)と呼ぶ。その後、Cレジスタの
値がシフトアウトされ、オーバフローして出ていったも
のが符号出力となる。
The value of A is left-shifted so as to satisfy 0.75≤A≤1.5. At the same time,
The C register (code register) must also be left-shifted by the number of times the A register (code space length register) is shifted. This is called renormalization (implementing floating-point arithmetic with a finite length register). After that, the value of the C register is shifted out, and the value that overflows and is output becomes the code output.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、従来の
方法では、次のような課題があった。算術符号化法を用
いた2値データ符号化方法では、符号化されるシンボル
系列が数直線[0,1)区間の座標値に写像(マッピン
グ)される。従来の方法では、すべての可能な2値シン
ボル系列がこの数直線[0,1)区間上に1対1にマッ
ピングされる。つまり、従来の方法では、すべての可能
な2値シンボル系列に対し、符号空間が割当てられてい
る。ところが、多くの場合、可能なシンボルパターンが
すべて使用されるわけではない。
However, the conventional method has the following problems. In the binary data coding method using the arithmetic coding method, the coded symbol sequence is mapped to the coordinate values of the number line [0, 1) section. In the conventional method, all possible binary symbol sequences are mapped one-to-one on this number line [0,1) interval. That is, in the conventional method, the code space is assigned to all possible binary symbol sequences. However, in many cases not all possible symbol patterns are used.

【0008】従来の方法では、使用されないシンボルパ
ターンに対しても、符号空間が割当てられているのであ
るから、符号空間にむだが存在し、符号化限界が低くな
って圧縮率が低下するという問題がある。そのため、文
書画像データの蓄積におけるメモリ容量の増大、及び伝
送における伝送時間の長時間化という弊害が生じ、それ
を解決することが困難であった。
In the conventional method, since the code space is allocated to the unused symbol patterns, there is waste in the code space, the coding limit is lowered, and the compression rate is lowered. There is. As a result, the memory capacity for storing the document image data is increased, and the transmission time is extended for transmission, which is difficult to solve.

【0009】本発明は、前記従来技術が持っていた課題
として、符号化限界が低くなって圧縮率が低下するとい
う点について解決した2値データ符号化方法とそれを利
用した復号化方法を提供するものである。
The present invention provides a binary data coding method and a decoding method using the same, which solves the problem that the coding limit is lowered and the compression rate is lowered, as a problem that the above-mentioned conventional technique has. To do.

【0010】[0010]

【課題を解決するための手段】算術符号化法では、符号
化されるシンボル系列が数直線[0,1)区間の座標値
にマッピングされる。従来の2値データ符号化方法で
は、すべての可能な2値シンボル系列がこの数直線
[0,1)区間上に1対1にマッピングされるが、多く
の場合、可能なシンボルパターンがすべて使用されるわ
けではない。
In the arithmetic coding method, a symbol series to be coded is mapped to coordinate values of a number line [0, 1) section. In the conventional binary data coding method, all possible binary symbol sequences are mapped one-to-one on this number line [0,1) interval, but in many cases all possible symbol patterns are used. It is not done.

【0011】そこで、第1の発明の2値データ符号化方
法では、シンボルパターン制限手段により、シンボルパ
ターンに関する事前の知識を用いて前記符号化するシン
ボル系列のシンボルパターンを制限し、シンボル出現確
率推定手段により、前記シンボルパターン制限手段で制
限されたシンボルパターンからシンボルの出現確率を推
定する。その後、符号演算手段により、前記シンボル出
現確率推定手段で推定されたシンボルの出現確率及びそ
の値に応じて、前記制限されたシンボルパターンを数直
線[0,1)区間にマッピングしている。
Therefore, in the binary data encoding method of the first invention, the symbol pattern limiting means limits the symbol pattern of the symbol sequence to be encoded by using the prior knowledge about the symbol pattern, and estimates the symbol appearance probability. The means estimates the symbol appearance probability from the symbol pattern limited by the symbol pattern limiting means. Thereafter, the code calculation means maps the restricted symbol pattern to the number line [0, 1) section according to the symbol appearance probability estimated by the symbol appearance probability estimation means and its value.

【0012】また、第2の発明の2値データ復号化方法
では、第1の発明の2値データ符号化方法で符号化され
たデータから、シンボルの出現確率を推定した後、前記
シンボルの出現確率及びその値に応じて、前記符号演算
手段の逆演算を行って前記2値データ系列の復号を行う
ようにしている。
In the binary data decoding method of the second invention, the appearance probability of the symbol is estimated from the data encoded by the binary data encoding method of the first invention, and then the appearance of the symbol is estimated. The binary data series is decoded by performing the inverse operation of the code operation means according to the probability and its value.

【0013】[0013]

【作用】第1の発明によれば、事前に符号化対象に関す
る知識がある場合、シンボルパターン制限手段により、
シンボル系列が取り得るパターンを制限し、シンボル出
現確率推定手段へ送る。シンボル出現確率推定手段で
は、シンボルパターン制限手段で制限されたシンボルパ
ターンからシンボルの出現確率を推定し、符号演算手段
へ送る。符号演算手段では、推定されたシンボルの出現
確率及びその値に応じて、制限されたシンボルパターン
をマッピングする。
According to the first aspect of the present invention, when there is knowledge about the object to be encoded in advance, the symbol pattern limiting means allows
The patterns that the symbol sequence can take are limited and sent to the symbol appearance probability estimation means. The symbol appearance probability estimating means estimates the symbol appearance probability from the symbol pattern limited by the symbol pattern limiting means, and sends it to the code calculating means. The code calculation means maps the restricted symbol pattern according to the estimated symbol appearance probability and its value.

【0014】このように、シンボル系列が取り得るパタ
ーンが制限され、その制限により、シンボルパターンが
マッピングされる符号空間(数直線区間)のスケールが
小さくなり、符号の小数点以下の桁数が少なくなる。そ
のため、符号化限界が高くなって圧縮率の向上が図れ
る。従って、前記課題を解決できるのである。
As described above, the patterns that can be taken by the symbol series are limited, and due to the limitation, the scale of the code space (numerical straight line section) in which the symbol patterns are mapped is reduced, and the number of digits below the decimal point of the code is reduced. .. Therefore, the encoding limit is increased and the compression rate can be improved. Therefore, the above problem can be solved.

【0015】また、第2の発明によれば、第1の発明の
2値データ符号化方法で符号化されたデータを入力し、
シンボルの出現確率を推定した後、第1の発明の符号演
算手段の逆演算を行って2値データ系列の復号を行う。
これにより、圧縮されたデータの的確な復号が行える。
Further, according to the second invention, the data coded by the binary data coding method of the first invention is inputted,
After estimating the symbol appearance probability, the inverse operation of the code operation means of the first invention is performed to decode the binary data series.
This enables accurate decoding of the compressed data.

【0016】[0016]

【実施例】本実施例の2値データ符号化方法の特徴は、
例えば文字・図形を対象とし、その文字・図形において
通常出現し得るシンボルパターンにのみ符号空間を割当
て、その符号空間内で算術符号化処理を行うことによ
り、符号化限界を従来の符号化方法よりも高め、例え
ば、FAX等で大半を占める文字・図形のみを含む文書
画像等を高能率に圧縮することである。さらに、このよ
うな符号化方法の逆演算処理等を行うことにより、2値
データ系列を的確に復号化する。
EXAMPLE The features of the binary data encoding method of this example are as follows.
For example, targeting characters / figures, assigning a code space only to the symbol patterns that can usually appear in the characters / figures, and performing arithmetic coding processing within that code space, the coding limit can be reduced from that of the conventional coding method. For example, it is possible to efficiently compress a document image or the like that includes only characters and figures that occupy most of FAX and the like. Further, the binary data series is accurately decoded by performing the inverse operation processing of such an encoding method.

【0017】即ち、本実施例の2値データ符号化方法で
は、次式(4),(5)の符号演算式の代わりに、
That is, in the binary data encoding method of this embodiment, instead of the code arithmetic expressions of the following expressions (4) and (5),

【0018】[0018]

【数2】 [Equation 2]

【0019】次の(6),(7)式の符号演算式を用い
る。
The following code operation expressions (6) and (7) are used.

【0020】[0020]

【数3】 [Equation 3]

【0021】この符号演算式(6),(7)では、符号
空間長Aが縮小する割合が従来方法の(4),(5)式
よりも小さく、符号の小数点以下の桁数が従来方法より
も少なくなって符号長が短くなる。また、本実施例の符
号演算式によって構成された符号が、本実施例の2値デ
ータ復号化方法によって一意に復号される。このこと
は、後述するシンボルパターンの制約条件から保証され
る。以下、第1の実施例で2値データ符号化方法、第2
の実施例で2値データ復号化方法について詳細に説明す
る。
In the code arithmetic expressions (6) and (7), the rate of reduction of the code space length A is smaller than that of the conventional methods (4) and (5), and the number of digits after the decimal point of the code is the conventional method. And the code length becomes shorter. Further, the code formed by the code arithmetic expression of this embodiment is uniquely decoded by the binary data decoding method of this embodiment. This is guaranteed from the constraint condition of the symbol pattern described later. Hereinafter, the binary data encoding method according to the first embodiment will be described.
The binary data decoding method will be described in detail in the following embodiment.

【0022】第1の実施例 図1は、本発明の第1の実施例を示す2値データ符号化
方法を実施するための符号化器の機能ブロック図であ
る。なお、以下の説明で使用している記号は、従来技術
の説明で使用しているものと同じである。
First Embodiment FIG. 1 is a functional block diagram of an encoder for carrying out a binary data encoding method showing a first embodiment of the present invention. The symbols used in the following description are the same as those used in the description of the prior art.

【0023】この符号化器は、集積回路等を用いた個別
回路、あるいはコンピュータやディジタル・シグナル・
プロセッサ(DSP)等のプログラム制御により構成さ
れるもので、シンボル入力から符号化対象となるシンボ
ル系列のシンボルパターンを制限するシンボルパターン
制限手段1を有している。シンボルパターン制御手段1
の出力側には、シンボル出現確率推定手段2及び符号演
算手段3が接続されている。シンボル出現確率推定手段
2は、シンボルパターン制限手段1で制限されたシンボ
ルパターンからシンボルの出現確率を推定し、その推定
結果を符号演算手段3及びA値計算手段(符号空間長計
算手段)4へ与える機能を有している。符号演算手段3
は、シンボル出現確率推定手段2で推定されたシンボル
の出現確率及びその値に応じて、制限されたシンボルパ
ターンを数直線[0,1)区間にマッピングする機能を
有している。
This encoder may be an individual circuit using an integrated circuit or the like, or a computer or a digital signal
It is constituted by program control of a processor (DSP) or the like, and has a symbol pattern limiting means 1 for limiting the symbol pattern of a symbol sequence to be encoded from symbol input. Symbol pattern control means 1
The symbol appearance probability estimating means 2 and the code calculating means 3 are connected to the output side of the. The symbol appearance probability estimating means 2 estimates the appearance probability of a symbol from the symbol pattern limited by the symbol pattern limiting means 1 and sends the estimation result to the code calculating means 3 and the A value calculating means (code space length calculating means) 4. It has the function of giving. Sign calculation means 3
Has a function of mapping the restricted symbol pattern to the number line [0, 1) section according to the symbol appearance probability and its value estimated by the symbol appearance probability estimating means 2.

【0024】符号演算手段3の出力側には、符号出力を
行うCレジスタ(符号レジスタ)5が接続され、さらに
A値計算手段4の出力側に、Aレジスタ(符号空間長レ
ジスタ)6を介して比較演算手段7が接続されている。
比較演算手段7は、Aレジスタ6の値が比較値(例え
ば、0.5)よりも小さいか否かを判定する機能を有し
ている。シンボルパターン制限手段1の出力側には、
‘1’シンボルに続いて出現した‘0’シンボル数をカ
ウントする‘0’シンボルカウンタ(SC0)8と、
‘0’シンボルに続いて出現した‘1’シンボル数をカ
ウントする‘1’シンボルカウンタ(SC1)9とが接
続されている。
A C register (code register) 5 for outputting a code is connected to the output side of the code calculation means 3, and an A register (code space length register) 6 is connected to the output side of the A value calculation means 4. The comparison calculation means 7 is connected.
The comparison calculation means 7 has a function of determining whether or not the value of the A register 6 is smaller than the comparison value (for example, 0.5). On the output side of the symbol pattern limiting means 1,
A "0" symbol counter (SC0) 8 that counts the number of "0" symbols that appear after the "1" symbol,
It is connected to a "1" symbol counter (SC1) 9 that counts the number of "1" symbols that appear after the "0" symbol.

【0025】比較演算手段7、‘0’シンボルカウンタ
8、及び‘1’シンボルカウンタ9の出力側は、制御手
段10に接続されている。制御手段10は、後述する符
号化処理フローのシーケンスに従い、複数の制御線10
aを介して各機能手段1〜9を制御する機能を有してい
る。
The output sides of the comparison operation means 7, the “0” symbol counter 8 and the “1” symbol counter 9 are connected to the control means 10. The control means 10 follows the sequence of the encoding processing flow described later, and controls the plurality of control lines 10.
It has a function of controlling each functional means 1 to 9 via a.

【0026】次に、図1の概略の動作を説明する。符号
化対象となるシンボル系列がシンボルパターン制限手段
1に入力されると、該シンボルパターン制限手段1で
は、次のように、走査線方向に独立して存在する‘1’
シンボル(ノッチ)を除去し、その除去後のデータをシ
ンボル出現確率推定手段2、符号演算手段3、‘0’シ
ンボルカウンタ8、及び‘1’シンボルカウンタ9へ送
る。 …si-1 i-1 i i+1 … …0 0 1 0 0 … → 0 0 0 0 0 … シンボル出現確率推定手段2では、符号化を行おうとし
ている2値シンボルsi (1≦i≦N、N;シンボル
数)より以前に出現したシンボルs1 2 …si- 1
ら、シンボルsiが‘0’シンボルである確率P
(0)、‘1’である確率P(1)を求める。但し、s
i-1 =0,si =1となる可能性のある場合、si- 1
1となる確率P(si-1 =1)は、P(si-1 =1)≦
1/2を満たすように推定する。このような推定結果
は、A値計算手段4、及び符号演算手段3へ送られる。
Next, the general operation of FIG. 1 will be described. When the symbol sequence to be coded is input to the symbol pattern limiting means 1, the symbol pattern limiting means 1 independently exists in the scanning line direction as follows, "1".
The symbol (notch) is removed, and the data after the removal is sent to the symbol appearance probability estimation means 2, the code calculation means 3, the “0” symbol counter 8, and the “1” symbol counter 9. ... s i-1 s i-1 s i s i + 1 ... 0 0 1 0 0 ... → 0 0 0 0 0 0 ... In the symbol appearance probability estimation means 2, the binary symbol s i which is going to be encoded. The probability P that the symbol s i is a “0” symbol from the symbols s 1 s 2 ... s i− 1 that appear before (1 ≦ i ≦ N, N; the number of symbols).
The probability P (1) of (0) and '1' is obtained. However, s
If i-1 = 0 and s i = 1 are possible, s i- 1 =
The probability P (s i-1 = 1) of 1 is P (s i-1 = 1) ≦
Estimate to satisfy 1/2. Such an estimation result is sent to the A value calculation means 4 and the sign calculation means 3.

【0027】A値計算手段4では、符号化するシンボル
i の値に応じて、符号空間の大きさA(si )を次式
(8)のように計算する。 A(Si )=P(1) (si =1の場合) A(Si )=A(Si-1 )−P(1)/2 (si =1の場合) ・・・(8) 計算された符号空間の大きさA(Si )は、Aレジスタ
6に一時格納された後、A値計算手段4へフィードバッ
ク入力されると共に、比較演算手段7へ送られる。
The A value calculating means 4 calculates the size A (s i ) of the code space according to the following expression (8) according to the value of the symbol s i to be encoded. A (S i ) = P (1) (when s i = 1) A (S i ) = A (S i-1 ) −P (1) / 2 (when s i = 1) ... ( 8) The calculated code space size A (S i ) is temporarily stored in the A register 6 and then fed back to the A value calculation means 4 and sent to the comparison calculation means 7.

【0028】シンボル出現確率推定手段2の推定結果を
入力した符号演算手段3では、シンボルの値si の値に
応じて、次式(9)の符号演算を行う。 C(Si )=C(Si-1 ) (si =1の場合) C(Si )=C(Si-1 )+P(1)/2 (si =0の場合) ・・・(9) この演算結果は、Cレジスタ5に一時格納された後、順
次更新されて最終的に符号化データとして出力される。
The sign calculation means 3 which has input the estimation result of the symbol appearance probability estimation means 2 performs the sign calculation of the following expression (9) according to the value of the symbol value s i . C (S i ) = C (S i-1 ) (when s i = 1) C (S i ) = C (S i-1 ) + P (1) / 2 (when s i = 0) (9) The calculation result is temporarily stored in the C register 5, then sequentially updated, and finally output as encoded data.

【0029】Aレジスタ6の値が比較演算手段7へ送ら
れると、該比較演算手段7では、符号空間長Aの値がA
≦0.5であるか否かを判定し、その判定結果を制御手
段10へ送る。制御手段10では、比較演算手段7、
‘0’シンボルカウンタ8、及び‘1’シンボルカウン
タ9の値を入力し、所定の符号化処理フローのシーケン
スに従い、各機能手段を制御し、Cレジスタ5から符号
化データを出力させる。図2(a),(b)は、図1の
符号化器を用いた本実施例の2値データ符号化方法を説
明するための符号化処理フローであり、この図を参照し
つつ、符号化処理手順(1)〜(7)を説明する。
When the value of the A register 6 is sent to the comparison calculation means 7, the comparison calculation means 7 changes the value of the code space length A to A.
It is determined whether ≦ 0.5, and the determination result is sent to the control means 10. In the control means 10, the comparison calculation means 7,
The values of the "0" symbol counter 8 and the "1" symbol counter 9 are input, each functional means is controlled in accordance with a sequence of a predetermined encoding processing flow, and encoded data is output from the C register 5. FIGS. 2A and 2B are encoding processing flows for explaining the binary data encoding method of the present embodiment using the encoder of FIG. 1. The encoding processing will be described with reference to this figure. The processing procedure (1) to (7) will be described.

【0030】(1)ステップ1(処理101〜103) 初期化処理を行うため、図1(a)の処理101でシン
ボル番号iを1に設定し、処理102で、符号空間長A
を1、符号Cを0に設定する。さらに、処理103で、
‘0’シンボルカウンタ(SC0)8の値を0に設定す
る。
(1) Step 1 (Processes 101 to 103) In order to perform the initialization process, the symbol number i is set to 1 in the process 101 of FIG. 1A, and the code space length A is set in the process 102.
Is set to 1, and the code C is set to 0. Further, in process 103,
The value of the '0' symbol counter (SC0) 8 is set to 0.

【0031】(2)ステップ2(処理104,105) シンボルパターン制限処理を行うため、シンボルパター
ン制限手段1では、処理104で、Si-1 =0、Si
1、かつSi+1 =0か否かを判定し、イエスのときには
シンボルSi を0にする。
(2) Step 2 (Processes 104 and 105) In order to perform the symbol pattern restriction process, the symbol pattern restriction means 1 uses S i-1 = 0 and S i = in the process 104.
It is determined whether 1 and S i + 1 = 0, and if YES, the symbol S i is set to 0.

【0032】(3)ステップ3(処理106) シンボル出現確率を求めるため、シンボル出現確率推定
手段2では、処理106においてシンボルSi が0とな
る確率P(0)、及び1となる確率P(1)を求める。
(3) Step 3 (Processing 106) In order to obtain the symbol appearance probability, the symbol appearance probability estimating means 2 has a probability P (0) that the symbol S i becomes 0 and a probability P (that becomes 1 in the process 106. 1) is asked.

【0033】(4)ステップ4(処理107〜112) このステップ4では、符号演算手段3で符号Cの演算を
行うと共に、A値計算手段4で符号空間長Aの演算を行
う。つまり、処理107でシンボルSi が0か否かを判
定し、0でないときには処理108で、1となる確率P
(1)を符号空間長Aとする。処理107でSi =0の
ときには、処理109で、‘0’シンボルカウンタ(S
C0)8の値を+1し、処理110でSC0が1か否か
を判定する。‘1’シンボルに続く最初の‘0’シンボ
ルに対しては処理112を、それ以外の‘0’シンボル
に対しては処理111を符号演算手段3及びA値計算手
段4で行う。
(4) Step 4 (Processes 107 to 112) In this step 4, the code calculating means 3 calculates the code C and the A value calculating means 4 calculates the code space length A. That is, in process 107, it is determined whether or not the symbol S i is 0. If it is not 0, process 108 determines the probability P of becoming 1
Let (1) be the code space length A. When S i = 0 in the process 107, a '0' symbol counter (S
The value of C0) 8 is incremented by 1, and it is determined in processing 110 whether SC0 is 1. The code calculation means 3 and the A value calculation means 4 perform the processing 112 for the first "0" symbol following the "1" symbol and the processing 111 for the other "0" symbols.

【0034】(5)ステップ5(処理113〜115) 再正規化処理を行うため、処理113で、符号空間長A
が0.5よりも小さいか否かを判定し、符号空間長Aが
0.5よりも小さいときには、処理114で、符号空間
長Aと符号Cを1ビット左にシフトし、処理115で、
符号空間長Aが0.5よりも小さなときには処理114
を繰り返す。処理113で、符号空間長Aが0.5より
も大きくなったとき、再正規化処理を終わり、結合子
を介して図2(b)の処理116へ進む。
(5) Step 5 (Processes 113 to 115) In order to perform the renormalization process, in the process 113, the code space length A
Is smaller than 0.5, and when the code space length A is smaller than 0.5, in process 114, the code space length A and the code C are shifted to the left by 1 bit, and in process 115,
When the code space length A is smaller than 0.5, processing 114
repeat. In the process 113, when the code space length A becomes larger than 0.5, the renormalization process ends, and the process proceeds to the process 116 of FIG. 2B via the connector.

【0035】(6)ステップ6(処理116,117) 処理116で、シンボルSi が0か否かを判定し、0で
ないときには、処理117で、‘0’シンボルカウンタ
(SC0)8を0にする。
(6) Step 6 (Processes 116 and 117) In process 116, it is determined whether or not the symbol S i is 0. If it is not 0, in process 117, the '0' symbol counter (SC0) 8 is set to 0. To do.

【0036】(7)ステップ7(処理118,119) 処理118で、シンボル番号iに+1し、シンボル数N
がシンボル番号iよりも小さいときには符号化処理を終
了し、そうでないときにはシンボルの符号化処理が終了
していないので、結合子を介して図2(a)の処理1
04へ戻る。
(7) Step 7 (Processes 118, 119) In the process 118, the symbol number i is incremented by 1, and the number of symbols N
2 is smaller than the symbol number i, the encoding process is ended, and otherwise the symbol encoding process is not ended. Therefore, the process 1 of FIG.
Return to 04.

【0037】コンピュータシミュレーションにより、本
実施例の2値データ符号化方法と、従来の符号化方法と
を比較評価した結果を表1に示す。この評価に使用した
文書画像は、CCITT(国際電信電話諮問委員会)の
テストチャートNo.1〜No.6である。
Table 1 shows the results of comparative evaluation of the binary data coding method of this embodiment and the conventional coding method by computer simulation. The document image used for this evaluation is CCITT (International Telegraph and Telephone Consultative Committee) test chart No. 1-No. It is 6.

【0038】[0038]

【表1】 [Table 1]

【0039】表1から、本実施例の符号化方法の圧縮率
は、従来方法の圧縮率よりもかなり高いことが分る。そ
のため、本実施例の符号化方法を用いれば、FAX等で
大半を占める文字・図形のみを含む文書画像を高能率に
圧縮でき、それによって文書画像データの蓄積における
メモリ容量の削減化、及び伝送における伝送時間の短縮
化が図れる。
It can be seen from Table 1 that the compression rate of the coding method of this embodiment is considerably higher than that of the conventional method. Therefore, if the encoding method of the present embodiment is used, a document image including only characters / figures that occupy most of FAX and the like can be highly efficiently compressed, thereby reducing the memory capacity for storing document image data and transmitting it. The transmission time can be shortened.

【0040】第2の実施例 図3は、本発明の第2の実施例を示す2値データ復号化
方法を実施するための復号化器の機能ブロック図であ
り、図1中の要素と共通の要素には共通の符号が付され
ている。
Second Embodiment FIG. 3 is a functional block diagram of a decoder for carrying out a binary data decoding method showing a second embodiment of the present invention, which is common to the elements in FIG. Common elements are denoted by common reference numerals.

【0041】この復号化器は、図1と同様に、集積回路
等を用いた個別回路、あるいはコンピュータやDSP等
を用いたプログラム制御で構成されるもので、図1の符
号化器と逆の演算を行って符号化データの復号化を行う
ものである。
Similar to FIG. 1, this decoder is constituted by an individual circuit using an integrated circuit or the like, or by program control using a computer, a DSP or the like, and is the reverse of the encoder in FIG. The calculation is performed to decode the encoded data.

【0042】即ち、この復号化器は、図1と同様のシン
ボル出現確率推定手段2、A値計算手段4、Cレジスタ
5、Aレジスタ6、比較演算手段7、‘0’シンボルカ
ウンタ(SC0)8、及び‘1’シンボルカウンタ(S
C1)9を有するほかに、符号演算手段3に代えて復号
演算手段13が設けられている。さらに、Cレジスタ5
の値を複写し保持するCaレジスタ15、及びAレジス
タ6の値を複写し保持するAaレジスタ16が設けら
れ、それらの各機能手段を制御手段20で制御する。制
御手段20は、後述する復号化処理フローのシーケンス
に従い、複数の制御線20aを介して各機能手段を制御
する機能を有している。
That is, this decoder has a symbol appearance probability estimation means 2, an A value calculation means 4, a C register 5, an A register 6, a comparison operation means 7, and a "0" symbol counter (SC0) similar to those in FIG. 8 and '1' symbol counter (S
In addition to having the C1) 9, a decoding operation means 13 is provided instead of the code operation means 3. In addition, C register 5
A Ca register 15 for copying and holding the value of A and a Aa register 16 for copying and holding the value of A register 6 are provided, and the respective control means 20 control their respective functional means. The control means 20 has a function of controlling each functional means via a plurality of control lines 20a according to a sequence of a decoding processing flow described later.

【0043】復号演算手段13は、シンボルsi の値に
応じて、次式(10)の復号演算を行い、その演算結果を
A値計算手段4へ与える機能を有している。 C(Si-1 )=C(Si ) (si =1の場合) C(Si-1 )=C(Si )−P(1)/2 (si =0の場合) ・・・(10) 図4(a),(b)は、図3の復号化器を用いた本実施
例の復号化方法を説明するための復号化処理フローであ
り、この図を参照しつつ、復号化処理手順(1)〜
(4)を説明する。 (1)ステップ1(処理201〜204) 初期化処理を行うため、図3(a)の処理201で符号
Cをシフトインし、処理202でシンボル番号iに1、
処理203で符号空間長Aに1をそれぞれ設定する。さ
らに、処理204で、‘0’シンボルカウンタ(SC
0)8及び‘1’シンボルカウンタ(SC1)9にそれ
ぞれ0を設定する。
The decoding operation means 13 has a function of performing the decoding operation of the following equation (10) according to the value of the symbol s i and giving the operation result to the A value calculation means 4. C (the case of s i = 0) (S i -1) = C (S i) (s i = the case of 1) C (S i-1 ) = C (S i) -P (1) / 2 · .. (10) FIGS. 4 (a) and 4 (b) are decoding processing flows for explaining the decoding method of the present embodiment using the decoder of FIG. , Decoding procedure (1) ~
(4) will be described. (1) Step 1 (Processes 201 to 204) In order to perform the initialization process, the code C is shifted in in the process 201 of FIG. 3A, and the symbol number i is set to 1 in the process 202.
In process 203, the code space length A is set to 1, respectively. Further, in process 204, the '0' symbol counter (SC
0) 8 and the '1' symbol counter (SC1) 9 are set to 0 respectively.

【0044】(2)ステップ2(処理205) シンボル出現確率を求めるため、シンボル出現確率推定
手段2では、符号入力に基づき、処理205でシンボル
i が‘0’となる確率P(0)、‘1’となる確率P
(1)を求める。制御手段20は、処理206で、符号
Cが確率P(1)よりも小さいか否かの判定を行い、そ
の判定結果に基づき、次のステップ3−1または3−2
のいずれかの処理が行われる。
(2) Step 2 (Process 205) In order to obtain the symbol appearance probability, the symbol appearance probability estimation means 2 uses the code input, and the probability P (0) that the symbol S i becomes “0” in the process 205, Probability P of '1'
Find (1). In the process 206, the control means 20 determines whether or not the code C is smaller than the probability P (1), and based on the determination result, the next step 3-1 or 3-2.
Any one of the above processes is performed.

【0045】 (3−1)ステップ3−1(処理207〜215,22
4) このステップ3−1では、シンボルパターンの制約条件
を満足する場合、Si =1と復号して、復号演算を行う
処理ステップである。
(3-1) Step 3-1 (Processes 207 to 215, 22)
4) In this step 3-1, when the constraint condition of the symbol pattern is satisfied, S i = 1 is decoded and a decoding operation is performed.

【0046】先ず、処理207で、‘1’シンボルカウ
ンタ(SC1)9の内容を+1し、処理208で、A値
計算手段4により、復号演算として符号空間長Aを計算
する。処理209で、シンボルSi として1を復号し、
処理210で、A≦0.5の判定を行い、A≦0.5の
場合、処理221で、符号空間長AをAaレジスタ16
に、符号CをCaレジスタ15にそれぞれ格納し、処理
212で、Aaレジスタ16とCaレジスタ15の内容
を1ビット左へシフトする。そして、処理214では、
A≦0.5の場合で、Aa≦0.5の条件を満足しない
ときに、シンボルパターンの制約条件を満足するか否か
の判定を行い、満足しない場合、結合子を介して次の
ステップ3−2の処理216へ進み、シンボルSi
‘0’シンボルと再復号する。処理214で、制約条件
を満足する場合には、処理215で再正規化処理を行
う。
First, in process 207, the content of the '1' symbol counter (SC1) 9 is incremented by 1, and in process 208, the A value calculating means 4 calculates the code space length A as a decoding operation. In process 209, 1 is decoded as the symbol S i ,
In process 210, it is determined whether A ≦ 0.5. If A ≦ 0.5, in process 221 the code space length A is set to Aa register 16
Then, the code C is stored in the Ca register 15, and the contents of the Aa register 16 and the Ca register 15 are shifted to the left by 1 bit in the process 212. Then, in the process 214,
In the case of A ≦ 0.5, when the condition of Aa ≦ 0.5 is not satisfied, it is judged whether or not the constraint condition of the symbol pattern is satisfied, and if not satisfied, the next step is performed through the connector. Proceeding to step 216 of 3-2, the symbol S i is re-decoded as a “0” symbol. If the constraint condition is satisfied in process 214, renormalization process is performed in process 215.

【0047】 (3−2)ステップ3−2(処理216〜223) このステップ3−2では、Si =0と復号して、復号演
算を行う処理ステップである。処理216で、‘0’シ
ンボルカウンタ(SC0)8の内容を+1し、処理21
7で、SC0=1か否かの判定を行い、復号演算手段1
3及びA値計算手段4により、処理218または219
で、復号演算として符号Cと符号空間長Aを計算する。
‘1’シンボルに続く最初の‘0’シンボルに対して
は、処理219を、その他の‘0’シンボルに対しては
処理218を実行し、処理220で、シンボルSi とし
て0を復号し、処理221でSC1を0にクリアし、処
理222でA≦0.5の判定を行った後、処理223で
再正規化処理を行う。処理222で、A≦0.5を満足
しないときには、結合子を介して図4(b)の処理2
25へ進む。
(3-2) Step 3-2 (Processes 216 to 223) This step 3-2 is a process step of performing decoding operation by decoding S i = 0. In process 216, the content of the “0” symbol counter (SC0) 8 is incremented by 1, and the process 21
At 7, it is judged whether SC0 = 1 or not, and the decoding calculation means 1
3 and the A value calculating means 4, the processing 218 or 219.
Then, the code C and the code space length A are calculated as a decoding operation.
Process 219 is executed for the first '0' symbol following the '1' symbol, process 218 is executed for the other '0' symbols, and 0 is decoded as the symbol S i in process 220. After SC1 is cleared to 0 in processing 221, the determination of A ≦ 0.5 is performed in processing 222, and then renormalization processing is performed in processing 223. When the processing 222 does not satisfy A ≦ 0.5, the processing 2 of FIG.
Go to 25.

【0048】(4)ステップ4(処理225,226) 処理224でSC0を0にクリアした後、処理225で
シンボル番号iを+1し、処理226で符号Cが0か否
かの判定を行い、0のときには復号化処理を終了する。
0でないときには、復号化が終了していないので、結合
子を介して図4(a)の処理205へ戻る。
(4) Step 4 (Processes 225, 226) After SC0 is cleared to 0 in Process 224, the symbol number i is incremented by 1 in Process 225, and it is determined in Process 226 whether the code C is 0 or not. When it is 0, the decoding process is ended.
If it is not 0, the decoding has not been completed, so the processing returns to the processing 205 of FIG. 4A via the connector.

【0049】以上のように、この実施例の復号化方法で
は、第1の実施例の符号化方法の逆演算等を行うことに
より、符号化されたデータを的確にシンボル系列に復号
化できる。
As described above, in the decoding method of this embodiment, the coded data can be accurately decoded into the symbol series by performing the inverse operation of the coding method of the first embodiment.

【0050】なお、本発明は上記実施例に限定されず、
例えば図2の符号化処理フロー及び図4の復号化処理フ
ローを他の処理手順に変えたり、さらにそれらの符号化
処理及び復号化処理を行う図1及び図3の符号化器及び
復号化器の構成を他の構成に変える等、種々の変形が可
能である。
The present invention is not limited to the above embodiment,
For example, the encoding processing flow of FIG. 2 and the decoding processing flow of FIG. 4 are changed to other processing procedures, and further, the encoding processing and the decoding processing thereof are performed. Various modifications are possible, such as changing the configuration of the above to another configuration.

【0051】[0051]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、事前に符号化対象に関する知識がある場合、
その知識を用いてシンボル系列が取り得るパターンを制
限し、通常出現し得るシンボルパターンにのみ符号空間
を割当て、この符号空間内で算術符号化処理を行うよう
にしたので、エントロピー限界を越える符号化限界でシ
ンボル系列を符号化でき、文書画像等を高能率に圧縮で
きる。従って、本発明の符号化方法を用いれば、文書画
像データ等の蓄積におけるメモリ容量の削減、及び伝送
における伝送時間の短縮が実現できる。
As described in detail above, according to the first aspect of the present invention, if there is knowledge about the object to be encoded in advance,
By using that knowledge, the patterns that the symbol sequence can take are limited, the code space is assigned only to the symbol patterns that can appear normally, and the arithmetic coding process is performed in this code space, so coding that exceeds the entropy limit The symbol sequence can be encoded with the limit, and the document image or the like can be compressed with high efficiency. Therefore, by using the encoding method of the present invention, it is possible to reduce the memory capacity for storing document image data and the like and shorten the transmission time for transmission.

【0052】第2の発明によれば、第1の発明の符号化
方法と逆の演算処理等を行うことにより、第1の発明で
符号化された符号化データを的確に2値データ系列に復
号化できる。
According to the second invention, the coded data coded according to the first invention is accurately converted into a binary data series by performing an operation process or the like which is the reverse of the coding method according to the first invention. Can be decrypted.

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

【図1】本発明の第1の実施例を示す2値データ符号化
方法を実施するための符号化器の機能ブロック図であ
る。
FIG. 1 is a functional block diagram of an encoder for implementing a binary data encoding method showing a first embodiment of the present invention.

【図2】図1の符号化器を用いた符号化処理フローを示
す図である。
FIG. 2 is a diagram showing an encoding processing flow using the encoder of FIG.

【図3】本発明の第2の実施例を示す2値データ復号化
方法を実施するための復号化器の機能ブロック図であ
る。
FIG. 3 is a functional block diagram of a decoder for implementing the binary data decoding method according to the second embodiment of the present invention.

【図4】図3の復号化器を用いた復号化処理フローを示
す図である。
4 is a diagram showing a decoding process flow using the decoder of FIG.

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

1 シンボルパターン制限手段 2 シンボル出現確率推定手段 3 符号演算手段 4 A値計算手段 7 比較演算手段 10,20 制御手段 13 復号演算手段 DESCRIPTION OF SYMBOLS 1 symbol pattern limiting means 2 symbol appearance probability estimating means 3 code calculating means 4 A value calculating means 7 comparison calculating means 10 and 20 control means 13 decoding calculating means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 2値データ系列であるシンボル系列を算
術符号化法で符号化する2値データ符号化方法におい
て、 シンボルパターン制限手段により、シンボルパターンに
関する事前の知識を用いて前記符号化するシンボル系列
のシンボルパターンを制限し、 シンボル出現確率推定手段により、前記シンボルパター
ン制限手段で制限されたシンボルパターンからシンボル
の出現確率を推定し、 符号演算手段により、前記シンボル出現確率推定手段で
推定されたシンボルの出現確率及びその値に応じて、前
記制限されたシンボルパターンを数直線[0,1)区間
に写像する、 ことを特徴とする2値データ符号化方法。
1. A binary data coding method for coding a symbol series, which is a binary data series, by an arithmetic coding method, wherein the symbol pattern limiting means uses the prior knowledge about the symbol pattern to perform the coding. The symbol pattern of the sequence is restricted, the symbol appearance probability estimating means estimates the symbol appearance probability from the symbol pattern limited by the symbol pattern limiting means, and the code computing means estimates the symbol appearance probability estimating means. A binary data encoding method, wherein the restricted symbol pattern is mapped to a number line [0, 1) section according to a symbol appearance probability and its value.
【請求項2】 請求項1の2値データ符号化方法で符号
化されたデータから、シンボルの出現確率を推定した
後、前記シンボルの出現確率及びその値に応じて、前記
符号演算手段の逆演算を行って前記2値データ系列の復
号を行うことを特徴とする2値データ復号化方法。
2. The symbol appearance probability is estimated from the data encoded by the binary data encoding method according to claim 1, and then the inverse of the code calculation means is performed according to the symbol appearance probability and its value. A binary data decoding method, characterized in that the binary data series is decoded by performing an operation.
JP23490791A 1991-09-13 1991-09-13 Binary data encoding method and decoding method Withdrawn JPH0575874A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23490791A JPH0575874A (en) 1991-09-13 1991-09-13 Binary data encoding method and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23490791A JPH0575874A (en) 1991-09-13 1991-09-13 Binary data encoding method and decoding method

Publications (1)

Publication Number Publication Date
JPH0575874A true JPH0575874A (en) 1993-03-26

Family

ID=16978167

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23490791A Withdrawn JPH0575874A (en) 1991-09-13 1991-09-13 Binary data encoding method and decoding method

Country Status (1)

Country Link
JP (1) JPH0575874A (en)

Similar Documents

Publication Publication Date Title
JP3108479B2 (en) Encoding / decoding method and apparatus therefor
US5045852A (en) Dynamic model selection during data compression
US5960116A (en) Image processing apparatus and method for performing prediction data encoding
JPH0366227A (en) Method and system for compression coding and decoding method
US5668737A (en) High-speed data processor and coding method
US6167160A (en) Encoding and decoding methods and devices, and image processing apparatus using the same
JPH1023259A (en) Image pattern converter
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JPH0575874A (en) Binary data encoding method and decoding method
JP2891818B2 (en) Encoding device
JPH0591343A (en) Binary data encoding method and binary data decoding method
JPH0645945A (en) Arithmetic coding method and its decoding method
JP3084187B2 (en) Binary image encoding device and binary image decoding device
JP3461640B2 (en) Arithmetic encoding / decoding device
JP3282407B2 (en) Data compression device
JP3232533B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3223118B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3434904B2 (en) Image data encoding device
JPH09121286A (en) Method and device for compressing picture data
JPS60251763A (en) Magnifying and reducing circuit of facsimile information
JPH0936749A (en) Coding decoding device and coding method used for it
JP2615215B2 (en) Image data compression method
JP3203352B2 (en) Data decompression processor
JP2783221B2 (en) Decryption method
JPH11112355A (en) Method and device for encoding and decoding, and image processor applied with same

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19981203