JPH0638048A - Data compressing method for image and code - Google Patents

Data compressing method for image and code

Info

Publication number
JPH0638048A
JPH0638048A JP4212346A JP21234692A JPH0638048A JP H0638048 A JPH0638048 A JP H0638048A JP 4212346 A JP4212346 A JP 4212346A JP 21234692 A JP21234692 A JP 21234692A JP H0638048 A JPH0638048 A JP H0638048A
Authority
JP
Japan
Prior art keywords
data
code
image
bit
character
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.)
Granted
Application number
JP4212346A
Other languages
Japanese (ja)
Other versions
JP3193140B2 (en
Inventor
Masatake Oomori
雅岳 大森
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP21234692A priority Critical patent/JP3193140B2/en
Publication of JPH0638048A publication Critical patent/JPH0638048A/en
Application granted granted Critical
Publication of JP3193140B2 publication Critical patent/JP3193140B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related 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 compress both of image data and code data at high compressibility with simple device configuration by encoding the image data and the code data with one arithmetical encoding means. CONSTITUTION:Since an arithmetical code is a known encoding system suitable for the image data (a,) high compression effects can be obtained. When compressing character code data (b,) in a reference symbol possessing means 3, input data are parallelly arranged for the unit of 8 bits as the code length of one character, and respective bit data around an attention bit are extracted. Since correlation between the attention bit and the peripheral bits is made strong as a result, the hitting rate of predicting symbol appearance probability is improved. Therefore, the high compression effects can be obtained even to the character code data.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、2値画像データと文字
などの符号データとを選択的にデータ圧縮する画像と符
号のデータ圧縮方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image and code data compression method for selectively compressing binary image data and code data such as characters.

【0002】[0002]

【従来の技術】データを伝送したり蓄積したりする場合
にデータ圧縮がよく行なわれている。データ圧縮を行な
うための符号化方式として、予測符号化方式の一方式で
ある算術符号やジブ・レンペル(Ziv−Lempe
l)のユニバーサル符号が知られている。
2. Description of the Related Art Data compression is often performed when transmitting or storing data. As an encoding method for performing data compression, an arithmetic code, which is one of the predictive encoding methods, or Ziv-Lempe (Ziv-Lempe) is used.
The universal code of l) is known.

【0003】算術符号は、マルコフ情報源のデータに適
すると共に、データの特性に応じた適応化が可能である
ため、2値画像データのデータ圧縮によく採用されてい
る。一方、ユニバーサル符号は、同一シンボルパターン
の長いデータが繰り返し出現するデータに対して圧縮効
果が高いため、文字コードなどの符号データのデータ圧
縮によく採用されている。
Since the arithmetic code is suitable for the data of the Markov information source and can be adapted according to the characteristics of the data, it is often adopted for the data compression of the binary image data. On the other hand, since the universal code has a high compression effect on data in which long data having the same symbol pattern appears repeatedly, it is often adopted for data compression of code data such as a character code.

【0004】ところで、画像データと符号データの内の
どちらでも任意に選択してデータ圧縮したいという場合
がある。
By the way, there are cases where it is desired to arbitrarily select either image data or coded data for data compression.

【0005】この場合、従来は、一般に、上記算術符号
とユニバーサル符号というように、2種類の符号化方式
を使い分けるようにしていた。このため、装置内に2種
類の符号化手段を備えなくてはならず、装置が複雑化し
ていた。
In this case, conventionally, generally, two types of encoding methods, such as the arithmetic code and the universal code, have been used properly. For this reason, it is necessary to provide two types of encoding means in the device, which complicates the device.

【0006】一方、例えば、特開平3−70268号公
報に見られるように、画像データと文字コードデータと
を1つの符号化手段によりデータ圧縮するものが提案さ
れている。
On the other hand, as disclosed in, for example, Japanese Patent Laid-Open No. 3-70268, there has been proposed one in which image data and character code data are compressed by one encoding means.

【0007】この提案では、文字コードデータは、バイ
ト単位にユニバーサル符号によりデータ圧縮している。
また、画像データは、MH(Modified Huf
fman),MR(Modified Relativ
e Element Address Designa
te)あるいはMMR(Modified MR)方式
により符号化した後、その符号化により得られるランレ
ングスコードやモード情報に固定長コードを割り付け、
その固定長コードをユニバーサル符号によりデータ圧縮
している。この処理により、文字コードや固定長コード
の各データの周期性が吸収され、圧縮効果が比較的高く
なる。
In this proposal, character code data is compressed in bytes by a universal code.
Further, the image data is MH (Modified Huf).
fman), MR (Modified Relativ)
e Element Address Design
te) or MMR (Modified MR) system, and then assigns a fixed length code to the run length code and mode information obtained by the encoding,
The fixed length code is data-compressed by the universal code. By this processing, the periodicity of each data of the character code and the fixed length code is absorbed, and the compression effect becomes relatively high.

【0008】しかしながら、上記提案では、MH,MR
あるいはMMRという別の符号化手段が必要になるた
め、前記と同様に、装置が複雑化していた。
However, in the above proposal, MH, MR
Alternatively, since another encoding means called MMR is required, the device is complicated as in the above case.

【0009】また、ユニバーサル符号の場合、処理する
データ内に、同一シンボル系列の長いデータが繰り返し
出現する場合に、圧縮効果が高くなるが、同一シンボル
系列のデータ長が短かったり、出現回数が少ない場合、
圧縮効果が低下していた。
Further, in the case of the universal code, the compression effect is enhanced when long data of the same symbol series appears repeatedly in the data to be processed, but the data length of the same symbol series is short or the number of appearances is small. If
The compression effect was reduced.

【0010】[0010]

【発明が解決しようとする課題】このように、従来は、
画像データと符号データの双方において高い圧縮効果を
得ようとすると、複数の符号化手段が必要になり、装置
が複雑化してしまうという問題があった。
As described above, the prior art is as follows.
If a high compression effect is to be obtained for both image data and coded data, a plurality of coding means are required, and the device becomes complicated.

【0011】本発明は、上記の問題を解決し、簡単な装
置構成で画像データと符号データの双方をデータ圧縮す
ると共に、高い圧縮効果が得られる画像と符号のデータ
圧縮方法を提供することを目的とする。
The present invention solves the above problems and provides a method for compressing both image data and code data with a simple device configuration, and a method of compressing image and code data that provides a high compression effect. To aim.

【0012】[0012]

【課題を解決するための手段】このために本発明は、入
力データを一定数ずつ並列配置して、注目ビット周囲の
各ビットの状態から注目ビットのシンボル出現確率を予
測し、その予測値と実際のシンボルとの対応を符号化す
ることによりデータ圧縮する既知の算術符号化手段を1
つ備え、2値画像データをデータ圧縮する場合には、上
記一定数として、画像1ラインの画素数を設定して、そ
の算術符号化手段によりデータ圧縮する一方、符号デー
タをテータ圧縮する場合には、上記一定数として、符号
データ1単位のビット数を設定して、上記算術符号化手
段によりデータ圧縮するようにしている。
To this end, according to the present invention, a fixed number of input data are arranged in parallel, the symbol appearance probability of the target bit is predicted from the state of each bit around the target bit, and the predicted value The known arithmetic coding means for compressing data by coding the correspondence with the actual symbol is 1
In the case of compressing binary image data, when the number of pixels of one image line is set as the above-mentioned fixed number and the data is compressed by the arithmetic coding means, the code data is compressed by theta. Sets the number of bits per code data unit as the above-mentioned fixed number and compresses the data by the arithmetic coding means.

【0013】[0013]

【作用】符号化手段は1つだけでよいので、装置構成が
簡単になる。また、画像データは、算術符号化手段によ
り従来どおりデータ圧縮するので、高い圧縮効果が得ら
れる。また、符号データは、シンボル出現確率を予測す
る際に、符号データ1単位ずつ並列配置するので、注目
ビットと周囲の各ビット間の相関が強くなる。これによ
り、予測精度が向上し、符号データにおいても高い圧縮
効果が得られるようになる。
Since only one encoding means is required, the device structure becomes simple. Further, since the image data is compressed by the arithmetic coding means as usual, a high compression effect can be obtained. In addition, since the code data are arranged in parallel one by one when the symbol appearance probability is predicted, the correlation between the target bit and each surrounding bit becomes strong. As a result, the prediction accuracy is improved, and a high compression effect can be obtained even for coded data.

【0014】[0014]

【実施例】以下、添付図面を参照しながら、本発明の実
施例を詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

【0015】図1は、本発明の一実施例に係る符号化装
置のブロック構成図を示したものである。図において、
P/S変換手段1は、パラレル信号の文字コードデータ
をシリアル信号のデータに変換するものである。入力切
換手段2は、画像データを入力するか、文字コードデー
タを入力するかを切り換えるものである。参照シンボル
取得手段3は、入力したデータを一定数ずつ並列配置
し、注目ビット周囲の各ビットの状態を判別するもので
ある。この参照シンボル取得手段3内には、入力データ
を並列配置する上記一定数を2段階に切り換える1ライ
ンビット数切換手段3aを備えている。
FIG. 1 is a block diagram of an encoding apparatus according to an embodiment of the present invention. In the figure,
The P / S conversion means 1 converts character code data of a parallel signal into data of a serial signal. The input switching means 2 switches between inputting image data and character code data. The reference symbol acquisition means 3 arranges a fixed number of input data in parallel and determines the state of each bit around the target bit. The reference symbol acquisition means 3 is provided with a 1-line bit number switching means 3a for switching the above-mentioned fixed number of input data arranged in parallel in two steps.

【0016】確率テーブル4は、シンボルの出現確率を
示す各種確率値を格納しているデータテーブルである。
予測値・確率データ選択テーブル5は、上記判別される
各ビット状態に対応して、シンボルの予測値と、確率テ
ーブル4内の1つの確率値を指示するポインタとを格納
しているデータテーブルである。予測判定手段6は、シ
ンボルの予測値と実際の値とが一致、すなわち予測が的
中したかどうか判定するものである。なお、この判定結
果は、言い換えると、データのシンボルがMPS(優勢
シンボル)であるかLPS(劣勢シンボル)であるかを
示すものである。算術符号生成手段7は、その判定結果
と読み出された確率値とにより、算術符号を生成するも
のである。
The probability table 4 is a data table that stores various probability values indicating the appearance probability of symbols.
The prediction value / probability data selection table 5 is a data table that stores a prediction value of a symbol and a pointer that points to one probability value in the probability table 4, corresponding to each of the determined bit states. is there. The prediction determination means 6 determines whether or not the predicted value of the symbol matches the actual value, that is, whether or not the prediction is correct. In addition, in other words, the determination result indicates whether the data symbol is the MPS (dominant symbol) or the LPS (inferior symbol). The arithmetic code generation means 7 generates an arithmetic code based on the determination result and the read probability value.

【0017】テーブル書換手段8は、シンボル予測の的
中状況に応じて予測値・確率データ選択テーブル5内の
上記ポインタを書き換えるものである。識別コード挿入
手段9は、画像および文字の各符号化データに先立っ
て、どちらのデータであるかを示す識別コードを挿入す
るものである。
The table rewriting means 8 rewrites the pointer in the predicted value / probability data selection table 5 in accordance with the hit state of the symbol prediction. The identification code inserting means 9 inserts an identification code indicating which data is prior to each encoded data of an image and a character.

【0018】図2は、上記符号化装置により生成された
符号化データを元のデータに復元する復号化装置のブロ
ック構成図を示したものである。図において、識別コー
ド検出・除去手段10は、入力される符号化データの識
別コードを検出する一方、その識別コードを除去するも
のである。算術符号復号手段11は、符号化データと確
率値とにより、データのシンボルがMPSであるかLP
Sであるか判別するものである。
FIG. 2 is a block diagram showing the configuration of a decoding device that restores the encoded data generated by the encoding device to the original data. In the figure, an identification code detecting / removing means 10 detects an identification code of input encoded data and removes the identification code. The arithmetic code decoding means 11 determines whether the data symbol is MPS or LP depending on the encoded data and the probability value.
Whether or not it is S is determined.

【0019】参照シンボル取得手段3,確率テーブル
4,予測値・確率データ選択テーブル5,予測判定手段
6および算術符号生成手段7は、それぞれ図1と同一機
能である。なお、予測判定手段6は、この場合、MPS
とLPSの判別結果とシンボル予測値とにより、データ
のシンボルを再生することになる。
The reference symbol acquisition means 3, probability table 4, predicted value / probability data selection table 5, prediction determination means 6 and arithmetic code generation means 7 have the same functions as in FIG. In this case, the prediction determination means 6 uses the MPS.
The data symbol is reproduced according to the LPS discrimination result and the symbol prediction value.

【0020】出力切換手段12は、画像データを再生し
た場合と文字コードデータを再生した場合とで、信号路
を切り換えるものである。S/P変換手段13は、シリ
アル信号のデータをパラレル信号に変換するものであ
る。
The output switching means 12 switches the signal path depending on whether the image data is reproduced or the character code data is reproduced. The S / P converter 13 converts serial signal data into parallel signals.

【0021】以上の構成で、次に本実施例の符号化装置
の動作を説明する。
Next, the operation of the encoding apparatus of the present embodiment having the above configuration will be described.

【0022】この符号化装置には、データ種別信号と共
に、画像データまたは文字コードデータが任意に入力さ
れる。データ種別信号は、入力されるデータが画像デー
タであるか文字コードデータであるかを示すものであ
る。画像データは、原稿画像を一定の解像度で主走査と
副走査とを実行して読み取った2値データであり、1ラ
インずつ順次入力される。文字コードデータは、英数字
などの文字列情報であり、アスキーコードの形式で順次
入力される。
Image data or character code data is arbitrarily input to the encoding device together with the data type signal. The data type signal indicates whether the input data is image data or character code data. The image data is binary data obtained by reading the original image by performing main scanning and sub-scanning at a constant resolution, and is sequentially input line by line. The character code data is character string information such as alphanumeric characters and is sequentially input in the ASCII code format.

【0023】この符号化装置は、図3に示すように、デ
ータ種別信号が入力されると、その信号により入力され
るデータの種別を判別する(処理101)。いま、例え
ば、入力データが画像データであったとすると(処理1
01の「画像」)、入力切換手段2で画像データ側を選
択し(処理102)、識別コード挿入手段9から画像で
あることを示す識別コードを出力する(処理103)。
そして、1ラインビット数切換手段3aで1ラインのビ
ット数を原稿画像の主走査方向の画素数に設定する(処
理104)。
As shown in FIG. 3, when the data type signal is input, this encoding device determines the type of data input by the signal (process 101). Now, for example, if the input data is image data (process 1
01 "image"), the input switching means 2 selects the image data side (processing 102), and the identification code inserting means 9 outputs an identification code indicating that it is an image (processing 103).
Then, the 1-line bit number switching means 3a sets the bit number of 1 line to the number of pixels of the original image in the main scanning direction (process 104).

【0024】一方、入力データが文字コードデータであ
ったとすると(処理101の「文字」)、入力切換手段
2でP/S変換手段1側を選択し(処理105)、識別
コード挿入手段9から文字であることを示す識別コード
を出力する(処理106)。そして、1ラインビット数
切換手段3aで1ラインのビット数をアスキーコードの
1単位である8ビットに設定する(処理107)。
On the other hand, if the input data is character code data (“character” in processing 101), the input switching means 2 selects the P / S conversion means 1 side (processing 105) and the identification code insertion means 9 is used. An identification code indicating a character is output (process 106). Then, the 1-line bit number switching means 3a sets the bit number of 1 line to 8 bits which is one unit of the ASCII code (process 107).

【0025】そして、所定の符号化処理を開始する。す
なわち、いま、画像データが入力された場合、その画像
データは、そのまま参照シンボル取得手段3に入力され
る。また、文字コードデータが入力された場合、P/S
変換手段1でシリアル信号に変換されて参照シンボル取
得手段3に入力される。
Then, a predetermined encoding process is started. That is, when the image data is input, the image data is directly input to the reference symbol acquisition means 3. If character code data is entered, P / S
It is converted into a serial signal by the conversion means 1 and input to the reference symbol acquisition means 3.

【0026】参照シンボル取得手段3では、図4に示す
ように、入力するデータを上記設定した1ラインビット
数ずつ順次並列配置する。そして、入力する各ビットに
注目し、予め設定されているテンプレートTに従って、
その注目ビットXに対して一定位置にある10ビットの
データを取り出す。すなわち、取り出すビットは、同一
ライン上の2ビットのデータD1・D2と、前ラインの
5ビットのデータD2〜D6および前々ラインの3ビッ
トのデータD7〜D9である。
In the reference symbol acquiring means 3, as shown in FIG. 4, the input data is sequentially arranged in parallel by the set number of 1-line bits. Then, paying attention to each input bit, according to the preset template T,
10-bit data at a fixed position with respect to the target bit X is taken out. That is, the bits to be extracted are 2-bit data D1 and D2 on the same line, 5-bit data D2 to D6 on the previous line, and 3-bit data D7 to D9 on the line before the previous line.

【0027】この取り出したデータD0〜D9は10ビ
ットなので、図5(a)に示すように、シンボルパター
ンの各状態を整理すると1024通りになる。参照シン
ボル取得手段3は、取り出したデータD0〜D9のシン
ボルパターンを状態0〜1023というように判別す
る。
Since the fetched data D0 to D9 are 10 bits, as shown in FIG. 5A, each state of the symbol pattern is organized into 1024 types. The reference symbol acquisition unit 3 determines the symbol patterns of the extracted data D0 to D9 as states 0 to 1023.

【0028】予測値・確率データ選択テーブル5には、
同図(b)に示すように、上記シンボルパターンの各状
態0〜1023に対応して、MPSの予測値とポインタ
値とが格納されている。予測値・確率データ選択テーブ
ル5は、上記判別された1つの状態に対応する予測値と
ポインタ値とを出力する。確率テーブル4には、同図
(c)に示すように、通し番号が付与された各種確率値
が格納されている。確率テーブル4は、上記ポインタ値
で示された番号の確率値を出力する。
The predicted value / probability data selection table 5 contains
As shown in (b) of the figure, the predicted value and pointer value of the MPS are stored corresponding to each of the states 0 to 1023 of the symbol pattern. The predicted value / probability data selection table 5 outputs a predicted value and a pointer value corresponding to the one determined state. The probability table 4 stores various probability values assigned serial numbers, as shown in FIG. The probability table 4 outputs the probability value of the number indicated by the pointer value.

【0029】予測判定手段6は、上記MPSの予測値と
入力されたデータのシンボルとを照合して、予測が的中
したかどうか判定する。この判定結果は、言い換える
と、入力されたデータのシンボルがMPSであるかLP
Sであるかを示している。算術符号生成手段7は、その
判定結果と上記確率値とに基ずいて、既知演算により算
術符号を生成して、外部に出力する(以上、処理10
8)。
Prediction judging means 6 compares the predicted value of the MPS with the symbol of the input data to judge whether the prediction is correct. In other words, this determination result indicates whether the symbol of the input data is MPS or LP.
S is shown. The arithmetic code generation means 7 generates an arithmetic code by a known operation based on the determination result and the probability value and outputs the arithmetic code to the outside (above, processing 10).
8).

【0030】上記符号化動作に並行して、テーブル書換
手段8は、シンボル予測が的中した回数と、外れた回数
とをそれぞれ計数する(処理109)。そして、計数し
たそれぞれの回数が、予め規定されている回数に達した
かどうか判定する(処理110)。規定回数に達しない
場合には(処理110のN)、次にデータ種別信号によ
りデータの切り換えが指示されていないかどうか判別す
る(処理111)。データの切り換えが指示されない場
合には(処理111のN)、データの終了がどうか判別
し(処理112)、終了でなければ(処理112の
N)、そのまま動作を継続する(処理108へ)。
In parallel with the above-mentioned encoding operation, the table rewriting means 8 counts the number of times the symbol prediction is correct and the number of times the symbol prediction is incorrect (process 109). Then, it is determined whether or not each of the counted numbers has reached a predetermined number (process 110). If the specified number of times has not been reached (N in process 110), it is then determined whether or not data switching is instructed by the data type signal (process 111). If the data switching is not instructed (N in process 111), it is determined whether the data has ended (process 112). If not (N in process 112), the operation is continued (to process 108).

【0031】ここで、いま、画像データを入力している
ものとする。この場合、参照シンボル取得手段3内で
は、図4に示したように、その画像データが1ラインず
つ配列され、テンプレートTにより、注目ビットX周辺
のデータDO〜D9が取り出される。画像データの場
合、これらのデータDO〜D9と注目ビットXとの相関
が強いことがよく知られている。上記符号化処理では、
注目ビットXのシンボルを、相関の強いデータDO〜D
9に基ずいて予測するので、予測精度が高くなり、デー
タ圧縮率も高くなる。
Here, it is assumed that image data is being input. In this case, in the reference symbol acquisition means 3, as shown in FIG. 4, the image data are arranged line by line, and the template DO extracts the data DO to D9 around the target bit X. In the case of image data, it is well known that these data DO to D9 and the bit X of interest have a strong correlation. In the above encoding process,
The symbol of the bit of interest X is set to the data DO to D with strong correlation.
Since the prediction is performed based on 9, the prediction accuracy increases and the data compression rate also increases.

【0032】次に、文字コードデータを入力しているも
のとする。この場合、参照シンボル取得手段3内では、
その文字コードデータは、8ビットを1ラインとして順
に配列され、上記と同様に、注目ビットX周辺の各デー
タDO〜D9が取り出される。
Next, it is assumed that character code data is being input. In this case, in the reference symbol acquisition means 3,
The character code data is arranged in order with 8 bits as one line, and each data DO to D9 around the target bit X is extracted in the same manner as above.

【0033】いま、例えば、入力した文字コードデータ
が、「ASCII・・・」という文字列のデータであっ
たとする。アスキーコードは、1文字8ビットであり、
参照シンボル取得手段3内で配列されると、図6に示す
ようになる。すなわち、「A」は“0100000
1”、「S」は“01010011”、「C」は“01
000011”、「I」は“01001001”という
データであり、各文字の上位3〜4ビットは、同一であ
るデータが多い。従って、上記テンプレートTにより取
り出される各データDO〜D9と注目ビットXとの相関
が強いことになる。
Now, for example, it is assumed that the input character code data is the data of the character string "ASCII ...". ASCII code is 8 bits per character,
When arranged in the reference symbol acquisition means 3, it becomes as shown in FIG. That is, “A” is “0100000
1 "and" S "are" 01010011 "and" C "is" 01 "
“000011” and “I” are data “01001001”, and most of the upper 3 to 4 bits of each character are the same. Therefore, the correlation between each data DO to D9 extracted by the template T and the target bit X is strong.

【0034】これにより、文字コードデータを符号化処
理する際にも、上記画像データの場合と同様に、予測精
度が高くなり、データ圧縮率も高くなる。
As a result, even when the character code data is encoded, the prediction accuracy is high and the data compression rate is high, as in the case of the image data.

