JPH05145767A - Data compressing method - Google Patents

Data compressing method

Info

Publication number
JPH05145767A
JPH05145767A JP3307445A JP30744591A JPH05145767A JP H05145767 A JPH05145767 A JP H05145767A JP 3307445 A JP3307445 A JP 3307445A JP 30744591 A JP30744591 A JP 30744591A JP H05145767 A JPH05145767 A JP H05145767A
Authority
JP
Japan
Prior art keywords
line
image data
white
encoding
encoded
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.)
Pending
Application number
JP3307445A
Other languages
Japanese (ja)
Inventor
Takanori Yamamoto
貴典 山本
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 JP3307445A priority Critical patent/JPH05145767A/en
Publication of JPH05145767A publication Critical patent/JPH05145767A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To decrease the number of bits and to improve the compression efficiency by executing modified Huffman MH encoding, when one of image data of the previous and the present lines is full white, and the other is non-full white. CONSTITUTION:A control part 5 decides whether a modified read MR encoding continuous limit number K and an MR encoding continuous number L coincide with each other or not, and when both of them coincide with each other, picture data of an object line is subjected to MH encoding by an MH encoding part 6, subjected to code output by adding an end-of-line EOL and a one-dimensional tag of a code generating part 5 and the continuous number L is reset to '0', and the next line data is fetched. Also, when it is decided that one of the previous line and the object line is full. white and the other is non-full white, since there is no correlation, the control part 3 executes MH encoding in the same way. Subsequently, when it is decided that both of them are full white, an MR encoding line is continued. On the other hand, when both of them are non-fun white, encoding is executed by the object line data encoding part 6, the EOL and a two-dimensional tag of the generating part 5 are added and outputted, the continuous number L is updated to L+1, and the next line data is fetched and processed in the same way.

Description

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

【0001】 (目次) 産業上の利用分野 従来の技術(図6乃至図7) 発明が解決しようとする課題(図8) 課題を解決するための手段(図1) 作用 実施例 (a) 第1の実施例の説明(図2乃至図4) (b) 第2の実施例の説明(図5) (c) 他の実施例の説明 発明の効果(Table of Contents) Industrial Application Field of the Prior Art (FIGS. 6 to 7) Problem to be Solved by the Invention (FIG. 8) Means for Solving the Problem (FIG. 1) Action Embodiment (a) Description of Embodiment 1 (FIGS. 2 to 4) (b) Description of Second Embodiment (FIG. 5) (c) Description of Other Embodiments Effect of the Invention

【0002】[0002]

【産業上の利用分野】本発明は、前ラインの画データの
変化点と、現ラインの画データとの変化点との相対位置
に応じて、現ラインの画データをパス符号、水平符号、
垂直符号を用いてMR符号化するデータ圧縮方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention sets the image data of the current line to a pass code, a horizontal code, a horizontal code, in accordance with the relative position between the changing point of the image data of the previous line and the changing point of the image data of the current line.
The present invention relates to a data compression method for performing MR coding using a vertical code.

【0003】画像データは、コードデータに比し、デー
タ量が膨大であり、画像の性質を利用した各種の圧縮技
術が採られており、ファクシミリ装置や、画像ファイル
装置等で、データを圧縮して、通信、記憶している。
Image data has an enormous amount of data as compared with code data, and various compression techniques utilizing the characteristics of images have been adopted. Data is compressed by a facsimile device, an image file device or the like. It communicates and remembers.

【0004】このようなデータ圧縮技術には、1次元符
号化方法と、2次元符号化方法があり、ファクシミリ装
置では、G3のCCITT勧告T.4において、前者に
MH(モディファイド・ホフマン)符号、後者にMR
(モディファイド・リード)符号が、勧告されている。
Such data compression techniques include a one-dimensional encoding method and a two-dimensional encoding method. In a facsimile apparatus, G3 CCITT Recommendation T.264. In 4, the former is MH (Modified Hoffman) code and the latter is MR
The (Modified Read) code is recommended.

【0005】このMR符号化は、圧縮効率が高く、広く
利用されているが、より圧縮率の向上が要求される。
This MR coding has high compression efficiency and is widely used, but further improvement in compression rate is required.

【0006】[0006]

【従来の技術】図6、図7は従来技術の説明図(その
1)、(その2)である。図6(A)に示すように、M
R符号化方法は、前のラインを参照ラインとし、現ライ
ンを符号化ラインとして現ラインを符号化するものであ
り、a0 を符号化ライン上の参照又は起点変化画素と
し、a1 を符号化ライン上で、a0 より右の最初の変化
画素とし、a2 を符号化ライン上で、a1 より右の最初
の変化画素とし、b1 を参照ライン上の変化画素の内、
0 より右でa0 と反対の色を持つ最初の画素、b2
参照ライン上でb1 の右の変化画素として、符号化す
る。
2. Description of the Related Art FIGS. 6 and 7 are explanatory views (1) and (2) of a conventional technique. As shown in FIG. 6 (A), M
In the R coding method, the current line is coded by using the previous line as a reference line, the current line as a coding line, a 0 as a reference or starting point change pixel on the coding line, and a 1 as a code. On the encoding line, the first change pixel on the right of a 0, on the encoding line, a 2 is the first change pixel on the right of a 1 , and b 1 is the change pixel on the reference line.
As a first pixel, the right change pixels b 1 to b 2 on the reference line of opposite colors with a 0 in the right of a 0, to encode.

【0007】符号化モードには、図7(A)に示すよう
に、パスモード、垂直モード、水平モードがあり、パス
モードは、図6(B)に示すように、a1 の左側に、b
2 が存在することで規定され、このモードを符号化した
時は、次の符号化に備えて、a0 をb2 の直下の符号化
ライン上の画素(a0 ′)上に設定する。
As shown in FIG. 7 (A), the coding modes include a pass mode, a vertical mode, and a horizontal mode. The pass mode is, as shown in FIG. 6 (B), on the left side of a 1 , b
It is defined by the presence of 2 and when this mode is coded, a 0 is set on the pixel (a 0 ′) on the coding line immediately below b 2 in preparation for the next coding.

