JP2000236448A - Data compressor - Google Patents

Data compressor

Info

Publication number
JP2000236448A
JP2000236448A JP11035227A JP3522799A JP2000236448A JP 2000236448 A JP2000236448 A JP 2000236448A JP 11035227 A JP11035227 A JP 11035227A JP 3522799 A JP3522799 A JP 3522799A JP 2000236448 A JP2000236448 A JP 2000236448A
Authority
JP
Japan
Prior art keywords
pixel value
data
gradation
pattern
pixel
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
JP11035227A
Other languages
Japanese (ja)
Inventor
Masayuki Tanaka
公幸 田中
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data Corp
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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP11035227A priority Critical patent/JP2000236448A/en
Publication of JP2000236448A publication Critical patent/JP2000236448A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the compressibility of multi-valued image data by outputting a binarize-expressed gradation pattern corresponding to a pixel value and selecting and compressing a gradation pattern corresponding to the pixel value so as to increase regularity seen from an arraying direction. SOLUTION: Multi-valued image data are accepted from an input device 1 to be compress-processed and outputted to an outputting device 2. Then, a pixel scanning part 3 fetches each pixel value included in a multi-valued image. A pattern conversion part 4 accepts the pixel value outputted by this part 3 and outputs the binarize-expressed gradation pattern corresponding to the pixel value. A data compressing part 5 arrays the gradation patterns outputted by the part 4 in the order of outputting and executes data compression by using regularity seen from the arraying pattern. In this case, the part 4 outputs the gradation patterns corresponding to each pixel value which is obtained by selecting dot array so as to increase regularity seen from the arraying direction.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、多値画像データを
受け入れて、これを圧縮し、出力するためのデータ圧縮
装置に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a data compression apparatus for receiving multi-valued image data, compressing the data, and outputting the data.

【0002】[0002]

【従来の技術】上位装置で作成された画像データを出力
装置に転送したり、あるいは記憶装置に記憶するような
場合、データ量を縮小するためにデータ圧縮が行われ
る。白または黒の画素のみから構成される2値画像デー
タの圧縮には、ランレングス符号化法、ハフマン符号化
法、MMR符号化法等の手法が知られている。
2. Description of the Related Art When image data created by a host device is transferred to an output device or stored in a storage device, data compression is performed to reduce the amount of data. Methods such as run-length encoding, Huffman encoding, and MMR encoding are known for compressing binary image data composed of only white or black pixels.

【0003】ランレングス符号化法では、圧縮対象とな
る画像データの1ラスタライン毎に、連続する白画素ま
たは黒画素の固まり(ラン)を検出する。そして、この
ランの長さ毎に任意の符号を割り当てて、これらの符号
の系列でラスタライン内の全ての画素の並びを記述す
る。頻繁に出現するラン長に対しては短いビットの符号
を割り当て、出現頻度の少ないラン長に対しては長いビ
ットの符号を割り当てる。こうして、1ラスタラインの
データ量を圧縮することができる。こうした技術が、例
えばファクシミリ装置等で広く利用されている。
In the run-length encoding method, a block (run) of continuous white pixels or black pixels is detected for each raster line of image data to be compressed. Then, an arbitrary code is assigned to each length of the run, and the arrangement of all the pixels in the raster line is described by a sequence of these codes. A short bit code is assigned to a run length that frequently appears, and a long bit code is assigned to a run length that appears less frequently. Thus, the data amount of one raster line can be compressed. Such techniques are widely used in, for example, facsimile machines.

【0004】一方、多値画像データの圧縮には、JPE
G方式やZiv−Lempel方式等が知られている。前者は動
画像や静止画像の圧縮に適するが、圧縮後のデータから
圧縮前のデータを完全に再現できない非可逆的な圧縮方
法である。また、後者は、文書等の文字コードデータを
圧縮するのに適する方法である。
On the other hand, compression of multi-valued image data is performed by JPE
The G method and the Ziv-Lempel method are known. The former is an irreversible compression method that is suitable for compression of moving images and still images, but cannot completely reproduce data before compression from data after compression. The latter is a method suitable for compressing character code data of a document or the like.

【0005】[0005]

【発明が解決しようとする課題】ところで、上記のよう
な従来の技術には、次のような解決すべき課題があっ
た。例えば、上位装置からプリンタに印刷データを伝送
する場合には、印刷データを一時的に圧縮し、プリンタ
で受信後に再び復元するといった方法が採用される。こ
の場合には、可逆的なデータ圧縮が要求される。また、
プリンタに転送する印刷データには、一般に多数の文字
画像が含まれる。写真等の連続階調画像を処理するため
の多値画像データ圧縮方法では、こうした文字画像に対
し画質劣化が目立つという問題がある。また、複雑な演
算処理が必要になり、適用可能な画像のビット長にも制
限がある。
However, the above-mentioned prior art has the following problems to be solved. For example, when print data is transmitted from a higher-level device to a printer, a method of temporarily compressing the print data, restoring it after receiving it by the printer, and the like is adopted. In this case, reversible data compression is required. Also,
Print data transferred to a printer generally includes a large number of character images. The multi-valued image data compression method for processing a continuous tone image such as a photograph has a problem that image quality degradation is conspicuous for such a character image. In addition, complicated arithmetic processing is required, and the bit length of an applicable image is limited.

【0006】そこで、1枚の多値画像を複数枚の2値ビ
ットプレーン画像に分解する。即ち、多値画像の各画素
値の最上位ビットのみを集めたビットプレーン画像、2
番目のビットのみを集めたビットプレーン画像といった
要領で、画素値のビット数分のビットプレーン画像を用
意する。そして、各ビットプレーン画像毎に2値画像デ
ータ圧縮方法を用いて圧縮する。
Therefore, one multi-valued image is decomposed into a plurality of binary bit plane images. That is, a bit plane image in which only the most significant bit of each pixel value of the multi-valued image is collected,
A bit plane image corresponding to the number of bits of the pixel value is prepared in a manner such as a bit plane image in which only the second bit is collected. Then, each bit plane image is compressed using a binary image data compression method.

【0007】ところが、下位ビットプレーン画像の各ビ
ットはばらつきが大きくなるから、十分な圧縮率が得ら
れないという問題があった。また、ビットプレーン画像
への分解には多くのメモリが必要で、最大階調数即ち画
素値を表すためのビット数も制限を受ける。従って、多
値画像データの圧縮をする場合に、より圧縮率が高く、
最大階調数にも制限を受けない圧縮方法の確立が望まれ
ている。
However, there is a problem that a sufficient compression ratio cannot be obtained because each bit of the lower-order bit plane image has large variations. In addition, a large amount of memory is required for decomposing into a bit plane image, and the maximum number of gradations, that is, the number of bits for representing pixel values is also limited. Therefore, when compressing multi-valued image data, the compression ratio is higher,
It is desired to establish a compression method that is not restricted by the maximum number of gradations.

【0008】[0008]

【課題を解決するための手段】本発明は以上の点を解決
するため次の構成を採用する。 〈構成1〉多値画像データに含まれる各画素値を取り出
す画素スキャン部と、この画素スキャン部の出力する画
素値を受け入れて、その画素値に対応する2値表現され
た階調パターンを出力するパターン変換部と、上記パタ
ーン変換部の出力する階調パターンを出力順に配列し
て、配列方向に見た規則性を利用してデータ圧縮をする
データ圧縮部とを備え、上記パターン変換部は、上記配
列方向に見た規則性が大きくなるようにドット配列を選
定した、各画素値に対応する階調パターンを出力するこ
とを特徴とするデータ圧縮装置。
The present invention employs the following structure to solve the above problems. <Structure 1> A pixel scanning unit for extracting each pixel value included in the multi-valued image data, and accepting a pixel value output from the pixel scanning unit, and outputting a binary gradation pattern corresponding to the pixel value And a data compression unit that arranges the gradation patterns output by the pattern conversion unit in the output order, and compresses the data using regularity seen in the arrangement direction. And outputting a gradation pattern corresponding to each pixel value, wherein the dot arrangement is selected so that the regularity seen in the arrangement direction becomes large.

【0009】〈構成2〉構成1に記載のデータ圧縮装置
において、上記パターン変換部は、上記階調パターンを
出力順に配列したとき、上記配列方向に同種類の画素が
並ぶ確率が高くなるようにドット配列を選定した、各画
素値に対応する階調パターンを出力することを特徴とす
るデータ圧縮装置。
<Structure 2> In the data compression device according to Structure 1, the pattern conversion unit may increase the probability that pixels of the same type are arranged in the arrangement direction when the gradation patterns are arranged in the output order. A data compression device for outputting a gradation pattern corresponding to each pixel value in which a dot array is selected.

【0010】〈構成3〉構成1に記載のデータ圧縮装置
において、上記パターン変換部は、上記階調パターンを
出力順に配列したとき、上記配列方向に一定の組み合わ
せのドットが並ぶ確率が高くなるようにドット配列を選
定した、各画素値に対応する階調パターンを選択するこ
とを特徴とするデータ圧縮装置。
<Structure 3> In the data compression apparatus according to Structure 1, the pattern conversion section may increase the probability that dots of a certain combination are arranged in the arrangement direction when the gradation patterns are arranged in the output order. A data compression apparatus for selecting a gradation pattern corresponding to each pixel value in which a dot array is selected.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態を具体
例を用いて説明する。図1は、本発明のデータ圧縮装置
を示すブロック図である。この装置は、入力装置1から
多値画像データを受け入れて圧縮処理し、出力装置2に
出力するよう構成されている。入力装置1は例えば多値
画像データを生成するアプリケーションや上位装置、出
力装置は、例えば記憶装置やプリンタ等である。この装
置には、画素スキャン部3、パターン変換部4、2値デ
ータ圧縮部5、パターン変換テーブル6が設けられてい
る。パターン変換テーブル6には、図の上部に示すよう
な階調パターン7が記憶されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below using specific examples. FIG. 1 is a block diagram showing a data compression device according to the present invention. This device is configured to receive multivalued image data from an input device 1, perform compression processing, and output the compressed data to an output device 2. The input device 1 is, for example, an application or a higher-level device that generates multi-valued image data, and the output device is, for example, a storage device or a printer. This device includes a pixel scanning unit 3, a pattern conversion unit 4, a binary data compression unit 5, and a pattern conversion table 6. The pattern conversion table 6 stores a gradation pattern 7 as shown in the upper part of the figure.

【0012】この例では、例えば多値画像データの各画
素値は、0から7までの8種類で表現される。この画素
値に対応する2値表現された階調パターンを、パターン
変換テーブル6に記憶する。即ち、パターン変換テーブ
ル6には8種類の階調パターン7が記憶されている。図
の階調パターン7は、3×3マトリクスによって構成さ
れており、各ます目に書き込まれた数値は、画素値が
“1”増加する度に白画素から黒画素に切り替わる画素
の順番を示している。
In this example, for example, each pixel value of the multi-valued image data is represented by eight types from 0 to 7. The binary gradation pattern corresponding to the pixel value is stored in the pattern conversion table 6. That is, the pattern conversion table 6 stores eight types of gradation patterns 7. The gradation pattern 7 in the figure is constituted by a 3 × 3 matrix, and the numerical value written in each cell indicates the order of the pixels that are switched from white pixels to black pixels each time the pixel value increases by “1”. ing.

【0013】即ち、例えば画素値が“1”の場合には、
図の階調パターン7の右上隅の“1”という数字を記入
した部分のみが黒ドットとなり、他の部分は白ドットと
なる。また、画素値が“2”の場合には、(1)の行で
右上隅と上中央の数値が1,2と書き込まれた部分が黒
ドットとなり、他の部分は白ドットとなる。入力装置1
から順に入力し、画像データ中に順番に配列される上記
のような階調パターン7の配列方向を図の矢印Aとし
た。
That is, for example, when the pixel value is "1",
Only the portion of the upper right corner of the gradation pattern 7 in which the numeral "1" is entered becomes a black dot, and the other portions become white dots. When the pixel value is “2”, the portion where the numerical value of the upper right corner and the upper center is written as 1 and 2 in the row of (1) becomes a black dot, and the other portions become white dots. Input device 1
, And the arrangement direction of the above gradation patterns 7 arranged in order in the image data is indicated by an arrow A in the figure.

【0014】この場合に、上記のような階調パターン7
を採用すると、画素値が“3”以上のものは、図の
(1)に示す行の各ドットが全て黒ドットとなる。ま
た、画素値が“7”に満たないものは(3)に示した行
のドットは全て白ドットとなる。従って、このような階
調パターン7が矢印Aの方向に多数配列されたデータ
は、黒ランや白ランが発生する確率が高い。即ち黒ドッ
トや白ドットが配列方向に連続して並ぶ確率が高い。従
って、これを従来のランレングス法等によってデータ圧
縮すると、高い圧縮率でデータを圧縮することができ
る。
In this case, the gradation pattern 7 as described above is used.
Is adopted, when the pixel value is “3” or more, all the dots in the row shown in FIG. If the pixel value is less than "7", all the dots in the row shown in (3) are white dots. Therefore, data in which a large number of such tone patterns 7 are arranged in the direction of arrow A has a high probability of occurrence of black runs and white runs. That is, there is a high probability that black dots and white dots are continuously arranged in the arrangement direction. Therefore, if the data is compressed by a conventional run length method or the like, the data can be compressed at a high compression rate.

【0015】図2に、データ圧縮方法と階調パターンの
変形説明図を示す。図2(a)は、横一列に並んだ2値
化画像データ8の一例を示す。図に示すように、例えば
長さが“4”の白ラン、長さが“3”の黒ラン、長さが
“5”の黒ラン、長さが“1”の白ランといったデータ
が含まれる場合、図の(b)に示すように、各ラン長に
対し一定の符号5を当てはめる。
FIG. 2 shows a data compression method and a modified explanatory diagram of a gradation pattern. FIG. 2A shows an example of the binarized image data 8 arranged in one horizontal line. As shown in the figure, for example, data such as a white run having a length of “4”, a black run having a length of “3”, a black run having a length of “5”, and a white run having a length of “1” are included. In this case, a fixed code 5 is applied to each run length as shown in FIG.

【0016】この(b)に示す例では、ラン長が“1”
の場合の符号語が“0000”、ラン長が16の場合の
符号語が“1111”である。従って、ラン長が長くな
るほど圧縮率が高くなる。このため、上記のような階調
パターン7が、図1に示す矢印Aの方向に長く配列され
ると、高い圧縮率での圧縮が可能になる。なお、上記の
ような画素が並ぶ確率が高くなるように階調パターンを
選択する方法は、例えば図2(c)〜(f)に示すよう
な変形が可能である。
In the example shown in FIG. 2B, the run length is "1".
Is "0000", and when the run length is 16, the code word is "1111". Therefore, the longer the run length, the higher the compression ratio. For this reason, when the gradation patterns 7 as described above are arranged long in the direction of the arrow A shown in FIG. 1, compression at a high compression ratio becomes possible. Note that the above-described method of selecting a gradation pattern so as to increase the probability that pixels are arranged can be modified as shown in FIGS. 2C to 2F, for example.

【0017】(c)は、図1に示した例と同一である。
(d)は、(c)の丁度左右が反対になった例を示す。
(e)は、(c)の上下を反対にした例で、(f)は
(e)の左右を反対にした例である。いずれの場合にお
いても、図1に示す矢印Aの方向に階調パターン7が配
列された場合に高い圧縮率を得ることができる。
(C) is the same as the example shown in FIG.
(D) shows an example in which the right and left sides of (c) are reversed.
(E) is an example in which (c) is upside down, and (f) is an example in which (e) is upside down. In any case, a high compression ratio can be obtained when the gradation patterns 7 are arranged in the direction of arrow A shown in FIG.

【0018】図3には、配列方向の規則性説明図を示
す。この図を用いて、上記のような階調パターンが配列
された場合の圧縮率向上効果を説明する。図に示す元画
像データ11は、多値画像データの各画素値を数字で示
した構造のものである。これまでの例の通り、1画素の
画素値を0〜7までの範囲に選定している。この各画素
の画素値を上記のように2値階調パターンに変換する
と、図の右側あるいは下側に示すように、各階調パター
ンが配列される。右側はポートレイト形式の用紙に印刷
される画像のイメージデータを示す。
FIG. 3 is a diagram for explaining the regularity in the arrangement direction. The effect of improving the compression ratio when the above gradation patterns are arranged will be described with reference to FIG. The original image data 11 shown in the figure has a structure in which each pixel value of the multi-valued image data is indicated by a numeral. As in the examples so far, the pixel value of one pixel is selected in the range of 0 to 7. When the pixel value of each pixel is converted into a binary tone pattern as described above, the tone patterns are arranged as shown on the right side or the lower side of the figure. The right side shows image data of an image to be printed on portrait format paper.

【0019】各階調パターンは、この例では、Xの方向
に順番に配列される。3×3ドットで構成された階調パ
ターンは、それぞれ対応する黒ドットと白ドットの組み
合わせで図に示すように配列されている。この例を見て
分かるように、例えば画素値が5,6,5というように
並ぶ場合、黒ドットがX方向に連続する部分と白ドット
がX方向に連続する部分が多く存在する。これによっ
て、X方向に見たデータ圧縮を行うと高い圧縮率でデー
タを圧縮できる。
In this example, each gradation pattern is sequentially arranged in the X direction. The gradation pattern composed of 3 × 3 dots is arranged as shown in the figure by a combination of corresponding black dots and white dots. As can be seen from this example, for example, when the pixel values are arranged as 5, 6, and 5, there are many portions where black dots continue in the X direction and portions where white dots continue in the X direction. Thus, when data compression is performed in the X direction, data can be compressed at a high compression rate.

【0020】なお、従来、階調パターンは、なるべく黒
ドットの位置を分散させるように設定していた。従っ
て、階調パターンを用いる2値化後のデータは、圧縮率
が極めて低い傾向があった。本発明では、この図に示す
ように階調パターンの配列方向に同種類の画素が並ぶ確
率が高くなるようにドット配列を選定した、圧縮率を高
めている。
Conventionally, the gradation pattern is set so that the positions of the black dots are dispersed as much as possible. Therefore, data after binarization using a gradation pattern tends to have a very low compression ratio. In the present invention, as shown in this figure, the dot arrangement is selected so that the probability that pixels of the same type are arranged in the arrangement direction of the gradation pattern is increased, and the compression ratio is increased.

【0021】図の下側に示す用紙13は、ランドスケー
プ形式の用紙である。このような場合にも、例えば階調
パターンをY方向に配列して出力する場合には、このY
方向に同一の値の画素が並ぶ確率が高くなるようにドッ
ト配列を選定する。これによって、同様の効果が得られ
る。
The paper 13 shown on the lower side of the figure is a landscape type paper. Even in such a case, for example, when the gradation patterns are arranged and output in the Y direction, this Y
The dot arrangement is selected so that the probability that pixels having the same value are aligned in the direction is high. Thereby, a similar effect can be obtained.

【0022】なお、上記の例では、同一の値の画素が並
ぶ確率が高くなるようにした例を示したが、例えば配列
方向に一定の組み合わせのドットが並ぶ確率が高くなる
ようにしてもよい。即ち、白ドットと黒ドットの組み合
わせから成る一定のパターンが配列方向に見て何回も繰
り返される場合、そのようなパターンの繰り返し状態を
符号化し圧縮するという方法も考えられる。例えば“0
11”というパターンが繰り返された数に応じて、一定
の符号を決定する。こうしてデータ圧縮することも可能
である。
In the above example, the example in which the probability that pixels having the same value are arranged is increased. However, for example, the probability that dots of a certain combination are arranged in the arrangement direction may be increased. . That is, when a certain pattern composed of a combination of white dots and black dots is repeated many times as viewed in the arrangement direction, a method of coding and compressing the repetition state of such a pattern may be considered. For example, "0
A fixed code is determined according to the number of times the pattern of "11" is repeated. In this way, data can be compressed.

【0023】以下、図1に示す装置の各部分の具体的な
動作を説明する。図4は、画素スキャン部3の動作説明
図を示す。画素スキャン部3は、入力装置1から入力す
る信号を出力装置の要求に応じた配列にして取り出し、
これをパターン変換部4に出力する機能を持つ。例え
ば、出力装置が電子写真方式プリンタの場合、図4
(a)に示すように、用紙の幅方向に1ラインずつスキ
ャンするようなデータ配列が要求される。即ち、用紙の
幅方向に主走査し、高さ方向に副走査するように、1ラ
イン分ずつデータを取り出して出力する。
The specific operation of each part of the apparatus shown in FIG. 1 will be described below. FIG. 4 is a diagram illustrating the operation of the pixel scanning unit 3. The pixel scanning unit 3 takes out the signals input from the input device 1 in an array according to the request of the output device,
It has a function of outputting this to the pattern conversion unit 4. For example, when the output device is an electrophotographic printer, FIG.
As shown in (a), a data array that scans one line at a time in the width direction of the sheet is required. That is, data is taken out and output one line at a time so that main scanning is performed in the width direction of the paper and sub scanning is performed in the height direction.

【0024】一方、インクジェットプリンタやドットイ
ンパクトプリンタのような、いわゆるシリアルプリンタ
の場合には、副走査方向に並んだノズル群を持つヘッド
を主走査方向に移動させて印刷を行う。そこで、データ
を供給するための順番は異なってくる。即ち、図4
(b)に示すように、ヘッドの高さに相当する画素デー
タ群を取り出し、この動作を幅方向に順番に繰り返すと
いったスキャンを実行する。ヘッドの高さ分の帯状の画
素データ群を取り出した後は、ヘッドを高さ方向に、丁
度ヘッドの高さ分だけ位置をずらし、同様のスキャンを
実行する。
On the other hand, in the case of a so-called serial printer such as an ink jet printer or a dot impact printer, printing is performed by moving a head having a nozzle group arranged in the sub scanning direction in the main scanning direction. Therefore, the order for supplying data differs. That is, FIG.
As shown in (b), a scan is performed in which a pixel data group corresponding to the height of the head is taken out, and this operation is sequentially repeated in the width direction. After extracting the band-like pixel data group corresponding to the height of the head, the head is shifted in the height direction by exactly the height of the head, and a similar scan is performed.

【0025】画素スキャン部3は、例えばこのような動
作をして、多値画像データに含まれる各画素値を取り出
してパターン変換部4に転送する。パターン変換部4
は、各画素値に対応する図1に示したような階調パター
ンを出力する。2値データ圧縮部5は、パターン変換部
4から出力された画像データを2値データの集合と見な
し、その2値データの配列方向にデータを圧縮する。
The pixel scanning unit 3 performs, for example, such an operation to extract each pixel value included in the multi-valued image data and transfer it to the pattern conversion unit 4. Pattern converter 4
Outputs a gradation pattern as shown in FIG. 1 corresponding to each pixel value. The binary data compression unit 5 regards the image data output from the pattern conversion unit 4 as a set of binary data, and compresses the data in the arrangement direction of the binary data.

【0026】図5には、図2に示したパターン変換部4
の動作フローチャートを示す。まず、ステップS1にお
いて、画素スキャン部3から読み出すべき画素の座標値
を初期化する。そして、次のステップS2において、1
行分の画素の取り込み処理を行う。次のステップS3に
おいて、1行ずつ1ページ分の画素読み込みが終了する
までステップS2の処理を繰り返す。
FIG. 5 shows the pattern converter 4 shown in FIG.
2 shows an operation flowchart. First, in step S1, the coordinate values of pixels to be read from the pixel scanning unit 3 are initialized. Then, in the next step S2, 1
The processing for taking in the pixels for the row is performed. In the next step S3, the processing of step S2 is repeated until pixel reading for one page is completed line by line.

【0027】図6(a)には、このステップS2のサブ
ルーチンフローチャートを示す。まず、図6のステップ
S11において、X,Yの座標値で指定した画素をスキ
ャンし、ステップS12において、その画素値をスキャ
ンメモリへ格納する。スキャンメモリは、図の(b)に
示すように、読み込んだ順番に画素値を配列して記憶し
たメモリである。図には、印刷イメージを考慮して横
X、縦Yの形状のメモリを図示したが、メモリは、実際
には入力された全てのデータをシリアルに連続的に記憶
できればよい。
FIG. 6A shows a subroutine flowchart of step S2. First, in step S11 in FIG. 6, a pixel specified by X and Y coordinate values is scanned, and in step S12, the pixel value is stored in a scan memory. The scan memory is a memory in which pixel values are arranged and stored in the order of reading, as shown in FIG. In the figure, a memory having a horizontal X and a vertical Y shape is illustrated in consideration of a print image. However, the memory only needs to be able to serially and continuously store all input data.

【0028】図6ステップS13において、Xをインク
リメントし、ステップS14において、1行分のスキャ
ンを終了するまで繰り返し制御を行う。そして、1行分
の処理が終了すると、ステップS15において、Xを
“0”に初期化し、Yをインクリメントする。こうし
て、図5のステップS3に進む。以上の処理によって、
1ページ分の画素値が図6(b)に示すようにスキャン
メモリに記憶されると、図5ステップS4において、最
大階調数、画像データ幅及び画像データ高の設定を行
う。そして、ステップS5において、X,Yの値を初期
化する。
In step S13 in FIG. 6, X is incremented, and in step S14, control is repeatedly performed until scanning of one row is completed. When the processing for one row is completed, X is initialized to "0" and Y is incremented in step S15. Thus, the process proceeds to step S3 in FIG. By the above processing,
When the pixel values for one page are stored in the scan memory as shown in FIG. 6B, the maximum gradation number, image data width and image data height are set in step S4 in FIG. Then, in step S5, the values of X and Y are initialized.

【0029】次のステップS6では、1行分ずつ画素の
階調パターンへの変換処理を実行する。ステップS7
は、この画素の階調パターン変換処理を1ページ分行う
まで、ステップS6を繰り返す制御を行う部分である。
In the next step S6, a process of converting the pixels into gradation patterns for each row is executed. Step S7
Is a part for performing control to repeat step S6 until the gradation pattern conversion processing of this pixel is performed for one page.

【0030】図7(a)には、このような1行画素のパ
ターン化処理サブルーチンフローチャートを示す。図7
において、ステップS16では、スキャンメモリ中の
X,Yに格納した画素値を読み出す。そして、ステップ
S17において、読み出した多値画像データをこれまで
説明したような階調パターンに変換し、パターンメモリ
へ格納する。
FIG. 7A is a flowchart of a subroutine for patterning one row of pixels. FIG.
In step S16, the pixel values stored in X and Y in the scan memory are read. Then, in step S17, the read multi-valued image data is converted into a gradation pattern as described above and stored in the pattern memory.

【0031】図7(b)は、パターンメモリの構成を説
明し、図に示すように、上記の例では、横3X、縦3Y
の記憶領域を持つ。なお、この場合にも、メモリは通
常、入力された順にシリアルにデータを取り出すことが
できるようなものであればよく、このように縦横にパタ
ーン化をされている必要はない。各階調パターンの内容
は、これまで説明した通りである。
FIG. 7B illustrates the structure of the pattern memory. As shown in FIG.
Storage area. Also in this case, the memory may be any memory as long as it can take out data serially in the order of input, and it is not necessary to pattern the data vertically and horizontally. The contents of each gradation pattern are as described above.

【0032】図7ステップS18において、1行分が終
了したかどうかを判断し、全ての画素値について、階調
パターンへの変換を実行する。そして、1行分の処理が
終了すると、ステップS20に進み、Xを“0”に初期
化し、Yをインクリメントする。このような処理を図5
のステップS7の制御によって1ページ分繰り返す。1
ページ分の処理が終了すると、パターン変換部の動作を
終了する。
In step S18 in FIG. 7, it is determined whether or not one row has been completed, and conversion to a gradation pattern is executed for all pixel values. When the processing for one row is completed, the process proceeds to step S20, where X is initialized to “0” and Y is incremented. FIG. 5 shows such processing.
Is repeated for one page under the control of step S7. 1
When the processing for the page ends, the operation of the pattern conversion unit ends.

【0033】ステップS8では、XとYを“0”に初期
化し、ステップS10で、圧縮処理を開始する。この場
合には、図7に示したパターンメモリの上から1行ずつ
圧縮処理を進める。そして、ステップS10で、1ペー
ジ分の繰り返し処理を制御する。図7(c)は、この圧
縮処理のサブルーチンである。
In step S8, X and Y are initialized to "0", and in step S10, compression processing is started. In this case, the compression processing is advanced line by line from the top of the pattern memory shown in FIG. Then, in step S10, the repetition processing for one page is controlled. FIG. 7C shows a subroutine of this compression processing.

【0034】図7ステップS21において、パターンメ
モリのY行目を呼び出し、ランレングス法によって圧縮
し出力する。ステップS22では、Yをインクリメント
する。こうして、Yが“0”から最終行に至るまでの圧
縮処理を実行する。
In step S21 of FIG. 7, the Y-th row of the pattern memory is called, compressed and output by the run-length method. In step S22, Y is incremented. In this way, the compression process from Y to “0” to the last line is executed.

【0035】以上のような制御を行うことによって、目
的とする2値化された画像データの圧縮が終了する。従
って、例えば図4に示す電子写真方式の場合には、幅方
向の1ライン毎に、インパクト系のプリンタの場合には
ヘッドの長さ分ずつデータの圧縮が行われ、これが図1
に示す出力装置2に向けて出力されることになる。出力
装置2の側では、受け取ったデータを対応するアルゴリ
ズムによって復号化し、更に上記パターン変換部と同様
の階調パターン7を用いて逆変換をすることにより、元
の多値画像データを復元できる。
By performing the above control, the compression of the target binarized image data is completed. Therefore, for example, in the case of the electrophotographic system shown in FIG. 4, data is compressed for each line in the width direction, and in the case of an impact type printer, data is compressed by the length of the head.
Is output to the output device 2 shown in FIG. On the output device 2 side, the received multi-valued image data can be restored by decoding the received data using a corresponding algorithm and then performing an inverse conversion using the same gradation pattern 7 as in the pattern conversion unit.

【0036】[0036]

【発明の効果】以上のように、本発明によれば、多値画
像データに含まれる各画素値を装置の出力順に取り出
し、その画素値に対応する2値表現された階調パターン
を出力し、配列方向に見た規則性が大きくなるように画
素値に対応する階調パターンを選択し、圧縮するように
したので、多値画像データを効率よく、高い圧縮率で圧
縮することが可能になる。また、これによって、パター
ン変換テーブル6の内容を設定するだけで、多値画像デ
ータの最大階調数に影響を受けることなく、高い効率で
データを圧縮し、出力することが可能になる。
As described above, according to the present invention, each pixel value included in the multi-valued image data is extracted in the output order of the apparatus, and a binary gradation pattern corresponding to the pixel value is output. Since the gradation pattern corresponding to the pixel value is selected and compressed so that the regularity seen in the arrangement direction is increased, the multi-valued image data can be efficiently compressed at a high compression ratio. Become. In addition, this makes it possible to compress and output data with high efficiency simply by setting the contents of the pattern conversion table 6 without being affected by the maximum number of gradations of multi-valued image data.

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

【図1】本発明のデータ圧縮装置ブロック図である。FIG. 1 is a block diagram of a data compression device according to the present invention.

【図2】データ圧縮方法と階調パターンの変形例説明図
である。
FIG. 2 is a diagram illustrating a data compression method and a modification of a gradation pattern.

【図3】配列方向の規則性説明図である。FIG. 3 is an explanatory diagram of regularity in an arrangement direction.

【図4】画素スキャン部の動作説明図である。FIG. 4 is a diagram illustrating the operation of a pixel scanning unit.

【図5】パターン変換部以下の動作フローチャートであ
る。
FIG. 5 is an operation flowchart of a pattern conversion unit and below.

【図6】サブルーチンフローチャート(その1)であ
る。
FIG. 6 is a subroutine flowchart (part 1).

【図7】サブルーチンフローチャート(その2)であ
る。
FIG. 7 is a subroutine flowchart (part 2).

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

1 入力装置 2 出力装置 3 画素スキャン部 4 パターン変換部 5 2値データ圧縮部 6 パターン変換テーブル 7 階調パターン DESCRIPTION OF SYMBOLS 1 Input device 2 Output device 3 Pixel scan part 4 Pattern conversion part 5 Binary data compression part 6 Pattern conversion table 7 Gradation pattern

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 多値画像データに含まれる各画素値を取
り出す画素スキャン部と、 この画素スキャン部の出力する画素値を受け入れて、そ
の画素値に対応する2値表現された階調パターンを出力
するパターン変換部と、 前記パターン変換部の出力する階調パターンを出力順に
配列して、配列方向に見た規則性を利用してデータ圧縮
をするデータ圧縮部とを備え、 前記パターン変換部は、前記配列方向に見た規則性が大
きくなるようにドット配列を選定した、各画素値に対応
する階調パターンを出力することを特徴とするデータ圧
縮装置。
1. A pixel scanning unit for extracting each pixel value included in multi-valued image data, and a pixel value output from the pixel scanning unit is received, and a binary gradation pattern corresponding to the pixel value is formed. A pattern conversion unit for outputting, and a data compression unit for arranging the gradation patterns output from the pattern conversion unit in an output order and compressing the data using regularity seen in the arrangement direction, Is a data compression apparatus which outputs a gradation pattern corresponding to each pixel value, wherein a dot arrangement is selected so that regularity as viewed in the arrangement direction is large.
【請求項2】 請求項1に記載のデータ圧縮装置におい
て、 前記パターン変換部は、前記階調パターンを出力順に配
列したとき、前記配列方向に同種類の画素が並ぶ確率が
高くなるようにドット配列を選定した、各画素値に対応
する階調パターンを出力することを特徴とするデータ圧
縮装置。
2. The data compression apparatus according to claim 1, wherein the pattern conversion unit is configured to perform dot formation such that when the gradation patterns are arranged in the output order, the probability that pixels of the same type are arranged in the arrangement direction is high. A data compression apparatus for outputting a gradation pattern corresponding to each pixel value in which an arrangement is selected.
【請求項3】 請求項1に記載のデータ圧縮装置におい
て、 前記パターン変換部は、前記階調パターンを出力順に配
列したとき、前記配列方向に一定の組み合わせのドット
が並ぶ確率が高くなるようにドット配列を選定した、各
画素値に対応する階調パターンを選択することを特徴と
するデータ圧縮装置。
3. The data compression device according to claim 1, wherein the pattern conversion unit increases a probability that dots of a certain combination are arranged in the arrangement direction when the gradation patterns are arranged in an output order. A data compression device, wherein a dot pattern is selected, and a gradation pattern corresponding to each pixel value is selected.
JP11035227A 1999-02-15 1999-02-15 Data compressor Pending JP2000236448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11035227A JP2000236448A (en) 1999-02-15 1999-02-15 Data compressor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11035227A JP2000236448A (en) 1999-02-15 1999-02-15 Data compressor

Publications (1)

Publication Number Publication Date
JP2000236448A true JP2000236448A (en) 2000-08-29

Family

ID=12435963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11035227A Pending JP2000236448A (en) 1999-02-15 1999-02-15 Data compressor

Country Status (1)

Country Link
JP (1) JP2000236448A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019155748A (en) * 2018-03-14 2019-09-19 株式会社Screenホールディングス Image data processing method and printing system
CN114821080A (en) * 2022-06-30 2022-07-29 青岛农村商业银行股份有限公司 Agricultural product purchase management platform and efficient communication method of business data thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019155748A (en) * 2018-03-14 2019-09-19 株式会社Screenホールディングス Image data processing method and printing system
JP7080073B2 (en) 2018-03-14 2022-06-03 株式会社Screenホールディングス Image data processing method and printing system
CN114821080A (en) * 2022-06-30 2022-07-29 青岛农村商业银行股份有限公司 Agricultural product purchase management platform and efficient communication method of business data thereof
CN114821080B (en) * 2022-06-30 2022-09-02 青岛农村商业银行股份有限公司 Agricultural product purchase management platform and efficient communication method of business data thereof

Similar Documents

Publication Publication Date Title
US6751356B2 (en) Image processing apparatus and method
JP2007184978A (en) System and method for compressing graphic images
JPH06133168A (en) Image processing method
US5442459A (en) Process for encoding a half tone image considering similarity between blocks
JPWO2004068844A1 (en) Image compression method, image restoration method, program, and apparatus
JPH07118772B2 (en) Image data encoding method
US20110032554A1 (en) Image processing apparatus
JPH07322074A (en) Equipment and method for data processing to process 2 level image file that a dither ring happened
TW317686B (en)
JP3045008B2 (en) Halftone image compression method
JP2004140826A (en) Method of decompressing bit-map
JP2000236448A (en) Data compressor
JP3688938B2 (en) Image data generation method, apparatus and recording medium
Dang Anderson et a
JP4260908B2 (en) Run-length encoding method and image processing apparatus
JPS62107573A (en) Image processor
JPH04238462A (en) Picture processor
JP3743471B2 (en) Printing system, printing apparatus and printing control apparatus
JP3459723B2 (en) Image processing apparatus and method
JP3092194B2 (en) Image synthesis device
JPH02252364A (en) Picture signal processor
KR0165997B1 (en) Image reading device capable of reading images of various densities
JPH0322759A (en) Information processor equipped with artificial half-tone image processing function
JPH0548899A (en) Halftone picture encoding method and facsimile terminal equipment using the same
JP2000151991A (en) Image resolution conversion method and its device