JP2614318B2 - Halftone image data compression method - Google Patents

Halftone image data compression method

Info

Publication number
JP2614318B2
JP2614318B2 JP1160042A JP16004289A JP2614318B2 JP 2614318 B2 JP2614318 B2 JP 2614318B2 JP 1160042 A JP1160042 A JP 1160042A JP 16004289 A JP16004289 A JP 16004289A JP 2614318 B2 JP2614318 B2 JP 2614318B2
Authority
JP
Japan
Prior art keywords
data
buffer memory
control unit
code
counter
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
JP1160042A
Other languages
Japanese (ja)
Other versions
JPH0324863A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1160042A priority Critical patent/JP2614318B2/en
Publication of JPH0324863A publication Critical patent/JPH0324863A/en
Application granted granted Critical
Publication of JP2614318B2 publication Critical patent/JP2614318B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第8図、第9図) 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例 (1)ユニバーサル型のアルゴリズム(第2図) (2)増分分解型のアルゴリズム(第3図) (3)第1実施例(第4図、第5図) (4)第2実施例(第6図、第7図) 発明の効果 〔概要〕 網点画像データ圧縮方式に関し、 小型のハード構成により効率よく圧縮できるようにし
たことを目的とし、 圧縮符号化される画像データが保持される入力データ
保持手段と、圧縮符号処理が行われたデータが保持され
る先行データ保持手段と、比較手段と、不一致数を計数
する不一致数計数手段と、不一致数が規定値以内か否か
を検知する閾値手段と、最大一致長を検出する最大一致
長検出手段と、符号化手段を具備し、入力データ保持手
段で保持された入力画像データを前記先行データ保持手
段に保持されたデータと前記比較手段で順次比較して、
その不一致数が規定値以内の最大の入力データ部分列を
まとめて符号化手段により圧縮符号化することを特徴と
する。
[Contents] Outline Industrial application field Conventional technology (FIGS. 8 and 9) Problems to be Solved by the Invention Means for Solving the Problems (FIG. 1) Action Embodiment (1) Universal type algorithm (FIG. 2) (2) Incremental decomposition type algorithm (FIG. 3) (3) First embodiment (FIGS. 4 and 5) (4) Second embodiment (FIG. (FIGS. 6 and 7) Effects of the Invention [Overview] Regarding a halftone dot image data compression method, an object of the present invention is to enable efficient compression with a small hardware configuration, and to hold an image data to be compressed and encoded. Data holding means, preceding data holding means for holding data subjected to compression code processing, comparing means, mismatch number counting means for counting the number of mismatches, and detecting whether or not the number of mismatches is within a specified value Threshold means and the maximum matching length detection A matching length detection means comprises a coding means, by sequentially comparing the input image data held in the input data holding means by said comparing means and data held in said preceding data holding means,
The maximum number of input data subsequences whose number of mismatches is within a specified value is collectively compressed and encoded by the encoding means.

〔産業上の利用分野〕[Industrial applications]

本発明は網点画像圧縮方式に係り、特にジブ−レンペ
ル(Ziv−Lempel)符号を用いた圧縮方式に関する。
The present invention relates to a halftone dot image compression method, and more particularly to a compression method using a Ziv-Lempel code.

近年、オフイス・オートメーションが発展し、文書情
報として文字の外に階調画像が取扱われるようになって
いる。文書は通常、白と黒の2値で表されるため、階調
画像を表すために、複数の画素で構成される網点のう
ち、黒画素の数を階調に応じて定めるという面積変調を
用いて表すことが一般的である。文書情報をディジタル
データとして利用するとき、階調画像のデータ量は文字
画像に比べて非常に大で、10数倍〜数10倍となる。した
がって、蓄積や伝送等で階調画像を効率良く取扱うには
効率的なデータ圧縮を加えることでデータ量を減らすこ
とが必要となる。
In recent years, office automation has been developed, and gradation images have been handled in addition to characters as document information. Since a document is usually represented by binary values of white and black, in order to represent a gradation image, an area modulation method in which the number of black pixels among halftone dots composed of a plurality of pixels is determined according to the gradation. It is common to express using. When document information is used as digital data, the data amount of a gradation image is much larger than that of a character image, and is several ten to several tens times. Therefore, it is necessary to reduce the amount of data by applying efficient data compression in order to efficiently handle a gradation image in storage or transmission.

〔従来の技術〕[Conventional technology]

従来の2値画像の国際標準圧縮方式としてモデファイ
ド・リード(MR)方式がある。このMR方式は、主走査方
向に見ていって白から黒、または黒から白に変化する画
素を変化点と呼び、隣接する走査線間で変化点の表す白
黒パターン境界のずれが少ないという変化点の接続関係
に着目してデータ圧縮するものである。
As a conventional international standard compression method for binary images, there is a modified read (MR) method. In this MR method, a pixel that changes from white to black or from black to white when viewed in the main scanning direction is called a change point, and a change in the boundary of the black and white pattern represented by the change point between adjacent scanning lines is small. Data compression is performed by focusing on the connection relationship between points.

しかし網点となった階調画像は、画面全体に分散され
た網点より生じる変化点は膨大な数となるため、MR方式
では有効に圧縮することができなかった。
However, in a halftone image that has become a halftone dot, the number of change points caused by the halftone dot dispersed over the entire screen is enormous, so that the MR method cannot be effectively compressed.

このため網点画像をデータ圧縮する方法としては、前
記標準方式であるMR方式とは別に、予測符号化方式が用
いられていた。
For this reason, as a method of data compression of a halftone image, a predictive coding method has been used separately from the MR method which is the standard method.

この方式は、第8図に示す如く、注目画素doの周辺
と、網点の周期離れた位置に参照画素rdを取って注目画
素doの白、黒を予測し、予測誤差を符号化する方式を使
用していた。しかし、ファクシミリのように、文書をス
キャナで読み取らせてデータを圧縮する場合、網点の種
類は様々で網点周期が予め分からないことの方が多い。
そこで、従来では、種々の網点周期を参照画素とする予
測器を複数並べ、予測外れ回数の最も少ない予測器を選
択して、この選択した予測器に従って符号化するという
適応予測符号化方式を使用していた。
As shown in FIG. 8, this method takes a reference pixel rd around the target pixel do and a position away from the halftone dot period, predicts white and black of the target pixel do, and encodes a prediction error. Was used. However, when a document is read by a scanner and data is compressed, as in a facsimile, the types of halftone dots are various and the halftone period is often unknown in advance.
Therefore, in the related art, an adaptive predictive coding method in which a plurality of predictors having various halftone dot periods as reference pixels are arranged, a predictor with the least number of prediction errors is selected, and coding is performed according to the selected predictor. I was using.

第9図に示す如く、伝達された網点画像信号をライン
メモリ50に入力し、その出力をそれぞれ異なる網点周期
をもつ第1予測器51と第2予測器52に入力してそれぞれ
予測値を求めるとともに、排他的論理和回路53、54によ
りこれらの予測値が実際の網点画像信号と一致するか否
かを検出し、それぞれの不一致の回数を第1予測はずれ
カウンタ55、第2予測はずれカウンタ56で計数する。こ
の計数結果を入力網点画像信号が一定の個数毎に比較回
路57で比較して、次の区間では外れの少ない予測器をマ
ルチプレクサ58で選択し、予測外れの少なかった方の予
測器からの予測誤差信号を符号器59で圧縮符号化してい
た。したがって、選択された予測器における予測が入力
した網点画像信号と一致すれば、マルチプレクサ58から
出力される予測誤差信号には「0」が多く存在し、
「1」が少ないので符号器59における圧縮効率が向上す
る。この従来技術の適応予測符号化方式は、例えば電子
通信学会技術研究報告IE80−01「新聞網点写真の適応予
測符号化」に詳述されている。
As shown in FIG. 9, the transmitted halftone image signal is input to a line memory 50, and the output thereof is input to a first predictor 51 and a second predictor 52 having different halftone periods, respectively, to obtain respective predicted values. The exclusive OR circuits 53 and 54 detect whether or not these predicted values match the actual halftone image signal, and count the number of mismatches with the first prediction error counter 55 and the second prediction Counting is performed by the off counter 56. The counting result is compared by the comparison circuit 57 for each fixed number of input halftone image signals, and in the next section, a predictor having less deviation is selected by the multiplexer 58, and the predictor having the less prediction deviation is selected from the predictor having the smaller prediction deviation. The prediction error signal was compression-encoded by the encoder 59. Therefore, if the prediction in the selected predictor matches the input halftone image signal, there are many “0” in the prediction error signal output from the multiplexer 58,
Since the number of “1” is small, the compression efficiency in the encoder 59 is improved. The conventional adaptive prediction coding method of the prior art is described in detail in, for example, the IEICE technical report IE80-01 "Adaptive prediction coding of newspaper halftone photographs".

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

しかしながら、前記のような従来の網点画像のデータ
圧縮方式では、網点画像の統計的な性質を予想して予測
器を構成しておくために、用意した予測器の網点周期が
実際の画像の網点周期と一致するときには有効なデータ
圧縮ができるが、合わないときにはデータ圧縮の効率が
著しく劣化してしまうという問題点があった。
However, in the conventional halftone image data compression method as described above, in order to configure a predictor in anticipation of the statistical properties of the halftone image, the halftone dot period of the prepared predictor is set to the actual value. Although effective data compression can be performed when the halftone dot period matches the halftone period of the image, there is a problem that when the halftone dot period does not match, the data compression efficiency is significantly deteriorated.

このような適応予測符号化方式を採用することで、網
点周期の不整合に起因するデータ圧縮の効率低下の問題
はある程度改善できるものの、一方でこの改善を大きな
ものにしようとすると、予測器の個数を増やすことが必
要となるので、回路規模が大きくなるという問題があ
る。
By adopting such an adaptive predictive coding method, the problem of reduced data compression efficiency due to the dot period mismatch can be improved to some extent. Since it is necessary to increase the number of the circuits, there is a problem that the circuit scale becomes large.

したがって本発明の目的は、このような問題を改善す
るため、小さな回路規模でもって種々の周期に適切に整
合してデータ圧縮できるようにした網点画像データ圧縮
方式を提供することである。
Accordingly, an object of the present invention is to provide a halftone image data compression system capable of appropriately compressing data at various periods and compressing data with a small circuit scale in order to improve such a problem.

〔課題を解決するための手段〕[Means for solving the problem]

前記の目的を達成するため、本発明は、第1図に示す
如く、バッファメモリ1、先行データメモリ2、排他的
論理和回路3、第1アドレス制御部4、第2アドレス制
御部5、不一致カウンタ6、閾値回路7、最大一致長検
出部8、符号化部9等を具備する。
In order to achieve the above object, as shown in FIG. 1, the present invention relates to a buffer memory 1, a preceding data memory 2, an exclusive OR circuit 3, a first address control unit 4, a second address control unit 5, It includes a counter 6, a threshold circuit 7, a maximum matching length detection unit 8, an encoding unit 9, and the like.

ここで先行データメモリ2は、後述する実施例の項に
おいて詳記のように、ユニバーサル型ジブ−レンペル符
号を用いるときは符号化処理ずみの先行データが順次記
入され、また増分分解型ジブ−レンペル符号を用いると
きは先行データにより作成された既成分列が記入され
る。
Here, as described in detail in an embodiment to be described later, when the universal type Jib-Lempel code is used, the precedent data which has been subjected to the encoding processing is sequentially written in the preceding data memory 2, When the code is used, the existing component sequence created by the preceding data is entered.

また、符号化部9は、後述詳記するように、ユニバー
サル型ジブ−レンペル符号を用いる場合は、先行データ
メモリ2内において、略一致するパターンの存在する一
致開始点のアドレスと、そのパターン長と、次のシンボ
ルを圧縮符号として出力し、また増分分解型ジブ−レン
ペル符号を用いるときは、先行データメモリ2内におい
て略一致する符号化パターン成分のインデックスと次の
シンボルを圧縮符号として出力する。
Further, as described later in detail, when the universal type Jib-Lempel code is used, the encoding unit 9 determines, in the preceding data memory 2, the address of the matching start point where a substantially matching pattern exists, and the pattern length. And the next symbol is output as a compression code, and when the incremental decomposition type Jib-Lempel code is used, the index of the coding pattern component which substantially matches in the preceding data memory 2 and the next symbol are output as the compression code. .

網点画像信号がバッファメモリ1に入力されると、第
1アドレス制御部4はまず最初の1シンボルを排他的論
理和回路3に出力し、また第2アドレス制御部5は先行
データメモリ2よりその保持値を順次出力し、等しいも
のを検出する。このようにして等しいものが検出された
とき、第1アドレス制御部4は第2番目のシンボルを排
他的論理和回路3に出力する。このとき第2アドレス制
御部5は先に一致のとれた次の保持値を出力する。これ
によりさらに一致が得られれば、第1アドレス制御部4
は第3番目のシンボルを排他的論理和回路3に出力し、
また第2アドレス制御部5は2回続けて一致のとれと次
の保持値を出力する。しかしこの3度目が不一致であれ
ば、排他的論理和回路3は「1」を出力し、不一致カウ
ンタ6はこの不一致数をカウントする。それから、第1
アドレス制御部4が第4番目のシンボルを排他的論理和
回路3に出力し、また第2アドレス制御部5は前記不一
致の次のデータを出力する。この第4番目が再び一致す
れば、第1アドレス制御部4と第2アドレス制御部5は
第5番目のシンボルの比較を行う。このとき再び不一致
となれば、不一致カウンタは2をカウントする。もし閾
値回路7の閾値Thが数値「1」に設定してあれば不一致
カウンタ6が2をカウント・アップしたとき閾値回路7
は第1アドレス制御部4と第2アドレス制御部5にこの
不一致信号を出力する。これにより第1アドレス制御部
4と第2アドレス制御部5は前記一致検出処理を中止す
る。そして最大一致長検出部8に閾値回路7から不一致
信号が出力されるまでの最大長(この例では4シンボ
ル)と不一致信号が出力されたシンボル符号化部9に伝
達されるので符号化部9から圧縮符号が出力される。
When the halftone image signal is input to the buffer memory 1, the first address control unit 4 first outputs the first one symbol to the exclusive OR circuit 3, and the second address control unit 5 outputs the first symbol from the preceding data memory 2. The held values are sequentially output, and the equal values are detected. When the equality is detected in this way, the first address control unit 4 outputs the second symbol to the exclusive OR circuit 3. At this time, the second address control unit 5 outputs the next held value that has previously been matched. As a result, if a further match is obtained, the first address control unit 4
Outputs the third symbol to the exclusive OR circuit 3,
Further, the second address control unit 5 outputs the next hold value and the coincidence two consecutive times. However, if this third mismatch does not occur, the exclusive OR circuit 3 outputs "1" and the mismatch counter 6 counts the number of mismatches. Then the first
The address control unit 4 outputs the fourth symbol to the exclusive OR circuit 3, and the second address control unit 5 outputs the next data that does not match. If the fourth matches again, the first address control unit 4 and the second address control unit 5 compare the fifth symbol. At this time, if there is a mismatch again, the mismatch counter counts 2. If the threshold value Th of the threshold circuit 7 is set to a numerical value “1”, when the mismatch counter 6 counts up 2, the threshold circuit 7
Outputs this mismatch signal to the first address controller 4 and the second address controller 5. As a result, the first address control unit 4 and the second address control unit 5 stop the match detection processing. The maximum length (4 symbols in this example) until the mismatch signal is output from the threshold circuit 7 to the maximum match length detection unit 8 and the mismatch signal are transmitted to the symbol coding unit 9 to which the mismatch signal was output. Outputs a compression code.

〔作用〕[Action]

あらかじめ閾値回路で設定した範囲内の不一致があっ
ても類似しているパターンをなるべく長い状態で圧縮符
号化することができるので、網点画像データを効率よく
圧縮することができる。
Even if there is a mismatch within the range set in advance by the threshold circuit, similar patterns can be compression-encoded in as long a state as possible, so that dot image data can be efficiently compressed.

〔実施例〕〔Example〕

従来の方法では、前記第8図、第9図について説明し
たように、画像の統計的性質を予想して、予想したサン
プル画像より予測器を構成しておくため、予想した範囲
外の画像の場合は圧縮効率が悪くなる。
In the conventional method, as described with reference to FIGS. 8 and 9, the predictor is constructed from the predicted sample images by predicting the statistical properties of the images. In such a case, the compression efficiency becomes poor.

これに対し、本発明では、入力した画像を圧縮する過
程での画像の統計的性質を学習しながら符号の最良化を
図るユニバーサル符号の手法を取り入れ、種々の網点画
像に対し効率のよい圧縮を行うようにしたものである。
On the other hand, the present invention adopts a universal code method for optimizing a code while learning the statistical properties of the image in the process of compressing the input image, and efficiently compresses various halftone images. Is performed.

元来、ユニバーサル符号は情報保存型のデータ圧縮方
式であり、データ圧縮時に情報源の統計的な性質を予め
仮定しないため、種々のタイプ(文字コード、オブジェ
クトコード等)のデータに適用することができる。とこ
ろで網点画像は、画像全体が網点分散するため膨大な数
の変化点が出現する。しかし網点周期性、網点形状の同
一性から変化点の傾向は、複数個まとめてみると、大域
的な規則性をもつので、ユニバーサル符号を適用するこ
とによりこの規則性の持つ冗長性を削減し、有効な圧縮
を行うことができる。
Originally, the universal code is an information preservation type data compression method, and does not assume in advance the statistical nature of the information source at the time of data compression, so that it can be applied to data of various types (character codes, object codes, etc.). it can. By the way, in a halftone image, an enormous number of change points appear because the entire image is halftone dispersed. However, the tendency of the change point due to the dot periodicity and the same dot shape has a global regularity when summarized, so the redundancy with this regularity can be reduced by applying the universal code. Reduction and effective compression can be performed.

本発明は、画像データにユニバーサル符号化を適用す
るとともに、既符号化系列と現符号化系列の差異を求
め、差異が小さい系列は既符号化系列で近似表現するこ
とにより、情報非保存型の符号化をはかり高圧縮率を得
るようにするものである。
The present invention applies universal coding to image data, finds a difference between an already-encoded sequence and a current-encoded sequence, and approximates a sequence having a small difference by an already-encoded sequence, thereby saving information. The encoding is performed to obtain a high compression ratio.

本発明を実施例にもとづき詳述するに先立ち、ユニバ
ーサル符号について簡単に説明する。ユニバーサル符号
の代表的な方法として、ジブ−レンペル(Ziv−Lempe
l)符号がある(詳しくは、例えば宗像(Ziv−Lempelの
データ圧縮法」,情報処理,Vol.26,No.1,1985年を参照
のこと」。ジブ−レンペル符号では、(1)ユニバーサ
ル型と、(2)増分分解型(Incrementalparsing)の2
つのアルゴリズムが提案されており、これらについて説
明する。
Before describing the present invention in detail based on embodiments, a universal code will be briefly described. As a typical method of the universal code, Ziv-Lempe
l) There is a code (for details, for example, see Munakata (Ziv-Lempel Data Compression Method), Information Processing, Vol. 26, No. 1, 1985.) In the case of Jib-Lempel code, (1) Universal Type and (2) Incremental parsing
Two algorithms have been proposed and will be described.

(1) ユニバーサル型のアルゴリズム このアルゴリズムは演算量は多いが高圧縮率が得られ
る。符号化データを、過去のデータ系列の任意の位置か
ら一致する最大長の系列つまり部分列に区切り、過去の
系列の複製として符号化する方法である。第2図にユニ
バーサル型ジブ−レンペル符号の符号作成原理図を示
す。Pバッファには符号化済みの入力データが格納され
ており、Qバッファにはこれから符号化するデータが入
力される。第2図(A)に示す如く、Qバッファに入力
C1、C2、C3、C4、C5……が入力されたとき、符号化済み
の入力データが格納されているPバッファ内のデータ系
列をサーチして、このPバッファ内に、これら入力C1、
C2……と一致する最大長の部分列を求める。この場合、
入力データC1、C2、C3、C4と一致する部分列が検知され
る。このPバッファ中で検知されるこの最大部分列を指
定するため、そのPバッファにおける先頭からの位置を
一致開始位置p1と、一致した最大長の長さをq1と、入力
データの一致する部分列の次シンボルにより、第2図
(B)に示す如き組の符号化を行う。この例では「p1
q1、C5」がジブ−レンペル符号となる。次に、Qバッフ
ァ内の符号化したこの系列をPバッファに移し、C6以下
の未処理データについて、同様な処理を行う。このよう
な操作が繰返され、入力データが部分列に分解され、符
号化される。第2図(C)はこの処理をブロック表示し
たものである。なお前記説明では入力データを8ビット
幅の例で説明したが、これのみに限定されるものではな
く、これより大きいことも、4ビット、あるいは1ビッ
トの如く小さいシンボルの場合でも使用できる。なおP
バッファの長さを4kとすれば、P1は12ビットでよい。
(1) Universal type algorithm This algorithm requires a large amount of calculation but can obtain a high compression rate. This is a method in which coded data is divided into a maximum-length sequence that matches from an arbitrary position of a past data sequence, that is, a subsequence, and encoded as a copy of the past sequence. FIG. 2 is a diagram showing the principle of creating a universal Jib-Lempel code. The P buffer stores encoded input data, and the Q buffer receives data to be encoded. Input to Q buffer as shown in FIG.
When C1, C2, C3, C4, C5... Are inputted, a data sequence in a P buffer in which encoded input data is stored is searched, and these inputs C1,
Find the substring of the maximum length that matches C2. in this case,
Substrings that match the input data C1, C2, C3, C4 are detected. To specify this maximum subsequence sensed in this P buffer, a match starting position p 1 of the position from the beginning in the P buffer, the maximum length length of the matched and q 1, to match the input data With the next symbol of the subsequence, encoding of a set as shown in FIG. 2 (B) is performed. In this example, "p 1,
q 1, C5 "is a jib - the Lempel codes. Next, the coded sequence in the Q buffer is transferred to the P buffer, and the same processing is performed on unprocessed data of C6 and lower. Such an operation is repeated, and the input data is decomposed into sub-sequences and encoded. FIG. 2C is a block diagram showing this processing. In the above description, the input data has been described with an example of an 8-bit width. However, the present invention is not limited to this, and it is possible to use a symbol larger than this or a symbol as small as 4 bits or 1 bit. Note that P
If the length of the buffer and 4k, P 1 can be a 12-bit.

(2) 増分分解型のアルゴリズム このアルゴリズムは、圧縮率は前記(1)のユニバー
サル型より劣るが、シンプルで、計算も容易である。増
分分解型ジブ−レンペル符号は、入力シンボルの系列x
が x=aabababaa…… とすると、成分系列x=X0X1X2……への増分分解は次の
ようにして行う。
(2) Incremental decomposition type algorithm This algorithm is inferior to the universal type of (1) in compression rate, but is simple and easy to calculate. The incremental decomposition type Jib-Lempel code is a sequence of input symbols x
If x = aabababaa..., The incremental decomposition into the component sequence x = X 0 X 1 X 2 ... Is performed as follows.

入力シンボルの既成分に次シンボルを組み合わせた最
長の列で入力シンボルの系列xを書き直すと次のように
なる。
When the input symbol sequence x is rewritten in the longest column in which the next symbol is combined with the existing component of the input symbol, the result is as follows.

x=a・ab・aba・b・aa ……(1) この(1)式において、初めの「a」はその前にaが
ないので空列にaを付加したもの、次の「ab」は「a」
が既成分として存在したのでこれに次シンボル「b」を
付加したもの、「aba」は「ab」が既成分として存在す
るので、これに次シンボル「a」を付加したものであ
る。このようにして、Xjを既成分の右端のシンボルを取
り除いた最長の列とすると成分系列は次のように表現さ
れる。
x = a · ab · aba · b · aa (1) In the above equation (1), the first “a” has no a before it, so a is added to an empty column, and the next “ab” Is "a"
Has been added as a component, and the next symbol “b” has been added to this, and “aba” has been added with the next symbol “a” since “ab” has already existed as a component. In this way, when Xj is the longest column from which the rightmost symbol of the existing component has been removed, the component sequence is expressed as follows.

X0=λ(空列),X1=X0a,X2=X1b,X3=X2a,X4=X0b、X5
=X1a…… となる。例えば(1)式の「ab」は、aがX0aで表現さ
れるのでX2=X1bとなる。なお、Xjのjは成分のインデ
ックスを示す。そして、第3図に示す如く、成分のイン
デックスと次のシンボルの組で符号化する。したがって
前記X3はX3=X2aであるので、「2a」の形で符号化され
る。このように増分分解型アルゴリズムは符号化パター
ンについて過去に分解した部分列のうちから最大長一致
するものを求め、過去に分解した部分列の複製として符
号化するものである。
X 0 = lambda (empty sequence), X 1 = X 0 a , X 2 = X 1 b, X 3 = X 2 a, X 4 = X 0 b, X 5
= X 1 a ... For example (1) "ab" in the formula, a is because X 2 = X 1 b is represented by X 0 a. Note that j of Xj indicates a component index. Then, as shown in FIG. 3, encoding is performed using a combination of a component index and the next symbol. Hence the X 3 is a X 3 = X 2 a, is coded in the form of "2a". As described above, the incremental decomposition type algorithm obtains a code string having the maximum length matching from the subsequences decomposed in the past, and encodes them as a copy of the subsequences decomposed in the past.

ところで、このような符号化方式を使用するとき、長
いシンボル列で一致するものが存在する程圧縮効率が向
上する。本発明の基本的な考え方は、シンボル列の一致
を求めるとき、わずかな差異にとらわれずになるべく長
い部分列で概略一致するものを検出することである。
By the way, when such an encoding system is used, the compression efficiency is improved as long as a long symbol sequence matches. The basic idea of the present invention is to detect a symbol sequence that is substantially the same as a subsequence that is as long as possible without being subject to slight differences.

すなわち、既に網点化された画像をディジタル的に読
み取った場合、読み取り時に画素毎に量子化ノイズが入
るので、同一の階調が続いたとしても正確に同一サイズ
の網点の列として再現されることはない。したがって1
画素レベルでの画像品位への重要度は薄れ、画素の密度
として階調を表すようになるので、必ずしも完全な情報
保存型符号化で表す必要はなく、かえって画像品位に影
響を与えない範囲で情報非保存型により圧縮率を高める
ことが重要になる。本発明はこの点を鑑み、既符号化系
列と現符号化しようとしているデータを照合するとき、
不一致の個数を計数し、不一致計数値が所定の閾値以下
のときは同じ系列とみて一致と同様に扱い、不一致の回
数がこの閾値を越えたとき初めて不一致とみなして異な
る部分列とし、最大長の部分例を選ぶものである。
In other words, when an image that has already been halftone-dotted is read digitally, quantization noise is introduced into each pixel at the time of reading, so that even if the same tone continues, it is reproduced exactly as a row of halftone dots of the same size. Never. Therefore 1
The importance of image quality at the pixel level is weakened, and the gradation of the pixel density is expressed.Therefore, it is not always necessary to express the image by complete information preservation type coding, as long as the image quality is not adversely affected. It is important to increase the compression ratio by the information non-storage type. The present invention in view of this point, when comparing the data to be coded and the current coded sequence,
The number of discrepancies is counted, and when the discrepancy count value is equal to or less than a predetermined threshold value, it is regarded as the same sequence and treated in the same manner as a match. Select a partial example of

以下本発明を第1実施例、第2実施例にもとづき詳述
する。
Hereinafter, the present invention will be described in detail based on a first embodiment and a second embodiment.

(3) 第1実施例 本発明の第1実施例を第4図、第5図にもとづき説明
する。第4図は、前記(1)で説明したユニバーサル型
ジブ−レンペル符号を用いたときの実施例であり、第5
図はその要部の詳細説明図である。第4図において、1
0、11はそれぞれバッファメモリ、12、13はそれぞれア
ドレス制御部、14、15はそれぞれレジスタ、16は排他的
論理和回路、17はシフトレジスタ、18は、不一致数カウ
ンタ、19は閾値回路、20は最大一致長検出部、21は符号
化部である。
(3) First Embodiment A first embodiment of the present invention will be described with reference to FIGS. FIG. 4 shows an embodiment in which the universal type Jib-Lempel code described in the above (1) is used.
The figure is a detailed explanatory view of the main part. In FIG. 4, 1
0 and 11 are buffer memories respectively, 12 and 13 are address controllers, 14 and 15 are registers, 16 is an exclusive OR circuit, 17 is a shift register, 18 is a mismatch counter, 19 is a threshold circuit, and 20 is Denotes a maximum matching length detection unit, and 21 denotes an encoding unit.

バッファメモリ10は、第1図におけるバッファメモリ
1に対応するものであり、入力端子T1より網点画像デー
タが入力されるもの、バッファメモリ11は符号化処理さ
れた網点画像データが入力するもので第1図の先行デー
タメモリ2に対応するもの、アドレス制御部12はバッフ
ァメモリ10に保持されている未処理の網点画像データを
読み出したり、新たに網点画像データを書込んだりする
ものであり、第1図の第1アドレス制御部4に対応する
もの、アドレス制御部13はバッファメモリ11に保持され
た網点画像データを読み出したりバッファメモリ10から
送出されるデータを書込むものであり、第1図の第2ア
ドレス制御部5に対応するものである。
Buffer memory 10, which corresponds to the buffer memory 1 in FIG. 1, which dot image data from the input terminal T 1 is inputted, the buffer memory 11 to the input halftone image data processed coded The address control unit 12 reads unprocessed halftone image data held in the buffer memory 10 or writes new halftone image data, which corresponds to the preceding data memory 2 in FIG. The address controller 13 corresponds to the first address controller 4 shown in FIG. 1. The address controller 13 reads the halftone image data held in the buffer memory 11 and writes the data sent from the buffer memory 10. This corresponds to the second address control unit 5 in FIG.

レジスタ14はバッファメモリ10から出力されたデータ
を保持するものであり、またレジスタ15はバッファメモ
リ11から出力されたデータを保持するもの、排他的論理
和回路16はレジスタ14と15に保持されたデータが一致す
るか否かを比較するものであり、第1図における排他的
論理和回路3に対応するもの、シフトレジスタ17は排他
的論理和回路16の比較結果がセットされるものである。
The register 14 holds the data output from the buffer memory 10, the register 15 holds the data output from the buffer memory 11, and the exclusive OR circuit 16 is stored in the registers 14 and 15. This is for comparing whether or not the data matches, and corresponds to the exclusive OR circuit 3 in FIG. 1, and the shift register 17 sets the comparison result of the exclusive OR circuit 16.

不一致数カウンタ18はシフトレジスタ17から伝達され
る不一致を示す「1」つまり排他的論理和回路16におけ
る不一致回数を計数するもので、第1図における不一致
数カウンタ6に対応するもの、閾値回路19は不一致数カ
ウンタ18の計数値が閾値Th以内か否かを検出するもので
あり第1図における閾値回路7に対応するものである。
最大一致長検出部20はバッファメモリ10における部分列
と閾値Thの相違数の範囲で一致する最大長の部分列のバ
ッファメモリ11内の開始位置とワード数と、次のワード
の内容を保持するものであり、第1図における最大一致
長検出部8に対応するものである。符号化部21は、第1
図における符号化部9に対応するものであり、前記最大
一致長検出部20から伝達される最大長の部分列の開始位
置とワード数及び次シンボルにより第2図(B)に示す
如き符号を作成し、この符号を例えばハフマン符号、算
術符号の如き公知の手法で可変長符号化し、出力端子T2
より圧縮符号として出力するものである。
The mismatch counter 18 counts "1" indicating the mismatch transmitted from the shift register 17, that is, the number of mismatches in the exclusive OR circuit 16, and corresponds to the mismatch counter 6 in FIG. Is for detecting whether or not the count value of the mismatch number counter 18 is within a threshold Th, and corresponds to the threshold circuit 7 in FIG.
The maximum match length detection unit 20 holds the start position and the number of words in the buffer memory 11 of the maximum length subsequence that matches within the range of the difference number of the threshold value Th from the subsequence in the buffer memory 10 and the content of the next word. This corresponds to the maximum matching length detection unit 8 in FIG. The encoding unit 21 includes a first
This corresponds to the encoding unit 9 in the figure, and a code as shown in FIG. 2 (B) is represented by the start position and the number of words and the next symbol of the maximum length subsequence transmitted from the maximum matching length detection unit 20. This code is variable-length coded by a known method such as Huffman code or arithmetic code, and output terminal T 2
It is output as a compression code.

次に第4図の動作について説明する。 Next, the operation of FIG. 4 will be described.

入力端子T1より網点画像データが入力され、バッファ
メモリ10に蓄積される。バッファメモリ10の網点画像デ
ータは、符号化されたワード分が逐次バッファメモリ11
に伝達されるとともに、同じワード分の網点画像データ
が新たにバッファメモリ10に蓄積される。なお、ここで
バッファメモリ10、11の1ワードは1画素以上の任意の
画素数に設定される。したがって1ワードあたりの画素
数を大きくするにつれて不一致になる確立が高くなるの
で、圧縮率は低下するが、処理単位が大きくなるため処
理速度が上がることになる。
Halftone image data from the input terminal T 1 is inputted and stored in the buffer memory 10. In the halftone image data in the buffer memory 10, the encoded words are sequentially stored in the buffer memory 11.
And the dot image data for the same word is newly stored in the buffer memory 10. Here, one word of the buffer memories 10 and 11 is set to an arbitrary number of pixels equal to or more than one pixel. Therefore, as the number of pixels per word increases, the probability of mismatching increases, and the compression rate decreases, but the processing speed increases because the processing unit increases.

これらバッファメモリ10、11に保持されたデータは次
の様に読み出され、排他的論理和回路16において照合さ
れる。
The data held in the buffer memories 10 and 11 are read out as follows, and collated in the exclusive OR circuit 16.

いま、バッファメモリ10の各ワードのデータを先頭か
らq1、q2……qnとし、バッファメモリ11の各ワードのデ
ータを先頭からp1、p2……pmとする。照合は、アドレス
制御部12により先ずバッファメモリ10の先頭データq1
読み出し、レジスタ14にセットする。そしてアドレス制
御部13によりバッファメモリ11の先頭からデータp1を読
み出し、レジスタ15にセットする。そしてこれらを排他
的論理和回路16で一画素毎に照合し、この照合結果をパ
ラレル出力してシフトレジスタ17にセットする。勿論こ
の場合、排他的論理和回路16はレジスタ14と15のデータ
を同時に比較できる容量を有する。このようにシフトレ
ジスタ17にパラレルセットされた照合結果における不一
致数をカウントするため、シフトレジスタ17をシフト
し、そのシリアル出力中の「1」の数を不一致数カウン
タ18で計数する。このようにして不一致数カウンタ18は
照合時の不一致ビット個数を計数する。この計数値は閾
値回路19で検査される。このq1とp1の照合結果、不一致
数カウンタ18が閾値Thより1つ多くカウントしたとき、
不一致信号が閾値回路19よりアドレス制御部13に出力さ
れる。これによりアドレス制御部13は不一致カウンタ18
をリセットし、バッファメモリ11より次のデータp2をレ
ジスタ15にセットし、同様な照合が行われ、これも不一
致の場合、次のデータp3との照合が行われる。このよう
にしてq1がバッファメモリ11のデータp1、p2……pmとす
べて不一致のとき、第2図(B)の一致する長さの項は
零が記入されてバッファメモリ11内に類似パターンが存
在しないことが示され、次のシンボルの項にはq1が記入
されたデータが圧縮符号として符号化部21で作成され、
この圧縮符号が例えばハフマン方式で圧縮されて出力端
子T2より出力される。
Now, the q 1, q 2 ...... qn data of each word from the beginning of the buffer memory 10, and p 1, p 2 ...... pm data of each word in the buffer memory 11 from the beginning. Matching, first reads the first data q 1 of the buffer memory 10 by the address control unit 12, is set in the register 14. Then, the data p 1 is read from the head of the buffer memory 11 by the address control unit 13 and set in the register 15. Then, these are collated by the exclusive OR circuit 16 for each pixel, and the collation results are output in parallel and set in the shift register 17. In this case, of course, the exclusive OR circuit 16 has a capacity to compare the data of the registers 14 and 15 at the same time. In order to count the number of mismatches in the collation result set in parallel in the shift register 17 as described above, the shift register 17 is shifted, and the number of “1” in the serial output is counted by the mismatch counter 18. In this way, the mismatch counter 18 counts the number of mismatch bits at the time of comparison. This count value is checked by the threshold circuit 19. As a result of comparing q 1 and p 1 , when the mismatch counter 18 counts one more than the threshold Th,
The mismatch signal is output from the threshold circuit 19 to the address control unit 13. As a result, the address control unit 13
Reset the sets the next data p 2 from the buffer memory 11 to the register 15, the same verification is performed, which in the case of disagreement, the collation with the next data p 3 is performed. In this way, when q 1 does not all match the data p 1 , p 2, ... Pm in the buffer memory 11, the term of the matching length in FIG. It is shown that there is no similar pattern, and data in which q 1 is written in the next symbol term is created by the encoding unit 21 as a compression code,
The compressed code is, for example, is compressed by the Huffman method is output from the output terminal T 2.

ところで、このような照合のとき、例えばq1がq2と閾
値範囲で一致するつまり概略一致すると、閾値回路19は
これをアドレス制御部12及び13に報告する。これによ
り、最大一致長検出部20はそのp2の位置及びデータ長を
保持し、またアドレス制御部12はレジスタ14にq1の次の
q2を出力し、アドレス制御部13はレジスタ15にp2の次の
p3を出力し、q2とp3の照合を行う。この照合の不一致数
が不一致数カウンタ18の計数値に加算されるが閾値Thよ
り多くなればこれがアドレス制御部12、13に通知され、
アドレス制御部12はレジスタ14に、先ずq1を出力する。
このときアドレス制御部13は不一致数カウンタ18をリセ
ットするとともに、レジスタ15にまずp3を出力し、照合
を行う。不一致ならば、アドレス制御部13は同様にして
次のp4を出力し照合を行う。これにより、q1とp4が概略
一致すると、アドレス制御部12はq2を読み出し、アドレ
ス制御部13はp5を読み出し照合する。これにより概略一
致すると、最大一致長検出部20が、今度は、そのp4の位
置とワード数(この例では2)を保持し、今度はアドレ
ス制御部12はq3を読み出し、アドレス制御部13はp6を読
み出し照合が行われる。このようなことが順次行われ、
最大一致長検出部20で保持された最大一致長データの開
始位置、ワード数が符号化部21に送出され、レジスタ14
に保持された次のシンボルがこれまた符号化部21に送出
されて、これらにより第1図(B)に示す如き圧縮符号
が作成されこれがさらに例えばハフマン符号化により圧
縮されて出力端子T2より出力される。
Incidentally, when such a collation, for example, q 1 is when clogging substantially aligned coincident with q 2 and the threshold range, the threshold circuit 19 reports this to the address control section 12 and 13. Thus, the maximum matching length detection unit 20 holds the position and the data length of the p 2, The address control unit 12 to the register 14 of q 1 of the following
outputs q 2, the address control unit 13 to the register 15 of p 2 follows
Outputs p 3, performs matching q 2 and p 3. The number of mismatches of this collation is added to the count value of the mismatch number counter 18, but if it exceeds the threshold Th, this is notified to the address control units 12, 13, and
Address control unit 12 to the register 14, first outputs q 1.
Together with the time address control unit 13 resets the mismatch counter 18, first output p 3 in the register 15, performs verification. If a mismatch, the address control unit 13 in the same manner to output to match the following p 4. Thus, when q 1 and p 4 are roughly aligned, the address control section 12 reads the q 2, the address control unit 13 collates reads p 5. When Accordingly schematic match, maximum matching length detection unit 20 is, in turn, its position p 4 and the number of words holds (2 in this example), this time the address control section 12 reads the q 3, the address control unit 13 is collated reads p 6 is performed. This is done sequentially,
The start position and the number of words of the maximum match length data held by the maximum match length detection unit 20 are sent to the encoding unit 21, and
Is sent to the next symbol that is held thereto also encoding unit 21, the output terminal T 2 is the first view these such compressed code shown in (B) is created which further example is compressed by Huffman coding Is output.

このようにしてバッファメモリ10内の先頭部分のデー
タを圧縮符号化した系列をバッファメモリ11内に移し、
同数の画像データを新たに入力端子T1からバッファメモ
リ10に入力される。このような操作を繰り返し、データ
を部分列に分解して順次圧縮符号化する。
In this way, a sequence obtained by compressing and encoding the data at the head of the buffer memory 10 is transferred to the buffer memory 11,
Input the same number of image data from the newly input terminal T 1 to the buffer memory 10. Such an operation is repeated, and the data is decomposed into partial strings and sequentially compression-encoded.

なお前記のアドレス制御部12、アドレス制御部13、及
び最大一致長検出回路について第5図の回路構成例をも
とに更に詳述する。
The address control unit 12, the address control unit 13, and the maximum matching length detection circuit will be described in further detail based on the circuit configuration example shown in FIG.

画像データは端子T1から入力され、バッファメモリ10
に蓄積されるが、バッファメモリ10中のデータは、符号
化された個数分、新たに入力されて、蓄積され、同時
に、符号化されたデータはバッファメモリ11に移され
る。バッファメモリ10の容量をmワード、バッファメモ
リ13の容量をnワードとする。バッファメモリ10へのデ
ータ蓄積、読み出しはアドレス制御部12によって制御さ
れ、また、バッファメモリ11へのデータ蓄積、読み出し
はアドレス制御部13によって制御される。バッファメモ
リ10の未符号化データの先頭アドレスはカウンタ12−1
に格納されており、バッファメモリ10の未符号化データ
の最終アドレスがカウンタ12−3に格納されている。ま
た、バッファメモリ11は符号化済データの内、nワード
分の先頭アドレス、および最終アドレスが、それぞれカ
ウンタ13−1、13−4に格納されている。カウンタ20−
2には、逐次、符号化するごとに符号化したデータ数が
設定される。データのバッファメモリ10、バッファメモ
リ11への受け渡しは、次のようにして行う。カウンタ20
−2を1ずつカウントダウンするごとに、カウンタ12−
1のアドレスのデータをバッファメモリ10から読み出
し、カウンタ13−4のアドレスに書き込む。次に、カウ
ンタ12−1、12−3、13−1、13−4を1つカウントア
ップした後、バッファメモリ10のカウンタ12−3のアド
レスに端子T1から入力したデータを書き込む。
Image data is input from the terminal T 1, the buffer memory 10
The data in the buffer memory 10 is newly inputted and accumulated by the number of encoded data, and at the same time, the encoded data is moved to the buffer memory 11. The capacity of the buffer memory 10 is m words, and the capacity of the buffer memory 13 is n words. Data storage and reading to and from the buffer memory 10 are controlled by an address control unit 12, and data storage and reading to and from the buffer memory 11 are controlled by an address control unit 13. The head address of the uncoded data in the buffer memory 10 is the counter 12-1
The last address of the uncoded data in the buffer memory 10 is stored in the counter 12-3. In the buffer memory 11, the start address and the end address of n words of the encoded data are stored in counters 13-1 and 13-4, respectively. Counter 20−
In 2, the number of encoded data is set for each successive encoding. The transfer of data to the buffer memory 10 and the buffer memory 11 is performed as follows. Counter 20
Each time -2 is counted down by one, the counter 12-
The data at the address 1 is read from the buffer memory 10 and written to the address of the counter 13-4. Then, after the counter 12-1,12-3,13-1,13-4 counted up one, and writes the data inputted from the terminal T 1 to the address counter 12-3 of the buffer memory 10.

バッファメモリ10中のデータの符号化は次のようにし
て行う。
Encoding of data in the buffer memory 10 is performed as follows.

カウンタ13−1のバッファメモリ13の先頭アドレス
をカウンタ13−2にセットする。
The head address of the buffer memory 13 of the counter 13-1 is set in the counter 13-2.

カウンタ13−2の内容をカウンタ13−3にセットす
る。
The contents of the counter 13-2 are set in the counter 13-3.

カウンタ12−1の内容をカウンタ12−2にセットす
る。
The contents of the counter 12-1 are set in the counter 12-2.

バッファメモリ11よりカウンタ13−3のアドレスの
内容を読み出す。
The contents of the address of the counter 13-3 are read from the buffer memory 11.

バッファメモリ10よりカウンタ12−2のアドレスの
内容を読み出す。
The contents of the address of the counter 12-2 are read from the buffer memory 10.

双方のバッファメモリから読み出した内容を比較
し、その差異の大小を閾値回路19で検査する。
The contents read from both buffer memories are compared, and the magnitude of the difference is checked by the threshold circuit 19.

もし、閾値回路19で検査して、差異が閾値以下な
ら、カウンタ12−2、13−3を一つカウントアップし
て、にもどり、カウンタ13−2から始まる系列の概略
一致を続けて調べる。
If the difference is equal to or smaller than the threshold value by the threshold circuit 19, the counters 12-2 and 13-3 are incremented by one, and the sequence returns to the main routine.

もし、閾値回路19で検査して、差異が閾値を越えて
いるなら、まず、減算器13−8でカウンタ13−2と13−
3の内容を減算して、一致長を求める。そして、前回ま
での最大一致長を格納してあるカウンタ20−2と比較器
20−1により、大小を比較する。もし、今回求めた一致
長が前回までの一致長より短ければ、に移る。また、
もし、今回求めた一致長が前回まで一致長以上ならば、
今回求めた一致長をカウンタ20−2に格納する。これと
ともに、レジスタ20−3に文字列の開始位置であるカウ
ンタ13−2の内容を格納する。さらに、レジスタ20−4
にレジスタ14より、不一致になった文字を格納する。カ
ウンタ20−2、レジスタ20−3、20−4の値はバッファ
メモリ11を走査して、最大一致長が求まったとき、符号
化部21で符号化される。
If the difference is greater than the threshold value as checked by the threshold circuit 19, first, the counters 13-2 and 13-
3 is subtracted to determine the match length. Then, the counter 20-2 storing the maximum matching length up to the previous time and the comparator
Compare the magnitudes according to 20-1. If the match length obtained this time is shorter than the match length up to the previous time, the process goes to. Also,
If the match length found this time is longer than the match length up to the previous time,
The match length obtained this time is stored in the counter 20-2. At the same time, the contents of the counter 13-2, which is the start position of the character string, are stored in the register 20-3. Furthermore, register 20-4
From the register 14 are stored. The values of the counter 20-2 and the registers 20-3 and 20-4 are coded by the coding unit 21 by scanning the buffer memory 11 and finding the maximum matching length.

バッファメモリ11中の次の文字列を検査するため、
カウンタ12−2を1つカウントアップし、もし、カウン
タ13−2の値がカウンタ13−4の最終アドレスまで到達
していなければ、に戻る。
To inspect the next character string in the buffer memory 11,
The counter 12-2 is incremented by one. If the value of the counter 13-2 has not reached the final address of the counter 13-4, the process returns to the step.

以上のからまでの動作により、最大一致検出回路
13で最大一致長が求められる。バッファメモリ11全体を
走査して最大一致長が求まったとき、カウンタ20−2、
レジスタ20−3、20−4の値は符号化部21に渡され、符
号化される。
From the above operations, the maximum match detection circuit
13 finds the maximum match length. When the maximum match length is obtained by scanning the entire buffer memory 11, the counter 20-2,
The values of the registers 20-3 and 20-4 are passed to the encoding unit 21 and encoded.

なおバッファメモリ10、11が1ビット/ワードのとき
はシフトレジスタ17は不要となるとともに最大一致部分
列の次のワードの符号化も不要となる。
When the buffer memories 10 and 11 are 1 bit / word, the shift register 17 becomes unnecessary and the encoding of the next word of the maximum matching subsequence becomes unnecessary.

(4) 第2実施例 本発明の第2実施例を第6図及び第7図に基づき説明
する。第5図は前記(2)で説明した増分分解型のジブ
−レンペル符号を用いたときの実施例であり、第7図は
その動作説明図である。
(4) Second Embodiment A second embodiment of the present invention will be described with reference to FIGS. FIG. 5 shows an embodiment in which the Jib-Lempel code of the incremental decomposition type described in the above (2) is used, and FIG. 7 is a diagram for explaining the operation thereof.

第6図において、30はバッファメモリであり入力端子
T1より網点画像データが入力され第1図におけるバッフ
ァメモリ1に対応するもの、31はパターンメモリであり
部分列(X0、X1、X2……)が登録されるもので第1図に
おける先行データメモリ2に対応するもの、32はアドレ
ス制御部でバッファメモリ30に保持されている未処理の
網点画像データを読み出したり、新たに網点画像データ
を書き込んだりするものであり第1図の第1アドレス制
御部4に対応するもの、33はアドレス制御部でパターン
メモリ31に保持されている部分列を読み出したり、新た
に部分列を書き込むものであり第1図の第2アドレス制
御部5に対応するもの、34は排他的論理和回路で第1図
における排他的論理和回路3に対応するもの、35はシフ
トレジスタ、36は不一致数カウンタであって第1図にお
ける不一致数カウンタ6に対応するもの、37は閾値回路
であって第1図の閾値回路7に対応するもの、38は最大
一致長検出部であって第1図の最大一致長検出部8に対
応するもの、39は符号化部であって第3図に示す如き圧
縮符号を作成し、この圧縮符号を例えばハフマン符号、
算術符号の如き公知の手法で可変長符号化し出力端子T2
より出力するものであり第1図の符号化部9に対応すう
ものである。
In FIG. 6, reference numeral 30 denotes a buffer memory, which is an input terminal.
The halftone image data is input from T1 and corresponds to the buffer memory 1 in FIG. 1. Reference numeral 31 denotes a pattern memory in which sub-sequences (X 0 , X 1 , X 2 ...) Are registered. In the figure, reference numeral 32 denotes an address control unit for reading unprocessed halftone image data held in the buffer memory 30 or writing new halftone image data. A reference numeral 33 corresponding to the first address control unit 4 in FIG. 1 is an address control unit for reading out a partial column held in the pattern memory 31 or writing a new partial column. A control unit 5, an exclusive OR circuit 34 corresponding to the exclusive OR circuit 3 in FIG. 1, a shift register 35, a mismatch counter 36, and a mismatch counter in FIG. counter 6, 37 is a threshold circuit corresponding to the threshold circuit 7 of FIG. 1, 38 is a maximum matching length detecting unit corresponding to the maximum matching length detecting unit 8 of FIG. 1, Reference numeral 39 denotes an encoding unit which creates a compression code as shown in FIG. 3 and converts the compression code into a Huffman code, for example.
Variable-length coding using a known method such as an arithmetic code and output terminal T 2
This corresponds to the encoding unit 9 in FIG.

次に第5図の動作について説明する。 Next, the operation of FIG. 5 will be described.

網点画像データが入力端子T1から入力され、バッファ
メモリ30に蓄積される。
Halftone image data is input from an input terminal T 1, is accumulated in the buffer memory 30.

いま、入力シンボルの系列xが下記の如く、 x=aabababaa…… であり、成分系列xを x=X0X1X2…… とするとき、X0=λ(空列)となりこれがまずアドレス
制御部33によりパターンメモリ31に格納される。
Now, as series x of the input symbol is the following, is x = aabababaa ......, when the component series x x = X 0 X 1 X 2 ......, X 0 = λ ( empty string) and makes this first address The data is stored in the pattern memory 31 by the control unit 33.

初めにアドレス制御部32によりバッファメモリ30から
最初のシンボルaが読み出されたとき、パターンメモリ
31は空列以外に何も記入されていないので、アドレス制
御部33によるパターンメモリ31の出力と前記最初のシン
ボルaが排他的論理和回路34で比較されたとき、排他的
論理和回路34よりこの比較結果がシフトレジスタ35にパ
ラレルに出力される。そしてこれをシリアルシフトして
不一致数を示す「1」の数を不一致数カウンタ26でカウ
ントすると閾値Th以上になるので、閾値回路37より不一
致信号が出力される。これによりアドレス制御部33はこ
のaをX1=X0aとしてパターンメモリ31に格納する。そ
してこのX0aのインデックス「ゼロ」と次のシンボル
(初めのa)が最大一致長検出部38で保持されており、
これらが符号化部39に印加され、第3図に示す如き圧縮
符号が作成され、それが例えばハフマン符号、算術符号
の如き公知の手法でさらに圧縮される。
First, when the first symbol a is read from the buffer memory 30 by the address control unit 32, the pattern memory
Since nothing is written in the column 31 except for the empty column, when the output of the pattern memory 31 by the address control unit 33 and the first symbol a are compared by the exclusive OR circuit 34, the exclusive OR circuit 34 The comparison result is output to the shift register 35 in parallel. When this is serially shifted and the number of “1” indicating the number of mismatches is counted by the mismatch number counter 26, the number becomes equal to or larger than the threshold Th, so that the threshold circuit 37 outputs a mismatch signal. As a result, the address control unit 33 stores this a in the pattern memory 31 as X 1 = X 0 a. Then, the index “zero” of this X 0 a and the next symbol (the first “a”) are held in the maximum matching length detection unit 38,
These are applied to the encoding unit 39 to generate a compressed code as shown in FIG. 3, which is further compressed by a known method such as a Huffman code or an arithmetic code.

アドレス制御部32が、バッファメモリ30より2番目の
シンボルaを読み出し、これを排他的論理和回路34に送
出する。このときアドレス制御部33はパターンメモリ31
からX1=X0aを読み出す。X0=λで空列のため、排他的
論理和回路34ではこのときaとaとが比較され、この比
較結果がパラレルにシフトレジスタ35に入力され、不一
致数カウンタ36へシリアルシウトされてこのシリアル出
力中の「1」の数つまり不一致のビット数をカウントす
る。この2番目のシンボルの時一致する、即ち不一致数
が閾値Th以内であるので、閾値回路37はアドレス制御部
32及びアドレス制御部33を制御してそれぞれ次のシンボ
ルb及び登録されている部分列を読み出し比較を行う
が、このときパターンメモリ31にはさらに部分列が登録
されていないので、不一致となり閾値回路37は不一致信
号を出力する。これにより不一致数カウンタ36はリセッ
トされ、また符号化部39には最大一致長検出部38を経由
して成分のインデックスと次シンボルが伝達されている
ので、X2=X1bとしてつまり成分のインデックス1と次
のシンボルbによる第3図に示す如き増分分解型符号が
作成され、これが、X2としてパターンメモリ31に格納さ
れるとともに、圧縮符号となり、更にハフマン符号等に
より圧縮されて出力端子T2より送出される。
The address controller 32 reads the second symbol a from the buffer memory 30 and sends it to the exclusive OR circuit 34. At this time, the address control unit 33 stores the pattern memory 31
Read the X 1 = X 0 a from. Since X 0 = λ and the empty column, the exclusive OR circuit 34 compares a and a at this time, and the comparison result is input to the shift register 35 in parallel, serially shorted to the mismatch counter 36, and The number of “1” in the serial output, that is, the number of mismatched bits is counted. When the second symbol matches, that is, the number of mismatches is within the threshold Th, the threshold circuit 37
The next symbol b and the registered sub-sequence are read out and compared by controlling the address control unit 32 and the address control unit 33, however, at this time, since no further sub-sequence is registered in the pattern memory 31, there is no match and the threshold circuit 37 outputs a mismatch signal. Thus the mismatch counter 36 is reset, and since the encoding unit 39 via the maximum matching length detection unit 38 components of the index and the next symbol is transmitted, X 2 = X 1 b and to words components index 1 and the next increment decomposition type codes created as shown in Figure 3 by the symbol b, which, while being stored in the pattern memory 31 as X 2, becomes compressed code, the output terminal is further compressed by the Huffman coding etc. It sent from T 2.

このようにパターンメモリ31には、必要に応じて増分
分解型符号が作成、格納されることになる。
In this way, the pattern memory 31 creates and stores the incremental decomposition type code as needed.

このパターンメモリ31に登録されている部分列とバッ
ファメモリ30のデータ照合を行うとき、アドレス制御部
32は、パターンメモリ30の先頭ワードより順に読み出
し、またアドレス制御部33はパターンメモリ31から登録
されている各部分列についてその部分列の先頭ワードよ
り順に読出す。
When comparing the subsequence registered in the pattern memory 31 with the data in the buffer memory 30, the address control unit
Reference numeral 32 reads sequentially from the first word of the pattern memory 30, and the address control unit 33 sequentially reads each partial column registered from the pattern memory 31 from the first word of the partial column.

初めにアドレス制御部32によりパターンメモリ30の先
頭ワードが読み出され、排他的論理和回路34に出力され
る。このときアドレス制御部33はパターンメモリ31に登
録されている各部分列についてその部分列の先頭のワー
ドより順に読出し、排他的論理和回路34で比較照合し、
シフトレジスタ35にこの結果をパラレルセットする。次
にシフトレジスタ35はシリアルシフトされ、そのシリア
ル出力中の「1」の数が不一致数カウンタ36で計数さ
れ、かくして照合不一致ビットの個数が計数される。こ
の計数値は閾値回路37でチェックされ、不一致ビット数
が所定の閾値を超えるまで、またはパターンメモリ31中
の部分列の最終データになるまでを一致したものとみな
し、1つの部分列とする。このときバッファメモリ30の
先頭ワードとその先頭ワードが概略一致すればバッファ
メモリ30から次のワード読み出されてその概略一致した
部分列の次のワードと比較され、これらが概略一致すれ
ば3番のワードがバッファメモリ30及びパターンメモリ
31からそれぞれ読出されて比較されることになる。この
ようにしてパターンメモリ31中の各部分列との照合が順
次行われる。
First, the first word of the pattern memory 30 is read by the address control unit 32 and output to the exclusive OR circuit 34. At this time, the address control unit 33 reads out each sub-sequence registered in the pattern memory 31 in order from the first word of the sub-sequence, compares and reads it with the exclusive OR circuit 34,
This result is set in the shift register 35 in parallel. Next, the shift register 35 is serially shifted, and the number of "1" s in the serial output is counted by the mismatch number counter 36, and thus the number of collation mismatch bits is counted. This count value is checked by the threshold circuit 37, and it is regarded as a match until the number of unmatched bits exceeds a predetermined threshold value or until the last data of the partial sequence in the pattern memory 31 is reached, and is regarded as one partial sequence. At this time, if the head word of the buffer memory 30 and the head word roughly match, the next word is read from the buffer memory 30 and compared with the next word of the roughly matched sub-sequence. Are the buffer memory 30 and the pattern memory
31 will be read out and compared. In this way, the comparison with each sub-sequence in the pattern memory 31 is sequentially performed.

最大一致長検出部38は、求めた部分列のパターンメモ
リ31への登録順序を表すインデックス、長さ(ワード
数)、次のワードの内容(すなわち次のシンボル)を保
持しておき、部分列の内で最大長のものを検出し、その
インデックスと次のワードの内容を出力する。符号化部
39は最大一致長検出部38から伝達されたこれらの情報を
例えばハフマン符号等により可変長符号化し、圧縮符号
として出力端子T2より出力する。
The maximum matching length detection unit 38 holds an index indicating the order of registration of the obtained subsequence in the pattern memory 31, the length (the number of words), and the content of the next word (that is, the next symbol). Is detected, and the index and the contents of the next word are output. Encoding unit
39 is variable-length coded by the information transmitted from the maximum matching length detection unit 38 for example a Huffman code or the like, and outputs from the output terminal T 2 as a compression code.

最大一致長の部分列が符号化部39で増分分解型符号で
符号化された後、符号化されたこの部分列のデータによ
り伸びた分がパターンメモリ31に登録されるとともに、
その符号化済み部分列がバッファメモリ30により捨てら
れ、同数の画像データが新たに入力端子T1からバッファ
メモリ30に入力され、蓄積される。そして前記符号化済
み部分列の次の部分、つまり新しくバッファメモリ30の
先頭部分から同様の処理が行われることになる。
After the subsequence of the maximum matching length is encoded by the encoding unit 39 with the incremental decomposition type code, the portion extended by the encoded data of this subsequence is registered in the pattern memory 31,
Its encoded subsequence is discarded by the buffer memory 30, the same number of image data is input from the newly input terminal T 1 to the buffer memory 30, is stored. Then, the same processing is performed from the next portion of the encoded subsequence, that is, a new head portion of the buffer memory 30.

ここで第7図により、第6図のパターンメモリ31に格
納される内容の例について説明する。第7図は前記
(2)増分分解型のアルゴリズムで説明した系列を例に
とってパターンメモリ31に格納される内容を示したもの
である。第7図(1)のインデックスがパターンメモリ
31のアドレスになる。第7図(2)の文字列は参考まで
に示したもので実際には、パターンメモリ31に格納され
ない。
Here, an example of the contents stored in the pattern memory 31 of FIG. 6 will be described with reference to FIG. FIG. 7 shows the contents stored in the pattern memory 31 by taking as an example the sequence described in the above (2) incremental decomposition type algorithm. The index in FIG. 7 (1) is the pattern memory.
31 addresses. The character string in FIG. 7 (2) is for reference only and is not actually stored in the pattern memory 31.

文字列が部分列に分解されるごとにパターンメモリ31
に(1)インデックス、(3)最後尾の文字、(4)1
文字長い文字列へのポインタ、(5)最後尾の文字以外
は同じ文字列のポインタが逐次登録される。この内容で
は、(5)項目をもたないものが、最初の1文字目とな
る。2文字目以降は(4)項目により辿ることができ
る。また、(5)項目により同じ文字数で最後尾の文字
のみ異なる文字列を辿ることができる。
Each time a character string is decomposed into substrings, the pattern memory 31
(1) index, (3) last character, (4) 1
A pointer to a long character string, and (5) a pointer to the same character string except for the last character are sequentially registered. In this content, the item having no item (5) is the first character. The second and subsequent characters can be traced by item (4). Further, (5) it is possible to trace a character string that differs only in the last character by the same number of characters depending on the item.

なお前記説明ではジブ−レンペル符号の増分分解アル
ゴリズムを用いたが、本発明はこれに限定されるもので
はなく、他のユニバーサル符号でもよい。例えばLZW符
号(T.A.Welch,「A Technique for High−Performance
Data Comporession」,Computer,June.1984年参照)を用
いれば、圧縮符号の情報はインデックスだけとなり、シ
ンプルなものとなる。
In the above description, the incremental decomposition algorithm of the Jib-Lempel code is used, but the present invention is not limited to this, and another universal code may be used. For example, LZW code (TAWelch, "A Technique for High-Performance
Using "Data Comporession", Computer, June, 1984), the information of the compression code is only an index, which is simple.

〔発明の効果〕〔The invention's effect〕

本発明によれば、種々の周期の網点画像を網点周期の
不整合なしに効率よく圧縮でき、従来のように網点周期
ごとに回路が増えることなく、小さい回路規模で実現す
ることができる。
ADVANTAGE OF THE INVENTION According to this invention, the halftone images of various periods can be efficiently compressed without the mismatch of the halftone periods, and a small circuit scale can be realized without increasing the circuit for each halftone period as in the related art. it can.

また周期的な規則性を考慮した情報非保存型符号化に
より画質劣化を目立たせないで、高圧縮率が得られる。
In addition, a high compression ratio can be obtained without making image quality degradation noticeable by the information non-conservation type coding in consideration of the periodic regularity.

勿論この復元回路は、圧縮回路と対になったユニバー
サル符号化方式を用いた回路を変形なしでそのまま使用
することができる。
Of course, this restoration circuit can use the circuit using the universal coding system paired with the compression circuit without modification.

【図面の簡単な説明】 第1図は本発明の原理説明図、 第2図はユニバーサル型ジブ−レンペル符号原理図、 第3図は増分分解型符号説明図、 第4図は本発明の第1実施例構成図、 第5図は要部構成図、 第6図は本発明の第2実施例構成図、 第7図は動作説明図、 第8図は従来の予測符号化方式説明図、 第9図は従来の予測符号復元方式説明図である。 1……バッファメモリ 2……先行データメモリ 3……排他的論理和回路 4……第1アドレス制御部 5……第2アドレス制御部 6……不一致数カウンタ 7……閾値回路 8……最大一致長検出部 9……符号化部BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is a diagram for explaining the principle of a universal type Jib-Lempel code, FIG. 3 is a diagram for explaining an incrementally decomposed code, and FIG. 1 is a block diagram of an embodiment, FIG. 5 is a block diagram of a main part, FIG. 6 is a block diagram of a second embodiment of the present invention, FIG. 7 is an operation explanatory diagram, FIG. FIG. 9 is an explanatory diagram of a conventional predictive code restoration method. DESCRIPTION OF SYMBOLS 1 ... Buffer memory 2 ... Advance data memory 3 ... Exclusive OR circuit 4 ... First address control unit 5 ... Second address control unit 6 ... Number of mismatch counters 7 ... Threshold circuit 8 ... Maximum Matching length detection unit 9: coding unit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】圧縮符号化される画像データが保持される
入力データ保持手段(1)と、 圧縮符号処理が行われたデータが保持される先行データ
保持手段(2)と、 比較手段(3)と、 不一致数を計数する不一致数計数手段(6)と、 不一致数が規定値以内か否かを検知する閾値手段(7)
と、 最大一致長を検出する最大一致長検出手段(8)と、 符号化手段(9)を具備し、 入力データ保持手段(1)で保持された入力画像データ
を前記先行データ保持手段(2)に保持されたデータと
前記比較手段(3)で順次比較して、その不一致数が規
定値以内の最大の入力データ部分列をまとめて符号化手
段(9)により圧縮符号化することを特徴とする網点画
像データ圧縮方式。
An input data holding means (1) for holding image data to be compression-encoded, a preceding data holding means (2) for holding data subjected to compression coding processing, and a comparison means (3) ), A discrepancy number counting means (6) for counting the discrepancy number, and a threshold means (7) for detecting whether or not the discrepancy number is within a specified value.
And a maximum matching length detecting means (8) for detecting a maximum matching length; and an encoding means (9), and the input image data held by the input data holding means (1) is stored in the preceding data holding means (2). ) Is sequentially compared with the data held in the comparison means (3), and the maximum input data subsequence whose number of mismatches is within a specified value is collectively compressed and encoded by the encoding means (9). Dot image data compression method.
JP1160042A 1989-06-22 1989-06-22 Halftone image data compression method Expired - Fee Related JP2614318B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1160042A JP2614318B2 (en) 1989-06-22 1989-06-22 Halftone image data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1160042A JP2614318B2 (en) 1989-06-22 1989-06-22 Halftone image data compression method

Publications (2)

Publication Number Publication Date
JPH0324863A JPH0324863A (en) 1991-02-01
JP2614318B2 true JP2614318B2 (en) 1997-05-28

Family

ID=15706673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1160042A Expired - Fee Related JP2614318B2 (en) 1989-06-22 1989-06-22 Halftone image data compression method

Country Status (1)

Country Link
JP (1) JP2614318B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2802135B2 (en) 1990-02-26 1998-09-24 富士通株式会社 Image data compression method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5233328A (en) * 1990-09-17 1993-08-03 Fmc Corporation Method for processing compacted data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2802135B2 (en) 1990-02-26 1998-09-24 富士通株式会社 Image data compression method

Also Published As

Publication number Publication date
JPH0324863A (en) 1991-02-01

Similar Documents

Publication Publication Date Title
US5177622A (en) Method and apparatus for detecting run length of two successive pixels and subjecting run length to universal coding
CN109379598B (en) Image lossless compression method based on FPGA
US6351569B1 (en) Coding method, decoding method, coding device and decoding device
Howard et al. Parallel lossless image compression using Huffman and arithmetic coding
JPH0681104B2 (en) Method for digital signal coding by vector quantization.
CN112398484A (en) Coding method and related equipment
US4799242A (en) Multi-mode dynamic code assignment for data compression
JPH1013693A (en) Digital information encoding device, digital information decoding device, digital information encoding/decoding device, digital information encoding method and digital information decoding method
JPH09298668A (en) Digital information coder, digital information decoder, digital information coding/decoding device, digital information coding method and digital information decoding method
JP2614318B2 (en) Halftone image data compression method
JPH10271013A (en) Compression method for data, compression method for picture data and compression device
JP3929312B2 (en) Arithmetic coding apparatus and image processing apparatus
JP2003264703A (en) Data encoder, data encoding method and program therefor
CN115022628A (en) JPEG-LS (joint photographic experts group-LS) -based high-throughput lossless image compression method
JP2614320B2 (en) Halftone dot image compression method
JPH1042144A (en) Method and device for encoding gray scale picture
JP2615215B2 (en) Image data compression method
JP2612343B2 (en) Data compression method
GB2360915A (en) Run length compression encoding of selected bits of data words
JP3124887B2 (en) Data compression / decoding method
JP2755464B2 (en) Image data compression method
JP3105330B2 (en) Image data compression / decompression method
JP2708252B2 (en) Image data compression method
JP2798767B2 (en) Image data compression method
JPH04265020A (en) Data compressing system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees