JPH0591343A - Binary data encoding method and binary data decoding method - Google Patents

Binary data encoding method and binary data decoding method

Info

Publication number
JPH0591343A
JPH0591343A JP25196991A JP25196991A JPH0591343A JP H0591343 A JPH0591343 A JP H0591343A JP 25196991 A JP25196991 A JP 25196991A JP 25196991 A JP25196991 A JP 25196991A JP H0591343 A JPH0591343 A JP H0591343A
Authority
JP
Japan
Prior art keywords
symbol
binary data
code space
code
appearance probability
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
JP25196991A
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 JP25196991A priority Critical patent/JPH0591343A/en
Publication of JPH0591343A publication Critical patent/JPH0591343A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Abstract

PURPOSE:To provide the binary data encoding method and the binary code decoding method which efficiently compress a specific document picture or the like of a FAX or the like. CONSTITUTION:The appearance probability of symbols is estimated by a symbol appearance probability estimating means 1 in accordance with the symbol pattern of a symbol sequence to be encoded. A code space reduction means 6 reduces the area of the code space, where the symbol sequence to be encoded is mapped, with the reduction rate where partiality peculiar to the application appearing in position coordinates of the code space is taken into consideration. A decoding operation means 2 maps the symbol pattern in the numeric line [0,1] section of the reduced code space area in accordance with the appearance probability of symbols estimated by the means 1 and its 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.
The binary data series is encoded by an algorithm.

【0003】例えば、2値情報源から発生される長さN
のシンボル系列SN=s1 2 …sN (si =0,1)
を考える。情報源の2個のシンボルのうち、劣勢シンボ
ル(シンボル出現確率が低い方のシンボル)LSの出現
確率をPL 、優勢シンボルMSの出現確率をPM とす
る。また、符号をC、符号空間長をAとする。
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.

【0004】先ず、次式(1)のように初期化する。 C(λ)=0 (λ;空系列) A(λ)=1 ・・・(1) そして、以下の処理により、シンボル系列SN の符号化
を行う。
First, initialization is performed according to the following equation (1). C (λ) = 0 (λ; empty sequence) A (λ) = 1 (1) Then, the symbol sequence S N is encoded by the following processing.

【0005】現在、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 are 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).

【0006】[0006]

【数1】 [Equation 1]

