JP3212393B2 - Encoding device - Google Patents

Encoding device

Info

Publication number
JP3212393B2
JP3212393B2 JP35392792A JP35392792A JP3212393B2 JP 3212393 B2 JP3212393 B2 JP 3212393B2 JP 35392792 A JP35392792 A JP 35392792A JP 35392792 A JP35392792 A JP 35392792A JP 3212393 B2 JP3212393 B2 JP 3212393B2
Authority
JP
Japan
Prior art keywords
data
character code
character
code
bitmap
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 - Lifetime
Application number
JP35392792A
Other languages
Japanese (ja)
Other versions
JPH06189142A (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 JP35392792A priority Critical patent/JP3212393B2/en
Publication of JPH06189142A publication Critical patent/JPH06189142A/en
Application granted granted Critical
Publication of JP3212393B2 publication Critical patent/JP3212393B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime 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)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、画像データと文字コー
ドデータの内の一方を任意に選択してデータ圧縮する符
号化装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding apparatus for arbitrarily selecting one of image data and character code data and compressing the data.

【0002】[0002]

【従来の技術】データを伝送したり蓄積したりする場
合、データ圧縮がよく行なわれる。このようなデータ圧
縮を行なうための符号化法として、算術符号やジブ・レ
ンペル(Ziv−Lempel)のユニバーサル符号が
知られている。
2. Description of the Related Art When transmitting and storing data, data compression is often performed. As a coding method for performing such data compression, an arithmetic code and a Ziv-Lempel universal code are known.

【0003】算術符号は、予測符号化方式の一方式であ
り、マルコフ情報源のデータに適すると共に、データの
特性に応じた適応化が可能であるため、画像データのデ
ータ圧縮によく採用されている。一方、ユニバーサル符
号は、同一シンボルパターンの長いデータが繰り返し出
現するデータに対して圧縮効果が高いため、文字コード
データのデータ圧縮によく採用されている。
[0003] Arithmetic codes are one type of predictive coding method, and are suitable for data of Markov information sources and can be adapted according to the characteristics of the data. I have. On the other hand, a 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 character code data.

【0004】ところで、画像データと文字コードデータ
とを任意に選択してデータ圧縮したい場合がある。
In some cases, it is desired to select image data and character code data arbitrarily and compress the data.

【0005】従来は、このような場合、算術符号とユニ
バーサル符号というように、2種類の符号化法を使い分
けるようにしていた。このため、装置内に2種類の符号
化手段を備えなくてはならず、装置が複雑化していた。
Conventionally, in such a case, two types of coding methods, such as an arithmetic code and a 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号公
報に見られるように、画像データも文字データもユニバ
ーサル符号によりデータ圧縮するものが提案されてい
る。
On the other hand, as disclosed in, for example, Japanese Patent Application Laid-Open No. 3-70268, there has been proposed a technique in which both image data and character data are compressed by a universal code.

【0007】この提案では、文字コードデータは、1バ
イト単位にユニバーサル符号によりデータ圧縮してい
る。また、画像データは、MH(Modified H
uffman),MR(Modified Relat
ive Element Address Desig
nate)あるいはMMR(Modified MR)
方式により符号化した後、その符号化により得られるラ
ンレングスコードやモード情報に固定長コードを割り付
け、その固定長コードをユニバーサル符号によりデータ
圧縮している。
In this proposal, character code data is compressed by a universal code in byte units. The image data is MH (Modified H).
uffman), MR (Modified Relat)
live Element Address Design
nate) or MMR (Modified MR)
After encoding by a method, a fixed length code is allocated to a run length code and mode information obtained by the encoding, and the fixed length code is data-compressed by a universal code.

【0008】従って、上記提案では、ユニバーサル符号
の符号化手段だけでなく、MH,MRあるいはMMRと
いう別の符号化手段も必要になるため、前記と同様に、
装置が複雑化していた。
Accordingly, in the above proposal, not only the encoding means for the universal code but also another encoding means such as MH, MR or MMR is required.
The equipment was complicated.

【0009】[0009]

【発明が解決しようとする課題】このように、従来は、
画像データと文字コードデータを符号化する場合、複数
の符号化手段が必要になるため、装置が複雑化してしま
うという問題があった。
As described above, conventionally,
In the case of encoding image data and character code data, a plurality of encoding units are required, and there is a problem that the apparatus becomes complicated.

【0010】本発明は、上記の問題を解決し、簡単な装
置構成で画像データと文字コードデータをデータ圧縮す
ることができる符号化装置を提供することを目的とす
る。
An object of the present invention is to solve the above-mentioned problems and to provide an encoding apparatus capable of compressing image data and character code data with a simple apparatus configuration.

【0011】[0011]

【課題を解決するための手段】このために本発明は、画
像データまたは文字コードデータを任意に入力し、文字
コードデータに対しては、1文字1ビットに対応するビ
ットマップデータに展開するようにして、その展開した
ビットマップデータまたは画像データを算術符号の符号
化法によりデータ圧縮するようにしている。
According to the present invention, image data or character code data is arbitrarily input, and the character code data is developed into bitmap data corresponding to one bit per character. Then, the expanded bitmap data or image data is compressed by an arithmetic coding method.

【0012】また、文字コードデータをビットマップデ
ータに展開する場合、探索用文字コードを一定の順番で
1つずつ発生し、文字コードデータの各文字コードと探
索用文字コードとを照合して、一致・不一致によりビッ
トマップデータを生成するようにしている。
When character code data is developed into bitmap data, search character codes are generated one by one in a predetermined order, and each character code of the character code data is collated with the search character code. Bitmap data is generated by matching / mismatching.

【0013】[0013]

【作用】画像データも文字コードデータも、算術符号で
符号化するので、符号化手段が1つだけで済むため、装
置構成が簡単になる。また、文字コードデータを1文字
1ビットに対応するビットマップデータに展開した後、
算術符号により符号化するので、文字コードデータをそ
のまま符号化するより、高いデータ圧縮効果が得られ
る。
Since both image data and character code data are encoded by arithmetic codes, only one encoding means is required, so that the apparatus configuration is simplified. After expanding the character code data into bitmap data corresponding to one bit per character,
Since encoding is performed using arithmetic codes, a higher data compression effect can be obtained than when character code data is directly encoded.

【0014】[0014]

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

【0015】まず、本発明の第1の実施例を説明する。
図1は、本実施例の符号化装置のブロック構成図を示し
ている。図において、メモリ1は、入力される画像デー
タまたは文字コードデータを一時格納するものである。
切換回路2は、入力されるデータの種別により信号ルー
トを切り換えるものである。ビットマップ展開部3は、
文字コードデータを1文字1ビットに対応するビットマ
ップデータに変換するものである。符号化部4は、デー
タを算術符号の符号化法によりデータ圧縮するものであ
る。
First, a first embodiment of the present invention will be described.
FIG. 1 is a block diagram illustrating the configuration of an encoding apparatus according to the present embodiment. In the figure, a memory 1 temporarily stores input image data or character code data.
The switching circuit 2 switches a signal route according to the type of input data. The bitmap developing unit 3
It converts character code data into bitmap data corresponding to one bit per character. The encoding unit 4 compresses data by an arithmetic code encoding method.

【0016】符号化部4内において、参照シンボル取得
手段41は、処理するデータの各ビットに注目し、その
ビットに対して一定位置にある複数ビットのシンボルを
読み取るものである。予測部42は、その読み取られた
各ビットを参照して注目ビットのシンボルを予測するも
のである。算術符号生成部43は、その予測結果に基ず
いて算術符号を生成するものである。
In the encoding unit 4, a reference symbol acquisition unit 41 focuses on each bit of data to be processed and reads a symbol of a plurality of bits at a fixed position with respect to the bit. The prediction unit 42 predicts the symbol of the target bit with reference to the read bits. The arithmetic code generation unit 43 generates an arithmetic code based on the prediction result.

【0017】図2は、本実施例の復号化装置のブロック
構成図を示している。図において、復号化部5は、算術
符号の符号情報を元の画像データやビットマップデータ
に復元するものである。切換回路6は、データの種別に
より信号ルートを切り換えるものである。文字データ復
元部7は、ビットマップデータを文字コードデータに復
元するものである。メモリ8は、画像データや文字コー
ドデータを一時格納するものである。
FIG. 2 is a block diagram showing the configuration of the decoding apparatus according to the present embodiment. In the figure, a decoding unit 5 restores code information of an arithmetic code to original image data and bitmap data. The switching circuit 6 switches the signal route according to the type of data. The character data restoring unit 7 restores bitmap data to character code data. The memory 8 temporarily stores image data and character code data.

【0018】復号化部5内において、算術符号復号部5
1は、算術符号の符号情報を符号化前のデータに1ビッ
トずつ復元するものである。参照シンボル取得部52
は、復元されたデータの各ビットに注目し、図1の参照
シンボル取得手段41と同様に、一定位置の各ビットを
読み取るものである。予測部53は、その読み取られた
各ビットのシンボルを参照して、注目ビットを予測する
ものである。
In the decoding unit 5, the arithmetic code decoding unit 5
Numeral 1 restores the code information of the arithmetic code to the data before encoding one bit at a time. Reference symbol acquisition unit 52
Focuses on each bit of the restored data, and reads each bit at a fixed position, similarly to the reference symbol acquisition unit 41 of FIG. The prediction unit 53 predicts a target bit with reference to the read symbol of each bit.

【0019】以上の構成で、本実施例の符号化装置に
は、画像データまたは文字コードデータが入力される。
画像データは、例えば、原稿画像をスキャナ装置により
1ラインずつ読み取ることにより得られる黒白画像のデ
ータである。文字コードデータは、例えば、ASCII
(American National Standa
rd Code for Infomation In
terchange)コードの文字情報のデータであ
る。
With the above configuration, image data or character code data is input to the encoding device of the present embodiment.
The image data is, for example, black-and-white image data obtained by reading a document image line by line by a scanner device. Character code data is, for example, ASCII
(American National Standa
rd Code for Information In
This is data of character information of a (change) code.

【0020】入力されたデータは、メモリ1に一時格納
された後、1ビットずつ順次読み出される。
The input data is temporarily stored in the memory 1 and then read out bit by bit.

【0021】画像データを処理する場合、メモリ1から
読み出された画像データは、切換回路2の切り換えによ
り、直接符号化部4に入力される。
When processing image data, the image data read from the memory 1 is directly input to the encoding unit 4 by switching of the switching circuit 2.

【0022】参照シンボル取得手段41は、入力された
画像データの各ビットに注目し、その注目ビット周囲の
一定範囲の各ビットデータを読み取る。予測部42は、
読み取られた各ビットのシンボルにより、注目ビットの
シンボルを予測する。算術符号生成部43は、その予測
値に基ずいて算術符号を生成する。これにより、入力さ
れた画像データが、符号化によりデータ圧縮される。
The reference symbol obtaining means 41 pays attention to each bit of the input image data and reads each bit data in a certain range around the bit of interest. The prediction unit 42
The symbol of the target bit is predicted based on the read symbol of each bit. The arithmetic code generation unit 43 generates an arithmetic code based on the predicted value. As a result, the input image data is subjected to data compression by encoding.

【0023】一方、文字コードデータを処理する場合、
メモリ1から読み出された文字コードデータは、切換回
路2の切り換えにより、ビットマップ展開部3に入力さ
れる。
On the other hand, when processing character code data,
The character code data read from the memory 1 is input to the bitmap developing unit 3 by switching of the switching circuit 2.

【0024】図3は、このビットマップ展開部3の動作
を示している。すなわち、ビットマップ展開部3は、起
動すると、文字コード検索のための変数CODEを「0
0」とおく(処理101)。そして、入力された文字コ
ードデータを1バイト読み取る(処理102)。この1
バイトは1文字に相当し、1つの文字コードを表してい
る。
FIG. 3 shows the operation of the bitmap developing section 3. That is, when activated, the bitmap developing unit 3 sets the variable CODE for character code search to “0”.
0 ”(process 101). Then, one byte of the input character code data is read (process 102). This one
A byte corresponds to one character and represents one character code.

【0025】次いで、その1バイトのデータと、上記変
数CODEとを照合する(処理103)。ここで、両者
が一致する場合(処理103のY)、符号化部4に1ビ
ットのデータ「1」を出力し(処理104)、不一致の
場合(処理103のN)、データ「0」を出力する(処
理105)。
Next, the 1-byte data is collated with the variable CODE (step 103). Here, if they match (Y in processing 103), 1-bit data “1” is output to the encoding unit 4 (processing 104), and if they do not match (N in processing 103), the data “0” is output. Output (process 105).

【0026】そして、文字コードデータの入力をチェッ
クして(処理106)、データがまだある場合(処理1
06のN)、1バイトずつ同様の処理を繰り返す(処理
102へ)。このようにして、文字コードデータの全ビ
ットに対して一通り処理し終わると(処理106の
Y)、変数CODEが「FFh」(「h」は16進数を
示す)に達しているがどうか判別する(処理107)。
Then, the input of the character code data is checked (step 106), and if data is still present (step 1).
(N of 06) The same process is repeated for each byte (to process 102). In this way, when all the bits of the character code data are completely processed (Y in process 106), it is determined whether or not the variable CODE has reached “FFh” (“h” indicates a hexadecimal number). (Step 107).

【0027】変数CODEが「FFh」に達していない
場合には(処理107のN)、変数CODEを+1して
(処理108)、文字コードデータの読取位置を先頭に
戻す(処理109)。
If the variable CODE has not reached "FFh" (N in process 107), the variable CODE is incremented by 1 (process 108), and the read position of the character code data is returned to the beginning (process 109).

【0028】そして、同様の処理を繰り返す(処理10
2へ)。そして、変数CODEが「FFh」に達したと
き(処理107のY)、動作を終了する。
Then, the same processing is repeated (processing 10
2). When the variable CODE reaches “FFh” (Y in step 107), the operation ends.

【0029】いま、簡単な一例として、文字コードデー
タが「abcabc」という6文字のデータであったす
る。ASCIIコードでは、文字「a」が「61h」、
「b」が「62h」、「c」が「63h」である。従っ
て、この場合、図4に示すように、上記変数CODE
を、61h〜63hに設定したとき、それぞれ文字コー
ドの一致が検出される。すなわち、この例では、文字デ
ータの1つの面を、各文字に対応した3つの面に展開し
たと考えることができる。そして、各面ごとにビットマ
ップデータが生成されることになる。
Now, as a simple example, assume that the character code data is six-character data "abcabc". In the ASCII code, the character "a" is changed to "61h",
“B” is “62h” and “c” is “63h”. Therefore, in this case, as shown in FIG.
Are set to 61h to 63h, a match between the character codes is detected. That is, in this example, it can be considered that one surface of the character data is developed into three surfaces corresponding to each character. Then, bitmap data is generated for each surface.

【0030】次に、文字コードデータが、図5に示すよ
うに、C言語のソースプログラムののデータであったと
する。この場合、図6に示すように、変数CODEが、
スペースを示す「20h」になったとき、「00000
00010・・・」というビットマップデータが得られ
る。また、変数CODEが、記号「#」を示す「23
h」になったとき、「100・・・」というビットマッ
プデータが得られる。また、文字「i」を示す「69
h」になったとき、「010・・」というビットマップ
データが得られる。このようにして得られたビットマッ
プデータが符号化部4に入力される。
Next, assume that the character code data is data of a C language source program as shown in FIG. In this case, as shown in FIG.
When it becomes "20h" indicating a space, "00000"
.0000 "is obtained. The variable CODE is set to “23” indicating the symbol “#”.
h ", bitmap data" 100... "is obtained. Also, “69” indicating the character “i”
When "h" is reached, bit map data "010..." is obtained. The bitmap data thus obtained is input to the encoding unit 4.

【0031】符号化部4では、入力されたビットマップ
データを、前記画像データと同様に符号化する。なお、
この場合、各文字に対応する個々のビットマップデータ
をそれぞれ1ページの画像データとして処理する。ま
た、参照シンボル取得手段41では、入力されるビット
マップデータを画像データの1ライン分ずつ配列して、
注目ビット周囲の一定位置の各ビットを読み取る。
The encoding unit 4 encodes the input bitmap data in the same manner as the image data. In addition,
In this case, individual bitmap data corresponding to each character is processed as one page of image data. Further, the reference symbol acquisition means 41 arranges the input bitmap data for each line of the image data,
Each bit at a certain position around the target bit is read.

【0032】次に、以上のように生成された符号情報を
復号化する場合、符号情報は、復号化装置の復号化部5
に入力される。算術符号復号部51は、入力された符号
情報と、予測部53から出力される注目画素のシンボル
の予測結果とに基ずいて、データを1ビットずつ復元す
る。参照シンボル取得部52は、復元されるデータの各
ビットに注目し、そのビットに対して一定位置にある複
数ビットのシンボルを読み取る。予測部53は、その読
み取られた各ビットのシンボルを参照して注目ビットの
シンボルを予測する。算術符号復号部51は、その予測
結果を入力して上記復号化を実行する。
Next, when decoding the code information generated as described above, the code information is transmitted to the decoding unit 5 of the decoding device.
Is input to The arithmetic code decoding unit 51 restores the data one bit at a time based on the input code information and the prediction result of the symbol of the pixel of interest output from the prediction unit 53. The reference symbol acquisition unit 52 pays attention to each bit of the data to be restored, and reads a symbol of a plurality of bits at a fixed position with respect to the bit. The prediction unit 53 predicts the symbol of the target bit with reference to the read symbol of each bit. The arithmetic code decoding unit 51 receives the prediction result and executes the decoding.

【0033】復号化部5で画像データが復元された場合
には、その画像データは、切換回路6の所定の切り換え
により、直接メモリ8に入力されて一時格納される。
When the image data is restored by the decoding unit 5, the image data is directly input to the memory 8 and temporarily stored by a predetermined switching of the switching circuit 6.

【0034】また、文字情報であるビットマップデータ
が復元された場合には、文字データ復元部7に入力され
る。文字データ復元部7は、入力されたビットマップデ
ータから1つ1つの文字コードを生成し、生成した文字
コードを配列して、元の文字コードデータを復元する。
復元した文字コードデータは、メモリ8に入力されて一
時格納される。
When the bitmap data as the character information is restored, it is input to the character data restoring unit 7. The character data restoring unit 7 generates character codes one by one from the input bitmap data, arranges the generated character codes, and restores the original character code data.
The restored character code data is input to the memory 8 and is temporarily stored.

【0035】メモリ8に格納された画像データや文字コ
ードデータは、必要に応じて他の装置に出力される。
The image data and character code data stored in the memory 8 are output to another device as needed.

【0036】以上のように、本実施例では、画像データ
は、そのまま符号化部4で符号化する一方、文字コード
データは、ビットマップ展開部3により、1文字1ビッ
トに対応するビットマップデータに展開した後、符号化
部4で符号化するようにしている。これにより、符号化
回路は、符号化部4だけで、2値画像データと文字コー
ドデータをデータ圧縮することができるので、装置構成
が簡単になる。
As described above, in this embodiment, the image data is encoded by the encoding unit 4 as it is, while the character code data is converted by the bitmap development unit 3 into bitmap data corresponding to one bit per character. After that, the encoding unit 4 performs encoding. Thus, the encoding circuit can compress the binary image data and the character code data only by the encoding unit 4, thereby simplifying the device configuration.

【0037】また、復号化装置も、復号化部5だけで、
2値画像データと文字コードデータを復元できるので、
同様に装置構成が簡単になる。
Also, the decoding device is also composed of only the decoding unit 5,
Since binary image data and character code data can be restored,
Similarly, the device configuration is simplified.

【0038】また、文字コードデータをビットマップデ
ータに展開する場合、探索用文字コードを一定の順番で
1つずつ発生して、文字コードデータの各文字コードと
探索用文字コードとの照合結果により、ビットマップデ
ータを生成するようにしている。
When character code data is developed into bitmap data, search character codes are generated one by one in a fixed order, and the character codes of the character code data are compared with the search character codes. , Bitmap data is generated.

【0039】この場合、得られるビットマップデータ内
のビット「1」は、同一文字が出現する位置に対応す
る。一般に、1つの文書中の1つの文字に注目した場
合、その周囲の特定位置に同一文字が見られる確率が高
い。従って、このようなビットマップデータを算術符号
の符号化法により復号化するので、比較的高いデータ圧
縮効果が得られるようになる。
In this case, bit "1" in the obtained bitmap data corresponds to a position where the same character appears. In general, when attention is paid to one character in one document, there is a high probability that the same character is found at a specific position around the one character. Therefore, since such bitmap data is decoded by the arithmetic coding method, a relatively high data compression effect can be obtained.

【0040】次に、本発明の第2の実施例を説明する。Next, a second embodiment of the present invention will be described.

【0041】本実施例は、図3で説明した文字コードデ
ータの処理方法を一部変更したものである。すなわち、
本実施例では、図7に示すように、変数CODEの値と
文字コードとが一致し(処理103のY)、符号化部4
にデータ「1」を出力した場合、文字コードデータ内の
該当する1バイトを消去しておく(処理110)。
This embodiment is a partial modification of the character code data processing method described with reference to FIG. That is,
In the present embodiment, as shown in FIG. 7, the value of the variable CODE matches the character code (Y in process 103), and the encoding unit 4
When the data "1" is output to the corresponding character code, the corresponding one byte in the character code data is deleted (process 110).

【0042】いま、例えば、図8に示すように「abc
abcabc」という文字コードデータを、このように
処理したとする。すると、文字「a」の処理で「100
100100」というビットマップデータが符号化部4
に出力される。この処理で、「a」の文字コードデータ
が消去されるので、「bcbcbc」というデータが残
る。次に、文字「b」の処理で「101010」という
ビットマップデータが出力される。このとき、「b」の
文字コードデータが消去されるので、「ccc」という
データが残る。そして、文字「c」の処理で「111」
というビットマップデータが出力され、処理が終了す
る。
Now, for example, as shown in FIG.
It is assumed that the character code data “abcabc” is processed in this manner. Then, in the processing of the character “a”, “100”
The bitmap data “100100” is
Is output to In this process, the character code data of “a” is deleted, so that data of “bcbcbc” remains. Next, bitmap data “101010” is output in the processing of the character “b”. At this time, since the character code data of "b" is deleted, data of "ccc" remains. Then, in the processing of the character "c", "111"
Is output, and the process ends.

【0043】符号化部4は、入力された上記ビットマッ
プデータを、前述の実施例と同様に、所定の符号情報に
符号化する。
The encoding unit 4 encodes the input bitmap data into predetermined code information in the same manner as in the above embodiment.

【0044】一方、その符号情報を復号する場合、前述
の実施例と同様に、復号化部5が符号情報をビットマッ
プデータに復元する。そして、文字データ復元部7は、
そのビットマップデータを元の文字コードデータに復元
する。
On the other hand, when decoding the code information, the decoding unit 5 restores the code information to bitmap data as in the above-described embodiment. Then, the character data restoration unit 7
The bitmap data is restored to the original character code data.

【0045】ここで、文字データ復元部7が、上記の例
で作成されたビットマップデータを復元するものとす
る。この場合、文字データ復元部7は、まず「1001
00100」という9ビットのビットマップデータを入
力する。この場合、そのビット数により全文字数が9文
字であると判定する。そして、図9に示すように、その
9文字の内、ビット「1」に対応する文字を「a」と判
定する。次に、ビットマップデータ「101010」を
入力すると、その6ビットを、まだ判定していない6文
字分の位置に対応させる。そして、そのビットマップデ
ータのビット「1」に対応する文字を「b」と判定す
る。次に、ビットマップデータ「111」を入力する
と、その3ビットを、まだ判定していない3文字分の位
置に対応させる。そして、そのビットマップデータのビ
ット「1」に対応する文字を「c」と判定する。このよ
うにして、元の9文字の文字コードデータ「abcab
cabc」を復元する。
Here, it is assumed that the character data restoration unit 7 restores the bitmap data created in the above example. In this case, the character data restoration unit 7 first sets “1001
"00100" is input. In this case, it is determined that the total number of characters is 9 based on the number of bits. Then, as shown in FIG. 9, of the nine characters, the character corresponding to bit “1” is determined to be “a”. Next, when the bitmap data “101010” is input, the 6 bits are made to correspond to positions of six characters that have not been determined yet. Then, the character corresponding to the bit “1” of the bitmap data is determined to be “b”. Next, when the bitmap data “111” is input, the three bits are made to correspond to the positions of three characters that have not been determined. Then, the character corresponding to the bit “1” of the bitmap data is determined to be “c”. In this way, the original nine-character character code data "abcab
cabc "is restored.

【0046】以上のように、本実施例では、文字コード
データをビットマップデータに展開する際に、1つの文
字を1ビットのビットマップデータに変換すると、該当
する文字コードデータを消去するようにしている。これ
により、処理の進行につれて処理対象の文字コードデー
タが減少するため、生成されるビットマップデータのデ
ータ量を削減することができる。従って、符号化処理を
短時間で実行することができると共に、生成される符号
情報も削減されることになる。
As described above, in the present embodiment, when one character is converted into 1-bit bitmap data when the character code data is developed into bitmap data, the corresponding character code data is deleted. ing. As a result, the character code data to be processed decreases as the processing proceeds, so that the data amount of the generated bitmap data can be reduced. Therefore, the encoding process can be performed in a short time, and the generated code information is reduced.

【0047】次に、本発明の第3の実施例を説明する。Next, a third embodiment of the present invention will be described.

【0048】本実施例は、図3で説明した文字コードデ
ータの処理方法を変更したものである。すなわち、本実
施例では、図10に示すように、最初にメモリ1に格納
されている文字コードデータ内で、使用されている全て
の文字コードを抽出する。ここで、n個の文字コードを
抽出したとすると、抽出した各コードをCODE1〜C
ODEnとおく(処理201)。
This embodiment is a modification of the character code data processing method described with reference to FIG. That is, in this embodiment, as shown in FIG. 10, first, all the used character codes are extracted from the character code data stored in the memory 1. Here, assuming that n character codes are extracted, the extracted codes are CODE1 to C
ODEn (process 201).

【0049】そして、上記コードCODE1〜CODE
nについてのみ、文字コードデータからビットマップデ
ータへの展開処理を実行する。すなわち、図3の処理と
異なる点は、図3では、常に文字コード「00h」〜
「FFh」までの全文字について、文字コードデータか
らビットマップデータへの展開処理を実行するようにし
たが、本実施例では、文字コードデータ内に含まれる文
字についてのみ、その展開処理を実行する(処理20
2)。
Then, the codes CODE1 to CODE
For only n, the expansion processing from character code data to bitmap data is executed. That is, the difference from the processing in FIG. 3 is that in FIG.
Although the expansion processing from character code data to bitmap data is executed for all characters up to “FFh”, in this embodiment, the expansion processing is executed only for characters included in the character code data. (Process 20
2).

【0050】図3の処理では、文字コードデータ内に含
まれない文字を展開処理した場合、オール「0」という
ビットマップデータが生成されていたが、本実施例で
は、そのようなビットマップデータを生成することがな
くなるので、短時間で処理できる。なお、復号化装置側
で、ビットマップデータを元の文字コードデータに復元
する場合、オール「0」というビットマップデータはな
くてもよい。
In the processing of FIG. 3, when a character not included in the character code data is expanded, bitmap data of all “0” is generated. In the present embodiment, such bitmap data is generated. Can be generated in a short time. When the decoding device restores the bitmap data to the original character code data, the bitmap data having all “0” s may not be present.

【0051】次に、本発明の第4の実施例を説明する。Next, a fourth embodiment of the present invention will be described.

【0052】本実施例は、図10で説明した上記処理方
法をさらに変更したものである。すなわち、本実施例で
は、図11に示すように、上記と同様に、まず文字コー
ドデータ内の全ての文字コードCODE1〜CODEn
を抽出する(処理301)。そして、抽出した各文字コ
ードCODE1〜CODEnを、文字コードデータ内の
出現度数の順に並び換える(処理203)。そして、そ
の並び換えた順番で、文字コードデータからビットマッ
プデータへの展開処理を実行する(処理204)。
This embodiment is a further modification of the processing method described above with reference to FIG. That is, in the present embodiment, as shown in FIG. 11, all the character codes CODE1 to CODEn in the character code data are
Is extracted (process 301). Then, the extracted character codes CODE1 to CODEn are rearranged in the order of the appearance frequency in the character code data (process 203). Then, in the rearranged order, expansion processing from character code data to bitmap data is executed (process 204).

【0053】ここで、例えば、図12(イ)に示すよう
な「aaababaababaa」という13文字の文
字コードデータを処理する場合を考える。この文字コー
ドデータを文字「a」,「b」の順でビットマップデー
タに展開する場合、同図(ロ)に示すように、文字
「a」で13ビット、文字「b」で9ビットのビットマ
ップデータがそれぞれ得られ、合計22ビットになる。
Here, for example, consider the case of processing character code data of 13 characters "aaaababaababa" as shown in FIG. When this character code data is developed into bitmap data in the order of characters "a" and "b", as shown in FIG. 2B, 13 bits for character "a" and 9 bits for character "b" Bitmap data is obtained respectively, for a total of 22 bits.

【0054】一方、文字「b」,「a」の順でビットマ
ップデータに展開する場合、同図(ハ)に示すように、
文字「a」で13ビット、文字「b」で4ビットのビッ
トマップデータがそれぞれ得られ、合計17ビットに減
少する。
On the other hand, when the data is expanded into bitmap data in the order of the characters "b" and "a", as shown in FIG.
13-bit bitmap data is obtained for the character "a" and 4-bit bitmap data is obtained for the character "b".

【0055】上記文字コードの場合、文字「a」の出現
度数が高い。従って、出現度数の高い文字を先に処理す
る方が、ビットマップデータのビット数を削減できるこ
とが分る。
In the case of the above character code, the appearance frequency of the character "a" is high. Therefore, it can be seen that processing the character having the higher appearance frequency first can reduce the number of bits of the bitmap data.

【0056】本実施例では、複数の文字について出現度
数の高い順に処理するので、ビットマップデータのビッ
ト数を最も削減することができる。
In this embodiment, a plurality of characters are processed in descending order of appearance frequency, so that the number of bits of bitmap data can be reduced most.

【0057】次に、本発明の第5の実施例を説明する。Next, a fifth embodiment of the present invention will be described.

【0058】本実施例は、図10で説明した上記処理方
法をさらに変更したものである。すなわち、本実施例で
は、図13に示すように、様々な文字コードデータにお
いて、一般的に出現確率の高い順に、各文字の文字コー
ドCODE1〜CODE256を予め記憶しておく。
This embodiment is a further modification of the processing method described with reference to FIG. That is, in this embodiment, as shown in FIG. 13, character codes CODE1 to CODE256 of various characters are stored in advance in various character code data in general in descending order of appearance probability.

【0059】そして、図14に示すように、記憶してい
る出現確率の順番で、文字コードデータからビットマッ
プデータへの展開処理を実行する(処理205)。
Then, as shown in FIG. 14, expansion processing from character code data to bitmap data is executed in the order of the stored appearance probabilities (step 205).

【0060】この処理方法により、図10あるいは図1
1の実施例のように、文字コードデータ内で使用されて
いる文字コードを抽出しなくてもよくなる。また、これ
により、処理する文字コードデータをメモリ1に一時格
納しなくても、順次入力しながら、同時に処理すること
も可能になる。
According to this processing method, FIG.
As in the first embodiment, it is not necessary to extract the character code used in the character code data. In addition, it is also possible to simultaneously process the character code data to be processed while sequentially inputting the character code data without temporarily storing the data in the memory 1.

【0061】次に、本発明の第6の実施例を説明する。Next, a sixth embodiment of the present invention will be described.

【0062】本実施例では、符号化部4の予測部42
は、図15に示すように、ビットマップデータの注目ビ
ット「*」を予測する場合、直前のビット位置#1とそ
の前のビット位置#2とを参照するようにしている。但
し、この場合、1つの文字に対応するビットマップデー
タを予測する場合、別の文字に対応するビットマップデ
ータを参照する。そして、この参照のために、処理対象
のビットマップデータの文字と、参照するビットマップ
データの文字との対応関係を予め記憶しておくようにし
ている。
In this embodiment, the prediction unit 42 of the encoding unit 4
As shown in FIG. 15, when predicting the target bit “*” of the bitmap data, the immediately preceding bit position # 1 and the preceding bit position # 2 are referred to. However, in this case, when predicting bitmap data corresponding to one character, reference is made to bitmap data corresponding to another character. For this reference, the correspondence between the characters of the bitmap data to be processed and the characters of the bitmap data to be referred to is stored in advance.

【0063】いま、例えば、処理する文字コードデータ
内に、例えば、図16に示すように、「abc」や「X
YZ」という各種文字列が頻繁に出現しているものとす
る。これらの文字列は、例えば文章中の単語を構成する
文字列などである。
For example, in the character code data to be processed, for example, as shown in FIG.
It is assumed that various character strings “YZ” frequently appear. These character strings are, for example, character strings constituting words in a sentence.

【0064】この場合、図17に示すように、処理対象
が「c」の場合、ビット位置#1は「b」、ビット位置
#2は「a」であることを示している。また、処理対象
が「c」の場合、ビット位置#1は「b」、ビット位置
#2は「a」であることを示している。また、処理対象
が「Z」の場合、ビット位置#1は「Y」、ビット位置
#2は「X」であることを示している。
In this case, as shown in FIG. 17, when the processing target is "c", it indicates that bit position # 1 is "b" and bit position # 2 is "a". When the processing target is “c”, it indicates that bit position # 1 is “b” and bit position # 2 is “a”. Further, when the processing target is “Z”, it indicates that bit position # 1 is “Y” and bit position # 2 is “X”.

【0065】予測部42は、この設定された条件で、ビ
ットマップデータの各ビットのシンボルを予測する。例
えば、文字「c」に対応するビットマップデータの注目
ビット「*」を予測する場合、文字「b」に対応するビ
ットマップデータのビット位置#1と、文字「c」に対
応するビットマップデータのビット位置#2の2ビット
のシンボルを参照する。そして、その2ビットが共に
「1」であれば、注目ビット「*」が一定の高い確率で
「1」になると予測する。すなわち、上記2ビットが共
に「1」というのは、「ab」の2文字が連続して出現
していることであり、次に「c」が出現する確率が高い
ことになる。
The prediction unit 42 predicts a symbol of each bit of the bitmap data under the set conditions. For example, when predicting the target bit “*” of the bitmap data corresponding to the character “c”, the bit position # 1 of the bitmap data corresponding to the character “b” and the bitmap data corresponding to the character “c” Refer to the 2-bit symbol at bit position # 2. If the two bits are both “1”, it is predicted that the target bit “*” becomes “1” with a certain high probability. That is, the fact that the two bits are both "1" means that two characters of "ab" appear continuously, and the probability that "c" appears next is high.

【0066】また、同様に、文字「Z」に対応するビッ
トマップデータの注目ビット「*」を予測する場合、文
字「Y」に対応するビットマップデータのビット位置#
1と、文字「X」に対応するビットマップデータのビッ
ト位置#2の2ビットのシンボルを参照する。そして、
その2ビットが共に「1」であれば、注目ビット「*」
が一定の高い確率で「1」になると予測する。
Similarly, when the target bit “*” of the bitmap data corresponding to the character “Z” is predicted, the bit position # of the bitmap data corresponding to the character “Y”
1 and a 2-bit symbol at bit position # 2 of the bitmap data corresponding to the character "X". And
If the two bits are both “1”, the bit of interest “*”
Is predicted to be “1” with a certain high probability.

【0067】一般に、各種データの注目ビットを周囲ビ
ットから予測する場合、周囲ビットは注目ビットと同一
のデータが参照されるが、本実施例では、別のデータを
参照することにより、注目ビットを比較的高い予測精度
で予測することができるようになる。
In general, when a target bit of various data is predicted from surrounding bits, the surrounding bit refers to the same data as the target bit. In this embodiment, however, the target bit is referred to by referring to another data. Prediction can be performed with relatively high prediction accuracy.

【0068】なお、以上の各実施例では、文字コードは
ASCIIコードで、1文字1バイトで表わされるもの
としたが、そのビット数は任意に設定できることはいう
までもない。また、文字情報を表す文字コードデータに
限らず、本発明は、各種コードデータと画像データとを
任意に符号化・復号化する場合にも、適用することが考
えられる。
In each of the above embodiments, the character code is an ASCII code and is represented by one byte per character. However, it goes without saying that the number of bits can be set arbitrarily. The present invention is not limited to character code data representing character information, and can be applied to a case where various code data and image data are arbitrarily encoded / decoded.

【0069】[0069]

【発明の効果】以上のように、本発明によれば、文字コ
ードデータは、1文字1ビットに対応するビットマップ
データに展開して、そのビットマップデータまたは画像
データを算術符号の符号化法により符号化するようにし
たので、符号化手段が1つだけで済むため、簡単な装置
構成で、文字データと画像データとをデータ圧縮するこ
とができるようになる。また、文字コードデータをビッ
トマップデータに展開する場合、探索用文字コードを一
定の順番で1つずつ発生して、文字コードデータの各文
字コードと探索用文字コードとの照合結果によりビット
マップデータを生成するようにしたので、文字コードデ
ータをそのまま符号化するより、高いデータ圧縮効果が
得られるようになる。
As described above, according to the present invention, character code data is developed into bitmap data corresponding to one bit per character, and the bitmap data or image data is encoded by an arithmetic coding method. In this case, since only one encoding unit is required, character data and image data can be compressed with a simple device configuration. When character code data is expanded into bitmap data, search character codes are generated one by one in a fixed order, and bitmap data is generated based on the result of matching each character code of the character code data with the search character code. Is generated, so that a higher data compression effect can be obtained than when character code data is directly encoded.

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

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

【図2】上記実施例における復号化装置のブロック構成
図である。
FIG. 2 is a block diagram of a decoding device in the embodiment.

【図3】ビットマップ展開部の文字コードデータに対す
る処理を示す動作フローチャートである。
FIG. 3 is an operation flowchart illustrating a process performed on character code data by a bitmap developing unit.

【図4】上記文字コードデータに対する上記処理の概念
図である。
FIG. 4 is a conceptual diagram of the processing for the character code data.

【図5】文字コードデータの一例を示す文字情報図であ
る。
FIG. 5 is a character information diagram showing an example of character code data.

【図6】上記文字コードデータから得られるビットマッ
プデータの説明図である。
FIG. 6 is an explanatory diagram of bitmap data obtained from the character code data.

【図7】本発明の第2の実施例の処理において図3と異
なる点を示すフローチャートである。
FIG. 7 is a flowchart showing points different from FIG. 3 in the processing of the second embodiment of the present invention.

【図8】その実施例におけるビットマップデータ展開処
理を示す説明図である。
FIG. 8 is an explanatory diagram showing bitmap data expansion processing in the embodiment.

【図9】ビットマップデータから元の文字コードデータ
を復元する処理の説明図である。
FIG. 9 is an explanatory diagram of a process of restoring original character code data from bitmap data.

【図10】本発明の第3の実施例におけるビットマップ
データ展開処理のフローチャートである。
FIG. 10 is a flowchart of a bitmap data expansion process according to a third embodiment of the present invention.

【図11】本発明の第4の実施例におけるビットマップ
データ展開処理のフローチャートである。
FIG. 11 is a flowchart of a bitmap data expansion process according to a fourth embodiment of the present invention.

【図12】その実施例の作用効果の説明図である。FIG. 12 is an explanatory diagram of the operation and effect of the embodiment.

【図13】本発明の第5の実施例において予め記憶して
おく情報の説明図である。
FIG. 13 is an explanatory diagram of information stored in advance in a fifth embodiment of the present invention.

【図14】その実施例におけるビットマップデータ展開
処理の動作フローチャートである。
FIG. 14 is an operation flowchart of a bitmap data expansion process in the embodiment.

【図15】本発明の第6の実施例において予測動作時に
参照するビット位置を示す説明図である。
FIG. 15 is an explanatory diagram showing bit positions referred to during a prediction operation in a sixth embodiment of the present invention.

【図16】処理する文字コードデータ内によく出現する
文字列の例を示す説明図である。
FIG. 16 is an explanatory diagram showing an example of a character string that frequently appears in character code data to be processed.

【図17】予め記憶しておく各文字の対応情報の説明図
である。
FIG. 17 is an explanatory diagram of correspondence information of each character stored in advance.

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

1,8 メモリ 2,6 切換回路 3 ビットマップ展開部 4 符号化部 5 復号化部 7 文字データ復元部 41 参照シンボル取得手段 42,53 予測部 43 算術符号生成部 51 算術符号復号部 52 参照シンボル取得部 Reference Signs List 1, 8 Memory 2, 6 Switching circuit 3 Bitmap expansion unit 4 Encoding unit 5 Decoding unit 7 Character data restoration unit 41 Reference symbol acquisition unit 42, 53 Prediction unit 43 Arithmetic code generation unit 51 Arithmetic code decoding unit 52 Reference symbol Acquisition unit

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 画像データまたは文字コードデータを任
意に入力するデータ入力手段と、入力した文字コードデ
ータを1文字1ビットに対応するビットマップデータに
展開するビットマップ展開手段と、入力した上記画像デ
ータまたは展開した上記ビットマップデータを算術符号
の符号化法によりデータ圧縮する符号化手段とを備えて
いることを特徴とする符号化装置。
1. Data input means for arbitrarily inputting image data or character code data, bitmap expanding means for expanding input character code data into bitmap data corresponding to one bit per character, A coding means for compressing the data or the expanded bitmap data by an arithmetic coding method.
【請求項2】 上記ビットマップ展開手段は、探索用文
字コードを一定の順番で1つずつ発生するコード発生手
段と、入力した上記文字コードデータの各文字コードと
上記探索用文字コードとを照合して一致・不一致により
ビットマップデータを生成するビットマップデータ生成
手段とにより構成していることを特徴とする請求項1記
載の符号化装置。
2. The bitmap developing means according to claim 1, wherein said code generating means generates search character codes one by one in a predetermined order, and checks each character code of said input character code data with said search character code. 2. The encoding apparatus according to claim 1, further comprising bitmap data generating means for generating bitmap data by matching / mismatching.
【請求項3】 1つの上記探索用文字コードに対する上
記ビットマップデータを作成した後上記文字コードデー
タ内の該当する文字コードを消去してその後生成される
ビットマップデータのデータ量を削減する手段を備えて
いることを特徴とする請求項2記載の符号化装置。
3. A means for creating the bitmap data for one search character code, erasing a corresponding character code in the character code data, and reducing a data amount of bitmap data generated thereafter. 3. The encoding device according to claim 2, wherein the encoding device is provided.
【請求項4】 上記コード発生手段は、入力した上記文
字コードデータ内に含まれている文字コードのみ発生す
る手段であることを特徴とする請求項2記載の符号化装
置。
4. The encoding apparatus according to claim 2, wherein said code generating means is means for generating only a character code included in the input character code data.
【請求項5】 上記コード発生手段は、入力した上記文
字コードデータ内で出現頻度の高い順に各文字コードを
発生する手段であることを特徴とする請求項2記載の符
号化装置。
5. The encoding apparatus according to claim 2, wherein said code generation means is means for generating each character code in the order of appearance frequency in the input character code data.
【請求項6】 上記コード発生手段は、各種の文字コー
ドデータにおいて一般的に出現確率の高い順に各文字コ
ードを発生する手段であることを特徴とする請求項2記
載の符号化装置。
6. The encoding apparatus according to claim 2, wherein said code generation means is means for generating each character code in an order of appearance probability generally in various character code data.
【請求項7】 上記符号化手段には、1つの探索用文字
コードに対応するビットマップデータの各ビットを予測
する際に他の探索用文字コードに対応するビットマップ
データを参照する予測手段を備えていることを特徴とす
る請求項1記載の符号化装置。
7. The encoding means includes a prediction means for referring to bitmap data corresponding to another search character code when predicting each bit of bitmap data corresponding to one search character code. The encoding device according to claim 1, wherein the encoding device is provided.
JP35392792A 1992-12-16 1992-12-16 Encoding device Expired - Lifetime JP3212393B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35392792A JP3212393B2 (en) 1992-12-16 1992-12-16 Encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35392792A JP3212393B2 (en) 1992-12-16 1992-12-16 Encoding device

Publications (2)

Publication Number Publication Date
JPH06189142A JPH06189142A (en) 1994-07-08
JP3212393B2 true JP3212393B2 (en) 2001-09-25

Family

ID=18434164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35392792A Expired - Lifetime JP3212393B2 (en) 1992-12-16 1992-12-16 Encoding device

Country Status (1)

Country Link
JP (1) JP3212393B2 (en)

Also Published As

Publication number Publication date
JPH06189142A (en) 1994-07-08

Similar Documents

Publication Publication Date Title
US6560365B1 (en) Decoding apparatus and method
EP1832000B1 (en) Device and data method for selective compression and decompression and data format for compressed data
USRE39984E1 (en) Image encoding based on judgement on prediction error
US5032838A (en) Variable length code parallel decoding apparatus and method
EP0412047A1 (en) Method and system for arithmetic coding and decoding
JPH0682370B2 (en) Character processor
US5923783A (en) Image encoding apparatus and image decoding apparatus
JP2000048036A (en) Image processor and its method
EP0658982A2 (en) System for bi-level symbol coding-decoding with saved storage and method for the same
JP4009808B2 (en) Image processing device
JP3212393B2 (en) Encoding device
JPH07107303A (en) Decoding method for huffman code
JPH09121170A (en) Method and device for performing compression and restorationof digital picture signal
JP3266419B2 (en) Data compression / decompression method
JP3123795B2 (en) Encoding device and decoding device using arithmetic code
JPH0723238A (en) Picture data compression and decoding device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JPH11317673A (en) Run length encoding and decoding method therefor
JP2891818B2 (en) Encoding device
JP2007116501A (en) Arithmetic encoding and decoding device
Midtvik et al. Reversible compression of MR images
JP2859507B2 (en) Image data compression / decompression method and apparatus
JP2002094801A (en) Picture data compressing method, apparatus therefor and recording medium
JP3146092B2 (en) Encoding device and decoding device
JPH06152988A (en) Decoder for variable length encoding

Legal Events

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

Free format text: PAYMENT UNTIL: 20070719

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 9