【0035】一方、上記シンボル予測の的中回数、また
は外れた回数が規定回数に達した場合(処理110の
Y)、予測値・確率データ選択テーブル5に格納してい
るポインタ値の書き換える。すなわち、的中回数が規定
回数に達した場合には、確率テーブル4の確率テーブル
内のより高い確率値を指示するようにポインタ値を書き
換える。また、外れた回数が規定回数に達した場合に
は、その反対に、より低い確率値を指示するようにポイ
ンタ値を書き換える(処理113)。これにより、いま
符号化しているデータの特性に応じた適応化が行なわ
れ、シンボルの予測精度がさらに向上するようになる。
On the other hand, when the number of hits or the number of misses of the symbol prediction reaches the specified number (Y in process 110), the pointer value stored in the predicted value / probability data selection table 5 is rewritten. That is, when the hit count reaches the specified count, the pointer value is rewritten so as to indicate a higher probability value in the probability table of the probability table 4. On the contrary, when the number of deviations reaches the specified number, the pointer value is rewritten so as to indicate a lower probability value (process 113). As a result, adaptation is performed according to the characteristics of the data being encoded, and the symbol prediction accuracy is further improved.

【0036】次に、データ種別信号によりデータの切り
換えが指示されたとする。この場合(処理111の
Y)、データ種別を判別して以上の処理を同様に実行す
る(処理10へ)。これにより、図7に示すように、デ
ータ種別を示す識別コードと共に、画像と文字のそれぞ
れの符号化データが順次出力される。そして、入力デー
タがなくなると(処理112のY)、以上の符号化処理
を終了する。
Next, it is assumed that data switching is instructed by the data type signal. In this case (Y in process 111), the data type is determined and the above process is executed similarly (to process 10). As a result, as shown in FIG. 7, the coded data of each of the image and the character is sequentially output together with the identification code indicating the data type. When there is no input data (Y in process 112), the above encoding process is terminated.

【0037】次に、本実施例の復号化装置の動作を説明
する。
Next, the operation of the decoding apparatus of this embodiment will be described.

【0038】復号化装置には、上記符号化装置により符
号化されたデータ信号が入力される。復号化装置は、図
8に示すように、データ信号が入力されると、識別コー
ド検出・除去手段10は、識別コードを読み取ってデー
タ種別を判別する(処理201)。
The data signal encoded by the above encoding device is input to the decoding device. As shown in FIG. 8, when the decoding device receives a data signal, the identification code detecting / removing means 10 reads the identification code and determines the data type (process 201).

【0039】いま、データ信号が画像データであった場
合(処理202の「画像」)、1ラインビット数切換手
段3aで1ラインのビット数を原稿画像の主走査方向の
画素数に設定する(処理203)。また、文字コードデ
ータであった場合(処理202の「文字」)、1ライン
ビット数切換手段3aで1ラインのビット数を8ビット
に設定する(処理204)。そして、画像データの場
合、出力切換手段12で画像出力の信号ラインを選択
し、文字データの場合、S/P変換手段13側を選択す
る(処理205)。
If the data signal is image data ("image" in step 202), the 1-line bit number switching means 3a sets the bit number of 1 line to the number of pixels in the main scanning direction of the original image ( Process 203). If it is character code data (“character” in process 202), the 1-line bit number switching means 3a sets the bit number of 1 line to 8 bits (process 204). Then, in the case of image data, the output switching means 12 selects the image output signal line, and in the case of character data, the S / P conversion means 13 side is selected (process 205).

【0040】そして、所定の復号化処理を実行する。す
なわち、算術符号復号手段11は、入力された符号化デ
ータと確率テーブル4から出力される確率値とに基ずい
て、元のデータシンボルがMPSであるかLPSである
かという情報に復号する。予測判定手段6は、その情報
と予測値・確率データ選択テーブル5から出力される予
測値とに基ずいて、元のデータのシンボルを復元する。
画像データの場合、復元されたデータは、そのまま出力
される。また、文字コードデータの場合、S/P変換手
段13でパラレル信号に変換されて出力される。なお、
参照シンボル取得手段3,予測値・確率データ選択テー
ブル5,確率テーブル4,算術符号生成手段7は、それ
ぞれ前述の符号化装置の場合と同様に動作する(以上、
処理206)。
Then, a predetermined decoding process is executed. That is, the arithmetic code decoding means 11 decodes into the information whether the original data symbol is MPS or LPS based on the input coded data and the probability value output from the probability table 4. The prediction determination means 6 restores the symbol of the original data based on the information and the predicted value output from the predicted value / probability data selection table 5.
In the case of image data, the restored data is output as it is. Further, in the case of character code data, it is converted into a parallel signal by the S / P conversion means 13 and output. In addition,
The reference symbol acquisition unit 3, the predicted value / probability data selection table 5, the probability table 4, and the arithmetic code generation unit 7 operate in the same manner as in the above-described encoding device (above,
Process 206).

【0041】上記復号化動作に並行して、図3の場合と
同様に、シンボルの予測結果を判定し、その判定結果に
応じて、予測値・確率データ選択テーブル5のポインタ
値を書き換える(処理109,処理110および処理1
13)。
In parallel with the above decoding operation, as in the case of FIG. 3, the prediction result of the symbol is determined, and the pointer value of the prediction value / probability data selection table 5 is rewritten according to the determination result (process). 109, process 110 and process 1
13).

【0042】また、上記動作中、入力データの識別コー
ドを監視する(処理207)。識別コードを検出しない
場合(処理207のN)、入力データの終了かどうか判
別し(処理208)、終了でなければ(処理208の
N)、そのまま復号化動作を継続する(処理206
へ)。そして、入力データがなくなると(処理208の
Y)、以上の復号化処理を終了する。
During the above operation, the identification code of the input data is monitored (process 207). If the identification code is not detected (N in process 207), it is determined whether the input data is completed (process 208). If not (N in process 208), the decoding operation is continued (process 206).
What). When there is no input data (Y in process 208), the above decoding process is terminated.

【0043】以上のように、本実施例の符号化装置は、
算術符号の符号化手段を1つ配設して、その1つの符号
化手段で画像データと文字コードデータの双方をデータ
圧縮するようにしている。
As described above, the coding apparatus of this embodiment is
One arithmetic code encoding means is provided, and the image data and the character code data are both compressed by the one encoding means.

【0044】これにより、従来のように2種類の符号化
手段を備える必要がないため、装置構成が簡単になる。
また、復号化装置も、対応する算術符号の復号化手段を
1つ配設すればよいので、同様に装置構成が簡単にな
る。
As a result, since it is not necessary to provide two types of encoding means as in the conventional case, the device structure is simplified.
Further, since the decoding device only needs to be provided with one decoding means for the corresponding arithmetic code, the device configuration is similarly simplified.

【0045】また、算術符号は、画像データに好適な既
知の符号化方式であるので、高い圧縮効果が得られる。
また、文字コードデータをテータ圧縮する場合には、参
照シンボル取得手段3内において、入力データを1文字
のコード長である8ビットを単位として並列配列し、注
目ビット周辺の各ビットデータを取り出すようにしてい
る。
Since the arithmetic code is a known coding method suitable for image data, a high compression effect can be obtained.
Further, when the character code data is compressed by the data, the input data is arranged in parallel in the reference symbol acquisition means 3 in units of 8 bits which is the code length of one character, and each bit data around the target bit is taken out. I have to.

【0046】文字コードデータの場合、文字が異なって
も、同一位置のビットが同一になりやすいので、注目ビ
ットと周辺ビット間の相関が強くなる。これにより、シ
ンボル出現確率の予測の的中率が高くなるため、文字コ
ードデータに対しても高い圧縮効果が得られるようにな
る。
In the case of character code data, even if the characters are different, the bits at the same position are likely to be the same, so the correlation between the target bit and the peripheral bits becomes strong. As a result, the accuracy of the prediction of the symbol appearance probability increases, so that a high compression effect can be obtained for the character code data.

【0047】発明者の実験によると、本実施例の符号化
装置により、C言語のソースプログラムの文字列情報を
データ圧縮した場合に、データ量が40%以下に圧縮さ
れることを確認している。
According to the experiments of the inventor, it was confirmed that the data amount was compressed to 40% or less when the character string information of the C language source program was data-compressed by the encoding apparatus of this embodiment. There is.

【0048】また、C言語のソースプログラムの場合、
同一文字列が頻繁に出現するが、例えば「0.1258
6 2.13658 5.23698 ・・・」のよう
に、同一文字列がほとんど出現しない実数値データの場
合でも、各文字の上位ビットは一致することになるの
で、本実施例の符号化装置により、高いデータ圧縮効果
が得られるようになる。
In the case of a C language source program,
The same character string appears frequently, but for example, "0.1258
6 2.13658 5.23698 ... ”, even in the case of real-valued data in which the same character string rarely appears, the upper bits of each character match, so that the encoding apparatus according to the present embodiment , High data compression effect can be obtained.

【0049】また、本実施例では、生成した符号化デー
タの先頭部に、画像と文字とのデータ種別を示す識別コ
ードを挿入するようにしている。これにより、復号化装
置は、復号化の際に、その識別コードによりデータ種別
を判別して、それぞれ所定の動作を自動的に実行するこ
とができるようになっている。
Further, in this embodiment, the identification code indicating the data type of the image and the character is inserted at the beginning of the generated encoded data. As a result, the decryption device can determine the data type by the identification code at the time of decryption and automatically execute the predetermined operation.

【0050】なお、上述の実施例では、コードデータと
して、アスキーコードの文字列情報を符号化する例を説
明したが、他の文字列コードでもよく、さらに文字でな
い各種コード情報でも同様に符号化することができる。
その場合、参照シンボル取得手段3内で並列配置する1
ラインビット数を、1つのコード長に設定すればよい。
例えば、JISコードの場合、1文字2バイトなので、
1ラインビット数を2バイトに設定する。さらに、その
1ラインビット数は、1つのコード長に限らず、そのコ
ード長の整数倍に設定してもよい。
In the above embodiment, an example of encoding character string information of ASCII code as the code data has been described, but other character string codes may be used, and various code information other than characters may be encoded in the same manner. can do.
In that case, the reference symbols are arranged in parallel in the reference symbol acquisition means 3.
The number of line bits may be set to one code length.
For example, in the case of JIS code, one character is 2 bytes,
Set the number of 1 line bits to 2 bytes. Further, the number of 1 line bits is not limited to one code length, and may be set to an integral multiple of the code length.

【0051】また、符号化データに挿入する識別コード
は、データ種別のみ示すようにしたが、さらに上記1ラ
インビット数を示すようにしてもよい。
Although the identification code inserted into the encoded data is shown only for the data type, it may be shown for the number of 1-line bits.

【0052】ところで、算術符号の符号化データは、疑
似ランダムデータになるため、出現しないデータパター
ンというものがない。このため、識別コードとして特定
符号を固定的に定義することができない。そこで、例え
ば、第1〜第3の各種符号を設定し、識別コードは、第
1と第2の符号が連続したものと定義する一方、符号化
の際に、符号化データに第1の符号が出現した場合に
は、その後に第3の符号を必ず挿入するように取り決め
る。これにより、符号化の際には、第1の符号を検出
し、さらに第2の符号を検出した場合に、識別コードで
あると判定することができる。
By the way, since the encoded data of the arithmetic code is pseudo random data, there is no data pattern that does not appear. Therefore, the specific code cannot be fixedly defined as the identification code. Therefore, for example, the first to third various codes are set, and the identification code is defined as a series of the first and second codes, while the first code is added to the encoded data at the time of encoding. If appears, the third code is arranged to be inserted after that. Thus, when encoding, the first code is detected, and when the second code is further detected, it can be determined that the code is the identification code.

【0053】[0053]

【発明の効果】以上のように、本発明によれば、1つの
算術符号化手段により、画像データと符号データの双方
を符号化するようにしたので、装置構成が簡単になると
共に、符号データをテータ圧縮する場合には、符号デー
タ1単位のビット数を単位として並列配置して、注目ビ
ット周囲の各ビットのシンボルのパターンに基ずいて注
目シンボルの出現確率を予測するようにしたので、予測
結果の的中率が高くなるため、画像データと符号データ
の双方で高い圧縮効果が得られるようになる。
As described above, according to the present invention, since both the image data and the code data are coded by one arithmetic coding means, the device configuration is simplified and the code data is In the data compression, the number of bits per code data unit is arranged in parallel, and the appearance probability of the target symbol is predicted based on the pattern of each bit symbol around the target bit. Since the hit rate of the prediction result is high, a high compression effect can be obtained for both the image data and the coded data.

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

【図1】本発明の一実施例に係る符号化装置のブロック
構成図である。
FIG. 1 is a block configuration diagram of an encoding device according to an embodiment of the present invention.

【図2】本発明の一実施例に係る復号化装置のブロック
構成図である。
FIG. 2 is a block configuration diagram of a decoding device according to an embodiment of the present invention.

【図3】符号化処理の動作フローチャートである。FIG. 3 is an operation flowchart of encoding processing.

【図4】入力データを配列して各ビットデータを取り出
す動作を示す説明図である。
FIG. 4 is an explanatory diagram showing an operation of arranging input data and extracting each bit data.

【図5】シンボルの予測動作を示す説明図である。FIG. 5 is an explanatory diagram showing a symbol prediction operation.

【図6】文字コードデータの配列方法を示す説明図であ
る。
FIG. 6 is an explanatory diagram showing an arrangement method of character code data.

【図7】符号化装置の出力データの説明図である。FIG. 7 is an explanatory diagram of output data of the encoding device.

【図8】復号化処理の動作フローチャートである。FIG. 8 is an operation flowchart of a decoding process.

【符号の説明】 1 P/S変換手段 2 入力切換手段 3 参照シンボル取得手段 3a 1ラインビット数切換手段 4 確率テーブル 5 予測値・確率データ選択テーブル 6 予測判定手段 7 算術符号生成手段 8 テーブル書換手段 9 識別コード挿入手段 10 識別コード検出・除去手段 11 算術符号復号手段 12 出力切換手段 13 S/P変換手段[Description of Codes] 1 P / S conversion means 2 Input switching means 3 Reference symbol acquisition means 3a 1 Line bit number switching means 4 Probability table 5 Predicted value / probability data selection table 6 Prediction determination means 7 Arithmetic code generation means 8 Table rewriting Means 9 Identification code insertion means 10 Identification code detection / removal means 11 Arithmetic code decoding means 12 Output switching means 13 S / P conversion means

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成4年12月4日[Submission date] December 4, 1992

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図面の簡単な説明[Name of item to be corrected] Brief description of the drawing

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

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

【図1】本発明の一実施例に係る符号化装置のブロック
構成図である。
FIG. 1 is a block configuration diagram of an encoding device according to an embodiment of the present invention.

【図2】本発明の一実施例に係る復号化装置のブロック
構成図である。
FIG. 2 is a block configuration diagram of a decoding device according to an embodiment of the present invention.

【図3】符号化処理の動作フローチャートである。FIG. 3 is an operation flowchart of encoding processing.

【図4】入力データを配列して各ビットデータを取り出
す動作を示す説明図である。
FIG. 4 is an explanatory diagram showing an operation of arranging input data and extracting each bit data.

【図5】シンボルの予測動作を示す説明図である。FIG. 5 is an explanatory diagram showing a symbol prediction operation.

【図6】文字コードデータの配列方法を示す説明図であ
る。
FIG. 6 is an explanatory diagram showing an arrangement method of character code data.

【図7】符号化装置の出力データの説明図である。FIG. 7 is an explanatory diagram of output data of the encoding device.

【図8】復号化処理の動作フローチャートである。FIG. 8 is an operation flowchart of a decoding process.

【符号の説明】 1 P/S変換手段 2 入力切換手段 3 参照シンボル取得手段 3a 1ラインビット数切換手段 4 確率テーブル 5 予測値・確率データ選択テーブル 6 予測判定手段 7 算術符号生成手段 8 テーブル書換手段 9 識別コード挿入手段 10 識別コード検出・除去手段 11 算術符号復号手段 12 出力切換手段 13 S/P変換手段[Description of Codes] 1 P / S conversion means 2 Input switching means 3 Reference symbol acquisition means 3a 1 Line bit number switching means 4 Probability table 5 Predicted value / probability data selection table 6 Prediction determination means 7 Arithmetic code generation means 8 Table rewriting Means 9 Identification code insertion means 10 Identification code detection / removal means 11 Arithmetic code decoding means 12 Output switching means 13 S / P conversion means

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】全図[Correction target item name] All drawings

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図4】 [Figure 4]

【図5】 [Figure 5]

【図6】 [Figure 6]

【図7】 [Figure 7]

【図1】 [Figure 1]

【図2】 [Fig. 2]

【図3】 [Figure 3]

【図8】 [Figure 8]

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 1ラインの画素数が一定である2値画像
データと、1単位のビット数が一定である符号データと
を選択的に入力してデータ圧縮する画像と符号のデータ
圧縮方法において、入力するデータを一定数ずつ並列配
置して注目ビット周囲の各ビットの状態から注目ビット
のシンボル出現確率を予測し、その予測値と実際のシン
ボルとの対応を符号化することによりデータ圧縮する1
つの算術符号化手段を備え、上記2値画像データをデー
タ圧縮する場合には、上記データを並列配置する上記一
定数として1ラインの画素数を設定して、上記算術符号
化手段により上記2値画像データをデータ圧縮する一
方、上記符号データをデータ圧縮する場合には、上記一
定数として上記符号データ1単位のビット数を設定し
て、上記算術符号化手段により上記符号データをデータ
圧縮することを特徴とする画像と符号のデータ圧縮方
法。
1. A method of compressing an image and a code for selectively inputting binary image data having a constant number of pixels of one line and code data having a constant number of bits of one unit for data compression. , Input data is arranged in parallel by a fixed number, the symbol appearance probability of the bit of interest is predicted from the state of each bit around the bit of interest, and data is compressed by encoding the correspondence between the predicted value and the actual symbol. 1
When two binary image data are compressed, the number of pixels of one line is set as the fixed number of the data arranged in parallel, and the binary coding is performed by the arithmetic coding means. On the other hand, when compressing the image data while compressing the code data, the number of bits per unit of the code data is set as the fixed number, and the code data is compressed by the arithmetic coding means. Image and code data compression method characterized by.
【請求項2】 上記符号データは文字コードであること
を特徴とする請求項1記載の画像と符号のデータ圧縮方
法。
2. The image and code data compression method according to claim 1, wherein the code data is a character code.
【請求項3】 上記2値画像データおよび上記符号デー
タのデータ圧縮を開始する際には、それぞれデータの種
別を示す識別コードを出力した後符号化データを出力す
ることを特徴とする請求項1記載の画像と符号のデータ
圧縮方法。
3. When the data compression of the binary image data and the coded data is started, the coded data is output after outputting the identification code indicating the type of each data. Image and code data compression method described.
【請求項4】 上記識別コードには、上記データを並列
配置する上記一定数を示す情報を含むことを特徴とする
請求項3記載の画像と符号のデータ圧縮方法。
4. The image and code data compression method according to claim 3, wherein the identification code includes information indicating the fixed number of the data arranged in parallel.
JP21234692A 1992-07-17 1992-07-17 Image and code data compression Expired - Fee Related JP3193140B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21234692A JP3193140B2 (en) 1992-07-17 1992-07-17 Image and code data compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21234692A JP3193140B2 (en) 1992-07-17 1992-07-17 Image and code data compression

Publications (2)

Publication Number Publication Date
JPH0638048A true JPH0638048A (en) 1994-02-10
JP3193140B2 JP3193140B2 (en) 2001-07-30

Family

ID=16621021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21234692A Expired - Fee Related JP3193140B2 (en) 1992-07-17 1992-07-17 Image and code data compression

Country Status (1)

Country Link
JP (1) JP3193140B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998033322A1 (en) * 1997-01-29 1998-07-30 Mitsubishi Denki Kabushiki Kaisha Coding method, decoding method, coding device and decoding device
EP0952553A2 (en) * 1998-04-21 1999-10-27 Nec Corporation Method and apparatus for pattern matching coding
US6016361A (en) * 1996-11-05 2000-01-18 Nec Corporation Method and apparatus for compressing binary data using pattern matching encoding
US6327384B1 (en) 1996-11-13 2001-12-04 Nec Corporation Character recognition apparatus and method for recognizing characters

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016361A (en) * 1996-11-05 2000-01-18 Nec Corporation Method and apparatus for compressing binary data using pattern matching encoding
US6327384B1 (en) 1996-11-13 2001-12-04 Nec Corporation Character recognition apparatus and method for recognizing characters
WO1998033322A1 (en) * 1997-01-29 1998-07-30 Mitsubishi Denki Kabushiki Kaisha Coding method, decoding method, coding device and decoding device
US6351569B1 (en) 1997-01-29 2002-02-26 Mitsubishi Denki Kabushiki Kaisha Coding method, decoding method, coding device and decoding device
EP0952553A2 (en) * 1998-04-21 1999-10-27 Nec Corporation Method and apparatus for pattern matching coding
EP0952553A3 (en) * 1998-04-21 2002-06-12 Nec Corporation Method and apparatus for pattern matching coding
US6445821B1 (en) 1998-04-21 2002-09-03 Nec Corporation Pattern matching coding device using pattern matching and coding method therefor
EP1522965A1 (en) * 1998-04-21 2005-04-13 Nec Corporation Method and apparatus for pattern matching coding

Also Published As

Publication number Publication date
JP3193140B2 (en) 2001-07-30

Similar Documents

Publication Publication Date Title
US4800441A (en) Binary data compression and expansion processing apparatus
US5032838A (en) Variable length code parallel decoding apparatus and method
US5177622A (en) Method and apparatus for detecting run length of two successive pixels and subjecting run length to universal coding
KR101678223B1 (en) Multimedia signature coding and decoding
JPH0366227A (en) Method and system for compression coding and decoding method
EP0658982B1 (en) System for bi-level symbol coding-decoding with saved storage and method for the same
US6385341B1 (en) Technique for decoding variable length data codes
US5960117A (en) Method of adaptive arithmetic encoding/decoding according to JBIG standard
JPH0638048A (en) Data compressing method for image and code
JP2003526986A (en) Arithmetic decoding of arithmetically encoded information signals
JP3197408B2 (en) Additional bit processing device for marker identification
JPH06121174A (en) Encoder/decoder
JP2891818B2 (en) Encoding device
EP0930787B1 (en) Image coding apparatus using pattern coding
JP2842045B2 (en) Data compression device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP2795023B2 (en) Encoding device
JP2000115549A (en) Device and method for encoding and device and method for decoding
JP3108243B2 (en) Encoding and decoding device
JPH05183759A (en) Encoder and decoder using arithmetic code
JP2007116501A (en) Arithmetic encoding and decoding device
KR20060020154A (en) High-speed character recognition method and apparatus
JP2000217005A (en) Data coding method/decoding method, data coder/decoder, and image data recording system using the data coding method/decoding method
JP2806310B2 (en) Encoding device and facsimile device having the same
JPH06319046A (en) Mathematical encoding method and transmitting method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080525

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090525

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100525

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees