JP3193140B2 - Image and code data compression - Google Patents

Image and code data compression

Info

Publication number
JP3193140B2
JP3193140B2 JP21234692A JP21234692A JP3193140B2 JP 3193140 B2 JP3193140 B2 JP 3193140B2 JP 21234692 A JP21234692 A JP 21234692A JP 21234692 A JP21234692 A JP 21234692A JP 3193140 B2 JP3193140 B2 JP 3193140B2
Authority
JP
Japan
Prior art keywords
data
code
image
bit
symbol
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.)
Expired - Fee Related
Application number
JP21234692A
Other languages
Japanese (ja)
Other versions
JPH0638048A (en
Inventor
雅岳 大森
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

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

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 When data is transmitted or stored, data compression is often performed. As a coding method for performing data compression, an arithmetic code or a Ziv-Lempe (Ziv-Lempe) which is one of predictive coding methods is used.
The universal code of l) is known.

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

【0004】ところで、画像データと符号データの内の
どちらでも任意に選択してデータ圧縮したいという場合
がある。
There is a case where it is desired to arbitrarily select either image data or code data and compress the data.

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

【0006】一方、例えば、特開平3−70268号公
報に見られるように、画像データと文字コードデータと
を1つの符号化手段によりデータ圧縮するものが提案さ
れている。
On the other hand, for example, as disclosed in Japanese Patent Application Laid-Open No. 3-70268, there has been proposed a technique 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)方式
により符号化した後、その符号化により得られるランレ
ングスコードやモード情報に固定長コードを割り付け、
その固定長コードをユニバーサル符号によりデータ圧縮
している。この処理により、文字コードや固定長コード
の各データの周期性が吸収され、圧縮効果が比較的高く
なる。
[0007] In this proposal, character code data is subjected to data compression by a universal code in byte units.
The image data is MH (Modified Huf).
fman), MR (Modified Relativ)
e Element Address Designna
te) or MMR (Modified MR) method, 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 a 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 apparatus is complicated as described above.

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

【0010】[0010]

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

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

【0012】[0012]

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

【0013】[0013]

【作用】符号化手段は1つだけでよいので、装置構成が
簡単になる。また、画像データは、算術符号化手段によ
り従来どおりデータ圧縮するので、高い圧縮効果が得ら
れる。また、符号データは、シンボル出現確率を予測す
る際に、符号データ1単位ずつ並列配置するので、注目
ビットと周囲の各ビット間の相関が強くなる。これによ
り、予測精度が向上し、符号データにおいても高い圧縮
効果が得られるようになる。
Since only one encoding means is required, the structure of the apparatus is simplified. Further, since the image data is compressed as before by the arithmetic coding means, a high compression effect can be obtained. Further, when predicting the symbol appearance probability, the code data is arranged one by one in parallel with the code data, so that 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 code data.

【0014】[0014]

【実施例】以下、添付図面を参照しながら、本発明の実
施例を詳細に説明する。
Embodiments of the present invention will be described below 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 showing an encoding apparatus according to one embodiment of the present invention. In the figure,
The P / S converter 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 inputting character code data. The reference symbol acquiring means 3 is for arranging the input data in a fixed number at a time and determining the state of each bit around the bit of interest. The reference symbol acquiring means 3 includes a one-line bit number switching means 3a for switching the above-mentioned fixed number for arranging the input data in two stages in two stages.

【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 probabilities of symbols.
The predicted value / probability data selection table 5 is a data table that stores a predicted value of a symbol and a pointer pointing to one probability value in the probability table 4 corresponding to each of the determined bit states. is there. The prediction determining means 6 determines whether the predicted value of the symbol matches the actual value, that is, whether or not the prediction was successful. In addition, this determination result indicates, in other words, whether the data symbol is an MPS (dominant symbol) or an 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 according to the hit state of symbol prediction. The identification code insertion means 9 inserts an identification code indicating which data is prior to each of the encoded data of the image and the character.

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

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

【0020】出力切換手段12は、画像データを再生し
た場合と文字コードデータを再生した場合とで、信号路
を切り換えるものである。S/P変換手段13は、シリ
アル信号のデータをパラレル信号に変換するものであ
る。
The output switching means 12 switches the signal path between when the image data is reproduced and when 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 according to 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 executing a main scan and a sub scan at a fixed resolution on a document image, 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 form of an ASCII code.

【0023】この符号化装置は、図3に示すように、デ
ータ種別信号が入力されると、その信号により入力され
るデータの種別を判別する(処理101)。いま、例え
ば、入力データが画像データであったとすると(処理1
01の「画像」)、入力切換手段2で画像データ側を選
択し(処理102)、識別コード挿入手段9から画像で
あることを示す識別コードを出力する(処理103)。
そして、1ラインビット数切換手段3aで1ラインのビ
ット数を原稿画像の主走査方向の画素数に設定する(処
理104)。
As shown in FIG. 3, when a data type signal is input, the coding apparatus determines the type of data input by the signal (process 101). Now, for example, if the input data is image data (processing 1
01, “image”), the image data side is selected by the input switching means 2 (processing 102), and an identification code indicating an image is output from the identification code inserting means 9 (processing 103).
Then, the one-line bit number switching means 3a sets the number of bits of one line to the number of pixels in the main scanning direction of the original image (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 (processing 105). An identification code indicating a character is output (process 106). Then, the one-line bit number switching means 3a sets the number of bits of one 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 image data is input, the image data is input to the reference symbol acquisition unit 3 as it is. When character code data is input, P / S
The signal 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, input data is sequentially arranged in parallel by the set number of bits per line. Then, paying attention to each input bit, according to a preset template T,
The 10-bit data at a fixed position with respect to the target bit X is extracted. 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 immediately before the previous line.

【0027】この取り出したデータD0〜D9は10ビ
ットなので、図5(a)に示すように、シンボルパター
ンの各状態を整理すると1024通りになる。参照シン
ボル取得手段3は、取り出したデータD0〜D9のシン
ボルパターンを状態0〜1023というように判別す
る。
Since the extracted data D0 to D9 are 10 bits, as shown in FIG. 5A, the states of the symbol patterns are arranged in 1024 patterns. The reference symbol acquisition means 3 determines the symbol pattern 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 includes:
As shown in FIG. 13B, the predicted value of the MPS and the pointer value 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 to which serial numbers are assigned, 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)。
The prediction judging means 6 judges whether or not the prediction is correct by comparing the predicted value of the MPS with the symbol of the input data. In other words, this determination result indicates that the symbol of the input data is MPS or LP
S. The arithmetic code generating means 7 generates an arithmetic code by a known operation based on the determination result and the probability value, and outputs the generated arithmetic code to the outside (the above processing 10).
8).

【0030】上記符号化動作に並行して、テーブル書換
手段8は、シンボル予測が的中した回数と、外れた回数
とをそれぞれ計数する(処理109)。そして、計数し
たそれぞれの回数が、予め規定されている回数に達した
かどうか判定する(処理110)。規定回数に達しない
場合には(処理110のN)、次にデータ種別信号によ
りデータの切り換えが指示されていないかどうか判別す
る(処理111)。データの切り換えが指示されない場
合には(処理111のN)、データの終了がどうか判別
し(処理112)、終了でなければ(処理112の
N)、そのまま動作を継続する(処理108へ)。
In parallel with the above encoding operation, the table rewriting means 8 counts the number of times the symbol prediction was successful and the number of times the symbol prediction was missed (step 109). Then, it is determined whether or not the counted number has reached a predetermined number (step 110). If the specified number of times has not been reached (N in process 110), it is then determined whether or not data switching has been instructed by the data type signal (process 111). If data switching is not instructed (N in process 111), it is determined whether the data is completed (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 has been input. In this case, in the reference symbol acquiring means 3, the image data is arranged line by line as shown in FIG. 4, and data DO to D9 around the target bit X is extracted by the template T. In the case of image data, it is well known that the correlation between these data DO to D9 and the target bit X is strong. In the above encoding process,
The symbol of the bit of interest X is converted to data DO to D having a strong correlation.
9, the prediction accuracy is high and the data compression ratio is high.

【0032】次に、文字コードデータを入力しているも
のとする。この場合、参照シンボル取得手段3内では、
その文字コードデータは、8ビットを1ラインとして順
に配列され、上記と同様に、注目ビットX周辺の各デー
タDO〜D9が取り出される。
Next, it is assumed that character code data has been 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 described above.

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

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

【0035】一方、上記シンボル予測の的中回数、また
は外れた回数が規定回数に達した場合(処理110の
Y)、予測値・確率データ選択テーブル5に格納してい
るポインタ値の書き換える。すなわち、的中回数が規定
回数に達した場合には、確率テーブル4の確率テーブル
内のより高い確率値を指示するようにポインタ値を書き
換える。また、外れた回数が規定回数に達した場合に
は、その反対に、より低い確率値を指示するようにポイ
ンタ値を書き換える(処理113)。これにより、いま
符号化しているデータの特性に応じた適応化が行なわ
れ、シンボルの予測精度がさらに向上するようになる。
On the other hand, if the number of hits or misses of the symbol prediction reaches the specified number (Y in step 110), the pointer value stored in the predicted value / probability data selection table 5 is rewritten. That is, when the number of hits reaches the specified number, the pointer value is rewritten so as to indicate a higher probability value in the probability table of the probability table 4. On the other hand, when the number of departures reaches the specified number, the pointer value is rewritten so as to indicate a lower probability value (process 113). As a result, adaptation according to the characteristics of the data currently being encoded is performed, 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 step 111), the data type is determined, and the above processing is executed similarly (to step 10). As a result, as shown in FIG. 7, the encoded data of each of the image and the character is sequentially output together with the identification code indicating the data type. Then, when there is no more input data (Y in process 112), the above-described encoding process ends.

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

【0038】復号化装置には、上記符号化装置により符
号化されたデータ信号が入力される。復号化装置は、図
8に示すように、データ信号が入力されると、識別コー
ド検出・除去手段10は、識別コードを読み取ってデー
タ種別を判別する(処理201)。
The data signal encoded by the encoding device is input to the decoding device. As shown in FIG. 8, when a data signal is input to the decoding device, 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 bit number of one line is set by the one-line bit number switching means 3a to the number of pixels in the main scanning direction of the original image ( Process 203). If it is character code data ("character" in step 202), the number of bits per line is set to 8 bits by the one-line bit number switching means 3a (step 204). Then, in the case of image data, the signal line for image output is selected by the output switching means 12, and in the case of character data, the S / P conversion means 13 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 the information into 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 unit 6 restores the original data symbol 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. In the case of character code data, the data is converted into a parallel signal by the S / P converter 13 and output. In addition,
The reference symbol acquisition means 3, the predicted value / probability data selection table 5, the probability table 4, and the arithmetic code generation means 7 operate in the same manner as in the case of the above-described encoding apparatus.
Process 206).

【0041】上記復号化動作に並行して、図3の場合と
同様に、シンボルの予測結果を判定し、その判定結果に
応じて、予測値・確率データ選択テーブル5のポインタ
値を書き換える(処理109,処理110および処理1
13)。
In parallel with the above decoding operation, as in the case of FIG. 3, the symbol prediction result is determined, and the pointer value of the prediction value / probability data selection table 5 is rewritten according to the determination result (processing 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 or not the input data is completed (process 208). If not (N in process 208), the decoding operation is continued (process 206).
What). Then, when there is no more input data (Y in process 208), the above-described decoding process ends.

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

【0044】これにより、従来のように2種類の符号化
手段を備える必要がないため、装置構成が簡単になる。
また、復号化装置も、対応する算術符号の復号化手段を
1つ配設すればよいので、同様に装置構成が簡単にな
る。
As a result, it is not necessary to provide two types of encoding means as in the prior art, so that the apparatus configuration is simplified.
In addition, since the decoding device only needs to provide 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.
When the character code data is subjected to data compression, 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 extracted. I have to.

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

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

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

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

【0050】なお、上述の実施例では、コードデータと
して、アスキーコードの文字列情報を符号化する例を説
明したが、他の文字列コードでもよく、さらに文字でな
い各種コード情報でも同様に符号化することができる。
その場合、参照シンボル取得手段3内で並列配置する1
ラインビット数を、1つのコード長に設定すればよい。
例えば、JISコードの場合、1文字2バイトなので、
1ラインビット数を2バイトに設定する。さらに、その
1ラインビット数は、1つのコード長に限らず、そのコ
ード長の整数倍に設定してもよい。
In the above-described embodiment, an example in which character string information of an ASCII code is encoded as code data has been described. However, other character string codes may be encoded, and various non-character code information may also be encoded. can do.
In this case, 1 which is 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, each character is 2 bytes,
Set the number of bits per line to 2 bytes. Further, the number of bits per line 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 indicates only the data type, the identification code may further indicate the number of bits per line.

【0052】ところで、算術符号の符号化データは、疑
似ランダムデータになるため、出現しないデータパター
ンというものがない。このため、識別コードとして特定
符号を固定的に定義することができない。そこで、例え
ば、第1〜第3の各種符号を設定し、識別コードは、第
1と第2の符号が連続したものと定義する一方、符号化
の際に、符号化データに第1の符号が出現した場合に
は、その後に第3の符号を必ず挿入するように取り決め
る。これにより、符号化の際には、第1の符号を検出
し、さらに第2の符号を検出した場合に、識別コードで
あると判定することができる。
By the way, the encoded data of the arithmetic code is pseudo-random data, and there is no data pattern which does not appear. For this reason, the specific code cannot be fixedly defined as the identification code. Therefore, for example, 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. Appears, the third code must be inserted afterwards. Thus, upon encoding, the first code can be detected, and when the second code is detected, it can be determined that the code is an identification code.

【0053】[0053]

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

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

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

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

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

【図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 a method of arranging character code data.

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

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

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

1 P/S変換手段 2 入力切換手段 3 参照シンボル取得手段 3a 1ラインビット数切換手段 4 確率テーブル 5 予測値・確率データ選択テーブル 6 予測判定手段 7 算術符号生成手段 8 テーブル書換手段 9 識別コード挿入手段 10 識別コード検出・除去手段 11 算術符号復号手段 12 出力切換手段 13 S/P変換手段 DESCRIPTION OF SYMBOLS 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 Prediction value / probability data selection table 6 Prediction judgment 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

Claims (4)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2940496B2 (en) * 1996-11-05 1999-08-25 日本電気株式会社 Pattern matching encoding apparatus and method
JP2974061B2 (en) 1996-11-13 1999-11-08 日本電気株式会社 Pattern extraction device
US6351569B1 (en) 1997-01-29 2002-02-26 Mitsubishi Denki Kabushiki Kaisha Coding method, decoding method, coding device and decoding device
JP3095071B2 (en) 1998-04-21 2000-10-03 日本電気株式会社 Pattern matching encoding apparatus and encoding method therefor

Also Published As

Publication number Publication date
JPH0638048A (en) 1994-02-10

Similar Documents

Publication Publication Date Title
US5177622A (en) Method and apparatus for detecting run length of two successive pixels and subjecting run length to universal coding
US5032838A (en) Variable length code parallel decoding apparatus and method
EP0448802A2 (en) Dynamic model selection during data compression
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
JP3193140B2 (en) Image and code data compression
US5960117A (en) Method of adaptive arithmetic encoding/decoding according to JBIG standard
US6385341B1 (en) Technique for decoding variable length data codes
JPH07264417A (en) Image coding method
JP2003526986A (en) Arithmetic decoding of arithmetically encoded information signals
JPH05151349A (en) Image data compressing method and encoding circuit
JP2634793B2 (en) Color image signal encoding device
JPH06121174A (en) Encoder/decoder
JP3123795B2 (en) Encoding device and decoding device using arithmetic code
JP3433276B2 (en) Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer
JPH11317673A (en) Run length encoding and decoding method therefor
JP2842045B2 (en) Data compression device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP2809161B2 (en) Predictive coding device
JP2795023B2 (en) Encoding device
JP3321226B2 (en) Encoding / decoding method
JP3212393B2 (en) Encoding device
JP2859507B2 (en) Image data compression / decompression method and apparatus
JP3123791B2 (en) Encoding device and decoding device using arithmetic code

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