【0007】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 reproduction normalization (implementing floating-point arithmetic with a finite length register). After that, the value of the C register is shifted out, and the overflowed value becomes the code output.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、従来の
方法では、次のような課題があった。算術符号化法を用
いた2値データ符号化方法では、符号化されるシンボル
系列が数直線[0,1)区間の座標値に写像(マッピン
グ)される。従来の方法では、すべての可能な2値シン
ボル系列がこの数直線[0,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 onto 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.

【0009】従来の方法では、使用されないシンボルパ
ターンに対しても、符号空間が割当てられているのであ
るから、符号空間にむだが存在し、符号化限界が低くな
って圧縮率が低下するという問題がある。そのため、文
書画像データの蓄積におけるメモリ容量の増大、及び伝
送における伝送時間の長時間化という弊害が生じ、それ
を解決することが困難であった。
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.

【0010】本発明は、前記従来技術が持っていた課題
として、符号化限界が低くなって圧縮率が低下するとい
う点について解決した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 prior art has. To do.

【0011】[0011]

【課題を解決するための手段】算術符号化法では、符号
化されるシンボル系列が数直線[0,1)区間の座標値
にマッピングされる。従来の2値データ符号化方法で
は、すべての可能な2値シンボル系列がこの数直線
[0,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 encoding method, all possible binary symbol sequences are mapped on this number line [0,1) section, but in many cases,
Not all possible symbol patterns are used.

【0012】そこで、第1の発明の2値データ符号化方
法では、シンボル出現確率推定手段により、前記符号化
するシンボル系列のシンボルパターンからシンボルの出
現確率を推定し、符号空間縮小手段により、前記符号化
するシンボル系列がマッピングされる符号空間の位置座
標について現われるその応用特有の偏りを考慮した縮小
率で、該符号空間の領域を縮小する。その後、符号演算
手段により、前記シンボル出現確率推定手段で推定され
たシンボルの出現確率及びその値に応じて、前記シンボ
ルパターンを前記縮小された符号空間領域の数直線
[0,1)区間にマッピングしている。
Therefore, in the binary data encoding method of the first invention, the symbol appearance probability estimating means estimates the appearance probability of the symbol from the symbol pattern of the symbol sequence to be encoded, and the code space reducing means performs the estimation. The area of the code space is reduced at a reduction rate in consideration of the application-specific bias that appears in the position coordinates of the code space to which the symbol sequence to be encoded is mapped. Thereafter, the code calculation unit maps the symbol pattern to the number line [0, 1) section of the reduced code space region according to the symbol appearance probability and its value estimated by the symbol appearance probability estimation unit. is doing.

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

【0014】[0014]

【作用】第1の発明によれば、以上のように2値データ
符号化方法を構成したので、シンボル出現確率推定手段
では、符号化対象となるシンボル系列のシンボルパター
ンからシンボルの出現確率を推定し、符号演算手段へ送
る。符号空間縮小手段は、符号化対象となるシンボル系
列がマッピングされる符号空間の領域を縮小する。符号
演算手段では、推定されたシンボルの出現確率及びその
値に応じて、符号空間縮小手段で縮小された符号空間領
域の数直線[0,1)区間に、シンボルパターンをマッ
ピングする。
According to the first aspect of the invention, since the binary data encoding method is configured as described above, the symbol appearance probability estimating means estimates the symbol appearance probability from the symbol pattern of the symbol sequence to be encoded. And sends it to the code calculation means. The code space reducing means reduces the area of the code space to which the symbol sequence to be encoded is mapped. The code calculation unit maps the symbol pattern to the number line [0, 1) section of the code space region reduced by the code space reduction unit according to the estimated appearance probability of the symbol and its value.

【0015】このように、文字・図形等といったシンボ
ル系列に割当てられる符号空間を予め縮小しておき、符
号演算手段により、シンボルパターンに符号空間を割当
てれば、符号空間長(数直線区間)が縮小する割合が従
来方法より小さくなり、符号の小数点以下の桁数が従来
の方法より少なくなる。そのため、符号長が短くなり、
符号化限界が高くなって圧縮率の向上が図れる。従っ
て、前記課題を解決できるのである。
As described above, if the code space assigned to the symbol series such as characters and figures is reduced in advance and the code space is assigned to the symbol pattern by the code calculation means, the code space length (number line section) is reduced. The reduction ratio is smaller than that of the conventional method, and the number of digits after the decimal point of the code is smaller than that of the conventional method. Therefore, the code length becomes shorter,
The encoding limit is increased and the compression rate can be improved. Therefore, the above problem can be solved.

【0016】また、第2の発明によれば、第1の発明の
2値データ符号化方法で符号化されたデータを入力し、
シンボルの出現確率を推定した後、第1の発明の符号演
算手段の逆演算を行って2値データ系列の復号を行う。
これにより、圧縮されたデータの的確な復号が行える。
According to the second invention, the data coded by the binary data coding method of the first invention is input,
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.

【0017】[0017]

【実施例】図2(a)〜(c)は、本発明の実施例の原
理を説明する図である。本実施例の2値データ符号化方
法では、FAX文書(文字・図形)等の特定の応用にお
いて、その特定の応用で出現するシンボルパターンに符
号空間を割当てるとき、符号空間の位置座標について、
その応用特有の偏りを示す。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIGS. 2A to 2C are diagrams for explaining the principle of an embodiment of the present invention. In the binary data encoding method of the present embodiment, when a code space is assigned to a symbol pattern appearing in a specific application such as a FAX document (character / figure), the position coordinates of the code space are:
The bias peculiar to the application is shown.

【0018】例えば、図2(a)に示すように、シンボ
ル‘1’を符号空間の下位に、シンボル‘0’を符号空
間の上位に配置したとする。図2(b)に示すような文
字・図形の基本構成要素となるシンボル列を符号化した
場合、そのシンボル列の最初の‘1’シンボルに割当て
られた符号空間に対し、該シンボル列に割当てられる符
号空間は図2(c)に示すような斜線位置になる場合が
非常に多い。
For example, as shown in FIG. 2A, it is assumed that the symbol "1" is arranged in the lower part of the code space and the symbol "0" is arranged in the upper part of the code space. When a symbol string which is a basic constituent element of a character / graphic as shown in FIG. 2 (b) is coded, the code space allocated to the first '1' symbol of the symbol string is allocated to the symbol string. In many cases, the code space to be used is a diagonal position as shown in FIG.

【0019】この性質を利用し、文字・図形等のシンボ
ル系列に割当てられる符号空間を予め縮小しておくこと
により、従来よりも符号化性能を高めて圧縮率の向上を
図る。さらに、本実施例の2値データ復号化方法では、
このような符号化方法の逆演算処理等を行うことによ
り、2値データ系列を的確に復号化する。
Utilizing this property, the code space assigned to the symbol series such as characters and figures is reduced in advance, so that the coding performance is improved and the compression rate is improved as compared with the conventional case. Furthermore, in the binary data decoding method of this embodiment,
By performing the inverse calculation process of such an encoding method, the binary data series is accurately decoded.

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

【0021】[0021]

【数2】 [Equation 2]

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

【0023】[0023]

【数3】 [Equation 3]

【0024】この符号演算式(6),(7)では、符号
空間長Aが縮小する割合が従来方法の(4),(5)式
よりも小さく、符号の小数点以下の桁数が従来方法より
も少なくなって符号長が短くなる。
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.

【0025】また、本実施例の符号演算式によって構成
された符号が、本実施例の2値データ復号化方法によっ
て一意に復号される。このことは、後述するシンボル列
に割当てられる符号空間の縮小条件から保証される。
Further, the code constituted 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 reduction condition of the code space assigned to the symbol sequence described later.

【0026】以下、第1の実施例で2値データ符号化方
法、第2の実施例で2値データ復号化方法について詳細
に説明する。
The binary data encoding method in the first embodiment and the binary data decoding method in the second embodiment will be described in detail below.

【0027】第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.

【0028】この符号化器は、集積回路等を用いた個別
回路、あるいはコンピュータやディジタル・シグナル・
プロセッサ(DSP)等のプログラム制御により構成さ
れるもので、シンボル入力からシンボルの出現確率を推
定するシンボル出現確率推定手段1を有している。シン
ボル出現確率推定手段1の出力側には、符号演算手段2
及びA値計算手段(符号空間長計算手段)3が接続され
ている。符号演算手段2は、シンボル出現確率推定手段
1で推定されたシンボルの出現確率及びその値に応じて
所定の符号演算を行う機能を有している。A値計算手段
3は、符号化対象となるシンボルの値に応じて符号空間
の大きさを計算する機能を有している。符号演算手段2
の出力側には、符号出力を行うCレジスタ(符号レジス
タ)4が接続され、さらにA値計算手段3の出力側に、
Aレジスタ(符号空間長レジスタ)5を介して符号空間
縮小手段6及び比較演算手段7が接続されている。符号
空間縮小手段6は、符号空間を縮小する機能を有し、さ
らに比較演算手段7は、Aレジスタ5の値が比較値(例
えば0.5)よりも小さいか否かを判定する機能を有し
ている。
This encoder is an individual circuit using an integrated circuit or the like, or a computer or a digital signal
It is configured by program control of a processor (DSP) or the like, and has a symbol appearance probability estimating means 1 for estimating a symbol appearance probability from a symbol input. On the output side of the symbol appearance probability estimating means 1, the code calculating means 2 is provided.
And A value calculation means (code space length calculation means) 3 are connected. The code calculation unit 2 has a function of performing a predetermined code calculation according to the symbol appearance probability estimated by the symbol appearance probability estimation unit 1 and its value. The A value calculation means 3 has a function of calculating the size of the code space according to the value of the symbol to be encoded. Sign calculation means 2
A C register (code register) 4 for outputting a code is connected to the output side of the
A code space reduction unit 6 and a comparison calculation unit 7 are connected via an A register (code space length register) 5. The code space reduction unit 6 has a function of reducing the code space, and the comparison calculation unit 7 has a function of determining whether or not the value of the A register 5 is smaller than a comparison value (for example, 0.5). is doing.

【0029】また、この符号化器には、シンボル入力に
基づき‘1’シンボルに続いて出現した‘0’シンボル
数をカウントする‘0’シンボルカウンタ(SC0)8
と、‘0’シンボルに続いて出現した‘1’シンボル数
をカウントする‘1’シンボルカウンタ(SC1)9と
が設けられている。そして、比較演算手段7、‘0’シ
ンボルカウンタ(SC0)8、及び‘1’シンボルカウ
ンタ(SC1)9の出力側が、制御手段10に接続され
ている。制御手段10は、後述する符号化処理フローの
シーケンスに従い、複数の制御線10aを介して各機能
手段1〜9を制御する機能を有している。
The encoder also includes a "0" symbol counter (SC0) 8 for counting the number of "0" symbols that appear after the "1" symbol based on the symbol input.
And a "1" symbol counter (SC1) 9 that counts the number of "1" symbols that appear after the "0" symbol. The output sides of the comparison calculation means 7, the “0” symbol counter (SC0) 8 and the “1” symbol counter (SC1) 9 are connected to the control means 10. The control means 10 has a function of controlling each of the functional means 1 to 9 via a plurality of control lines 10a according to a sequence of an encoding processing flow described later.

【0030】次に、図1の概略の動作を説明する。符号
化対象となるシンボル系列がシンボル出現確率推定手段
1、符号演算手段2、‘0’シンボルカウンタ(SC
0)8、及び‘1’シンボルカウンタ(SC1)9に入
力されると、該シンボル出現確率推定手段1では、符号
化を行おうとしている2値シンボルsi(1≦i≦N、
N;シンボル数)より以前に出現したシンボルs1 2
…si-1 から、シンボルsi が‘0’シンボルである確
率P(0)、‘1’である確率P(1)を求める。この
ような推定結果は、A値計算手段3、及び符号演算手段
2へ送られる。A値計算手段3では、符号化するシンボ
ルsi の値に応じて、符号空間の大きさA(si )を次
式(8)のように計算する。 A(Si )=P(1) (si =1の場合) A(Si )=A(Si-1 )−P(1)/2 (si =1の場合) ・・・(8) 計算された符号空間の大きさA(Si )は、Aレジスタ
5に一時格納された後、A値計算手段3へフィードバッ
ク入力されると共に、符号空間縮小手段6及び比較演算
手段7へ送られる。
Next, the general operation of FIG. 1 will be described. The symbol sequence to be encoded is a symbol appearance probability estimation unit 1, a code calculation unit 2, a “0” symbol counter (SC
0) 8 and the '1' symbol counter (SC1) 9 are input, the symbol appearance probability estimation means 1 uses the binary symbol s i (1 ≦ i ≦ N, which is to be encoded).
N: number of symbols) symbols s 1 s 2 that appeared before
The probability P (0) that the symbol s i is a “0” symbol and the probability P (1) that it is “1” are obtained from s i−1 . Such an estimation result is sent to the A value calculation means 3 and the sign calculation means 2. The A value calculation means 3 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 5 and then fed back to the A value calculation means 3 and also to the code space reduction means 6 and the comparison calculation means 7. Sent.

【0031】符号空間縮小手段6では、シンボル‘1’
が連続する‘1’シンボルランの最初の‘1’シンボル
に割当てられた符号空間の大きさに対し、最後の‘1’
シンボルまでに割当てられた符号空間の大きさが1/2
となるように符号空間を縮小し、その縮小結果をAレジ
スタ5に一時格納する。
In the code space reducing means 6, the symbol "1" is given.
For the size of the code space assigned to the first "1" symbol in a continuous "1" symbol run, the last "1"
The size of the code space allocated up to the symbol is 1/2
The code space is reduced so that, and the reduction result is temporarily stored in the A register 5.

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

【0033】Aレジスタ5の値が比較演算手段7へ送ら
れると、該比較演算手段7では、符号空間長Aの値がA
≦0.5であるか否かを判定し、その判定結果を制御手
段10へ送る。制御手段10では、比較演算手段7、
‘0’シンボルカウンタ(SC0)8、及び‘1’シン
ボルカウンタ(SC1)9の値を入力し、所定の符号化
処理フローのシーケンスに従い、各機能手段を制御し、
Cレジスタ4から符号化データを出力させる。
When the value of the A register 5 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,
By inputting the values of the '0' symbol counter (SC0) 8 and the '1' symbol counter (SC1) 9, each functional means is controlled according to a sequence of a predetermined encoding processing flow,
The encoded data is output from the C register 4.

【0034】図3(a),(b)は、図1の符号化器を
用いた本実施例の2値化データ符号化方法を説明するた
めの符号化処理フローであり、この図を参照しつつ、符
号化処理手順(1)〜(4)を説明する。
FIGS. 3 (a) and 3 (b) are encoding processing flows for explaining the binary data encoding method of the present embodiment using the encoder of FIG. 1, see this figure. Meanwhile, the encoding processing procedures (1) to (4) will be described.

【0035】(1)ステップ1(処理101〜103) 初期化処理を行うため、図3(a)の処理101でシン
ボル番号iを1に設定し、処理102で、符号空間長A
を1、符号Cを0に設定する。さらに、処理103で、
‘0’シンボルカウンタ(SC0)8及び‘1’シンボ
ルカウンタ(SC1)9の値を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. 3A, 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 values of the “0” symbol counter (SC0) 8 and the “1” symbol counter (SC1) 9 are set to 0.

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

【0037】(3)ステップ3(処理105〜121) このステップ3では、符号演算手段2で符号Cの演算を
行うと共に、A値計算手段3で符号空間長Aの演算を行
う。つまり、処理105でシンボルSiが0か否かを判
定し、0のときには処理106へ進み、0でないときに
は処理113へ進む。
(3) Step 3 (Processes 105 to 121) In this step 3, the code calculating means 2 calculates the code C and the A value calculating means 3 calculates the code space length A. That is, in process 105, it is determined whether or not the symbol Si is 0. When it is 0, the process proceeds to process 106, and when it is not 0, the process proceeds to process 113.

【0038】処理106では、‘0’シンボルカウンタ
(SC0)8に+1し、処理107で‘1’シンボルカ
ウンタ(SC1)9が1か否かを判定する。SC0=1
のときには、符号空間縮小手段6により、処理108,
109で符号空間縮小処理を行う。次に、処理110で
再正規化処理を行った後、‘1’シンボルに続く最初の
‘0’シンボルに対しては演算処理111を、それ以外
の‘0’シンボルに対しては演算処理112を行い、結
合子を介して図3(b)の再正規化処理118を行
い、処理119でSi=0か否かの判定を行う。
In process 106, the "0" symbol counter (SC0) 8 is incremented by 1, and in process 107 it is determined whether the "1" symbol counter (SC1) 9 is 1. SC0 = 1
In the case of, the code space reducing means 6 causes the processing 108,
At 109, code space reduction processing is performed. Next, after renormalization processing is performed in processing 110, arithmetic processing 111 is performed on the first “0” symbol following the “1” symbol, and arithmetic processing 112 is performed on the other “0” symbols. 3B, the renormalization process 118 of FIG. 3B is performed, and in process 119, it is determined whether Si = 0.

【0039】一方、処理105においてSi=0でない
ときには、処理113で‘1’シンボルカウンタ(SC
1)9に+1し、処理114で1となる確率P(1)を
Aレジスタ5に格納した後、再正規化処理115を行
う。そして、処理116でSC1=1か否かの判定を行
い、イエスのときには処理117で、Aレジスタ5の内
容をシフトし、結合子を介して図3(b)の判定処理
119へ進む。
On the other hand, if Si = 0 is not found in the process 105, a '1' symbol counter (SC
1) +1 is added to 9 and the probability P (1) of becoming 1 in processing 114 is stored in the A register 5, and then renormalization processing 115 is performed. Then, in process 116, it is determined whether or not SC1 = 1. If yes, in process 117, the contents of the A register 5 are shifted, and the process proceeds to the determination process 119 of FIG.

【0040】判定処理119でSi=0のときには、処
理120でSC1を0にクリアし、Si=0でないとき
には処理121でSC0を0にクリアする。
When Si = 0 in the judgment processing 119, SC1 is cleared to 0 in processing 120, and SC0 is cleared to 0 in processing 121 when Si = 0 is not satisfied.

【0041】(4)ステップ4(処理122,123) 処理120,121でSC0,SC1を0にクリアした
後、処理122でシンボル番号iを+1し、処理123
で、シンボル数Nがシンボル番号iよりも小さいか否か
を判定し、N<iのときにはシンボルの符号化処理を終
了し、そのシンボルの符号化処理が終了していなけれ
ば、結合子を介して図3(a)の処理104へ戻る。
(4) Step 4 (Processes 122 and 123) After clearing SC0 and SC1 to 0 in processes 120 and 121, the symbol number i is incremented by 1 in process 122, and process 123 is performed.
Then, it is determined whether the number of symbols N is smaller than the symbol number i. When N <i, the symbol encoding process is terminated. If the symbol encoding process is not terminated, the symbol is passed through the connector. Then, the process returns to the process 104 of FIG.

【0042】コンピュータシミュレーションにより、本
実施例の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.

【0043】[0043]

【表1】 [Table 1]

【0044】表1から本実施例の符号化方法の圧縮率
は、従来方法の圧縮率よりもかなり高いことが分かる。
そのため、本実施例の符号化方法を用いれば、FAX文
書(文字・図形)等の文書画像を高能率に圧縮でき、そ
れによって文書画像データの蓄積におけるメモリ容量の
削減化、及び伝送における伝送時間の短縮化が図れる。第2の実施例 図4は、本発明の第2の実施例を示す2値データ復号化
方法を実施するための復号化器の機能ブロック図であ
り、図1中の要素と共通の要素には共通の符号が付され
ている。
It can be seen from Table 1 that the compression rate of the encoding 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 such as a FAX document (character / figure) can be compressed with high efficiency, thereby reducing the memory capacity in storing the document image data and transmitting time in transmission. Can be shortened. Second Embodiment FIG. 4 is a functional block diagram of a decoder for carrying out a binary data decoding method showing a second embodiment of the present invention, in which elements common to those in FIG. Are assigned common reference numerals.

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

【0046】即ち、この復号化器は、図1と同様のシン
ボル出現確率推定手段1、A値計算手段3、Cレジスタ
4、Aレジスタ5、符号空間縮小手段6、比較演算手段
7、‘0’シンボルカウンタ(SC0)8、及び‘1’
シンボルカウンタ(SC1)9を有するほかに、符号演
算手段2に代えて復号演算手段12が設けられている。
さらに、それらの各機能手段を制御する制御手段20
は、後述する復号化処理フローのシーケンスに従い、複
数の制御線20aを介して各機能手段を制御する機能を
有している。
That is, this decoder has a symbol appearance probability estimating means 1, an A value calculating means 3, a C register 4, an A register 5, a code space reducing means 6, a comparison operating means 7, and 0 which are the same as those in FIG. 'Symbol counter (SC0) 8 and' 1 '
In addition to having the symbol counter (SC1) 9, a decoding calculation means 12 is provided instead of the code calculation means 2.
Further, control means 20 for controlling each of these functional means
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.

【0047】復号演算手段12は、シンボルsi の値に
応じて、次式(10)の復号演算を行う機能を有してい
る。 C(Si-1 )=C(Si ) (si =1の場合) C(Si-1 )=C(Si )−P(1)/2 (si =0の場合) ・・・(10) 図5(a),(b)は、図4の復号化器を用いた本実施
例の復号化方法を説明するための復号化処理フローであ
り、この図を参照しつつ、復号化処理手順(1)〜
(4)を説明する。
The decoding calculation means 12 has a function of performing the decoding calculation of the following expression (10) according to the value of the symbol s i . 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. 5 (a) and 5 (b) are a decoding process flow for explaining the decoding method of the present embodiment using the decoder of FIG. 4, with reference to this figure. , Decoding procedure (1) ~
(4) will be described.

【0048】(1)ステップ1(処理201〜204) 初期化処理を行うため、図5(a)の処理201で符号
Cをシフトインし、処理202でシンボル番号iに1、
処理203で符号空間長Aに1をそれぞれ設定する。さ
らに、処理204で、‘0’シンボルカウンタ(SC
0)8及び‘1’シンボルカウンタ(SC1)9にそれ
ぞれ0を設定する。
(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. 5A, 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.

【0049】(2)ステップ2(処理205) シンボル出現確率を求めるため、シンボル出現確率推定
手段1では、符号入力に基づき、処理205で、シンボ
ルSiが‘0’となる確率P(0)、‘1’となる確率
P(1)を求める。
(2) Step 2 (Process 205) In order to obtain the symbol appearance probability, the symbol appearance probability estimation means 1 uses the code input, and in the process 205, the probability P (0) that the symbol Si becomes “0”, The probability P (1) of "1" is obtained.

【0050】(3)ステップ3(処理206〜224) 処理206では、復号シンボルの判定を行い、復号シン
ボルが‘1’であると判定された場合、処理207から
の一連の符号化演算を行う。即ち、処理207ではSC
1に+1し、処理208でP(1)をAレジスタ5に格
納し、再正規化処理209を行う。次に、処理210で
SC1=1か否かの判定を行い、イエスのときには処理
211でAレジスタ5の内容をシフトし、処理212
で、シンボルSiとして‘1’を復号し、結合子を介
して図5(b)の処理222へ進む。
(3) Step 3 (Processes 206 to 224) In process 206, the decoded symbol is judged, and if it is judged that the decoded symbol is "1", a series of coding operations from process 207 are carried out. .. That is, in process 207, SC
1 is incremented by 1, P (1) is stored in the A register 5 in process 208, and renormalization process 209 is performed. Next, in process 210, it is determined whether or not SC1 = 1. If yes, process 211 shifts the contents of the A register 5 and process 212
Then, "1" is decoded as the symbol Si, and the process proceeds to the process 222 of FIG. 5B via the connector.

【0051】一方、処理206で復号シンボルが‘0’
であると判定された場合、復号演算手段12等によって
処理213からの一連の復号化演算を行う。即ち、処理
213でSC0に+1し、処理214でSC0=1か否
かの判定を行い、イエスのときには、符号空間縮小手段
6によって処理215,216で符号空間縮小処理を行
い、再正規化処理217を行う。次に、‘1’シンボル
に続く最初の‘0’シンボルについては、演算処理21
8を行う。それ以外の‘0’シンボルについては、演算
処理219を行う。
On the other hand, in process 206, the decoded symbol is "0".
If it is determined that, the decoding calculation means 12 and the like perform a series of decoding operations from the processing 213. That is, in processing 213, SC0 is incremented by 1, and in processing 214, it is determined whether SC0 = 1 or not. 217 is performed. Next, regarding the first “0” symbol following the “1” symbol, the arithmetic processing 21
Perform 8. For the other '0' symbols, arithmetic processing 219 is performed.

【0052】処理218または219の演算処理の後、
再正規化処理220を行い、結合子を介して図5
(b)の処理221で、シンボルSiとして‘0’を復
号し、処理222でSi=0か否かの判定を行い、イエ
スのときには処理223でSC1を0にクリアし、ノー
のときには処理224でSC0を0にクリアする。
After the calculation processing of the processing 218 or 219,
The renormalization process 220 is performed, and the renormalization process 220 is performed, as shown in FIG.
In processing 221 of (b), '0' is decoded as the symbol Si, processing 222 determines whether Si = 0 or not. If YES, processing SC 223 clears SC1 to 0, and if NO, processing 224. Clear SC0 to 0 with.

【0053】(4)ステップ4(処理205,206) 処理225でシンボル番号iを+1し、処理226でC
=0か否かを判定し、イエスのときには復号化処理を終
了し、その復号化処理が終了していなければ、結合子
を介して図5(a)の処理205へ戻る。
(4) Step 4 (Process 205, 206) In process 225, the symbol number i is incremented by 1, and in process 226 C
It is determined whether or not = 0, and if yes, the decoding process ends, and if the decoding process has not ended, the process returns to the process 205 of FIG. 5A via the connector.

【0054】以上のように、この実施例の復号化方法で
は、第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.

【0055】なお、本発明は上記実施例に限定されず、
例えば図3の符号化処理フロー及び図5の復号化処理フ
ローを他の処理手順に変えたり、さらにそれらの符号化
処理及び復号化処理を行う図1及び図4の符号化器及び
復号化器の構成を他の構成に変える等、種々の変形が可
能である。
The present invention is not limited to the above embodiment,
For example, the encoding processing flow of FIG. 3 and the decoding processing flow of FIG. 5 are changed to another processing procedure, 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.

【0056】[0056]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、特定の応用で出現するシンボルパターンに符
号空間を割当てるとき、符号空間の位置座標についてそ
の応用特有の偏りを示すという性質を利用し、文字・図
形等のシンボル系列に割当てられる符号空間を符号空間
縮小手段によって予め縮小しておくようにしたので、マ
ルコフエントロピー限界を越える符号化限界でシンボル
系列を符号化でき、文書画像等を高能率に圧縮できる。
従って、本発明の符号化方法を用いれば、文書画像デー
タ等の蓄積におけるメモリ容量の削減、及び伝送におけ
る伝送時間の短縮が実現できる。
As described in detail above, according to the first aspect of the present invention, when a code space is assigned to a symbol pattern that appears in a specific application, the position coordinate of the code space shows a bias peculiar to the application. By utilizing the property, the code space assigned to the symbol series such as characters and figures is previously reduced by the code space reducing means, so that the symbol series can be encoded with the encoding limit exceeding the Markov entropy limit, and the document Images 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.

【0057】第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】本発明の実施例の原理説明図である。FIG. 2 is a diagram illustrating the principle of an embodiment of the present invention.

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

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

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

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

1 シンボル出現確率推定手段 2 符号演算手段 3 A値計算手段 6 符号空間縮小手段 7 比較演算手段 10,20 制御手段 12 復号演算手段 DESCRIPTION OF SYMBOLS 1 symbol appearance probability estimating means 2 code calculating means 3 A value calculating means 6 code space reducing means 7 comparison calculating means 10 and 20 control means 12 decoding calculating means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 2値データ系列であるシンボル系列を算
術符号化法で符号化する2値データ符号化方法におい
て、 シンボル出現確率推定手段により、前記符号化するシン
ボル系列のシンボルパターンからシンボルの出現確率を
推定し、 符号空間縮小手段により、前記符号化するシンボル系列
が写像される符号空間の位置座標について現われるその
応用特有の偏りを考慮した縮小率で、該符号空間の領域
を縮小し、 符号演算手段により、前記シンボル出現確率推定手段で
推定されたシンボルの出現確率及びその値に応じて、前
記シンボルパターンを前記縮小された符号空間領域の数
直線[0,1)区間に写像する、 ことを特徴とする2値データ符号化方法。
1. A binary data encoding method for encoding a symbol sequence, which is a binary data sequence, by an arithmetic encoding method, wherein a symbol appearance probability estimating means causes a symbol to appear from a symbol pattern of the symbol sequence to be encoded. The probability is estimated, and the code space reducing means reduces the area of the code space at a reduction rate in consideration of the application-specific bias appearing in the position coordinates of the code space to which the symbol sequence to be encoded is mapped, The calculation means maps the symbol pattern to the number line [0, 1) section of the reduced code space region according to the appearance probability of the symbol estimated by the symbol appearance probability estimation means and its value. And a binary data encoding method.
【請求項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 operation means is performed according to the symbol appearance probability and its value. A binary data decoding method, characterized by performing an operation to decode the binary data series.
JP25196991A 1991-09-30 1991-09-30 Binary data encoding method and binary data decoding method Withdrawn JPH0591343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25196991A JPH0591343A (en) 1991-09-30 1991-09-30 Binary data encoding method and binary data decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25196991A JPH0591343A (en) 1991-09-30 1991-09-30 Binary data encoding method and binary data decoding method

Publications (1)

Publication Number Publication Date
JPH0591343A true JPH0591343A (en) 1993-04-09

Family

ID=17230691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25196991A Withdrawn JPH0591343A (en) 1991-09-30 1991-09-30 Binary data encoding method and binary data decoding method

Country Status (1)

Country Link
JP (1) JPH0591343A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11278173B2 (en) 2002-01-03 2022-03-22 Irobot Corporation Autonomous floor-cleaning robot

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11278173B2 (en) 2002-01-03 2022-03-22 Irobot Corporation Autonomous floor-cleaning robot

Similar Documents

Publication Publication Date Title
JP3108479B2 (en) Encoding / decoding method and apparatus therefor
US5045852A (en) Dynamic model selection during data compression
JPH0969951A (en) Encoding method and decoding method
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
TWI273779B (en) Method and apparatus for optimized lossless compression using a plurality of coders
US5668737A (en) High-speed data processor and coding method
JP3457269B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
JP2006121718A (en) Method of encoding picture data and apparatus therefor
JP3872217B2 (en) Dither image binary expression processing method, dither image compression binary expression decompression method, and dither image compression and decompression system
JP2001352550A (en) Image decoder and image decoding method
JP3929312B2 (en) Arithmetic coding apparatus and image processing apparatus
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JPH0591343A (en) Binary data encoding method and binary data decoding method
JP2891818B2 (en) Encoding device
JPH0575874A (en) Binary data encoding method and decoding method
JPH0645945A (en) Arithmetic coding method and its decoding method
JP3084187B2 (en) Binary image encoding device and binary image decoding device
JP2615215B2 (en) Image data compression method
JPH11317673A (en) Run length encoding and decoding method therefor
JP3434904B2 (en) Image data encoding device
JPS60251763A (en) Magnifying and reducing circuit of facsimile information
JP3203352B2 (en) Data decompression processor
JP3232533B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
Cena et al. A Q-Coder algorithm with carry free addition
JPH09121286A (en) Method and device for compressing picture data

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