JP3334910B2 - Image data compression apparatus and method - Google Patents

Image data compression apparatus and method

Info

Publication number
JP3334910B2
JP3334910B2 JP20252592A JP20252592A JP3334910B2 JP 3334910 B2 JP3334910 B2 JP 3334910B2 JP 20252592 A JP20252592 A JP 20252592A JP 20252592 A JP20252592 A JP 20252592A JP 3334910 B2 JP3334910 B2 JP 3334910B2
Authority
JP
Japan
Prior art keywords
data
pixel data
pixel
output
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP20252592A
Other languages
Japanese (ja)
Other versions
JPH0652298A (en
Inventor
ゆかり 下村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP20252592A priority Critical patent/JP3334910B2/en
Priority to US08/036,559 priority patent/US5796872A/en
Priority to EP93302227A priority patent/EP0562834B1/en
Priority to DE69329510T priority patent/DE69329510D1/en
Publication of JPH0652298A publication Critical patent/JPH0652298A/en
Application granted granted Critical
Publication of JP3334910B2 publication Critical patent/JP3334910B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は画像データ圧縮伸長方法
及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for compressing and expanding image data.

【0002】[0002]

【従来の技術】近年DTPなどによりコンピュータ上で
作成される画像は、より高画質な画像が要求されてお
り、カラー化、多階調化が進んでいる。この種の画像に
おける情報量は、例えば、A4サイズ,400dpi,
256階調、3色カラーの場合で約46Mbyteにも
なる。画像データをページ記述言語(Page Dis
cription Language)などのコード情
報として扱えば情報量は少なくなる。しかしながら、コ
ード情報から画像データへの展開に時間がかかるうえ
に、コード情報を展開しても元の画像データを再現でき
ないという問題点がある。
2. Description of the Related Art In recent years, images created on a computer by DTP or the like are required to have higher image quality, and colorization and multi-gradation are being promoted. The amount of information in this type of image is, for example, A4 size, 400 dpi,
In the case of 256 gradations and three colors, it is about 46 Mbytes. Image data is written in a page description language (Page Dis
If the information is handled as code information such as a script language, the amount of information is reduced. However, there is a problem that it takes time to develop the code information into the image data, and the original image data cannot be reproduced even if the code information is expanded.

【0003】カラー多値画像の一般的な圧縮方法として
は、JPEG(Joint Photographic
Expent Group)が推奨するADCT(A
daptive Discrete Cosine T
ransform)方式による圧縮法がある。ADCT
圧縮法について以下に説明する。
As a general compression method of a color multi-valued image, JPEG (Joint Photographic) is used.
ADCT (A) recommended by the Expendable Group
Adaptive Discrete Cosine T
(transform) method. ADCT
The compression method will be described below.

【0004】図12はADCT圧縮装置の機能構成を表
すブロック図である。3101は色空間変換部であり、
NTSC方式の各色毎の信号(赤(R)、緑(G)、青
(B))による色空間(NTSC−RGB)を、輝度信
号Yと2つの色差信号Cr,Cbとで表される色空間
(YCrCb)に変換する。3102は、サブサンプリ
ング部であり、人間の眼が輝度に敏感で色差に鈍感であ
るという特性を利用して、色差データの減少を行う。具
体的には、サブサンプリング部3102はとなりあう2
つの色差データの平均値をとり、色差データの量を1/
2に減少させている。3103はDCT変換部であり、
サブサンプリング部3102を経て入力された画像デー
タを水平及び垂直方向にとなり合う8×8のブロクに分
割し、DCT変換をかけ、周波数空間に変換する。31
04は量子化部であり、64個の各DCT係数をステッ
プ幅の異なった量子化値で割る。3105はハフマン符
号化部であり、量子化された64個のDCT係数を1つ
のDC係数と63個のAC係数に分け、それぞれの係数
をJPEGが推奨しているハフマンテーブルに従って符
号化する。符号化されたデータは量子化テーブルデー
タ、ハフンマンテーブルデータなどのヘッダを添付して
メモリに蓄積されるかまたは他の装置等へ送信される。
FIG. 12 is a block diagram showing a functional configuration of the ADCT compression apparatus. Reference numeral 3101 denotes a color space conversion unit.
A color space (NTSC-RGB) based on signals (red (R), green (G), and blue (B)) for each color in the NTSC system is represented by a color represented by a luminance signal Y and two color difference signals Cr and Cb. Convert to space (YCrCb). Reference numeral 3102 denotes a sub-sampling unit, which reduces the color difference data by using the characteristic that the human eye is sensitive to luminance and insensitive to color difference. Specifically, the sub-sampling unit 3102
Take the average value of the two color difference data and reduce the amount of color difference data by 1 /
It has been reduced to 2. 3103 is a DCT converter,
The image data input through the sub-sampling unit 3102 is divided into 8 × 8 blocks that are arranged in the horizontal and vertical directions, and is subjected to DCT transform to be converted into a frequency space. 31
A quantization unit 04 divides each of the 64 DCT coefficients by a quantization value having a different step width. A Huffman encoding unit 3105 divides the 64 quantized DCT coefficients into one DC coefficient and 63 AC coefficients, and encodes each coefficient according to a Huffman table recommended by JPEG. The encoded data is stored in a memory with a header such as quantization table data and Huffman table data attached thereto, or transmitted to another device or the like.

【0005】図13はADCT伸長装置の機能構成を表
すブロック図である。3205はハフマン複合化部であ
り、入力された符号化データを複号化し、量子化データ
を生成する。3204は逆量子化部であり、ハフマン複
合化部3205にて生成された量子化データをDCT係
数データに変換する。これは、量子化部3104で量子
化する際に使用した量子化テーブルデータを用いて、6
4個の係数に量子化値を乗ずることにより得られる。3
203は逆DCT変換部であり、逆量子化3204にて
得られたDCT係数データを実画像データに逆DCT変
換する。3202は補間部であり、データ圧縮時におけ
るサブサンプリング部3102により欠落したCrおよ
びCbのデータを単純に繰り返し法により補間する。3
201は色空間編間部であり、YCrCbのデータをN
TSC−RGBのデータまたはそのデバイスの色空間デ
ータに変換する。
FIG. 13 is a block diagram showing a functional configuration of the ADCT decompression device. Reference numeral 3205 denotes a Huffman decryption unit that decrypts the input coded data to generate quantized data. An inverse quantization unit 3204 converts the quantized data generated by the Huffman decoding unit 3205 into DCT coefficient data. This is based on the quantization table data used for quantization in the quantization unit
It is obtained by multiplying the four coefficients by the quantization value. 3
Reference numeral 203 denotes an inverse DCT transform unit, which performs an inverse DCT transform on the DCT coefficient data obtained by the inverse quantization 3204 into real image data. An interpolation unit 3202 interpolates the data of Cr and Cb missing by the sub-sampling unit 3102 at the time of data compression by a simple repetition method. 3
Reference numeral 201 denotes a color space knitting portion, which converts YCrCb data into N
The data is converted into TSC-RGB data or color space data of the device.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記A
DCT圧縮法は、サブサンプリング部及び量子化部にお
いて、量子化時にデータの損失を伴う不可逆圧縮法であ
る。従って、伸長されたデータは圧縮前のデータとは異
なるものとなる。
However, the above A
The DCT compression method is an irreversible compression method that involves loss of data at the time of quantization in a sub-sampling unit and a quantization unit. Therefore, the decompressed data is different from the data before compression.

【0007】DTPデータ等のコンピュータ上で作成し
た画像(コンピュータ作成画像)は、アウトラインのき
れいさ、1図形(または1文字)単一色によるノイズの
ない色塗りがその長所である。ところが、ADCT圧縮
法により画像データを処理すると、図形のアウトライン
のみだれ、疑似エッジ(モスキートノイズと呼ばれる)
の発生、量子化による色の変化等が発生し、コンピュー
タ作成画像の長所が発揮されない。特に上述の圧縮法は
8×8ブロック処理であるため、境界域では大幅に色が
変化してしまう。圧縮率を上げると最終的に交流成分は
失われてブロック歪が発生し、解像度が1/8になった
ような画像となる。
An advantage of an image (computer-generated image) created on a computer, such as DTP data, is that the outline is clean and noise-free coloring is performed by a single color of one figure (or one character). However, when the image data is processed by the ADCT compression method, only the outline of the figure is blurred and a pseudo edge (called mosquito noise) is generated.
And the change in color due to quantization occurs, and the advantages of computer-generated images are not exhibited. In particular, since the above-described compression method is an 8 × 8 block process, the color greatly changes in the boundary area. When the compression ratio is increased, the AC component is finally lost, block distortion occurs, and an image having a resolution of 1/8 is obtained.

【0008】このため、画質の劣化が目に見えない程度
の量子化におさえて圧縮することも考えられるが、もと
もと高周波数データが多いことを特徴とするコンピュー
タ作成画像であるため、圧縮率において実用的でない。
従って、DTPで作成した画像のようなコンピュータ作
成画像は可逆で高圧縮率の得られる圧縮法で圧縮するこ
とが必要である。
[0008] For this reason, it is conceivable that the image is compressed by quantization so that the deterioration of the image quality is not visible. However, since the image is originally a computer-generated image characterized by a large amount of high-frequency data, the compression ratio is low. Not practical.
Therefore, it is necessary to compress a computer-generated image such as an image generated by DTP by a compression method that can achieve a reversible and high compression ratio.

【0009】本発明は上記の問題点に鑑みてなされたも
のであり、コンピュータなどにより作成された多値画像
を劣化なく高い圧縮率で圧縮する画像データ圧縮伸長方
法及び装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a method and apparatus for compressing and decompressing multivalued images created by a computer or the like at a high compression ratio without deterioration. And

【0010】[0010]

【課題を解決するための手段】上記課題を解決するため
に、本発明の画像データ処理装置によれば、過去に出現
した画素データをパレット番号付けして記憶するパレッ
ト記憶手段(例えば実施例におけるパレットメモリ7に
相当)と、原画像からの入力画素データと、前記入力画
素データの1つ前の画素データとを比較する第1の比較
手段(同じく第1比較器4に相当)と、前記第1の比較
手段にて比較された両データが不一致であるときの画素
データを少なくとも1つ以上保持する保持手段(同じく
第2ラッチ部3に相当)と、前記入力画素データと前記
保持手段に保持されている画素データとを比較する第2
の比較手段(同じく第2比較器5に相当)と、前記第2
の比較手段による比較において、前記入力画素データと
前記保持手段に保持されたどの画素データとも一致しな
いとき、前記入力画素データを前記パレット記憶手段に
記憶されている画素データのどれかと一致するか検索
し、前記入力画素データのパレット番号を出力する出力
手段(同じくパレットコントローラ6に相当)とを備え
ることを特徴とする。
[Means for Solving the Problems] In order to solve the above-mentioned problems
According to the image data processing device of the present invention,
A palette that stores the pixel data
Storage means (for example, in the pallet memory 7 in the embodiment)
Equivalent), the input pixel data from the original image, and the input image
First comparison for comparing pixel data immediately before elementary data with pixel data
Means (also corresponding to the first comparator 4) and the first comparison
Pixel when both data compared by means do not match
Holding means for holding at least one or more data (also
(Corresponding to the second latch section 3), the input pixel data and
A second method for comparing the pixel data with the pixel data held in the holding unit;
(Also corresponding to the second comparator 5) and the second
In the comparison by the comparing means, the input pixel data and
It does not match any pixel data held in the holding means.
When the input pixel data is stored in the palette storage means.
Search for a match with any of the stored pixel data
And an output for outputting a palette number of the input pixel data.
Means (also equivalent to pallet controller 6)
It is characterized by that.

【0011】[0011]

【0012】[0012]

【0013】[0013]

【0014】[0014]

【0015】[0015]

【実施例】以下に本発明による好適な実施例について添
付の図面を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments according to the present invention will be described below with reference to the accompanying drawings.

【0016】(実施例1) <データ圧縮装置>実施例1によるデータ圧縮装置につ
いて以下に説明する。
Embodiment 1 <Data Compression Apparatus> A data compression apparatus according to Embodiment 1 will be described below.

【0017】図1は実施例1によるデータ圧縮装置の機
能構成を表すブロック図である。1は画素データ並び変
え部であり、NTSC−RGB形式の、1画素あたり2
4bitの画素データを発生する。2は第1ラッチ部で
あり、画素データ並び変え部1からの画素データ(24
bit)を保持する。3は第2ラッチ部であり、第1ラ
ッチ部2より出力される画素データ(24bit)を保
持する。4は第1比較部であり、画素データ並び変え部
1からの画素データと第1ラッチ部2に保持されている
画素データとを比較し、両者が等しいとき「0」を、異
なるとき「1」という信号1aを出力する。5は第2比
較部であり、画素データ並び変え部1からの画素データ
と、第2ラッチ部3に保持された画素データとを比較
し、両者が等しいとき「0」を、異なるとき「1」とい
う信号1bを出力する。
FIG. 1 is a block diagram showing a functional configuration of the data compression device according to the first embodiment. Reference numeral 1 denotes a pixel data rearranging unit, which is 2 per pixel in the NTSC-RGB format.
Generates 4-bit pixel data. Reference numeral 2 denotes a first latch unit, which stores pixel data (24) from the pixel data rearranging unit 1.
bit). Reference numeral 3 denotes a second latch unit, which holds pixel data (24 bits) output from the first latch unit 2. Reference numeral 4 denotes a first comparing unit which compares the pixel data from the pixel data rearranging unit 1 with the pixel data held in the first latch unit 2. Is output. Reference numeral 5 denotes a second comparing unit which compares the pixel data from the pixel data rearranging unit 1 with the pixel data held in the second latch unit 3, and when the two are equal, “0” is set. Is output.

【0018】6はパレットコントロール部であり、信号
1aと1bのAND信号により作動し、画素データ並び
変え部1からの画素データがパレットメモリに存在する
かどうか検索し、存在しなかったらカウンタをインクリ
メントし新たにその画素データを登録し、その画素デー
タのパレット番号を出力する。
Reference numeral 6 denotes a pallet control unit, which is operated by an AND signal of the signals 1a and 1b, searches whether or not the pixel data from the pixel data rearranging unit 1 exists in the pallet memory, and if not, increments the counter. Then, the pixel data is newly registered, and the palette number of the pixel data is output.

【0019】7はパレットメモリで24bit画素デー
タを2m 個記憶できる。
Reference numeral 7 denotes a pallet memory capable of storing 2 m 24-bit pixel data.

【0020】8はセレクタ部で信号1a,1b,1c,
1dのどれかを選択しメモリ10の深さ分データがたま
ったら出力する。
Reference numeral 8 denotes a selector section for signals 1a, 1b, 1c,
1d is selected and output when the data corresponding to the depth of the memory 10 is accumulated.

【0021】9は制御部で、信号1a,1bの状態から
上述の各構成の動作タイミングの制御、特にセレクタ部
の制御(各信号の選択及び信号1d選択時の有効ビット
数制御)を行う。
Reference numeral 9 denotes a control unit which controls the operation timing of each of the above-described components from the state of the signals 1a and 1b, and particularly controls the selector unit (selection of each signal and control of the number of effective bits when the signal 1d is selected).

【0022】10はメモリであり、セレクタ部からの出
力を順次記憶していく。
Reference numeral 10 denotes a memory for sequentially storing outputs from the selector section.

【0023】上記の構成におけるデータ圧縮装置の動作
について、図2〜図4のフローチャートを参照しながら
以下に説明する。
The operation of the data compression apparatus having the above configuration will be described below with reference to the flowcharts of FIGS.

【0024】図2〜図4は実施例1のデータ圧縮装置に
よる処理手順を表すフローチャートである。尚、以下の
説明においては、第1ラッチ部2に保持される最新の更
新後の色データをnext[3]とし、第2ラッチ部3
に保持される最新の更新前の色データをformer
[3]とする。また、画素データ並び変え部1より出力
される画素データをpresent[3]とする。ne
xt[3],fomer[3],present[3]
はNTSC−RGB形式のデータであり、R,G,Bそ
れぞれのデータを有する1×3の配列構造データであ
る。
FIGS. 2 to 4 are flowcharts showing the processing procedure by the data compression apparatus of the first embodiment. In the following description, the latest updated color data held in the first latch unit 2 is referred to as next [3], and the second latch unit 3
The latest color data before update stored in the
[3]. The pixel data output from the pixel data rearranging unit 1 is referred to as present [3]. ne
xt [3], former [3], present [3]
Is NTSC-RGB format data, which is 1 × 3 array structure data having R, G, and B data.

【0025】まず、ステップS11で、第1ラッチ部2
と第2ラッチ部3の初期設定を行う。即ち、next
[3]と、former[3]に初期値をセットする。
本データ圧縮装置においては、通常の画像は白地に黒が
多いと仮定し、初期値をnext[3]={255,2
55,255}(白)、former[3]={0,
0,0}(黒)とする。次にステップS12において処
理済の画素数をカウントするカウンタcountをゼロ
にリセットし、それまでの出現画素データの数をカウン
トするカウンタcolornumをゼロにリセットす
る。又、colornumがパレットメモリ許容数2
を越えたら1になるフラグflagを0に、出力ビッ
ト長を表すoutbitを1に、outbitをインク
リメントするタイミングをとるcbeckを2にリセッ
トする。
First, in step S11, the first latch unit 2
And initial setting of the second latch unit 3. That is, next
Initial values are set in [3] and former [3].
In this data compression apparatus, it is assumed that a normal image has a lot of black on a white background, and the initial value is next [3] = $ 255,2
55,255} (white), former [3] = {0,
0,0} (black). Next, in step S12, a counter count that counts the number of processed pixels is reset to zero, and a counter colornum that counts the number of pixel data appearing so far is reset to zero. Also, the colornum is 2 m, the allowable number of palette memories.
Is exceeded, the flag which becomes 1 is reset to 0, outbit representing the output bit length is set to 1, and ccheck which takes the timing to increment the outbit is reset to 2.

【0026】ステップS13において、画素データ並び
変え部1より画素データpresent[3]を入力す
る。そして、ステップS14では、第1比較部4により
present[3]とnext[3]を比較する。こ
の比較の結果、present[3]とnext[3]
とが等しければステップS15へ進み、等しくない場合
は図3のステップS21へ進む。
In step S13, pixel data present [3] is input from the pixel data rearranging section 1. Then, in step S14, present [3] and next [3] are compared by the first comparing unit 4. As a result of this comparison, present [3] and next [3]
If they are equal, the process proceeds to step S15; otherwise, the process proceeds to step S21 in FIG.

【0027】ステップS15では、第1比較部4の比較
結果である「0」を出力し、ステップS16へ進む。
In step S15, the comparison result "0" of the first comparing section 4 is output, and the flow advances to step S16.

【0028】ステップS16においてcountをイン
クリメントし、ステップS17において、すべての画素
の処理が終了したかどうかをチエックする。即ち、co
unt≧全画素数であれば全ての画素の処理が終了した
と判断し、本データ圧縮処理を終了する。また、cou
nt<全画素数のときは、未処理の画素データが残って
いるのでステップS13に戻り上述の処理を繰り返す。
In step S16, "count" is incremented, and in step S17, it is checked whether or not processing of all pixels has been completed. That is, co
If unt ≧ the total number of pixels, it is determined that the processing of all pixels has been completed, and the data compression processing ends. Also, cou
If nt <the total number of pixels, unprocessed pixel data remains, so the flow returns to step S13 to repeat the above processing.

【0029】次に図3のフローチャートを参照して、p
resent[3]≠next[3]の場合の処理にち
て説明する。
Next, referring to the flowchart of FIG.
A description will be given of the processing in the case of “resent [3] ≠ next [3]”.

【0030】ステップS21では第1比較部4の比較結
果である「1」を出力する。ステップS22では、pr
esent[3]とformer[3]とを第2比較部
5により比較する。この比較の結果、present
[3]=former[3]であればステップS23へ
進み、またpresent[3]≠former[3]
であれば図4のステップS28へ進む。
In step S21, the comparison result "1" of the first comparison unit 4 is output. In step S22, pr
esent [3] and former [3] are compared by the second comparing unit 5. As a result of this comparison,
If [3] = former [3], the process proceeds to step S23, and present [3] @former [3]
If so, the process proceeds to step S28 in FIG.

【0031】ステップS23では、第2比較部5の比較
結果である「0」を出力しステップS26へ進む。
In step S23, the comparison result "0" of the second comparison section 5 is output, and the flow advances to step S26.

【0032】ステップS26では、最新の更新前のデー
タformer[3]に最新の更新後のデータnext
[3]を代入する。そして、ステップS27において、
最新の更新後のデータとして画像発生部1より現在出力
されているデータpresent[3]を代入する。そ
して、図2のフローチャートにおけるステップS17へ
進み、前述の処理を実行する。
In step S26, the latest pre-update data former [3] is added to the latest post-update data next.
Substitute [3]. Then, in step S27,
The data present [3] currently output from the image generation unit 1 is substituted as the latest updated data. Then, the process proceeds to step S17 in the flowchart of FIG. 2 to execute the above-described processing.

【0033】次に図4のフローチャートを参照してpr
esent[3]≠fomer[3]の場合の処理につ
いて説明する。
Next, referring to the flowchart of FIG.
The processing in the case of esent [3] @former [3] will be described.

【0034】ステップS28では第2比較部5の比較結
果である「1」を出力する。ステップS29ではフラグ
flagはゼロであるかチエックする。即ち、colo
rnumがパレットメモリの許容数2 に達していな
いか判断し、達していなければステップS30に進み達
していたらステップS40に進む。
In step S28, the comparison result "1" of the second comparison section 5 is output. In step S29, it is checked whether the flag flag is zero. That is, colo
rnum is determined whether not reached the allowable number 2 m of the palette memory, the process proceeds to step S40 when I reached flow proceeds to step S30 if not reached.

【0035】ステップS30ではパレットメモリの中に
画素データpresent[3]がすでに登録されてい
るか検索している。即ち、カウンタiをそれまでの出現
画素データcolornumの数だけ回して、パレット
メモリのアドレスiがpresent[3]と一致する
かどうか判断し(S303)、一致していたらパレット
番号Pにアドレスiを代入する(S305)。colo
rnumの数だけ上述の処理を行い、一致する画素デー
タを記憶するアドレスがない時はpresent[3]
を新規のデータとして処理するためステップS35に進
む。ステップS35ではパレットメモリのアドレスco
lornumにpresent[3]を登録し、パレッ
ト番号Pにアドレスcolornumを代入する。
In step S30, it is searched whether the pixel data present [3] has already been registered in the pallet memory. That is, the counter i is turned by the number of the previously appearing pixel data colornum, and it is determined whether or not the address i of the pallet memory matches present [3] (S303). Substitution is made (S305). colo
The above processing is performed by the number of rnum, and if there is no address for storing the matching pixel data, present [3]
Is processed as new data, the process proceeds to step S35. In step S35, the address co of the pallet memory
"present" [3] is registered in the lornum, and the address "colornum" is substituted for the pallet number P.

【0036】ステップS36ではcolornumをイ
ンクリメントする。
In step S36, colornum is incremented.

【0037】ステップS37でcolornumがパレ
ットメモリの許容数2 に達しているかどうかチェッ
クする。達していたらステップS38に進みフラグfr
agに1を代入する。
In step S37, it is checked whether or not the colornum has reached the allowable number of palette memories of 2 m . If it has reached, the process proceeds to step S38 and the flag fr
Substitute 1 for ag.

【0038】ステップS39でパレット番号Pを下位o
utbit分だけ出力する。ステップS41でChec
kとcolornumが等しいかどうか調べ等しかった
らステップS42に進みoutbitをインクリメント
し(ステップS42)checkをcheckの2乗で
更新する(ステップS43)。すなわち、パレットメモ
リアドレス1の画素が出現するとcolornum=2
となり、outbitがインクリメントされ次の画素の
処理からはパレットメモリアドレスを表す信号は2ビッ
トとなる。同時に次にoutbitをインクリメントす
るための信号checkは4となる。
In step S39, the pallet number P is set to the lower order o.
Output for utbit. Check in step S41
If it is determined that k is equal to colornum, the process proceeds to step S42, and outbit is incremented (step S42), and check is updated by the square of check (step S43). That is, when the pixel at the palette memory address 1 appears, colornum = 2
The out bit is incremented, and the signal representing the pallet memory address becomes 2 bits from the processing of the next pixel. At the same time, the signal check for incrementing the next outbit becomes 4.

【0039】次は、パレットメモリアドレス0×11の
画素が出現するとcolornum=4となりoutb
it=3となりcheckは8となる。パレットメモリ
アドレスを表す信号の最初の1ビットが1の時に以上の
処理は行われる。
Next, when the pixel of the palette memory address 0 × 11 appears, colornum = 4 and outb
It = 3 and check becomes 8. The above processing is performed when the first bit of the signal representing the palette memory address is 1.

【0040】一方、S40では(ステップS29ではフ
ラグが0でない時(即ち、画素データ数がパレットメモ
リの許容数を越えてしまった時))パレットメモリ表現
をあきらめて画素データ24bitをそのまま出力す
る。
On the other hand, in S40 (when the flag is not 0 in step S29 (that is, when the number of pixel data exceeds the allowable number of the palette memory)), the palette memory expression is abandoned and the pixel data of 24 bits is output as it is.

【0041】上述のデータ圧縮装置による動作をさらに
具体的な例を挙げて説明する。
The operation of the above-described data compression device will be described with a more specific example.

【0042】図5はデータ圧縮処理されるNTSC−R
GBデータの例である。
FIG. 5 shows an NTSC-R subjected to data compression processing.
It is an example of GB data.

【0043】図6は本データ圧縮装置による画素の処理
順序を現す例である。同図に示されるごとく2次元のデ
ータはジグザグに並び変えられ処理される。このように
深さ8画素でジグザグに処理することにより、ラスター
方式に比べて通常の画像では画素データの反転が多くな
り圧縮効率がよいし、スキャナで読んだようなイメージ
画が混在したときのADCT処理との併合が簡単にな
る。
FIG. 6 is an example showing the processing order of pixels by the data compression apparatus. As shown in the figure, the two-dimensional data is rearranged zigzag and processed. By performing zigzag processing at a depth of 8 pixels in this way, inversion of pixel data is increased in a normal image as compared with the raster method, so that compression efficiency is good, and when an image image read by a scanner is mixed, Merging with ADCT processing is simplified.

【0044】以上の並び変え処理は図1の画素データ並
び変え部1で実行される。
The above rearrangement processing is executed by the pixel data rearranging section 1 shown in FIG.

【0045】まず、next[3],former
[3],count,flag,colornumのそ
れぞれに初期値をセットする(ステップS11,1
2)。次に現在の値を示すpresent[3]を画素
データ並び変え部1より入力する(ステップS13)。
まず画素1のデータが入力されるのでpresent
[3]={255,255,255}となる。次に第1
比較部4はこのpresent[3]とnext[3]
を比較する(ステップS14)。ここでpresent
[3]とnext[3]はともに{255,255,2
55}のデータを有しており、present[3]と
next[3]は等しいのでステップS15に進む。こ
のとき本実施例では第1比較部より「0」が出力される
(ステップS15)。1画素の処理が終了したのでカウ
ンタをインクリメントする(ステップS16)。このと
きcount=1であり、まだすべての画素の処理は終
了していないのでステップS13に戻る(ステップS1
7)。
First, next [3], former
Initial values are set for each of [3], count, flag, and colornum (steps S11 and S11).
2). Next, present [3] indicating the current value is input from the pixel data rearranging unit 1 (step S13).
First, since the data of pixel 1 is input, present
[3] = {255, 255, 255}. Then the first
The comparing unit 4 compares the present [3] and the next [3]
Are compared (step S14). Where present
[3] and next [3] are both $ 255, 255, 2
Since there is 55 ° data and present [3] is equal to next [3], the process proceeds to step S15. At this time, in the present embodiment, “0” is output from the first comparing unit (step S15). Since the processing for one pixel is completed, the counter is incremented (step S16). At this time, since count = 1, and the processing of all the pixels has not been completed, the process returns to step S13 (step S1).
7).

【0046】次の画素2は画素1と同じ値を有している
ので同様の処理が行われる。
Since the next pixel 2 has the same value as the pixel 1, the same processing is performed.

【0047】次の画素3は異なるデータを有しているの
で処理手順が異なる。
Since the next pixel 3 has different data, the processing procedure is different.

【0048】画素データ並び変え部1より出力されるデ
ータは{160,0,240}の値を有し、従って、p
resent[3]={160,0,240}となる
(ステップS13)。次にpresent[3]とne
xt[3]={255,255,255}と比較する
(ステップS14)。今回は両者は異なる値を有してい
るのでステップS21に進み、第1比較部からは「1」
が出力される(ステップS21)。
The data output from the pixel data rearranging section 1 has a value of {160, 0, 240}.
“resent [3] = {160, 0, 240}” (step S13). Next, present [3] and ne
xt [3] = {255, 255, 255} (Step S14). This time, since both have different values, the process proceeds to step S21, and the first comparing unit outputs “1”.
Is output (step S21).

【0049】さらに、present「3」とform
er[3]={0,0,0}とを比較する(ステップS
22)。両者は異なる値を有しているのでステップS2
8に進み、第2比較部から「1」が出力される(ステッ
プS28)。
Further, the present "3" and the form
er [3] = {0, 0, 0} (step S
22). Since both have different values, step S2
Then, the process proceeds to step S8, where "1" is output from the second comparison unit (step S28).

【0050】ステップS29で、colornumがパ
レットメモリの限界値2のm乗に達しているかどうかを
示すフラグflagをチェックしている。flag=0
なので達していないということでステップS30に進
む。ステップS30ではパレットメモリ内にprese
nt[3]のデータがすでにもう登録されているかどう
か調べるのだが、現時点でcolornum=0であ
り、登録されていないのでステップS35に進む。
In step S29, the flag flag indicating whether or not the colornum has reached the pallet memory limit value 2 raised to the mth power is checked. flag = 0
Therefore, since it has not reached, it progresses to step S30. In step S30, prepress is stored in the pallet memory.
It is checked whether or not the data of nt [3] has already been registered. However, since colornum = 0 at the present time, and the data has not been registered, the process proceeds to step S35.

【0051】S35ではパレットメモリのアドレス0
(=colornum)にpresentのデータ{1
60,0,240}を登録する。そしてパレット番号P
に0を代入する(ステップS35)。そしてcolor
numをインクリメントする(ステップS36)。次に
colornumがパレットメモリの限界値2のm乗に
達したかどうかチェックする(ステップS37)。この
実施例ではm=8とし、2のm乗は256なので、co
lornum=1であるから達していない。従って何の
処理も行われずステップS39に進む。ステップS39
ではパレット番号P=0を1ビット分出力する(=ou
tbit)。
In S35, the address 0 of the pallet memory
(= Colorum) present data $ 1
60,0,240} is registered. And pallet number P
Is substituted for 0 (step S35). And color
num is incremented (step S36). Next, it is checked whether or not the colornum has reached the limit value 2 of the pallet memory to the m-th power (step S37). In this embodiment, m = 8 and 2 to the m-th power is 256.
It has not been reached because lornum = 1. Therefore, no processing is performed and the process proceeds to step S39. Step S39
Outputs the pallet number P = 0 for one bit (= ou
tbit).

【0052】ステップS41では、colornum=
1がcheck=2と等しいかどうか調べている。ここ
で、等しくないので何の処理も行わずステップS27に
進む。
In step S41, colornum =
It is checked whether 1 is equal to check = 2. Here, since they are not equal, no process is performed and the process proceeds to step S27.

【0053】ここで、next[3]とformer
[3]のデータを更新する。即ち、former[3]
にnext[3]が代入されnext[3]にpres
ent[3]が代入される(ステップS26,27)。
こうしてnext[3]={160,0,240}、f
ormer[3]={255,255,255}とな
る。
Here, next [3] and former
Update the data of [3]. That is, former [3]
Is assigned to next [3], and pres is assigned to next [3].
ent [3] is substituted (steps S26 and S27).
Thus, next [3] = {160,0,240}, f
orr [3] = {255, 255, 255}.

【0054】この時点での出力状態は以下のようにな
る。
The output state at this point is as follows.

【0055】(0)(0)(1/1/0) (見やすくするために1つの画素に対する出力はカッコ
でくくり1つの画素内の出力はスラッシュで区分した)
また、パレットメモリの中は以下のようになる。
(0) (0) (1/1/0) (Output for one pixel is enclosed in parentheses for clarity, and output in one pixel is divided by slash.)
The contents of the palette memory are as follows.

【0056】アドレス<00000000>の中身=1
0100000/00000000/11110000
Content of address <00000000> = 1
0100000/00000000/11110000

【0057】次の画素4はnext[3]と同じデータ
を有しているので第1比較部4から「0」が出力され
る。
Since the next pixel 4 has the same data as next [3], "0" is output from the first comparing section 4.

【0058】次の画素5={255,255,255}
はnext[3]と異なるデータを有しているがfor
mer[3]と同じ値であるので第1比較部4から
「1」が出力され第2比較部5から「0」が出力され
る。ここで、next[3]とfoemer[3]のデ
ータを更新する。こうしてnext[3]={255,
255,255}、former[3]={160,
0,240}となる。
Next pixel 5 = {255, 255, 255}
Has data different from next [3], but for
Since the value is the same as mer [3], “1” is output from the first comparator 4 and “0” is output from the second comparator 5. Here, the data of next [3] and foamer [3] are updated. Thus, next [3] = $ 255,
255, 255}, former [3] = {160,
0,240 °.

【0059】次の画素6はnext[3]と同じデータ
を有しているので第1比較部4から「0」が出力され
る。
Since the next pixel 6 has the same data as next [3], “0” is output from the first comparing section 4.

【0060】次の画素7は異なるデータを有しているの
で処理手順が異なる。
Since the next pixel 7 has different data, the processing procedure is different.

【0061】画素データ並び変え部1より出力されるデ
ータは{0,0,0}の値を有し、従って、prese
nt[3]={0,0,0}となる(ステップS1
3)。次にpresent[3]とnext[3]=
{255,255,255}と比較する(ステップS1
4)。今回は両者は異なる値を有しているのでステップ
S21に進み、第1比較部からは「1」が出力される
(ステップS21)。
The data output from the pixel data rearranging section 1 has a value of {0, 0, 0}.
nt [3] = {0, 0, 0} (step S1
3). Next, present [3] and next [3] =
Compare with {255, 255, 255} (Step S1
4). This time, since both have different values, the process proceeds to step S21, and "1" is output from the first comparing unit (step S21).

【0062】さらに、present「3」とform
er[3]={160,0,240}とを比較する(ス
テップS22)。両者は異なる値を有しているのでステ
ップS28に進み、第2比較部から「1」が出力される
(ステップS28)。
Further, the present "3" and the form
er [3] = {160, 0, 240} (step S22). Since the two have different values, the process proceeds to step S28, where "1" is output from the second comparing unit (step S28).

【0063】ステップS29で、colornumがパ
レットメモリの限界値2のm乗に達しているかどうかを
示すフラグflagをチェックしている。flag=0
なので達していないということでステップS30に進
む。ステップS30ではパレットメモリ内にprese
nt[3]のデータがすでにもう登録されているかどう
か調べるのだが、現時点でcolornum=1であ
り、アドレス0の画素データを調べると{160,0,
240}であり、画素データ{0,0,0}は登録され
ていないのでステップS35に進む。
In step S29, the flag flag indicating whether or not the colornum has reached the limit value 2 of the pallet memory to the m-th power is checked. flag = 0
Therefore, since it has not reached, it progresses to step S30. In step S30, prepress is stored in the pallet memory.
It is checked whether or not the data of nt [3] has already been registered. At this time, colornum = 1, and if the pixel data of address 0 is checked, {160,0,
240}, and the pixel data {0, 0, 0} is not registered, so the process proceeds to step S35.

【0064】S35ではパレットメモリのアドレス0
(=colornum)にpresentのデータ
{0,0,0}を登録する。そしてパレット番号Pに1
を代入する(ステップS35)。そしてcolornu
mをインクリメントする(ステップS36)。次にco
lornumがパレットメモリの限界値2のm乗に達し
たかどうかチェックする(ステップS37)。ここで、
colornum=2であるから達していない。従って
何の処理も行われずステップS39に進む。ステップS
39ではパレット番号P=1を1ビット分出力する(=
outbit)。
At S35, the address 0 of the pallet memory
(= Colornum), the present data {0, 0, 0} is registered. And 1 for pallet number P
Is substituted (step S35). And colornu
m is incremented (step S36). Then co
It is checked whether lornum has reached the limit value 2 of the palette memory to the m-th power (step S37). here,
Since colornum = 2, it has not been reached. Therefore, no processing is performed and the process proceeds to step S39. Step S
At 39, the pallet number P = 1 is output for one bit (=
outbit).

【0065】次にステップS41で、colornum
とcheckを比較している。両者は共に2であり等し
い。ステップS42に進み、outbitをインクリメ
ントする。そして、checkにcheck2 =4を代
入する(ステップS43)。
Next, in step S41, colornum
And check are compared. Both are 2 and equal. Proceeding to step S42, outbit is incremented. Then, check 2 = 4 is substituted for check (step S43).

【0066】ここで、next[3]とformer
[3]のデータを更新する。即ち、former[3]
にnext[3]が代入されnext[3]にpres
ent[3]が代入される(ステップS26,27)。
こうしてnext[3]={0,0,0}、forme
r[3]={255,255,255}となる。
Here, next [3] and former
Update the data of [3]. That is, former [3]
Is assigned to next [3], and pres is assigned to next [3].
ent [3] is substituted (steps S26 and S27).
Thus, next [3] = {0,0,0}, form
r [3] = {255, 255, 255}.

【0067】この時点での出力状態は以下のようにな
る。
The output state at this point is as follows.

【0068】(0)(0)(1/1/0)(0)(1/
0)(0)(1/1/1)
(0) (0) (1/1/0) (0) (1 /
0) (0) (1/1/1)

【0069】また、パレットメモリの中は以下のように
なる。
The contents of the pallet memory are as follows.

【0070】アドレス<00000000>の中身=1
01000000000000011110000 アドレス<00000001>の中身=0000000
00000000000000000
Content of address <00000000> = 1
01000000000000000111110000 Contents of address <00000001> = 000000
0000000000000000000

【0071】次の画素8はnext[3]と同じデータ
を有しているので第1比較部4から「0」が出力され
る。
Since the next pixel 8 has the same data as next [3], “0” is output from the first comparing section 4.

【0072】次の画素9は{200,10,0}の値を
有し、従ってpresent[3]={200,10,
0}となる(ステップS13)。present[3]
はnext[3]={0,0,0}ともformer
[3]={255,255,255}とも異なる値を有
しているので第1比較部からは「1」が出力され(ステ
ップS21)、第2比較部からも「1」が出力される
(ステップS28)。
The next pixel 9 has a value of {200, 10, 0}, so present [3] = {200, 10,
0 ° (step S13). present [3]
Is the format of next [3] = {0,0,0}
[3] = “255”, 255, 255}, so that “1” is output from the first comparing unit (step S21), and “1” is also output from the second comparing unit. (Step S28).

【0073】ステップS29で、colornumがパ
レットメモリの限界値2のm乗に達しているかどうかを
示すフラグflagをチェックしている。flag=0
なので達していないということでステップS30に進
む。ステップS30ではパレットメモリ内にprese
nt[3]のデータがすでにもう登録されているかどう
か調べるのだが、現時点でcolornum=2であ
り、アドレス0及び1の画素データを調べると{16
0,0,240}{0,0,0}であり、画素データ
{200,10,0}は登録されていないのでステップ
S35に進む。
At step S29, the flag flag indicating whether or not the colornum has reached the limit value 2 of the pallet memory to the m-th power is checked. flag = 0
Therefore, since it has not reached, it progresses to step S30. In step S30, prepress is stored in the pallet memory.
It is checked whether or not the data of nt [3] has already been registered. At this moment, colornum = 2, and if the pixel data of addresses 0 and 1 is checked, $ 16
0, 0, 240 {0, 0, 0}, and the pixel data {200, 10, 0} is not registered, so the flow proceeds to step S35.

【0074】S35ではパレットメモリのアドレス2
(=colornum)にpresentのデータ{2
00,10,0}を登録する。そしてパレット番号Pに
2を代入する(ステップS35)。そしてcolorn
umをインクリメントする(ステップS36)。次にc
olornumがパレットメモリの限界値2のm乗に達
したかどうかチェックする(ステップS37)。ここ
で、colornum=3であるから達していない。従
って何の処理も行われずステップS39に進む。ステッ
プS39ではパレット番号P=2を2ビット分(10)
出力する(=outbit)。
At S35, the address 2 of the pallet memory
(= Colornum) present data $ 2
00, 10, 0} is registered. Then, 2 is substituted for the pallet number P (step S35). And color
um is incremented (step S36). Then c
It is checked whether or not colornum has reached the limit value 2 of the palette memory to the power m (step S37). Here, since colornum = 3, it has not been reached. Therefore, no processing is performed and the process proceeds to step S39. In step S39, the pallet number P = 2 for 2 bits (10)
Output (= outbit).

【0075】次にステップS41で、colornum
=3とcheck=4を比較している。両者は異なるの
で何も処理は行われずステップS26に進む。
Next, in step S41, colornum
= 3 and check = 4. Since the two are different, no processing is performed and the process proceeds to step S26.

【0076】ここで、next[3]とformer
[3]のデータを更新する。即ち、former[3]
にnext[3]が代入されnext[3]にpres
ent[3]が代入される(ステップS26,27)。
こうしてnext[3]={210,10,0}、fo
rmer[3]={0,0,0}となる。
Here, next [3] and former
Update the data of [3]. That is, former [3]
Is assigned to next [3], and pres is assigned to next [3].
ent [3] is substituted (steps S26 and S27).
Thus, next [3] = {210,10,0}, fo
rmer [3] = {0, 0, 0}.

【0077】この時点での出力状態は以下のようにな
る。
The output state at this point is as follows.

【0078】(0)(0)(1/1/0)(0)(1/
0)(0)(1/1/1)(0)(1/1/10) また、パレットメモリの中は以下のようになる。
(0) (0) (1/1/0) (0) (1 /
0) (0) (1/1/1) (0) (1/1/10) The contents of the palette memory are as follows.

【0079】アドレス<00000000>の中身=1
01000000000000011110000 アドレス<00000001>の中身=0000000
00000000000000000 アドレス<00000010>の中身=1100100
00000101000000000
Content of address <00000000> = 1
01000000000000000111110000 Contents of address <00000001> = 000000
0000000000000000000 Contents of address <00000010> = 1100100
00000101000000000000

【0080】次の画素10はnext[3]と異なるデ
ータを有しているがformer[3]と同じ値である
ので第1比較部4から「1」が出力され第2比較部5か
ら「0」が出力される。ここで、next[3]とfo
emer[3]のデータを更新する。こうしてnext
[3]={0,0,0}、former[3]={21
0,10,0}となる。
The next pixel 10 has data different from next [3], but has the same value as former [3], so that “1” is output from the first comparator 4 and “2” is output from the second comparator 5. "0" is output. Here, next [3] and fo
Update the data of emer [3]. Thus next
[3] = {0,0,0}, former [3] = {21
0, 10, 0}.

【0081】次の画素11は{255,255,25
5}の値を有し、従って、present[3]={2
55,255,255}となる(ステップS13)。p
resent[3]はnext[3]={0,0,0}
ともformer[3]={210,10,0}とも異
なる値を有しているので第1比較部からは「1」が出力
され(ステップS21)、第2比較部からも「1」が出
力される(ステップS28)。
The next pixel 11 is # 255, 255, 25
5}, so present [3] = {2
55, 255, 255} (step S13). p
current [3] is next [3] = {0,0,0}
Since both have a different value from former [3] = {210, 10, 0}, “1” is output from the first comparing unit (step S21), and “1” is also output from the second comparing unit. Is performed (step S28).

【0082】ステップS29で、colornumがパ
レットメモリの限界値2のm乗に達しているかどうかを
示すフラグflagをチェックしている。flag=0
なので達していないということでステップS30に進
む。ステップS30ではパレットメモリ内にprese
nt[3]のデータがすでにもう登録されているかどう
か調べるのだが、現時点でcolornum=3であ
り、アドレス0、1及び2の画素データを調べると{1
60,0,240}{0,0,0}{200,10,
0}であり、画素データ{255,255,255}は
登録されていないのでステップS35に進む。
In step S29, the flag flag indicating whether or not the colornum has reached the pallet memory limit value 2 raised to the mth power is checked. flag = 0
Therefore, since it has not reached, it progresses to step S30. In step S30, prepress is stored in the pallet memory.
It is checked whether or not the data of nt [3] has already been registered. At this moment, colornum = 3, and if pixel data of addresses 0, 1, and 2 are checked, $ 1
60,0,240} {0,0,0} {200,10,
0}, and the pixel data {255, 255, 255} has not been registered, so the flow proceeds to step S35.

【0083】S35ではパレットメモリのアドレス3
(=colornum)にpresentのデータ{2
55,255,255}を登録する。そしてパレット番
号Pに3を代入する(ステップS35)。そしてcol
ornumをインクリメントする(ステップS36)。
次にcolornumがパレットメモリの限界値2のm
乗に達したかどうかチェックする(ステップS37)。
ここで、colornum=4であるから達していな
い。従って何の処理も行われずステップS39に進む。
ステップS39ではパレット番号P=2を2ビット分
(11)出力する(=outbit)。
In S35, the address 3 of the pallet memory
(= Colornum) present data $ 2
55, 255, 255} are registered. Then, 3 is substituted for the pallet number P (step S35). And col
ornum is incremented (step S36).
Next, colornum is m of the limit value 2 of the palette memory.
It is checked whether the power has reached the power (step S37).
Here, colornum is not reached because colornum = 4. Therefore, no processing is performed and the process proceeds to step S39.
In step S39, the pallet number P = 2 is output for 2 bits (11) (= outbit).

【0084】次にステップS41では、colornu
mとcheckを比較している。両者は共に4であり等
しいのでステップS42に進み、outbitをインク
リメントする。そして、checkにcheck
8を代入する(ステップS43)。
Next, in step S41, colornu
m and check are compared. Since both are 4, which are equal to each other, the flow advances to step S42 to increment outbit. Then, check 2 = check 2 =
8 is substituted (step S43).

【0085】ここで、next[3]とformer
[3]のデータを更新する。即ち、former[3]
にnext[3]が代入されnext[3]にpres
ent[3]が代入される(ステップS26,27)。
こうしてnext[3]={255,255,25
5}、former[3]={0,0,0}となる。
Here, next [3] and former
Update the data of [3]. That is, former [3]
Is assigned to next [3], and pres is assigned to next [3].
ent [3] is substituted (steps S26 and S27).
Thus, next [3] = $ 255, 255, 25
5}, and former [3] = {0, 0, 0}.

【0086】この時点での出力状態は以下のようにな
る。
The output state at this point is as follows.

【0087】(0)(0)(1/1/0)(0)(1/
0)(0)(1/1/1)(0)(1/1/10)(1
/0)(1/1/11)
(0) (0) (1/1/0) (0) (1 /
0) (0) (1/1/1) (0) (1/1/10) (1
/ 0) (1/1/11)

【0088】また、パレットメモリの中は以下のように
なる。
The contents of the pallet memory are as follows.

【0089】アドレス<00000000>の中身=1
01000000000000011110000 アドレス<00000001>の中身=0000000
00000000000000000 アドレス<00000010>の中身=1100100
00000101000000000 アドレス<00000011>の中身=1111111
11111111111111111
Content of address <00000000> = 1
01000000000000000111110000 Contents of address <00000001> = 000000
0000000000000000000 Contents of address <00000010> = 1100100
00000101000000000000 Contents of address <0000011> = 1111111
11111111111111111

【0090】次の画素12はnext[3]と同じデー
タを有しているので第1比較部4から「0」が出力され
る。
Since the next pixel 12 has the same data as next [3], “0” is output from the first comparing section 4.

【0091】次の画素13は{160,0,240}の
値を有し、従ってpresent[3]={160,
0,240}となる(ステップS13)。presen
t[3]はnext[3]={255,255,25
5}ともformer[3]={0,0,0}異なる値
を有しているので第1比較部からは「1」が出力され
(ステップS21)、第2比較部からも「1」が出力さ
れる(ステップS28)。
The next pixel 13 has a value of {160,0,240}, so present [3] = {160,
0,240 ° (step S13). presen
t [3] is next [3] = $ 255, 255, 25
Since 5 [] has a different value [former [3] = {0, 0, 0}, "1" is output from the first comparing unit (step S21), and "1" is also output from the second comparing unit. It is output (step S28).

【0092】ステップS29で、colornumがパ
レットメモリの限界値2のm乗に達しているかどうかを
示すフラグflagをチェックしている。flag=0
なので達していないということでステップS30に進
む。ステップS30ではパレットメモリ内にprese
nt[3]のデータがすでにもう登録されているかどう
か調べる。現時点でcolornum=4であり、アド
レス0、1、2及び3の画素データを調べるとアドレス
0に{160,0,240}が登録されているのでパレ
ット番号Pに0を代入してステップS39に進む。
In step S29, the flag flag indicating whether or not the colornum has reached the limit value 2 of the pallet memory to the m-th power is checked. flag = 0
Therefore, since it has not reached, it progresses to step S30. In step S30, prepress is stored in the pallet memory.
It is checked whether the data of nt [3] has already been registered. At the present time, colornum = 4, and when pixel data at addresses 0, 1, 2, and 3 are examined, {160, 0, 240} is registered at address 0, so 0 is substituted for the pallet number P, and the process proceeds to step S39. move on.

【0093】次にステップS41でcolornum=
4;check=8を比較している。両者異なるので何
の処理も行わずステップS26に進む。
Next, at step S41, colornum =
4; check = 8 is compared. Since the two are different, no process is performed and the process proceeds to step S26.

【0094】ステップS39ではパレット番号P=0を
3ビット分(000)出力する(=outbit)。
In step S39, the pallet number P = 0 is output for three bits (000) (= outbit).

【0095】ここで、next[3]とformer
[3]のデータを更新する。即ち、former[3]
にnext[3]が代入されnext[3]にpres
ent[3]が代入される(ステップS26,27)。
こうしてnext[3]={160,0,240}、f
ormer[3]={255,255,255}とな
る。
Here, next [3] and former
Update the data of [3]. That is, former [3]
Is assigned to next [3], and pres is assigned to next [3].
ent [3] is substituted (steps S26 and S27).
Thus, next [3] = {160,0,240}, f
orr [3] = {255, 255, 255}.

【0096】この時点での出力状態は以下のようにな
る。
The output state at this point is as follows.

【0097】(0)(0)(1/1/0)(0)(1/
0)(0)(1/1/1)(0)(1/1/10)(1
/0)(1/1/11)(0)(1/1/000)
(0) (0) (1/1/0) (0) (1 /
0) (0) (1/1/1) (0) (1/1/10) (1
/ 0) (1/1/11) (0) (1/1/000)

【0098】パレットメモリの中は変化がない。There is no change in the palette memory.

【0099】以上の処理を図5の画像に繰り返すことに
よって以下の符号データが完成する。
The following code data is completed by repeating the above processing for the image of FIG.

【0100】(0)(0)(1/1/0)(0)(1/
0)(0)(1/1/1)(0) (1/1/10)(1/0)(1/1/11)(0)
(1/1/000)(0)(1/0)(0) (0)(0)(1/0)(0)(0)(1/1/01
0)(0)(0) (1/1/001)(1/0)(0)(0)(0)(1
/1/011)(0)(0) (0)(0)(0)(1/0)(0)(1/1/00
0)(1/1/001)(0) (0)(1/1/010)(0)(0)(0)(1/1
/011)(0)(0) (0)(0)(0)(0)(1/1/000)(1/1
/010)(0)(0) (0)(1/1/001)(1/1/000)(1/1
/011)(0)(0)(0)(0) (0)(0)(0)(1/1/100)(0)(0)
(1/1/001)(0) (0)(0)(1/0)(0)(0)(0)(1/1/
011)(0) (0)(1/0)(0)(1/1/101)(0)
(0)(0)(0) (0)(1/1/001)(1/1/100)(0)
(1/1/101)(1/0)(0)(0) …
(0) (0) (1/1/0) (0) (1 /
0) (0) (1/1/1) (0) (1/1/10) (1/0) (1/1/11) (0)
(1/1/000) (0) (1/0) (0) (0) (0) (1/0) (0) (0) (1/1/01)
0) (0) (0) (1/1/001) (1/0) (0) (0) (0) (1
/ 1/011) (0) (0) (0) (0) (0) (1/0) (0) (1/1/00
0) (1/1/001) (0) (0) (1/1/010) (0) (0) (0) (1/1)
/ 011) (0) (0) (0) (0) (0) (0) (1/1/000) (1/1)
/ 010) (0) (0) (0) (1/1/001) (1/1/000) (1/1)
/ 011) (0) (0) (0) (0) (0) (0) (0) (1/1/100) (0) (0)
(1/1/001) (0) (0) (0) (1/0) (0) (0) (0) (1/1 /
011) (0) (0) (1/0) (0) (1/1/101) (0)
(0) (0) (0) (0) (1/1/001) (1/1/100) (0)
(1/1/101) (1/0) (0) (0) ...

【0101】また、パレットメモリの中は以下のように
なる。
The contents of the pallet memory are as follows.

【0102】アドレス<00000000>の中身=1
01000000000000011110000 アドレス<00000001>の中身=0000000
00000000000000000 アドレス<00000010>の中身=1100100
00000101000000000 アドレス<00000011>の中身=1111111
11111111111111111 アドレス<00000100>の中身=0000000
00000000011111111 アドレス<00000101>の中身=0000101
01000111001111000
Content of address <00000000> = 1
01000000000000000111110000 Contents of address <00000001> = 000000
0000000000000000000 Contents of address <00000010> = 1100100
00000101000000000000 Contents of address <0000011> = 1111111
11111111111111111 Contents of address <00000100> = 000000
00000000111111111 Contents of address <0000001> = 0000101
010001111001111000

【0103】もし、出現画素データが256色に達する
と、パレットメモリでは許容できなくなるため、ステッ
プS38でフラグが立ち、以後の処理ではパレットメモ
リのアドレス信号(1〜8ビット)を出力するのでなく
present[3]の画素データ24ビットが出力さ
れる(ステップS40)。
If the appearance pixel data reaches 256 colors, the palette memory becomes unacceptable. Therefore, a flag is set in step S38. In the subsequent processing, the address signal (1 to 8 bits) of the palette memory is not output. 24 bits of pixel data of present [3] are output (step S40).

【0104】<データ伸長処理>次に、上述のデータ圧
縮装置により圧縮されたでデータを、元の画像データに
復元するデータ伸長装置について説明する。
<Data Decompression Processing> Next, a data decompression device for restoring the original data to the data compressed by the data compression device will be described.

【0105】図7は実施例1によるデータ伸長装置の機
能構成を現すブロック図である。同図において701は
分配部であり、メモリ10から読み出したデータをビッ
ト単位に分割し、さらに制御部710の制御により第3
比較部702、第4比較部703、パレットメモリ部7
04、スイッチ705のどれかに読み出したデータを分
配する。特にパレットメモリ部に分配するときはデータ
の補間も行う。702は第3比較部で、分配部701か
ら分配された1ビットデータをOFF信号である0を比
較して等しかったら「0」、異なれば「1」という信号
7aを出力する。703は第4比較部で、分配部701
から分配された1ビットデータをOFF信号である0と
比較して等しかったら「0」、異なれば「1」という信
号7bを出力する。704はパレットメモリ部で、分配
部701から分配された8ビットデータが指し示すアド
レスに格納されている画素データ24ビットを出力す
る。705はスイッチで、制御部710の制御により、
分配部からの24ビット画素データとパレットメモリか
らの24ビット画素データのスイッチングをする。70
6はセレクタで、スイッチ705からの画素データと第
4ラッチ部708からの画素データを入力し、第4比較
部703の出力信号7bの制御によりどちらかを選択す
る。707は第3ラッチ部であり、セレクタからの出力
である画素データを信号7aを書き込み信号として保持
する。708は第4ラッチ部であり、第3ラッチ部から
の出力画素データを信号7aを書き込み信号として保持
する。709は画素データ格納部であり、第3ラッチ部
からの出力をその画素位置に対応する場所に保持する。
710は制御部であり、信号7a及び7bの状態から各
部の動作タイミングの制御、特に分配部の制御(各信号
のビット数制御及びパレットメモリに分配するデータの
補間)を行う。
FIG. 7 is a block diagram showing a functional configuration of the data decompression device according to the first embodiment. In the figure, reference numeral 701 denotes a distribution unit which divides data read from the memory 10 into bit units, and further divides the data into third units under the control of the control unit 710.
Comparing section 702, fourth comparing section 703, palette memory section 7
04, distribute the read data to any of the switches 705. Especially when data is distributed to the pallet memory unit, data interpolation is also performed. A third comparison unit 702 outputs a signal 7a of “0” if the 1-bit data distributed from the distribution unit 701 is equal by comparing the OFF signal of 0, and “1” if they are different. Reference numeral 703 denotes a fourth comparison unit, which is a distribution unit 701.
The 1-bit data distributed from is compared with the OFF signal 0, and outputs a signal 7b of "0" if equal and "1" if different. A palette memory unit 704 outputs 24 bits of pixel data stored at an address indicated by the 8-bit data distributed from the distribution unit 701. A switch 705 is controlled by the control unit 710.
The switching between the 24-bit pixel data from the distribution unit and the 24-bit pixel data from the palette memory is performed. 70
Reference numeral 6 denotes a selector which receives the pixel data from the switch 705 and the pixel data from the fourth latch unit 708, and selects one of them by controlling the output signal 7b of the fourth comparing unit 703. A third latch unit 707 holds the pixel data output from the selector as the signal 7a as a write signal. A fourth latch unit 708 holds the pixel data output from the third latch unit as a write signal using the signal 7a. Reference numeral 709 denotes a pixel data storage unit that holds an output from the third latch unit at a location corresponding to the pixel position.
A control unit 710 controls the operation timing of each unit based on the states of the signals 7a and 7b, and particularly controls the distribution unit (controls the number of bits of each signal and interpolates data to be distributed to the palette memory).

【0106】上記の構成におけるデータ伸長装置の動作
について、図8〜図10のフローチャートを参照しなが
ら以下に説明する。
The operation of the data decompression device having the above configuration will be described below with reference to the flowcharts of FIGS.

【0107】図8〜図10は実施例1のデータ伸長装置
による処理手順を表わすフローチャートである。尚、以
下の説明においては、第3ラッチ部707に保持される
データをnext[3]とし、第4ラッチ部708に保
持されるデータをformer[3]とする。
FIGS. 8 to 10 are flowcharts showing the processing procedure by the data decompression apparatus of the first embodiment. In the following description, the data held in the third latch unit 707 is referred to as next [3], and the data held in the fourth latch unit 708 is referred to as former [3].

【0108】ステップS81で第3ラッチ部707及び
第4ラッチ部708を初期化し、next[3]とfo
rmer[3]に初期値をセットする。この初期値は、
圧縮時と同じ値にする必要があり、ここでは、next
[3]={255,255,255}、former
[3]={0,0,0}となる。ステップS82で出現
画素データを計数するcolornumとcolorn
umがパレットメモリの許容数を越えたことを示し、f
lagをリセットすると同時に出力ビット長さを表すo
utbitを1にし、outbitをインクリメントす
るタイミングをとるcheckを2にリセットする。次
にステップS83で分配部701から1ビットデータを
読み出し、これをdata1とする。次にステップS8
4において、第3比較部702によりdata1が
「0」であるかどうか判断する。この結果、data1
=0であればステップS85へ進む。また、data1
≠0の時は図8のステップS91へ処理を進める。
In step S81, the third latch unit 707 and the fourth latch unit 708 are initialized, and next [3] and fo are initialized.
Set an initial value to rmer [3]. This initial value is
It is necessary to set the same value as at the time of compression. Here, next
[3] = {255, 255, 255}, former
[3] = {0, 0, 0}. Colornum and colorn for counting appearance pixel data in step S82
indicates that um has exceeded the allowable number of palette memories, and f
o that represents the output bit length while resetting the lag
outbit is set to 1, and check, which takes the timing to increment outbit, is reset to 2. Next, in step S83, 1-bit data is read from the distribution unit 701, and is set as data1. Next, step S8
In 4, the third comparing unit 702 determines whether data1 is “0”. As a result, data1
If = 0, the process proceeds to step S85. Also, data1
If $ 0, the process proceeds to step S91 in FIG.

【0109】ステップS85ではnext[3]をその
位置の画素とし出力する。そしてステップS86へ進
み、まだ圧縮データが残っていればステップS83へ戻
り上述の処理を繰り返す。また、圧縮データが残ってい
なければ、本データ伸長処理を終了する。
In step S85, next [3] is output as the pixel at that position. Then, the process proceeds to step S86. If the compressed data still remains, the process returns to step S83 to repeat the above-described processing. If no compressed data remains, the data decompression process is terminated.

【0110】次にdata1=1の場合の処理を図9の
フローチャートにより説明する。data1の値が1で
あるということは、その位置の画素の色データは1画素
前の色データと異なる値をもっているということであ
る。ステップS91にて第3比較部702からの結果出
力が「1」となるので、分配部から1ビットデータを読
み出し、これをdata2とする。ステップS92で、
第4比較部704によりdata2=0であるかどうか
を比較し、data2=0の時ステップS93へ進み、
data2≠0の時はステップS101へ進む(図1
0)。
Next, the processing when data1 = 1 will be described with reference to the flowchart of FIG. The fact that the value of data1 is 1 means that the color data of the pixel at that position has a value different from the color data of the previous pixel. In step S91, the result output from the third comparing unit 702 is "1", so that 1-bit data is read from the distribution unit and is set as data2. In step S92,
The fourth comparing unit 704 compares whether data2 = 0, and when data2 = 0, proceeds to step S93.
When data2 ≠ 0, the process proceeds to step S101 (FIG. 1).
0).

【0111】ステップS93では、data2=0なの
で、その位置の画素はformer[3]の色データと
同じであるということで、続くステップS93にてne
xt[3]とformer[3]とのデータの入れ替え
を実行した後、前述のステップS85へ進む。ステップ
S85ではnext[3]のデータ(入れ替え前はfo
rmer[3]の色データであった)を出力する。
In step S93, since data2 = 0, the pixel at that position is the same as the color data of former [3].
After exchanging the data between xt [3] and former [3], the process proceeds to step S85 described above. In step S85, the data of next [3] (fo before the replacement is fo)
rmer [3]).

【0112】以上のステップS93の処理を実行する動
作を図7のブロック図により説明する。第4比較部70
3からの結果出力が「0」となるので、セレクタ部70
6は第4ラッチ部708からの出力(former
[3])を保持する。次に、後のデータ入れ替えのため
に、第4ラッチ部708に、第3ラッチ部707の出力
データを保持する。そして、セレクタ部706に保持さ
れているデータを第3ラッチ部707に保持する。そし
て、この第3ラッチ部707に保持されたデータを画素
データ格納部709へ格納する。このようにして、fo
rmer[3]データが画素データとして出力され、更
に、next[3]とformer[3]とのデータの
交換とが実行される。
The operation for executing the processing in step S93 will be described with reference to the block diagram of FIG. Fourth comparison unit 70
3 is "0", the selector unit 70
6 is an output from the fourth latch unit 708 (former
[3]) is held. Next, the output data of the third latch unit 707 is held in the fourth latch unit 708 for data replacement later. Then, the data held in the selector unit 706 is held in the third latch unit 707. Then, the data held in the third latch unit 707 is stored in the pixel data storage unit 709. In this way, fo
The rmer [3] data is output as pixel data, and data exchange between next [3] and former [3] is performed.

【0113】一方、data2=1の場合は、その位置
の画素はnext[3]でもformer[3]でもな
い新たな色データを持っている。従って、新たな色デー
タ又は色データのパレットメモリのアドレスを分配部よ
り読み出して画素データ格納部709へ出力するととも
に、next[3]及びformer[3]のデータの
更新を実行する。まずステップS101において、fo
rmer[3]にnext[3]の値を代入する。
On the other hand, when data2 = 1, the pixel at that position has new color data that is neither next [3] nor former [3]. Therefore, the new color data or the address of the palette memory of the color data is read from the distribution unit and output to the pixel data storage unit 709, and the data of next [3] and former [3] are updated. First, in step S101, fo
The value of next [3] is substituted for rmer [3].

【0114】次にステップS102において、フラグf
lagが0であるか、即ちcolorunmがパレット
メモリの限度量256に達していないかチェックする。
Next, in step S102, the flag f
It is checked whether lag is 0, that is, whether colorunm has not reached the limit amount 256 of the palette memory.

【0115】達していない場合、ステップS103に進
み達していた場合はステップS109に進む。
If it has not reached, the process proceeds to step S103. If it has reached, the process proceeds to step S109.

【0116】ステップS103では分配部から8−ou
tbit分上位ビットに0を補完された8ビットデータ
を得、data3に入力する。
In step S103, the distribution unit outputs 8-ou.
8-bit data in which higher bits are complemented with 0 for t bits is obtained and input to data3.

【0117】ステップS104ではパレットメモリアド
レスdata3に格納されている画素データをnext
[3]に入力する。
In step S104, the pixel data stored in the palette memory address data3 is
Enter in [3].

【0118】ステップS105ではdata3がcol
ornumと等しいかどうかチェックし、等しい時、そ
れは新しい画素データとなるのでステップS106に進
む。異なる時は何もせずにステップS85に飛ぶ。ステ
ップS106ではcolornumをステップS107
ではcolornumがパレットメモリの限度量に達し
ていないかチェックし、達していたらステップS108
でフラグを立て、達していなかったら何もせずにステッ
プS85に進みnext[3]を出力する。
In step S105, data3 is set to col.
It is checked whether it is equal to ornum, and when it is equal, it becomes new pixel data, and the process proceeds to step S106. If not, the process jumps to step S85 without doing anything. In step S106, colornum is set in step S107.
Then, it is checked whether or not the colornum has reached the limit of the pallet memory.
And if not, the process proceeds to step S85 without performing anything, and outputs next [3].

【0119】ステップS110ではcolornumと
checkが等しいかどうか調べ、等しかったらステッ
プS111に進み、outbitをインクリメントし、
checkをcheckの2乗で更新する(ステップS
112)。
In step S110, it is checked whether colornum and check are equal. If they are equal to each other, the process proceeds to step S111, and outbit is incremented.
check is updated by the square of check (step S
112).

【0120】一方、ステップS102で、フラグが立っ
ていた時、ステップS109に進み、分配部から画素デ
ータを示す24ビットデータを取り出し、next
[3]に格納し、ステップS85に進みnext[3]
を出力する。
On the other hand, when the flag is set in step S102, the process proceeds to step S109, where 24-bit data indicating pixel data is extracted from the distribution unit, and next
[3], and the process advances to step S85 to next [3].
Is output.

【0121】以上のフローチャートに従い、実際の圧縮
データを伸長してみる。上述のデータ圧縮装置により図
5に示される画像データを圧縮処理したデータを伸長処
理する。
In accordance with the above flowchart, actual compression data is expanded. The data obtained by compressing the image data shown in FIG.

【0122】最初にnext[3]とformer
[3]に初期値をセットする(ステップS81)。
First, next [3] and former
An initial value is set in [3] (step S81).

【0123】また、出現画素データを計数するカウンタ
colornumとcolornumがパレットメモリ
の限度値256に達していないかどうかを示すflag
をリセットする(ステップS82)。
[0123] Also, a counter "colornum" for counting appearance pixel data and a flag indicating whether or not "colornum" has not reached the limit value 256 of the pallet memory.
Is reset (step S82).

【0124】分配部701はメモリ10からメモリ10
の深さビット分のデータを取り出し記憶しておいて制御
部710の制御により各部に必要ビット数だけ分配し、
以上の処理をメモリ10内のデータがなくなるまでくり
返す。まず、分配部から1ビットデータがdatalに
代入される(ステップS83)。datal=0である
のでこの画素はnext[3]と等しいことがわかり、
{255,255,255}が出力される(ステップS
85)。次に分配部から分配されるデータも0であるの
で同様に{255,255,255}が出力される。こ
うして図5の画素1、画素2に対応するデータが画素デ
ータ格納部709に格納される。
The distribution unit 701 is provided from the memory 10 to the memory 10
, The data corresponding to the depth bits are taken out and stored, and the required number of bits are distributed to each unit under the control of the control unit 710.
The above processing is repeated until there is no more data in the memory 10. First, 1-bit data is assigned to data from the distribution unit (step S83). Since data = 0, we know that this pixel is equal to next [3],
{255, 255, 255} is output (step S
85). Next, since the data distributed from the distribution unit is also 0, {255, 255, 255} is similarly output. Thus, data corresponding to the pixels 1 and 2 in FIG. 5 is stored in the pixel data storage unit 709.

【0125】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。さらに、data2
も1であるのでステップS101に進み、former
[3]にnext[3]を代入しformer[3]=
{255,255,255}となる(ステップS10
1)。ここで、フラグflagをチェックすると0であ
るのでステップS103に進む(ステップS102)。
ステップS103では分配部から7ビット(8−out
bit)上位に0を代入された8ビットデータ、即ち0
という1ビットデータに0を7個上位に補間されたデー
タ00000000がdata3に代入される。
Next, since the data to be distributed from the distribution unit is 1, the flow advances to step S91 to further substitute 1-bit data into data2 from the distribution unit. Furthermore, data2
Is also 1, the process proceeds to step S101, and the
Next [3] is substituted for [3], and former [3] =
{255, 255, 255} (step S10
1). Here, when the flag is checked, it is 0, and the process proceeds to step S103 (step S102).
In step S103, 7 bits (8-out) are sent from the distribution unit.
bit) 8-bit data in which “0” is substituted in the high order, that is, “0”
The data 00000000 obtained by interpolating seven 0s to 1-bit data is substituted for data3.

【0126】ステップS104ではパレットメモリのア
ドレスdata3=00000000の位置の画素デー
タ{160,0,240}をnext[3]に代入す
る。ここでdata3=colornumであるのでス
テップS106に進む(ステップS105)。そしてc
olornumをインクリメントする(ステップS10
6)。ここで、colornum=1がパレットメモリ
の限度値256に達していないかどうかチェックし、達
していないので何の処理も行わずステップS110に進
む(ステップS107)。ステップS110では、co
lornum=1とcheck=2を比較している。こ
こで両者は異なるので、何の処理も行わずステップS8
5に進む。ステップS85ではその位置の画素としてn
ext[3]を画素データ格納部709に出力する。
In step S104, the pixel data {160, 0, 240} at the address data3 = 00000000 of the pallet memory is assigned to next [3]. Here, since data3 = colornum, the process proceeds to step S106 (step S105). And c
colornum is incremented (step S10).
6). Here, it is checked whether colornum = 1 has not reached the limit value 256 of the pallet memory, and since it has not reached, the process proceeds to step S110 without performing any processing (step S107). In step S110, co
lornum = 1 and check = 2 are compared. Here, since the two are different, no processing is performed and step S8 is performed.
Go to 5. In step S85, n is set as the pixel at that position.
ext [3] is output to the pixel data storage unit 709.

【0127】こうして図5の画素「3」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “3” in FIG. 5 is stored in the pixel data storage unit 709.

【0128】尚図5中の画素を特定する番号には丸を付
して示している。
Note that the numbers for specifying the pixels in FIG. 5 are shown with circles.

【0129】次に分配部から分配されるデータは0であ
るのでnext[3]={160,0,240}がその
位置の画素として画素データ格納部709に出力され
る。
Next, since the data distributed from the distribution unit is 0, next [3] = {160, 0, 240} is output to the pixel data storage unit 709 as the pixel at that position.

【0130】こうして図5の画素「4」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “4” in FIG. 5 is stored in the pixel data storage unit 709.

【0131】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。data2は0であ
るのでステップS93に進み、former[3]とn
ext[3]を交換しfurmer[3]={160,
0,240},next[3]={255,255,2
55}となる。そしてステップS85でnext[3]
がその位置の画素として画素データ格納部709に出力
される。
Next, since the data to be distributed from the distribution unit is 1, the flow advances to step S91 to further substitute 1-bit data into data2 from the distribution unit. Since data2 is 0, the process proceeds to step S93, where former [3] and n
ext [3] is exchanged, and then the value of [former [3] = $ 160,
0,240}, next [3] = {255, 255, 2}
55 °. Then, in step S85, next [3]
Is output to the pixel data storage unit 709 as a pixel at that position.

【0132】こうして図5の画素「5」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “5” in FIG. 5 is stored in the pixel data storage unit 709.

【0133】次に分配部から分配されるデータは0であ
るのでnext[3]={255,255,255}が
その位置の画素として画素データ格納部709に出力さ
れる。
Next, since the data distributed from the distribution unit is 0, next [3] = {255, 255, 255} is output to the pixel data storage unit 709 as the pixel at that position.

【0134】こうして図5の画素「6」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “6” in FIG. 5 is stored in the pixel data storage unit 709.

【0135】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。さらに、data2
も1であるのでステップS101に進み、former
[3]にnext[3]を代入しformer[3]=
{255,255,255}となる(ステップS10
1)。ここで、フラグflagをチェックすると0であ
るのでステップS103に進む(ステップS102)。
ステップS103では分配部から7ビット(8−out
bit)上位に0を代入された8ビットデータ、即ち1
という1ビットデータに0を7個上位に補間されたデー
タ00000001がdata3に代入される。
Next, since the data to be distributed from the distribution unit is 1, the flow advances to step S91 to further substitute 1-bit data into data2 from the distribution unit. Furthermore, data2
Is also 1, the process proceeds to step S101, and the
Next [3] is substituted for [3], and former [3] =
{255, 255, 255} (step S10
1). Here, when the flag is checked, it is 0, and the process proceeds to step S103 (step S102).
In step S103, 7 bits (8-out) are sent from the distribution unit.
bit) 8-bit data in which 0 is substituted in the high order, that is, 1
The data 00000001 obtained by interpolating seven 0s to the 1-bit data is substituted for data3.

【0136】ステップS104ではパレットメモリのア
ドレスdata3=00000001の位置の画素デー
タ{0,0,0}をnext[3]に代入する。ここで
data3=colornumであるのでステップS1
06に進む(ステップS105)。そしてcolorn
umをインクリメントする(ステップS106)。ここ
で、colornum=2がパレットメモリの限度値2
56に達していないかどうかチェックし、達していない
ので何の処理も行わずステップS110に進む(ステッ
プS107)。ステップS110では、colornu
mとcheckを比較する。両者は共に2であるのでス
テップS111に進み、outbitをインクリメント
する。ステップS112ではcheckにcheck2
を代入している。ステップS85ではその位置の画素と
してnext[3]を画素データ格納部709に出力す
る。
In step S104, the pixel data {0,0,0} at the address data3 = 00000001 of the pallet memory is assigned to next [3]. Here, since data3 = colornum, step S1
It proceeds to 06 (step S105). And color
um is incremented (step S106). Here, colornum = 2 is the limit value 2 of the palette memory.
It is checked whether it has not reached 56, and since it has not reached, the process proceeds to step S110 without performing any processing (step S107). In step S110, colornu
Compare m and check. Since both are 2, the process proceeds to step S111, and outbit is incremented. In step S112, check2 is added to check.
Is assigned. In step S85, next [3] is output to the pixel data storage unit 709 as the pixel at that position.

【0137】こうして図5の画素「7」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “7” in FIG. 5 is stored in the pixel data storage unit 709.

【0138】次に分配部から分配されるデータは0であ
るのでnext[3]={0,0,0}がその位置の画
素として画素データ格納部709に出力される。
Next, since the data distributed from the distribution unit is 0, next [3] = {0,0,0} is output to the pixel data storage unit 709 as the pixel at that position.

【0139】こうして図5の画素「8」に対応するデー
タが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “8” in FIG. 5 is stored in the pixel data storage unit 709.

【0140】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。さらに、data2
も1であるのでステップS101に進み、former
[3]にnext[3]を代入しfurmer[3]=
{0,0,0}となる(ステップS101)。ここで、
フラグflagをチェックすると0であるのでステップ
S103に進む(ステップS102)。ステップS10
3では分配部から6ビット(8−outbit)上位に
0を代入された8ビットデータ、即ち10という2ビッ
トデータに0を6個上位に補間されたデータ00000
010がdata3に代入される。
Next, since the data distributed from the distribution unit is 1, the flow advances to step S91, and the distribution unit substitutes 1-bit data into data2. Furthermore, data2
Is also 1, the process proceeds to step S101, and the
Next [3] is substituted for [3], and the form [3] =
{0, 0, 0} (Step S101). here,
When the flag is checked, it is 0, and the process proceeds to step S103 (step S102). Step S10
In 3, 8-bit data obtained by assigning 0 to the upper 6 bits (8-outbit) from the distribution unit, that is, data 0000 obtained by interpolating 6 higher 0s to 2-bit data 10.
010 is substituted for data3.

【0141】ステップS104ではパレットメモリのア
ドレスdata3=00000010の位置の画素デー
タ{200,10,0}をnext[3]に代入する。
ここでdata3=colornumであるのでステッ
プS106に進む(ステップS105)。そしてcol
ornumをインクリメントする(ステップS10
6)。ここで、colornum=3がパレットメモリ
の限度値256に達していないかどうかチェックし、達
していないので何の処理も行わずステップS110に進
む(ステップS107)。ステップS110ではcol
ornum=3とcheck=4を比較する。両者は異
なるので何の処理も行わず、ステップS85に進む。ス
テップS85ではその位置の画素としてnext[3]
を画素データ格納部709に出力する。
In step S104, the pixel data {200, 10, 0} at the address data3 = 00000010 in the pallet memory is substituted for next [3].
Here, since data3 = colornum, the process proceeds to step S106 (step S105). And col
ornum is incremented (step S10)
6). Here, it is checked whether colornum = 3 has not reached the limit value 256 of the pallet memory, and since it has not reached, the process proceeds to step S110 without performing any processing (step S107). In step S110, col
Compare ornum = 3 and check = 4. Since the two are different, no processing is performed, and the process proceeds to step S85. In step S85, next [3] is set as the pixel at that position.
Is output to the pixel data storage unit 709.

【0142】こうして図5の画素「9」に対応するデー
タが画素データ格納部709に格納される。
Thus, data corresponding to the pixel “9” in FIG. 5 is stored in the pixel data storage unit 709.

【0143】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。data2は0であ
るのでステップS93に進み、former[3]とn
ext[3]を交換しformer[3]={200,
10,0},next[3]={0,0,0}となる。
そしてステップS85でnext[3]がその位置の画
素として画素データ格納部709に出力される。
Next, since the data distributed from the distribution unit is 1, the flow advances to step S91, and the distribution unit substitutes 1-bit data into data2. Since data2 is 0, the process proceeds to step S93, where former [3] and n
ext [3] is exchanged and former [3] = $ 200,
10,0}, next [3] = {0,0,0}.
Then, in step S85, next [3] is output to the pixel data storage unit 709 as a pixel at that position.

【0144】こうして図5の画素「10」に対応するデ
ータが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “10” in FIG. 5 is stored in the pixel data storage unit 709.

【0145】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。さらに、data2
も1であるのでステップS101に進み、former
[3]にnext[3]を代入しfurmer[3]=
{0,0,0}となる(ステップS101)。ここで、
フラグflagをチェックすると0であるのでステップ
S103に進む(ステップS102)。ステップS10
3では分配部から6ビット(8−outbit)上位に
0を代入された8ビットデータ、即ち11という2ビッ
トデータに0を6個上位に補間されたデータ00000
011がdata3に代入される。
Next, since the data to be distributed from the distribution unit is 1, the flow advances to step S91 to further substitute 1-bit data into data2 from the distribution unit. Furthermore, data2
Is also 1, the process proceeds to step S101, and the
Next [3] is substituted for [3], and the form [3] =
{0, 0, 0} (Step S101). here,
When the flag is checked, it is 0, and the process proceeds to step S103 (step S102). Step S10
In 3, 8-bit data in which 0 is assigned to 6 bits (8-outbit) higher from the distribution unit, that is, data 0000 in which 6 0s are interpolated 6 bits higher in 2-bit data 11.
011 is assigned to data3.

【0146】ステップS104ではパレットメモリのア
ドレスdata3=00000011の位置の画素デー
タ{255,255,255}をnext[3]に代入
する。ここでdata3=colornumであるので
ステップS106に進む(ステップS105)。そして
colornumをインクリメントする(ステップS1
06)。ここで、colornum=4がパレットメモ
リの限度値256に達していないかどうかチェックし、
達していないので何の処理も行わずステップS110に
進む(ステップS107)。ステップS110ではco
lornum=4とcheck=4を比較する。両者は
等しいのでステップS111に進み、outbitをイ
ンクリメントする。ステップS112ではcheckに
check2を代入する。ステップS85ではその位置
の画素としてnext[3]を画素データ格納部709
に出力する。
In step S104, the pixel data {255, 255, 255} at the address data3 = 00000111 of the pallet memory is substituted for next [3]. Here, since data3 = colornum, the process proceeds to step S106 (step S105). Then, the colornum is incremented (step S1).
06). Here, it is checked whether colornum = 4 has not reached the limit value 256 of the palette memory,
Since it has not reached, the process proceeds to step S110 without performing any processing (step S107). In step S110, co
Compare lornum = 4 and check = 4. Since both are equal, the process proceeds to step S111, and outbit is incremented. In step S112, check2 is substituted for check. In step S85, next [3] is stored as the pixel at that position in the pixel data storage unit 709.
Output to

【0147】こうして図5の画素「11」に対応するデ
ータが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “11” in FIG. 5 is stored in the pixel data storage unit 709.

【0148】次に分配部から分配されるデータは0であ
るのでnext[3]={255,255,255}が
その位置の画素として画素データ格納部709に出力さ
れる。
Next, since the data distributed from the distribution unit is 0, next [3] = {255, 255, 255} is output to the pixel data storage unit 709 as the pixel at that position.

【0149】こうして図5の画素「12」に対応するデ
ータが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “12” in FIG. 5 is stored in the pixel data storage unit 709.

【0150】次に分配部から分配されるデータは1であ
るのでステップS91に進み、さらに分配部から1ビッ
トデータをdata2に代入する。さらに、data2
も1であるのでステップS101に進み、former
[3]にnext[3]を代入しfurmer[3]=
{255,255,255}となる(ステップS10
1)。ここで、フラグflagをチェックすると0であ
るのでステップS103に進む(ステップS102)。
ステップS103では分配部から5ビット(8−out
bit)上位に0を代入された8ビットデータ、即ち0
00という3ビットデータに0を5個上位に補間された
データ00000000がdata3に代入される。
Next, since the data to be distributed from the distribution unit is 1, the flow advances to step S91 to further substitute 1-bit data into data2 from the distribution unit. Furthermore, data2
Is also 1, the process proceeds to step S101, and the
Next [3] is substituted for [3], and the form [3] =
{255, 255, 255} (step S10
1). Here, when the flag is checked, it is 0, and the process proceeds to step S103 (step S102).
In step S103, the distribution unit sends 5 bits (8-out).
bit) 8-bit data in which “0” is substituted in the high order, that is, “0”
Data 00000000 obtained by interpolating five 0s to 3-bit data of 00 is assigned to data3.

【0151】ステップS104ではパレットメモリのア
ドレスdata3=00000000の位置の画素デー
タ{160,0,240}をnext[3]に代入す
る。ここでdata3とcolornumは異なるので
何の処理も行わずステップS110に進む(ステップS
105)。ステップS110ではcolornum=5
とcheck=8を比較する。両者は異なるので何の処
理も行わずステップS85に進む。ステップS85では
その位置の画素としてnext[3]を画素データ格納
部709に出力する。
In step S104, the pixel data {160, 0, 240} at the address data3 = 00000000 of the pallet memory is assigned to next [3]. Here, since data3 and colornum are different, no processing is performed and the process proceeds to step S110 (step S110).
105). In step S110, colornum = 5
And check = 8. Since the two are different, the process proceeds to step S85 without performing any processing. In step S85, next [3] is output to the pixel data storage unit 709 as the pixel at that position.

【0152】こうして図5の画素「13」に対応するデ
ータが画素データ格納部709に格納される。
Thus, the data corresponding to the pixel “13” in FIG. 5 is stored in the pixel data storage unit 709.

【0153】すべての圧縮データに対して上述の伸長処
理を実行すると、図5のRGBデータをまったく変化す
ることなく復元することができる。
When the above-described decompression processing is performed on all the compressed data, the RGB data in FIG. 5 can be restored without any change.

【0154】以上説明してきたように、実施例1による
画像データ圧縮伸長装置は可逆圧縮法であり、圧縮率も
高いという特徴を有している。特に、コンピュータ上で
作成した画像等のように、1領域中を同一のデータを持
つ画素が連続しているような画像に対して優れた効果を
発揮する。
As described above, the image data compression / decompression device according to the first embodiment is a reversible compression method and has a feature that the compression ratio is high. In particular, an excellent effect is exhibited for an image such as an image created on a computer in which pixels having the same data are continuous in one area.

【0155】尚、上述の第1ラッチ部2の動作は、上述
のフローチャートに示されるように、第1比較部4の比
較結果に基づいて保持データを更新してもよいし、画素
データ発生部1から画素データが入力される毎に保持デ
ータを更新するようにしてもよい。
The operation of the first latch unit 2 may update the held data based on the comparison result of the first comparison unit 4 as shown in the above-described flowchart, or may operate the pixel data generation unit. The stored data may be updated every time pixel data is input from 1.

【0156】(実施例2)上述の実施例1においてメモ
リ部は1つであるがこれを第1比較部4からの出力を記
憶するメモリ、第2比較部5からの出力を記憶するメモ
リ、画素データを記憶するメモリの3つに分けても良
い。その場合、ハード構成が簡単になるメリットがあ
る。
(Embodiment 2) In Embodiment 1 described above, the number of the memory unit is one, but the memory unit stores the output from the first comparison unit 4, the memory unit stores the output from the second comparison unit 5, The memory for storing pixel data may be divided into three. In that case, there is an advantage that the hardware configuration is simplified.

【0157】(実施例3)以上説明した実施例2におい
て、第1比較部4、及び第2比較部5から出力されるデ
ータは、ON/OFF(1/0)を示すフラグ制により
構成されている。本実施例2においては、第1比較部4
及び第2比較部5から出力されるデータをフラグ制では
なく、トリガー制により構成する。フラグ制とトリガー
制の違いを図11に表す。1101がフラグ制を表し、
1102がトリガー制を表す。同図から明らかなよう
に、トリガー制1102の方が同じデータが長く続く傾
向がある。この性質を利用して、第1比較部4及び第2
比較部5から出力されるデータに関しては、さらにMH
などのランレングス圧縮をかけ、データ量の削減を達成
することができる。また、MHに限らず、出来上がった
圧縮データにさらにハフマン符号またはLempel−
Ziv符号化などをかけ、さらなるデータ圧縮を実施す
ることが出来る。
(Embodiment 3) In Embodiment 2 described above, the data output from the first comparing section 4 and the second comparing section 5 are constituted by a flag system indicating ON / OFF (1/0). ing. In the second embodiment, the first comparison unit 4
The data output from the second comparison unit 5 is not a flag system but a trigger system. FIG. 11 shows the difference between the flag system and the trigger system. 1101 represents a flag system,
1102 indicates a trigger system. As is clear from the figure, the trigger system 1102 tends to keep the same data longer. By utilizing this property, the first comparison unit 4 and the second comparison unit 4
Regarding the data output from the comparison unit 5, MH
By applying run-length compression such as this, it is possible to achieve a reduction in the amount of data. Not only MH but also Huffman code or Lempel-
Further data compression can be performed by applying Ziv coding or the like.

【0158】(実施例4)以上説明した実施例におい
て、以前の画素データを記憶するラッチ(第2ラッチ
部)は1つであるが、複数もっても良い。
(Embodiment 4) In the embodiment described above, the number of latches (second latch units) for storing previous pixel data is one, but a plurality of latches may be provided.

【0159】例えば3つとすると、以前の色データ(第
21ラッチ部、第22ラッチ部、第23ラッチ部)が3
つまで記憶でき、パレットメモリアドレスや画素データ
24bitを出力する回数が減り、圧縮率が向上する。
その場合、第2比較部(第21比較部、第22比較部、
第23比較部)も3つとなり、それぞれの比較結果によ
り、信号1bにあたいする信号は2bitの値を有し、
例えば、 00:present[3]が第21ラッチ部と一致 01:present[3]が第22ラッチ部と一致 10:present[3]が第23ラッチ部と一致 11:どれとも一致しないのでパレットアドレス又は画
素データ出力という信号になる。
For example, if there are three, the previous color data (the 21st latch section, the 22nd latch section, and the 23rd latch section)
, And the number of times of outputting the palette memory address and the 24-bit pixel data is reduced, and the compression ratio is improved.
In that case, the second comparing section (the 21st comparing section, the 22nd comparing section,
The 23rd comparison section) also has three, and the signal corresponding to the signal 1b has a 2-bit value according to the comparison result,
For example, 00: present [3] matches the twenty-first latch part 01: present [3] matches the twenty-second latch part 10: present [3] matches the twenty-third latch part 11: pallet address because none matches Or, it becomes a signal of pixel data output.

【0160】この時、第1比較部が不一致だった時に更
新される第2ラッチ部のデータは、 1b=00:第21ラッチ部のデータを第1ラッチ部の
データで更新する。
At this time, the data of the second latch section updated when the first comparison section does not match is as follows: 1b = 00: The data of the 21st latch section is updated with the data of the first latch section.

【0161】=01:第22ラッチ部のデータを第1ラ
ッチ部のデータで更新する。
= 01: Data in the 22nd latch is updated with data in the first latch.

【0162】=10:第23ラッチ部のデータを第1ラ
ッチ部のデータで更新する。
= 10: The data in the twenty-third latch is updated with the data in the first latch.

【0163】=11:一番古く更新されたラッチ部を第
1ラッチ部のデータで更新する。
= 11: The oldest updated latch section is updated with the data of the first latch section.

【0164】又は1b=11の時は必ず第23ラッチ部
を更新することにしても良い。
Alternatively, when 1b = 11, the 23rd latch section may be updated without fail.

【0165】(実施例5)以上説明した実施例1ではパ
レットメモリアドレスを示すデータをアドレスビット数
がmの時、colornumの値に従って(1〜m)ビ
ットまで可変としたが、mビット固定としても良い。
(Embodiment 5) In Embodiment 1 described above, when the number of address bits is m, the data indicating the pallet memory address is variable up to (1 to m) bits according to the value of colornum. Is also good.

【0166】その場合図1セレクタ部8の制御及び図7
分配部701の制御はもっと簡単になる。
In that case, FIG. 1 shows the control of the selector section 8 and FIG.
Control of the distribution unit 701 becomes simpler.

【0167】尚、上述の各実施例においてはハードウエ
アによりその圧縮伸長方法を実現しているが、ソフトウ
エアによりこれを実現してもよい。
In each of the above embodiments, the compression / expansion method is realized by hardware, but this may be realized by software.

【0168】尚、上述の各実施例における画素データ圧
縮装置では、第2ラッチ部(3)に保持される画素デー
タは1つだけであるがこれに限られるものではない。前
回の更新後の画素データ、前々回の更新後の画素データ
というように保持する画素データの数は複数であっても
よい。
In the pixel data compression apparatus in each of the above embodiments, only one pixel data is held in the second latch section (3), but the present invention is not limited to this. A plurality of pieces of pixel data may be held, such as the pixel data after the previous update and the pixel data after the last update.

【0169】尚、本発明は、複数の機器から構成される
システムに適用しても1つの機器から成る装置に適用し
ても良い。また、本発明は、システム或は装置にプログ
ラムを供給することによって達成される場合にも適用で
きることはいうまでもない。
The present invention may be applied to a system including a plurality of devices or an apparatus including one device. Needless to say, the present invention can be applied to a case where the present invention is achieved by supplying a program to a system or an apparatus.

【0170】[0170]

【発明の効果】以上説明したように、本発明によるデー
タ圧縮装置及び方法によれば、コンピュータなどにより
作成された多値画像を劣化なく高い圧縮率で圧縮するこ
とが可能となる。
As described above, according to the data compression apparatus and method of the present invention, a multi-valued image created by a computer or the like can be compressed at a high compression ratio without deterioration.

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

【図1】実施例1のデータ圧縮装置の概略構成を表すブ
ロック図である。
FIG. 1 is a block diagram illustrating a schematic configuration of a data compression device according to a first embodiment.

【図2】実施例1のデータ圧縮装置の処理手順を表すフ
ローチャートである。
FIG. 2 is a flowchart illustrating a processing procedure of the data compression device according to the first embodiment.

【図3】実施例1のデータ圧縮装置の処理手順を表すフ
ローチャートである。
FIG. 3 is a flowchart illustrating a processing procedure of the data compression device according to the first embodiment.

【図4】実施例1のデータ圧縮装置の処理手順を表すフ
ローチャートである。
FIG. 4 is a flowchart illustrating a processing procedure of the data compression device according to the first embodiment.

【図5】画像データの1例を表す図である。FIG. 5 is a diagram illustrating an example of image data.

【図6】データ圧縮処理する画素の順番を表す図であ
る。
FIG. 6 is a diagram illustrating the order of pixels to be subjected to data compression processing.

【図7】実施例1のデータ伸長装置の概略構成を表すブ
ロック図である。
FIG. 7 is a block diagram illustrating a schematic configuration of a data decompression device according to the first embodiment.

【図8】実施例1のデータ伸長装置の処理手順を表すフ
ローチャートである。
FIG. 8 is a flowchart illustrating a processing procedure of the data decompression apparatus according to the first embodiment.

【図9】実施例1のデータ伸長装置の処理手順を表すフ
ローチャートである。
FIG. 9 is a flowchart illustrating a processing procedure of the data decompression device according to the first embodiment.

【図10】実施例1のデータ伸長装置の処理手順を表す
フローチャートである。
FIG. 10 is a flowchart illustrating a processing procedure of the data decompression apparatus according to the first embodiment.

【図11】フラグ制とトリガ制によるON/OFFの表
現の違いを表す図である。
FIG. 11 is a diagram illustrating a difference between ON / OFF expressions according to a flag system and a trigger system.

【図12】ADCT圧縮装置の機能構成を表すブロック
図である。
FIG. 12 is a block diagram illustrating a functional configuration of an ADCT compression device.

【図13】ADCT伸長装置の機能構成を表すブロック
図である。
FIG. 13 is a block diagram illustrating a functional configuration of an ADCT decompression device.

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

1 画素データ発生部 2 第1ラッチ部 3 第2ラッチ部 4 第1比較部 5 第2比較部 6 第1メモリ部 7 第2メモリ部 DESCRIPTION OF SYMBOLS 1 Pixel data generation part 2 1st latch part 3 2nd latch part 4 1st comparison part 5 2nd comparison part 6 1st memory part 7 2nd memory part

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 9/00 H04N 1/41 JICSTファイル(JOIS)Continuation of the front page (58) Field surveyed (Int. Cl. 7 , DB name) G06T 9/00 H04N 1/41 JICST file (JOIS)

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 過去に出現した画素データをパレット番
号付けして記憶するパレット記憶手段と、 原画像からの入力画素データと、前記入力画素データの
1つ前の画素データとを比較する第1の比較手段と、 前記第1の比較手段にて比較された両データが不一致で
あるときの画素データを少なくとも1つ以上保持する保
持手段と、 前記入力画素データと前記保持手段に保持されている画
素データとを比較する第2の比較手段と、 前記第2の比較手段による比較において、前記入力画素
データと前記保持手段に保持されたどの画素データとも
一致しないとき、前記入力画素データを前記パレット記
憶手段に記憶されている画素データのどれかと一致する
か検索し、前記入力画素データのパレット番号を出力す
る出力手段とを備えることを特徴とする画像データ圧縮
装置。
1. Palette storage means for storing pixel data appearing in the past by assigning a palette number thereto, and a first memory for comparing input pixel data from an original image with pixel data immediately before the input pixel data. A holding unit that holds at least one pixel data when the two data compared by the first comparing unit do not match, and that is held by the input pixel data and the holding unit A second comparing means for comparing the pixel data with the pixel data, wherein, when the input pixel data does not match any pixel data held in the holding means, Output means for searching for any of the pixel data stored in the storage means and outputting a pallet number of the input pixel data. Image data compression apparatus.
【請求項2】 前記第1の比較手段における一致/不一
致を示す比較結果と、前記第2の比較手段における一致
/不一致を示す比較結果と、前記出力手段により出力さ
れるパレット番号を記憶する記憶手段を更に備えること
を特徴とする請求項1に記載の画像データ圧縮装置。
2. A storage for storing a comparison result indicating match / mismatch in the first comparison means, a comparison result indicating match / mismatch in the second comparison means, and a pallet number output by the output means. 2. The image data compression apparatus according to claim 1, further comprising means.
【請求項3】 前記第1の比較手段にて比較された両デ
ータが不一致であるとき、前記出力手段は、前記保持手
段に保持された画素データの何れかを前記入力画素デー
タの1つ前の画素データにて更新することを特徴とする
請求項1に記載の画像データ圧縮装置。
3. When the two data compared by the first comparing means do not match, the output means sets one of the pixel data held in the holding means one before the input pixel data. The image data compression apparatus according to claim 1, wherein the image data is updated with the pixel data.
【請求項4】 過去に出現した画素データをパレット番
号付けして記憶するパレット記憶行程と、 原画像からの入力画素データと、前記入力画素データの
1つ前の画素データとを比較する第1の比較行程と、 前記第1の比較行程にて比較された両データが不一致で
あるときの画素データを少なくとも1つ以上保持する保
持行程と、 前記入力画素データと前記保持行程に保持されている画
素データとを比較する第2の比較行程と、 前記第2の比較行程による比較において、前記入力画素
データと前記保持行程に保持されたどの画素データとも
一致しないとき、前記入力画素データを前記パレット記
憶行程にて記憶されている画素データのどれかと一致す
るか検索し、前記入力画素データのパレット番号を出力
する出力行程とを備えることを特徴とする画像データ圧
縮方法。
4. A pallet storage process for storing pixel data that appeared in the past by assigning pallet numbers thereto, and comparing input pixel data from an original image with pixel data immediately before the input pixel data. A holding step of holding at least one pixel data when both data compared in the first comparing step do not match each other; and a holding step of holding the input pixel data and the holding step. A second comparison step of comparing the pixel data with the pixel data, and in the comparison by the second comparison step, when the input pixel data does not match any pixel data held in the holding step, the input pixel data is stored in the pallet. An output step of searching for a match with any of the pixel data stored in the storage step and outputting a pallet number of the input pixel data. Image data compression method to be.
【請求項5】 前記第1の比較行程における一致/不一
致を示す比較結果と、前記第2の比較行程における一致
/不一致を示す比較結果と、前記出力行程にて出力され
るパレット番号を記憶する記憶行程を更に備えることを
特徴とする請求項4に記載の画像データ圧縮方法。
5. A comparison result indicating a match / mismatch in the first comparison step, a comparison result indicating a match / mismatch in the second comparison step, and a pallet number output in the output step. The image data compression method according to claim 4, further comprising a storage step.
【請求項6】 前記第1の比較行程にて比較された両デ
ータが不一致であるとき、前記保持行程にて保持された
画素データの何れかを前記入力画素データの1つ前の画
素データにて更新する更新行程とを備えることを特徴と
する請求項4に記載の画像データ圧縮方法。
6. When both data compared in the first comparison step do not match, any one of the pixel data held in the holding step is replaced with the pixel data immediately before the input pixel data. The image data compression method according to claim 4, further comprising an updating step of updating the image data.
JP20252592A 1992-03-25 1992-07-29 Image data compression apparatus and method Expired - Fee Related JP3334910B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP20252592A JP3334910B2 (en) 1992-07-29 1992-07-29 Image data compression apparatus and method
US08/036,559 US5796872A (en) 1992-03-25 1993-03-23 Method and apparatus for compressing and decompressing image data
EP93302227A EP0562834B1 (en) 1992-03-25 1993-03-24 Method and apparatus for compressing and decompressing image data
DE69329510T DE69329510D1 (en) 1992-03-25 1993-03-24 Method and device for image data compression and decompression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20252592A JP3334910B2 (en) 1992-07-29 1992-07-29 Image data compression apparatus and method

Publications (2)

Publication Number Publication Date
JPH0652298A JPH0652298A (en) 1994-02-25
JP3334910B2 true JP3334910B2 (en) 2002-10-15

Family

ID=16458940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20252592A Expired - Fee Related JP3334910B2 (en) 1992-03-25 1992-07-29 Image data compression apparatus and method

Country Status (1)

Country Link
JP (1) JP3334910B2 (en)

Also Published As

Publication number Publication date
JPH0652298A (en) 1994-02-25

Similar Documents

Publication Publication Date Title
JP4367880B2 (en) Image processing apparatus and method, and storage medium
US6427025B1 (en) Image processing with selection between reversible and irreversible compression
JPH04328960A (en) Picture data transmitter
JP2000114980A (en) Quantization method and recording medium recorded with quantization program
JP3462867B2 (en) Image compression method and apparatus, image compression program, and image processing apparatus
JP3334910B2 (en) Image data compression apparatus and method
JP2000125111A (en) Picture compression method, picture restoration method, picture compression device, picture reader, picture compression program storage medium and picture restoration program storage medium
JP3108133B2 (en) Adaptive coding of color document images
JPH0654208A (en) Image processing method/device
JPH07240845A (en) Image data compression and expansion
US5796872A (en) Method and apparatus for compressing and decompressing image data
US5903671A (en) Data compression method and apparatus therefor
JP3260284B2 (en) Image compression device and image decompression device
JP3256298B2 (en) Image data encoding method and apparatus
JP3822512B2 (en) Image data compression apparatus, image data compression method, recording medium, and program
JP3590648B2 (en) Method of compressing original image data and method of expanding original image data
JP2791410B2 (en) Compressed image data extraction device
JP2810585B2 (en) Image encoding method and image decoding method
JPH03266564A (en) Method and device for encoding picture
JP3236079B2 (en) Image data compression method
JP3087790B2 (en) Image data compression / decompression method and apparatus
JP2830388B2 (en) Image coding device
JP3264519B2 (en) Image data compression device
JPH03285460A (en) Picture data compressing and encoding system
JP3323615B2 (en) Image data compression apparatus and method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020716

LAPS Cancellation because of no payment of annual fees