JPS6337777A - Compression system for image data - Google Patents
Compression system for image dataInfo
- Publication number
- JPS6337777A JPS6337777A JP61181298A JP18129886A JPS6337777A JP S6337777 A JPS6337777 A JP S6337777A JP 61181298 A JP61181298 A JP 61181298A JP 18129886 A JP18129886 A JP 18129886A JP S6337777 A JPS6337777 A JP S6337777A
- Authority
- JP
- Japan
- Prior art keywords
- representative
- gradation
- representative gradation
- gradations
- block
- 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
Links
Landscapes
- Image Processing (AREA)
Abstract
Description
【発明の詳細な説明】
〔目 次〕
概要
産業上の利用分野
従来の技術 (第7.8.9図)発明が解決し
ようとする問題点
問題点を解決するための手段
作用
実施例
本発明の原理説明 (第1.2図)代表階調の初期
値作成 (第3.4図)代表階調の送出1選択及び収束
判定
(第5図)
代表階調の更新頁 (第6図)変形例
発明の効果
〔1既 要〕
本発明は、多値中間調画像のデータ圧縮において、画像
を所定の複数画素からなるブロックに分割するとともに
、ブロック内の階調変化の大きさに応じてそのブロック
を表示する代表階調の数と代表階調の初期値を求め、こ
の初期値がら、例えばに平均アルゴリズムにより代表階
調の更新を行い、最終的な代表階調と、その代表階調の
ブロック内の配置を決定し、これら代表階調とブロック
内配置とを符号化するようにしたものである。[Detailed Description of the Invention] [Table of Contents] Overview Industrial Field of Application Prior Art (Figure 7.8.9) Problems to be Solved by the Invention Means for Solving the Problems Examples of Actions Present Invention Explanation of the principle (Figure 1.2) Creation of initial value of representative gradation (Figure 3.4) Selection of output 1 of representative gradation and convergence judgment (Figure 5) Update page of representative gradation (Figure 6) Effects of the Modified Example Invention [1 Already Required] The present invention, in data compression of a multi-level halftone image, divides the image into blocks each consisting of a predetermined plurality of pixels, and divides the image into blocks each consisting of a predetermined plurality of pixels, and also divides the image into blocks each consisting of a predetermined plurality of pixels, and divides the image into blocks each consisting of a predetermined plurality of pixels. The number of representative gradations to display the block and the initial value of the representative gradation are calculated, and from these initial values, the representative gradation is updated using an averaging algorithm, and the final representative gradation and its representative gradation are calculated. The arrangement within the block is determined, and these representative gradations and the arrangement within the block are encoded.
本発明は画像データ圧縮方式に係り、特に多値中間調画
像のデータ圧縮方式の改良に関する。The present invention relates to an image data compression method, and more particularly to an improvement in a data compression method for multi-level halftone images.
画像データを表すために必要な情報量は、数値データに
比べて桁違いに増大する。この情報量の増大は、画像デ
ータの中でも特に多値中間調画像やカラー画像で著しい
。The amount of information required to represent image data increases by an order of magnitude compared to numerical data. This increase in the amount of information is remarkable among image data, especially in multi-value halftone images and color images.
このような画像データを蓄積し、或いは高速。Accumulate such image data or fast.
高品質で伝送するためには、画像ごとの階調情報を高能
率に符号化する必要がある。In order to transmit with high quality, it is necessary to encode tone information for each image with high efficiency.
画像データの高能率な圧縮方式として、例えば差分適応
ブロック符号化(画像電子学会研究会予稿85−07−
04掲載)、及び、本願の出願人の考案のブロックごと
に複数個の代表階調で表現する方式次にこれら2者の方
式を説明する。As a highly efficient compression method for image data, for example, differential adaptive block coding (IEEJ Study Group Proceedings 85-07-
04) and a method devised by the applicant of the present application in which each block is expressed using a plurality of representative gradations.Next, these two methods will be explained.
(1) 前者の方式は、画像を所定の複数画素のブロ
ックに分割した後、ブロック内の階調レベルの最大値と
最小値を2″階調に量子化し、これをビットプレーン符
号化するものであり、画像情報を中央値、差分値、ビッ
トプレーン情報の3成分に分けることを特徴とする。(1) The former method divides an image into predetermined blocks of multiple pixels, then quantizes the maximum and minimum gradation levels within the block into 2'' gradations, and encodes this into bit-plane encoding. It is characterized by dividing image information into three components: median value, difference value, and bit plane information.
濃淡画が256階調(θ〜256)で、n=2のときに
ついて考えると、ブロック内の階調の最大値(L ma
x)と最小値(L ll1in)に対して、その差分を
、第7図のように一様量子化するとき、中央値LA。Considering the case where the gray scale image has 256 tones (θ~256) and n=2, the maximum value of the tones within the block (L ma
When the difference between x) and the minimum value (L ll1in) is uniformly quantized as shown in FIG. 7, the median value LA.
差分値LD、代表階jPIPi、Q、を次式のように定
めておく。The difference value LD and the representative floor jPIPi, Q are determined as shown in the following equation.
中央値: LA −(Lmax + Lmin ) /
2差分値: L、 −(Lmax −Lmin )
/ 222階調示:
P、−り、+ −LD (i 1 )L。Median value: LA − (Lmax + Lmin) /
2 difference value: L, -(Lmax -Lmin)
/222 gradation indication: P, -ri, + -LD (i 1 )L.
濃淡画像を表現するに当たっては、濃度変化の大きなブ
ロック程、少ない階調レベル数で、画質を落とさずに近
似し得る。そこで、第8図に示すように、LI、を閾値
T I、 T zと比較し、その大小により、そのブロ
ックをそれぞれ1.2.4階調で近似表現する。最大4
階調(階調成分)を用いるので、この階調のブロック内
配置を指定するには、画素ごとに最大2bitの情報(
分解能成分)が必要である。分解能成分の2ビットφ1
.φ2は、それぞれビットプレーン符号化する。When expressing a grayscale image, the larger the density change in a block, the smaller the number of gradation levels can be used to approximate the block without degrading the image quality. Therefore, as shown in FIG. 8, LI is compared with threshold values T I and T z, and depending on the magnitude thereof, the block is approximated with 1, 2, and 4 gradations, respectively. max 4
Since gradation (gradation component) is used, to specify the placement of this gradation within a block, a maximum of 2 bits of information (
resolution component) is required. 2 bits φ1 of resolution component
.. Each of φ2 is bit-plane encoded.
(2)後者の方式は、画像を所定の複数画素のブロック
に分割した後、各ブロックの画情報の近似度に応じて、
階調数を1.2,3,4. ・・・と逐次増加させる
ものであり、代表階調とその代表階調の配置を、例えば
に平均アルゴリズムにより決定することを特徴とする。(2) The latter method divides an image into predetermined blocks of multiple pixels, and then divides the image into blocks of predetermined multiple pixels, and then divides the image into
The number of gradations is 1.2, 3, 4. ..., and is characterized in that the representative gradation and the arrangement of the representative gradation are determined, for example, by an averaging algorithm.
この方式の符号化情報を抽出回路のブロック図を第9図
に示す。A block diagram of a circuit for extracting encoded information using this method is shown in FIG.
この方式は画像信号を入力してハ、ファメモリに蓄積し
、1ブロツクごとに読みだして、次のようにして符号化
情報を作成する。まず、代表階調としてブロックの平均
値を求め、ブロックを平均値で表して、十分な近似がで
きるか否かを調べる。In this method, an image signal is input, stored in a buffer memory, read out block by block, and encoded information is created as follows. First, the average value of a block is determined as a representative gradation, and the block is represented by the average value to check whether sufficient approximation can be achieved.
近似度は、ブロック内の各画素を代表階調で表したとき
の、実際の値との2乗平均誤差を用いる。The degree of approximation uses the root mean square error from the actual value when each pixel in the block is represented by a representative gradation.
もし、近似度が不十分ならば、代表階調のうち誤差の大
きい代表階調を2分して2つの代表階調とすることにし
、その代表階調の2つの初期値を作成する。次に、この
代表階調を用いて、ブロックの画素を最も近い代表階調
に分類するとともに、分類された各画素のグループごと
に平均値(セントロイド)を求め、新しい代表階調とす
る。このようにブロックの近似度に応じて代表する階調
数を増すとともに、代表階調(階調成分)と代表階調の
ブロック内配置(分解能成分)とを決定するものであっ
た。If the degree of approximation is insufficient, the representative gradation with a large error among the representative gradations is divided into two to create two representative gradations, and two initial values of the representative gradation are created. Next, using this representative gradation, the pixels of the block are classified into the nearest representative gradation, and the average value (centroid) for each group of classified pixels is determined and used as a new representative gradation. In this way, the number of representative gradations is increased according to the degree of approximation of the blocks, and the representative gradation (gradation component) and the arrangement of the representative gradation within the block (resolution component) are determined.
従来技術において、前者の差分適応ブロック符号化にお
いては、ブロックを複数画素で近似したとき、ブロック
の平均濃度は保存されないため、画像を自然に再現する
ためには、各ブロックを代表する階調数を後者の方式よ
り増さなければならないという欠点があり、圧縮比を高
められなかった。一方、後者の階調数を増加させなから
に平均アルゴリズムで代表階調を決定する方式において
は、代表階調数と代表階調の最適な選択が可能であるが
、繰り返し計算が必要であり、符号化に時間が掛かると
いう欠点があった。In the conventional technology, in the former type of differential adaptive block coding, when a block is approximated by multiple pixels, the average density of the block is not preserved, so in order to reproduce the image naturally, the number of tones representing each block must be This method had the disadvantage that the compression ratio had to be increased compared to the latter method, and the compression ratio could not be increased. On the other hand, in the latter method of determining the representative gradation using an averaging algorithm without increasing the number of gradations, it is possible to optimally select the number of representative gradations and the representative gradation, but it requires repeated calculations. However, the disadvantage is that it takes time to encode.
本発明は、多値中間調画像を所定数の複数画素からなる
ブロックに分割し、このブロック内の階調変化を予め定
められた複数個の闇値と比較し、階調変化に応じたクラ
スタ数と、各クラスタを表示する代表階調の初期値を決
定する。The present invention divides a multilevel halftone image into blocks each consisting of a predetermined number of pixels, compares the tone changes within this block with a plurality of predetermined darkness values, and creates clusters according to the tone changes. and the initial value of the representative gradation for displaying each cluster.
次いで上記代表階調の中から、各画素ごとに最も距離が
近いものを選んで割り付けることにより各画素を上記決
定された数のクラスタに分類し、この分類結果を記録す
る。Next, each pixel is classified into the determined number of clusters by selecting and assigning the one closest to each pixel from among the representative gradations described above, and the classification results are recorded.
次いで上記各クラスタごとにセントロイド(重心)を求
め、これを新たな代表階調とする。Next, a centroid (center of gravity) is determined for each cluster, and this is set as a new representative gradation.
この代表階調の更新操作において、新たに得られた分類
結果と先の分類結果が一致すれば、代表階調更新操作は
収束したと判定する。In this representative gradation updating operation, if the newly obtained classification result matches the previous classification result, it is determined that the representative gradation updating operation has converged.
代表階調更新操作が収束した場合、または同操作を一定
回数繰り返した後、求めた代表階調と分類結果をそのブ
ロックの階調成分及び分解能成分として出力する。When the representative gradation updating operation converges, or after repeating the same operation a certain number of times, the obtained representative gradation and classification result are output as the gradation component and resolution component of the block.
本発明ではクラスタ数を画像データの階調変化の度合に
応じて選択するとともに、クラスタごとに画素データの
平均値が保存されるので、最適に近い代表階調を決定す
ることができる。しかも、代表階調の更新操作に用いる
演算は至って簡単であるので、高速で実行できる。In the present invention, the number of clusters is selected according to the degree of gradation change in image data, and the average value of pixel data is saved for each cluster, so it is possible to determine a representative gradation that is close to the optimum. Moreover, since the calculation used to update the representative gradation is extremely simple, it can be executed at high speed.
第1図は、本発明に係る画像データ圧縮方式における符
号化情報抽出回路の原理説明図である。FIG. 1 is a diagram explaining the principle of an encoded information extraction circuit in an image data compression method according to the present invention.
同図において、1は画像データの入力端子、2はバッフ
ァメモリ、3は代表階調の初期値作成手段、4は代表階
調を順次送出する代表階調送出手段、5は代表階調選択
手段、6は分解能成分メモリ、7は収束判定手段、8は
代表階調更新手段、9は階調成分の出力端子、IOは分
解能成分の出力端子である。In the figure, 1 is an input terminal for image data, 2 is a buffer memory, 3 is representative gradation initial value creation means, 4 is representative gradation sending means for sequentially sending out representative gradations, and 5 is representative gradation selection means. , 6 is a resolution component memory, 7 is a convergence determining means, 8 is a representative gradation updating means, 9 is an output terminal of a gradation component, and IO is an output terminal of a resolution component.
本発明のバッファメモリ2は、画素単位の画像信号を端
子lから入力して、lブロック947分の画像データを
蓄積し、1ブロツクずつ画素データを出力する。このバ
ッファメモ”ノ2に格納さ机た画素データは、1ブロツ
クごとに読みだされて必要な処理が施される。The buffer memory 2 of the present invention receives an image signal in units of pixels from a terminal 1, stores 1 block of 947 worth of image data, and outputs pixel data one block at a time. The pixel data stored in this buffer memo 2 is read out block by block and subjected to necessary processing.
以下、画像データを256階調(0〜256)、ブロッ
クサイズを4×4画素、1ブロツクを最大4階調で近似
するものとして説明する。The following description will be made assuming that the image data has 256 gradations (0 to 256), the block size is 4×4 pixels, and one block is approximated by a maximum of 4 gradations.
各ブロックの符号化情報は、次のように作成される。ま
ず初期値作成手段3は、1ブロツク分の画素データをバ
ッファメモリ2より読み込んで、ブロック内の最大値(
Lmax)と最少値(L m1n)を求め、更にこれら
の値から差分値Lo=Lmax−L+ninを求める。Encoding information for each block is created as follows. First, the initial value creation means 3 reads one block of pixel data from the buffer memory 2, and reads the maximum value (
Lmax) and the minimum value (Lm1n) are determined, and the difference value Lo=Lmax-L+nin is determined from these values.
次に、上記差分値り、を閾値T l+ T z、 T
sと比較し、LDの大小によってそのブロックを表示す
る階調数を1〜4に決める〔第2図参照〕とともに、代
表階調の初期値L A、 P k、 Qk、 Ri=を
次式から求める。Next, the above difference value is set as the threshold value T l + T z, T
s, and determine the number of gradations to display the block from 1 to 4 depending on the size of LD (see Figure 2), and calculate the initial values of representative gradations LA, Pk, Qk, Ri= using the following formula. Find from.
中央値:
Lx −1−+++;n ” Lo (k
= 1 )2階調表示:
P k= L 、、lin士□LD (k=1.2)
3階調表示:
k
Qk= L+++i+s ” Ln (k
=1.2.3 )4階調表示:
Rk −Lath + −Lt+ (k =1.2
,314 )そして、これらの代表階調の初期値を代表
階調送出手段4にセットする。Median value: Lx −1−+++; n ” Lo (k
= 1) Two-gradation display: Pk=L,,linshi□LD (k=1.2)
3-gradation display: k Qk= L+++i+s ” Ln (k
=1.2.3) 4-gradation display: Rk -Lath + -Lt+ (k =1.2
, 314) Then, the initial values of these representative gradations are set in the representative gradation sending means 4.
次に、代表階調選択手段5は、これらの代表階調を用い
て、ブロックの画素を最も近い代表値に分類し、その結
果(階調の配置)を分解能成分メモリ6に書き込む。Next, the representative gradation selection means 5 uses these representative gradations to classify the pixels of the block into the closest representative value, and writes the result (gradation arrangement) into the resolution component memory 6.
次に代表階調選択手段5は、再びバッファメモリ2から
画素データを読みだし、各画素データを上記代表階調の
中の最も距離が近いものが表示するクラスタに分類する
。そして、この分類結果を分解能成分メモリ6に格納す
る。Next, the representative gradation selection means 5 reads out the pixel data from the buffer memory 2 again, and classifies each pixel data into clusters in which the closest among the representative gradations is displayed. Then, this classification result is stored in the resolution component memory 6.
代表階調更新手段8は分解能成分メモリ6より分類結果
を読みだし、分類された各クラスタごとに平均値(セン
トロイド)を求め、これを新しい代表階調として代表階
調送出手段4にセットする。The representative gradation updating means 8 reads the classification results from the resolution component memory 6, finds the average value (centroid) for each classified cluster, and sets this as a new representative gradation to the representative gradation sending means 4. .
代表階調送出手段41代表階調選択手段52分解能成分
メモリ6、代表階調更新手段8を用いた新たな代表階調
を求める操作は、必要に応じて繰り返される。The operation of obtaining a new representative gradation using the representative gradation sending means 41, representative gradation selecting means 52, resolution component memory 6, and representative gradation updating means 8 is repeated as necessary.
収束判定手段7はこの操作を繰り返し行わせ、新に作成
した分解能成分と以前の分解能成分の一致を検査し、一
致すれば、代表階調を求める操作が収束したと判定する
。そして1代表階調送出手段4に、求めた代表階調を端
子9に出力させるとともに、分解能成分メモリ6から代
表階調のブロック内配置情報を端子10に出力させる。The convergence determining means 7 repeats this operation, checks whether the newly created resolution component matches the previous resolution component, and if they match, determines that the operation for determining the representative gradation has converged. Then, the one representative gradation sending means 4 is caused to output the determined representative gradation to the terminal 9, and the in-block arrangement information of the representative gradation is output from the resolution component memory 6 to the terminal 10.
階調成分及び分解能成分の符号化については、従来技術
と同様であるので説明は省略する。The encoding of the gradation component and the resolution component is the same as in the prior art, so a description thereof will be omitted.
以下上記符号化情報抽出回路を実現するための具体的な
実施例を説明する。A specific example for realizing the encoded information extraction circuit described above will be described below.
第3図、第5図、第6図は第1図に示す本発明の符号化
情報抽出回路各部の詳細図である。3, 5, and 6 are detailed diagrams of each part of the encoded information extraction circuit of the present invention shown in FIG. 1.
第3図は初期値作成手段3の詳細図であって、図中、端
子3−1にはバッファメモリ2よりブロックごとに画素
データが入力される。FIG. 3 is a detailed diagram of the initial value generating means 3, in which pixel data is input block by block from the buffer memory 2 to the terminal 3-1.
L+++ax検出器3−2及びL win検出器3−3
は、ブロックごとに読みだされた画素データを入力し、
それぞれブロック内の最大値(L、、、)と最少値(L
、、、)を出力する。L+++ax detector 3-2 and Lwin detector 3-3
inputs the pixel data read out for each block,
Maximum value (L, , ) and minimum value (L
,,,) is output.
この最大値、最小値検出回路は、例えば第4図(alに
示す如く、ROM3−2−1及びレジスタ3−2−2を
用いて構成し得る。同図に示す構成で最大値を求める場
合は、レジスタ3−2−2を最初クリアしておく。端子
3−1からはブロックの画素データXijが入力され、
ROM3−2−1のアドレスの一部(例えば上位nビッ
ト)として加えられる。また、ROM3−2−1にはレ
ジスタ3−2−2の値が、これまたR OM3−2−1
のアドレスの一部(例えば下位nビット)として加えら
れる。このROM3−2−1は、同図(b)に見られる
ように、アドレスとして入力された2つの値のうち、大
きい方を出力する表を書き込んでおく。こうすることに
より、画素データが入力されるたびに、ROM3−2〜
1の出力をレジスタ3−2−2にセットすれば、最終的
にブロックの最大値がレジスタ3〜2−2に得られる。This maximum value and minimum value detection circuit can be configured using a ROM 3-2-1 and a register 3-2-2, for example, as shown in FIG. The register 3-2-2 is first cleared.Pixel data Xij of the block is input from the terminal 3-1,
It is added as part of the address (for example, upper n bits) of the ROM 3-2-1. Also, the value of register 3-2-2 is stored in ROM3-2-1.
is added as part of the address (for example, the lower n bits). This ROM 3-2-1 has written therein a table that outputs the larger of the two values input as addresses, as shown in FIG. 3(b). By doing this, each time pixel data is input, ROM3-2 to
If the output of 1 is set in register 3-2-2, the maximum value of the block is finally obtained in registers 3-2-2.
これに対して最小値を求める場合は、レジスタ3−2−
2に最初総てのビットを1にプリセットしておくととも
に、ROM3−2−1には、アドレスに入力した2つの
値のうち小さい方を出力する表を書き込んでおけばよい
。前述の如く、画像データの階調数が256の場合には
、ROM3−24の容量は64に−ord X 8bi
tとなる。On the other hand, if you want to find the minimum value, register 3-2-
2, all bits are initially preset to 1, and a table that outputs the smaller of the two values input to the address may be written in the ROM 3-2-1. As mentioned above, when the number of gradations of image data is 256, the capacity of ROM3-24 is 64-ord
It becomes t.
さて、第3図の説明に戻る。減算器3−4はL max
検出器3−2及びり、i、検出器3−3から、上述のよ
うにして求められたし□、とり08.を入力し、その差
分値(1,+> )を出力する。また、階調数算出RO
M3−5は、同様にL MIIXとり0.7を、そのア
ドレスに入力し、そのブロックを表示する階調数mを出
力する0階調数の最大値は4であるので、階調数1〜4
を0〜3に対応させ、mを2 bitで表す。Now, let's return to the explanation of FIG. The subtracter 3-4 is L max
From detector 3-2 and i, i was determined as described above from detector 3-3, and 08. is input, and its difference value (1, +>) is output. In addition, the number of gradations calculation RO
Similarly, M3-5 inputs L MIIX 0.7 to its address and outputs the number m of gradations to display that block.0 Since the maximum value of the number of gradations is 4, the number of gradations is 1. ~4
corresponds to 0 to 3, and m is represented by 2 bits.
ROM3−5には、入力した差分値と閾値T、。The input difference value and threshold value T are stored in the ROM 3-5.
”rz 、 T、との比較結果から(第2図参照)、階
調数即ち前述のクラスタ数mを決定する表を予め書き込
んでおく。A table for determining the number of gradations, ie, the number of clusters m mentioned above, is written in advance from the comparison results with "rz and T" (see FIG. 2).
次に、求めた差分(J L o及び階調数mは、増分R
OM3−6のアドレスの一部に加えられる。また、増分
ROM3−6のアドレスには階調磁カウンタ3−7の出
力2 bitが加えられる。Next, the obtained difference (J L o and the number of gradations m are determined by the increment R
Added to part of address of OM3-6. Furthermore, 2 bits of output from the gradation magnetic counter 3-7 are added to the address of the incremental ROM 3-6.
階調光カウンタ3−7は最初クリアされており、制御用
の順序信号(図示せず)が加えられるたびに1つずつカ
ウントアツプしたイ直1 (/=0.1゜2.3)を
出力する、増分ROM3−6はこれらの値を入力し、増
分LD (j!+1)/ (m+2)を出力する。加
算器3−8はL sinと増分とを入力し、制?B用の
順序信号(図示せず)が加えられるたびに、増分を増し
て代表階調の初期値を1つずつ端子3−9に出力する。The gradation light counter 3-7 is initially cleared, and counts up by one each time a control order signal (not shown) is applied. The incremental ROM 3-6 inputs these values and outputs the incremental LD (j!+1)/(m+2). Adder 3-8 inputs L sin and the increment, and outputs L sin and the increment. Every time a B order signal (not shown) is added, the initial values of the representative gradations are output one by one to the terminals 3-9 in increments.
第5図は、代表階調送出手段49代表階調選択手段5.
及び収束判定手段7の詳細図である。FIG. 5 shows representative gradation sending means 49 representative gradation selecting means 5.
and a detailed diagram of the convergence determination means 7.
第5図において、まず、代表階調送出手段4の動作は、
次のようになる。同図において、端子4−1.4−2か
らは、それぞれ初期値作成手段3と代表階調更新手段8
より、代表階調LA (k=1)。In FIG. 5, first, the operation of the representative gradation sending means 4 is as follows.
It will look like this: In the same figure, from terminals 4-1 and 4-2, initial value creation means 3 and representative gradation updating means 8 are provided, respectively.
Therefore, the representative tone LA (k=1).
またはPk (k=1.2)、またはQk (k=1゜
2.3)、またはRk (k=1.2,3.4)が入力
される。マルチプレクサ4−3は、入力された側に切り
換えられ、これらの代表階調を出力する。Alternatively, Pk (k=1.2), Qk (k=1°2.3), or Rk (k=1.2, 3.4) is input. The multiplexer 4-3 is switched to the input side and outputs these representative gradations.
デマルチプレクサ4−4は、これら代表階調を入力し、
kの値1,2,3.4に応じて、出力をそれぞれレジス
タ4−5.4−6.4−7.4−8の側に切り換えて各
レジスタにセットする。マルチプレクサ4−9は、各レ
ジスタを順次選択して代表階調を出力する。The demultiplexer 4-4 inputs these representative gradations,
Depending on the value of k of 1, 2, or 3.4, the output is switched to the register 4-5.4-6.4-7.4-8 side and set in each register. The multiplexer 4-9 sequentially selects each register and outputs a representative gradation.
次に、代表階調選択手段5の動作について説明する。減
算器5−2には、端子5−1からバッファメモリ2より
ブロックごとの画素データXijが入力される。そして
、各画素のデータについて、マルチプレクサ4−9を介
して、代表階調が一つずつ階調数分選択され、減算器5
−2に加えられる。減算器5−2は、これらの値から差
分の絶対値d ’1j−l X=J−(REG)’lを
出力する。(REG)k(k−1,2,3,4)は、そ
れぞれレジスタ4−5゜4−6. 4−7.4−8の内
容とする。Next, the operation of the representative gradation selection means 5 will be explained. Pixel data Xij for each block is input from the buffer memory 2 through the terminal 5-1 to the subtracter 5-2. Then, for the data of each pixel, representative gradations are selected one by one through the multiplexer 4-9, and the subtracter 5
-2 is added. The subtracter 5-2 outputs the absolute value of the difference d'1j-l X=J-(REG)'l from these values. (REG) k (k-1, 2, 3, 4) are registers 4-5, 4-6, respectively. The contents shall be as per 4-7.4-8.
検出器5−3は、d kijを入力し、この値が最少と
なるk(代表階調のインデックス)を出力する。The detector 5-3 inputs d kij and outputs k (index of representative gradation) for which this value is the minimum.
検出器5−3は、第4図に示す最少値検出回路とほぼ同
様の構成で、最初レジスタ3−2−2に総てのビットに
“1”をプリセットしておき、3−1に入力した値の方
が大きければ、このときのkの値をラッチ出力する信号
を付加すればよい。The detector 5-3 has almost the same configuration as the minimum value detection circuit shown in FIG. If this value is larger, a signal that latches and outputs the value of k at this time may be added.
次に、端子5−1に人力されたプロ・ツクの各画素ごと
に求められた、代表階調のインデックス(番号)k4、
をシフトレジスタ6−1に1つずつシフトしながら格
納する。ここでは、分解能成分としての代表階調のイン
デックスを記憶しておくメモリ6として、シフトレジス
タ6−1を用いている。Next, the index (number) k4 of the representative gradation obtained for each pixel of the pro-tsuku manually inputted to the terminal 5-1,
are stored in the shift register 6-1 while being shifted one by one. Here, a shift register 6-1 is used as the memory 6 for storing the index of the representative gradation as a resolution component.
このシフトレジスタ6−1の構成は16word X
2 bi tである。The configuration of this shift register 6-1 is 16 words
It is 2 bits.
収束判定手段7は不一致検出回路7−1.フリップフロ
ップ7−2から構成される。収束判定の動作は次のよう
にして行われる。不一致検出回路7−1は検出器5−3
からの新たに分類された代表階調のインデックスと、シ
フトレジスタから前回分類した代表階調のインデックス
を入力し、これらの一致を検査する。そして新たに求め
た代表階調インデックスが、前回の代表階調インデック
スと不一致の画素があれば、この旨の信号をフリップフ
ロップ7−2にセットする。これにより、代表階調を求
めるに平均アルゴリズムが収束したか否かが判る。The convergence determination means 7 includes a mismatch detection circuit 7-1. It is composed of a flip-flop 7-2. The convergence determination operation is performed as follows. The mismatch detection circuit 7-1 is the detector 5-3
The index of the newly classified representative gradation from the shift register and the index of the previously classified representative gradation from the shift register are input, and their coincidence is checked. If there is a pixel whose newly determined representative gradation index does not match the previous representative gradation index, a signal to this effect is set in the flip-flop 7-2. This makes it possible to determine whether the averaging algorithm has converged to find the representative gradation.
もし、ブロック中に不一致の画素があれば、フリ、プフ
ロソプ7−2からの信号により、再度、代表階調を更新
する操作を行う。If there is a mismatched pixel in the block, the representative gradation is updated again using a signal from the printer 7-2.
第6図は、代表階調更新手段8の詳細図である。FIG. 6 is a detailed diagram of the representative gradation updating means 8.
第6図において、加算器8−2には、バッファメモリか
らブロックごとの画素データXiJが入力されるととも
に、レジスタ8−3の内容がもう一方の入力に加えられ
ている。そして、この加算器8−2は、−数構出回路8
−6からの加算指令に従って累算を行う。In FIG. 6, pixel data XiJ for each block is input from the buffer memory to the adder 8-2, and the contents of the register 8-3 are added to the other input. And, this adder 8-2 is a negative number construction circuit 8.
Accumulation is performed according to the addition command from -6.
一致検出回路8−6には、分解能成分メモリ6より読み
だされた代表階調のインデックスにと、順序制御信号に
基づいて、現在求められている代表階調の番号がカウン
タ8−5から入力される。そして、これら2つの値が一
致したとき、−数構出回路8−6は前述の加算指令を出
力する。The match detection circuit 8-6 receives input from the counter 8-5 of the index of the representative gradation read out from the resolution component memory 6 and the number of the currently required representative gradation based on the order control signal. be done. When these two values match, the minus number construction circuit 8-6 outputs the above-mentioned addition command.
またこれと同時にカウンタ8−7では、−数構出回路8
−6からの加算指令の回数を計数している。At the same time, the counter 8-7 outputs a -number output circuit 8.
The number of addition commands from -6 is counted.
そして、これら2つの値が一致したとき、−数構出回路
8−6は前述の加算指令を出力する。When these two values match, the minus number construction circuit 8-6 outputs the above-mentioned addition command.
またこれと同時にカウンタ8−7では、−数構出回路8
−6からの加算指令の回数を計数している。At the same time, the counter 8-7 outputs a -number output circuit 8.
The number of addition commands from -6 is counted.
そして、各代表階調について、累算値がレジスタ8−3
に、ブロック内の個数がカウンタ8−7に求められるこ
とになり、これら2つの値が除算器8−4に入力される
。これによって、新たな代表階調が、前回の代表階調に
属する画素の平均値(セントロイド)として求められる
。Then, for each representative gradation, the accumulated value is stored in the register 8-3.
Then, the number in the block is determined by the counter 8-7, and these two values are input to the divider 8-4. As a result, a new representative gradation is obtained as the average value (centroid) of pixels belonging to the previous representative gradation.
新たな代表階調はレジスタ8−8にセットされ、代表階
調送出手段4へ送られる。The new representative gradation is set in the register 8-8 and sent to the representative gradation sending means 4.
本実施例では収束判定を、ブロック内の代表階調の配置
が前回と新たに求めたものが一致するか否かで行なった
が、これに変えて、前回求めた代表階調によるブロック
画情報の近似の誤差と、新たに求めた代表階調による近
似の誤差の差分を求め、この差分の減少の割合により判
定するようにしてもよい。In this embodiment, the convergence judgment was made based on whether the arrangement of the representative gradations in the block matched the previous one and the newly obtained one. The difference between the approximation error and the approximation error based on the newly determined representative gradation may be calculated, and the determination may be made based on the rate of decrease in this difference.
また、第1図では、収束判定手段7を用いて、代表階調
が収束するまで更新する操作を行なっているが、これも
種々変形して実施できる。Further, in FIG. 1, the convergence determining means 7 is used to update the representative gradation until it converges, but this can also be implemented with various modifications.
即ち、代表階調の正確な選択より処理速度の方を重視す
る場合には、収束判定手段7を省略し、代表階調更新操
作は初期値から1度だけ行うようにしてもよい。That is, if processing speed is more important than accurate selection of the representative gradation, the convergence determining means 7 may be omitted and the representative gradation updating operation may be performed only once from the initial value.
また、上記一実施例では、ブロックサイズを4×4画素
とし、ブロックを構成する階調数を最大4個とした例を
説明したが、ブロックサイズや表示階調数は、画像の種
類や符号化条件を考慮して、任意に選んでよい。Furthermore, in the above embodiment, the block size is 4×4 pixels, and the maximum number of gradations constituting the block is 4. However, the block size and the number of display gradations may vary depending on the type of image and It may be selected arbitrarily, taking into consideration the processing conditions.
更に、上記一実施例では、モノクロ多値中間調をデータ
圧縮する場合について述べたが、本方式はカラー多値画
像にも適用できることは明らかである。Further, in the above embodiment, a case was described in which data compression is performed on a monochrome multi-value halftone, but it is clear that the present method can also be applied to a color multi-value image.
本発明をRGBのカラー多値画像に適用する場合には、
モノクロ階調の代わりに、R,G、Bの3要素を持つ3
次元ベクトルを考えればよく、代表階調(代表色)の近
さの尺度は、ベクトル間の距離で計ればよい。従って、
本方式をカラー多値画像に適用したときは、1ブロツク
が複数個の代表色で近似される。When applying the present invention to an RGB color multilevel image,
Instead of monochrome gradation, it has 3 elements of R, G, and B.
It is sufficient to consider dimensional vectors, and the proximity of representative gradations (representative colors) may be measured by the distance between vectors. Therefore,
When this method is applied to a color multivalued image, one block is approximated by a plurality of representative colors.
本発明によれば、画像を細分した各ブロックでの階調の
平均値が保存され、最適に近い代表階調が選択されるの
で、各ブロックを表示する階調数を少な(とることがで
き、大きい圧縮比が得られる。また、各ブロックの階調
変化に応じて、表示階調の数(クラスタ数)と、代表階
調(クラスタ中心)の初期値を定めてに平均アルゴリズ
ムを用いるので、計算時間を短縮でき、高速処理が可能
となる。According to the present invention, the average value of the gradations in each block obtained by subdividing an image is saved, and the representative gradation that is close to the optimum is selected. , a large compression ratio can be obtained.Also, since the number of display gradations (number of clusters) and the initial value of the representative gradation (cluster center) are determined according to the gradation changes of each block, an averaging algorithm is used. , calculation time can be shortened and high-speed processing becomes possible.
第1図は本発明の符号化情報抽出回路説明図、第2図は
ブロックの表示階調数と初期値を説明するための図、
第3図は初期値作成回路詳細説明図、
第4図(a)及び(b)は、最大値・最小値検出器説明
図、
第5図は代表階調送出手段1代表階調選択手段。
収束判定手段説明図、
第6図は代表階調更新手段説明図、
第7図は従来の画信号の量子化説明図、第8図は従来の
ブロックの表示階調数と符号化情報説明図、
第9図は従来の画像データ圧縮方式説明図である。
図において、2はバッファメモリ、3は初期値作成手段
、4は代表階調送出手段、5は代表階調選択手段、6は
分解能成分メモリ、7は収束判定手段、8は代表階調更
新手段、xtJは画素データ、La 、Ph 、Qk、
R工は代表階調の初期値、φは分解能成分を示す。
本発明の符号化情報抽出回路説明図
第1図
階調の初期値 La P−Q−Rk
プロ7りの表示階調数と初期値
第 2 図
初期値作成回路詳細説明図
!@ 3 図
ROM構成例説明図
最大値・最小値検出S!!明図
第 4 図
代表階調退出手段1代表階調選択手段、及び収束判定手
段説明図第5図
第 6 図
従来の画信号の量子化説明図
@ 7 図
従来のブロックの表示階調数と符号化情報説明図箱
8 図Fig. 1 is an explanatory diagram of the encoded information extraction circuit of the present invention, Fig. 2 is a diagram for explaining the number of display gradations of blocks and initial values, Fig. 3 is a detailed explanatory diagram of the initial value creation circuit, Fig. 4 (a) and (b) are explanatory diagrams of the maximum value/minimum value detector, and FIG. 5 is representative gradation sending means 1 representative gradation selection means. Fig. 6 is an explanatory diagram of the convergence determining means, Fig. 6 is an explanatory diagram of the representative gradation updating means, Fig. 7 is an explanatory diagram of conventional quantization of image signals, and Fig. 8 is an explanatory diagram of the conventional block display gradation number and encoding information. , FIG. 9 is an explanatory diagram of a conventional image data compression method. In the figure, 2 is a buffer memory, 3 is an initial value creation means, 4 is a representative tone sending means, 5 is a representative tone selecting means, 6 is a resolution component memory, 7 is a convergence determining means, and 8 is a representative tone updating means. , xtJ is pixel data, La , Ph , Qk,
R represents the initial value of the representative gradation, and φ represents the resolution component. Figure 1 is an explanatory diagram of the encoded information extraction circuit of the present invention. Initial values of gradations La P-Q-Rk
Number of display gradations and initial values of Pro 7ri Figure 2 Detailed explanation of the initial value creation circuit! @3 Diagram ROM configuration example explanatory diagram Maximum value/minimum value detection S! ! Figure 4: Representative gradation exit means 1: Representative gradation selection means, and convergence determining means: Figure 5: 6: Conventional quantization of image signal Encoding information explanation box
8 Figure
Claims (1)
に、ブロック内の階調変化の大きさに応じたクラスタの
数を予め設定しておき、 各ブロックごとに、 ブロック内の画素データから、該画素データの最小値及
び最大値並びに両者の差分を求め、該差分の大きさから
対応したクラスタ数を選択するとともに、該各クラスタ
を表示する代表階調の初期値を算出して、各画素データ
を最も距離が近い代表階調が表示するクラスタに分類し
、 同一クラスタに分類された画素データのセントロイドを
算出して新たな代表階調を作成し、前記各画素データを
該新たに作成された代表階調のうちから最も距離が近い
代表階調が表示するクラスタに分類し直す操作を少なく
とも1回実行し、最終的に決定された少なくとも1個の
代表階調と各画素データが属するクラスタ番号とでブロ
ックの画情報を表すようにしたことを特徴とする画像デ
ータ圧縮方式。[Claims] An image is divided into blocks consisting of a predetermined number of pixels, and the number of clusters is set in advance according to the magnitude of gradation change within the block. From the pixel data, find the minimum value and maximum value of the pixel data and the difference between the two, select the corresponding number of clusters based on the size of the difference, and calculate the initial value of the representative gradation for displaying each cluster. Then, each pixel data is classified into clusters in which the nearest representative gradation is displayed, the centroid of the pixel data classified into the same cluster is calculated to create a new representative gradation, and each pixel data is The operation of reclassifying the newly created representative gradations into a cluster in which the closest representative gradation is displayed is performed at least once, and the finally determined at least one representative gradation and each An image data compression method characterized in that image information of a block is expressed by a cluster number to which pixel data belongs.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61181298A JPS6337777A (en) | 1986-07-31 | 1986-07-31 | Compression system for image data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61181298A JPS6337777A (en) | 1986-07-31 | 1986-07-31 | Compression system for image data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPS6337777A true JPS6337777A (en) | 1988-02-18 |
Family
ID=16098234
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61181298A Pending JPS6337777A (en) | 1986-07-31 | 1986-07-31 | Compression system for image data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6337777A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03291059A (en) * | 1990-04-09 | 1991-12-20 | N T T Data Tsushin Kk | Color picture encoding device |
-
1986
- 1986-07-31 JP JP61181298A patent/JPS6337777A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03291059A (en) * | 1990-04-09 | 1991-12-20 | N T T Data Tsushin Kk | Color picture encoding device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6748108B2 (en) | Method of selecting colors for pixels within blocks for block truncation encoding | |
| US6011878A (en) | Image processing method and apparatus | |
| GB2408647A (en) | Compressing colour images | |
| JPH05225332A (en) | Method and apparatus for variable-space wave filtering | |
| US5491564A (en) | Data compression method and apparatus for binary image using Markov model encoding | |
| US6204933B1 (en) | Information print system and image processing apparatus | |
| JPS5896458A (en) | Binary system | |
| JPS6337777A (en) | Compression system for image data | |
| US5748772A (en) | Image processing method and apparatus including an error calculation for calculating a difference between the values of error correction data and stored representative values | |
| US5987182A (en) | Markov model image encoding device and method | |
| JPS6374267A (en) | Image data compression system | |
| JP3062224B2 (en) | Image coding method | |
| JPS63305672A (en) | Block encoding system for multi-valued image | |
| JP3870056B2 (en) | Image processing apparatus and method, computer program, and computer-readable storage medium | |
| JP3215156B2 (en) | Color image processing method | |
| JPS61169086A (en) | Encoding system of half tone image | |
| JPH1198343A (en) | Image processing apparatus and image processing method | |
| JP2598410B2 (en) | Encoding device | |
| KR100490244B1 (en) | Error diffusion method using variable threshold value in image processing system | |
| JPH01229563A (en) | Image representation method | |
| JP2954234B2 (en) | Color document image processing system | |
| JPH0562863B2 (en) | ||
| JPS63190474A (en) | Color image data encoding device | |
| JPS63306769A (en) | Encoding method | |
| JPH02271423A (en) | Pseudo half tone picture storage device |