JP3345291B2 - Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression method - Google Patents
Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression methodInfo
- Publication number
- JP3345291B2 JP3345291B2 JP35865496A JP35865496A JP3345291B2 JP 3345291 B2 JP3345291 B2 JP 3345291B2 JP 35865496 A JP35865496 A JP 35865496A JP 35865496 A JP35865496 A JP 35865496A JP 3345291 B2 JP3345291 B2 JP 3345291B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- binary
- compressed
- binary data
- memory
- 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
Links
- 238000013144 data compression Methods 0.000 title claims description 50
- 238000000034 method Methods 0.000 title claims description 47
- 230000015654 memory Effects 0.000 claims description 61
- 238000007906 compression Methods 0.000 claims description 26
- 230000006835 compression Effects 0.000 claims description 26
- 230000006837 decompression Effects 0.000 claims description 18
- 238000007726 management method Methods 0.000 description 26
- 238000010586 diagram Methods 0.000 description 16
- 239000000203 mixture Substances 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Landscapes
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Storing Facsimile Image Data (AREA)
Description
【0001】[0001]
【発明の属する技術分野】この発明は、2値データを圧
縮する2値データ圧縮装置と、その2値データ圧縮装置
と2値圧縮データ伸張装置を備える2値データ処理装置
と、2値データを圧縮する2値データ圧縮方法に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a binary data compression device for compressing binary data, a binary data processing device including the binary data compression device and the binary compressed data decompression device, and a binary data compression device. The present invention relates to a binary data compression method for compression.
【0002】[0002]
【従来の技術】2値データのうち、特に2値画像データ
においては一般にデータ量がきわめて大きいため、デー
タを記憶する際にデータ圧縮を行うことは非常に有効で
ある。2. Description of the Related Art Among binary data, particularly, binary image data generally has a very large data amount, and therefore, it is very effective to perform data compression when storing data.
【0003】図14は、入力する2値画像データをデー
タ圧縮して保存した上でモニタに表示する一般的な2値
データ処理装置を示すブロック図である。図示するよう
に、この処理装置は、データ圧縮装置1、ハードディス
クメモリ2、データ伸張装置3、画像展開用メモリ4お
よびモニタ5から構成される。入力する2値画像データ
を、データ圧縮装置1によりデータ圧縮して、その2値
圧縮データをハードディスクメモリ2に書き込む。その
後、ハードディスクメモリ2内の2値圧縮データを読み
出して、その2値圧縮データを、データ伸張装置3によ
りデータ伸張して画像展開用メモリ4に順次書き込むこ
とにより、画像展開用メモリ4内の2値画像データをモ
ニタ5に表示する。FIG. 14 is a block diagram showing a general binary data processing apparatus for compressing and storing input binary image data and displaying the data on a monitor. As shown in the figure, the processing device includes a data compression device 1, a hard disk memory 2, a data decompression device 3, an image expansion memory 4, and a monitor 5. The input binary image data is compressed by the data compression device 1 and the binary compressed data is written to the hard disk memory 2. Thereafter, the binary compressed data in the hard disk memory 2 is read out, and the binary compressed data is decompressed by the data decompression device 3 and sequentially written into the image decompression memory 4, whereby The value image data is displayed on the monitor 5.
【0004】かかる構成により、2値画像データの保管
の際のメモリ資源を節約することができ、その上で2値
画像データの画面表示を可能としている。[0004] With this configuration, it is possible to save memory resources when storing the binary image data, and further, it is possible to display the binary image data on the screen.
【0005】[0005]
【発明が解決しようとする課題】ところで、上記従来の
技術では、画像展開用メモリ4の容量に比べて、元の2
値画像データが大きい場合、全ての2値画像データを画
像展開用メモリ4に一度に展開することができない。こ
のため、ハードディスクメモリ2内の2値圧縮データ
を、画像展開用メモリ4の容量単位でデータ伸張して、
画像展開用メモリ4に書き込むことが行われていた。However, in the above-mentioned conventional technique, the capacity of the image development memory 4 is smaller than the capacity of the image development memory 4.
If the value image data is large, all the binary image data cannot be developed in the image development memory 4 at one time. For this reason, the binary compressed data in the hard disk memory 2 is decompressed in units of capacity of the image expansion memory 4,
Writing to the image development memory 4 has been performed.
【0006】こうした場合に、2値画像データの画像の
うちの所望の部位についてモニタ5に表示したいような
とき、その所望の部位についての2値圧縮データをハー
ドディスクメモリ2から選び出すことが難しく、ハード
ディスクメモリ2内の2値圧縮データを先頭から順番に
伸張してゆく必要があった。このため、画像のうちの所
望の部位を表示する際に、2値圧縮データ抽出のための
待ち時間が発生するといった問題があった。In such a case, when it is desired to display a desired portion of the image of the binary image data on the monitor 5, it is difficult to select binary compressed data of the desired portion from the hard disk memory 2, and It was necessary to sequentially expand the binary compressed data in the memory 2 from the top. For this reason, when displaying a desired part of the image, there is a problem that a waiting time for extracting the binary compressed data occurs.
【0007】この発明は、上記した従来技術の問題点を
解決し、2値圧縮データの画面表示を素早く行なうこと
ができるようにするを目的としている。SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems of the prior art and to make it possible to quickly display binary compressed data on a screen.
【0008】[0008]
【課題を解決するための手段およびその作用・効果】前
述した課題を解決するための手段として、以下に示す構
成をとった。Means for Solving the Problems and Their Functions / Effects As means for solving the above-mentioned problems, the following configuration is adopted.
【0009】この第1の発明の2値データ圧縮装置は、
第1と第2の値を採る2値データをデータ圧縮して、2
値圧縮データを出力する2値データ圧縮装置であって、
前記2値データをxビット(但し、xは2以上の整数)
のビット列毎に、順次読み込む元データ読込手段と、該
読み込んだビット列を表わす2値圧縮データを生成し
て、該2値圧縮データをデータ出力用のメモリに順次書
き込む圧縮手段と、前記元データ読込手段により読み込
まれるビット列の数をカウントする第1カウント手段
と、前記圧縮手段により書き込まれる2値圧縮データの
数量をカウントする第2カウント手段と、前記第1カウ
ント手段によりカウントされた前記ビット列の数が、予
め定められた所定数の整数倍となる毎に、前記第2カウ
ント手段でカウントされる数量を記憶する数量記憶手段
とを備えることを特徴としている。The binary data compression device according to the first aspect of the present invention
By compressing the binary data having the first and second values,
A binary data compression device for outputting value compressed data,
X bits of the binary data (where x is an integer of 2 or more)
Source data reading means for sequentially reading, for each bit string, compression means for generating binary compressed data representing the read bit string and sequentially writing the binary compressed data to a data output memory; First counting means for counting the number of bit strings read by the means, second counting means for counting the number of binary compressed data written by the compression means, and the number of bit strings counted by the first counting means. Is provided with a quantity storage means for storing a quantity counted by the second counting means each time the number becomes an integral multiple of a predetermined number.
【0010】この構成の第1の発明によれば、圧縮手段
によりデータ圧縮する際に、元データ読込手段により読
み込まれるxビットのビット列の数を、第1カウント手
段によりカウントするとともに、圧縮手段により書き込
む2値圧縮データの数量を、第2カウント手段によりカ
ウントする。そして、第1カウント手段によりカウント
されたビット列の数が、予め定められた所定数の整数倍
となる毎に、数量記憶手段により、第2カウント手段で
カウントされる数量を記憶する。According to the first aspect of the present invention, when data is compressed by the compression means, the number of x-bit bit strings read by the original data reading means is counted by the first counting means, The number of binary compressed data to be written is counted by the second counting means. Each time the number of bit strings counted by the first counting means becomes an integral multiple of a predetermined number, the quantity stored by the quantity counting means is stored by the quantity storage means.
【0011】このため、データ圧縮に供せられる元デー
タのビット列の数が所定数の整数倍となる毎に、それま
でにデータ圧縮された2値圧縮データの数量が、数量記
憶手段により記憶される。したがって、2値圧縮データ
を使用する際に、数量記憶手段により記憶される数量を
参照することで、圧縮画像データにおいて、元データに
おけるビット列の数が所定数の整数倍となる位置を知る
ことができる。Therefore, each time the number of bit strings of the original data subjected to the data compression becomes an integral multiple of a predetermined number, the quantity of the binary-compressed data thus far compressed is stored by the quantity storage means. You. Therefore, when using the binary compressed data, by referring to the quantity stored by the quantity storage means, it is possible to know the position where the number of bit strings in the original data is an integral multiple of a predetermined number in the compressed image data. it can.
【0012】第2の発明の2値データ処理装置は、第1
と第2の値を採る2値データをデータ圧縮して、2値圧
縮データを出力する2値データ圧縮装置と、該2値デー
タ圧縮装置より出力される2値圧縮データをデータ伸張
して、元の2値データを出力する2値圧縮データ伸張装
置とを備える2値データ処理装置であって、前記2値圧
縮データ伸張装置から出力される元の2値データを、2
値データ展開用のメモリに順次書き込む展開用メモリ書
込手段と、前記2値データ展開用のメモリに記憶される
2値データを表示装置に表示させる表示制御手段とを備
え、前記2値データ圧縮装置は、上記第1の発明に記載
のものであって、前記所定数を、前記2値データ展開用
のメモリの容量に応じて定まる値とした構成であること
を特徴としている。According to a second aspect of the present invention, there is provided a binary data processing apparatus comprising:
And a binary data compression device that outputs binary compressed data by compressing binary data having a second value, and decompresses the binary compressed data output from the binary data compression device. A binary compressed data decompression device for outputting the original binary data, wherein the binary data output from the binary compressed data decompression device is
An expansion memory writing means for sequentially writing the data in the memory for expanding the value data; and a display control means for displaying the binary data stored in the memory for expanding the binary data on a display device, wherein the compression of the binary data is performed. The apparatus according to the first aspect is characterized in that the predetermined number is a value determined according to the capacity of the memory for developing the binary data.
【0013】上記第2の発明の構成によれば、データ圧
縮されて、その後、元のデータに伸張された2値データ
を、2値データ展開用のメモリに書き込むが、上記2値
データ圧縮装置では、この2値データ展開用のメモリの
容量に応じて、前記所定数が定められる。このため、2
値データ展開用のメモリに格納可能な最大量だけ元デー
タが読み込まれる毎に、数量記憶手段への書込みを行な
うことができるようにすることができる。According to the configuration of the second aspect of the present invention, the binary data that has been compressed and then expanded to the original data is written to the memory for binary data expansion. Then, the predetermined number is determined according to the capacity of the memory for developing the binary data. Therefore, 2
Each time the maximum amount of original data that can be stored in the value data expansion memory is read, writing to the quantity storage unit can be performed.
【0014】したがって、2値圧縮データの画像を表示
装置に表示する際に、数量記憶手段により記憶される数
量を参照することで、圧縮画像データにおいて、元デー
タが2値データ展開用のメモリに格納可能な最大量とな
るような位置を知ることができる。この結果、画面表示
を行ないたいデータを、数量記憶手段により記憶される
数量を参照することで容易に選び出すことができること
から、2値圧縮データの画面表示を素早く行なうことが
できる効果を奏する。Therefore, when displaying the image of the binary compressed data on the display device, the original data in the compressed image data is stored in the memory for binary data expansion by referring to the quantity stored by the quantity storage means. It is possible to know the position where the maximum amount can be stored. As a result, the data to be displayed on the screen can be easily selected by referring to the quantity stored in the quantity storage means, so that the screen display of the binary compressed data can be quickly performed.
【0015】第2の発明において、前記2値データは画
像を表わす2値画像データであって、前記2値圧縮デー
タ伸張装置は、前記画像内の任意の部分の位置情報を入
力する位置情報入力手段と、該部分の位置情報に応じて
前記数量記憶手段に記憶される前記2値圧縮データの数
量を検索して、前記部分の位置を含む所定範囲の2値圧
縮データのメモリ上の格納位置を求める格納位置算出手
段と、該求めた格納位置の2値圧縮データを前記2値デ
ータ展開用のメモリに書き込む手段とを備える構成とす
ることができる。[0015] In the second invention, the binary data is binary image data representing an image, and the binary compressed data decompression device includes a position information input device for inputting position information of an arbitrary part in the image. Means for retrieving the quantity of the binary compressed data stored in the quantity storage means in accordance with the position information of the part, and storing the binary compressed data in a predetermined range including the position of the part on the memory And a means for writing the binary compressed data of the obtained storage position into the memory for binary data expansion.
【0016】この構成によれば、位置情報入力手段によ
り入力される部分の位置を含む所定範囲の2値圧縮デー
タを、表示装置に素早く表示することができる。According to this configuration, the binary compressed data in the predetermined range including the position of the portion input by the position information input means can be quickly displayed on the display device.
【0017】第3の発明の2値画像データの圧縮方法
は、第1と第2の値を採る2値データをデータ圧縮し
て、2値圧縮データを出力する2値データ圧縮方法であ
って、(a)前記2値データをxビット(但し、xは2
以上の整数)のビット列毎に、順次読み込む工程と、
(b)該読み込んだビット列を表わす2値圧縮データを
生成して、該2値圧縮データをデータ出力用のメモリに
順次書き込む工程と、(c)前記工程(a)により読み
込まれるビット列の数をカウントする工程と、(d)前
記工程(b)により書き込まれる2値圧縮データの数量
をカウントする工程と、(e)該工程(c)によりカウ
ントされた前記ビット列の数が、予め定められた所定数
の整数倍となる毎に、前記工程(d)でカウントされる
数量を記憶する工程とを備えることを特徴としている。In a third aspect of the present invention, a method for compressing binary image data is a method for compressing binary data having first and second values and outputting binary compressed data. , (A) x bits (where x is 2 bits)
Sequentially reading for each bit string of the above integers)
(B) generating binary compressed data representing the read bit string, and sequentially writing the binary compressed data into a data output memory; and (c) determining the number of bit strings read in the step (a). A step of counting; (d) a step of counting the number of binary compressed data written in the step (b); and (e) the number of the bit strings counted in the step (c) is predetermined. Storing the quantity counted in the step (d) every time the number becomes an integral multiple of a predetermined number.
【0018】この構成の第3の発明によれば、データ圧
縮に供せられる元データのビット列の数が所定数の整数
倍となる毎に、それまでにデータ圧縮された2値圧縮デ
ータの数量が、工程(e)により記憶される。したがっ
て、2値圧縮データを使用する際に、工程(e)により
記憶される数量を参照することで、圧縮画像データにお
いて、元データにおけるビット列の数が所定数の整数倍
となる位置を知ることができる。According to the third aspect of the present invention, each time the number of bit strings of the original data to be subjected to data compression becomes an integral multiple of a predetermined number, the number of binary compressed data compressed so far is Is stored in step (e). Therefore, when using the binary compressed data, by referring to the quantity stored in the step (e), it is possible to know the position where the number of bit strings in the original data is an integral multiple of a predetermined number in the compressed image data. Can be.
【0019】[0019]
【発明の実施の形態】以上説明した本発明の構成・作用
を一層明らかにするために、以下本発明の好適な実施例
について説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to further clarify the configuration and operation of the present invention described above, a preferred embodiment of the present invention will be described below.
【0020】図1は、本発明の一実施例としての画像デ
ータ処理装置とその周辺装置の概略構成を示すブロック
図である。図示するように、画像データ処理装置10
は、CPU12とメモリ14と入出力インタフェース1
6を備える。入出力インタフェース16には、キーボー
ド20、マウス22、第1ハードディスクメモリ24、
第2ハードディスクメモリ26、およびカラーモニタ2
8が接続されている。第1ハードディスクメモリ24
は、データ圧縮の対象となる2値画像データDTbを記
憶するものである。第2ハードディスクメモリ26は、
データ圧縮処理により生成された圧縮画像データDTc
を記憶するものである。FIG. 1 is a block diagram showing a schematic configuration of an image data processing apparatus as an embodiment of the present invention and its peripheral devices. As shown, the image data processing device 10
Are the CPU 12, the memory 14, and the input / output interface 1
6 is provided. The input / output interface 16 includes a keyboard 20, a mouse 22, a first hard disk memory 24,
Second hard disk memory 26 and color monitor 2
8 are connected. First hard disk memory 24
Is for storing binary image data DTb to be subjected to data compression. The second hard disk memory 26
Compressed image data DTc generated by data compression processing
Is stored.
【0021】CPU12は、メモリ14とデータのやり
取りを行ないつつ、データ圧縮処理やその他種々の処理
を行なうもので、データ圧縮を行なうデータ圧縮部12
aやデータ伸張を行なうデータ伸張部12bを備える。
メモリ14は、第1、第2ハードディスクメモリ24,
26に格納されるデータを取り込むためのデータ読込用
バッファ14aと、CPU12により生成されたデータ
を書き込むためのデータ書込用バッファ14bと、カラ
ーモニタ28への画面表示を行なうための画像データ展
開用バッファ14cを備える。また、メモリ14は、デ
ータ圧縮処理やデータ伸張処理等をCPU12に実行さ
せるための手順を記した各種のプログラムを予め記憶し
ている。なお、上記データ圧縮処理、データ伸張処理の
手順を記したプログラムは、第1ハードディスクメモリ
24に予め格納しておき、第1ハードディスクメモリ2
4のブートブロックに書き込まれたローダに従って、装
置に電源を投入すると、メモリ14の所定の領域にロー
ドされる構成としてもよい。さらに、メモリ14は、後
述する管理ファイルDfを記憶する。The CPU 12 performs data compression processing and other various processing while exchanging data with the memory 14. The data compression section 12 performs data compression.
a and a data decompression unit 12b for decompressing data.
The memory 14 includes first and second hard disk memories 24,
26, a data writing buffer 14b for writing data generated by the CPU 12, and an image data developing buffer 14 for displaying a screen on the color monitor 28. The buffer 14c is provided. In addition, the memory 14 stores in advance various programs describing procedures for causing the CPU 12 to execute data compression processing, data expansion processing, and the like. The program describing the procedure of the data compression process and the data decompression process is stored in the first hard disk memory 24 in advance, and is stored in the first hard disk memory 2.
When the power is turned on in accordance with the loader written in the boot block No. 4, the device may be loaded into a predetermined area of the memory 14. Further, the memory 14 stores a management file Df described later.
【0022】この実施例では、上記画像データ展開用バ
ッファ14cは、4メガバイトの容量に設定されている
ものとする。In this embodiment, it is assumed that the image data development buffer 14c has a capacity of 4 megabytes.
【0023】こうした構成の画像データ処理装置10に
よれば、CPU12は、次のような処理を行なう。 CPU12は、第1ハードディスクメモリ24に記憶
される2値画像データDTbから、入出力インタフェー
ス16を介して、所定量、ここでは例えば10メガバイ
ト毎に2値画像データを取り込んで、その取り込んだ2
値画像データをメモり14のデータ読込用バッファ14
aに順次格納する。 CPU12は、データ読込用バッファ14aに格納さ
れる2値画像データにデータ圧縮処理を施して圧縮画像
データを生成して、入出力インタフェース16を介して
データ書込用バッファ14bに格納する。また、データ
書込用バッファ14bに書き込まれた圧縮画像データの
バイト数を管理する管理ファイルDf(図1参照)を、
圧縮画像データとともに生成し、入出力インタフェース
16を介してメモリ14に格納する。 CPU12は、データ書込用バッファ14bに格納さ
れる圧縮画像データおよびメモリ14内の管理ファイル
Dfを、入出力インタフェース16を介して第2ハード
ディスクメモリ26に送り、格納する。According to the image data processing device 10 having such a configuration, the CPU 12 performs the following processing. The CPU 12 acquires binary image data from the binary image data DTb stored in the first hard disk memory 24 via the input / output interface 16 every predetermined amount, here, for example, every 10 megabytes.
Buffer 14 for reading value image data from memory 14
are sequentially stored in a. The CPU 12 performs data compression processing on the binary image data stored in the data reading buffer 14a to generate compressed image data, and stores the compressed image data in the data writing buffer 14b via the input / output interface 16. The management file Df (see FIG. 1) for managing the number of bytes of the compressed image data written in the data writing buffer 14b is
It is generated together with the compressed image data and stored in the memory 14 via the input / output interface 16. The CPU 12 sends the compressed image data stored in the data writing buffer 14b and the management file Df in the memory 14 to the second hard disk memory 26 via the input / output interface 16, and stores them.
【0024】オペレータによりマウス22を用いて画
像の内の所望の部分が指定されたとき、CPU12は、
その部分の位置情報を読みとる。次いで、その部分の位
置情報に応じてメモリ14内の管理ファイルDfを検索
して、その部分の位置を含む所定範囲の圧縮画像データ
をデータ書込用バッファ14bから読み込み、画像デー
タ展開用バッファ14cに書き込む。 CPU12は、画像データ展開用バッファ14cに書
き込まれた2値圧縮画像データの画像をカラーモニタ2
8に表示する。When a desired portion of the image is designated by the operator using the mouse 22, the CPU 12
The position information of that part is read. Next, the management file Df in the memory 14 is searched according to the position information of the part, and a predetermined range of compressed image data including the position of the part is read from the data writing buffer 14b, and the image data decompression buffer 14c is read. Write to. The CPU 12 displays the image of the binary compressed image data written in the image data expansion buffer 14c on the color monitor 2.
8 is displayed.
【0025】図2は、前記〜の処理を各種データの
流れとともに示す説明図である。図示するように、の
処理は、第1ハードディスクメモリ24に記憶される2
値画像データDTbから所定量の2値画像データをデー
タ読込用バッファ14aに格納するものである。の処
理は、データ読込用バッファ14aに格納される2値画
像データをデータ圧縮して、データ書込用バッファ14
bに圧縮画像データを生成するとともに、管理ファイル
Dfを生成するものである。の処理は、そのデータ書
込用バッファ14bと管理ファイルDfを第2ハードデ
ィスクメモリ26に格納するものである。の処理は、
管理ファイルDfを用いて、所望の画像の圧縮画像デー
タをデータ書込用バッファ14bから読み込み、画像デ
ータ展開用バッファ14cに書き込むものである。の
処理は、画像データ展開用バッファ14cに書き込まれ
た2値圧縮画像データの画像をカラーモニタ28に表示
するものである。FIG. 2 is an explanatory diagram showing the above-mentioned processes together with the flow of various data. As shown in the figure, the process of 2 is stored in the first hard disk memory 24.
A predetermined amount of binary image data from the value image data DTb is stored in the data reading buffer 14a. Is performed by compressing the binary image data stored in the data reading buffer 14a,
b to generate compressed image data and a management file Df. Is to store the data write buffer 14b and the management file Df in the second hard disk memory 26. The processing of
Using the management file Df, compressed image data of a desired image is read from the data writing buffer 14b and written to the image data expansion buffer 14c. Is to display the image of the binary compressed image data written in the image data expansion buffer 14c on the color monitor 28.
【0026】前記およびに当たる処理について以下
詳述する。まず、に当たる処理から説明する。この処
理は、メモリ14に格納されるデータ圧縮処理のプログ
ラムをCPU12が実行することで実現される。図3
は、CPU12により実行されるデータ圧縮処理のメイ
ンルーチンを示すフローチャートである。このルーチン
は、CPU12中のデータ圧縮部12a(図1)に相当
する。図3に示すように、CPU12は、処理が開始さ
れると、まず、前記の処理によりデータ出力用バッフ
ァ14aに格納される2元画像データ(以下、元画像デ
ータと呼ぶ)から1バイトである8ビット分のデータを
読み込み、変数Aに格納する処理を行なう(ステップS
100)。次いで、読み込んだバイト数を示す読込カウ
ンタC1を値1だけインクリメントする(ステップS2
00)。続いて、ステップS100で読み込んだ1バイ
ト分のデータについて符号化することによりデータ圧縮
を行なう符号化処理を実行する(ステップ300)。The above-mentioned processing will be described in detail below. First, a description will be given of the processing corresponding to the above. This processing is realized by the CPU 12 executing a data compression processing program stored in the memory 14. FIG.
5 is a flowchart showing a main routine of a data compression process executed by the CPU 12. This routine corresponds to the data compression unit 12a (FIG. 1) in the CPU 12. As shown in FIG. 3, when the processing is started, the CPU 12 first has 1 byte from the binary image data (hereinafter, referred to as the original image data) stored in the data output buffer 14 a by the above-described processing. A process of reading 8-bit data and storing it in variable A is performed (step S
100). Next, the read counter C1 indicating the number of read bytes is incremented by 1 (step S2).
00). Subsequently, an encoding process for compressing data by encoding the one-byte data read in step S100 is executed (step 300).
【0027】その後、管理ファイルDfを更新する管理
ファイル更新ルーチンを実行する(ステップS40
0)。続いて、画像全体にわたって上記ステップS20
0ないしS400の処理を施したか否かを判別する(ス
テップS500)。ここで、画像全体にわたってとは、
データ読込用バッファ14aに格納される10メガバイ
ト分の元画像データに対するものではなく、一つの画像
全体に対するものである。即ち、第1ハードディスクメ
モリ24に記憶される一つの画像が、データ読込用バッ
ファ14aに複数回にわたって書き込まれる場合には、
その最終回に読み込まれたデータ読込用バッファ14a
に格納される全てのデータに対する処理が済んだか否か
を判定している。なお、このデータ圧縮処理で用いられ
る読込カウンタC1および書込カウンタC2について
も、前記画像全体を単位として、初期値にリセットされ
るものとして、前記データ読込用バッファ14aのデー
タが更新される毎に、両カウンタC1,C2はリセット
されることはない。Thereafter, a management file update routine for updating the management file Df is executed (step S40).
0). Subsequently, the above step S20 is performed on the entire image.
It is determined whether the processes from 0 to S400 have been performed (step S500). Here, "over the entire image"
This is not for 10 megabytes of original image data stored in the data reading buffer 14a, but for one entire image. That is, when one image stored in the first hard disk memory 24 is written to the data reading buffer 14a a plurality of times,
Data reading buffer 14a read at the last time
It has been determined whether or not processing has been completed for all data stored in. Note that the read counter C1 and the write counter C2 used in the data compression process are also reset to an initial value in units of the entire image, and each time the data in the data read buffer 14a is updated. , The counters C1 and C2 are not reset.
【0028】CPU12は、ステップS400で、画像
全体にわたって上記処理が施されていないと判別された
ときには、ステップS300の符号化処理ルーチンで求
められる圧縮コードWcodeの値を変数XWcode
にセットすることにより、前回(一世代前)の圧縮コー
ドXWcodeを設定した(ステップS600)上で、
ステップS100に処理を戻す。この結果、データ読込
用バッファ14aに格納される元画像データから、続く
1バイト分のデータを読み込み、その1バイト分のデー
タに対して、同じくステップS200ないしS400の
処理を繰り返し実行する。When it is determined in step S400 that the above processing has not been performed on the entire image, the CPU 12 sets the value of the compression code Wcode obtained in the encoding processing routine in step S300 to a variable XWcode.
By setting the compression code XWcode of the previous time (one generation before) (step S600),
The process returns to step S100. As a result, the next one byte of data is read from the original image data stored in the data reading buffer 14a, and the processes of steps S200 to S400 are repeatedly performed on the one byte of data.
【0029】一方、ステップS500で、画像全体にわ
たって上記処理が施されたと判定されたときには、「エ
ンド」に抜けてこのデータ圧縮処理を終了する。On the other hand, if it is determined in step S500 that the above-described processing has been performed on the entire image, the process goes to "END" to end the data compression processing.
【0030】上記ステップS300で実行される符号化
処理ルーチンについて、次に詳述する。この符号化処理
は、1バイトのデータが全て値0であるときと1バイト
のデータが全て値1であるときをデータ圧縮の対象とし
て、それ以外の値0と値1の混合のデータであるときを
データ圧縮の対象外としている。図4は、この符号化処
理により生成される圧縮データのデータ構造の説明図で
あり、図5は、この符号化処理により生成される非圧縮
データのデータ構造の説明図である。Next, the encoding processing routine executed in step S300 will be described in detail. In this encoding process, data compression is performed when 1-byte data is all 0s and when 1-byte data is all 1s, and the other data is a mixture of 0s and 1s. Time is excluded from data compression. FIG. 4 is an explanatory diagram of a data structure of compressed data generated by the encoding process, and FIG. 5 is an explanatory diagram of a data structure of non-compressed data generated by the encoding process.
【0031】図4に示すように、圧縮データdaは、圧
縮コードを格納する長さ1バイトの圧縮コード部da1
と、バイト長を示す長さ1バイトのレングス部da2と
から構成される。圧縮コード部da1に格納される圧縮
コードは、1バイトのデータが全て値0であるとき、値
80(16進数)をとり、1バイトのデータが全て値1
であるとき、値81(16進数)をとる。レングス部d
a2は、上記圧縮コード部da1に格納される圧縮コー
ドをとるデータが連続したときのそのバイト長を示す。As shown in FIG. 4, the compressed data da is a 1-byte long compressed code part da1 for storing the compressed code.
And a length da2 having a length of 1 byte indicating a byte length. The compression code stored in the compression code part da1 takes a value of 80 (hexadecimal) when all the 1-byte data has a value of 0, and takes all 1-byte data as a value of 1
Takes the value 81 (hexadecimal). Length d
a2 indicates the byte length when the data having the compression code stored in the compression code part da1 is continuous.
【0032】図5に示すように、非圧縮データdbは、
長さ1バイトのヘッダ部db1と、それに続く非圧縮デ
ータを格納する可変長のデータ部db2とから構成され
る。ヘッダ部db1は、最上位桁のbit7で、圧縮、
非圧縮の区別(ここでは非圧縮を示す0が格納される)
を示し、続くbit6ないしbit0で、データ部db
2のバイト長を示す。bit6ないしbit0の7桁で
示すことのできる値は、0から127までであることか
ら、データ部db2の長さは127バイトとなってい
る。As shown in FIG. 5, the uncompressed data db is
It is composed of a header section db1 having a length of 1 byte, and a variable-length data section db2 for storing uncompressed data following the header section db1. The header part db1 is compressed with bit7 of the most significant digit,
Uncompressed distinction (0 indicating uncompressed is stored here)
The following bit6 to bit0 indicate that the data part db
Indicates a byte length of 2. Since the value that can be represented by seven digits of bit 6 to bit 0 is from 0 to 127, the length of the data part db2 is 127 bytes.
【0033】詳細には、図6および図7のフローチャー
トに示す符号化処理ルーチンをCPU12により実行す
ることで、上記のような圧縮データdaおよび非圧縮デ
ータdbを生成する。図6に示すように、CPU12は
処理が開始されると、まず、ステップS100で読み込
んだ1バイト分のデータが、全て値0であるか(ステッ
プS302)、全て値1であるか(ステップS30
4)、あるいはそれら以外の値0と値1とが混合したも
のであるかを判別し、全て値0のとき、80(16進
数)を、全て値1のとき、81(16進数)を、値0と
値1とが混合したものであるとき、80、81以外の
値、例えば82(16進数)をそれぞれ圧縮コードWc
odeとしてセットする(ステップS306,S30
8,S310)。More specifically, the above-described compressed data da and uncompressed data db are generated by the CPU 12 executing the encoding processing routine shown in the flowcharts of FIGS. 6 and 7. As shown in FIG. 6, when the processing is started, the CPU 12 first determines whether all the 1-byte data read in step S100 has a value of 0 (step S302) or 1 (step S30).
4) Alternatively, it is determined whether the values 0 and 1 are a mixture of values 0 and 80 (hexadecimal) when all values are 0, 81 (hexadecimal) when all values are 1 and When the value 0 and the value 1 are mixed, a value other than 80 and 81, for example, 82 (hexadecimal) is used as the compression code Wc.
mode (steps S306 and S30)
8, S310).
【0034】次いで、ステップS100で読み込んだ1
バイト分のデータ(A)の最新のものと前回(1世代
前)のものについての圧縮コードWcode,XWco
deを比較することにより、同じ圧縮コードのデータが
複数バイトにわたって連続するか否かを判別する(ステ
ップS312)。ここで、同じ圧縮コードのデータが連
続すると判定された場合には、図7のステップS314
に処理を進めて、その連続する数を数えるカウンタCl
enをインクリメントする。このとき、圧縮コードとし
て値82(16進数)が連続したときには(ステップS
316)、その都度に上記1バイト分のデータ(A)を
非圧縮データとしてデータ書込用バッファ14bに書き
込むことにより(ステップS318)、非圧縮データd
bのデータ部db2を生成する。このとき、書込カウン
タC2を値1だけインクリメントすることにより、デー
タ書込用バッファ14bに書き込んだデータのバイト数
をカウントする(ステップS320)。Next, the 1 read in step S100
Compressed codes Wcode and XWco for the latest byte data (A) and the previous one (one generation before)
By comparing de, it is determined whether or not data of the same compression code is continuous over a plurality of bytes (step S312). Here, when it is determined that the data of the same compression code is continuous, step S314 in FIG.
To the counter Cl for counting the continuous number
Increment en. At this time, when the value 82 (hexadecimal) continues as the compression code (step S
316) Each time, the 1-byte data (A) is written to the data write buffer 14b as uncompressed data (step S318), so that the uncompressed data d
Generate the data part db2 of b. At this time, the number of bytes of the data written in the data writing buffer 14b is counted by incrementing the write counter C2 by the value 1 (step S320).
【0035】一方、圧縮コードが前回のものと今回のも
のとで切り替わったときには、図6のステップS322
により、前回の圧縮コードXWcodeが値82(16
進数)か否かを判定し、値82、即ち非圧縮データの場
合には、そのカウントした数をデータ書込用バッファ1
4bの所定位置(前記データ部db2の直前の位置)に
書き込むことにより、非圧縮データdbのヘッダdb2
を生成する(ステップS324)。On the other hand, when the compression code is switched between the previous one and the current one, step S322 in FIG.
As a result, the previous compression code XWcode has the value 82 (16
(In the case of non-compressed data), the counted number is stored in the data writing buffer 1.
4b at a predetermined position (the position immediately before the data part db2), the header db2 of the uncompressed data db is written.
Is generated (step S324).
【0036】また、1世代前の圧縮コードが82(16
進数)でない場合には、1世代前の圧縮コードとそのカ
ウントした数とをデータ書込用バッファ14bに書き込
むことにより、圧縮データdaを生成する(ステップS
326)。このとき、書込カウンタC2を値2だけイン
クリメントすることにより、データ書込用バッファ14
bに書き込んだデータのバイト数をカウントする(ステ
ップS320)。その後、さらに、今回の圧縮コードW
codeの値が82(16進数)であるか否かを判定し
(ステップS330)、値82、即ち非圧縮データの場
合には、データ書込用バッファ14bにデータ(A)を
書き込む処理を行なう(ステップS332)。なお、こ
の書込み位置は、非圧縮データのデータ構造の関係か
ら、データ書込用バッファ14bに格納されるデータの
最後尾から1ワードあけた位置とする。その後、書込カ
ウンタC2を値2だけインクリメントすることにより、
データ書込用バッファ14bに書き込んだデータのバイ
ト数をカウントする(ステップS334)。一方、ステ
ップS322で、圧縮データであると判定されたときに
は、ステップS332およびS334の処理を実行しな
い。その後、カウンタClenに値1をセットした(ス
テップS336)上で、処理を「リターン」に進めて、
この符号化処理ルーチンを一旦終了する。The compression code of the previous generation is 82 (16
If not, the compressed data da is generated by writing the compressed code of the previous generation and the counted number into the data write buffer 14b (step S).
326). At this time, the value of the write counter C2 is incremented by 2 so that the data write buffer 14
The number of bytes of the data written in b is counted (step S320). After that, the compressed code W
It is determined whether or not the value of the code is 82 (hexadecimal) (step S330). If the value is 82, that is, uncompressed data, a process of writing data (A) to the data writing buffer 14b is performed. (Step S332). Note that this writing position is a position one word away from the end of the data stored in the data writing buffer 14b due to the data structure of the uncompressed data. After that, the write counter C2 is incremented by 2 to obtain
The number of bytes of the data written in the data writing buffer 14b is counted (step S334). On the other hand, if it is determined in step S322 that the data is compressed data, the processes in steps S332 and S334 are not performed. Then, after setting the value 1 to the counter Clen (step S336), the process proceeds to “return”,
This encoding processing routine ends once.
【0037】上記構成の符号化処理ルーチンにより、圧
縮データdaおよび非圧縮データdbからなる圧縮画像
データを、データ書込用バッファ14bに生成すること
ができる。なお、この符号化処理ルーチンでは、圧縮デ
ータdaのレングス部d2がオーバフローしたときの処
理と、非圧縮データdbのデータ部がオーバーフローし
たときの処理については、説明が複雑になることから詳
しい説明を省略した。要は、オーバフローするときに
は、同様なデータが複数個並ぶようにすることで、その
対応が可能となる。With the above-described encoding processing routine, compressed image data composed of compressed data da and uncompressed data db can be generated in the data writing buffer 14b. In this encoding processing routine, the processing performed when the length part d2 of the compressed data da overflows and the processing performed when the data part of the uncompressed data db overflows will be described in detail because they are complicated. Omitted. In short, when overflow occurs, it is possible to cope with this by arranging a plurality of similar data.
【0038】次に、元画像データとしての2値画像デー
タを例にあげて、その2値画像データが前述したデータ
圧縮処理によりどのような圧縮画像データになるかを、
図8を用いて説明する。図8に示すように、元画像デー
タとして、全て値0の1バイト長のビット列が100個
と、08,09,10(すべて16進数)のビット列
と、全て値1の1バイト長のビット列が60個と、1
1,12,13,14,00,15,FF(すべて16
進数)のビット列とがこの順に連なっているものとす
る。Next, taking binary image data as an example of original image data as an example, what kind of compressed image data the binary image data becomes by the above-described data compression processing will be described.
This will be described with reference to FIG. As shown in FIG. 8, as original image data, 100 1-byte bit strings of all 0s, 08, 09, and 10 (all hexadecimal) bit strings and 1-byte bit strings of all 1s are provided. 60 and 1
1, 12, 13, 14, 00, 15, FF (all 16
Hex) in this order.
【0039】全て値0の1バイト長のビット列を100
個連続したデータ群は、圧縮コードが80(16進数)
で長さは100(=64(16進数))であることを示
す「8064」の圧縮データd1に変換される。08,
09,10(すべて16進数)のデータ群は、圧縮対象
外であることから、バイト数である値3に実データを連
ねた「03,08,09,10」の非圧縮データd2に
変換される。全て値1の1バイト長のビット列が60個
連続するデータ群は、圧縮コードが81(16進数)で
長さは60(=3C(16進数))であることを示す
「813C」の圧縮データd3に変換される。11,1
2,13,14(すべて16進数)のデータ群は、圧縮
対象外であることから、バイト数である値4に実データ
を連ねた「04,11,12,13,14」の非圧縮デ
ータd4に変換される。00の1バイトのデータは、圧
縮コードが80(16進数)で長さは1であることを示
す「8001」の圧縮データd5に変換される。15
(16進数)の1バイトのデータは、圧縮対象外である
ことから、バイト数である値1に非圧縮データを連ねた
「01,15」の非圧縮データd6に変換される。FF
(16進数)の1バイトのデータは、圧縮コードが81
(16進数)で長さは1であることを示す「8101」
の圧縮データd7に変換される。A one-byte length bit string of all values 0 is set to 100
A continuous data group has a compression code of 80 (hexadecimal)
Is converted to compressed data d1 of "8064" indicating that the length is 100 (= 64 (hexadecimal)). 08,
Since the data group of 09 and 10 (all hexadecimal numbers) are not to be compressed, they are converted into uncompressed data d2 of “03,08,09,10” in which the actual data is linked to the value 3 which is the number of bytes. You. A data group in which 60 1-byte length bit strings all having a value of 1 are “813C” compressed data indicating that the compression code is 81 (hexadecimal) and the length is 60 (= 3C (hexadecimal)) It is converted to d3. 11,1
The data group of 2, 13, 14 (all hexadecimal numbers) are not to be compressed, so the uncompressed data of "04, 11, 12, 13, 14" in which the actual data is linked to the value 4 which is the number of bytes It is converted to d4. The 1-byte data of 00 is converted into compressed data d5 of “8001” indicating that the compression code is 80 (hexadecimal) and the length is 1. Fifteen
Since (hexadecimal) 1-byte data is not to be compressed, it is converted into uncompressed data d6 of "01, 15" in which uncompressed data is linked to the value 1 which is the number of bytes. FF
The 1-byte (hexadecimal) data has a compression code of 81
"8101" indicating that the length is 1 in (hexadecimal)
Is converted into compressed data d7.
【0040】この結果、圧縮画像データとして、圧縮デ
ータd1,非圧縮データd2,圧縮データd3,非圧縮
データd4,圧縮データd5,非圧縮データd6,圧縮
データd7からなるデータが生成される。なお、図8に
示したこの例においては、図8に示すように、元画像デ
ータの読み込んだバイト数を示す読込カウンタC1の値
は、AA(16進数:10進数の170)となってい
る。圧縮画像データとして書き込んだデータのバイト数
を示す書込カウンタC2の値は、13(16進数:10
進数の19)となっている。As a result, data composed of compressed data d1, uncompressed data d2, compressed data d3, uncompressed data d4, compressed data d5, uncompressed data d6, and compressed data d7 are generated as compressed image data. In this example shown in FIG. 8, as shown in FIG. 8, the value of the read counter C1 indicating the number of bytes read from the original image data is AA (hexadecimal: 170 in decimal). . The value of the write counter C2 indicating the number of bytes of data written as compressed image data is 13 (hexadecimal: 10
19).
【0041】上記ステップS400で実行される管理フ
ァイル更新ルーチンについて、次に詳述する。図9は、
この管理ファイル更新ルーチンを示すフローチャートで
ある。図9に示すように、CPU12は、処理がこのル
ーチンに移ると、まず、読込カウンタC1が予め定めた
所定値CCに達したか否かを判別する(ステップS41
0)。ここで、所定値CCは4191600をとる。な
お、どうしてこのような値となるかは後述する。Next, the management file updating routine executed in step S400 will be described in detail. FIG.
It is a flowchart which shows this management file update routine. As shown in FIG. 9, when the process proceeds to this routine, the CPU 12 first determines whether or not the read counter C1 has reached a predetermined value CC (step S41).
0). Here, the predetermined value CC is 4191600. The reason why such a value is obtained will be described later.
【0042】ステップS410で、読込カウンタC1が
CCに達したと判別されると以下の処理を実行する。ま
ず、データ圧縮処理で求めた書込カウンタC2の値を管
理ファイルDfに書き込む処理を行なう(ステップS4
20)。管理ファイルDfは、図10に示すように、所
定の桁数の数字列の1次元の配列から構成されるもので
あり、第1ないし第n(nは2以上の整数)のデータエ
リアE(0)〜E(n−1)を備える。なお、第1番目
のデータエリアE(0)には値0が予めセットされてい
る。ステップS420では、変数iで定まる第i番目の
データエリアE(i)にデータ圧縮処理で求めた書込カ
ウンタC2の値を書き込む。なお、この変数iは初期値
として値1がセットされており、ステップS420に続
くステップS430で、変数iを値1だけインクリメン
トする。ステップS430の実行後、読込カウンタC1
を値0にクリアして、「リターン」に抜けて、この処理
を一旦終了する。If it is determined in step S410 that the read counter C1 has reached CC, the following processing is executed. First, a process of writing the value of the write counter C2 obtained by the data compression process into the management file Df is performed (step S4).
20). As shown in FIG. 10, the management file Df is formed of a one-dimensional array of a digit string having a predetermined number of digits, and includes a first to n-th (n is an integer of 2 or more) data areas E ( 0) to E (n-1). The value 0 is set in the first data area E (0) in advance. In step S420, the value of the write counter C2 obtained by the data compression processing is written to the i-th data area E (i) determined by the variable i. The value of the variable i is set to 1 as an initial value, and the variable i is incremented by 1 in step S430 following step S420. After execution of step S430, the read counter C1
Is cleared to the value 0, the process returns to the "return", and the process is temporarily terminated.
【0043】一方、ステップS410で、読込カウンタ
C1がCCに達していないと判別されると、ステップS
420ないしS440の処理は実行しないで、そのまま
「リターン」に抜けて、この処理を一旦終了する。On the other hand, if it is determined in step S410 that the read counter C1 has not reached CC, the process proceeds to step S410.
The process from 420 to S440 is not executed, and the process directly exits to "RETURN" to end this process once.
【0044】したがって、上記構成の管理ファイル更新
ルーチンによれば、読込カウンタC1の値が所定値CC
となる毎に、そのときの書込カウンタC2の値が管理フ
ァイルDfのデータエリアE(0)〜E(n−1)に順
に書き込まれることになる。これは、データ読込用バッ
ファ14aから読み込まれるバイト数が所定値CCの整
数倍となる毎に、データ書込用バッファ14bに書き込
まれたバイト数の総計が順に管理ファイルDfのデータ
エリアE(0)〜E(n−1)に書き込まれることを意
味する。Therefore, according to the management file updating routine having the above configuration, the value of the read counter C1 is set to the predetermined value CC.
Each time, the value of the write counter C2 at that time is sequentially written into the data areas E (0) to E (n-1) of the management file Df. That is, every time the number of bytes read from the data reading buffer 14a becomes an integral multiple of the predetermined value CC, the total number of bytes written to the data writing buffer 14b is sequentially reduced to the data area E (0) of the management file Df. ) To E (n-1).
【0045】次に、画像データ展開用バッファ14cの
容量について説明する。画像データ展開用バッファ14
cは、前述したように4メガバイトの容量を持つが、こ
の4メガバイトの容量で次のような数量のデータを格納
することが可能である。画像の大きさが、解像度が40
64dpi(dot/inch)でA4サイズ(210x29
7mm)であるとすると、1走査線のバイト数は、
((210/25.4)×4064+7)/8)を計算
して4200バイトとなる。したがって、画像データ展
開用バッファ14cに格納可能な走査線数は、4メガバ
イト(=4×1024×1024)を4200で割った
答である998.64本以下、即ち、998本以下とな
ることが分かる。Next, the capacity of the image data development buffer 14c will be described. Image data expansion buffer 14
Although c has a capacity of 4 megabytes as described above, the following amount of data can be stored with the capacity of 4 megabytes. If the image size is 40
A4 size (210x29) at 64 dpi (dot / inch)
7 mm), the number of bytes per scan line is
((210 / 25.4) × 4064 + 7) / 8) is calculated to be 4200 bytes. Therefore, the number of scanning lines that can be stored in the image data development buffer 14c may be 998.64 or less, which is the result of dividing 4 megabytes (= 4 × 1024 × 1024) by 4200, that is, 998 or less. I understand.
【0046】図11は、上記データ圧縮処理により作成
される各種データを示す説明図である。上述したよう
に、画像データ展開用バッファ14cには998本の走
査線を格納することが可能であることから、図11に示
すように、画像を表わす2次元の2値画像データを99
8本の走査線毎に区分けすればよいことになる。それに
は、図中に示すように、データ読込用バッファ14aか
ら読み出されるバイト数をカウンタC1によりカウント
して、その読込カウンタC1が、前記998本の走査線
に相応するバイト数、即ち、1走査線のバイト数420
0に998本を掛けて得られる値4191600と一致
するかを判別する。そうして、一致したら、その一致し
たデータに対応する圧縮データddの書込位置が、これ
までの格納バイト数をカウントする書込カウンタC2か
ら求められ、その書込カウンタC2の値が管理ファイル
Dfに書き込まれる。FIG. 11 is an explanatory diagram showing various data created by the data compression processing. As described above, since 998 scanning lines can be stored in the image data expansion buffer 14c, as shown in FIG.
That is, it suffices to classify every eight scanning lines. As shown in the figure, the number of bytes read from the data read buffer 14a is counted by a counter C1, and the read counter C1 determines the number of bytes corresponding to the 998 scanning lines, that is, one scan. 420 line bytes
It is determined whether or not the value matches 4191600 obtained by multiplying 998 lines by 0. Then, when they match, the write position of the compressed data dd corresponding to the matched data is obtained from the write counter C2 that counts the number of bytes stored so far, and the value of the write counter C2 is stored in the management file. Df.
【0047】読込カウンタC1の値が最初に41916
00となったときの書込カウンタC2の値が、例えば1
000000であれば、その1000000の値が管理
ファイルDfの第2番目のデータエリアE(1)に書き
込まれる。続く読込カウンタC1の値が4191600
となったときの書込カウンタC2の値が、例えば180
0000であれば、その1800000の値が管理ファ
イルDfの第3番目のデータエリアE(2)に書き込ま
れる。こうして、データ書込用バッファ14bに書き込
まれた圧縮画像データのバイト数を格納する管理ファイ
ルDfが、圧縮画像データとともに作成されることにな
る。First, the value of the read counter C1 is 41916
When the value of the write counter C2 becomes 00, for example, 1
If it is 000000, the value of 1,000,000 is written to the second data area E (1) of the management file Df. The value of the subsequent read counter C1 is 4191600
Becomes equal to 180, for example.
If it is 0000, the value of 1800000 is written to the third data area E (2) of the management file Df. Thus, the management file Df storing the number of bytes of the compressed image data written in the data writing buffer 14b is created together with the compressed image data.
【0048】次に、前述したに当たる処理について説
明する。この処理は、メモリ14に格納されるデータ伸
張・表示処理のプログラムをCPU12が実行すること
で実現される。図12は、CPU12により実行される
データ伸張・表示処理を示すフローチャートである。こ
のルーチンは、CPU12中のデータ伸張部12b(図
1)に相当する。図12に示すように、CPU12は、
処理が開始されると、まず、A4サイズの用紙を表わす
図形をカラーモニタ28に表示する処理を行なう(ステ
ップS700)。次いで、カラーモニタ28に表示され
た図形上に指定された指定点Pの座標(x,y)をマウ
ス22から読み込む処理を行なう(ステップS71
0)。Next, the processing corresponding to the above will be described. This processing is realized by the CPU 12 executing a data expansion / display processing program stored in the memory 14. FIG. 12 is a flowchart showing data expansion / display processing executed by the CPU 12. This routine corresponds to the data decompression unit 12b (FIG. 1) in the CPU 12. As shown in FIG. 12, the CPU 12
When the process is started, first, a process of displaying a graphic representing A4 size paper on the color monitor 28 is performed (step S700). Next, a process of reading the coordinates (x, y) of the specified point P specified on the graphic displayed on the color monitor 28 from the mouse 22 is performed (step S71).
0).
【0049】上記指定点Pは、マウス22を用いてオペ
レータにより所望の位置に指定される点であり、カラー
モニタ28に拡大表示したい箇所を表わす。図13は、
このときのカラーモニタ28の画面を示す説明図であ
る。図13に示すように、画面には、A4サイズの用紙
を表わす図形M1が表示されており、画面上のポインタ
PTの位置をマウス22により、カラーモニタ28に拡
大表示したい箇所に移動しクリックすることで、上記指
定点Pの座標(x,y)を装置に対して入力することが
できる。したがって、ステップS710では、CPU1
2は、その指定点Pの座標(x,y)を読み込む。The designated point P is a point designated by the operator using the mouse 22 at a desired position, and represents a portion to be enlarged and displayed on the color monitor 28. FIG.
FIG. 4 is an explanatory diagram showing a screen of a color monitor at this time. As shown in FIG. 13, a graphic M1 representing A4 size paper is displayed on the screen, and the position of the pointer PT on the screen is moved to a position to be enlarged and displayed on the color monitor 28 by the mouse 22 and clicked. Thus, the coordinates (x, y) of the designated point P can be input to the device. Therefore, in step S710, the CPU 1
2 reads the coordinates (x, y) of the designated point P.
【0050】図12に示すように、CPU12は、続い
て、ステップS710で読み取ったyの値を、前記画像
データ展開用バッファ14cに格納可能な走査線数(=
998)で割って、その商の小数点以下を切り捨てた値
を変数Y1にセットする(ステップS720)。この計
算により、上記指定点Pは、図11で示した2値画像デ
ータDTb上の998本の走査線毎に区分けした複数の
領域の内の何番目の領域に位置するかを求めることがで
きる。その後、この変数Y1の値を検索キーとして、管
理ファイルDf中のデータエリアE(Y1)の値を読み
取って、変数Syにセットするとともに、変数Y1に値
1を加えた値を検索キーとして、管理ファイルDf中の
データエリアE(Y1+1)の値を読み取って、変数E
yにセットする(ステップS730)。As shown in FIG. 12, the CPU 12 then stores the value of y read in step S710 in the number of scanning lines (=
998), and the value obtained by rounding down the decimal point of the quotient is set as a variable Y1 (step S720). By this calculation, it is possible to obtain the order of the designated point P among a plurality of areas divided for every 998 scanning lines on the binary image data DTb shown in FIG. . Thereafter, using the value of the variable Y1 as a search key, the value of the data area E (Y1) in the management file Df is read and set as the variable Sy, and the value obtained by adding 1 to the variable Y1 is used as the search key. By reading the value of the data area E (Y1 + 1) in the management file Df,
It is set to y (step S730).
【0051】変数Syは上記指定点Pを含む領域の開始
位置を、変数Eyは上記指定点Pを含む領域の終了位置
を示すことから、データ書込用バッファ14bに格納さ
れる圧縮画像データにおける両変数Sy,Eyの値の間
のデータを抽出する(ステップS740)。この結果、
上記指定点Pを含む領域に対応した圧縮画像データを得
ることができる。続いて、CPU12は、その抽出した
圧縮画像データをデータ伸張するデータ伸張処理を実行
する(ステップS750)。このデータ伸張処理は、前
述した符号化処理ルーチンの符号化処理に対応したもの
であり、ここでは、詳しい説明を省略するが、要は、前
述した符号化処理により生成された2値圧縮データを元
の2値データに伸張する処理ステップを備える。また、
データ伸張処理では、伸張した2値画像データは画像デ
ータ展開用バッファ14cに書き込んでいる。Since the variable Sy indicates the start position of the area including the specified point P and the variable Ey indicates the end position of the area including the specified point P, the variable Sy in the compressed image data stored in the data writing buffer 14b is used. Data between the values of both variables Sy and Ey is extracted (step S740). As a result,
Compressed image data corresponding to the area including the specified point P can be obtained. Subsequently, the CPU 12 executes a data decompression process for decompressing the extracted compressed image data (step S750). This data decompression process corresponds to the encoding process of the above-described encoding process routine, and detailed description thereof is omitted here. In short, however, the binary compressed data generated by the above-described encoding process is A processing step for expanding the original binary data is provided. Also,
In the data expansion process, the expanded binary image data is written in the image data expansion buffer 14c.
【0052】その後、CPU12は、この処理ルーチン
を一旦終了する。なお、ステップS750で画像データ
展開用バッファ14cに元画像データが格納されると、
前述したの処理によりその元画像データの画像をカラ
ーモニタ28に表示させる。Thereafter, the CPU 12 once ends this processing routine. When the original image data is stored in the image data expansion buffer 14c in step S750,
The image of the original image data is displayed on the color monitor 28 by the processing described above.
【0053】したがって、この実施例によれば、データ
圧縮された圧縮画像データの画像をカラーモニタ28に
表示するに際し、管理ファイルDfを参照することで、
所望の位置の圧縮画像データを直接抽出することができ
る。このため、圧縮画像データのカラーモニタ28への
表示速度を高めることができる。Therefore, according to this embodiment, when displaying the image of the compressed image data which has been subjected to the data compression on the color monitor 28, the management file Df is referred to.
Compressed image data at a desired position can be directly extracted. Therefore, the display speed of the compressed image data on the color monitor 28 can be increased.
【0054】なお、この実施例では、画像データ展開用
バッファ14cの容量を、4メガバイトとしていたが、
これに替えて、8メガバイト、12メガバイト、16メ
ガバイトといった4メガバイトの整数倍とすることもで
きる。この構成によれば、上記実施例と同様に、4メガ
バイトの容量に応じて管理ファイルDfに格納する位置
情報を定める構成とし、データ伸張・表示処理におい
て、ステップS720ないしS750の処理を上記容量
の整数倍と同じ値の回数だけ繰り返す構成とすればよ
い。例えば、画像データ展開用バッファ14cの容量が
8メガバイトなら、ステップS720の処理を2回行な
う構成とする。こうした構成によれば、画像データ展開
用バッファ14cが大きくなったときにも、画像データ
展開用バッファ14cの資源を有効利用することができ
る。In this embodiment, the capacity of the image data development buffer 14c is 4 megabytes.
Alternatively, it may be an integral multiple of 4 megabytes, such as 8 megabytes, 12 megabytes, or 16 megabytes. According to this configuration, similarly to the above embodiment, the position information to be stored in the management file Df is determined according to the capacity of 4 megabytes, and in the data decompression / display processing, the processing of steps S720 to S750 is performed in accordance with the capacity. The configuration may be repeated for the same number of times as the integer multiple. For example, if the capacity of the image data expansion buffer 14c is 8 megabytes, the processing of step S720 is performed twice. According to such a configuration, even when the image data expansion buffer 14c becomes large, the resources of the image data expansion buffer 14c can be effectively used.
【0055】また、上記実施例では、1バイトである8
ビット単位毎に元画像データを読み込んで処理を行なっ
ていたが、2バイトから構成されるワードを単位として
データ圧縮、データ伸張等の処理を行なう構成としても
よい。In the above embodiment, 1 byte, 8
Although the original image data is read and processed in units of bits, processing such as data compression and data expansion may be performed in units of words composed of 2 bytes.
【0056】上記実施例では、データ圧縮処理として、
1バイトのデータが全て値0であるときと1バイトのデ
ータが全て値1であるときをデータ圧縮の対象として、
それ以外の値0と値1の混合のデータであるときをデー
タ圧縮の対象外としていたが、これに対して他の条件の
データもデータ圧縮の対象としてもよい。さらには、符
号化の変換コードも前述した実施例に替えたものとして
もよい。即ち、データ圧縮処理としては、上記実施例で
示したものに限る必要はなく、他のどのような圧縮処理
であっても、読み込むバイト数と書き込むバイト数とを
カウントすることができればよい。In the above embodiment, as the data compression processing,
Data compression is performed when all the 1-byte data has the value 0 and when all the 1-byte data has the value 1.
The other data that is a mixture of value 0 and value 1 is excluded from data compression. However, data under other conditions may be subjected to data compression. Further, the coding conversion code may be replaced with the above-described embodiment. That is, the data compression processing need not be limited to that described in the above embodiment, and any other compression processing may be sufficient as long as the number of bytes to be read and the number of bytes to be written can be counted.
【0057】以上、この発明の一実施例を詳述してきた
が、この発明は、こうした実施例に何等限定されるもの
ではなく、この発明の要旨を逸脱しない範囲において種
々なる態様にて実施することが可能である。Although the embodiments of the present invention have been described in detail above, the present invention is not limited to these embodiments, and may be carried out in various modes without departing from the gist of the present invention. It is possible.
【図1】本発明の一実施例としての画像データ処理装置
10とその周辺装置の概略構成を示すブロック図であ
る。FIG. 1 is a block diagram showing a schematic configuration of an image data processing apparatus 10 as one embodiment of the present invention and peripheral devices thereof.
【図2】画像データ処理装置10における〜の処理
を各種データの流れとともに示す説明図である。FIG. 2 is an explanatory diagram showing processes (1) to (3) in the image data processing apparatus 10 together with various data flows.
【図3】CPU12により実行されるデータ圧縮処理の
メインルーチンを示すフローチャートである。FIG. 3 is a flowchart illustrating a main routine of a data compression process executed by a CPU 12;
【図4】符号化処理により生成される圧縮データdaの
データ構造の説明図である。FIG. 4 is an explanatory diagram of a data structure of compressed data da generated by an encoding process.
【図5】非圧縮データdbのデータ構造の説明図であ
る。FIG. 5 is an explanatory diagram of a data structure of uncompressed data db.
【図6】CPU12により実行される符号化処理ルーチ
ンの前半部分を示すフローチャートである。FIG. 6 is a flowchart showing a first half of an encoding processing routine executed by a CPU 12;
【図7】前記符号化処理ルーチンの後半部分を示すフロ
ーチャートである。FIG. 7 is a flowchart showing a latter half of the encoding processing routine.
【図8】元画像データがデータ圧縮によりどのような圧
縮画像データになるかを例をあげて示す説明図である。FIG. 8 is an explanatory diagram showing an example of what kind of compressed image data is converted from original image data by data compression.
【図9】CPU12により実行される管理ファイル更新
ルーチンを示すフローチャートである。FIG. 9 is a flowchart illustrating a management file update routine executed by the CPU 12;
【図10】管理ファイルDfの構成を示す説明図であ
る。FIG. 10 is an explanatory diagram showing a configuration of a management file Df.
【図11】上記データ圧縮処理により作成される各種デ
ータを示す説明図である。FIG. 11 is an explanatory diagram showing various data created by the data compression processing.
【図12】CPU12により実行されるデータ伸張・表
示処理を示すフローチャートである。FIG. 12 is a flowchart showing data expansion / display processing executed by a CPU 12;
【図13】マウス22を用いて指定点Pを指定する際の
カラーモニタ28の画面を示す説明図である。FIG. 13 is an explanatory diagram showing a screen of a color monitor when a designated point P is designated by using a mouse 22;
【図14】従来の2値データ処理装置を示すブロック図
である。FIG. 14 is a block diagram showing a conventional binary data processing device.
10…画像データ処理装置 12…CPU 12a…データ圧縮部 12b…データ伸張部 14…メモリ 14a…データ読込用バッファ 14b…データ書込用バッファ 14c…画像データ展開用バッファ 16…入出力インタフェース 20…キーボード 22…マウス 24…第1ハードディスクメモリ 26…第2ハードディスクメモリ 28…カラーモニタ DESCRIPTION OF SYMBOLS 10 ... Image data processing apparatus 12 ... CPU 12a ... Data compression part 12b ... Data decompression part 14 ... Memory 14a ... Data reading buffer 14b ... Data writing buffer 14c ... Image data expansion buffer 16 ... Input / output interface 20 ... Keyboard 22 mouse 24 first hard disk memory 26 second hard disk memory 28 color monitor
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/21 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/21
Claims (4)
タ圧縮して、2値圧縮データを出力する2値データ圧縮
装置であって、 前記2値データをxビット(但し、xは2以上の整数)
のビット列毎に、順次読み込む元データ読込手段と、 該読み込んだビット列を表わす2値圧縮データを生成し
て、該2値圧縮データをデータ出力用のメモリに順次書
き込む圧縮手段と、 前記元データ読込手段により読み込まれるビット列の数
をカウントする第1カウント手段と、 前記圧縮手段により書き込まれる2値圧縮データの数量
をカウントする第2カウント手段と、 前記第1カウント手段によりカウントされた前記ビット
列の数が、予め定められた所定数の整数倍となる毎に、
前記第2カウント手段でカウントされる数量を記憶する
数量記憶手段とを備える2値データ圧縮装置。1. A binary data compression device for compressing binary data having first and second values and outputting binary compressed data, wherein the binary data is x bits (where x Is an integer of 2 or more)
Source data reading means for sequentially reading, for each bit string, compression means for generating binary compressed data representing the read bit string and sequentially writing the binary compressed data to a data output memory; First counting means for counting the number of bit strings read by the means; second counting means for counting the number of binary compressed data written by the compression means; and the number of bit strings counted by the first counting means. Every time becomes an integral multiple of a predetermined number,
A number storage unit for storing the number counted by the second counting unit.
タ圧縮して、2値圧縮データを出力する2値データ圧縮
装置と、 該2値データ圧縮装置より出力される2値圧縮データを
データ伸張して、元の2値データを出力する2値圧縮デ
ータ伸張装置とを備える2値データ処理装置であって、 前記2値圧縮データ伸張装置から出力される元の2値デ
ータを、2値データ展開用のメモリに順次書き込む展開
用メモリ書込手段と、 前記2値データ展開用のメモリに記憶される2値データ
を表示装置に表示させる表示制御手段とを備え、 前記2値データ圧縮装置は、 請求項1に記載のものであって、前記所定数を、前記2
値データ展開用のメモリの容量に応じて定まる値とした
構成である2値データ処理装置。2. A binary data compression device for compressing binary data having first and second values and outputting binary compressed data, and a binary compression device output from the binary data compression device. A binary compressed data decompression device for decompressing data and outputting original binary data, wherein the binary data output from the binary compressed data decompression device is An expansion memory writing unit that sequentially writes the binary data into a memory for expanding the binary data; and a display control unit that causes a display device to display the binary data stored in the memory for expanding the binary data. The data compression device according to claim 1, wherein the predetermined number is two.
A binary data processing device having a configuration determined as a value determined according to the capacity of a memory for developing value data.
あって、 前記2値データは画像を表わす2値画像データであっ
て、 前記2値圧縮データ伸張装置は、 前記画像内の任意の部分の位置情報を入力する位置情報
入力手段と、 該部分の位置情報に応じて前記数量記憶手段に記憶され
る前記2値圧縮データの数量を検索して、前記部分の位
置を含む所定範囲の2値圧縮データのメモリ上の格納位
置を求める格納位置算出手段と、 該求めた格納位置の2値圧縮データを前記2値データ展
開用のメモリに書き込む手段とを備える2値データ処理
装置。3. The binary data processing device according to claim 2, wherein the binary data is binary image data representing an image, wherein the binary compressed data decompression device includes an arbitrary one in the image. A position information input unit for inputting position information of the portion; and a predetermined range including the position of the portion by searching for the amount of the binary compressed data stored in the number storage device according to the position information of the portion. A binary data processing apparatus comprising: a storage position calculating unit for calculating a storage position of the binary compressed data on the memory; and a unit for writing the binary compressed data of the determined storage position to the binary data expansion memory.
タ圧縮して、2値圧縮データを出力する2値データ圧縮
方法であって、 (a)前記2値データをxビット(但し、xは2以上の
整数)のビット列毎に、順次読み込む工程と、 (b)該読み込んだビット列を表わす2値圧縮データを
生成して、該2値圧縮データをデータ出力用のメモリに
順次書き込む工程と、 (c)前記工程(a)により読み込まれるビット列の数
をカウントする工程と、 (d)前記工程(b)により書き込まれる2値圧縮デー
タの数量をカウントする工程と、 (e)該工程(c)によりカウントされた前記ビット列
の数が、予め定められた所定数の整数倍となる毎に、前
記工程(d)でカウントされる数量を記憶する工程とを
備える2値データ圧縮方法。4. A binary data compression method for compressing binary data having first and second values and outputting binary compressed data, comprising: (a) converting the binary data to x bits ( (Where x is an integer of 2 or more) bit sequence, and (b) generating binary compressed data representing the read bit sequence, and sequentially storing the binary compressed data in a data output memory. A writing step; (c) a step of counting the number of bit strings read in the step (a); (d) a step of counting the number of binary compressed data written in the step (b); Storing the quantity counted in the step (d) each time the number of the bit strings counted in the step (c) becomes an integral multiple of a predetermined number. Method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35865496A JP3345291B2 (en) | 1996-12-27 | 1996-12-27 | Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP35865496A JP3345291B2 (en) | 1996-12-27 | 1996-12-27 | Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10190472A JPH10190472A (en) | 1998-07-21 |
| JP3345291B2 true JP3345291B2 (en) | 2002-11-18 |
Family
ID=18460434
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP35865496A Expired - Fee Related JP3345291B2 (en) | 1996-12-27 | 1996-12-27 | Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3345291B2 (en) |
-
1996
- 1996-12-27 JP JP35865496A patent/JP3345291B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH10190472A (en) | 1998-07-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6621493B1 (en) | Metafile compression | |
| EP1914635A2 (en) | Image displaying device having image cache memory | |
| JP3345291B2 (en) | Binary data compression apparatus, binary data processing apparatus using the same, and binary data compression method | |
| US6654867B2 (en) | Method and system to pre-fetch compressed memory blocks using pointers | |
| CN113836134A (en) | Sparse matrix compression method and decompression method and device | |
| JPH04360246A (en) | Device for compressing file | |
| US6873726B2 (en) | Information adding apparatus, information extracting apparatus, information adding method, information extracting method, and computer readable recording medium | |
| JP3325326B2 (en) | Electronic filing equipment | |
| JP3081549B2 (en) | Image data storage method and image data decompression device | |
| JPH08220145A (en) | Digital oscilloscope waveform display method | |
| JP3896683B2 (en) | User-defined character management device and storage medium | |
| JP3456481B2 (en) | Information processing device | |
| JPH0193857A (en) | Document printer | |
| JP2002171412A (en) | SIMD type information processing apparatus provided with X-ary instruction | |
| JPH05173964A (en) | History acquisition system for input/output data | |
| JP2000132518A (en) | Small computer | |
| JP6096970B1 (en) | Recording medium on which Malmo compression software is recorded | |
| JP3710208B2 (en) | Image processing method and apparatus | |
| CN114218895A (en) | Method for converting UOF document | |
| JPS6231378B2 (en) | ||
| JPH06332666A (en) | Compressing method for data | |
| JPH09230784A (en) | Map display method | |
| JPH05150940A (en) | Data compression method and method and device for data extension | |
| JPH0322040A (en) | Program debugging backup method | |
| JPH0625981B2 (en) | Small electronic calculator with mathematical function |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080830 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |