JP2002199226A - Image data compression device and image data compression method - Google Patents

Image data compression device and image data compression method

Info

Publication number
JP2002199226A
JP2002199226A JP2000393767A JP2000393767A JP2002199226A JP 2002199226 A JP2002199226 A JP 2002199226A JP 2000393767 A JP2000393767 A JP 2000393767A JP 2000393767 A JP2000393767 A JP 2000393767A JP 2002199226 A JP2002199226 A JP 2002199226A
Authority
JP
Japan
Prior art keywords
image data
data
block
size
image
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
JP2000393767A
Other languages
Japanese (ja)
Inventor
Hiroyuki Abe
宏幸 阿部
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2000393767A priority Critical patent/JP2002199226A/en
Publication of JP2002199226A publication Critical patent/JP2002199226A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image data compression device that can obtain a high compression rate even in two-dimensional processing for a pseudo gradation image while utilizing advantages of conventional technologies. SOLUTION: The image data compression device that compresses pseudo gradation image data consisting of pixels of two-dimensional arrangement is provided with a means that sets a two-dimensional block to detect a size of a pseudo gradation pattern from part or all of data of a compression object image, a means that divides the compression object image in the unit of the decided block and discriminates whether or not the data in the unit of the block have repetition, a means that codes the data in the unit of the block when the data in the unit of the block have no repetition, a means that counts number of the repetitions and codes the data when the data in the unit of the block have repetition, and a means that generates a compression code from the coded code.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、2次元配列の画素
で構成される疑似階調画像データを圧縮する画像データ
圧縮装置および画像データ圧縮方法に関する。特に、プ
リンタ装置内のメモリに一時的に画像データを格納する
際に好適に利用できる。
[0001] 1. Field of the Invention [0002] The present invention relates to an image data compression apparatus and an image data compression method for compressing pseudo gradation image data composed of two-dimensionally arranged pixels. In particular, it can be suitably used when image data is temporarily stored in a memory in a printer device.

【0002】[0002]

【従来の技術】近年、レーザー記録式プリンタ装置にお
ける高速化/高信頼性化により、データ転送から要し排
出までの受信データ保証機能が要求されている。このた
め、プリンタ装置内には大容量のメモリを必要とする
が、装置コストの関係で出来る限り高速且つ高圧縮率の
データ圧縮方式が好ましい。プリンタで出力されるデー
タも含めて2次元配列の画素で構成される画像は、2値
画像と多値画像に分類される。多値画像は通常自然画に
用いられており、その階調レベルは2のべき乗(16階
調/64階調/128階調/256階調)に設定されて
いることが多い。2値画像の方は、更に文字画像や疑似
階調画像に分類されている。デジタルカメラからパソコ
ンに取り込んだ写真データやパソコン上或いはデータ通
信でやりとりされるデータは多値画像であるが、これら
のデータをFAXで送受信あるいはプリンタで出力する
場合には疑似階調データに変換する必要がある。
2. Description of the Related Art In recent years, with the increase in speed and reliability of laser recording type printers, a function of guaranteeing received data from data transfer to required ejection has been required. For this reason, a large-capacity memory is required in the printer device, but a data compression method with the highest possible speed and a high compression ratio is preferable in view of the cost of the device. Images composed of pixels in a two-dimensional array including data output by a printer are classified into binary images and multivalued images. A multi-valued image is usually used for a natural image, and its gradation level is often set to a power of 2 (16 gradations / 64 gradations / 128 gradations / 256 gradations). Binary images are further classified into character images and pseudo-gradation images. Photo data taken from a digital camera to a personal computer or data exchanged on a personal computer or by data communication is a multi-valued image, but when these data are transmitted / received by facsimile or output by a printer, they are converted into pseudo gradation data. There is a need.

【0003】疑似階調画像は、肉眼では判別出来ない格
子を階調値に応じて白と黒で塗りつぶすことで人間の目
には階調があるように見せる技術であり、塗りつぶす方
法としてはディザ法と誤差拡散法が広く知られている。
[0003] The pseudo gradation image is a technique in which a grid, which cannot be distinguished by the naked eye, is painted in black and white in accordance with the gradation value so that the human eye has a gradation. The method and the error diffusion method are widely known.

【0004】2値画像の圧縮方式としては関しては、単
純なランレングス符号化を利用した圧縮或いはFAX等
で使われるMH(Modified Huffman
n)符号化方式で高い圧縮率を得ることが出来る。しか
し、ランレングス長が短い疑似階調画像の場合に上記の
単純なランレングス符号化やMH符号化で高い圧縮率を
得ることは困難である。
[0004] As a compression method for a binary image, compression using simple run-length coding or MH (Modified Huffman) used for facsimile or the like is used.
n) A high compression rate can be obtained by the encoding method. However, it is difficult to obtain a high compression ratio by the simple run-length coding or the MH coding in the case of a pseudo gradation image having a short run-length length.

【0005】疑似階調画像の圧縮率を向上させるための
技術として、例えば特開平9−65147号がある。こ
の技術は、疑似階調画像の1つであるディザ法では、原
画像において同じ階調度が続く場合には同じ白黒パター
ンが繰り返されることに着目し、その繰り返しをランレ
ングスとは別に符号化する方式にしたことで疑似階調画
像の圧縮率を大きく向上させている。
As a technique for improving the compression ratio of a pseudo gradation image, there is, for example, JP-A-9-65147. This technique focuses on the fact that, in the dither method, which is one of the pseudo gradation images, the same black and white pattern is repeated when the same gradation continues in the original image, and the repetition is encoded separately from the run length. By adopting the method, the compression ratio of the pseudo gradation image is greatly improved.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、特開平
9−65147号公報の発明では、ディザの対象となる
ブロックが小さい場合(例えば4×4:16階調)には
有効であるが、ブロックが大きくなると、例えば図8に
示すようにディザの塗りつぶし方によっては白黒パター
ンの組み合わせの繰り返しが無くなってしまう場合が多
くなる。この図8のディザは5×5画素であり、例えば
ラインAとラインBでは白黒パターンが黒3白2(5画
素周期)で繰り返され、特開平9−65147号公報の
手法で繰り返しが検出できるが、ラインCでは白2黒1
白1黒1(5画素周期)のパターンが繰り返されている
ため、この方式のような白黒パターンの組み合わせを検
出する方式ではパターン繰り返しを検出することができ
ず、高い圧縮率は得られなくなってしまう。また、特開
平9−65147号公報の技術は、画像データを主走査
方向のみ、つまり1次元について冗長度を削減した圧縮
方式であり、副走査方向にも着目し2次元に渡って冗長
度を削減すればさらなる圧縮率の向上が期待される。
However, the invention disclosed in Japanese Patent Application Laid-Open No. 9-65147 is effective when the block to be dithered is small (for example, 4 × 4: 16 gradations). As the size becomes larger, for example, as shown in FIG. 8, the repetition of the combination of black and white patterns is often lost depending on how dither is painted. The dither in FIG. 8 has 5 × 5 pixels. For example, in line A and line B, the black and white pattern is repeated in black 3 white 2 (5 pixel cycle), and the repetition can be detected by the method disclosed in Japanese Patent Application Laid-Open No. 9-65147. However, in line C, white 2 black 1
Since a pattern of white 1 black 1 (5 pixel cycle) is repeated, a method of detecting a combination of black and white patterns like this method cannot detect pattern repetition, and a high compression rate cannot be obtained. I will. The technique disclosed in Japanese Patent Application Laid-Open No. 9-65147 is a compression method in which image data is reduced in redundancy only in the main scanning direction, that is, one-dimensionally. If it is reduced, a further improvement in the compression ratio is expected.

【0007】この問題点を解決した従来の技術として、
例えば、特許第2840420号がある。この技術は、
図9に示すように例えば4ライン単位で先行データとの
データ比較を行う前処理により、パターンとパターンラ
ンレングスからなる中間データを作成しており、図9の
様な2値画像の場合に有効である。しかし、この技術で
は特開平9−65147号と逆に、疑似階調画像の圧縮
率向上は望めなくなってしまう。
[0007] As a conventional technique for solving this problem,
For example, there is Japanese Patent No. 2840420. This technology is
As shown in FIG. 9, for example, intermediate data composed of a pattern and a pattern run length is created by preprocessing for comparing data with preceding data in units of four lines, and is effective in the case of a binary image as shown in FIG. It is. However, with this technique, contrary to Japanese Patent Application Laid-Open No. 9-65147, an improvement in the compression ratio of the pseudo gradation image cannot be expected.

【0008】本発明は、上記問題点を解決するためにな
されたものであって、従来の技術の利点を生かしなが
ら、疑似階調画像の2次元処理においても高い圧縮率を
得ることが可能な画像データ圧縮装置および画像データ
圧縮方法を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and it is possible to obtain a high compression ratio even in two-dimensional processing of a pseudo gradation image while taking advantage of the prior art. It is an object to provide an image data compression device and an image data compression method.

【0009】[0009]

【課題を解決するための手段】上記の問題を解決するた
めに、請求項1の発明は、2次元配列の画素で構成され
る疑似階調画像データを圧縮する画像データ圧縮装置に
おいて、疑似階調パターンの大きさを検出する手段を設
けたことを特徴とする。
In order to solve the above-mentioned problem, a first aspect of the present invention is an image data compression apparatus for compressing pseudo gradation image data composed of two-dimensionally arranged pixels. A means for detecting the size of the key pattern is provided.

【0010】また、請求項2の発明は、2次元配列の画
素で構成される疑似階調画像データを圧縮する画像デー
タ圧縮装置において、2次元のブロックを設定して、圧
縮対象画像の一部あるいは全データから疑似階調パター
ンの大きさを検出する手段と、この検出した疑似階調パ
ターンの大きさから符号化を実行するブロック単位を決
定し、前記圧縮対象画像を決定したブロック単位に分割
し、このブロック単位のデータに繰り返しがあるかどう
かを判断する手段と、このブロック単位のデータに繰り
返しがない場合にはブロック単位のデータを符号化する
手段と、このブロック単位のデータに繰り返しがある場
合はその繰り返し数を計数して符号化する手段と、これ
らの符号化された符号から圧縮コードを生成する手段と
を備えたことを特徴とする。
According to a second aspect of the present invention, there is provided an image data compression apparatus for compressing pseudo-gradation image data composed of two-dimensionally arranged pixels, wherein a two-dimensional block is set and a part of the image to be compressed is set. Alternatively, a means for detecting the size of the pseudo gradation pattern from all data, a block unit for performing encoding is determined from the detected size of the pseudo gradation pattern, and the compression target image is divided into the determined block units. A means for determining whether or not the data in the block has repetition, a means for encoding the data in the block when the data in the block does not have a repetition, and a means for repetition in the data in the block. In some cases, the apparatus is provided with means for counting and encoding the number of repetitions and means for generating a compressed code from these encoded codes. To.

【0011】また、請求項3の発明は、2次元配列の画
素で構成される疑似階調画像データを圧縮する画像デー
タ圧縮方法において、圧縮対象画像の一部あるいは全デ
ータから疑似階調パターンの大きさを検出し、検出した
疑似階調パターンの大きさから符号化を実行するブロッ
ク単位を決定し、前記圧縮対象画像を前記ブロック単位
に分割し、このブロック単位のデータに繰り返しがある
場合はその繰り返し数を計数して符号化し、繰り返しが
ない場合にはブロック単位のデータを符号化することを
特徴とする。
According to a third aspect of the present invention, there is provided an image data compression method for compressing pseudo-tone image data composed of two-dimensionally arranged pixels. Detect the size, determine the block unit to execute encoding from the size of the detected pseudo gradation pattern, divide the compression target image into the block unit, and if the data in this block unit has repetition, It is characterized in that the number of repetitions is counted and encoded, and when there is no repetition, data in block units is encoded.

【0012】また、請求項4の発明は、請求項3に記載
の画像データ圧縮方法において、前記ブロック単位の大
きさは、検出された疑似階調パターンの大きさが主走査
方向(N1)×副走査方向(N2)の場合には、N1×
M(M≦N2)であることを特徴とする。
According to a fourth aspect of the present invention, in the image data compression method according to the third aspect, the size of the block unit is such that the size of the detected pseudo gradation pattern is in the main scanning direction (N1). In the sub-scanning direction (N2), N1 ×
M (M ≦ N2).

【0013】また、請求項5の発明は、請求項4に記載
の画像データ圧縮方法において、副走査方向(N2)の
値が2の場合には、Mの値を2として、圧縮対象画像デ
ータをN1×2のブロックに重複なく分割することを特
徴とする。
According to a fifth aspect of the present invention, in the image data compression method according to the fourth aspect, when the value in the sub-scanning direction (N2) is two, the value of M is set to two, and Is divided into N1 × 2 blocks without duplication.

【0014】また、請求項6の発明は、請求項4に記載
の画像データ圧縮方法において、副走査方向(N2)の
値が3の場合には、Mの値を3として、圧縮対象画像デ
ータをN1×3のブロックに重複なく分割することを特
徴とする。
According to a sixth aspect of the present invention, in the image data compression method of the fourth aspect, when the value in the sub-scanning direction (N2) is three, the value of M is set to three, and Is divided into N1 × 3 blocks without duplication.

【0015】また、請求項7の発明は、請求項4に記載
の画像データ圧縮方法において、副走査方向(N2)の
値が4以上の場合には、Mの値を4として、圧縮対象画
像データをN1×4のブロックに分割することを特徴と
する。
According to a seventh aspect of the present invention, in the image data compression method according to the fourth aspect, when the value in the sub-scanning direction (N2) is 4 or more, the value of M is set to 4, and Data is divided into N1 × 4 blocks.

【0016】[0016]

【発明の実施の形態】本発明は、疑似階調パターンとそ
の繰り返し数を別々に符号化することを特徴としてい
る。上述したように、疑似階調は原画像の階調レベルに
応じて通常は正方形の格子を設定し、階調値に応じてそ
の塗りつぶし方を変える手法が採用されており、原画像
の階調値が同じ場合には疑似階調パターンの大きさ(以
下、ディザブロックサイズと表記する)を周期として同
じパターンが繰り返されることになる。本発明では、疑
似階調パターンに応じたブロック単位でデータ比較を実
行し、繰り返しを検出しその繰り返し数を符号化する。
この方式は特開平9−65147号公報の技術と類似し
ているが、符号化の対象となるデータが2次元のブロッ
クデータであるため、この従来の技術に比べて高い圧縮
率を得ることが可能となる新規な技術である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention is characterized in that a pseudo gradation pattern and its repetition number are separately encoded. As described above, for the pseudo gradation, a method is used in which a square grid is usually set according to the gradation level of the original image, and the filling method is changed according to the gradation value. When the values are the same, the same pattern is repeated with the size of the pseudo gradation pattern (hereinafter referred to as dither block size) as a cycle. According to the present invention, data comparison is performed in block units corresponding to the pseudo gradation pattern, repetition is detected, and the number of repetitions is encoded.
This method is similar to the technique disclosed in Japanese Patent Application Laid-Open No. 9-65147. However, since the data to be encoded is two-dimensional block data, it is possible to obtain a higher compression ratio than this conventional technique. This is a new technology that becomes possible.

【0017】上記ブロック単位のデータ比較を実行する
ためには、ディザブロックサイズを知る必要があるが、
それを検出するための手段を設けていることも本発明の
特徴である。上述のように、原画像の階調レベルは2の
べき乗(16階調/64階調/128階調/256階
調)に設定されていることが多く、その場合のディザブ
ロックサイズは、それぞれ順番に4×4、8×8、11
×11、16×16に設定されている。(ここで11×
11=121であるが、128に値が近いためこのディ
ザブロックサイズを用いる場合が多いようである。) この情報が圧縮対象画像にデータとして含まれない場合
は、それを検出することが必須となる。検出法の一例
は、後述の実施例にて説明する。
In order to execute the data comparison in block units, it is necessary to know the dither block size.
It is also a feature of the present invention that a means for detecting this is provided. As described above, the gray level of the original image is often set to a power of 2 (16 gray levels / 64 gray levels / 128 gray levels / 256 gray levels), and the dither block size in this case is 4 × 4, 8 × 8, 11 in order
× 11, 16 × 16. (Here 11x
Although 11 = 121, since the value is close to 128, it seems that this dither block size is often used. If this information is not included as data in the compression target image, it is essential to detect it. An example of the detection method will be described in an embodiment described later.

【0018】圧縮率の向上とアルゴリズムの単純性のみ
を考慮すると、繰り返しを検出するためのブロック単位
は、ディザブロックサイズと一致させるのが好ましい
が、ディザブロックサイズが大きくなると後に述べるデ
ータ保持手段や比較手段のハードウェアを大きくする必
要があったり、符号化や復号化の速度が遅くなることに
なるため、データ保持と比較に使用するブロック単位
(以下、比較ブロックと表記する)は、4×4以下の場
合を除いてディザブロックサイズよりも小さくすること
が好ましい。但し、主走査方向に関してはディザブロッ
クサイズと比較ブロックサイズは一致させる必要があ
る。
Considering only the improvement of the compression ratio and the simplicity of the algorithm, it is preferable that the block unit for detecting the repetition be equal to the dither block size. Since it is necessary to increase the hardware of the comparing means or the speed of encoding and decoding becomes slow, a block unit used for data holding and comparison (hereinafter referred to as a comparison block) is 4 × It is preferable to make the size smaller than the dither block size except for the case of 4 or less. However, in the main scanning direction, the dither block size and the comparison block size need to match.

【0019】通常のディザブロックは、上記の通り4×
4、8×8、11×11、16×16に設定されている
ことを考えると、4×4の場合は4×4、8×8の場合
は4×8、16×16の場合は4×16にすれば特殊な
処理なしに対象画像の圧縮符号化が行える。11×11
の場合のみ、11が素数であるため比較ブロックを重複
させて対象画像を圧縮符号化する特殊処理が必要となる
が、この場合の比較ブロックも他の場合に準じて4×1
1に設定すれば良い( 処理法は、後述の実施例で説明す
る)。
A normal dither block is 4 × as described above.
Considering that they are set to 4, 8 × 8, 11 × 11 and 16 × 16, 4 × 4 is 4 × 4, 8 × 8 is 4 × 8, and 16 × 16 is 4 × 4. If it is set to × 16, compression encoding of the target image can be performed without special processing. 11x11
Only in the case of, a special process of compressing and encoding the target image by overlapping the comparison blocks is necessary because 11 is a prime number, but the comparison block in this case is also 4 × 1 according to the other cases.
It may be set to 1 (the processing method will be described in an embodiment described later).

【0020】パターンの繰り返しを検出するためには、
上記比較ブロックのデータを保持するために2個のデー
タ保持手段と1個のデータ比較手段が必要となる。ま
た、パターンの繰り返し回数を計数するための手段も必
要となる。本発明は、比較ブロックのパターンとパター
ンの繰り返し数をそれぞれ別の方式で符号化することか
ら、それに対応した2種類の符号化装置が必要になる。
比較ブロックのパターンの符号化で最も単純な手法は、
2次元パターンを1次元に並べ替えてランレングス符号
化を実行する方式である。それ以外にもディザ画像であ
る場合には、比較ブロック単位で現れるパターンの種類
は限られている(例えば4×8の場合は最高でも64種
類)ことから、出現パターンとその符号を一意に辞書登
録して、符号化時に辞書と同じパターンを探しても見つ
からない場合にのみ新しい符号を登録する方式を採用す
ることも可能である。繰り返し数に関しては、一般に使
われるHuffmannテーブルが使用できる。
In order to detect the repetition of the pattern,
Two data holding means and one data comparing means are required to hold the data of the comparison block. Also, a means for counting the number of times the pattern is repeated is required. According to the present invention, since the pattern of the comparison block and the number of repetitions of the pattern are encoded by different methods, two types of encoding devices corresponding to the encoding are required.
The simplest way to encode the pattern of the comparison block is
In this method, two-dimensional patterns are rearranged one-dimensionally to execute run-length encoding. In addition, in the case of a dither image, the types of patterns appearing in comparison block units are limited (for example, at most 64 types in the case of 4 × 8), the appearance pattern and its sign are uniquely dictionary. It is also possible to adopt a method of registering and registering a new code only when the same pattern as the dictionary is not found even when searching for the same pattern during encoding. For the number of repetitions, a commonly used Huffmann table can be used.

【0021】以下に、図面を用いて本発明の実施例の構
成および動作を詳細に述べる。 <実施例1>図1は、本発明のディザブロックサイズ検
出手段の構成を示すブロック図である。ディザブロック
サイズの検出手段は、画像データ制御手段10、ブロッ
クデータ記憶手段20、保持データ選択手段30、保持
手段1(40)、保持手段2(50)、保持データ比較
手段60、データパターン記憶手段70とから構成され
る。まず、圧縮対象画像データの一部が画像データ制御
手段10を通してブロックデータ記憶手段20に保存さ
れる。
The configuration and operation of the embodiment of the present invention will be described below in detail with reference to the drawings. <Embodiment 1> FIG. 1 is a block diagram showing the configuration of the dither block size detecting means of the present invention. The dither block size detection means includes image data control means 10, block data storage means 20, held data selection means 30, holding means 1 (40), holding means 2 (50), held data comparison means 60, and data pattern storage means. 70. First, a part of the image data to be compressed is stored in the block data storage 20 through the image data controller 10.

【0022】保持手段1(40)と保持手段2(50)
は、最大4×4画素のデータを一時的に保持する手段で
あり、保持データの大きさは保持データ選択手段30の
要求に応じて2×2、3×3、4×4画素の範囲で可変
になっている。保持データ比較手段60は、保持手段1
(40)と保持手段2(50)のデータが一致するかど
うかを判断し、一致不一致により次に比較すべき保持デ
ータの要求を行う。また、一致しない場合にはそのデー
タパターンをデータパターン記憶手段70に登録する。
Holding means 1 (40) and holding means 2 (50)
Is a means for temporarily holding data of a maximum of 4 × 4 pixels, and the size of the held data is in a range of 2 × 2, 3 × 3, 4 × 4 pixels according to the request of the held data selecting means 30. It is variable. The held data comparison unit 60 is a storage unit
It is determined whether or not (40) and the data of the holding means 2 (50) match, and a request for held data to be compared next is made if the data does not match. If they do not match, the data pattern is registered in the data pattern storage means 70.

【0023】ディザブロックサイズが2×2、3×3、
4×4画素である場合には、データパターン数(階調数
と一致)がそれぞれ5、10、17に限られることか
ら、圧縮対象画像データの一部あるいは全部をその画素
ブロックに分割してデータ比較とデータパターン登録を
実行し、データパターン数が前出数値と一致すれば、そ
のディザブロックサイズであると判断される。逆に、登
録されるデータパターン数が前出の値を超える場合には
少なくとも当該のディザブロックサイズではないと判断
することができる。例えば2×2画素でデータ比較とデ
ータパターン登録を実行した際に、図2に示す様に6個
のパターンが登録されたら2×2のディザパターンは使
われていないことになる。(階調は、0、1、2、3、
4であるが、図2では階調2を表すパターンが2種類あ
ることになってしまう。)
When the dither block size is 2 × 2, 3 × 3,
In the case of 4 × 4 pixels, since the number of data patterns (matching the number of gradations) is limited to 5, 10, and 17, respectively, a part or all of the image data to be compressed is divided into its pixel blocks. Data comparison and data pattern registration are executed. If the number of data patterns matches the above numerical value, it is determined that the dither block size is used. Conversely, when the number of registered data patterns exceeds the above value, it can be determined that the size is not at least the dither block size. For example, when performing data comparison and data pattern registration with 2 × 2 pixels, if 6 patterns are registered as shown in FIG. 2, a 2 × 2 dither pattern is not used. (The gradations are 0, 1, 2, 3,
However, in FIG. 2, there are two types of patterns that represent gradation 2. )

【0024】ディザブロックサイズが4×4画素より大
きい場合には、まず4×4画素単位でパターンが一致す
る場所を検出する。例えば、図3に示す様な6×6のデ
ィザブロックを使っている場合には、4×4のブロック
単位のデータを保持手段1(40)と保持手段2(5
0)に入力する。保持手段1(40)のデータを固定
し、保持手段2(50)のデータ選択位置を主走査方向
に1画素ずつずらしながらデータ比較を実行することで
圧縮対象画像に同じ疑似階調度の部分がある限りは必ず
おなじパターンが現れるはずである。同じパターンが見
つかったら、保持手段1(40)と保持手段2(50)
に保持されるデータの位置を上下左右に1画素ずつ同じ
方向に移動させる。移動時に一致する場合があれば移動
画素数を大きくして4×4のブロック単位のデータ比較
を繰り返す。比較データの場所指定と移動方向および移
動画素数の制御は画像データ制御手段10が行うことに
なる。始めに固定する保持手段1(40)のデータを取
り込む場所を様々な場所に設定し、上記走査を繰り返し
実行することにより、ディザブロックサイズが4×4画
素より大きい場合であってもディザブロックサイズを検
出することが可能である。
When the dither block size is larger than 4 × 4 pixels, first, a place where the pattern matches in 4 × 4 pixel units is detected. For example, when a 6 × 6 dither block as shown in FIG. 3 is used, 4 × 4 block-unit data is stored in the holding unit 1 (40) and the holding unit 2 (5).
Enter 0). The data of the holding unit 1 (40) is fixed, and data comparison is performed while shifting the data selection position of the holding unit 2 (50) one pixel at a time in the main scanning direction. The same pattern should appear for some time. If the same pattern is found, holding means 1 (40) and holding means 2 (50)
Are moved in the same direction by one pixel vertically, horizontally and vertically. If there is a coincidence at the time of moving, the number of moving pixels is increased and the data comparison in 4 × 4 block units is repeated. The designation of the location of the comparison data and the control of the moving direction and the number of moving pixels are performed by the image data control means 10. The location where the data of the holding means 1 (40) fixed at the beginning is taken in is set to various places, and the above-described scanning is repeatedly executed, so that the dither block size is larger than 4 × 4 pixels. Can be detected.

【0025】ディザブロックサイズを検出するために上
記手段を実行する対象としては、一般に使われるディザ
ブロックサイズは最大でも16×16であることを考慮
すれば、主走査方向に関しては圧縮対象画像の大きさに
することが望ましいが、副走査方向に関しては64ライ
ン程度に設定すれば問題ないと考えられる。
Considering that the generally used dither block size is at most 16 × 16 as a target for executing the above means for detecting the dither block size, the size of the image to be compressed in the main scanning direction is considered. However, it is considered that there is no problem if it is set to about 64 lines in the sub-scanning direction.

【0026】<実施例2>ディザブロックサイズの検出
と比較ブロック決定後に、圧縮対象画像の全範囲に渡っ
てデータを圧縮符号化することになる。図4は、本発明
の圧縮符号化を行う機能構成を説明するブロック図であ
る。これは、ディザパターンの大きさを検出する図1の
構成にパターン符号化手段80、計数手段90、計数符
号化手段100、コードストリーム生成手段110を追
加した構成になっており、保持手段1(40)と保持手
段2(50)が最大4×16画素のブロックデータを保
持できるものにすれば共通化できる。
<Second Embodiment> After the detection of the dither block size and the determination of the comparison block, the data is compression-encoded over the entire range of the image to be compressed. FIG. 4 is a block diagram illustrating a functional configuration for performing compression encoding according to the present invention. This configuration has a configuration in which a pattern encoding unit 80, a counting unit 90, a counting and encoding unit 100, and a code stream generating unit 110 are added to the configuration of FIG. 1 for detecting the size of a dither pattern. 40) and the holding means 2 (50) can be shared if block data of a maximum of 4 × 16 pixels can be held.

【0027】ディザブロックサイズが8×8画素の場合
(図5参照)を例に取って説明する。比較ブロックサイ
ズは4×8画素となる。説明の便宜上、比較ブロック単
位でブロックに番号を割り当てる。B(n,m)中のn
とmは、圧縮対象画像の左上を基準としたブロックの位
置を表しており、B(0,0) は画像データの最初に入力さ
れるブロックデータである。図5でハッチングを付けた
ブロックが8×8画素単位[例えばB(2,2) とB(3,2)
の組]で同じ疑似階調度になっているものとすると、 B(2,2),B(2,3),B(2,4),B(2,5),B(2,6),B(4,3),B
(4,4),B(4,5) および B(3,2),B(3,3),B(3,4),B(3,5),B(3,6),B(5,3),B
(5,4),B(5,5) は、それぞれ同じパターンになっているはずである。
The case where the dither block size is 8 × 8 pixels (see FIG. 5) will be described as an example. The comparison block size is 4 × 8 pixels. For convenience of explanation, numbers are assigned to blocks in units of comparison blocks. N in B (n, m)
And m represent the position of the block with reference to the upper left of the image to be compressed, and B (0,0) is the first block data input of the image data. In FIG. 5, the hatched blocks are 8 × 8 pixel units [for example, B (2,2) and B (3,2)
), The same pseudo gradient is assumed to be B (2,2), B (2,3), B (2,4), B (2,5), B (2,6) , B (4,3), B
(4,4), B (4,5) and B (3,2), B (3,3), B (3,4), B (3,5), B (3,6), B ( 5,3), B
(5,4) and B (5,5) should have the same pattern.

【0028】図4において、保持手段1(40)に保持
されるブロックデータを『BL1』、保持手段2(5
0)に保持されるブロックデータを『BL2』とし、検
出されるブロックパターンの繰り返し数を『Rep』と
すると、圧縮符号化のアルゴリズムは、図6のフローチ
ャートに従って処理を実行すればよい。
In FIG. 4, the block data held in the holding means 1 (40) is "BL1",
Assuming that the block data held in 0) is “BL2” and the number of repetitions of the detected block pattern is “Rep”, the compression encoding algorithm may execute the processing according to the flowchart of FIG.

【0029】BL1= B(0,0),BL2= B(0,1) から処
理を開始し、隣り合ったブロック間でデータの比較を行
う。BL1=BL2とならない限りBL1の符号化を実
行する。BL1=BL2になった時点でブロックの繰り
返しが検出され、同じパターンの繰り返しが終わるまで
繰り返し数『Rep』がカウントアップされる。繰り返
しが終わった時点でRepの符号化が実行される。
Processing is started from BL1 = B (0,0) and BL2 = B (0,1), and data is compared between adjacent blocks. Unless BL1 = BL2, the encoding of BL1 is executed. When BL1 = BL2, the repetition of the block is detected, and the repetition number “Rep” is counted up until the repetition of the same pattern ends. At the end of the repetition, Rep encoding is performed.

【0030】図5の画像データの場合には、例えばBL
1= B(2,2),BL2= B(2,3) のときに繰り返しが検出
されて、BL1=BL2の状態はBL1= B(2,5),BL
2=B(2,6) まで続くので、繰り返し数はRep=4と
なる。ブロックデータパターン(BL1)符号化は、そ
の都度1 次元ランレングスに変換して符号化したり、新
規パターンが現れるたびに符号化と辞書登録を実行して
随時参照する方式が考えられる。繰り返し数(Rep)
は、一般的なHuffmann符号を使うことが出来るが、復号
時にBL1の符号語とRepの符号語が識別できるよう
にRep符号語に隣接して特別なデータを付加する必要
がある。BL1の符号語とRepの符号語を連結するが
コードストリーム生成手段110である。
In the case of the image data shown in FIG.
When 1 = B (2,2), BL2 = B (2,3), repetition is detected, and the state of BL1 = BL2 is BL1 = B (2,5), BL
Since 2 = B (2,6), the number of repetitions is Rep = 4. The block data pattern (BL1) may be encoded by converting it into a one-dimensional run length each time, or by encoding and registering a dictionary each time a new pattern appears, and referring to it at any time. Number of repetitions (Rep)
Can use a general Huffmann code, but it is necessary to add special data adjacent to the Rep code word so that the code word of BL1 and the code word of Rep can be distinguished during decoding. The code stream generation unit 110 connects the code word of BL1 and the code word of Rep.

【0031】図6のフローチャートにおいて、nは副走
査方向のブロック番号を表す数値で、この場合には主走
査方向のブロックが終了したら(End of Line) 繰り返し
数はゼロにリセットするアルゴリズムになっているが、
多少の変更により走査ブロックのライン(n)にまたが
って繰り返し数をカウントアップする方式も可能であ
る。
In the flowchart of FIG. 6, n is a numerical value representing a block number in the sub-scanning direction. In this case, when the block in the main scanning direction is completed (End of Line), the repetition number is reset to zero. But
With a slight change, a method of counting up the number of repetitions over the line (n) of the scanning block is also possible.

【0032】<実施例3>ディザブロックサイズが4の
倍数になっている場合には、圧縮対象画像を4×N(N
はディザブロック)のブロックに重複なく分割すること
が可能であるが、それ以外の場合には、走査するブロッ
ク間で一部重複させる必要がある。例えば、11×11
画素のディザブロックの場合は、図7の様に1画素分重
複するように分割することでディザパターンの繰り返し
が検出できるようになる。復号の際にはデータ重複部分
を考慮して処理する必要がある。
<Embodiment 3> When the dither block size is a multiple of 4, the image to be compressed is 4 × N (N
Can be divided into the dither blocks without overlapping, but in other cases, it is necessary to partially overlap the blocks to be scanned. For example, 11 × 11
In the case of a pixel dither block, repetition of a dither pattern can be detected by dividing the pixel so as to overlap by one pixel as shown in FIG. At the time of decoding, it is necessary to process in consideration of the data duplication part.

【0033】以上のように、実施例を構成すると、次の
ような効果を達成できる。 (1)疑似階調パターンの大きさを検出する手段を設け
ることにより、疑似階調データの2次元方向の冗長度を
削減した高圧縮率の圧縮装置が実現可能となる。 (2)疑似階調パターンの大きさ検出と画像データの効
率よい符号化が同じ構成で実現可能となる。 (3)ブロック単位の画像データとブロックパターンの
繰り返しを別々に符号化することで、通常のランレング
ス符号化では高い圧縮率を得ることが困難だった疑似階
調画像データにおける2次元方向の冗長度を削減した高
圧縮率の圧縮方法が実現可能となる。 (4)疑似階調パターンの大きさと同じ或いはそれより
も小さいブロック単位に圧縮対象画像を分割して処理す
ることにより、小さいハードウェア規模で高速処理が可
能な画像データ圧縮装置が実現可能となる。 (5)疑似階調パターンの大きさが2×2画素あるいは
3×3画素の場合には、符号化ブロック単位と疑似階調
パターンの大きさを同じにすることにより、単純な構成
の画像データ圧縮装置が実現可能となる。 (6)疑似階調パターンの大きさが4×4画素或いはそ
れを越える場合には、符号化ブロック単位の大きさを4
×K画素(Kは疑似階調パターンの主走査方向画素数)
にすることで小さいハードウェア規模で高速処理が可能
な画像データ圧縮装置が実現可能となる。
By configuring the embodiment as described above, the following effects can be achieved. (1) By providing a means for detecting the size of the pseudo gradation pattern, it is possible to realize a high compression ratio compression apparatus in which the two-dimensional redundancy of pseudo gradation data is reduced. (2) The detection of the size of the pseudo gradation pattern and the efficient encoding of the image data can be realized with the same configuration. (3) By separately encoding the repetition of the block pattern image data and the block pattern, it is difficult to obtain a high compression ratio by ordinary run-length encoding, so that two-dimensional redundancy in the pseudo gradation image data is difficult. A compression method with a reduced compression rate and a high compression ratio can be realized. (4) An image data compression apparatus capable of high-speed processing with a small hardware scale can be realized by dividing and processing an image to be compressed in block units equal to or smaller than the size of the pseudo gradation pattern. . (5) In the case where the size of the pseudo gradation pattern is 2 × 2 pixels or 3 × 3 pixels, the size of the pseudo gradation pattern is made the same as that of the coding block unit, so that the image data having a simple configuration is obtained. A compression device becomes feasible. (6) When the size of the pseudo gradation pattern is 4 × 4 pixels or more, the size of the coding block unit is set to 4
× K pixels (K is the number of pixels of the pseudo gradation pattern in the main scanning direction)
By doing so, it becomes possible to realize an image data compression device capable of high-speed processing with a small hardware scale.

【0034】[0034]

【発明の効果】以上説明したように、本発明によれば、
画像データ圧縮装置の従来の技術の利点を生かしなが
ら、疑似階調画像の2次元処理においても高い圧縮率を
得ることが可能となった。
As described above, according to the present invention,
It has become possible to obtain a high compression ratio even in the two-dimensional processing of the pseudo gradation image while taking advantage of the conventional technology of the image data compression apparatus.

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

【図1】本発明のディザブロックサイズの検出手段の構
成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a dither block size detection unit according to the present invention.

【図2】2×2画素ブロックのデータパターンの例であ
る。
FIG. 2 is an example of a data pattern of a 2 × 2 pixel block.

【図3】6×6画素のディザブロックを使ったときの例
である。
FIG. 3 is an example when a dither block of 6 × 6 pixels is used.

【図4】本発明の圧縮符号化の構成を示すブロック図で
ある。
FIG. 4 is a block diagram illustrating a configuration of compression encoding according to the present invention.

【図5】圧縮符号化の説明に使われる画像データの例で
ある。
FIG. 5 is an example of image data used for explaining compression encoding.

【図6】本発明の圧縮符号化の処理手順を説明するため
のフローチャートである。
FIG. 6 is a flowchart for explaining a compression encoding processing procedure of the present invention.

【図7】走査ブロックを一部重複させた場合の例であ
る。
FIG. 7 is an example of a case where scanning blocks are partially overlapped.

【図8】従来の技術を説明するための白黒パターンの繰
り返し例である。
FIG. 8 is a repeated example of a black-and-white pattern for explaining a conventional technique.

【図9】2次元に渡る冗長度削減の従来の技術を説明す
るための例である。
FIG. 9 is an example for explaining a conventional technique for reducing redundancy in two dimensions.

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

10 画像データ制御手段 20 ブロックデータ記憶手段 30 保持データ選択手段 40 保持手段1 50 保持手段2 60 保持データ比較手段 70 データパターン記憶手段 80 パターン符号化手段 90 計数手段 100 計数符号化手段 110 コードストリーム生成手段 Reference Signs List 10 image data control means 20 block data storage means 30 held data selection means 40 holding means 1 50 holding means 2 60 held data comparison means 70 data pattern storage means 80 pattern encoding means 90 counting means 100 count encoding means 110 code stream generation means

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 2次元配列の画素で構成される疑似階調
画像データを圧縮する画像データ圧縮装置において、疑
似階調パターンの大きさを検出する手段を設けたことを
特徴とする画像データ圧縮装置。
1. An image data compression apparatus for compressing pseudo gradation image data composed of two-dimensionally arranged pixels, comprising means for detecting the size of the pseudo gradation pattern. apparatus.
【請求項2】 2次元配列の画素で構成される疑似階調
画像データを圧縮する画像データ圧縮装置において、2
次元のブロックを設定して、圧縮対象画像の一部あるい
は全データから疑似階調パターンの大きさを検出する手
段と、この検出した疑似階調パターンの大きさから符号
化を実行するブロック単位を決定し、前記圧縮対象画像
を決定したブロック単位に分割し、このブロック単位の
データに繰り返しがあるかどうかを判断する手段と、こ
のブロック単位のデータに繰り返しがない場合にはブロ
ック単位のデータを符号化する手段と、このブロック単
位のデータに繰り返しがある場合はその繰り返し数を計
数して符号化する手段と、これらの符号化された符号か
ら圧縮コードを生成する手段とを備えたことを特徴とす
る画像データ圧縮装置。
2. An image data compression apparatus for compressing pseudo gradation image data composed of two-dimensionally arranged pixels.
Means for setting a dimensional block to detect the size of the pseudo gradation pattern from part or all of the data of the image to be compressed, and a block unit for performing encoding based on the detected size of the pseudo gradation pattern. Determining, dividing the compression target image into the determined block units, and determining whether or not the data in the block unit has repetition. When the data in the block unit does not have repetition, the data in the block unit is determined. Encoding means, counting means for counting the number of repetitions, if the block unit data has repetition, and means for generating a compressed code from these encoded codes. Characteristic image data compression device.
【請求項3】 2次元配列の画素で構成される疑似階調
画像データを圧縮する画像データ圧縮方法において、圧
縮対象画像の一部あるいは全データから疑似階調パター
ンの大きさを検出し、検出した疑似階調パターンの大き
さから符号化を実行するブロック単位を決定し、前記圧
縮対象画像を前記ブロック単位に分割し、このブロック
単位のデータに繰り返しがある場合はその繰り返し数を
計数して符号化し、繰り返しがない場合にはブロック単
位のデータを符号化することを特徴とする画像データ圧
縮方法。
3. An image data compression method for compressing pseudo-gradation image data composed of pixels in a two-dimensional array, wherein the size of the pseudo-gradation pattern is detected from part or all of the data of the image to be compressed and detected. Determine the block unit to execute encoding from the size of the pseudo gradation pattern, divide the compression target image into the block unit, and if there is repetition in the data of this block unit, count the number of repetitions An image data compression method characterized by encoding data in a block unit when the data is encoded and there is no repetition.
【請求項4】 請求項3に記載の画像データ圧縮方法に
おいて、前記ブロック単位の大きさは、検出された疑似
階調パターンの大きさが主走査方向(N1)×副走査方
向(N2)の場合には、N1×M(M≦N2)であるこ
とを特徴とする画像データ圧縮方法。
4. The image data compression method according to claim 3, wherein the size of the block unit is such that the size of the detected pseudo gradation pattern is the main scanning direction (N1) × the sub-scanning direction (N2). In this case, N1 × M (M ≦ N2).
【請求項5】 請求項4に記載の画像データ圧縮方法に
おいて、副走査方向(N2)の値が2の場合には、Mの
値を2として、圧縮対象画像データをN1×2のブロッ
クに重複なく分割することを特徴とする画像データ圧縮
方法。
5. The image data compression method according to claim 4, wherein when the value in the sub-scanning direction (N2) is 2, the value of M is set to 2 and the image data to be compressed is divided into N1 × 2 blocks. A method for compressing image data, wherein the image data is divided without duplication.
【請求項6】 請求項4に記載の画像データ圧縮方法に
おいて、副走査方向(N2)の値が3の場合には、Mの
値を3として、圧縮対象画像データをN1×3のブロッ
クに重複なく分割することを特徴とする画像データ圧縮
方法。
6. The image data compression method according to claim 4, wherein when the value in the sub-scanning direction (N2) is 3, the value of M is set to 3, and the compression target image data is divided into N1 × 3 blocks. A method for compressing image data, wherein the image data is divided without duplication.
【請求項7】 請求項4に記載の画像データ圧縮方法に
おいて、副走査方向(N2)の値が4以上の場合には、
Mの値を4として、圧縮対象画像データをN1×4のブ
ロックに分割することを特徴とする画像データ圧縮方
法。
7. The image data compression method according to claim 4, wherein when the value in the sub-scanning direction (N2) is 4 or more,
An image data compression method characterized in that the compression target image data is divided into N1 × 4 blocks by setting the value of M to 4.
JP2000393767A 2000-12-25 2000-12-25 Image data compression device and image data compression method Pending JP2002199226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000393767A JP2002199226A (en) 2000-12-25 2000-12-25 Image data compression device and image data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000393767A JP2002199226A (en) 2000-12-25 2000-12-25 Image data compression device and image data compression method

Publications (1)

Publication Number Publication Date
JP2002199226A true JP2002199226A (en) 2002-07-12

Family

ID=18859506

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000393767A Pending JP2002199226A (en) 2000-12-25 2000-12-25 Image data compression device and image data compression method

Country Status (1)

Country Link
JP (1) JP2002199226A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006270174A (en) * 2005-03-22 2006-10-05 Fuji Xerox Co Ltd Coder, decoder, coding method, decoding method, and programs thereof
CN112506879A (en) * 2020-12-18 2021-03-16 深圳智慧林网络科技有限公司 Data processing method and related equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006270174A (en) * 2005-03-22 2006-10-05 Fuji Xerox Co Ltd Coder, decoder, coding method, decoding method, and programs thereof
JP4735806B2 (en) * 2005-03-22 2011-07-27 富士ゼロックス株式会社 Encoding device, decoding device, and programs thereof
CN112506879A (en) * 2020-12-18 2021-03-16 深圳智慧林网络科技有限公司 Data processing method and related equipment

Similar Documents

Publication Publication Date Title
JP4522199B2 (en) Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium
US5136396A (en) Image encoding method
EP0613290B1 (en) Method and apparatus for binary image data compression
JPS6318777A (en) Code decoding processing method for dither signal
JPH04270568A (en) Data compression system in picture processing unit
JP3387738B2 (en) Image pattern converter
JPH0553427B2 (en)
JPH04282780A (en) Hierarchical coding system for false gradation image
JP2007306513A (en) Method and device for image data compression
JP2002199226A (en) Image data compression device and image data compression method
JPH0122665B2 (en)
US6339659B1 (en) Fractal coding/decoding of picture data using memory capacity information
JPH04270569A (en) Data compression system for picture processor
JPS59182670A (en) Coder of picture signal
JP2810838B2 (en) Binary image transmission device
JPH099065A (en) Picture data compression encoding method and decoding method
JPH0789621B2 (en) Encoder
KR910008524B1 (en) Black puttern repeadly encoding method for fax
JPH09284568A (en) Image compression method
JP3732329B2 (en) Pseudo halftone image encoding apparatus and encoding method
JP3295507B2 (en) Binary image encoding / decoding method
JPH05183759A (en) Encoder and decoder using arithmetic code
JPH09252407A (en) Coder for multi-gradation image
JP2006086676A (en) Image processor
JPH0376066B2 (en)