【0008】垂直モードは、図6(C)に示すように、
1 の位置は、b1 からの相対位置で符号化され、相対
距離は、各々異なる符号で表される7つの値、V0、V
R1、VR2、VR3、VL1、VL2、VL3のいず
れかの値をとり、図の例では、VL2で符号化され、垂
直モード符号化の後は、a0 の位置は、a1 に移され
る。
In the vertical mode, as shown in FIG.
The position of a 1 is encoded by the relative position from b 1 , and the relative distance is represented by seven different values, V0 and V.
It takes any value of R1, VR2, VR3, VL1, VL2, and VL3, and in the example in the figure, is encoded by VL2, and after vertical mode encoding, the position of a 0 is moved to a 1 .

【0009】水平モードは、図6(C)に示すように、
ランレングスa0 1 及びa1 2 の両方を、符号H+
M(a0 1 )+M(a1 2 )を用いて符号化する。
Hは2次元符号表(図7(A))内のフラッグ符号であ
り、M(a0 1 )、M(a1 2 )は、各々ランa0
1 及びa1 2 の長さと色を示す符号であり、水平モ
ード符号化の後は、a0 の位置は、a2 上に移される。
In the horizontal mode, as shown in FIG.
Both run lengths a 0 a 1 and a 1 a 2 are coded H +
Encoding is performed using M (a 0 a 1 ) + M (a 1 a 2 ).
H is a flag code in the two-dimensional code table (FIG. 7 (A)), and M (a 0 a 1 ) and M (a 1 a 2 ) are each run a 0.
It is a code indicating the length and color of a 1 and a 1 a 2 , and the position of a 0 is moved onto a 2 after horizontal mode coding.

【0010】このようなMR符号化手順は、先ず、パス
モードかを調べ、次に、相対距離a 1 1 の絶対値を求
め、この絶対値が、「3」以下なら、図7(A)によ
り、a 1 1 を垂直モードで符号化し、「3」を越えれ
ば、図7(A)により、水平モード符号‘001’に引
き続いて、a0 1 及びa1 2 を各々1次元符号化に
より符号化する。
The MR encoding procedure is performed by first
Mode, then the relative distance a 1b1Find the absolute value of
Therefore, if this absolute value is less than or equal to “3”, then according to FIG.
A 1b1Is encoded in vertical mode and exceeds "3"
For example, according to FIG. 7 (A), the horizontal mode code is ‘001’.
Continuing, a0a1And a1a2To each one-dimensional encoding
Encode more.

【0011】このようなMR符号化方法では、参照ライ
ンを基準とするので、1ビットのエラーでも、後続する
ラインへの波及が大きい。このため、図7(B)、図7
(C)に示すように、MR符号化ラインの4ライン毎
に、1次元符号化であるMH符号化ラインを挿入し、M
R符号化ラインでのエラーの影響を最小限に抑えるよう
にしている。
In such an MR encoding method, since the reference line is used as a reference, even a 1-bit error has a large influence on the subsequent line. Therefore, as shown in FIG.
As shown in (C), an MH coding line which is one-dimensional coding is inserted into every four MR coding lines, and M
The influence of errors on the R coding line is minimized.

【0012】[0012]

【発明が解決しようとする課題】図8は、従来技術の問
題点説明図である。ところで、このMR符号化方法で
は、前ラインの画データと、現ラインの画データが同一
の時に、最も効率がよく、前ラインの画データと、現ラ
インの画データに相関がない場合に効率が悪い。
FIG. 8 is a diagram for explaining the problems of the prior art. By the way, this MR encoding method is most efficient when the image data of the previous line and the image data of the current line are the same, and is efficient when there is no correlation between the image data of the previous line and the image data of the current line. Is bad.

【0013】前ラインの画像と、現ラインの画像との相
関は、一見して判断することは難しいが、一般的な原稿
は、文字が存在する行と、空白(全白)の上部/下部余
白、行間等からなる。
The correlation between the image of the previous line and the image of the current line is difficult to judge at first glance, but a general manuscript has a line where characters are present and a blank (all white) upper / lower part. It consists of margins and line spacing.

【0014】これを検討すると、図8(A)、(B)に
示すように、前ラインが全白で、現ラインが非全白であ
る時や、前ラインが非全白で、現ラインが全白である時
は、MR符号化では、水平モードやパスモードとなり、
1次元符号化方法であるMH符号化方法の方が、ビット
数が少なくて済む。
When this is examined, as shown in FIGS. 8A and 8B, when the previous line is all white and the current line is not all white, or when the previous line is not all white and the current line is all white. Is all white, the MR encoding is in horizontal mode or pass mode,
The MH coding method, which is a one-dimensional coding method, requires a smaller number of bits.

【0015】又、図8(C),(D)に示すように、前
ラインと現ラインが同一パターンであるときは、MR符
号化方法では、垂直符号V0で済み、特に前ラインと現
ラインが全白の時は、1つの垂直符号V0(1ビット)
で済み、MH符号化方法よりはるかにビット数が少なく
て済む。
Further, as shown in FIGS. 8C and 8D, when the previous line and the current line have the same pattern, the vertical code V0 is sufficient in the MR coding method, and especially the previous line and the current line. Is all white, one vertical code V0 (1 bit)
The number of bits is much smaller than that of the MH coding method.

【0016】このため、従来技術では、前ラインの画像
と現ラインの画像の相関の有無に係わらず、一定ライン
数毎に、MH符号化していたため、有効に圧縮効率を向
上できないという問題があった。
For this reason, in the prior art, MH coding is performed for every constant number of lines regardless of the correlation between the image of the previous line and the image of the current line, so that there is a problem that the compression efficiency cannot be effectively improved. It was

