JP3433276B2 - Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer - Google Patents

Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer

Info

Publication number
JP3433276B2
JP3433276B2 JP21087295A JP21087295A JP3433276B2 JP 3433276 B2 JP3433276 B2 JP 3433276B2 JP 21087295 A JP21087295 A JP 21087295A JP 21087295 A JP21087295 A JP 21087295A JP 3433276 B2 JP3433276 B2 JP 3433276B2
Authority
JP
Japan
Prior art keywords
image signal
code
white
black
dots
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
JP21087295A
Other languages
Japanese (ja)
Other versions
JPH0965147A (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
Fujitsu Peripherals Ltd
Original Assignee
Fujitsu Ltd
Fujitsu Peripherals 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, Fujitsu Peripherals Ltd filed Critical Fujitsu Ltd
Priority to JP21087295A priority Critical patent/JP3433276B2/en
Publication of JPH0965147A publication Critical patent/JPH0965147A/en
Application granted granted Critical
Publication of JP3433276B2 publication Critical patent/JP3433276B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、例えばプリンタ装
置内に画像データを格納する際に利用される、画像信号
をランレングス符号化して符号データに圧縮し、また、
圧縮された符号データを元の画像信号に復元する画像信
号圧縮・復元装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image signal used for storing image data in a printer, for example, which is run-length encoded and compressed into encoded data.
The present invention relates to an image signal compression / decompression device that decompresses compressed code data into an original image signal.

【0002】[0002]

【従来の技術】近年、レーザ記録式プリンタ装置におい
て、高速化,高信頼性により用紙排出までの受信データ
の保証機能が要求されている。このため、プリンタ装置
内には大容量のメモリを必要とするが、装置のコストが
高くなるため、出来る限り高速かつ高い圧縮率で受信デ
ータを圧縮して保存することが望ましい。
2. Description of the Related Art In recent years, laser recording type printers have been required to have a function of guaranteeing received data up to paper ejection due to high speed and high reliability. For this reason, a large-capacity memory is required in the printer device, but the cost of the device increases, so it is desirable to store the received data after compressing the received data at the highest compression rate possible.

【0003】従来の画像信号の圧縮方法としては、ファ
クシミリ等の画像信号伝送装置において高圧縮率を得ら
れるハフマン符号を基本としたMH(Modefied Huffman
n)符号化方式がよく用いられている。ところが、MH符
号は可変長で構成されているため、これを復号化するこ
とは容易ではない。読み出し専用メモリ(ROM)にす
べての符号パターンとそれに対応するランレングスのデ
ータとを格納しておき、一致するまでROMの格納デー
タを検索して復号化を行う方法がある。また、効率的な
手法としてツリーサーチ法などもあるが、これらを用い
た場合でも最も多いときに13回の検索が必要となるの
で、画像信号の復元に長時間を要してしまう。その上、
イメージ,網かけ等、ランレングスが短いデータが多く
出現する場合には、MH符号化方式において高い圧縮率
を期待できないのが現状である。
As a conventional image signal compression method, an MH (Modefied Huffman) based on a Huffman code that can obtain a high compression rate in an image signal transmission device such as a facsimile is used.
n) Coding methods are often used. However, since the MH code has a variable length, it is not easy to decode it. There is a method in which all code patterns and run-length data corresponding to the code patterns are stored in a read-only memory (ROM), and the stored data in the ROM is searched until they match to perform decoding. Further, there are tree search methods and the like as efficient methods, but even if these methods are used, 13 searches are required at the maximum, so that it takes a long time to restore the image signal. Moreover,
At present, it is not possible to expect a high compression rate in the MH coding system when a large amount of data with a short run length appears, such as images and halftone dots.

【0004】また、白ドット及び黒ドットの並びを一組
としたランレングスの反復性に着目して、高い圧縮率を
実現する圧縮方式が開示されている(特開昭55−92077
号公報)。この圧縮方式は、網かけ,網点画像に代表さ
れるような反復して出現する一組の白ドット及び黒ドッ
トの並びに対して共通の符号を割り当てることにより、
圧縮率の向上を図っている。また、二値画像などにおい
てランレングスの白ドット,黒ドットを区別しない反復
性に着目した圧縮方式も提案されている。しかしなが
ら、このような反復性は一般の文書ではごく稀でしかな
いうえに、符号化の際に多くの付加情報が必要となり、
圧縮率,処理速度の面からも実用性に欠ける。
Further, a compression method for realizing a high compression rate has been disclosed, paying attention to the repeatability of run lengths in which a set of white dots and black dots is set (Japanese Patent Laid-Open No. 55-92077).
Issue). This compression method assigns a common code to a set of a series of white dots and black dots that repeatedly appear as represented by a halftone dot image and a halftone dot image.
We are trying to improve the compression rate. In addition, a compression method has been proposed that focuses on repeatability that does not distinguish between run-length white dots and black dots in a binary image or the like. However, such repeatability is very rare in general documents, and a lot of additional information is required for encoding,
It is not practical in terms of compression rate and processing speed.

【0005】[0005]

【発明が解決しようとする課題】従って、従来のMH符
号化方式のみでは、復元対象の符号データが可変長であ
るのでその検索回数が増加してしまってリアルタイムの
処理についていけない。また、反復する符号データに対
して効率が良い圧縮手法を利用しても、その反復性の出
現率が低ければ文書全体としては、付加情報などのため
に圧縮率が向上せず、処理時間が長くなるといった問題
点がある。
Therefore, with the conventional MH coding system alone, since the code data to be restored has a variable length, the number of searches increases, and the real-time processing cannot be performed. Even if a compression method that is efficient for repeated code data is used, if the appearance rate of the repeatability is low, the compression rate does not improve for the entire document due to additional information, and the processing time is reduced. There is a problem that it becomes longer.

【0006】本発明は斯かる事情に鑑みてなされたもの
であり、反復データの出現率を向上させるために白ドッ
ト,黒ドット毎の反復性に着目し、白ドット列,黒ドッ
ト列のそれぞれにおいて直前の白ドット列,黒ドット列
と同一である場合には所定の反復符号を割り当て、同一
でない場合にはMH符号化方式の所定の符号表に従った
符号を割り当てることにより、高い圧縮率にて画像信号
を符号化できる画像信号圧縮方法及び装置並びに画像信
号圧縮・復元方法及び装置を提供することを目的とす
る。
The present invention has been made in view of the above circumstances, and pays attention to the repeatability of each white dot and each black dot in order to improve the appearance rate of repeated data. In the case of being identical with the immediately preceding white dot row and black dot row, a predetermined repetition code is assigned, and when they are not the same, a code according to a predetermined code table of the MH coding method is assigned, thereby achieving a high compression rate. It is an object of the present invention to provide an image signal compression method and apparatus capable of encoding an image signal, and an image signal compression / decompression method and apparatus.

【0007】本発明の他の目的は、白ドット列,黒ドッ
ト列のそれぞれにおいて反復性がある場合には瞬時に復
号可能な反復符号に変換し、反復性がない場合にはMH
符号化方式の利点を取り込んだ符号化を行うことによ
り、圧縮率が高くしかも全体的に復号処理時間を短縮で
きる画像信号復元方法及び装置並びに画像信号圧縮・復
元方法及び装置を提供することにある。
Another object of the present invention is to convert it into an iterative code that can be instantly decoded when each of the white dot sequence and the black dot sequence has repeatability, and when there is no repeatability, MH.
It is an object of the present invention to provide an image signal decompression method and apparatus, and an image signal compression / decompression method and apparatus, which have a high compression rate and can shorten the decoding processing time as a whole by performing encoding that takes advantage of the encoding method. .

【0008】本発明の更に他の目的は、白ドット,黒ド
ット毎の反復性に着目した画像信号圧縮・復元装置を、
画像データ格納部に適用することにより、受信データを
保証するためのメモリの容量を低減することができるプ
リンタ装置を提供することにある。
Still another object of the present invention is to provide an image signal compression / decompression device which focuses on the repeatability of each white dot and black dot.
It is an object of the present invention to provide a printer device that can reduce the capacity of a memory for guaranteeing received data by applying it to an image data storage unit.

【0009】[0009]

【課題を解決するための手段】本発明に係る画像信号圧
縮方法は、画像を走査して得られる白ドット,黒ドット
からなる画像信号に対して、白ドットが連続する回数及
び黒ドットが連続する回数を所定の規則に従って符号化
することにより、画像信号を圧縮する画像信号圧縮方法
において、連続する白ドット,黒ドット毎に、それが連
続する回数がそれの前に連続した白ドット,黒ドットの
回数と同じか否かを判断し、連続する回数が同じである
場合にはその回数を所定の符号に符号化することを特徴
とする。
According to the image signal compression method of the present invention, the number of consecutive white dots and the number of consecutive black dots are continuous with respect to an image signal consisting of white dots and black dots obtained by scanning an image. In the image signal compression method for compressing the image signal by encoding the number of times of the white dots and the black dots in accordance with a predetermined rule, the number of times the white dots and the black dots are continuous is the white dot and the black that are continuous before that. It is characterized in that whether or not the number of dots is the same is determined, and if the number of consecutive times is the same, the number of times is encoded into a predetermined code.

【0010】本発明に係る画像信号圧縮装置は、画像を
走査して得られる白ドット,黒ドットからなる画像信号
に対して、白ドットが連続する回数及び黒ドットが連続
する回数を所定の規則に従って符号化することにより、
画像信号を圧縮する画像信号圧縮装置において、連続す
る白ドット,黒ドット毎に、それが連続する回数がそれ
の前に連続した白ドット,黒ドットの回数と同じか否か
を判断する手段と、連続する回数が同じである場合には
その回数を所定の符号に符号化する手段とを備えること
を特徴とする。
[0010] image signal compression apparatus according to the present invention, image
By encoding the number of consecutive white dots and the number of consecutive black dots for an image signal composed of white dots and black dots obtained by scanning according to a predetermined rule,
In an image signal compression device for compressing an image signal, a means for determining whether or not the number of consecutive white dots or black dots is the same as the number of consecutive white dots or black dots before it. When the number of consecutive times is the same, a means for encoding the number of times into a predetermined code is provided.

【0011】図1は、本発明の画像信号圧縮装置の原理
構成図である。画像信号圧縮装置は、ランレングス算出
部1と、前データ記憶部2と、比較部3と、符号変換部
4と、反復符号変換部5とを有する。画像を所定の周期
で走査して得られる白ドット,黒ドットからなる画像信
号がランレングス算出部1に入力される。ランレングス
算出部1は、入力された画像信号に基づいて変化点(白
ドットから黒ドットに変化する点、及び、黒ドットから
白ドットに変化する点)を検出して変化点間の連続する
白ドット,黒ドットのビット数(ランレングス)を算出
し、算出したランレングスを前データ記憶部2及び比較
部3に出力する。
FIG. 1 is a block diagram showing the principle of an image signal compression apparatus according to the present invention. The image signal compression device includes a run length calculation unit 1, a previous data storage unit 2, a comparison unit 3, a code conversion unit 4, and an iterative code conversion unit 5. Image in a predetermined cycle
An image signal composed of white dots and black dots obtained by scanning at is input to the run length calculation unit 1. The run length calculation unit 1 detects changing points (points changing from white dots to black dots and points changing from black dots to white dots) based on the input image signal, and the change points are continuous. The number of bits (run length) of white dots and black dots is calculated, and the calculated run length is output to the previous data storage unit 2 and the comparison unit 3.

【0012】前データ記憶部2は、ひとつ前のランレン
グスを白ドット,黒ドット毎に一時的に記憶し、次の白
ドットまたは黒ドットのランレングスが入力される度に
記憶しておいたひとつ前のランレングスを比較部3に読
み出す。比較部3は、ランレングス算出部1から入力さ
れる最新のランレングスと前データ記憶部2から読み出
されたランレングスとを、各画素色毎に(白ドット,黒
ドット毎に)比較し、一致しない場合にはその最新のラ
ンレングスを符号変換部4に出力し、一致する場合には
一致信号を反復符号変換部5に出力する。
The previous data storage unit 2 temporarily stores the previous run length for each white dot and black dot, and stores it each time the next white dot or black dot run length is input. The previous run length is read to the comparison unit 3. The comparison unit 3 compares the latest run length input from the run length calculation unit 1 with the run length read from the previous data storage unit 2 for each pixel color (for each white dot and black dot). If they do not match, the latest run length is output to the code conversion unit 4, and if they match, a match signal is output to the iterative code conversion unit 5.

【0013】符号変換部4は、その最新のランレングス
を所定の符号表6に従って符号に変換し、その符号デー
タを出力する。一方、反復符号変換部5は、一致信号を
入力すると所定の反復符号を符号データとして出力す
る。
The code conversion unit 4 converts the latest run length into a code according to a predetermined code table 6 and outputs the code data. On the other hand, when the coincidence signal is input, the repetition code conversion unit 5 outputs a predetermined repetition code as code data.

【0014】図1に示す構成の画像信号圧縮装置では、
白ドット,黒ドット毎に、比較部3において現在のラン
レングスを逐次ひとつ前のランレングスと比較し、一致
したときには符号表6の符号を用いずに所定の反復符号
におきかえる。また、一致しない場合には例えばMH符
号化方式の所定の符号表6に従って符号に変換する。よ
って、白ドットまたは黒ドットにおいて同一のドット列
が反復されると、符号表6を参照することが不要となっ
て高速化を図れると共に、簡単な反復符号に変換するの
で圧縮率を向上できる。
In the image signal compression apparatus having the configuration shown in FIG.
For each white dot and black dot, the current run length is sequentially compared with the previous run length in the comparison unit 3, and when they match, the predetermined repeat code is replaced without using the code in the code table 6. If they do not match, the code is converted into a code according to a predetermined code table 6 of the MH coding method, for example. Therefore, when the same dot row is repeated in the white dots or the black dots, it is not necessary to refer to the code table 6, so that the speed can be increased and the compression rate can be improved by converting the code into a simple repetition code.

【0015】本発明に係る画像信号復元方法は、上記本
発明の画像信号圧縮方法を用いて得られる圧縮された符
号を元の画像信号に復元する画像信号復元方法であっ
て、圧縮された符号から白ドット,黒ドット毎に所定の
符号を識別し、所定の符号を識別した場合にはその前の
白ドット,黒ドットが連続する回数を用いて元の画像信
号を復元することを特徴とする。
The image signal restoration method according to the present invention, meet the image signal restoration method for restoring the image signal compression method original image signal compressed code obtained with the present invention
Then , a predetermined code is identified for each white dot and black dot from the compressed code, and when the predetermined code is identified, the number of consecutive white dots and black dots before that is used to determine the original image signal. Characterized by restoration.

【0016】本発明に係る画像信号復元装置は、上記本
発明の画像信号圧縮装置により得られる圧縮された符号
を元の画像信号に復元する画像信号復元装置であって、
圧縮された符号から白ドット,黒ドット毎に所定の符号
を識別する手段と、所定の符号を識別した場合にはその
前の白ドット,黒ドットが連続する回数を用いて元の画
像信号を復元する手段とを備えることを特徴とする。
An image signal decompression apparatus according to the present invention is an image signal decompression apparatus for decompressing a compressed code obtained by the image signal compression apparatus of the present invention into an original image signal ,
A means for identifying a predetermined code for each white dot and a black dot from the compressed code, and when the predetermined code is identified, the original image signal is obtained by using the number of consecutive white dots and black dots before that. And means for restoring.

【0017】図2は、本発明の画像信号復元装置の原理
構成図であり、画像信号復元装置は、符号復元部11と、
反復符号判別部12と、前データ記憶部13と、画像信号変
換部14とを有する。符号データが符号復元部11に入力さ
れる。符号復元部11は、その符号データを所定の符号表
15を検索してランレングスに復元し、復元したランレン
グスを反復符号判別部12及び画像信号変換部14に出力す
る。なお、符号データが反復符号である場合には、反復
符号判別部12にその反復符号をそのまま出力し、画像信
号変換部14には何も出力しない。反復符号判別部12は、
反復符号が現れたことを検出し、その検出信号を前デー
タ記憶部13に出力する。なお、符号復元部11からのラン
レングスは反復符号判別部12を経て前データ記憶部13に
入力され、前データ記憶部13は、白ドット,黒ドット毎
に、ひとつ前に算出されたランレングスを一時的に保持
する。
FIG. 2 is a block diagram showing the principle of the image signal restoration device of the present invention. The image signal restoration device comprises a code restoration unit 11 and
It has a repetitive code discrimination unit 12, a previous data storage unit 13, and an image signal conversion unit 14. The code data is input to the code restoration unit 11. The code restoration unit 11 converts the code data into a predetermined code table.
15 is retrieved and restored to the run length, and the restored run length is output to the iterative code discrimination unit 12 and the image signal conversion unit 14. When the code data is a repetitive code, the repetitive code is output to the repetitive code discriminating unit 12 as it is and nothing is output to the image signal converting unit 14. The repetition code discrimination unit 12
The appearance of the repetitive code is detected, and the detection signal is output to the previous data storage unit 13. The run length from the code restoration unit 11 is input to the previous data storage unit 13 via the iterative code determination unit 12, and the previous data storage unit 13 calculates the run length calculated one before for each white dot and black dot. Hold temporarily.

【0018】画像信号変換部14は、反復符号が現れた場
合には前データ記憶部13からのランレングスを、反復符
号が現れない場合には符号復元部11からのランレングス
をそれぞれ選択し、選択したランレングスを元の白ドッ
ト列,黒ドット列に変換してそれを元の画像信号として
出力する。
The image signal conversion unit 14 selects the run length from the previous data storage unit 13 when the repetition code appears, and selects the run length from the code restoration unit 11 when the repetition code does not appear, The selected run length is converted to the original white dot row and black dot row and output as the original image signal.

【0019】本発明の画像信号圧縮方法により変換され
た符号データが入力されると、反復符号判別部12にて反
復符号であるか否かが逐次監視され、反復符号と判別さ
れると符号表15を検索せずに、前データ記憶部13に一時
記憶されているひとつ前に出力されたのと同じランレン
グスを採用する。一方、反復符号が検出されなければ従
来のように符号表15を検索して算出したランレングスを
採用する。よって、反復符号を検出したときは、符号表
15を参照することなく瞬時にしてランレングスが求めら
れ、復元時の高速化を図れる。
When the code data converted by the image signal compression method of the present invention is input, the iterative code discriminating unit 12 successively monitors whether or not it is an iterative code. The same run length that was temporarily stored in the previous data storage unit 13 and was output immediately before is adopted without searching 15. On the other hand, if the repetitive code is not detected, the run length calculated by searching the code table 15 as in the conventional case is adopted. Therefore, when the repetition code is detected, the code table
The run length is instantly required without referring to 15, and the restoration speed can be increased.

【0020】本発明に係る画像信号圧縮・復元方法は、
画像を走査して得られる白ドット,黒ドットからなる画
像信号に対して、白ドットが連続する回数及び黒ドット
が連続する回数を所定の規則に従って符号化することに
より、画像信号を圧縮すると共に、圧縮された符号を所
定の規則に従って元の画像信号に復元する画像信号圧縮
・復元方法において、圧縮時には、連続する白ドット,
黒ドット毎に、それが連続する回数がそれの前に連続し
た白ドット,黒ドットの回数と同じか否かを判断し、連
続する回数が同じである場合にはその回数を所定の符号
に符号化し、復元時には、圧縮された符号から白ドッ
ト,黒ドット毎に所定の符号を識別し、所定の符号を識
別した場合にはその前の白ドット,黒ドットが連続する
回数を用いて元の画像信号を復元することを特徴とす
る。
The image signal compression / decompression method according to the present invention is
White dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots continuously, compressed Then both image signals , An image signal compression / decompression method for decompressing a compressed code into an original image signal in accordance with a predetermined rule, at the time of compression, consecutive white dots,
For each black dot, determine whether the number of consecutive times is the same as the number of consecutive white dots and black dots before it, and if the number of consecutive times is the same, set the number of times to a predetermined code. At the time of encoding and decompression , a predetermined code is identified for each white dot and black dot from the compressed code, and when the predetermined code is identified, the number of consecutive white dots and black dots before that is used to determine the original The image signal of is restored.

【0021】本発明に係る画像信号圧縮・復元装置は、
画像を走査して得られる白ドット,黒ドットからなる画
像信号に対して、白ドットが連続する回数及び黒ドット
が連続する回数を所定の規則に従って符号化することに
より、画像信号を圧縮すると共に、圧縮された符号を所
定の規則に従って元の画像信号に復元する画像信号圧縮
・復元装置において、連続する白ドット,黒ドット毎
に、それが連続する回数がそれの前に連続した白ドッ
ト,黒ドットの回数と同じか否かを判断する手段と、連
続する回数が同じである場合にはその回数を所定の符号
に符号化する手段と、圧縮された符号から白ドット,黒
ドット毎に所定の符号を識別する手段と、所定の符号を
識別した場合にはその前の白ドット,黒ドットが連続す
る回数を用いて元の画像信号を復元する手段とを備える
ことを特徴とする。
An image signal compression / decompression device according to the present invention comprises:
White dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots continuously, compressed Then both image signals In an image signal compression / decompression device that restores a compressed code to an original image signal according to a predetermined rule, for each continuous white dot and black dot, the number of times that it is continuous is a continuous white dot before that, A means for determining whether or not the number of black dots is the same as the number of black dots, a means for encoding the number of times in a predetermined code when the number of consecutive times is the same, and a white code and a black dot for each compressed code. It is characterized by comprising means for identifying a predetermined code and means for restoring the original image signal by using the number of consecutive white dots and black dots preceding the predetermined code when the predetermined code is identified.

【0022】図3は、本発明の画像信号圧縮・復元装置
の原理構成図であり、図3(a)はその画像信号圧縮部
の構成を示し、図3(b)はその画像信号復元部の構成
を示している。なお、図3(a)に示す画像信号圧縮部
の構成は図1と、また、図3(b)に示す画像信号復元
部の構成は図2と同様であるので、同一部分には同一符
号を付してその説明は省略する。
FIG. 3 is a block diagram showing the principle of the image signal compression / decompression device of the present invention. FIG. 3 (a) shows the configuration of the image signal compression unit, and FIG. 3 (b) shows the image signal decompression unit. Shows the configuration of. Note that the configuration of the image signal compression unit shown in FIG. 3A is the same as that of FIG. 1 and the configuration of the image signal decompression unit shown in FIG. 3B is the same as that of FIG. Is attached and the description thereof is omitted.

【0023】本発明の画像信号圧縮・復元装置では、白
ドットまたは黒ドットにおいて同一のドット列が反復さ
れると、符号表を参照することなく符号化処理及び復元
処理を行えるので、圧縮率を向上できると共にそれぞれ
の処理の高速化を図れる。
In the image signal compression / decompression device of the present invention, when the same dot row is repeated in white dots or black dots, the encoding process and the decompression process can be performed without referring to the code table. It is possible to improve the processing speed and speed up each processing.

【0024】本発明に係るプリンタ装置は、印刷するた
めの画像信号のデータを圧縮符号の形態にて格納してお
く格納手段を有するプリンタ装置において、格納手段に
接続して上記本発明の画像信号圧縮・復元装置を備え、
この画像信号圧縮・復元装置にて得られた圧縮符号を格
納手段に格納すると共に、格納した圧縮符号をこの画像
信号圧縮・復元装置にて画像信号に復元するように構成
したことを特徴とする。
The printer device according to the present invention is a printer device having storage means for storing data of an image signal for printing in the form of a compression code, and is connected to the storage means to connect the image signal of the present invention. Equipped with a compression / decompression device,
The compression code obtained by the image signal compression / decompression device is stored in the storage means, and the stored compression code is decompressed into an image signal by the image signal compression / decompression device. .

【0025】図4は本発明のプリンタ装置の原理構成図
である。プリンタ装置は、画像信号圧縮部21と、保証用
メモリ22と、画像信号復元部23とを有する。なお、画像
信号圧縮部21, 画像信号復元部23はそれぞれ、図1,図
2に示す内部構成を有している。画像信号圧縮部21は、
プリンタ装置内で一時的に保存すべき画像信号を第1発
明で説明した手順で符号データに変換して保証用メモリ
22に出力する。保証用メモリ22は、画像信号圧縮部21か
ら出力されるその符号データを蓄積する。画像信号復元
部23は、保証用メモリ22から読み出された符号データを
第2発明で説明した手順で元の画像信号に変換する。
FIG. 4 is a block diagram showing the principle of the printer device of the present invention. The printer device includes an image signal compression unit 21, a guarantee memory 22, and an image signal decompression unit 23. The image signal compression unit 21 and the image signal decompression unit 23 have the internal configurations shown in FIGS. 1 and 2, respectively. The image signal compression unit 21
An image signal to be temporarily stored in the printer device is converted into code data by the procedure described in the first aspect of the invention, and a guarantee memory is provided.
Output to 22. The guarantee memory 22 stores the code data output from the image signal compression unit 21. The image signal restoration unit 23 converts the code data read from the guarantee memory 22 into the original image signal by the procedure described in the second invention.

【0026】第3発明のプリンタ装置では、高速,高圧
縮の画像信号圧縮・復元を行えるので、一時的に画像デ
ータを記憶する保証用メモリ22の容量を削減することが
可能となる。
Since the printer device of the third aspect of the present invention can perform high-speed and high-compression image signal compression / decompression, it is possible to reduce the capacity of the guarantee memory 22 for temporarily storing image data.

【0027】[0027]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面に基づいて具体的に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be specifically described below with reference to the drawings.

【0028】図5は、本発明のプリンタ装置の構成を示
すブロック図である。プリンタ装置はその内部に、ホス
ト装置44からのデータの入口である入力ポート31と、入
力データストリーム中のコマンドを解析するコマンド解
析部32と、外部からの指示を受け付ける操作パネル33
と、文字フォントを格納する文字フォントメモリ34と、
文字フォントメモリ34内の文字フォントを引用して描画
データを展開する描画展開処理部35と、描画データが展
開される展開用メモリ36と、展開された描画データを圧
縮する圧縮部37と、圧縮された符号データを記憶する保
証用メモリ38と、保証用メモリ38に記憶された圧縮符号
データを元の描画データに復元する復元部39と、復元さ
れた元の描画データが展開される展開用メモリ40と、ビ
デオ回路41と、プリント動作を制御するエンジン部42
と、描画データ,符号データの変換情報を格納する符号
表メモリ43とを有する。
FIG. 5 is a block diagram showing the configuration of the printer device of the present invention. The printer device internally has an input port 31 which is an entrance of data from a host device 44, a command analysis unit 32 which analyzes a command in an input data stream, and an operation panel 33 which receives an instruction from the outside.
And a character font memory 34 for storing character fonts,
A drawing expansion processing unit 35 that expands the drawing data by quoting the character font in the character font memory 34, an expansion memory 36 that expands the drawing data, a compression unit 37 that compresses the expanded drawing data, and a compression unit. A guarantee memory 38 for storing the restored encoded data, a restoring unit 39 for restoring the compressed encoded data stored in the guarantee memory 38 to the original drawing data, and a decompression for expanding the restored original drawing data. A memory 40, a video circuit 41, and an engine unit 42 that controls the printing operation.
And a code table memory 43 for storing drawing data and conversion information of code data.

【0029】ホスト装置44からのデータが、入力ポート
31を介してプリンタ装置に入力される。コマンド解析部
32では、データストリーム中のコマンドを解析し、操作
パネル33からの入力指示を解析する。描画展開処理部35
により、文字フォントメモリ34内の文字フォントを引用
しながら、展開用メモリ36に描画データを展開する。展
開されたデータは圧縮部37により、符号表メモリ43内の
符号表を参照して符号データに圧縮され、その圧縮符号
データは保証用メモリ38に蓄積される。保証用メモリ38
に蓄積された圧縮符号データは、復元部39によって符号
表メモリ43内の符号表に基づいて元の描画データに復元
され、その元の描画データが展開用メモリ40に展開され
る。復元されたデータはビデオ回路41によりエンジン部
42に転送され、その復元データに応じた画像が用紙に印
刷される。
Data from the host device 44 is input port
It is input to the printer device via 31. Command parser
At 32, the command in the data stream is analyzed and the input instruction from the operation panel 33 is analyzed. Drawing development processing unit 35
Thus, the drawing data is expanded in the expansion memory 36 while quoting the character font in the character font memory 34. The expanded data is compressed by the compression unit 37 into code data by referring to the code table in the code table memory 43, and the compressed code data is stored in the guarantee memory 38. Warranty memory 38
The compressed code data stored in (1) is restored to the original drawing data by the decompression unit 39 based on the code table in the code table memory 43, and the original drawing data is expanded in the expansion memory 40. The restored data is sent to the engine section by the video circuit 41.
The image corresponding to the restored data is printed on a sheet of paper.

【0030】以下、本発明の特徴部分である、図5に示
すプリンタ装置内の圧縮部37,復元部39の詳細について
説明する。図6は、図5の圧縮部37(本発明の画像信号
圧縮装置)の内部構成を示すブロック図、図7は、図5
の復元部39(本発明の画像信号復元装置)の内部構成を
示すブロック図である。また、本例では、図8に示すよ
うなターミネート符号及びメークアップ符号を用いたラ
ンレングス符号変換を行うものとする。
The details of the compression unit 37 and the decompression unit 39 in the printer device shown in FIG. 5, which are the features of the present invention, will be described below. 6 is a block diagram showing the internal configuration of the compression unit 37 (image signal compression apparatus of the present invention) of FIG. 5, and FIG.
3 is a block diagram showing an internal configuration of a restoration unit 39 (image signal restoration device of the present invention). FIG. In addition, in this example, it is assumed that run-length code conversion using the terminate code and make-up code as shown in FIG. 8 is performed.

【0031】図6において、51は、外部から(図5のプ
リンタ装置では展開用メモリ36から)入力される画像信
号の変化点を検出してランレングスを算出するランレン
グス算出部であり、算出した16ビットのランレングス
を、デマルチプレクサ53,XOR(排他的論理和)回路
57及び符号変換部58に出力する。なお、ランレングス算
出部51におけるランレングス算出方法は、1ビットずつ
計数する方法、パラレルに算出する方法など、任意の方
法を採用して良い。また、52は色情報レジスタであり、
色情報レジスタ52は、ランレングス算出部51で算出対象
となっているn番目のランレングスの色情報(白ドット
か黒ドットか)を保持し、ランレングス算出部51で変化
点を検出するごとに保持すべき色情報を白/黒に切り替
える。走査時の各行の最初の色情報は白とし、その後、
変化点が検出されるタイミングでその色情報が黒,白,
黒,白,…に反転される。色情報レジスタ52は保持した
色情報を、前記デマルチプレクサ53及び後述するマルチ
プレクサ56に出力する。
In FIG. 6, reference numeral 51 denotes a run-length calculating section for calculating a run-length by detecting a change point of an image signal input from the outside (from the developing memory 36 in the printer apparatus of FIG. 5). Demultiplexer 53, XOR (exclusive OR) circuit
57 and the code conversion unit 58. As the run length calculating method in the run length calculating unit 51, any method such as a method of counting bit by bit or a method of calculating in parallel may be adopted. 52 is a color information register,
The color information register 52 holds color information (whether white dots or black dots) of the n-th run length that is the calculation target in the run length calculation unit 51, and every time the run length calculation unit 51 detects a change point. The color information that should be held in is switched to white / black. The first color information of each line when scanning is white, then
When the change point is detected, the color information is black, white,
Inverted to black, white, .... The color information register 52 outputs the held color information to the demultiplexer 53 and a multiplexer 56 described later.

【0032】デマルチプレクサ53には、ランレングス算
出部51での算出対象より1つ前のつまり(n−1)番目
の白ランレングスを保持する白ランレングス用レジスタ
54と、同じく(n−1)番目の黒ランレングスを保持す
る黒ランレングス用レジスタ55との入力側が接続されて
いる。両レジスタ54,55は、16ビットで構成され、0〜
65534 までのランレングスを一時的に記憶できる。ま
た、両レジスタ54,55の出力側にはマルチプレクサ56が
接続されている。そして、色情報レジスタ52からの色情
報により、デマルチプレクサ53及びマルチプレクサ56の
接続が切り替わる。具体的には、ランレングス算出部51
で白ドット列が算出対象である場合には、色情報レジス
タ52からデマルチプレクサ53及びマルチプレクサ56に白
情報が出力され、デマルチプレクサ53及びマルチプレク
サ56が白ランレングス用レジスタ54側に切り替えられ
る。一方、黒ドット列が算出対象である場合には、黒情
報が出力され、デマルチプレクサ53及びマルチプレクサ
56が黒ランレングス用レジスタ55側に切り替えられる。
このような動作処理において、ランレングス算出部51か
らの白ドット列のランレングス,黒ドット列のランレン
グスが交互に1つずつ、両レジスタ54,55に交互に保持
された後、XOR回路57に出力される。なお、これらの
デマルチプレクサ53,白ランレングス用レジスタ54,黒
ランレングス用レジスタ55及びマルチプレクサ56にて、
図1の前データ記憶部2を構成する。
The demultiplexer 53 has a white run length register for holding the white run length which is one before the target to be calculated by the run length calculation unit 51, that is, the (n-1) th white run length.
54 and a black run length register 55 that holds the (n-1) th black run length are connected to the input side. Both registers 54 and 55 are composed of 16 bits,
Can temporarily store run lengths up to 65534. A multiplexer 56 is connected to the output side of both registers 54 and 55. Then, the color information from the color information register 52 switches the connection between the demultiplexer 53 and the multiplexer 56. Specifically, the run length calculation unit 51
When the white dot row is to be calculated, white information is output from the color information register 52 to the demultiplexer 53 and the multiplexer 56, and the demultiplexer 53 and the multiplexer 56 are switched to the white run length register 54 side. On the other hand, when the black dot row is the calculation target, black information is output, and the demultiplexer 53 and the multiplexer
56 is switched to the black run length register 55 side.
In such an operation process, the run lengths of the white dot rows and the run lengths of the black dot rows from the run length calculating section 51 are alternately held in the registers 54 and 55, respectively, and then the XOR circuit 57. Is output to. The demultiplexer 53, the white run length register 54, the black run length register 55, and the multiplexer 56
The pre-data storage unit 2 of FIG. 1 is configured.

【0033】図1の比較部3に相当するXOR回路57
は、白ドット列,黒ドット列毎に、ランレングス算出部
51からの現在のn番目のランレングスと、マルチプレク
サ56からの1つ前の(n−1)番目のランレングスと
を、1ビットずつ比較する。そして、すべてのビットで
一致した場合には、一致信号をスイッチ62, 63に出力す
る。
An XOR circuit 57 corresponding to the comparison unit 3 in FIG.
Is the run length calculation unit for each white dot row and black dot row.
The current n-th run length from 51 and the immediately preceding (n-1) -th run length from the multiplexer 56 are compared bit by bit. When all the bits match, a match signal is output to the switches 62 and 63.

【0034】符号変換部58は、XOR回路57で不一致と
なったランレングスに対して符号変換を行う。符号変換
部58は、図1の符号表6に相当する符号ROM60及び符
号長ROM61を検索して、読み出した符号をスイッチ62
の一方の入力端子に、読み出した符号長をスイッチ63の
一方の入力端子にそれぞれ出力する。可変長の符号を16
ビット毎に整列させた符号ROM60と、同じアドレスに
配置された符号長を格納している符号長ROM61とに
て、図1の符号表6を構成する。なお、両ROM60,61
の読み出しにはランレングスをアドレス信号として使用
している。図8の符号表を採用する本例では、ランレン
グスが63までの場合にはターミネート符号のみで変換可
能であるが、ランレングスが63を超える場合にはメーク
アップ符号に分割して複数の符号に変換しなければなら
ない。
The code conversion unit 58 performs code conversion on the run lengths that are not matched by the XOR circuit 57. The code conversion unit 58 searches the code ROM 60 and the code length ROM 61 corresponding to the code table 6 of FIG.
The read code length is output to one input terminal of the switch 63, respectively. Variable length code 16
The code table 60 of FIG. 1 is configured by the code ROM 60 aligned for each bit and the code length ROM 61 storing the code lengths arranged at the same address. Both ROMs 60 and 61
The run length is used as an address signal for reading. In this example using the code table of FIG. 8, when the run length is up to 63, conversion can be performed only by the termination code, but when the run length exceeds 63, it is divided into a plurality of makeup codes. Must be converted to.

【0035】一方、反復符号変換部59は、所定の反復符
号、例えば’11’をスイッチ62の他方の入力端子に出
力すると共に、符号長=2をスイッチ63の他方の入力端
子に出力する。
On the other hand, the iterative code conversion section 59 outputs a predetermined iterative code, for example, '11' to the other input terminal of the switch 62 and outputs code length = 2 to the other input terminal of the switch 63.

【0036】スイッチ62は、XOR回路57から一致信号
が入力されない場合に一方の入力端子、つまり符号RO
M60から読み出した符号を選択し、XOR回路57から一
致信号が入力される場合に他方の入力端子、つまり反復
符号変換部59から出力される所定の反復符号を選択し、
選択した符号をパラレル/シリアル(P/S)変換器65
に出力する。また、スイッチ63は、XOR回路57から一
致信号が入力されない場合に一方の入力端子、つまり符
号長ROM61から読み出した符号長を選択し、XOR回
路57から一致信号が入力される場合に他方の入力端子、
つまり反復符号変換部59から出力される所定の符号長を
選択し、選択した符号長をカウンタ64に出力する。
The switch 62 is one of the input terminals when the coincidence signal is not input from the XOR circuit 57, that is, the symbol RO.
The code read from M60 is selected, and when the coincidence signal is input from the XOR circuit 57, the other input terminal, that is, the predetermined repetition code output from the repetition code conversion unit 59 is selected,
Parallel / serial (P / S) converter 65 for selected code
Output to. The switch 63 selects one input terminal, that is, the code length read from the code length ROM 61 when the match signal is not input from the XOR circuit 57, and the other input when the match signal is input from the XOR circuit 57. Terminal,
That is, a predetermined code length output from the iterative code conversion unit 59 is selected, and the selected code length is output to the counter 64.

【0037】P/S変換器65には、符号ROM60から読
み出された可変長符号または反復符号変換部59からの所
定の反復符号(’11’)が入力される。そして、これ
らの可変長符号または反復符号はパラレル/シリアル変
換された後に符号長分だけビットデータが出力される。
この際カウンタ64は、、P/S変換器65から出力される
ビット数を、符号長ROM61から読み出された符号長ま
たは反復符号変換部59からの所定の符号長(=2)分だ
け計数する。以上のようにして、圧縮されたシリアル符
号列が外部に(図5のプリンタ装置では保証用メモリ38
に)出力される。
The variable length code read from the code ROM 60 or the predetermined repeat code ('11') from the repeat code converter 59 is input to the P / S converter 65. Then, these variable length codes or repetitive codes are parallel / serial converted, and then bit data corresponding to the code length is output.
At this time, the counter 64 counts the number of bits output from the P / S converter 65 by the code length read from the code length ROM 61 or the predetermined code length (= 2) from the iterative code conversion unit 59. To do. As described above, the compressed serial code string is output to the outside (in the printer device of FIG.
Output).

【0038】また、図7において、71は色情報レジスタ
であり、色情報レジスタ71は、復元対象となっているラ
ンレングスの色情報(白ドットか黒ドットか)を保持
し、1つのランレングスが復元されるごとに保持すべき
色情報を白黒反転する。行の最初を表す同期信号などの
信号が入力されて色情報を白に設定し、その後ランレン
グスが復元されるごとに黒,白,黒,白,…の順に色情
報が反転される。そして、色情報レジスタ71は保持した
色情報を、後述するデマルチプレクサ76,マルチプレク
サ79及びDフリップフロップ(D−FF)83に出力す
る。
Further, in FIG. 7, 71 is a color information register, and the color information register 71 holds color information (whether white dots or black dots) of the run length to be restored and stores one run length. Each time the color information is restored, the color information to be held is inverted in black and white. A signal such as a synchronization signal indicating the beginning of a row is input to set the color information to white, and then the color information is inverted in the order of black, white, black, white, ... Every time the run length is restored. Then, the color information register 71 outputs the held color information to a demultiplexer 76, a multiplexer 79 and a D flip-flop (D-FF) 83 which will be described later.

【0039】先読みレジスタ74, ビット判別器72が、シ
リアル符号列の入力側からこの順に直列に配置されてお
り、外部からの(図5のプリンタ装置では保証用メモリ
38からの)シリアル符号列が1ビットずつビット判別器
72,先読みレジスタ74の順に入力される。ビット判別器
72,先読みレジスタ74に格納されたデータ値(’0’ま
たは’1’)は、AND回路からなる一致判別回路75に
出力される。そして、両データ値のANDが求められ、
その出力値が1である場合に、一致信号をスイッチ81に
出力する。ここで、反復符号は’11’であるので、符
号長が2でその両ビットの’1’がビット判別器72及び
先読みレジスタ74に格納された場合に、そのANDを求
めることにより、一致判別回路75にて反復符号を検出す
ることができる。また、ビット判別器72は、判別した符
号ビット列をアドレス制御部73に出力する。アドレス制
御部73は、符号ビット列に基づいて符号ROM80から対
応するランレングスを検索し、検索したランレングスを
スイッチ81の一方の入力端子及びデマルチプレクサ76に
出力する。
The read-ahead register 74 and the bit discriminator 72 are arranged in series in this order from the input side of the serial code string, and are arranged from the outside (in the printer device of FIG. 5, a guarantee memory is used).
Bit discriminator for each bit of serial code string (from 38)
72 and the prefetch register 74 are input in this order. Bit discriminator
72, the data value ('0' or '1') stored in the prefetch register 74 is output to the match determination circuit 75 including an AND circuit. Then, the AND of both data values is obtained,
When the output value is 1, the coincidence signal is output to the switch 81. Here, since the repetitive code is "11", when the code length is 2 and both bits "1" are stored in the bit discriminator 72 and the look-ahead register 74, the AND is obtained to determine the match. The repetition code can be detected in the circuit 75. Further, the bit discriminator 72 outputs the discriminated sign bit string to the address control unit 73. The address control unit 73 retrieves the corresponding run length from the code ROM 80 based on the code bit string, and outputs the retrieved run length to one input terminal of the switch 81 and the demultiplexer 76.

【0040】なお、前記ビット判別器72とアドレス制御
部73とにて図2の符号復元部11が構成され、前記先読み
レジスタ74と一致判別回路75とにて図2の反復符号判別
部12が構成されている。また、符号ROM80は、図2の
符号表15に相当する。
The bit discriminator 72 and the address controller 73 constitute the code restoration unit 11 of FIG. 2, and the prefetch register 74 and the coincidence discriminating circuit 75 constitute the repetitive code discriminator 12 of FIG. It is configured. The code ROM 80 corresponds to the code table 15 in FIG.

【0041】デマルチプレクサ76には、復元対象より1
つ前の白ランレングスを保持する白ランレングス用レジ
スタ77と、同じく1つ前の黒ランレングスを保持する黒
ランレングス用レジスタ78との入力側が接続されてい
る。両レジスタ77,78の構成は、圧縮側の両レジスタ5
4,55の構成と同じである。両レジスタ77,78の出力側
にはマルチプレクサ79が接続されている。そして、色情
報レジスタ71からの色情報により、デマルチプレクサ76
及びマルチプレクサ79の接続が切り替わる。具体的に
は、白ドット列が復元対象である場合には、色情報レジ
スタ71からデマルチプレクサ76及びマルチプレクサ79に
白情報が出力され、デマルチプレクサ76及びマルチプレ
クサ79が白ランレングス用レジスタ77側に切り替えられ
る。一方、黒ドット列が復元対象である場合には、黒情
報が出力され、デマルチプレクサ76及びマルチプレクサ
79が黒ランレングス用レジスタ78側に切り替えられる。
このような動作処理において、符号ROM80から読み出
された白ドット列のランレングス,黒ドット列のランレ
ングスが交互に1つずつ、両レジスタ77,78に交互に保
持された後、スイッチ81の他方の入力端子に出力され
る。なお、これらのデマルチプレクサ76,白ランレング
ス用レジスタ77,黒ランレングス用レジスタ78及びマル
チプレクサ79にて、図2の前データ記憶部13を構成す
る。
The demultiplexer 76 has 1
The input side of a white run length register 77 that holds the previous white run length and a black run length register 78 that also holds the previous black run length are connected. Both registers 77 and 78 consist of both registers 5 on the compression side.
It is the same as the configuration of 4, 55. A multiplexer 79 is connected to the output side of both registers 77 and 78. Then, according to the color information from the color information register 71, the demultiplexer 76
And the connection of the multiplexer 79 is switched. Specifically, when the white dot row is the restoration target, white information is output from the color information register 71 to the demultiplexer 76 and the multiplexer 79, and the demultiplexer 76 and the multiplexer 79 are placed on the white run length register 77 side. Can be switched. On the other hand, when the black dot row is to be restored, black information is output and the demultiplexer 76 and the multiplexer are output.
79 is switched to the black run length register 78 side.
In such operation processing, one run length of the white dot row and one run length of the black dot row read from the code ROM 80 are alternately held in both registers 77 and 78, and then the switch 81 It is output to the other input terminal. The demultiplexer 76, the white run length register 77, the black run length register 78, and the multiplexer 79 constitute the previous data storage unit 13 of FIG.

【0042】スイッチ81は、一致判別回路75から一致信
号が入力されない場合に一方の入力端子、つまり符号R
OM80から読み出したランレングスを選択し、一致判別
回路75から一致信号が入力される場合に他方の入力端
子、つまりマルチプレクサ79から出力されるランレング
スを選択し、選択したランレングスをカウンタ82にロー
ドする。カウンタ82は、入力されたランレングスと同数
のクロックを発生してD−FF83に出力する。D−FF
83は、色情報レジスタ71からの色情報に従って、白ドッ
トまたは黒ドットをカウンタ82からのクロック数と同数
だけ出力する。以上のようにして、元の画像信号が外部
に(図5のプリンタ装置では展開用メモリ40に)出力さ
れる。
The switch 81 is provided with one input terminal, that is, a symbol R, when a match signal is not input from the match determining circuit 75.
The run length read from the OM 80 is selected, and when the match signal is input from the match determination circuit 75, the other input terminal, that is, the run length output from the multiplexer 79 is selected, and the selected run length is loaded into the counter 82. To do. The counter 82 generates the same number of clocks as the input run length and outputs it to the D-FF 83. D-FF
The 83 outputs white dots or black dots in the same number as the number of clocks from the counter 82 according to the color information from the color information register 71. As described above, the original image signal is output to the outside (to the expansion memory 40 in the printer device of FIG. 5).

【0043】次に、動作について説明する。図9は圧縮
処理の手順を示すフローチャートである。なお、図9に
あってRLはランレングスを示す。まず、ランレングス
算出部51にて、所定の手法によりランレングスを求める
(ステップS1)。求めたランレングスが白ドットか黒
ドットかを示す色情報を反転する(ステップS2)。そ
の色情報が白であるか黒であるかを判別し(ステップS
3)、白である場合には白ランレングス用レジスタ54に
保持されている1つ前の白ランレングスをマルチプレク
サ56を介してXOR回路57に出力する(ステップS
4)。一方、黒である場合には黒ランレングス用レジス
タ55に保持されている1つ前の黒ランレングスをマルチ
プレクサ56を介してXOR回路57に出力する(ステップ
S5)。
Next, the operation will be described. FIG. 9 is a flowchart showing the procedure of compression processing. In FIG. 9, RL indicates run length. First, the run length calculation unit 51 obtains the run length by a predetermined method (step S1). Color information indicating whether the obtained run length is a white dot or a black dot is inverted (step S2). It is determined whether the color information is white or black (step S
3) If it is white, the previous white run length held in the white run length register 54 is output to the XOR circuit 57 via the multiplexer 56 (step S).
4). On the other hand, if it is black, the previous black run length held in the black run length register 55 is output to the XOR circuit 57 via the multiplexer 56 (step S5).

【0044】XOR回路57にて、求められた現在の白
(または黒)ランレングスがマルチプレクサ56からの1
つ前の白(または黒)ランレングスと同一か否かを判断
し(ステップS6)。同一でない場合には、色情報を判
別する(ステップS7)。そして、色情報が白である場
合には白ランレングス用レジスタ54にその求められた白
ランレングスを保持し(ステップS8)、一方、黒であ
る場合には黒ランレングス用レジスタ55にその求められ
た黒ランレングスを保持する(ステップS9)。
In the XOR circuit 57, the current white (or black) run length obtained is 1 from the multiplexer 56.
It is determined whether or not it is the same as the previous white (or black) run length (step S6). If they are not the same, the color information is determined (step S7). When the color information is white, the white run length register 54 holds the obtained white run length (step S8). On the other hand, when the color information is black, the black run length register 55 obtains the white run length. The black run length thus obtained is held (step S9).

【0045】次いで、符号変換部58にて、そのランレン
グスに応じて 符号ROM60及び符号長ROM61を参照
して、符号及び符号長を検索し、符号はスイッチ62を介
してP/S変換器65にロードされ、符号長はスイッチ63
を介してカウンタ64に出力される(ステップS10)。こ
の場合、ランレングスの大きさによって、図8の符号表
の例では、ターミネート符号のみ(ランレングスが63以
下の場合)、1つのメークアップ符号+ターミネート符
号(ランレングスが64以上2560以下の場合)、複数のメ
ークアップ符号+ターミネート符号(ランレングスが25
60を超える場合)の3種類に、符号の変換パターンは大
別される。
Next, in the code conversion unit 58, the code and the code length are searched by referring to the code ROM 60 and the code length ROM 61 according to the run length, and the code is converted to the P / S converter 65 via the switch 62. Loaded with the code length switch 63
Is output to the counter 64 via (step S10). In this case, depending on the size of the run length, in the example of the code table of FIG. 8, only the termination code (when the run length is 63 or less), one makeup code + the termination code (when the run length is 64 or more and 2560 or less) ), Multiple make-up codes + terminate code (25 run lengths)
The code conversion patterns are roughly classified into three types (when the number exceeds 60).

【0046】検索された符号は、P/S変換器65にてパ
ラレル/シリアル変換された後に1ビットずつカウンタ
64のクロックにより順に出力される(ステップS11)。
データが1ビットずつ出力されるごとにカウンタ64の値
が1ずつデクリメントされ(ステップS12)、その値が
0になるまで続けられる(ステップS13)。このような
処理は、メークアップ符号を含む場合にはメークアップ
符号, ターミネート符号の順に行われ、ターミネート符
号の出力が終わると(ステップS14)、そのランレング
スに対する処理は終了する。
The retrieved code is subjected to parallel / serial conversion by the P / S converter 65 and then countered bit by bit.
The signals are sequentially output by 64 clocks (step S11).
Each time data is output bit by bit, the value of the counter 64 is decremented by 1 (step S12) and the operation is continued until the value becomes 0 (step S13). Such processing is performed in the order of the makeup code and the termination code when the makeup code is included. When the output of the termination code is finished (step S14), the processing for the run length is finished.

【0047】一方、ステップS6にて、求められた現在
の白(または黒)ランレングスがマルチプレクサ56から
の1つ前の白(または黒)ランレングスと同一である場
合には、XOR回路57から一致信号がスイッチ62, 63に
入力され、反復符号変換部59からの所定の反復符号(’
11’),符号長(=2)がそれぞれP/S変換器65,
カウンタ64に出力される(ステップS15)。その反復符
号は、P/S変換器65にてパラレル/シリアル変換され
た後に1ビットずつカウンタ64のクロックにより順に出
力される(ステップS16)。データが1ビットずつ出力
されるごとにカウンタ64の値が1ずつデクリメントされ
(ステップS17)、その値が0になるまで続けられ(ス
テップS18)、0になると反復したランレングスに対す
る処理は終了する。
On the other hand, in step S6, if the present white (or black) run length found is the same as the previous white (or black) run length from the multiplexer 56, the XOR circuit 57 The coincidence signal is input to the switches 62 and 63, and the predetermined repetition code ('
11 ') and the code length (= 2) are P / S converters 65,
It is output to the counter 64 (step S15). The repetitive code is parallel / serial converted by the P / S converter 65, and then sequentially output bit by bit by the clock of the counter 64 (step S16). Each time data is output bit by bit, the value of the counter 64 is decremented by 1 (step S17), and is continued until the value becomes 0 (step S18). When it becomes 0, the process for the repeated run length ends. .

【0048】なお、上述の例では、1つ前のランレング
スと異なる場合にのみ、算出したランレングスをレジス
タ54または55に保持させるようにしているが、算出した
ランレングスを、1つ前のランレングスとの一致または
不一致には関係なく、常に、レジスタ54または55に保持
するようにしてもよい。この場合、図9のステップS4
において、白ランレングス用レジスタ54に現在の白ラン
レングスを保持すると共に既に保持されている1つ前の
白ランレングスをマルチプレクサ56を介してXOR回路
57に出力し、ステップS5において、黒ランレングス用
レジスタ55に現在の黒ランレングスを保持すると共に既
に保持されている1つ前の黒ランレングスをマルチプレ
クサ56を介してXOR回路57に出力するとすれば、後段
のステップS7〜S9は不要である。
In the above example, the calculated run length is held in the register 54 or 55 only when the run length is different from the previous run length. However, the calculated run length is set to the previous run length. Regardless of whether the run length matches or does not match, the register may always be held in the register 54 or 55. In this case, step S4 of FIG.
, The current white run length is held in the white run length register 54, and the previous white run length already held is passed through the multiplexer 56 to the XOR circuit.
57 to the XOR circuit 57 via the multiplexer 56 while holding the current black run length in the black run length register 55 and holding the previous black run length already held in step S5. For example, the subsequent steps S7 to S9 are unnecessary.

【0049】以上のように、通常の圧縮処理時には、入
力されるランレングスに基づいて符号ROM60を参照し
てターミネート符号,メークアップ符号に変換し、その
符号をP/S変換器65にロードすると共に、符号長RO
M61を参照して符号長をカウンタ64にロードするが、も
し入力したランレングスが1つ前のランレングスと一致
すれば、P/S変換器65には直接反復符号’11’をロ
ードし、同時にカウンタ64に符号長=2をロードするの
で、白ドットまたは黒ドットが反復する場合に、ROM
を検索する必要がなく、より短い符号に変換できる。
As described above, at the time of normal compression processing, the code ROM 60 is referred to based on the input run length to convert it into a terminate code or a make-up code, and the code is loaded into the P / S converter 65. Together with the code length RO
The code length is loaded into the counter 64 by referring to M61, but if the input run length matches the previous run length, the P / S converter 65 is directly loaded with the repetition code '11', At the same time, the code length = 2 is loaded into the counter 64, so if white dots or black dots are repeated, ROM
Can be converted to a shorter code without having to search for.

【0050】次に、復元処理の動作について、その手順
を示す図10のフローチャートを参照して説明する。な
お、図10にあってRLはランレングスを示す。まず、復
元対象となっているランレングスの色情報が、反転され
る(ステップS21)。シリアルの符号列のデータが1ビ
ットずつビット判別器72, 先読みレジスタ74の順に取り
込まれる(ステップS22,23)。ビット判別器72及び先
読みレジスタ74の格納値が何れも’1’であるか否かを
一致判別回路75で判断する(ステップS24)。何れも’
1’である場合には反復符号(’11’)であり、何れ
かが’1’でない場合には通常の変換符号である。
Next, the operation of the restoration process will be described with reference to the flowchart of FIG. 10 showing the procedure. In FIG. 10, RL indicates run length. First, the color information of the run length to be restored is inverted (step S21). The data of the serial code string is fetched bit by bit in the order of the bit discriminator 72 and the prefetch register 74 (steps S22 and S23). The coincidence determination circuit 75 determines whether or not the values stored in the bit discriminator 72 and the prefetch register 74 are both "1" (step S24). Both '
When it is 1 ', it is an iterative code (' 11 '), and when either is not' 1 ', it is a normal conversion code.

【0051】通常の変換符号であることを検出した場合
には、符号の認識を行えるまで(ステップS25)、シリ
アルの符号列のデータを1ビットずつビット判別器72,
先読みレジスタ74に順次取り込んでいく(ステップS2
6,27)。符号を認識すると(ステップS25)、その認
識した符号に応じて符号ROM80から対応するランレン
グスを検索し、検索したランレングスをスイッチ81の一
方の入力端子及びデマルチプレクサ76に出力する(ステ
ップS28)。
When it is detected that the code is a normal conversion code, the bit discriminator 72, 1 bit at a time, of the data of the serial code string until the code can be recognized (step S25).
It is sequentially loaded into the prefetch register 74 (step S2
6, 27). When the code is recognized (step S25), the corresponding run length is searched from the code ROM 80 according to the recognized code, and the searched run length is output to one input terminal of the switch 81 and the demultiplexer 76 (step S28). .

【0052】色情報が白であるか黒であるかを判別し
(ステップS29)、白である場合には白ランレングス用
レジスタ77にその白ランレングスを保持し(ステップS
30)、黒である場合には黒ランレングス用レジスタ78に
その黒ランレングスを保持する(ステップS31)。
It is determined whether the color information is white or black (step S29). If the color information is white, the white run length is held in the white run length register 77 (step S29).
30) If black, the black run length is held in the black run length register 78 (step S31).

【0053】一方、ステップS24において変換符号であ
ることを検出した場合には、色情報を判別し(ステップ
S32)、白であるときには白ランレングス用レジスタ77
に保持されている白ランレングスをスイッチ81の他方の
入力端子に出力し(ステップS33)、黒であるときには
黒ランレングス用レジスタ78に保持されている黒ランレ
ングスをスイッチ81の他方の入力端子に出力する(ステ
ップS34)。
On the other hand, if it is detected in step S24 that it is a conversion code, the color information is discriminated (step S32), and if it is white, the white run length register 77.
To the other input terminal of the switch 81 (step S33). When it is black, the black run length held in the black run length register 78 is output to the other input terminal of the switch 81. (Step S34).

【0054】スイッチ81は、通常の変換符号である場合
に一方の入力端子のランレングスを選択し、反復符号で
ある場合に他方の入力端子のランレングスを選択する。
そして、色情報を判別する(ステップS35)。白である
場合には、’0’が1ビットずつD−FF83から出力さ
れる(ステップS36)。1ビットの’0’が出力される
毎にカウンタ82の値が1ずつデクリメントされ(ステッ
プS37)、その値が0になるまで’0’の出力が継続さ
れる(ステップS38)。一方、黒である場合には、’
1’が1ビットずつD−F.F.83から出力される(ステッ
プS39)。1ビットの’1’が出力される毎にカウンタ
82の値が1ずつデクリメントされ(ステップS40)、そ
の値が0になるまで’1’の出力が継続される(ステッ
プS41)。
The switch 81 selects the run length of one input terminal when it is a normal conversion code, and selects the run length of the other input terminal when it is a repetition code.
Then, the color information is determined (step S35). If it is white, "0" is output from the D-FF 83 bit by bit (step S36). Every time 1-bit '0' is output, the value of the counter 82 is decremented by 1 (step S37), and the output of '0' is continued until the value becomes 0 (step S38). On the other hand, if it is black, '
1'is output from the D-FF 83 bit by bit (step S39). Counter every time 1-bit '1' is output
The value of 82 is decremented by 1 (step S40), and the output of "1" is continued until the value becomes 0 (step S41).

【0055】以上のように、通常の復元処理時には、シ
リアルに入力される符号に応じて例えばツリーサーチ法
により順次符号ROM80を検索していき、ランレングス
に到達するとその値をカウンタ82にロードして色情報で
指定されるドットをカウンタ82をデクリメントしながら
出力していき、反復符号を検出したときには、符号RO
M80を検索せずに前に記憶しているランレングスを出力
するので、反復するランレングスが入力された場合、そ
のランレングスは1クロックで符号変換ができ、復元時
においても1クロックでランレングスに復号が可能とな
る。
As described above, at the time of normal restoration processing, the code ROM 80 is sequentially searched by, for example, the tree search method according to the code input serially, and when the run length is reached, the value is loaded into the counter 82. The dot specified by the color information is output while the counter 82 is decremented, and when the repetition code is detected, the code RO
Since the previously stored run length is output without searching M80, when a repetitive run length is input, the run length can be code-converted in 1 clock and the run length can also be restored in 1 clock at the time of restoration. Can be decrypted.

【0056】次に、上述したような本発明の圧縮・復元
処理の効果について説明する。図11は本発明の効果の程
度を説明するためのランレングス分析結果を示す図であ
る。2種類の漢字,かな混じりの文書に対して、文字水
平方向に走査したときのランレングスを求めると図11の
ような結果が得られた。この結果は、24×24ドットのフ
ォントで構成される138 文字上を24ライン分走査したと
きの各々の符号の出現回数を示している。この結果によ
ると白ランレングスの反復率は文書(1) で 264/(5377
÷2),文書(2) で1124/(19824÷2)と何れも1割程
度であるが、黒ランレングスでは文書(1) で1579/(53
77÷2),文書(2) で4356/(14344÷2)と何れも5割
程度の確率がある。
Next, the effect of the compression / decompression processing of the present invention as described above will be described. FIG. 11 is a diagram showing a run length analysis result for explaining the degree of the effect of the present invention. For a document containing two types of kanji and kana, the run length obtained when scanning in the horizontal direction of the character was obtained, and the results shown in Fig. 11 were obtained. This result shows the number of appearances of each code when 24 lines were scanned over 138 characters composed of a 24 × 24 dot font. According to this result, the repetition rate of white run length is 264 / (5377 in Document (1).
÷ 2) and 1124 / (19824 ÷ 2) for document (2), which is about 10% in both cases, but for black run length, it is 1579 / (53 for document (1).
77/2) and document (2) 4356 / (14344/2), both of which have a probability of about 50%.

【0057】これは、日本語文字フォントでは縦棒また
は横棒のドット幅が各々ほぼ一定に設定してあるためと
考えられ、日本語フォントのみならずアルファベットフ
ォント,数字フォントにおいても同じ傾向があると予想
される。また、比較的データ圧縮が困難とされる図形内
網かけ,斜線ぬりつぶしなどの反復性があるデータにつ
いては特に本発明の圧縮処理が有効である。このような
反復性の傾向はプリンタ装置のようにフォントをもとに
データが展開される場合に特に顕著に現れるので、本発
明による画像信号圧縮・復元方式は、プリンタ装置にお
ける利用が最適である。
This is considered to be because the dot widths of the vertical bars and the horizontal bars are set to be almost constant in the Japanese character font, and the same tendency is observed not only in the Japanese font but also in the alphabet font and the number font. It is expected to be. In addition, the compression processing of the present invention is particularly effective for data having repetitiveness such as shading in a figure and shaded lines, which are relatively difficult to compress. Since such a tendency of repetitiveness is particularly remarkable when the data is expanded based on the font like the printer device, the image signal compression / decompression method according to the present invention is optimally used in the printer device. .

【0058】本発明では、同じランレングスが続いて出
現したときに圧縮処理・復元処理の何れの場合において
も符号表を参照することが不要となると同時に、反復符
号の長さを短く設定しておけば符号表による符号よりも
圧縮率が向上する。特に、従来MH符号で2560画素を超
えるランレングスに対しては、1または複数のメークア
ップ符号+ターミネート符号という形で表現していた
が、本発明では1つの反復符号に変換できるので、圧縮
率の格段の向上を期待できる。
According to the present invention, it is not necessary to refer to the code table in any case of compression processing and decompression processing when the same run length appears subsequently, and at the same time, the length of the repetition code is set to be short. The compression rate is improved as compared with the code based on the code table. In particular, a run length exceeding 2560 pixels in the MH code is conventionally expressed in the form of one or a plurality of make-up codes + terminator code, but in the present invention, it can be converted into one repetitive code. Can be expected to improve significantly.

【0059】次に、本発明の具体例について説明する。
図12は符号変換例を示す図である。図12(a)は一般的
な通常ラインの場合を、図12(b)は全てが白ラインで
ある場合を示しており、それぞれについて従来のMH符
号化方式のみの符号変換例と本発明での符号変換例とを
表している。
Next, a specific example of the present invention will be described.
FIG. 12 is a diagram showing an example of code conversion. FIG. 12 (a) shows a case of a general normal line, and FIG. 12 (b) shows a case of all white lines. In each case, a code conversion example using only the conventional MH coding method and the present invention are shown. And an example of code conversion of.

【0060】図12(a)に示す通常ライン(白ランレン
グス:10,黒ランレングス:2,白ランレングス:8,
黒ランレングス:4,白ランレングス:8,,黒ランレ
ングス:4,白ランレングス:12の並び)の場合では、
白ランレングスの2番目と3番目、黒ランレングスの2
番目と3番目とに反復性が見られる。MH符号化方式の
みの場合には圧縮する際に37ビットが必要であるが、本
発明では31ビットにて圧縮できることになる。また、復
号時に要する時間も37クロックから29クロックに短縮さ
れることになる。
Normal lines shown in FIG. 12A (white run length: 10, black run length: 2, white run length: 8,
In the case of black run length: 4, white run length: 8, black run length: 4, white run length: 12),
2nd and 3rd white run lengths, 2 black run lengths
Repeatability is seen in the third and third. In the case of only the MH coding system, 37 bits are required for compression, but in the present invention, 31 bits can be used for compression. Also, the time required for decoding will be reduced from 37 clocks to 29 clocks.

【0061】また、図12(b)に示す全白ライン(3行
のすべての画素が白)の場合には、複数ラインにわたっ
て反復性が見られる。始めの1行目の全白ラインはEO
L(End Of Line)を含め47ビットを要するが、全白ライ
ンが続けば2行目からはEOLを含め1ライン分を14ビ
ットで圧縮できるようになる。
In the case of the all-white line shown in FIG. 12B (all pixels in three rows are white), repetitiveness is observed over a plurality of lines. The first white line is EO
It requires 47 bits including L (End Of Line), but if all white lines continue, one line including EOL can be compressed with 14 bits from the second line.

【0062】なお、上述の例では、MH符号表の黒ラン
レングス表のみを使用して反復符号を’11’に割り当
てたが、反復符号の出現率を各ランレングスの出現率に
組み込ませてハフマン符号法に基づく符号表を作成する
と、高圧縮,高速処理といった本発明の効果を更に期待
できる。また、符号化手順,復号化手順においても、上
記実施例ではシフトレジスタを用いてシリアルに制御し
ているがパラレルに制御することが最善策であることは
言うまでもない。また、処理速度を期待しないのであれ
ば、ソフトウェア制御でこれらを実現することは容易で
ある。
In the above example, the iterative code is assigned to '11' using only the black run length table of the MH code table. However, the appearance rate of the iterative code is incorporated into the appearance rate of each run length. If a code table based on the Huffman coding method is created, the effects of the present invention such as high compression and high speed processing can be further expected. Also in the encoding procedure and the decoding procedure, the shift register is used for serial control in the above embodiment, but it is needless to say that parallel control is the best solution. Further, if the processing speed is not expected, it is easy to realize these by software control.

【0063】[0063]

【発明の効果】以上説明したように、本発明によれば、
従来の圧縮方式よりも更に圧縮率が向上すると同時に復
号時の処理速度の向上を図れるため、プリンタ装置の性
能を損なうことなく保証用メモリの容量を低減すること
ができてメモリの節約になるとともに、従来のMH符号
化方式を拡張した構成となっているため、プリンタ装置
のみならずイメージ圧縮器など他の分野にも適用は可能
であり、今後情報量が増加するマルチメディア社会に貢
献するところが大きい。
As described above, according to the present invention,
Since the compression rate can be further improved compared to the conventional compression method and the processing speed at the time of decoding can be improved, the capacity of the guarantee memory can be reduced without impairing the performance of the printer device, and the memory can be saved. Since the configuration is an extension of the conventional MH encoding method, it can be applied not only to printers but also to other fields such as image compressors, and will contribute to the multimedia society where the amount of information will increase in the future. large.

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

【図1】本発明の画像信号圧縮装置の原理構成図であ
る。
FIG. 1 is a principle configuration diagram of an image signal compression apparatus of the present invention.

【図2】本発明の画像信号復元装置の原理構成図であ
る。
FIG. 2 is a principle configuration diagram of an image signal restoration device of the present invention.

【図3】本発明の画像信号圧縮・復元装置の原理構成図
である。
FIG. 3 is a block diagram showing the principle of an image signal compression / decompression device according to the present invention.

【図4】本発明のプリンタ装置の原理構成図である。FIG. 4 is a principle configuration diagram of a printer device of the present invention.

【図5】本発明のプリンタ装置の構成を示すブロック図
である。
FIG. 5 is a block diagram showing a configuration of a printer device of the present invention.

【図6】本発明のプリンタ装置の圧縮部の構成を示すブ
ロック図である。
FIG. 6 is a block diagram showing a configuration of a compression unit of the printer device of the present invention.

【図7】本発明のプリンタ装置の復元部の構成を示すブ
ロック図である。
FIG. 7 is a block diagram showing a configuration of a restoration unit of the printer device of the present invention.

【図8】本発明において使用する符号表の一例を示す図
である。
FIG. 8 is a diagram showing an example of a code table used in the present invention.

【図9】本発明における圧縮処理の手順を示すフローチ
ャートである。
FIG. 9 is a flowchart showing a procedure of compression processing in the present invention.

【図10】本発明における復元処理の手順を示すフロー
チャートである。
FIG. 10 is a flowchart showing a procedure of restoration processing according to the present invention.

【図11】本発明の効果の程度を説明するためのランレ
ングス分析結果を示す図である。
FIG. 11 is a diagram showing a run length analysis result for explaining the degree of the effect of the present invention.

【図12】従来例と本発明例とにおける符号変換例を示
す図である。
FIG. 12 is a diagram showing an example of code conversion in the conventional example and the present invention example.

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

1 ランレングス算出部 2 前データ記憶部 3 比較部 4 符号変換部 5 反復符号変換部 6 符号表 11 符号復元部 12 反復符号判別部 13 前データ記憶部 14 画像信号変換部 15 符号表 21 画像信号圧縮部 22 保証用メモリ 23 画像信号復元部 1 Run length calculator 2 Previous data storage 3 comparison section 4 Code converter 5 Iterative code converter 6 Code table 11 Code restoration unit 12 Repeat code discrimination section 13 Previous data storage 14 Image signal converter 15 Code table 21 Image signal compression unit 22 Warranty memory 23 Image signal restoration section

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 ─────────────────────────────────────────────────── ─── Continuation of front page (58) Fields surveyed (Int.Cl. 7 , DB name) H04N 1/41-1/419

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 画像を走査して得られる白ドット,黒ド
ットからなる画像信号に対して、白ドットが連続する回
数及び黒ドットが連続する回数を所定の規則に従って符
号化することにより、画像信号を圧縮する画像信号圧縮
方法において、連続する白ドット,黒ドット毎に、それ
が連続する回数がそれの前に連続した白ドット,黒ドッ
トの回数と同じか否かを判断し、連続する回数が同じで
ある場合にはその回数を所定の符号に符号化することを
特徴とする画像信号圧縮方法。
1. A white dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots are continuous, the image In an image signal compression method for compressing a signal, it is determined whether or not the number of consecutive white dots or black dots is the same as the number of consecutive white dots or black dots preceding that dot A method for compressing an image signal, characterized in that when the number of times is the same, the number of times is encoded into a predetermined code.
【請求項2】 請求項1記載の画像信号圧縮方法を用い
得られる圧縮された符号を元の画像信号に復元する画
像信号復元方法であって、圧縮された符号から白ドッ
ト,黒ドット毎に前記所定の符号を識別し、前記所定の
符号を識別した場合にはその前の白ドット,黒ドットが
連続する回数を用いて元の画像信号を復元することを特
徴とする画像信号復元方法。
2. An image signal decompression method for decompressing a compressed code obtained by using the image signal compression method according to claim 1 into an original image signal, wherein each white dot and black dot is deducted from the compressed code. The image signal restoration method characterized in that the predetermined code is identified, and when the predetermined code is identified, the original image signal is restored by using the number of times the preceding white dot and black dot continue. .
【請求項3】 画像を走査して得られる白ドット,黒ド
ットからなる画像信号に対して、白ドットが連続する回
数及び黒ドットが連続する回数を所定の規則に従って符
号化することにより、画像信号を圧縮すると共に、圧縮
された符号を前記所定の規則に従って元の画像信号に復
元する画像信号圧縮・復元方法において、圧縮時には、
連続する白ドット,黒ドット毎に、それが連続する回数
がそれの前に連続した白ドット,黒ドットの回数と同じ
か否かを判断し、連続する回数が同じである場合にはそ
の回数を所定の符号に符号化し、復元時には、圧縮され
た符号から白ドット,黒ドット毎に前記所定の符号を識
別し、前記所定の符号を識別した場合にはその前の白ド
ット,黒ドットが連続する回数を用いて元の画像信号を
復元することを特徴とする画像信号圧縮・復元方法。
3. A white dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots are continuous, the image signal compression Then together, in the image signal compression and decompression method for restoring the compressed <br/> is the code to the original image signal according to the predetermined rule, during compression,
For each consecutive white dot or black dot, determine whether the number of consecutive times is the same as the number of consecutive white dots or black dots before it, and if the number of consecutive times is the same, the number of times. To a predetermined code, and at the time of decompression , the predetermined code is identified for each white dot and black dot from the compressed code, and when the predetermined code is identified, the preceding white dot and black dot are An image signal compression / decompression method, characterized in that an original image signal is decompressed by using a continuous number of times.
【請求項4】 画像を走査して得られる白ドット,黒ド
ットからなる画像信号に対して、白ドットが連続する回
数及び黒ドットが連続する回数を所定の規則に従って符
号化することにより、画像信号を圧縮する画像信号圧縮
装置において、連続する白ドット,黒ドット毎に、それ
が連続する回数がそれの前に連続した白ドット,黒ドッ
トの回数と同じか否かを判断する手段と、連続する回数
が同じである場合にはその回数を所定の符号に符号化す
る手段とを備えることを特徴とする画像信号圧縮装置。
4. A white dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots are continuous, the image In an image signal compression device for compressing a signal, a means for determining whether or not the number of consecutive white dots and black dots is the same as the number of consecutive white dots and black dots before that, An image signal compression apparatus comprising: means for encoding the number of consecutive times to a predetermined code when the number of consecutive times is the same.
【請求項5】 請求項4記載の画像信号圧縮装置により
得られる圧縮された符号を元の画像信号に復元する画像
信号復元装置であって、圧縮された符号から白ドット,
黒ドット毎に前記所定の符号を識別する手段と、前記所
定の符号を識別した場合にはその前の白ドット,黒ドッ
トが連続する回数を用いて元の画像信号を復元する手段
とを備えることを特徴とする画像信号復元装置。
5. The image signal compression device according to claim 4.
An image signal decompression device for decompressing an obtained compressed code into an original image signal, wherein a white dot from the compressed code,
A means for identifying the predetermined code for each black dot and a means for restoring the original image signal by using the number of consecutive white dots and black dots before the predetermined code when the predetermined code is identified An image signal restoration device characterized by the above.
【請求項6】 画像を走査して得られる白ドット,黒ド
ットからなる画像信号に対して、白ドットが連続する回
数及び黒ドットが連続する回数を所定の規則に従って符
号化することにより、画像信号を圧縮すると共に、圧縮
された符号を前記所定の規則に従って元の画像信号に復
元する画像信号圧縮・復元装置において、連続する白ド
ット,黒ドット毎に、それが連続する回数がそれの前に
連続した白ドット,黒ドットの回数と同じか否かを判断
する手段と、連続する回数が同じである場合にはその回
数を所定の符号に符号化する手段と、圧縮された符号か
ら白ドット,黒ドット毎に前記所定の符号を識別する手
段と、前記所定の符号を識別した場合にはその前の白ド
ット,黒ドットが連続する回数を用いて元の画像信号を
復元する手段とを備えることを特徴とする画像信号圧縮
・復元装置。
6. A white dots obtained by scanning the image, the image signal composed of black dots, by coding according to the rule a predetermined number of times that number white dots are consecutive and black dots are continuous, the image signal compression then together, in the image signal compression and decompression apparatus for restoring compressed <br/> is the code to the original image signal according to the predetermined rule, white dots continuous in each of the black dots, the number of times that it is continuous means but for encoding consecutive white dots, means for determining whether the same or not the number of black dots, when the number of times of consecutive are the same the number of times predetermined code before it is compressed Means for identifying the predetermined code for each white dot and black dot from the code, and when the predetermined code is identified, the original image signal is obtained by using the number of times the preceding white dot and black dot continue. Means to restore Image signal compression and decompression apparatus, characterized in that it comprises.
【請求項7】 印刷するための画像信号のデータを圧縮
符号の形態にて格納しておく格納手段を有するプリンタ
装置において、前記格納手段に接続して請求項6記載の
画像信号圧縮・復元装置を備え、該画像信号圧縮・復元
装置にて得られた圧縮符号を前記格納手段に格納すると
共に、格納した圧縮符号を該画像信号圧縮・復元装置に
て画像信号に復元するように構成したことを特徴とする
プリンタ装置。
7. A printer device having a storage means for storing data of an image signal for printing in the form of a compression code, wherein the image signal according to claim 6 is connected to the storage means. A compression / decompression device is provided, and the compression code obtained by the image signal compression / decompression device is stored in the storage means, and the stored compression code is decompressed into an image signal by the image signal compression / decompression device. A printer device having the above-mentioned configuration.
JP21087295A 1995-08-18 1995-08-18 Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer Expired - Fee Related JP3433276B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21087295A JP3433276B2 (en) 1995-08-18 1995-08-18 Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21087295A JP3433276B2 (en) 1995-08-18 1995-08-18 Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer

Publications (2)

Publication Number Publication Date
JPH0965147A JPH0965147A (en) 1997-03-07
JP3433276B2 true JP3433276B2 (en) 2003-08-04

Family

ID=16596501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21087295A Expired - Fee Related JP3433276B2 (en) 1995-08-18 1995-08-18 Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer

Country Status (1)

Country Link
JP (1) JP3433276B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002142118A (en) 2000-10-31 2002-05-17 Ricoh Co Ltd Encoder, decoder, image forming device, encoding method, and decoding method
JP3857534B2 (en) 2001-03-21 2006-12-13 株式会社リコー Image compression processor
JP3865203B2 (en) 2001-04-24 2007-01-10 株式会社リコー Image compression apparatus, image forming apparatus, image compression method, and recording medium

Also Published As

Publication number Publication date
JPH0965147A (en) 1997-03-07

Similar Documents

Publication Publication Date Title
US5627534A (en) Dual stage compression of bit mapped image data using refined run length and LZ compression
JPS5923964A (en) Method of transmitting test document
US5177622A (en) Method and apparatus for detecting run length of two successive pixels and subjecting run length to universal coding
US4092665A (en) Method and means for extracting variable length data from fixed length bytes
US5694125A (en) Sliding window with big gap data compression system
EP0650290A2 (en) System and method for encoding facsimile data
US4136363A (en) Truncated run length encoding
US4918540A (en) System for encoding or decoding analog video signals
KR0134750B1 (en) Output apparatus and method
JP3269970B2 (en) Method and apparatus for compressing and decompressing digital image signals
JP3433276B2 (en) Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer
US4972497A (en) Image coding system
JP4164257B2 (en) Image processing apparatus, image processing method, program, and storage medium
US4092675A (en) Truncated run length encoding with a modular variable length code format
US4092676A (en) Block length multiple plus run length residue codes for run length encoding
US4092677A (en) Truncated run length encoding for fractionally difference modulated video signals
JP2687926B2 (en) Code decoder
JPH05151349A (en) Image data compressing method and encoding circuit
JPH1117959A (en) Run length coding method for binary image and recording medium storing run length coding program
JPH04270569A (en) Data compression system for picture processor
JPH09218914A (en) Bar code reader
JP2833362B2 (en) Image signal expansion device
US20020191225A1 (en) Methods and arrangements for compressing raster data
JPS6228628B2 (en)
EP0302432A2 (en) Document decompressing system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030430

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

Free format text: PAYMENT UNTIL: 20080530

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090530

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090530

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100530

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100530

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110530

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees