JPH0695726B2 - Image data compression device - Google Patents

Image data compression device

Info

Publication number
JPH0695726B2
JPH0695726B2 JP62234175A JP23417587A JPH0695726B2 JP H0695726 B2 JPH0695726 B2 JP H0695726B2 JP 62234175 A JP62234175 A JP 62234175A JP 23417587 A JP23417587 A JP 23417587A JP H0695726 B2 JPH0695726 B2 JP H0695726B2
Authority
JP
Japan
Prior art keywords
byte
mode
pattern
specific pattern
encoding
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
JP62234175A
Other languages
Japanese (ja)
Other versions
JPS6477373A (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 JP62234175A priority Critical patent/JPH0695726B2/en
Publication of JPS6477373A publication Critical patent/JPS6477373A/en
Publication of JPH0695726B2 publication Critical patent/JPH0695726B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概要〕 画像処理装置やファクシミリなどのシステムにおいて,2
値画像情報の通信伝送や,ファイル蓄積に使用されるデ
ータ圧縮装置に関し, バイト単位で処理する形式の電算機に好適な2値画像情
報の高速データ圧縮装置を提供することを目的とし, 入力メモリ手段に蓄積されている2値画像データをバイ
ト単位に読み出し,各バイトデータごとに,1バイト全て
“0"か全て“1"の白/黒ラン,予め登録されている特定
パターン,それ以外の非特定パターン,のいずれである
かを判別するパターン判別手段と,入力メモリ手段から
読み出される順次のバイトデータの間に白/黒ラン,特
定パターン,非特定パターンの予め定められた組み合わ
せが存在するかどうかを判別し,その結果により所定の
符号化モードを設定するモード判別手段と,パターン判
別手段により判別された白/黒ラン,特定パターンある
いは非特定パターンの各々ごとに連続バイト数を計数す
るカウンタ手段と,符号化手段とをそなえ,符号化手段
は,モード判別手段により設定された符号化モードおよ
びカウンタ手段により計数された連続バイト数に基づい
て所定の符号化形式を選択し符号化を行う構成をもつ。
DETAILED DESCRIPTION [Overview] In systems such as image processing devices and facsimiles, 2
Regarding a data compression device used for communication transmission of value image information and file storage, an object is to provide a high-speed data compression device for binary image information suitable for a computer that processes in byte units. The binary image data stored in the means is read in byte units, and for each byte data, one byte is all "0" or all "1" white / black runs, pre-registered specific patterns, and other A predetermined combination of a white / black run, a specific pattern, and a non-specific pattern exists between the pattern determining means for determining which of the non-specific patterns and the sequential byte data read from the input memory means. It is discriminated whether or not it is determined and a predetermined coding mode is set according to the result, and a white / black run and a specific pattern are discriminated by the pattern discrimination means. Or a non-specific pattern, each comprising a counter means for counting the number of consecutive bytes, and an encoding means. The encoding means has the encoding mode set by the mode discriminating means and the consecutive bytes counted by the counter means. It has a configuration in which a predetermined encoding format is selected based on the number and encoding is performed.

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

本発明は,画像処理装置やファクシミリなどのシステム
において,2値画像情報の通信伝送や,ファイル蓄積に使
用されるデータ圧縮装置に関する。
The present invention relates to a data compression device used for communication transmission of binary image information and file storage in a system such as an image processing device and a facsimile.

画像情報のデータ圧縮方式には,国際標準のMH方式,MR
方式,MMR方式などがあるが,これらはいずれも画像情報
を1ビット(画素)単位で取り扱っている。
The image information data compression method is the international standard MH method, MR
There are methods, MMR methods, etc., but these all handle image information in 1-bit (pixel) units.

一方,汎用の電算機は,基本的にバイト(8ビット)単
位でデータを取り扱うものであるため,ビット単位の処
理には不向きであり,汎用の電算機を用いて2値画像情
報のデータ圧縮を行った場合,ビットシフト命令が多用
されることから,ステップ数が莫大になって,専用回路
を用いた方式にくらべて処理時間が非常に長くなり,改
善が必要となる。
On the other hand, since a general-purpose computer basically handles data in byte (8 bits) units, it is not suitable for bit-unit processing, and data compression of binary image information is performed using a general-purpose computer. In this case, since the number of steps is enormous because the bit shift instruction is frequently used, the processing time becomes extremely long as compared with the method using the dedicated circuit, and improvement is required.

〔従来の技術〕[Conventional technology]

従来の2値画像のデータ圧縮で多く用いられているMR方
式,MMR方式は,2次元の符号化方式であり,符号化対象の
ラインのみではなく,前ラインとの相関をとって符号化
するものである。この符号化の過程は,前ラインのデー
タの並び方によって種々のモードに分かれるため,モー
ド判別およびモードごとの処理をビット単位で行う必要
がある。
The MR method and MMR method, which are often used in conventional binary image data compression, are two-dimensional encoding methods, and encode not only the line to be encoded but also the correlation with the previous line. It is a thing. Since this encoding process is divided into various modes depending on the arrangement of the data on the previous line, it is necessary to perform mode discrimination and processing for each mode in bit units.

従来は,この処理を高速で実行するため,専用の複雑な
回路を用いていた。
Conventionally, in order to execute this processing at high speed, a dedicated complex circuit was used.

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

従来の2値画像情報の2次元データ圧縮方式では,バイ
ト処理形式の汎用電算機を用いると高速処理ができない
という問題があった。
The conventional two-dimensional data compression method of binary image information has a problem that high-speed processing cannot be performed if a general-purpose computer of byte processing type is used.

本発明は,バイト単位で処理する形式の電算機に好適な
2値画像情報の高速データ圧縮装置を提供することを目
的とする。
It is an object of the present invention to provide a high-speed data compression device for binary image information, which is suitable for a computer that processes in byte units.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は,バイト処理形式の汎用電算機が効率的に処理
できるバイト単位の符号アルゴリズムをもった画像デー
タ圧縮装置を提供するものである。
The present invention provides an image data compression apparatus having a byte-unit coding algorithm that can be efficiently processed by a byte-processing type general-purpose computer.

本発明はそのため,符号化対象ラインをバイト単位に分
割し,そのバイトデータ中の全ビットが“0"または全ビ
ットが“1"のランか,予め登録されているパターンか,
あるいはそれ以外かを判定して符号化モードを分け,こ
の符号化モードの種別とその連続バイト長とに応じて符
号化アルゴリズムを適用し,モードごとに異なるバイト
データ形式で符号化することによりデータ圧縮を行うも
のである。
Therefore, according to the present invention, a line to be encoded is divided into byte units, and a run in which all bits in the byte data are “0” or all bits are “1”, or a pattern that is registered in advance,
Alternatively, the coding mode is determined by determining whether it is other than that, the coding algorithm is applied according to the type of the coding mode and the continuous byte length, and the data is coded in a different byte data format for each mode. It is for compression.

第1図は,本発明の原理説明図である。FIG. 1 is an explanatory view of the principle of the present invention.

図において, 1は入力メモリ部であり,符号化対象の2値画像データ
を一時的に保持する。
In the figure, 1 is an input memory unit, which temporarily holds the binary image data to be encoded.

2は,パターン判別部であり,入力メモリ1からライン
ごとに2値画像データをバイト単位で読み出し,各バイ
トデータについて,その内容が,予め登録されている特
定パターン(“0",“1"の組み合わせ),1バイト全て
“0"(白ラン)か全て“1"(黒ラン),それ以外(非特
定パターン),のいずれに該当するかを判別する。
Reference numeral 2 denotes a pattern discriminating unit, which reads out binary image data for each line from the input memory 1 in byte units, and the content of each byte data is stored in a specific pattern (“0”, “1”). Combination), all 1-byte “0” (white run) or all “1” (black run), and other (non-specific pattern).

予め登録されている特定パターンは,出現頻度の高いパ
ターンから複数種類選んだものである。
The specific pattern registered in advance is a plurality of types selected from patterns having a high appearance frequency.

3はモード判別部であり,パターン判別部2が,判別し
たバイトデータの内容に基づいて,順次のバイトにおけ
る連続状態を調べる。そして,白/黒ランバイトの連続
や白/黒ランバイトと特定パターンバイトとの組み合わ
せなど,一定の連続状態の種別を判別し,それぞれに対
応する符号化モードを設定する。
Reference numeral 3 denotes a mode discriminator, and the pattern discriminator 2 checks the continuous state of successive bytes based on the content of the discriminated byte data. Then, the type of a constant continuous state such as continuous white / black rambite or a combination of white / black rambite and a specific pattern byte is discriminated, and an encoding mode corresponding to each is set.

4はカウンタであり,パターン判別部2が判別した結果
が同一のバイトデータの連続数(バイト長)を計数す
る。
Reference numeral 4 denotes a counter, which counts the continuous number (byte length) of byte data having the same result determined by the pattern determination unit 2.

5は符号化部であり,バイトデータについてモード判別
部3が設定した符号化モードと,カウンタ4が計数した
同一モードのバイトの連続数とを用いて,モードに応じ
た符号化アルゴリズムにより符号生成を行う。
Reference numeral 5 denotes an encoding unit that uses the encoding mode set by the mode determination unit 3 for byte data and the number of consecutive bytes of the same mode counted by the counter 4 to generate a code by an encoding algorithm according to the mode. I do.

〔作用〕[Action]

第2図は,本発明が適用される画像情報のデータ圧縮と
データ復元の過程を概略的に示したものである。
FIG. 2 schematically shows a process of data compression and data decompression of image information to which the present invention is applied.

データ圧縮過程では,2値化画像データ形式の原画像情報
は,第1図に示されている構成によりパターン判別およ
びモード判別され,モードごとに符号化アルゴリズムに
従ってバイト単位に符号化され,圧縮画像情報に変換さ
れる。
In the data compression process, the original image information in the binary image data format is pattern-determined and mode-determined by the configuration shown in FIG. 1, and is encoded in byte units according to the encoding algorithm for each mode to obtain a compressed image. Converted to information.

この圧縮画像情報は,伝送あるいはファイル蓄積され,
利用側でデータ復元処理される。
This compressed image information is transmitted or stored in a file,
Data restoration processing is performed on the user side.

データ復元の過程は,データ圧縮過程の逆過程であり,
モード判別およびコード−パターン変換を行い,データ
圧縮で用いた符号化アルゴリズムに基づいて,圧縮画像
情報を復元画像情報に復元する。
The process of data decompression is the reverse process of the data compression process,
The mode discrimination and the code-pattern conversion are performed, and the compressed image information is restored to the restored image information based on the coding algorithm used in the data compression.

本発明の作用を第3図を用いて説明する。The operation of the present invention will be described with reference to FIG.

第3図は,本発明による符号化方法を,3つの符号化モー
ドについて例示的に示したものである。
FIG. 3 exemplifies the coding method according to the present invention for three coding modes.

第3図(a)の例は,白/黒ランレングスのみが存在す
るときの符号化モード(Rモードという)であり,入力
画像データ内の連続する複数のバイトが全て“1"ビット
あるいは“0"ビットであるとき,これらを図示の1バイ
ト長の出力符号形式に変換する。この白/黒ランレング
スのモードの出力符号形式には,白ラン(“0"ビットの
連続)か黒ラン(“1"ビットの連続)かを示す種別と,
連続バイト数を示すレングスが設定される。
The example of FIG. 3 (a) is an encoding mode (referred to as R mode) when only white / black run lengths exist, and a plurality of consecutive bytes in the input image data are all "1" bits or " When it is 0 "bit, these are converted into the output code format of 1 byte length shown in the figure. The output code format of this white / black run length mode has a type indicating whether it is a white run (continuous "0" bits) or a black run (continuous "1" bits), and
A length indicating the number of continuous bytes is set.

第3図(b)の例は,予め登録されている特定パターン
をもつバイトに白/黒ランのバイトが連続しているとき
の符号化モード(RCモードという)である。このモード
における出力符号形式は,1バイト長で,白/黒ランのレ
ングス(連続バイト数)と,白,黒のラン種別,特定パ
ターンを識別するパターンコードとが設定される。
The example of FIG. 3 (b) is an encoding mode (referred to as RC mode) when white / black run bytes are continuous with bytes having a specific pattern registered in advance. The output code format in this mode has a length of 1 byte, and the length of white / black runs (the number of consecutive bytes), the run types of white and black, and a pattern code for identifying a specific pattern are set.

第3図(c)の例は,登録されている特定パターンをも
つバイドにその他の非特定パターンをもつバイトが連続
しているときの符号化モード(PCモードという)であ
り,2バイト長の出力符号形式をとる。第1バイトにはモ
ード識別コードと特定パターンのパターンコードが設定
れ,第2バイトには非特定パターンをもつバイトがその
まま設定される。
The example in Fig. 3 (c) is the encoding mode (called the PC mode) when the byte with other non-specific pattern continues in the byte with the registered specific pattern. Takes the output code format. A mode identification code and a pattern code of a specific pattern are set in the first byte, and a byte having a non-specific pattern is set as it is in the second byte.

その他,特定パターンのバイトのみを対象とする符号化
モード,非特定パターンをもつバイトのみを対象とする
符号化モードなどが設けられる。
In addition, an encoding mode that targets only bytes having a specific pattern, an encoding mode that targets only bytes having a non-specific pattern, and the like are provided.

各符号化モードに対応する出力符号形式は異なっている
が,1バイトないし複数バイトのバイト単位で長さが規定
されている。またそれぞれの出力符号形式の先頭にある
複数のビットにより,モード種別が識別できるようにさ
れる。
The output code format corresponding to each encoding mode is different, but the length is specified in byte units of 1 byte or multiple bytes. Further, the mode type can be identified by a plurality of bits at the head of each output code format.

このように本発明では,出現頻度の高い複数種類の特定
パターンをもつバイトの連続に対して特に有効にデータ
圧縮を行うことができる。
As described above, according to the present invention, it is possible to particularly effectively perform data compression on a series of bytes having a plurality of types of specific patterns that frequently appear.

〔実施例〕〔Example〕

第4図ないし第11図により,本発明の実施例を説明す
る。
An embodiment of the present invention will be described with reference to FIGS.

第4図のないしは,実施例における符号化モードの
種別とそれぞれの出力符号形式を示したものである。
FIG. 4 and FIG. 4 show types of coding modes and respective output code formats in the embodiment.

は,Rモードであり,白/黒のランレングスをもつ1個
あるいは複数個のバイトのシーケンスに適用される。第
2バイトは,Rモードをもつバイトが第1バイト内の5ビ
ットのレングス領域で表示できる32個以上連続している
場合に,拡張領域として付加される。
Is an R mode and applies to a sequence of one or more bytes with white / black run lengths. The 2nd byte is added as an extension area when 32 bytes or more that have the R mode are consecutively displayed in the 5-bit length area in the 1st byte.

は,RCモードであり,予め登録されている特定パター
ンをもつバイトに白/黒ランレングスをもつバイトが連
続しているものに適用される。特定パターンは,4ビット
のパターンコードによって示される。
Is an RC mode and is applied to a byte with a specific pattern that is registered in advance and a byte with a white / black run length in succession. The specific pattern is indicated by a 4-bit pattern code.

は,PCモードであり,特定パターンをもつバイトに非
特定のパターンをもつバイトが連続している場合に適用
される。第2バイト以降は,非特定パターンを示す。
Is in PC mode and applies when bytes with a specific pattern are followed by bytes with a non-specific pattern. The second and subsequent bytes indicate a non-specific pattern.

は,1Cモードであり,特定パターンをもつバイトが1
個の場合に適用される。
Is in 1C mode, 1 byte with a specific pattern
Applies to individual cases.

は,NCモードであり,特定パターンをもつ(異なって
いてもよい)バイトがN個(N=3〜18)連続している
場合に適用される。第2バイト以降は,各特定パターン
のパターンコードのシーケンスを示す。
Is an NC mode and is applied when N bytes (N = 3 to 18) having a specific pattern (which may be different) are continuous. The second and subsequent bytes indicate the sequence of pattern codes of each specific pattern.

は,Pモードであり,非特定のパターンをもつバイトの
シーケンスに対して適用される。第2バイト以降は,非
特定パターンを示す。
Is in P mode and applies to sequences of bytes with non-specific patterns. The second and subsequent bytes indicate a non-specific pattern.

第5図は,本発明の実施例において使用される登録され
た特定パターンとパターンコードの対応を与えるパター
ンコードテーブルの説明図である。図示の例では,28
256通りのパターンのうち最も発生する確率の高い16種
の特定パターンが4ビットのパターンコードと対応づけ
て登録されている。
FIG. 5 is an explanatory diagram of a pattern code table which gives correspondence between registered specific patterns and pattern codes used in the embodiment of the present invention. In the example shown, 2 8 =
Of the 256 patterns, the 16 types of specific patterns with the highest probability of occurrence are registered in association with the 4-bit pattern code.

このパターンコードテーブルに登録されている特定パタ
ーンのいずれかが入力バイトデータ中に検出された場
合,対応するパターンコードに変換され,該当する符号
化モードにしたがって符号化される。
When any of the specific patterns registered in this pattern code table is detected in the input byte data, it is converted into the corresponding pattern code and encoded according to the corresponding encoding mode.

第6図は,本発明の1実施例によるデータ圧縮装置の構
成図である。
FIG. 6 is a block diagram of a data compression apparatus according to an embodiment of the present invention.

11は入力メモリであり,原画像情報の2値化画像データ
が格納される。
An input memory 11 stores binary image data of original image information.

12はパターン判別部であり,2値化画像データをバイト単
位で読み出し,そのバイトの全てのビットが“1"か“0"
か,あるいは後述するパターンコードテーブル13に予め
登録されている特定パターンか,それ以外の非特定パタ
ーンかを判別する。
Reference numeral 12 is a pattern discriminating unit, which reads binary image data in byte units, and all bits of the byte are "1" or "0".
Alternatively, it is determined whether it is a specific pattern registered in advance in a pattern code table 13 described later or a non-specific pattern other than that.

13はパターンコードテーブルであり,たとえば第5図に
示したパターンコードテーブルの内容が設定されてい
る。
Reference numeral 13 is a pattern code table in which the contents of the pattern code table shown in FIG. 5 are set.

13aは連続バイト数カウンタであり,入力バイトの内容
が“0"のみ,“1"のみ,あるいは非特定パターンである
場合にそのバイトの連続数(レングス)をカウントす
る。
A continuous byte number counter 13a counts the number of consecutive bytes (length) when the content of the input byte is "0" only, "1" only, or a non-specific pattern.

14はフラグ部であり,入力バイトの内容が“0"のみ(白
ラン)と“1"のみ(黒ラン)のときのRモード(第4図
)の場合にはフラグ“0"(白ラン),“01"(黒ラ
ン)を設定し,また非特定パターンのバイトのときのP
モード(第4図)の場合にフラグ“1111"を設定す
る。
Reference numeral 14 is a flag portion. In the R mode (Fig. 4) when the input byte contents are only "0" (white run) and "1" (black run), the flag "0" (white run) is used. ), “01” (black run), and P for non-specific pattern bytes
The flag "1111" is set in the mode (FIG. 4).

15はパターンコード連続カウンタであり,入力バイトの
内容が特定パターンのいずれかであるとき,そのパター
ンコードの連続数(レングス)をカウントする。
Reference numeral 15 is a pattern code continuous counter, which counts the number of continuous pattern codes (length) when the content of the input byte is one of the specific patterns.

16はモード判別部であり,特定パターンのバイトのみ,
あるいは特定パターンのバイトと白/黒ランのバイトの
連続,特定パターンのバイトと非特定パターンの連続の
各状態を判別して,それぞれの符号化モードとして,1C
モード(第4図)とNCモード(第4図),RCモード
(第4図),PCモード(第4図)を決定する。
Reference numeral 16 is a mode discriminating unit, and only a specific pattern byte is
Alternatively, it is possible to determine whether each byte of a specific pattern is continuous with a white / black run byte and whether each byte of a specific pattern is continuous with a non-specific pattern, and 1C is set as each encoding mode.
The mode (Fig. 4), NC mode (Fig. 4), RC mode (Fig. 4) and PC mode (Fig. 4) are determined.

17はパターンコード部であり,パターン判別部12により
判別された特定パターンのパターンコードが,モード判
別部16により設定される。
Reference numeral 17 is a pattern code portion, and the pattern discrimination portion 16 sets the pattern code of the specific pattern discriminated by the pattern discrimination portion 12.

18はフラグ部であり,1C,NC,RC,PCの各モードに応じたフ
ラグ“1101"“1110",“100/101",“1100"がそれぞれ設
定される。
Reference numeral 18 is a flag portion, and flags “1101”, “1110”, “100/101”, “1100” corresponding to each mode of 1C, NC, RC and PC are set.

19は出力レジスタであり,符号を組み立て生成するため
に使用される。
An output register 19 is used to assemble and generate a code.

20は拡張出力レジスタであり,連続バイト数カウンタ13
aのカウント値が32を超えたとき,拡張バイトを組み立
て生成するために使用される。
20 is an extended output register, and the continuous byte number counter 13
Used to assemble and generate extension bytes when the count value of a exceeds 32.

21は出力メモリであり,符号化された圧縮画像情報が格
納される。
An output memory 21 stores encoded compressed image information.

第7図は,第6図に示されているデータ圧縮装置の制御
手順を示すフローである。以下に手順にしたがって動作
を説明する。
FIG. 7 is a flow chart showing the control procedure of the data compression apparatus shown in FIG. The operation will be described below according to the procedure.

(1):パターン判別部12は,入力メモリ11内の画像デ
ータをバイト単位で読み出し,パターンコードテーブル
13に登録されている特定パターンのいずれかと一致する
かどうかを調べる。一致するものがあればパターンコー
ドに変換し,(7)を実行するが,一致するものがなけ
れば(2)を実行する。
(1): The pattern discriminating unit 12 reads the image data in the input memory 11 byte by byte, and the pattern code table
Check if it matches any of the specific patterns registered in 13. If there is a match, it is converted into a pattern code and (7) is executed, but if there is no match, (2) is executed.

(2):入力バイトが白ラン(全て“0")か黒ラン(全
て“1"),または非特定パターンかを調べる。前者であ
れば(3)を実行し,後者であれば(5)を実行する。
(2): Check whether the input byte is a white run (all "0"), a black run (all "1"), or a non-specific pattern. In the former case, (3) is executed, and in the latter case, (5) is executed.

(3):白/黒ランのバイトの場合,連続バイト数カウ
ンタ13aでその連続数をカウントする。
(3): In the case of white / black run bytes, the continuous byte number counter 13a counts the number of continuous bytes.

(4):フラグ部14にRモードのフラグ“00/01"を設定
し,Rモードによる符号化を行う。
(4): The R mode flag "00/01" is set in the flag section 14 and encoding is performed in the R mode.

(5):非特定パターンのバイトの場合,連続バイト数
カウンタ13aによりその連続数をカウントする。
(5): In the case of non-specific pattern bytes, the continuous byte number counter 13a counts the number of continuous bytes.

(6):フラグ部14にPモードのフラグ“1111"を設定
し,Pモードによる符号化を行う。
(6): A P-mode flag "1111" is set in the flag unit 14 to perform encoding in the P mode.

(7):(1)で入力バイトの内容が特定パターンであ
った場合,パターンコード連続数カウンタ15によりその
連続数Cをカウントする。
(7): If the content of the input byte is a specific pattern in (1), the pattern code consecutive number counter 15 counts the consecutive number C.

(8):C=1の場合(12)を実行し,他の場合(C
2)には(9)を実行する。
(8): If C = 1, execute (12), otherwise (C
For (2), execute (9).

(9):C=2の場合,(10)を実行し,他の場合(C
3)には(11)を実行する。
(9): If C = 2, execute (10), otherwise (C
For (3), execute (11).

(10):フラグ部18に“1100"を設定し,1Cモードで符号
化を行う。
(10): "1100" is set in the flag unit 18 and encoding is performed in the 1C mode.

(11):フラグ部18に“1110"を設定し,NCモードで符号
化を行う。
(11): "1110" is set in the flag unit 18 and encoding is performed in NC mode.

(12):次の入力バイトが非特定パターンであるかどう
かを調べる。非特定パターンのバイトであれば(13)を
実行し,他の場合には(14)を実行する。
(12): Check whether the next input byte is a non-specific pattern. If it is a byte of non-specific pattern, execute (13), otherwise execute (14).

(13):フラグ部18に“1101"を設定し,PCモードで符号
化を行う。
(13): "1101" is set in the flag unit 18 and encoding is performed in the PC mode.

(14):次の入力バイトが連続数1の白/黒ランである
かどうかを調べる。白/黒ランであれば(15)を実行
し,連続数2の白/黒ランであれば(16)を実行する。
(14): It is checked whether the next input byte is a white / black run with a continuous number of 1. If it is a white / black run, execute (15). If it is a white / black run with the number of continuations of 2, execute (16).

(15):フラグ部18に“100"を設定し,1バイトの白/黒
ランが連続している場合のRCモードによる符号化を行
う。
(15): "100" is set in the flag part 18 and encoding is performed in the RC mode when 1-byte white / black runs are continuous.

(16):フラグ部18に“101"を設定し,2バイトの白/黒
ランが連続している場合のRCモードによる符号化を行
う。
(16): "101" is set in the flag portion 18 and encoding is performed in the RC mode when a 2-byte white / black run is continuous.

なお,連続バイト数カウンタ13aの値が32を超える場合
には,フラグ部14内にある拡張ビットを“1"に設定す
る。このときには,連続バイト数カウンタ13aの値は,
出力レジスタ19と拡張出力レジスタ20の両方を対象に設
定される。
When the value of the continuous byte counter 13a exceeds 32, the extension bit in the flag unit 14 is set to "1". At this time, the value of the continuous byte counter 13a is
It is set for both the output register 19 and the extended output register 20.

第8図は,データ圧縮対象の原画像情報の1例であり,
簡単化のため10×16画素のサイズのものを示している。
FIG. 8 shows an example of original image information to be compressed,
For simplification, the size of 10 × 16 pixels is shown.

この原画像情報は,順次のラインごとにバイト単位で読
み出され,解析されて,該当する符号化モードが決定さ
れ,符号化される。
This original image information is read in byte units for each successive line, analyzed, the corresponding encoding mode is determined, and encoded.

第9図は,第8図の原画像情報に第7図の制御手順を適
用したときの符号化モードの区分を示す。図示のように
Rモード,NCモード,Pモード,1Cモード,RCモードにより
順次符号化される。
FIG. 9 shows the division of coding modes when the control procedure of FIG. 7 is applied to the original image information of FIG. As shown, the R mode, NC mode, P mode, 1C mode, and RC mode are sequentially coded.

第10図は,第9図に示された符号化モードにしたがって
符号化された結果の出力データを示す。元の20バイトの
データが,16バイトのデータに圧縮されている。
FIG. 10 shows output data as a result of encoding according to the encoding mode shown in FIG. The original 20 bytes of data are compressed into 16 bytes of data.

第11図は,本発明実施例のデータ圧縮装置と組み合わせ
て使用できるデータ復元装置の構成図である。
FIG. 11 is a block diagram of a data decompression device that can be used in combination with the data compression device of the embodiment of the present invention.

図において,22は入力メモリであり,データ圧縮された
画像情報が格納される。
In the figure, reference numeral 22 is an input memory, in which data-compressed image information is stored.

23は符号判別部であり,入力バイトデータの符号を解析
して復元する処理を制御する。
Reference numeral 23 is a code discriminating unit, which controls a process of analyzing and restoring the code of the input byte data.

24はパターンコードテーブルであり,入力バイトに含ま
れるパターンコードに対応する特定パターンを与える。
A pattern code table 24 gives a specific pattern corresponding to the pattern code contained in the input byte.

25はメモリ書込部であり,符号判別部23からの制御に基
づいて,復元データのメモリ書き込みを行う。
A memory writing unit 25 writes the restored data in the memory under the control of the code discriminating unit 23.

26は出力メモリであり,復元データがバイト単位で格納
され,利用装置に出力される。
Reference numeral 26 is an output memory in which the restored data is stored in byte units and is output to the device used.

入力メモリ22に格納されている符号化(圧縮)データ
は,バイト単位で読み出され,符号判別部23で,符号化
モードの判定がなされる。各モードに応じて次の動作が
行われる。
The encoded (compressed) data stored in the input memory 22 is read in byte units, and the code determination unit 23 determines the encoding mode. The following operation is performed according to each mode.

Rモードであれば,レングスで指定されたバイト長だけ
メモリ書込部25から出力メモリ26に,1バイト分全て
“0",または1バイト分全て“1"のデータを書き込む。
このメモリ書き込みを,複数バイト同時に行うことによ
り,高速処理が可能となる。ここで,拡張ビットが“1"
(拡張あり)の場合には,次のバイトも用いて,指定さ
れたレングス(バイト数)だけ,出力メモリ26に書き込
みを行う。
In the R mode, one byte of all "0" or one byte of "1" is written from the memory writing unit 25 to the output memory 26 by the byte length specified by the length.
High-speed processing is possible by simultaneously writing this memory to multiple bytes. Here, the extension bit is "1"
In the case of (with extension), the next byte is also used to write to the output memory 26 by the specified length (the number of bytes).

RCモードであれば,まずパターンコードテーブル24を参
照して,パターンコードで指定された特定パターンを,
メモリ書込部25経由で,出力メモリ26に書き込み,さら
に1バイトまたは2バイトの白ランまたは黒ランをメモ
リ書込部25を介して書き込む。
In the RC mode, first, referring to the pattern code table 24, the specific pattern designated by the pattern code is
Write to the output memory 26 via the memory writing unit 25, and further write a 1-byte or 2-byte white run or black run via the memory writing unit 25.

PCモードのときは,パターンコードテーブル24を参照し
て,パターンコードで指定された特定パターンをメモリ
書込部25経由で出力メモリ26に書き込み,さらに後続す
る非特定パターンを,そのまま出力メモリ26に書き込
む。
In the PC mode, the pattern code table 24 is referred to, the specific pattern designated by the pattern code is written to the output memory 26 via the memory writing unit 25, and the subsequent non-specific pattern is directly written to the output memory 26. Write.

1Cモードのときは,パターンコードテーブル24を参照し
て,パターンコードで指定された特定パターンを,メモ
リ書込部25経由で出力メモリ26に書き込み次に進む。
In the 1C mode, the pattern code table 24 is referred to, the specific pattern designated by the pattern code is written to the output memory 26 via the memory writing unit 25, and the process proceeds.

NCモードのときは,連続長Nを読み込み,後続の4ビッ
ト単位でN個連続する各パターンコードにより,パター
ンコードテーブル24を参照して,指定された特定パター
ンを,メモリ書込部25経由で,出力メモリ26に書き込
む。
In the NC mode, the continuous length N is read, and the specified specific pattern is read via the memory writing unit 25 by referring to the pattern code table 24 with each N consecutive continuous pattern codes in units of 4 bits. , Write to output memory 26.

Pモードのときは,レングス長分だけの後続するパター
ンを読み込み,出力メモリ26に書き込む。
In the P mode, the subsequent pattern of the length length is read and written in the output memory 26.

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

本発明によるデータ圧縮のための符号化アルゴリズム
は,バイト単位の処理を基本としているため,通常の汎
用電算機を用いて,効率的にデータ圧縮を行うことがで
き,従来のような専用回路を用いた特別な圧縮装置によ
らずとも,経済的に比較的高速なシステムが実現でき
る。
Since the encoding algorithm for data compression according to the present invention is based on byte-unit processing, it is possible to efficiently perform data compression using an ordinary general-purpose computer, and to use a dedicated circuit like the conventional one. A relatively high-speed system can be realized economically regardless of the special compression device used.

ある具体例では,400×400ドットの新聞用見出し文字パ
ターンで約30%の圧縮率を得ることができた。
In a specific example, a compression ratio of about 30% could be obtained with a 400 x 400 dot newspaper headline character pattern.

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

第1図は本発明の原理説明図,第2図は本発明によるデ
ータ圧縮およびデータ復元過程の説明図,第3図は本発
明の作用を示す符号化例の説明図,第4図ないし第11図
は本発明の実施例を示し,第4図は符号化モードの種別
と出力符号形式の説明図,第5図はパターンコードテー
ブルの説明図,第6図はデータ圧縮装置の構成図,第7
図はデータ圧縮装置の制御手順のフロー図,第8図は原
画像情報の1例の説明図,第9図は符号化モードの区分
の説明図,第10図は出力データの例の説明図,第11図は
データ復元装置の構成図である。 第1図中, 1は入力メモリ部, 2はパターン判別部, 3はモード判別部, 4はカウンタ, 5は符号化部。
FIG. 1 is an explanatory diagram of the principle of the present invention, FIG. 2 is an explanatory diagram of a data compression and data decompression process according to the present invention, FIG. 3 is an explanatory diagram of an encoding example showing the operation of the present invention, and FIGS. FIG. 11 shows an embodiment of the present invention, FIG. 4 is an explanatory diagram of coding mode types and output code formats, FIG. 5 is an explanatory diagram of a pattern code table, FIG. 6 is a configuration diagram of a data compression device, 7th
FIG. 8 is a flow chart of the control procedure of the data compression device, FIG. 8 is an explanatory diagram of an example of original image information, FIG. 9 is an explanatory diagram of coding mode divisions, and FIG. 10 is an explanatory diagram of an example of output data. , FIG. 11 is a block diagram of a data restoration device. In FIG. 1, 1 is an input memory unit, 2 is a pattern discrimination unit, 3 is a mode discrimination unit, 4 is a counter, and 5 is an encoding unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】2値画像データを蓄積する入力メモリ手段
(1)と, 入力メモリ手段(1)に蓄積されている2値画像データ
をバイト単位に読み出し,各バイトデータごとに,1バイ
ト全て“0"か全て“1"の白/黒ラン,予め登録されてい
る特定パターン,それ以外の非特定パターン,のいずれ
であるかを判別するパターン判別手段(2)と, 入力メモリ手段(1)から読み出される順次のバイトデ
ータの間に白/黒ラン,特定パターン,非特定パターン
の予め定められた組み合わせが存在するかどうかを判別
し,その結果により所定の符号化モードを設定するモー
ド判別手段(3)と,パターン判別手段(2)により判
別された白/黒ラン,特定パターンあるいは非特定パタ
ーンの各々ごとに連続バイト数を計数するカウンタ手段
(4)と, 符号化手段(5)とをそなえ, 符号化手段(5)は,モード判別手段(3)により設定
された符号化モードおよびカウンタ手段(4)により計
数された連続バイト数に基づいて所定の符号化形式を選
択し符号化を行うことを特徴とする画像データ圧縮装
置。
1. An input memory means (1) for accumulating binary image data, and binary image data accumulated in the input memory means (1) are read in byte units, and for each byte data, all 1 byte A pattern discriminating means (2) for discriminating between "0" or all "1" white / black runs, a specific pattern registered in advance, and other non-specific patterns, and an input memory means (1). ) Determines whether or not there is a predetermined combination of white / black runs, a specific pattern, and a non-specific pattern between the sequential byte data read from), and the mode determination that sets the predetermined encoding mode based on the result A means (3), a counter means (4) for counting the number of continuous bytes for each of the white / black run, the specific pattern or the non-specific pattern judged by the pattern judging means (2); The encoding means (5) includes a coding means (5), and the coding means (5) performs predetermined coding based on the coding mode set by the mode discrimination means (3) and the number of consecutive bytes counted by the counter means (4). An image data compression device characterized by selecting a format and performing encoding.
JP62234175A 1987-09-18 1987-09-18 Image data compression device Expired - Fee Related JPH0695726B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62234175A JPH0695726B2 (en) 1987-09-18 1987-09-18 Image data compression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62234175A JPH0695726B2 (en) 1987-09-18 1987-09-18 Image data compression device

Publications (2)

Publication Number Publication Date
JPS6477373A JPS6477373A (en) 1989-03-23
JPH0695726B2 true JPH0695726B2 (en) 1994-11-24

Family

ID=16966843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62234175A Expired - Fee Related JPH0695726B2 (en) 1987-09-18 1987-09-18 Image data compression device

Country Status (1)

Country Link
JP (1) JPH0695726B2 (en)

Also Published As

Publication number Publication date
JPS6477373A (en) 1989-03-23

Similar Documents

Publication Publication Date Title
US5463701A (en) System and method for pattern-matching with error control for image and video compression
KR960700487A (en) APPARATUS AND METHOD FOR COMPRESSING INFORMATION
EP0410739A2 (en) Method and apparatus for compressing halftone image data
CN109660527B (en) Compression transmission method for printer data
KR870008446A (en) Binary data compression and extension processing unit
JPH0695727B2 (en) Image data compression device
EP0434005B1 (en) Image data compression method using a run prediction technique
JPH10271013A (en) Compression method for data, compression method for picture data and compression device
JPH0695726B2 (en) Image data compression device
US5623556A (en) System and method of extracting binary image data
US5404139A (en) Serial data decoder
JP3095071B2 (en) Pattern matching encoding apparatus and encoding method therefor
US6028962A (en) System and method for variable encoding based on image content
JP3434904B2 (en) Image data encoding device
JPH01302917A (en) Data compression system
JPH0638048A (en) Data compressing method for image and code
JP2833362B2 (en) Image signal expansion device
JPH07170410A (en) Color image data compression method
JP2859507B2 (en) Image data compression / decompression method and apparatus
JP2595900B2 (en) Change point coordinate detection device for binary image data
JP2795023B2 (en) Encoding device
JP2615215B2 (en) Image data compression method
JP3123797B2 (en) Coding device and decoding device for predictive coding method
JPH07184063A (en) Binary image compression system
US20040130733A1 (en) Image formation apparatus, image formation method, and program

Legal Events

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