【0017】従って、本発明は、前ラインの画像と現ラ
インの画像の相関の有無により、MR符号化、MH符号
化を選択して、圧縮効率を向上することができるデータ
圧縮方法を提供することを目的とする。
Therefore, the present invention provides a data compression method capable of improving compression efficiency by selecting MR coding or MH coding depending on the presence or absence of correlation between the image of the previous line and the image of the current line. The purpose is to

【0018】[0018]

【課題を解決するための手段】図1は本発明の原理図で
ある。本発明の請求項1は、前ラインの画データの変化
点と、現ラインの画データとの変化点との相対位置に応
じて、現ラインの画データをパス符号、水平符号、垂直
符号を用いてMR符号化するデータ圧縮方法において、
前ラインの画データと現ラインの画データとのいずれか
一方の画データが全白であり、他方の画データが非全白
であることを検出して、該現ラインの画データを、黒又
は白のランレングスを示す符号でMH符号化することを
特徴とする。
FIG. 1 shows the principle of the present invention. According to claim 1 of the present invention, the image data of the current line is converted into a pass code, a horizontal code, and a vertical code according to the relative position of the change point of the image data of the previous line and the change point of the image data of the current line. In a data compression method for MR coding using
It is detected that one of the image data of the previous line and the image data of the current line is all white and the other image data is non-white, and the image data of the current line is changed to black. Alternatively, it is characterized in that MH coding is performed with a code indicating a white run length.

【0019】本発明の請求項2は、請求項1において、
前記MR符号化ラインが、所定ライン数続いたことによ
り、次のラインの画データを前記MH符号化することを
特徴とする。
A second aspect of the present invention is based on the first aspect.
When the MR encoded line continues for a predetermined number of lines, the image data of the next line is MH encoded.

【0020】本発明の請求項3は、前ラインの画データ
の変化点と、現ラインの画データとの変化点との相対位
置に応じて、現ラインの画データをパス符号、水平符
号、垂直符号を用いてMR符号化し、該MR符号化ライ
ンが、所定ライン数続いたことにより、次のラインの画
データを、黒又は白のランレングスを示す符号でMH符
号化するデータ圧縮方法において、該前ラインの画デー
タと現ラインの画データとが、同一パターンであること
を検出して、該現ラインの画データを該MR符号化する
ことを特徴とする。
According to a third aspect of the present invention, the image data of the current line is converted into a pass code, a horizontal code, and a horizontal code according to the relative position between the change point of the image data of the previous line and the change point of the image data of the current line. A data compression method for performing MR coding using a vertical code and subjecting the image data of the next line to MH coding with a code indicating a black or white run length by the MR coding line continuing for a predetermined number of lines. The image data of the previous line and the image data of the current line are detected to have the same pattern, and the image data of the current line is MR-coded.

【0021】本発明の請求項4は、請求項3において、
前記前ラインの画データと現ラインの画データとのいず
れか一方の画データが全白であり、他方の画データが非
全白であることを検出して、該現ラインの画データを、
黒又は白のランレングスを示す符号でMH符号化するこ
とを特徴とする。
According to a fourth aspect of the present invention, in the third aspect,
Detecting that one of the image data of the previous line and the image data of the current line is all white, and the other image data is non-all white, the image data of the current line is
MH encoding is performed with a code indicating a black or white run length.

【0022】本発明の請求項5は、請求項3又は4にお
いて、前記前ラインの画データと現ラインの画データと
が、同一パターンであることを検出して、該現ラインの
画データを前記MR符号化したことにより、前記同一パ
ターンによる前記MR符号化ラインの連続許容数を多く
したことを特徴とする。
According to a fifth aspect of the present invention, in the third or fourth aspect, it is detected that the image data of the previous line and the image data of the current line have the same pattern, and the image data of the current line is detected. Since the MR coding is performed, the continuous allowable number of the MR coded lines having the same pattern is increased.

【0023】本発明の請求項6は、請求項3又は4又は
5において、前記同一パターンが、全白パターンである
ことを特徴とする。
A sixth aspect of the present invention is characterized in that, in the third, fourth or fifth aspect, the same pattern is an all white pattern.

【0024】[0024]

【作用】本発明の請求項1では、図8(A)、(B)で
示したように、前ラインの画データと現ラインの画デー
タとのいずれか一方の画データが全白であり、他方の画
データが非全白である時は、データの相関がなく、MR
符号化するよりMH符号化した方が、ビット数が少なく
なるため、MR符号化に変えて、MH符号化するもので
あり、MH符号化により、エラーに対するリカバビリテ
ィを損なわないという効果も生じる。
According to the first aspect of the present invention, as shown in FIGS. 8A and 8B, the image data of either the image data of the previous line or the image data of the current line is entirely white. , When the other image data is non-white, there is no data correlation and MR
Since the number of bits is smaller in MH encoding than in encoding, MH encoding is performed instead of MR encoding, and MH encoding also has an effect of not impairing recoverability against errors.

【0025】本発明の請求項2では、請求項1で、MH
符号化ラインが少ないと、リカバビリティが劣化するの
で、MR符号化ラインが、所定ライン数続いたことによ
り、次のラインの画データを強制的にMH符号化して、
リカバビリティの向上を図った。
According to a second aspect of the present invention, the MH according to the first aspect.
If the number of coding lines is small, the recoverability is deteriorated. Therefore, the MR coding line continues for a predetermined number of lines, so that the image data of the next line is forcibly MH coded,
We improved the recoverability.

【0026】本発明の請求項3では、図8(C),
(D)で示したように、前ラインの画データと現ライン
の画データとが、同一パターンである時は、データに相
関があるため、MH符号化するよりMR符号化した方
が、ビット数が少なくなるため、MH符号化に変えて、
MR符号化するものであり、このようにしても、同一パ
ターンのため、エラーが生じても、以前に復元されたラ
インでエラーラインを置換すれば、正常に復元されたと
同等の出力が得られる。
In claim 3 of the present invention, as shown in FIG.
As shown in (D), when the image data of the previous line and the image data of the current line have the same pattern, the data is correlated, so that the MR coding is more suitable than the MH coding. Since the number is small, change to MH coding,
Even if an error occurs due to the MR coding, even if an error occurs due to the same pattern, an output equivalent to that normally restored can be obtained by replacing the error line with the previously restored line. ..

【0027】本発明の請求項4では、請求項1の前ライ
ンの画データと現ラインの画データとのいずれか一方の
画データが全白であり、他方の画データが非全白である
ことを検出して、該現ラインの画データを、黒又は白の
ランレングスを示す符号でMH符号化する工程を加え、
より圧縮効率の向上を図った。
According to claim 4 of the present invention, one of the image data of the preceding line and the image data of the current line of claim 1 is completely white, and the other image data is non-white. And MH-encoding the image data of the current line with a code indicating a black or white run length,
The compression efficiency was improved.

【0028】本発明の請求項5では、前ラインの画デー
タと現ラインの画データとが、同一パターンである時
は、エラーが生じても、以前に復元されたラインでエラ
ーラインを置換すれば、出力にエラーが表れないため、
MH符号化ラインを原則的に挿入しなくても見かけ上の
エラーが発生しないため、同一パターンによる前記MR
符号化ラインの連続許容数を多くし、より圧縮効率の向
上を図った。
According to the fifth aspect of the present invention, when the image data of the previous line and the image data of the current line have the same pattern, even if an error occurs, the error line is replaced with the previously restored line. If no error appears in the output,
Since no apparent error occurs even if the MH coded line is not inserted in principle, the MR having the same pattern is used.
The number of continuous encoding lines is increased to improve the compression efficiency.

【0029】本発明の請求項6では、前記同一パターン
が、全白パターンであると、比較的安定して(連続し
て)発生するであろうと思われる全白部分のラインのみ
を連続して、MR符号化できる。
According to a sixth aspect of the present invention, if the same pattern is an all-white pattern, only the lines of all-white portions that are likely to occur relatively stably (continuously) are continuously formed. , MR coding is possible.

【0030】[0030]

【実施例】(a) 第1の実施例の説明 図2は本発明の実施例構成図であり、圧縮部の構成を示
す。
Embodiments (a) Description of First Embodiment FIG. 2 is a configuration diagram of an embodiment of the present invention, showing a configuration of a compression unit.

【0031】図中、1は全白検出部であり、変化点検出
回路で構成され、1ライン分の画データ(例えば、17
28ビット)の変化点の有無を検出し、先頭ビットが白
(“0”)であり、変化点無しのときに、全白ライン通
知を発生するもの、2はラインバッファであり、1ライ
ン分の画データを一時格納するもの、3は制御部であ
り、図3に示す符号化処理を行うもの、4は記憶部であ
り、前のラインが全白かそうでないかを格納しておくも
のである。
In the figure, reference numeral 1 denotes an all-white detection section, which is composed of a change point detection circuit and which has image data for one line (for example, 17
28-bit) change point is detected, and when the first bit is white (“0”) and there is no change point, an all-white line notification is generated. Reference numeral 2 is a line buffer. Which temporarily stores the image data of 3, the control unit 3, which performs the encoding process shown in FIG. 3, the storage unit 4 which stores whether the previous line is completely white or not. Is.

【0032】5は符号生成部であり、制御部3の制御に
より、エンド・オブ・ラインEOLと、1次元又は2次
元タグを発生するもの、6はMH符号化部であり、制御
部3の制御により、ラインバッファ2の1ラインの画デ
ータをMH符号化するもの、7はMR符号化部であり、
制御部3の制御により、ラインバッファ2の1ラインの
画データをMR符号化するものである。
Numeral 5 is a code generator, which generates an end-of-line EOL and a one-dimensional or two-dimensional tag under the control of the controller 3, and numeral 6 is an MH encoder. By control, one line of image data in the line buffer 2 is MH encoded, and 7 is an MR encoding unit.
Under the control of the control unit 3, the image data of one line in the line buffer 2 is MR encoded.

【0033】尚、符号出力としては、1ライン毎に、M
H符号と1次元タグ、EOL又はMR符号化と2次元タ
グ、EOLが出力される。図3は本発明の第1の実施例
処理フロー図、図4は本発明の第1の実施例説明図であ
る。
The code output is M for each line.
An H code and a one-dimensional tag, EOL or MR encoding and a two-dimensional tag, and EOL are output. FIG. 3 is a processing flowchart of the first embodiment of the present invention, and FIG. 4 is an explanatory view of the first embodiment of the present invention.

【0034】制御部3は、MR符号化連続制限数K
と、MR符号化連続数Lとを「4」に設定する。これに
より、MR符号化連続数は、4に制限される。
The control unit 3 controls the MR coding continuous limit number K.
And the number L of continuous MR encoding are set to "4". This limits the number of consecutive MR encodings to 4.

【0035】制御部3は、MR符号化連続制限数K
と、MR符号化連続数Lとが一致しているかを判定し、
MR符号化連続制限数Kと、MR符号化連続数Lとが一
致していると、MH符号化ラインを挿入するため、ステ
ップに進む。
The control unit 3 controls the MR coding continuous limit number K.
And the number of consecutive MR encodings L match,
If the MR-encoded consecutive number K and the MR-encoded consecutive number L match, an MH encoded line is inserted, and the process proceeds to step.

【0036】MR符号化連続制限数Kと、MR符号化
連続数Lとが一致していないと、MR符号化ラインであ
るが、制御部3は、対象ラインの全白検出部1の出力
と、記憶部4の前のラインの全白かそうでないかの内容
を比較して、前のラインか対象ラインのいずれか一方が
全白であり、他方がそうでないかを調べる。
If the MR-encoded continuous number K and the MR-encoded continuous number L do not match, the control unit 3 outputs the output of the all-white detection unit 1 of the target line, although it is an MR encoded line. By comparing the contents of the previous line of the storage unit 4 whether it is all white or not, it is checked whether either the previous line or the target line is all white and the other is not.

【0037】制御部3は、前のラインか対象ラインのい
ずれか一方が全白であり、他方がそうでないと判定する
と、図8(A)、(B)で示したように、相関がないた
め、MR符号化に変えて、MH符号化を行うべく、ステ
ップに進み、前のラインか対象ラインのいずれか一方
が全白であり、他方がそうでないと判定しないと、MR
符号化をすべく、ステップに進む。
When the control section 3 determines that either the previous line or the target line is completely white and the other is not, there is no correlation as shown in FIGS. 8 (A) and 8 (B). Therefore, in order to perform the MH coding instead of the MR coding, the process proceeds to the step, and if it is not determined that either the previous line or the target line is all white and the other is not, the MR
Proceed to step for encoding.

【0038】制御部3は、次に、前のラインと対象ラ
インとが両方とも全白かを判定し、前のラインと対象ラ
インとが両方とも全白と判定すると、MR符号化ライン
をより連続させるため、ステップに進み、前のライン
と対象ラインとが両方とも全白と判定しないと、対象ラ
インの画データを、MR符号化部6でMR符号化し、符
号生成部5のEOLと2次元タグを付加して、符号出力
し、MR符号化連続数LをL+1に更新し、次のライン
の画データを取り出し、ステップに戻る。
Next, the control unit 3 determines whether both the previous line and the target line are all white, and when it determines that both the previous line and the target line are all white, it determines the MR encoded line to be more white. In order to make it continuous, the process proceeds to step, and if it is not determined that both the previous line and the target line are all white, the image data of the target line is MR-encoded by the MR encoding unit 6, and the EOL of the code generation unit 5 and A dimension tag is added, code output is performed, the MR encoded continuous number L is updated to L + 1, image data of the next line is extracted, and the process returns to step.

【0039】対象ラインの画データを、MH符号化部
6のMH符号化し、符号生成部5のEOLと1次元タグ
を付加して、符号出力し、MR符号化連続数Lを「0」
にリセットし、次のラインの画データを取り出し、ステ
ップに戻る。
The image data of the target line is MH-encoded by the MH encoder 6, the EOL of the code generator 5 and a one-dimensional tag are added, the code is output, and the MR encoding continuous number L is "0".
, The image data of the next line is taken out, and the procedure returns to step.

【0040】制御部3は、MR符号化連続制限数Kを
「X」(X>4)に、MR符号化連続数Lを「0」に設
定する。これにより、MR符号化連続制限数Kは増加
し、MR符号化連続数Lは、以前の連続MR符号化数に
係わらず、初期化される。
The control unit 3 sets the MR encoded continuous number K to "X"(X> 4) and the MR encoded continuous number L to "0". As a result, the MR-encoded consecutive number K increases, and the MR-encoded consecutive number L is initialized regardless of the previous consecutive MR-encoded number.

【0041】制御部3は、全白検出部1の出力から対
象ラインが、全白かを判定し、全白でなくなると、ステ
ップに戻り、全白なら、ステップに進む。 制御部3は、MR符号化連続制限数Kと、MR符号化
連続数Lとが一致しているかを判定し、MR符号化連続
制限数Kと、MR符号化連続数Lとが一致していると、
MH符号化ラインを挿入するため、対象ラインの画デー
タを、MH符号化部6でMH符号化し、符号生成部5の
EOLと1次元タグを付加して、符号出力し、次のライ
ンの画データを取り出し、ステップに戻る。
The control unit 3 determines from the output of the all-white detection unit 1 whether the target line is all-white. If the line is not all-white, the process returns to step. If it is all-white, the process proceeds to step. The control unit 3 determines whether or not the MR-coded continuous limit number K and the MR-coded continuous number L match, and the MR-coded continuous limit number K and the MR-coded continuous number L match. Is
In order to insert the MH encoded line, the image data of the target line is MH encoded by the MH encoding unit 6, the EOL of the code generation unit 5 and the one-dimensional tag are added, the code is output, and the image of the next line is output. Retrieve the data and return to step.

【0042】逆に、MR符号化連続制限数Kと、MR
符号化連続数Lとが一致していないと、対象ラインの画
データを、MR符号化部6でMR符号化し、符号生成部
5のEOLと2次元タグを付加して、符号出力し、MR
符号化連続数LをL+1に更新し、次のラインの画デー
タを取り出し、ステップに戻る。
On the contrary, the MR encoding continuous limiting number K and the MR
If the number of consecutive encodings L does not match, the image data of the target line is MR-encoded by the MR encoding unit 6, the EOL of the code generation unit 5 and the two-dimensional tag are added, and the code is output.
The encoding continuous number L is updated to L + 1, the image data of the next line is taken out, and the process returns to the step.

【0043】このようにして、MR符号化するラインに
対し、前のラインか対象ラインのいずれか一方が全白で
あり、他方がそうでない時は、図8(A)、(B)のよ
うに、MH符号化した方が、ビット数が減少するので、
MH符号化に代える。
In this way, when either the previous line or the target line is completely white with respect to the line to be MR-encoded, and the other is not, as shown in FIGS. 8A and 8B. In addition, since the number of bits decreases with MH encoding,
Instead of MH coding.

【0044】又、前のラインと対象ラインとが両方とも
全白と判定すると、図8(D)のように、MR符号化し
た方が、ビット数が少なくなるため、前のラインと対象
ラインとが両方とも全白の条件が続く限り、MR符号化
し、その制限数は、MR符号化連続制限数Kの設定値
「X」で制御され、無制限も可能である。
If it is determined that both the previous line and the target line are all white, the number of bits is smaller in MR coding as shown in FIG. 8D, so that the previous line and the target line are reduced. As long as the conditions of all white and white continue, MR coding is performed, and the limiting number is controlled by the set value “X” of the MR coding continuous limiting number K, and unlimited is also possible.

【0045】図4の例で示すと、従来のMR符号化ライ
ンが、4ライン毎に、1ラインのMH符号化ラインを挿
入していたのに対し、ライン4、8、9の如く、前又は
現ラインのいずれかのみが全白であれば、MR符号化に
代えて、MH符号化され、ライン105以降のように、
前と現ラインとも全白であると、MR符号化が続くこと
になり、圧縮効率が大幅に向上する。
In the example shown in FIG. 4, the conventional MR coded line inserts one MH coded line for every four lines, while the previous MR coded lines such as lines 4, 8 and 9 are inserted. Alternatively, if only one of the current lines is all white, it is MH coded instead of MR coded.
If the previous line and the current line are all white, MR encoding will continue, and the compression efficiency will be greatly improved.

【0046】又、このようにしても、MH符号化ライン
は、適切に挿入され、又前と現ラインとも全白なら、エ
ラーリカバリーが容易なため、MR符号化を続けても、
エラーリカバリー性能が劣化することもない。
Also in this case, if the MH coded line is properly inserted, and if both the previous line and the current line are all white, error recovery is easy, so even if MR coding is continued,
The error recovery performance does not deteriorate.

【0047】(b) 第2の実施例の説明 図5は本発明の第2の実施例処理フロー図であり、前と
現ラインとも全白の条件を、前と現ラインとが同一パタ
ーンである条件としたものである。
(B) Description of the Second Embodiment FIG. 5 is a flow chart of the processing of the second embodiment of the present invention, in which the white condition is the same for both the previous and current lines, and the same pattern is used for the previous and current lines. It is a certain condition.

【0048】このため、図2の全白検出部1に加え、前
ラインと、現ラインとの一致検出部を設ければ良い。 制御部3は、MR符号化連続制限数Kと、MR符号化
連続数Lとを「4」に設定する。
Therefore, in addition to the all-white detecting section 1 in FIG. 2, a coincidence detecting section for the previous line and the current line may be provided. The control unit 3 sets the MR encoded continuous number K and the MR encoded continuous number L to "4".

【0049】これにより、MR符号化連続数は、4に制
限される。 制御部3は、MR符号化連続制限数Kと、MR符号化
連続数Lとが一致しているかを判定し、MR符号化連続
制限数Kと、MR符号化連続数Lとが一致していると、
MH符号化ラインを挿入するため、ステップに進む。
As a result, the number of consecutive MR encodings is limited to 4. The control unit 3 determines whether or not the MR-coded continuous limit number K and the MR-coded continuous number L match, and the MR-coded continuous limit number K and the MR-coded continuous number L match. Is
To insert the MH coded line, proceed to step.

【0050】MR符号化連続制限数Kと、MR符号化
連続数Lとが一致していないと、MR符号化ラインであ
るが、制御部3は、対象ラインの全白検出部1の出力
と、記憶部4の前のラインの全白かそうでないかの内容
を比較して、前のラインか対象ラインのいずれか一方が
全白であり、他方がそうでないかを調べる。
When the MR-encoded consecutive number K and the MR-encoded consecutive number L do not match, it is an MR-encoded line, but the control unit 3 outputs the same as the output of the all-white detecting unit 1 of the target line. By comparing the contents of the previous line of the storage unit 4 whether it is all white or not, it is checked whether either the previous line or the target line is all white and the other is not.

【0051】制御部3は、前のラインか対象ラインのい
ずれか一方が全白であり、他方がそうでないと判定する
と、図8(A)、(B)で示したように、相関がないた
め、MR符号化に変えて、MH符号化を行うべく、ステ
ップに進み、前のラインか対象ラインのいずれか一方
が全白であり、他方がそうでないと判定しないと、MR
符号化をすべく、ステップに進む。
When the control unit 3 determines that one of the previous line and the target line is completely white and the other is not, there is no correlation as shown in FIGS. 8 (A) and 8 (B). Therefore, in order to perform the MH coding instead of the MR coding, the process proceeds to the step, and if it is not determined that either the previous line or the target line is all white and the other is not, the MR
Proceed to step for encoding.

【0052】制御部3は、次に、前のラインと対象ラ
インとのパターンが一致しているかを判定し、前のライ
ンと対象ラインとのパターンが一致していると判定する
と、MR符号化ラインをより連続させるため、ステップ
に進み、前のラインと対象ラインと一致していないと
判定すると、対象ラインの画データを、MR符号化部6
でMR符号化し、符号生成部5のEOLと2次元タグを
付加して、符号出力し、MR符号化連続数LをL+1に
更新し、次のラインの画データを取り出し、ステップ
に戻る。
Next, the control unit 3 determines whether the patterns of the previous line and the target line match, and when it determines that the patterns of the previous line and the target line match, the MR coding is performed. In order to make the lines more continuous, the process proceeds to step, and when it is determined that the previous line and the target line do not match, the image data of the target line is set to the MR encoding unit 6
MR coding is performed, the EOL of the code generation unit 5 and a two-dimensional tag are added, the code is output, the MR coded continuous number L is updated to L + 1, the image data of the next line is extracted, and the process returns to step.

【0053】対象ラインの画データを、MH符号化部
6のMH符号化し、符号生成部5のEOLと1次元タグ
を付加して、符号出力し、MR符号化連続数Lを「0」
にリセットし、次のラインの画データを取り出し、ステ
ップに戻る。
The image data of the target line is MH-encoded by the MH encoder 6, the EOL of the code generator 5 and a one-dimensional tag are added, the code is output, and the MR encoding continuous number L is "0".
, The image data of the next line is taken out, and the procedure returns to step.

【0054】制御部3は、MR符号化連続制限数Kを
「X」(X>4)に、MR符号化連続数Lを「0」に設
定する。これにより、MR符号化連続制限数Kは増加
し、MR符号化連続数Lは、以前の連続MR符号化数に
係わらず、初期化される。
The control unit 3 sets the MR encoded continuous number K to "X"(X> 4) and the MR encoded continuous number L to "0". As a result, the MR-encoded consecutive number K increases, and the MR-encoded consecutive number L is initialized regardless of the previous consecutive MR-encoded number.

【0055】制御部3は、前のラインと対象ラインと
のパターンが一致しているかを判定し、一致していない
と判定すると、ステップに戻り、一致していると判定
すると、ステップに進む。
The control unit 3 determines whether the patterns of the previous line and the target line match, and when it determines that they do not match, returns to the step. When it determines that they match, it advances to the step.

【0056】制御部3は、MR符号化連続制限数K
と、MR符号化連続数Lとが一致しているかを判定し、
MR符号化連続制限数Kと、MR符号化連続数Lとが一
致していると、MH符号化ラインを挿入するため、対象
ラインの画データを、MH符号化部6でMH符号化し、
符号生成部5のEOLと1次元タグを付加して、符号出
力し、次のラインの画データを取り出し、ステップに
戻る。
The control unit 3 controls the MR coding continuous limit number K.
And the number of consecutive MR encodings L match,
When the MR-encoded consecutive number K and the MR-encoded consecutive number L match, the MH encoded line is inserted, so that the image data of the target line is MH encoded by the MH encoding unit 6.
The EOL of the code generation unit 5 and the one-dimensional tag are added, the code is output, the image data of the next line is extracted, and the process returns to the step.

【0057】逆に、MR符号化連続制限数Kと、MR
符号化連続数Lとが一致していないと、対象ラインの画
データを、MR符号化部6でMR符号化し、符号生成部
5のEOLと2次元タグを付加して、符号出力し、MR
符号化連続数LをL+1に更新し、次のラインの画デー
タを取り出し、ステップに戻る。
On the contrary, the MR coding continuous limiting number K and the MR
If the number of consecutive encodings L does not match, the image data of the target line is MR-encoded by the MR encoding unit 6, the EOL of the code generation unit 5 and the two-dimensional tag are added, and the code is output.
The encoding continuous number L is updated to L + 1, the image data of the next line is taken out, and the process returns to the step.

【0058】このようにしても、第1の実施例と同様の
効果を奏する。 (c) 他の実施例の説明 上述の実施例の他に、本発明は、次のような変形が可能
である。
Even in this case, the same effect as the first embodiment can be obtained. (c) Description of Other Embodiments In addition to the above embodiments, the present invention can be modified as follows.

【0059】上述の実施例では、前と現ラインの両方
が全白であることと、前と現ラインの両方が同一のパタ
ーンであることを、検出部で検出しているが、全てMR
符号化し、符号化出力が、1つの垂直符号V0又は2つ
以上の垂直符号V0のみであることを制御部3が検出し
て、前と現ラインの両方が全白であること、又は前と現
ラインの両方が同一のパターンであることを検出しても
良く、そのようにすると、符号化と同時に検出ができ、
符号化時間が短縮できる。
In the above-described embodiment, the detection unit detects that both the previous and current lines are all white, and that both the previous and current lines have the same pattern.
The control unit 3 detects that only one vertical code V0 or two or more vertical codes V0 are coded, and the coded output is all white on both the previous and current lines, or It may be possible to detect that both of the current lines have the same pattern, in which case it can be detected simultaneously with encoding,
The coding time can be shortened.

【0060】図2の圧縮部を、ブロックで示したが、
これをマイクロプロセッサのプログラムによって、実行
しても良い。 必要に応じて、前又は現ラインのいずれかのみが全白
のみによる符号化選択制御や、前と現ラインの両方が全
白であることによる符号化選択制御、前と現ラインの両
方が同一のパターンであることによる符号化選択制御の
みを適用しても良く、これらを組み合わせても良い。
The compression unit shown in FIG. 2 is shown as a block.
This may be executed by a microprocessor program. If necessary, either the previous or the current line is entirely white only, the encoding selection control is that both the previous and current lines are all white, both the previous and current lines are the same. It is possible to apply only the encoding selection control depending on the pattern of, and to combine these.

【0061】以上、本発明を実施例により説明したが、
本発明の主旨の範囲内で種々の変形が可能であり、これ
らを本発明の範囲から排除するものではない。
The present invention has been described above with reference to the embodiments.
Various modifications are possible within the scope of the invention, and these modifications are not excluded from the scope of the invention.

【0062】[0062]

【発明の効果】以上説明したように、本発明によれば、
次の効果を奏する。 MR符号化方法によるデータ圧縮において、前ライン
と現ラインとの画像の相関性に応じて、MR符号化とM
H符号化を選択しているので、画像の相関性を利用した
圧縮効率の向上が可能となる。
As described above, according to the present invention,
It has the following effects. In data compression by the MR encoding method, MR encoding and M encoding are performed according to the correlation between the image of the previous line and the image of the current line.
Since the H coding is selected, it is possible to improve the compression efficiency using the correlation of images.

【0063】このようにしても、MH符号化ラインが
適切に挿入され、又は同一パターンのため、エラーに対
するリカバリー性能が低下することもない。
Even in this case, since the MH coded line is properly inserted or the same pattern is used, the recovery performance against errors does not deteriorate.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】本発明の実施例構成図である。FIG. 2 is a configuration diagram of an embodiment of the present invention.

【図3】本発明の第1の実施例処理フロー図である。FIG. 3 is a processing flowchart of the first embodiment of the present invention.

【図4】本発明の第1の実施例説明図である。FIG. 4 is an explanatory diagram of the first embodiment of the present invention.

【図5】本発明の第2の実施例処理フロー図である。FIG. 5 is a processing flowchart of the second embodiment of the present invention.

【図6】従来技術の説明図(その1)である。FIG. 6 is an explanatory diagram (1) of a conventional technique.

【図7】従来技術の説明図(その2)である。FIG. 7 is an explanatory diagram (part 2) of the conventional technique.

【図8】従来技術の問題点説明図である。FIG. 8 is a diagram illustrating a problem of the conventional technique.

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

1 全白検出分 2 ラインバッファ 3 制御部 4 記憶部 5 符号生成部 6 MH符号化部 7 MR符号化部 1 Total White Detection 2 Line Buffer 3 Controller 4 Storage 5 Code Generator 6 MH Coding 7 MR Coding

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 前ラインの画データの変化点と、現ライ
ンの画データとの変化点との相対位置に応じて、現ライ
ンの画データをパス符号、水平符号、垂直符号を用いて
MR符号化するデータ圧縮方法において、 前ラインの画データと現ラインの画データとのいずれか
一方の画データが全白であり、他方の画データが非全白
であることを検出して、該現ラインの画データを、黒又
は白のランレングスを示す符号でMH符号化することを
特徴とするデータ圧縮方法。
1. The image data of the current line is MR-processed by using a pass code, a horizontal code, and a vertical code according to the relative position of the change point of the image data of the previous line and the change point of the image data of the current line. In the data compression method for encoding, it is detected that one of the image data of the previous line and the image data of the current line is all white, and the other image data is not all white, A data compression method characterized in that the image data of the current line is MH-encoded with a code indicating a black or white run length.
【請求項2】 前記MR符号化ラインが、所定ライン数
続いたことにより、次のラインの画データを前記MH符
号化することを特徴とする請求項1のデータ圧縮方法。
2. The data compression method according to claim 1, wherein the image data of the next line is MH-encoded when the MR encoded line continues for a predetermined number of times.
【請求項3】 前ラインの画データの変化点と、現ライ
ンの画データとの変化点との相対位置に応じて、現ライ
ンの画データをパス符号、水平符号、垂直符号を用いて
MR符号化し、該MR符号化ラインが、所定ライン数続
いたことにより、次のラインの画データを、黒又は白の
ランレングスを示す符号でMH符号化するデータ圧縮方
法において、 前ラインの画データと現ラインの画データとが、同一パ
ターンであることを検出して、該現ラインの画データを
該MR符号化することを特徴とするデータ圧縮方法。
3. The image data of the current line is MR-processed by using a pass code, a horizontal code, and a vertical code according to the relative position of the change point of the image data of the previous line and the change point of the image data of the current line. In the data compression method, the image data of the previous line is MH-encoded by encoding and the image data of the next line is MH-encoded with a code indicating a black or white run length when the MR encoded line continues for a predetermined number of lines. And the image data of the current line are detected to have the same pattern, and the image data of the current line is MR-encoded.
【請求項4】 前記前ラインの画データと現ラインの画
データとのいずれか一方の画データが全白であり、他方
の画データが非全白であることを検出して、該現ライン
の画データを、黒又は白のランレングスを示す符号でM
H符号化することを特徴とする請求項3のデータ圧縮方
法。
4. The current line is detected by detecting that one of the image data of the previous line and the image data of the current line is all white, and the other image data is non-white. Image data of M with a code indicating the black or white run length.
4. The data compression method according to claim 3, wherein H coding is performed.
【請求項5】 前記前ラインの画データと現ラインの画
データとが、同一パターンであることを検出して、該現
ラインの画データを前記MR符号化したことにより、前
記同一パターンによる前記MR符号化ラインの連続許容
数を多くしたことを特徴とする請求項3又は4のデータ
圧縮方法。
5. The image data of the previous line and the image data of the current line are detected to have the same pattern, and the image data of the current line is MR-coded so that the image data of the same pattern is obtained. The data compression method according to claim 3 or 4, characterized in that the maximum number of consecutive MR encoded lines is increased.
【請求項6】 前記同一パターンが、全白パターンであ
ることを特徴とする請求項3又は4又は5のデータ圧縮
方法。
6. The data compression method according to claim 3, wherein the same pattern is an all-white pattern.
JP3307445A 1991-11-22 1991-11-22 Data compressing method Pending JPH05145767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3307445A JPH05145767A (en) 1991-11-22 1991-11-22 Data compressing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3307445A JPH05145767A (en) 1991-11-22 1991-11-22 Data compressing method

Publications (1)

Publication Number Publication Date
JPH05145767A true JPH05145767A (en) 1993-06-11

Family

ID=17969154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3307445A Pending JPH05145767A (en) 1991-11-22 1991-11-22 Data compressing method

Country Status (1)

Country Link
JP (1) JPH05145767A (en)

Similar Documents

Publication Publication Date Title
US6728408B1 (en) Water-mark embedding method and system
US5056154A (en) Text image data compression system
US5717497A (en) Image-data transmitter having function of automatic segmented image coding
CN110766594A (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
JPWO2004068844A1 (en) Image compression method, image restoration method, program, and apparatus
JP2003528475A (en) System for detecting redundant images in a video sequence
Niimi et al. High capacity and secure digital steganography to palette-based images
CN113179407B (en) Video watermark embedding and extracting method and system based on interframe DCT coefficient correlation
JP3514050B2 (en) Image processing device
JPH08125868A (en) Method and device for processing picture
JP2836681B2 (en) Pattern matching encoding method and encoding device
JPH05145767A (en) Data compressing method
JPH04356873A (en) Adaptive encoding system for color document image
JP4218117B2 (en) Transmission device, transmission method, reception device, and reception method
JP3156691B2 (en) Encoding method and encoding device using pattern matching
JPH07152915A (en) Image encoding device and decoding device
US7889884B2 (en) Image processing apparatus and method
US6674912B2 (en) Data compression processing method and apparatus
CN110087073B (en) Multi-threshold string matching data compression method
JP3948581B2 (en) Image coding method
JP3051144B2 (en) Halftone image processing device
US5452092A (en) Changing pixel detector for coding of image data
JP3135311B2 (en) Image processing device
JPH05153413A (en) Data compressing method and decoding method
JP3259989B2 (en) Binary and multi-valued mixed coded image data restoration method and apparatus