JP2965084B2 - Image data compression method - Google Patents

Image data compression method

Info

Publication number
JP2965084B2
JP2965084B2 JP28838490A JP28838490A JP2965084B2 JP 2965084 B2 JP2965084 B2 JP 2965084B2 JP 28838490 A JP28838490 A JP 28838490A JP 28838490 A JP28838490 A JP 28838490A JP 2965084 B2 JP2965084 B2 JP 2965084B2
Authority
JP
Japan
Prior art keywords
data
image data
length
compression
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP28838490A
Other languages
Japanese (ja)
Other versions
JPH04167671A (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.)
NAGANO OKI DENKI KK
Oki Electric Industry Co Ltd
Original Assignee
NAGANO OKI DENKI KK
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NAGANO OKI DENKI KK, Oki Electric Industry Co Ltd filed Critical NAGANO OKI DENKI KK
Priority to JP28838490A priority Critical patent/JP2965084B2/en
Publication of JPH04167671A publication Critical patent/JPH04167671A/en
Application granted granted Critical
Publication of JP2965084B2 publication Critical patent/JP2965084B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、画像等のイメージデータに対する転送側の
データ圧縮、被転送側のデータ伸長を効果的に行なう簡
易なイメージデータの圧縮・伸長方法に関する。
The present invention relates to a simple image data compression / expansion method for effectively compressing image data such as an image on a transfer side and decompressing data on a transfer side. About.

(従来の技術) 従来、この種の画像データの圧縮・伸長方法について
は、G3ファクシミリ等で使用されるMH符号化方式やMR符
号化方式、G4ファクシミリ等で使用されているMMR符号
化方式により2値の画像データを符号化することで、画
像データの圧縮を行ない、データ転送時間の短縮を実現
している。
(Prior art) Conventionally, this type of image data compression / expansion method is based on the MH coding method and MR coding method used in G3 facsimile and the like, and the MMR coding method used in G4 facsimile and the like. By encoding the binary image data, the image data is compressed and the data transfer time is shortened.

これらの方式は、CCITT勧告T.4とT.6に準拠した方式
である。ここでは、MH符号化方式を例にとって従来の画
像データの圧縮・伸長方法について、概略を説明する。
尚、MH符号化方式とは、画像データを1走査ライン毎に
白画素と黒画素の同色画素の連続長(以下、ランレング
スと称す。)を符号化するものである。
These methods are based on CCITT Recommendations T.4 and T.6. Here, an outline of a conventional image data compression / decompression method will be described using an MH encoding method as an example.
Note that the MH encoding method encodes image data with a continuous length (hereinafter, referred to as a run length) of the same color pixels of white pixels and black pixels for each scanning line.

先ず、画像データの圧縮について第2図〜第4図を用
いて説明する。尚、第2図はMH符号化方式による画像デ
ータの圧縮例を示す説明図、第3図(a),(b)はラ
ンレングスとメイクアップ符号の関係を示す図、第4図
(a),(b)はランレングスとターミネイティング符
号の関係を示す図である。
First, compression of image data will be described with reference to FIGS. FIG. 2 is an explanatory diagram showing an example of image data compression by the MH coding method, FIGS. 3 (a) and 3 (b) are diagrams showing the relationship between run length and makeup code, and FIG. 4 (a). , (B) shows the relationship between run length and terminating code.

MH符号化方式により符号化されたランレングスは、デ
ータ符号と呼ばれ、MH符号化方式では、データ符号の前
のEOL(End of Line)符号が付加され、更に必要であれ
ばデータ符号の後にフィルビットが付加される。ここ
で、EOL符号のフォーマットは、“000000000001"Bであ
る。またフィルビットは、EOL符号,データ符号,フィ
ルビットの合計が定められた1走査ライン分の最小符号
ビット数以上になるように、データ符号の直後に挿入さ
れる(データ符号の途中に入ることはできない。)。フ
ィルビットのフォーマットは、可変長の“0"B列であ
る。
The run length encoded by the MH encoding method is called a data code. In the MH encoding method, an EOL (End of Line) code before the data code is added and, if necessary, after the data code. A fill bit is added. Here, the format of the EOL code is “000000000001” B. The fill bit is inserted immediately after the data code so that the sum of the EOL code, the data code, and the fill bit is equal to or greater than the defined minimum number of code bits for one scan line. Can not.). The format of the fill bit is a variable length “0” B column.

例えば、112の連続する白画素をMH符号化方式で圧縮
すると、第2図に示すように先ずEOL符号(同図a箇
所)を付加し、続いてデータ符号(同図b箇所)がき
て、この後フィルビット(同図c箇所)が付加される。
ここで、同図b箇所のデータ符号は、同図に示す如く11
2連続の白画素を、64連続の白画素を表わすメイクアッ
プ符号“11011"B(第3図(a)のd箇所参照)と48連
続の白画素を表わすターミネイティング符号“0000101
1"B(第4図(b)のe箇所参照)に変換して得られる
ものである。
For example, when 112 consecutive white pixels are compressed by the MH coding method, an EOL code (a in FIG. 2) is first added as shown in FIG. 2, and then a data code (b in FIG. 2) is obtained. Thereafter, a fill bit (the point c in the figure) is added.
Here, the data code at the point b in FIG.
A makeup code “11011” B (refer to d in FIG. 3A) representing two consecutive white pixels and a terminating code “0000101” representing 48 consecutive white pixels represent two consecutive white pixels.
It is obtained by converting to 1 " B (see the point e in FIG. 4 (b)).

このようにして、ランレングスが符号化される。従っ
て、画像データが圧縮された形で、データ転送が行なわ
れるため、転送時間は、符号化前のそれと比較すると、
極端に短縮できる。
In this way, the run length is encoded. Therefore, since the data transfer is performed in a compressed form of the image data, the transfer time is shorter than that before encoding.
Extremely short.

また、画像データの伸長も同様に、EOL符号を検出し
データ符号を解析することで連続画素数が求まり、元の
画像データに変換することができる。
Similarly, when expanding the image data, the number of continuous pixels can be obtained by detecting the EOL code and analyzing the data code, and can be converted into the original image data.

以上のようにMH符号化方式を例にとって従来技術の画
像データの圧縮・伸長方法を説明したが、これらの圧縮
・伸長処理は、ソフトウェア(プログラム)で行なうよ
りハードウェア(回路)で行なった方が処理速度が速い
ため、一般的には専用のLSIを使用している。
As described above, the image data compression / expansion method of the prior art has been described by taking the MH encoding method as an example. However, these compression / expansion processes are performed by hardware (circuits) rather than by software (programs). However, since the processing speed is high, a dedicated LSI is generally used.

(発明が解決しようとする課題) しかしながら、上述した従来の画像データの圧縮・伸
長方法では、専用のLSIを使用するため、装置の設計当
初からLSI使用の有無を決定しなければならない。従っ
て、仮に専用のLSIを使用しなくても、仕様上の処理能
力を満足できると判断し設計を進めた場合に、後の実機
による評価の段間になって、仕様上の処理能力を満足で
きない、即ちデータ転送に時間がかかりすぎてしまとい
うような問題が発生すると、その対応として、回路変更
(追加)等の大掛かりな手段を講じるか、あるいは処理
速度の向上を断念するのが現状である。
(Problems to be Solved by the Invention) However, in the above-mentioned conventional image data compression / expansion method, since a dedicated LSI is used, it is necessary to determine whether or not to use the LSI from the beginning of the device design. Therefore, even if a dedicated LSI is not used, if it is judged that the processing capacity in the specifications can be satisfied and the design is advanced, the processing capacity in the specifications will be satisfied in the stage of evaluation by the actual machine later. When a problem such as being impossible, that is, taking too much time for data transfer occurs, as a countermeasure, it is necessary to take large-scale measures such as circuit change (addition) or to abandon improvement of processing speed. is there.

特に、パラレルインタフェースではなく、シリアルイ
ンタフェースを介して、接続装置へ画像データを転送す
る画像読取装置においては、画像データの転送時間がシ
ステムとしての処理能力を決める要因になっているの
で、上記の処理能力の問題は重要である。
In particular, in an image reading apparatus that transfers image data to a connected device via a serial interface instead of a parallel interface, the image data transfer time is a factor that determines the processing capability of the system. The issue of competence is important.

そこで、本発明の目的は、従来の如きデータ圧縮・伸
長のための専用のLSIを用いずに、従来の処理能力上の
問題を解決し、更にデータ転送側で、任意の連続する大
量同一データに対して高い圧縮率でデータ圧縮を容易に
行なえ、かつ被データ転送側でデータ復元のためのデー
タ伸長を容易に行なえるようにし、データ転送時間の大
幅な短縮を図ることができる簡易なイメージデータの圧
縮・伸長方法を提供することにある。
Therefore, an object of the present invention is to solve the problem of the conventional processing capacity without using a dedicated LSI for data compression and decompression as in the past, and furthermore, on the data transfer side, arbitrarily continuous large amounts of the same data. A simple image that can easily perform data compression with a high compression ratio, and can easily perform data decompression for data restoration on the data transfer side, greatly reducing the data transfer time. An object of the present invention is to provide a data compression / decompression method.

(課題を解決するための手段) 本発明のイメージデータの圧縮方法は、“1"と“0"の
ビットデータで表わされるイメージデータを圧縮する方
法において、“0"のビットデータが所定量以上連続する
場合、該データが“0"であることを示す指標データを複
数連続して先頭にし、次に該データのデータ長を示すレ
ングスデータを前記指標データと同数連続して続けるこ
とにより前記所定量以上連続する“0"のビットデータを
圧縮するようにしたものである。
(Means for Solving the Problems) According to a method for compressing image data of the present invention, in the method for compressing image data represented by “1” and “0” bit data, “0” bit data is equal to or more than a predetermined amount. In the case of continuous data, a plurality of index data indicating that the data is "0" are successively placed at the top, and then the length data indicating the data length of the data is continuously continued by the same number as the index data, whereby the position is determined. Bit data of “0” that is continuous for a certain amount or more is compressed.

(作用) 転送側のイメージデータ読取装置では、イメージデー
タを格納するイメージメモリ内のバイト単位の扱いによ
る“0"のビットデータを、該データが連続した場合に
“指標+レングス”の形で圧縮し、“0"のビットデータ
が所定量以上連続する場合、指標データを複数連続して
先頭にし、次にレングスデータを前記指標データと同数
連続して続けることにより前記所定量以上連続する“0"
のビットデータを圧縮するようにして、他の接続装置へ
イメージデータを転送する。被転送側の接続装置では、
受信したイメージデータ中の指標の数によりレングスの
構成バイト数を判断してデータ復元のためのデータ伸長
を行う。
(Operation) The image data reading device on the transfer side compresses “0” bit data in the image memory for storing the image data in the unit of bytes in the form of “index + length” when the data is continuous. When the bit data of “0” continues for a predetermined amount or more, a plurality of index data are successively placed at the head, and then the length data is continued for the same number of times as the index data. "
The image data is transferred to another connected device by compressing the bit data. In the connected device on the transferee side,
The number of bytes constituting the length is determined based on the number of indices in the received image data, and data decompression for data restoration is performed.

従って、本発明では従来の如き、専用のLSIを用いず
に、データ転送側で、任意の連続する大量同一データに
対して高い圧縮率でデータ圧縮を行なうことができ、か
つ被データ転送側でデータ復元のためのデータ伸長を容
易に行なうことができる。転送側で高い圧縮率でデータ
圧縮を行なえるので、イメージデータ読取装置から他の
接続装置へのデータ転送時間が大幅に短縮され、従来の
如き処理能力の問題は生じない。
Therefore, in the present invention, the data transfer side can perform data compression at a high compression ratio on any continuous large amount of the same data without using a dedicated LSI as in the related art, and Data decompression for data restoration can be easily performed. Since the data compression can be performed at a high compression rate on the transfer side, the data transfer time from the image data reading device to another connection device is greatly reduced, and the problem of the processing capability unlike the conventional case does not occur.

(実施例) 次に本発明について図面を用いて説明する。(Example) Next, the present invention will be described with reference to the drawings.

第1図は本発明に係るデータ圧縮方法の一実施例を示
す説明図である。
FIG. 1 is an explanatory diagram showing one embodiment of a data compression method according to the present invention.

同図(a)は圧縮前の画像データ(2進表示)であ
り、この画像データ中には、60連続の白画素が含まれて
おり、これをイメージメモリ内のバイト単位に区切り16
進で表わすと同図(b)に示す如くなる。
FIG. 2A shows image data (binary display) before compression. This image data includes 60 continuous white pixels, which are divided into bytes in the image memory.
When expressed in hexadecimal, it becomes as shown in FIG.

同図(b)では、60連続の白画素はバイト単位で、2
ビット+7バイト+2ビットとなり、このうち7バイト
は16進00Hであり、これを圧縮の対象とする。
In FIG. 6B, 60 consecutive white pixels are 2 bytes in byte units.
It becomes bit +7 byte + 2 bits, of which 7 byte is hexadecimal 00 H, to do this the object of compression.

圧縮の形式は、同図(c)に示すように指標(符号化
方式でいうEOL符号)となる00Hの1バイトと、00Hの連
続バイト数(以下、レングスと称す。)、ここでは7バ
イトを示す07Hの1バイトの合計2バイトに変換する。
これが圧縮の基本形である。同図(c)に示す如く圧縮
処理されたものは、送信バッファに格納される。同図
(c)において、指標は、00H固定とし、その他の値
(バイト単位)は圧縮なしの画像データとみなし、00H
の後に続くバイトは、必ずレングスであることを定義す
ることで、伸長側でも圧縮データか否かの識別が行なえ
る。
Form of compression, and FIG. (C) is an indicator (EOL codes referred to in the coding scheme) as shown in 00 H 1 byte, 00 H number of consecutive bytes (hereinafter, referred to as length.), Where It converted into 1-byte total of 2 bytes 07 H indicating the 7 bytes.
This is the basic form of compression. The data that has been compressed as shown in FIG. In FIG. (C), indicators, and 00 H fixed, other values (in bytes) considers the image data without compression, 00 H
By defining that the byte following "" is always a length, the decompression side can identify whether the data is compressed data.

従って、画像データ中00Hパターンが1バイトであっ
た場合も、必ず00Hの後にレングス01Hを付加する。この
場合、00H1バイトが00H・01Hの2バイトで表わすことに
なるため、圧縮ではなく、余分に転送データ数を増やす
ことになってしまうが、上記定義を装置間で厳守しない
と、本画像データの圧縮・伸長方法は成り立たなくな
る。
Therefore, even if the image data 00 H pattern is 1 byte, it adds length 01 H always after 00 H. In this case, 00 for H 1 byte would be represented by 2-byte 00 H · 01 H, rather than compression, becomes the extra increase the number of transfer data, but if not strictly between devices of the above definition However, the compression / decompression method of the main image data does not work.

次に、レングスが255バイト(16進でFFH)を越える場
合に、画像データの圧縮・伸長方法を複雑にしたくなけ
れば、255バイト単位で前述の基本形で行なえばよい
(第5図(c)参照)。しかし、更にデータ圧縮率を高
めようとする場合、次のような拡張圧縮方法が考えられ
る。
Then, if the length exceeds (FF H in hexadecimal) 255 bytes, if you do not want to complicate the process of compression and decompression image data, 255 bytes may be carried out in the aforementioned basic form (FIG. 5 (c )reference). However, in order to further increase the data compression ratio, the following extended compression method can be considered.

前述した、圧縮の基本形は、指標,レングスそれぞれ
1バイト構成であったが、これを2バイト構成、即ち指
標が2バイト(00H・00H)の場合は、レングスも2バイ
ト(2バイト構成で表わせるレングスの最大は16進のFF
FFH、10進で65535バイト)構成となるようにする。ここ
で、指標を2バイトとしたのは、指標の連続個数=後に
続くレングスのバイト構成と定義することで、レングス
に応じた最小バイト構成の圧縮形式を使えるからであ
る。また、指標が2バイトの拡張圧縮形式について注意
しなければならないことは、指標の直後のレングスを最
上位桁にすることである。なぜなら、これは、もし仮に
指標の直後のレングスを最下位桁にした場合、最下位桁
は指標と同じデータ、即ち00Hの場合も有り、拡張のた
めの指標であるのか、レングスの最下位桁であるのか伸
長側で判断できなくなるという問題を防ぐためである。
Aforementioned, the basic form of the compression index, although a one byte arrangement length, which 2-byte configuration, that is, when the index is 2 bytes (00 H · 00 H), length also 2 bytes (2 bytes Configuration The maximum length that can be represented by is hexadecimal FF
FF H , 65535 bytes in decimal). The reason why the index is set to 2 bytes is that the compression format having the minimum byte configuration according to the length can be used by defining the continuous number of indexes = the byte configuration of the following length. Also, what should be noted about the extended compression format in which the index is 2 bytes is that the length immediately after the index is the most significant digit. Because it is, if temporarily when the length immediately after the indication to the least significant digit, the least significant digit is also for the same data, i.e. 00 H as an index, whether an indicator for the extension, the length of the lowest This is to prevent a problem that the decompression side cannot determine whether the digit is a digit.

指標の直後のレングスが最上位桁であれば、拡張の条
件は、レングスがFFHを越える場合であるので、拡張さ
れたレングスは、0100Hとなり、最上位桁は、常に00H
り大きい値になるため、上記問題はなくなる。尚、この
ことは、本圧縮方法で述べた“圧縮の対象は00Hのみ”
という条件にもあてはまることで、仮に黒画素の連続
(通常はFFH)を白画素の圧縮と一緒に行なおうとする
と、白画素圧縮との区別のため00H以外の指標にしなけ
ればならなく、00H以外にした時点で指標の直後のレン
グスを最上位桁にしても、指標と同一データになる危険
がある。このため、前述した“圧縮の対象は00Hのみ”
という条件は絶対的なものとする必要がある。
If the length immediately after the indicator is the most significant digit, the extension condition is that the length exceeds FF H , so the extended length is 0100 H , and the most significant digit is always a value greater than 00 H Therefore, the above problem is eliminated. Incidentally, this mentioned in the present compression method "for compression is 00 H only"
If the continuation of black pixels (usually FF H ) is to be performed together with the compression of white pixels, an index other than 00 H must be used to distinguish it from white pixel compression. , even if the length immediately after the index the most significant digit at the time of the other than the 00 H, there is a risk of the index and the same data. For this reason, the above-mentioned "is the subject of compression 00 H only"
Condition must be absolute.

以上の拡張圧縮について、第5図に具体例を上げて説
明する。尚、第5図は本発明に係るイメージデータ圧縮
方法の他の実施例を示す説明図である。
The above-described extended compression will be described with reference to a specific example in FIG. FIG. 5 is an explanatory view showing another embodiment of the image data compression method according to the present invention.

第5図(a)に示すように画像データとして10200連
続の白画素があった場合、16進法で表わすと同図(b)
に示す如くなる。更に指標としてレングスの構成を基本
形(指標,レングスとも各1バイトの計2バイト)とす
れば、同図(c)に示すように10200画素は1275バイト
であり、255バイト単位で形を作るため、5組(5×2
=10バイト)の基本形が必要になる。
If there are 10200 consecutive white pixels as image data as shown in FIG. 5 (a), it is represented in hexadecimal notation (b).
It becomes as shown in. Furthermore, if the structure of the length is assumed to be the basic form (2 bytes each for 1 byte for both the index and the length), as shown in FIG. 10 (c), 10200 pixels are 1275 bytes, and the shape is formed in units of 255 bytes. 5 sets (5 × 2
= 10 bytes).

ところが、拡張形で更に圧縮するとすれば、10200画
素は1275バイトで、1275バイトは16進の4FBHであるか
ら、レングス構成を2バイトにすればよい。従って、同
図(d)に示すように拡張形の場合は、指標とレングス
の構成を各2バイトの計4バイトですむため、前述の基
本形に比べると、更に10−4=6バイトの圧縮ができる
ことになる。尚、同図(d)に示すようにレングスの並
びは、指標に近い方を上位アドレスとし、最上位アドレ
スは00Hとなることはあり得ない。
However, if further compression in expanded form, 10200 pixels at 1275 bytes, since 1275 bytes is hexadecimal 4fb H, it may be the length configuration 2 bytes. Therefore, in the case of the extended type as shown in FIG. 10D, the structure of the index and the length is only 2 bytes each, that is, a total of 4 bytes. Can be done. Incidentally, the (d) of FIG sequence of length as shown in the a person upper address closer to the index, there is no such the most significant address is 00 H.

次に本発明のイメージデータの圧縮・伸長方法の適用
例について、第6図,第7図を用いて説明する。尚、第
6図は画像読取システムの構成例を示す図、第7図は第
6図における画像データの流れを示す詳細説明図であ
る。
Next, an application example of the image data compression / expansion method of the present invention will be described with reference to FIGS. 6 and 7. FIG. FIG. 6 is a diagram showing a configuration example of the image reading system, and FIG. 7 is a detailed explanatory diagram showing a flow of image data in FIG.

先ず、画像読取システムについて第6図を用いて説明
する。同図において、11は画像読取装置であって、この
画像読取装置11は、圧縮変換手段を備えている。12はシ
リアルインタフェース13を介して画像読取装置11に接続
された上位装置であって、この上位装置12には伸長変換
手段を備えている。更に上位装置12には、必要があれ
ば、画像データを出力するためのプリンタ14等が接続さ
れるのが一般的である。
First, the image reading system will be described with reference to FIG. In FIG. 1, reference numeral 11 denotes an image reading device, and the image reading device 11 includes a compression conversion unit. Reference numeral 12 denotes a higher-level device connected to the image reading device 11 via a serial interface 13, and the higher-level device 12 includes a decompression conversion unit. Further, a printer 14 or the like for outputting image data is generally connected to the host device 12, if necessary.

次に、画像データの流れを中心に第6図の各装置の内
部構成について第7図を用いて説明する。
Next, the internal configuration of each device in FIG. 6 will be described with reference to FIG. 7, focusing on the flow of image data.

先ず、画像読取装置11では、画像読取センサ11−1で
読取られた画像データは一旦イメージメモリ11−2に格
納される。画像読取装置11とイメージメモリ11−2間は
通常ハードウェアのみで転送される。次に画像読取装置
11内蔵の主制御部(図示せず)は圧縮変換手段11−3を
動作させる。圧縮変換手段11−3は、イメージメモリ11
−2に格納された画像データを1バイトずつ取出して圧
縮処理を行ない送信バッファ11−4に格納してゆく。こ
の送信バッファ11−4内は、圧縮された容量の少ない画
像データが格納されており、これがシリアルインタフェ
ース13で上位装置12へ転送される。この転送と同時に、
画像読取装置11では同様の動作が行なわれる。即ち画像
読取センサ11−1で読取られた画像データがイメージメ
モリ11−2に格納され、更にイメージメモリ11−2から
1バイトずつ画像データが取出され圧縮変換手段11−3
で圧縮処理され、送信バッファ11−4に格納される。そ
して送信バッファ11−4よりシリアルインタフェース13
を介して上位装置12へ転送が行なわれる。
First, in the image reading device 11, the image data read by the image reading sensor 11-1 is temporarily stored in the image memory 11-2. Normally, only hardware transfers data between the image reading device 11 and the image memory 11-2. Next, the image reading device
A built-in main control unit (not shown) operates the compression conversion unit 11-3. The compression conversion means 11-3 is provided in the image memory 11
The image data stored in -2 is taken out one byte at a time, compressed, and stored in the transmission buffer 11-4. The transmission buffer 11-4 stores compressed image data having a small capacity, which is transferred to the higher-level device 12 by the serial interface 13. At the same time as this transfer
The same operation is performed in the image reading device 11. That is, the image data read by the image reading sensor 11-1 is stored in the image memory 11-2, and the image data is further taken out one byte at a time from the image memory 11-2, and compressed and converted by the compression conversion means 11-3.
And is stored in the transmission buffer 11-4. Then, the serial interface 13 is transmitted from the transmission buffer 11-4.
Is transferred to the upper-level device 12 via the.

次に、上位装置12では、シリアルインタフェース13を
介して受信した画像データは一旦受信バッファ12−1に
格納される。次に上位装置12内蔵の主制御部(図示せ
ず)は、伸長変換手段12−2を動作させる。伸長変換手
段12−2は、受信バッファ12−1から画像データを1バ
イトずつ取出して伸長処理を行ない、圧縮前の画像デー
タに戻して編集メモリ11−3へ格納する。この編集メモ
リ11−3からは、必要に応じて画像データがプリンタ14
へ出力される。
Next, in the host device 12, the image data received via the serial interface 13 is temporarily stored in the reception buffer 12-1. Next, a main control unit (not shown) built in the host device 12 operates the decompression conversion unit 12-2. The decompression conversion means 12-2 extracts the image data one byte at a time from the reception buffer 12-1, performs decompression processing, returns the image data before compression, and stores it in the editing memory 11-3. From the editing memory 11-3, the image data is transferred to the printer 14 as necessary.
Output to

以上のようにして、画像データは、画像読取装置11か
ら接続装置である上位装置12(更にはプリンタ14)へ転
送される。
As described above, the image data is transferred from the image reading device 11 to the higher-level device 12 (further, the printer 14) as the connection device.

次に本発明が適用される圧縮変換手段11−3と伸長変
換手段12−2による具体的な処理について説明する。
Next, specific processing by the compression conversion means 11-3 and the expansion conversion means 12-2 to which the present invention is applied will be described.

先ず、圧縮変換手段11−3による画像データの圧縮変
換処理について第8図を用いて説明する。尚、第8図は
本発明に係るイメージデータ圧縮方法による圧縮変換処
理のフローチャートである。また、第8図には処理フロ
ーの理解を容易にするため、レングスカウンタ例が図示
されている。
First, the image data compression conversion processing by the compression conversion means 11-3 will be described with reference to FIG. FIG. 8 is a flowchart of a compression conversion process by the image data compression method according to the present invention. FIG. 8 shows an example of a length counter for easy understanding of the processing flow.

圧縮変換手段11−3は、最初にイメージメモリ11−2
より画像データ(バイト)を取出す(第8図のステップ
S1)。次にその取出した画像が00H(通常は連続する白
画素である。)か否か判断し(同図のステップS2)、00
Hでなければ圧縮の対象外であるため、そのまま送信バ
ッファ11−4に取出した画像データを格納する(同図の
ステップS3)。また、取出した画像データが00Hであっ
たら、圧縮の対象であるため、圧縮処理に必要な各パラ
メータI(更新してゆくべきレングスカウンタを表わす
ポインタ),J(使用したレングスカウンタの数:実際は
−1された値となる),LNG(0)〜LNG(n−1)(実
際に連続バイト数をカウントするレングスカウンタでカ
ウンタ0からカウンタn:nはレングスカウンタのシステ
ムで定義する最大個数で、カウンタNo.としてはn−1
となる。)を総て“0"に初期セットする(同図のステッ
プS4)。
The compression conversion means 11-3 firstly stores the image memory 11-2.
Extract image data (byte) from the data (step in FIG. 8)
S1). Then (usually white consecutive pixels.) The retrieved image is 00 H it is determined whether or not (step S2 in FIG.), 00
If it is not H , the image data is out of the compression target, and the extracted image data is stored as it is in the transmission buffer 11-4 (step S3 in FIG. 3). Also, if there in the extracted image data is 00 H, because it is the compression of the target, the parameter I (pointer representing the length counter to slide into updated) required compression, J (the number of length counter used: LNG (0) to LNG (n-1) (Length counter that actually counts the number of consecutive bytes. Counters 0 to n: n are the maximum number defined by the length counter system.) And the counter number is n-1
Becomes ) Are all initially set to “0” (step S4 in the figure).

続いて、既に00Hを1バイト取出しているので、レン
グスカウンタを+1(バイト)にする(同図のステップ
S5)。
Then, since the extraction already 1 byte 00 H, the length counter +1 (byte) (in the drawing step
S5).

次に、連続バイト数のカウントを開始する訳である
が、先ず、イメージメモリ12−2より次の画像データを
取出す(同図のステップS6)。
Next, in order to start counting the number of consecutive bytes, first, the next image data is fetched from the image memory 12-2 (step S6 in FIG. 6).

取出した画像データが00Hでなければ、レングスのカ
ウント終了までカウントアップした分のレングス(この
時、どのレングスカウンタまでカウントアップしたかを
知るためにJを使う。)を送信バッファ11−4に格納
し、再度ステップS1に戻る(同図のステップS7,S8)。
また取出した画像データが00Hであれば、更新すべきレ
ングスカウンタのポインタIが示すレングスカウンタを
+1(バイト)する(同図のステップS7,S9)。
Taken out image data is 00 H unless, (at this time, use J to know whether it has counted up to any length counter.) Minute length which counts up to the end of the counting length of the transmission buffer 11-4 Then, the process returns to step S1 again (steps S7 and S8 in the figure).
If also retrieved image data is 00 H, a length counter indicating pointer I of the length counter to be updated to +1 (byte) (step S7, S9 in drawing).

次に、今カウントアップしたレンズカウンタがオーバ
ーフロー(桁あふれ:FFH→00H)したか否か判断し(同
図のステップS10)、オーバーフローしていなければ更
新すべきレングスカウンタのポインタIを最下位バイト
のレングスを示すよう“0"に戻し(同図のステップS1
1)、次の画面データ取出しに戻る(同図のステップS
6)。
Next, it is determined whether or not the lens counter that has just counted up has overflowed (digit overflow: FF H → 00 H ) (step S10 in the figure), and if it has not overflowed, the pointer I of the length counter to be updated is updated. Return to "0" to indicate the length of the lower byte (step S1 in FIG.
1), return to the next screen data retrieval (Step S in the same figure)
6).

もし、レングスカウンタがオーバーフローしていた
ら、更新すべきレングスカウンタのポインタIを更新し
(次の上位桁のレングスカウンタを示すように+1す
る。)(同図のステップS12)、更に更新すべきレング
スカウンタのポインタIの示すレングスカウンタを+1
(バイト)する(同図のステップS13)。
If the length counter has overflowed, the pointer I of the length counter to be updated is updated (+1 is added so as to indicate the length counter of the next upper digit) (step S12 in the figure), and the length to be further updated The length counter indicated by the pointer I of the counter is incremented by +1.
(Byte) (step S13 in the figure).

レングスカウンタにオーバーフローが生じたので、拡
張圧縮のための指標(00H)を送信バッファ11−4へ格
納し(同図のステップS14)、Jを更新して(同図のス
テップS15)、再度オーバーフローの判断を行なう(同
図のステップS16)。
Since an overflow has occurred in the length counter, an index (00 H ) for extended compression is stored in the transmission buffer 11-4 (step S14 in the figure), J is updated (step S15 in the figure), and again An overflow is determined (step S16 in the figure).

このようにして、拡張圧縮を含んだデータ圧縮が行な
われ、送信バッファ11−4に圧縮された形の画像データ
が揃い、タイミングをみはからって、接続装置である上
位装置12へ転送されていく。
In this manner, the data compression including the extended compression is performed, and the compressed image data is prepared in the transmission buffer 11-4, and transferred to the host device 12 as a connection device at a certain timing. To go.

次に、伸長変換手段12−2による受信した画像データ
の伸長変換処理について第9図を用いて説明する。尚、
第9図は、本発明に係るイメージデータ伸長方法による
伸長変換処理のフローチャートである。また第9図には
処理フローの理解を容易にするためレングスカウンタ例
が図示されている。
Next, the expansion conversion processing of the received image data by the expansion converter 12-2 will be described with reference to FIG. still,
FIG. 9 is a flowchart of a decompression conversion process by the image data decompression method according to the present invention. FIG. 9 shows an example of a length counter for easy understanding of the processing flow.

伸長変換手段12−2は、最初にシリアルインタフェー
ス13にて受信した画像データ(1バイト)を受信バッフ
ァ12−1より取出す(第9図のステップS21)。
The decompression / conversion means 12-2 extracts the image data (1 byte) first received by the serial interface 13 from the reception buffer 12-1 (step S21 in FIG. 9).

次に、その取出した画像データが00Hか否か判断し
(同図のステップS22)、00Hでなければ伸長の対象外で
あるため、そのまま編集メモリ12−3に取出した画像デ
ータを格納する(同図のステップS23)。また、取出し
た画像データが00Hであったら、伸長の対象であるた
め、伸長処理に必要なパラメータI(レングスが何バイ
ト構成かを知るため、かつ受信したレングスをレングス
カウンタへ格納するためのポインタ)を“0"にセットす
る(同図のステップS24)。
Next, the fetched image data is 00 H it is determined whether or not (step S22 in FIG.), 00 because it is covered by the H unless extended, storing image data taken out as the editing memory 12-3 (Step S23 in the figure). Also, if there in the extracted image data is 00 H, because it is the extension of the object, for knowing the parameters I (or length many bytes configuration required decompression processing, and for storing the received length to the length counter Pointer) is set to "0" (step S24 in the figure).

次に、指標00Hに続く次バイトのデータを受信バッフ
ァ12−1より取出し(同図のステップS25)、そのデー
タが00H(指標の連続)か判断する(同図のステップS2
6)。その取出したデータが00Hであったら、パラメータ
Iを更新(レングスのバイト数構成のカウント)し(同
図のステップS27)、次のデータを受信バッファ12−1
より取出す(同図のステップS25)。またステップS26
で、受信バッファ12−1より取出したデータが00Hでな
ければ、最上位桁のレングスであるため、そのデータを
パラメータIが示すレングスカウンタへ、一時記憶のた
め格納する(同図のステップS28)。
Next, the index 00 is taken out from the receive buffer 12-1 the data of the next byte following the H (step S25 in FIG.), The data is 00 H (continuous indication) or not (in the drawing step S2
6). If there in the extracted data is 00 H, parameter I is updated (count of bytes constituting Length) (figure in step S27), reception of the next data buffer 12-1
(Step S25 in the figure). Step S26
In, unless the data is 00 H was taken out from the receiving buffer 12-1, since the length of the most significant digit, the length counter indicating the data parameter I is, step S28 in (FIG storing for temporary storage ).

次に、今までカウントしてきた指標数(=I)が、
“0"になるまで(指標数=レングスの構成バイト数であ
るから、その分の受信データは総てレングスとみなして
よい。)、順次受信バッファ12−1からデータを取出し
(同図のステップS30)、パラメータIを−1し(同図
のステップS31)、レングスカウンタへレングスを格納
していく(同図のステップS28)。
Next, the number of indexes (= I) counted so far is
Until it becomes "0" (the number of indices = the number of bytes constituting the length, all of the received data may be regarded as length). Data is sequentially taken out from the reception buffer 12-1 (steps in the figure). S30), the parameter I is decremented by 1 (step S31 in the figure), and the length is stored in the length counter (step S28 in the figure).

こうして、パラメータIが“0"になったら、レングス
の取出しは完了するから、次に一時記憶しておいたレン
グスカウンタよりレングスを読出し、レングス分の00H
データを編集メモリ12−3へ格納し(同図のステップS3
2)、ステップS21へ戻る。
Thus, the parameter When I becomes "0", because extraction of the length is completed, then temporarily stored reads the length from the length counter had, length worth of 00 H
The data is stored in the editing memory 12-3 (step S3 in FIG.
2) Return to step S21.

このようにして、拡張を含んだデータ伸長が行なわ
れ、編集メモリ12−3に元の読取った画像データが復元
される。
In this way, data expansion including expansion is performed, and the original read image data is restored in the edit memory 12-3.

尚、上記実施例においては、圧縮変換手段11−3を、
画像読取装置11内蔵の、主制御部と圧縮変換プログラム
を格納した記憶装置(ハードディスク)とで構成し、主
制御部がその圧縮変換プログラムに従って圧縮変換処理
動作するようにするが、圧縮変換手段11−3をマイクロ
プログラム化や簡易ハードウェア化により実現してもよ
い。
In the above embodiment, the compression conversion means 11-3 is
The image reading apparatus 11 includes a main control unit and a storage device (hard disk) storing a compression conversion program. The main control unit performs a compression conversion process according to the compression conversion program. -3 may be realized by microprogramming or simple hardware.

また、上記実施例において、伸長変換手段12−2は、
上位装置12内蔵の、主制御部と、伸長変換プログラムを
格納した記憶装置(ハードディスク)とで構成し、主制
御部がその伸長変換プログラムに従って伸長変換処理動
作をするようにするが、伸長変換手段12−2をマイクロ
プログラムや簡易なハードウェアにより構成してもよ
い。
Further, in the above embodiment, the expansion conversion means 12-2
The main control unit includes a main control unit and a storage device (hard disk) storing a decompression conversion program. The main control unit performs decompression conversion operation according to the decompression conversion program. 12-2 may be configured by a microprogram or simple hardware.

以上の説明から判かるように、本発明においては、デ
ータ転送側(画像読取装置11)で、任意の連続する大量
同一データに対して高い圧縮率でもってデータ圧縮を行
なうことができ、かつ被データ転送側(上位装置12)で
データ復元のためのデータ伸長を容易に行なうことがで
きる。データ転送側(画像読取装置11)で高い圧縮率で
データ圧縮を行なえるので、画像読取装置から他の接続
装置である上位装置12へのデータ転送時間が大幅に短縮
され、従来の如き処理能力の問題は生じない。
As can be seen from the above description, according to the present invention, on the data transfer side (image reading device 11), data compression can be performed at a high compression ratio on arbitrary continuous large amounts of identical data, and Data decompression for data restoration can be easily performed on the data transfer side (upper device 12). Data compression at the data transfer side (image reading device 11) can be performed at a high compression ratio, greatly reducing the time required for data transfer from the image reading device to the higher-level device 12, which is another connected device, and processing capacity as in the past. No problem arises.

本発明は本実施例に限定されることなく、本発明の要
旨を逸脱しない範囲で種々の応用及び変形が考えられ
る。
The present invention is not limited to the present embodiment, and various applications and modifications can be considered without departing from the gist of the present invention.

(発明の効果) 上述したように本発明を用いれば、従来の如きデータ
圧縮・伸長のための専用のLSIを用いずに、簡易な方法
により、データ転送側では、任意の連続する大量同一デ
ータに対し高い圧縮率でデータ圧縮を行なって転送で
き、被データ転送側でデータを元に戻すデータ伸長を容
易に行なうことができる。従って、本発明は、イメージ
データを高い圧縮率で圧縮して転送するので、転送時間
の大幅な短縮を図ることができ、これによりイメージデ
ータを接続装置(上位装置など)ヘインタフェース(特
にシリアルインタフェースの場合効果が大きい)を介し
て転送するイメージデータ読取装置において、転送時間
が要因となるシステムの処理能力の低下を容易に防止で
き、従来の如き処理能力上の問題が生じないようにする
ことができる。
(Effects of the Invention) As described above, according to the present invention, any continuous large amount of the same data can be obtained on the data transfer side by a simple method without using a dedicated LSI for data compression and decompression as in the related art. In this case, the data can be compressed and transferred at a high compression ratio, and the data transfer side can easily perform the data decompression to restore the original data. Therefore, according to the present invention, image data is compressed and transferred at a high compression rate, so that the transfer time can be greatly reduced, whereby the image data can be transferred to a connection device (such as a host device) by an interface (particularly, a serial interface). In the image data reading apparatus which transfers the image data via the image processing apparatus, it is possible to easily prevent a decrease in the processing capacity of the system due to the transfer time, and to prevent the problem of the processing capacity from occurring in the related art. Can be.

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

第1図は本発明に係るイメージデータ圧縮方法の一実施
例を示す説明図、第2図はMH符号化方式による従来の画
像データの圧縮方法を示す説明図、第3図はランレング
スとメイクアップ符号との関係を示す図、第4図はラン
レングスとターミネイティング符号との関係を示す図、
第5図は本発明に係るイメージデータ圧縮方法の他の実
施例を示す説明図、第6図は画像読取システムの構成例
を示す簡略図、第7図は第6図における画像データの流
れを示す詳細説明図、第8図は本発明に係るイメージデ
ータ圧縮方法の一実施例を示すフローチャート、第9図
は本発明に係るイメージデータ伸長方法の一実施例を示
すフローチャートである。 11……画像読取装置、11−1……画像読取センサ、 11−2……イメージメモリ、11−4……送信バッファ、 12……上位装置、12−1……受信バッファ、 12−3……編集メモリ、 13……シリアルインタフェース、 14……プリンタ。
FIG. 1 is an explanatory view showing an embodiment of an image data compressing method according to the present invention, FIG. 2 is an explanatory view showing a conventional image data compressing method using the MH coding method, and FIG. 3 is a run-length and make-up method. FIG. 4 is a diagram showing a relationship between an up code, FIG. 4 is a diagram showing a relationship between a run length and a terminating code,
FIG. 5 is an explanatory diagram showing another embodiment of the image data compression method according to the present invention, FIG. 6 is a simplified diagram showing an example of the configuration of an image reading system, and FIG. 7 shows the flow of image data in FIG. FIG. 8 is a flowchart showing one embodiment of the image data compression method according to the present invention, and FIG. 9 is a flowchart showing one embodiment of the image data decompression method according to the present invention. 11 image reading device 11-1 image reading sensor 11-2 image memory 11-4 transmission buffer 12 host device 12-1 reception buffer 12-3 ... Edit memory, 13 ... Serial interface, 14 ... Printer.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 西川 健一 東京都港区虎ノ門1丁目7番12号 沖電 気工業株式会社内 (56)参考文献 特開 昭62−58780(JP,A) (58)調査した分野(Int.Cl.6,DB名) H04N 1/41 - 1/419 ──────────────────────────────────────────────────続 き Continuation of the front page (72) Inventor Kenichi Nishikawa 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd. (56) References JP-A-62-58780 (JP, A) (58) ) Surveyed field (Int.Cl. 6 , DB name) H04N 1/41-1/419

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】“1"と“0"のビットデータで表わされるイ
メージデータを圧縮する方法において、 “0"のビットデータが所定量以上連続する場合、該デー
タが“0"であることを示す指標データを複数連続して先
頭にし、次に該データのデータ長を示すレングスデータ
を前記指標データと同数連続して続けることにより前記
所定量以上連続する“0"のビットデータを圧縮すること
を特徴とするイメージデータ圧縮方法。
1. A method of compressing image data represented by bit data of "1" and "0", wherein when bit data of "0" continues for a predetermined amount or more, it is determined that the data is "0". A plurality of index data indicated at the beginning are successively placed at the head, and then the length data indicating the data length of the data is continued continuously for the same number as the index data, thereby compressing the bit data of “0” which is continuous for the predetermined amount or more. A method for compressing image data, characterized in that:
JP28838490A 1990-10-29 1990-10-29 Image data compression method Expired - Fee Related JP2965084B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28838490A JP2965084B2 (en) 1990-10-29 1990-10-29 Image data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28838490A JP2965084B2 (en) 1990-10-29 1990-10-29 Image data compression method

Publications (2)

Publication Number Publication Date
JPH04167671A JPH04167671A (en) 1992-06-15
JP2965084B2 true JP2965084B2 (en) 1999-10-18

Family

ID=17729506

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28838490A Expired - Fee Related JP2965084B2 (en) 1990-10-29 1990-10-29 Image data compression method

Country Status (1)

Country Link
JP (1) JP2965084B2 (en)

Also Published As

Publication number Publication date
JPH04167671A (en) 1992-06-15

Similar Documents

Publication Publication Date Title
US4316222A (en) Method and apparatus for compression and decompression of digital image data
US4791680A (en) Image data converter
JPS6223504B2 (en)
US5751860A (en) Method for compressing and decompressing digital image data
US5604495A (en) Data compression method and system
JPS6338913B2 (en)
JPH1118087A (en) Device and method for converting image data
EP1158807B1 (en) Data stream conversion apparatus and method, variable length coded data stream generation apparatus and method, and camera system
JP2962518B2 (en) Image data encoding device
JP2885235B1 (en) Data compression method and machine readable recording medium recording compression program
US7085415B2 (en) Image display apparatus
JP2965084B2 (en) Image data compression method
US20040247184A1 (en) Method of compressing and decompressing images
JPH0622152A (en) Picture processing unit
US20020176630A1 (en) Image data processing method
JP3091917B2 (en) Compressed data transfer device
JPS6147466B2 (en)
JP3408472B2 (en) Run-length encoding method and run-length encoding device
JPH06121174A (en) Encoder/decoder
JPS6214579A (en) Decoding circuit
JPH054876B2 (en)
JP2503225B2 (en) Data compression method
JPS5840989A (en) Coding processing method and transmission controlling method of picture information
JP3736107B2 (en) Image processing device
JP2806169B2 (en) Compressed data decompression device

Legal Events

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

Free format text: PAYMENT UNTIL: 20070813

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080813

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090813

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees