JPS63190474A - Color picture data coder - Google Patents

Color picture data coder

Info

Publication number
JPS63190474A
JPS63190474A JP62021847A JP2184787A JPS63190474A JP S63190474 A JPS63190474 A JP S63190474A JP 62021847 A JP62021847 A JP 62021847A JP 2184787 A JP2184787 A JP 2184787A JP S63190474 A JPS63190474 A JP S63190474A
Authority
JP
Japan
Prior art keywords
encoding
image data
color image
color
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
Application number
JP62021847A
Other languages
Japanese (ja)
Inventor
Mamoru Sato
佐藤 衞
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 JP62021847A priority Critical patent/JPS63190474A/en
Publication of JPS63190474A publication Critical patent/JPS63190474A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To code a color picture data with multi-color with efficient compression by providing two coding means adopting different coding systems. CONSTITUTION:The tilted device consist of a buffer memory 1 dividing a picture data into 3X3 blocks, a binary color picture coding circuit 100 suitable for coding a binary picture such as a line drawing or a character or a picture mainly, a multi-level color picture coding circuit 101 suitable for coding a picture such as a photograph or a picture, and a decision and selection circuit 102 deciding by which of the circuit 101 or 100 a color picture data in a block is to be coded and selecting the circuit. A picture data is inputted to a gradient calculation circuit 6 of the circuit 101 and the change in the color picture data level is calculated as to 4 directions and the sign and change amount in the direction having the largest change are outputted and one representative color, the direction taking a maximum gradient in the output of a gradient calculation circuit 6 and the gradient are used as one block code. Thus, efficient compression coding is applied.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、カラー画像データ符号化装置1.特にカラー
画像を隣接するブロックに分割し、符号化するブロック
符号化装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application] The present invention relates to a color image data encoding device 1. In particular, the present invention relates to a block encoding device that divides a color image into adjacent blocks and encodes the divided blocks.

[従来の技術] 従来この種の装置は一種類の符号化方式により構成され
ていた。例えば、第2図(a)のように4×4の画素ブ
ロック(CO8〜C33)に含まれるカラー画像データ
を、そのブロックによって定まる2色の代表色(CA 
、 CB )を決定した上で、各画素に対してこれらの
代表色に近似し、上記2色のいずれの代表色に分類され
たかを示す信号で置換えるという、符号化をしていた。
[Prior Art] Conventionally, this type of device has been configured using one type of encoding method. For example, as shown in Figure 2(a), the color image data contained in a 4x4 pixel block (CO8 to C33) is divided into two representative colors (CA) determined by that block.
, CB), approximate these representative colors for each pixel, and replace it with a signal indicating which of the above two representative colors it has been classified into.

かかる符号化方式では、第2図(a)のように、ブロッ
ク内の画素の色にバラツキが少ない場合は問題ないが、
第2図(b)の如く例えば原画素ブロック内にcx +
 c、+ czの3色が存在していた場合において、こ
のブロックが代表色CxC2°の2色に符号化された場
合は、C1はC2′に分類変換されてしまうので、再生
した画素ブロックには2色の信号しか再生されず、その
品質が悪いという欠点があった。そこで、代表色の数を
単純に増やすようにすれば、たしかに再生画像はより忠
実に再生されるが、逆に圧縮効率が低下してしまう。こ
のように、ブロック内に3色以上の多色が含まれるとい
うことは、例えば複数色の文字等の線画が含まれている
場合が特に相当する。
With this encoding method, there is no problem if there is little variation in the color of pixels within a block, as shown in FIG. 2(a), but
For example, as shown in FIG. 2(b), cx +
If there are three colors c, + cz, and this block is encoded into two representative colors CxC2°, C1 will be classified and converted to C2', so the reproduced pixel block will be The disadvantage was that only two color signals were reproduced and the quality was poor. Therefore, if the number of representative colors is simply increased, the reproduced image will certainly be reproduced more faithfully, but on the contrary, the compression efficiency will decrease. In this way, the fact that three or more colors are included in a block is especially true when, for example, line drawings such as characters of multiple colors are included.

[発明が解決しようとする問題点] 本発明は上述従来例の欠点を除去するために提案された
ものでその目的は、ブロック内に多色の色信号が含まれ
ている場合であっても、効率良く圧縮符号化するカラー
画像データ符号化装置、更に、原画に忠実にその符号化
・再生が可能とし、同時に符号化効率の向上したカラー
画像データ符号化装置を提供するところにある。
[Problems to be Solved by the Invention] The present invention was proposed in order to eliminate the drawbacks of the above-mentioned conventional example, and its purpose is to solve the problem even when a block contains multicolor color signals. It is an object of the present invention to provide a color image data encoding device that efficiently performs compression encoding, and furthermore, a color image data encoding device that enables encoding and reproduction faithfully to the original image, and at the same time has improved encoding efficiency.

[問題点を解決するための手段] 上記課題を実現するための本発明の構成は、二次元カラ
ー画像データを隣接する複数の画素よりなるブロックに
分割する分割手段と、このブロック化されたカラー画像
データから、代表する少なくとも一色の代表カラー画像
データを選び、当該ブロック内の各画素を前記少なくと
も一色の代表カラー画像データに対応づけることにより
第1の符号化コードに符号化する第1の符号化手段と、
当該ブロックのカラー画像データを代表する一色の代表
カラー画像データを選ぶと共に、当該ブロック内でのカ
ラー画像データ値の勾配を算出し、前記一色の代表カラ
ー画像データと勾配とを第2の符号化コードに符号化す
る第2の符号化手段とを具備する。
[Means for Solving the Problems] The configuration of the present invention for realizing the above-mentioned problems includes a dividing means for dividing two-dimensional color image data into blocks each consisting of a plurality of adjacent pixels, and a dividing means for dividing two-dimensional color image data into blocks each consisting of a plurality of adjacent pixels; a first code that selects representative color image data of at least one representative color from the image data and encodes it into a first encoding code by associating each pixel in the block with the representative color image data of the at least one color; and
Select representative color image data of one color that represents the color image data of the block, calculate the gradient of the color image data value within the block, and perform second encoding of the representative color image data of one color and the gradient. and second encoding means for encoding into a code.

更に上記課題を達成するための本発明の他の構成は、二
次元カラー画像データを隣接する複数の画素よりなるブ
ロックに分割する分割手段と、このブロック化されたカ
ラー画像データから、代表する少なくとも一色の代表カ
ラー画像データを選び、当該ブロック内の各画素を前記
少なくとも一色の代表カラー画像データに対応づけるこ
とにより第1の符号化コードに符号化する第1の符号化
手段と、当該ブロックのカラー画像データを代表する一
色の代表カラー画像データを選ぶと共に、当該ブロック
内でのカラー画像データ値の勾配を算出し、前記一色の
代表カラー画像データと勾配とを第2の符号化コードに
符号化する第2の符号化手段と当該ブロック内の像域を
判断する判断手段と、該判断手段の判断結果を第3の符
号化コードに符号化する第3の符号化手段と、前記判断
結果に応じて、前記第1の符号化コード又は第2の符号
化コードを選択し、該選択された第1若しくは第2の符
号化コードと前記第3の符号化コードとを出力する選択
手段を備える。
Furthermore, another configuration of the present invention for achieving the above object includes a dividing means for dividing two-dimensional color image data into blocks each consisting of a plurality of adjacent pixels; a first encoding means for selecting representative color image data of one color and encoding it into a first encoding code by associating each pixel in the block with the representative color image data of the at least one color; Select representative color image data of one color that represents the color image data, calculate the gradient of the color image data value within the block, and encode the representative color image data of one color and the gradient into a second encoding code. a second encoding means for determining the image area within the block; a third encoding means for encoding the determination result of the determination means into a third encoding code; selecting means for selecting the first encoded code or the second encoded code according to the selected encoded code and outputting the selected first or second encoded code and the third encoded code; Be prepared.

[作用] 上記構成の本発明によると、第1の符号化手段は画像ブ
ロック内に複数の代表色がある場合はその代表色を失う
ことなく符号化し、第2の符号化手段は画像ブロック内
に1つの代表色で十分である場合はその代表色で符号化
するようにしている。
[Operation] According to the present invention having the above configuration, when there is a plurality of representative colors in an image block, the first encoding means encodes the representative colors without losing them, and the second encoding means encodes the representative colors within the image block. If one representative color is sufficient for a given image, that representative color is used for encoding.

又本発明の他の構成によると、判断手段が画像ブロック
内の像域を認識して、その認識に応じて選択手段が第1
の符号化コードもしくは第2の符号化コードを選択する
ので、圧縮効率は向上し、かつ再生時の画像劣化はない
According to another configuration of the present invention, the determining means recognizes the image area within the image block, and the selecting means selects the first image area according to the recognition.
Since the encoding code or the second encoding code is selected, compression efficiency is improved and there is no image deterioration during playback.

[実施例] 以下添付図面を参照しつつ本発明に係る実施例を詳細に
説明する。
[Examples] Examples according to the present invention will be described in detail below with reference to the accompanying drawings.

第を図は本発明を適用した実施例のカラー画像データ符
号化装置でその構成は、大きく分けて4つの構成部分か
らなる。その4つの構成部分とは、画像データを3x3
のブロックに分割するバッファメモリ1と、主に線画1
文字画等の二値性画像を符号化するのに適した二値性カ
ラー画像符号化回路100と、写真、絵画等の画像を符
号化するのに適した多値性カラー画像符号化回路101
と、前記ブロック内のカラー画像データの符号化が、二
値性カラー画像データ符号化回路100又は多値性カラ
ー画像データ符号化回路101のいずれで符号化するの
が最適かを判定し選択する判定選択回路102とからな
る。以下順に、これらの構成要素について説明する。
Fig. 3 shows a color image data encoding device according to an embodiment of the present invention, and its configuration is roughly divided into four components. The four component parts are image data 3x3
Buffer memory 1 divided into blocks and line drawing 1
A binary color image encoding circuit 100 suitable for encoding binary images such as character images, and a multilevel color image encoding circuit 101 suitable for encoding images such as photographs and paintings.
Then, it is determined and selected which of the binary color image data encoding circuit 100 or the multilevel color image data encoding circuit 101 is optimal for encoding the color image data in the block. It consists of a judgment selection circuit 102. These components will be explained below in order.

〈二値性カラー画像データ符号化回路〉この二値性カラ
ー画像データ符号化回路100の構成は、2種の代表色
を選ぶ代表色選択回路2と、ブロック内の各画素をこれ
らの代表色のいずれかに分類してその分類結果を二値と
して出力する二値化回路3と、上記代表色と前記分類結
果の二値符号とをブロック符号化する符号化回路4とか
らなる。
<Binary color image data encoding circuit> The configuration of this binary color image data encoding circuit 100 includes a representative color selection circuit 2 that selects two types of representative colors, and a representative color selection circuit 2 that selects two types of representative colors, and a representative color selection circuit 2 that selects each pixel in a block by selecting these representative colors. It consists of a binarization circuit 3 that classifies the color into one of the following and outputs the classification result as a binary value, and an encoding circuit 4 that performs block encoding of the representative color and the binary code of the classification result.

この二値性カラー画像データ符号化回路100の概略動
作は以下のようである。今、第3図に示す3X3のブロ
ックについて符号化を行うものとする。第1図において
、バッファメモリ1によって3X3=9画素にまとめら
れたカラー画像データは、代表色選択回路2に人力され
、そこで2つの代表色が決定される。このように決定さ
れた2つの代表色のカラー画像データと、9画素のカラ
ー画像データとは、二値化回路3に人力される。
The general operation of this binary color image data encoding circuit 100 is as follows. Now, it is assumed that the 3×3 block shown in FIG. 3 is to be encoded. In FIG. 1, color image data collected into 3×3=9 pixels by a buffer memory 1 is input to a representative color selection circuit 2, where two representative colors are determined. The color image data of the two representative colors determined in this way and the color image data of nine pixels are manually input to the binarization circuit 3.

この回路3では、代表色と各カラー画像データとのデー
タ距離を求めることにより、前記9つのカラー画像デー
タを2つの代表色のいずれかに分類する。そして、2つ
の代表色とこれらのいずれに分類されたかを示す二値符
号とは、符号化回路4によって1つのブロック符号とな
る。この二値符号は、もし代表色選択回路2が3色以上
の代表色を選択する場合は、それに合わせて多値となる
のは言うまでもない。
This circuit 3 classifies the nine color image data into one of the two representative colors by determining the data distance between the representative color and each color image data. Then, the two representative colors and the binary code indicating which of these colors is classified are converted into one block code by the encoding circuit 4. Needless to say, this binary code becomes multi-valued if the representative color selection circuit 2 selects three or more representative colors.

く代表色選択回路2〉 この回路2について第4図に従って説明する。Representative color selection circuit 2> This circuit 2 will be explained according to FIG.

ブロック化されたカラー画像データは信号分離回路41
によって成分分離される。ここでは、その分離された信
号成分をY(輝度)、1.Q(色差)とする。成分分離
され、整形されたカラー画像データはY、I、Q夫々に
ついての信号演算回路42,43.44に入力される。
Blocked color image data is processed by a signal separation circuit 41
The components are separated by Here, the separated signal components are represented by Y (luminance), 1. Let it be Q (color difference). The component-separated and shaped color image data is input to signal calculation circuits 42, 43, and 44 for Y, I, and Q, respectively.

信号演算回路42.43.44は回路的には同一なので
、以下Y信号演算回路42について説明する。このY信
号演算回路42は、Yカラー画像データについて、その
ブロック内の最大値YeaK、最小値Yl@ln、そし
て最大値・最小値の差等を算出保持するものである。
Since the signal calculation circuits 42, 43, and 44 are the same in circuit terms, the Y signal calculation circuit 42 will be described below. This Y signal calculation circuit 42 calculates and holds the maximum value YeaK, the minimum value Yl@ln, the difference between the maximum value and the minimum value, etc. in the block for the Y color image data.

カラー画像データI、Qについても、Yと同様に、最大
値、最小値そしてそれらの差が夫々のラッチに保持され
る。Y信号、■信号、Q信号夫々についての最大値及び
最小値は、信号選択回路46に人力する。一方、各Y、
I、Q  についての最大値と最小値との差は変換回路
45に入力する。変換回路45では、上記差信号が各々
適当な重みをかけられた後に比較され、これらのなかで
最大の差を与える成分を表す信号を出力する。
As for color image data I and Q, similarly to Y, the maximum value, minimum value, and the difference between them are held in each latch. The maximum and minimum values for each of the Y signal, ■ signal, and Q signal are manually input to the signal selection circuit 46. On the other hand, each Y,
The difference between the maximum and minimum values for I and Q is input to the conversion circuit 45. In the conversion circuit 45, the difference signals are compared after being appropriately weighted, and a signal representing the component giving the largest difference among them is output.

信号演算回路42,43.44の出力(y−ax。The outputs of the signal calculation circuits 42, 43, and 44 (y-ax.

Y、、n、I□8・・・等)、および変換回路45の出
力は信号選択回路46に入力され、変換回路45の出力
が、Y、I、Qのうち最も変化の大きい成分についての
最大値・最小値を与えるカラー画像データとして出力す
る。即ち、代表色選択回路2は、9画素ブロックの各色
成分信号のなかから、最も色変化の大きい成分を決定し
、その色成分についての最大値及び最小値を出力するも
のである。決定されたこれらの最大値(以下、第1の代
表色と呼ぶ)、最小値(第2の代表色)が2色の代表色
となる。第2図の例で言えば、代表色をCAC6もしく
はax CY czとして出力することを意味する。
Y, , n, I Output as color image data that gives maximum and minimum values. That is, the representative color selection circuit 2 determines the component with the largest color change from among the color component signals of the nine pixel blocks, and outputs the maximum and minimum values for that color component. The determined maximum value (hereinafter referred to as the first representative color) and minimum value (second representative color) are the two representative colors. In the example of FIG. 2, this means outputting the representative color as CAC6 or ax CY cz.

〈二値化回路3〉 二値化回路3の構成例を第5図に示す。二値化回路3は
、本実施例においては代表色が2色であることから、ブ
ロック内の各画素について、各画素が上記2つの代表色
のいずれにより近いかを決定し、その決定結果を二値と
して出力する。第5図において、51.52は、上述し
たブロック内の第1.第2の代表色のカラー画像データ
を各色成分について、夫々保持するレジスタである。
<Binarization circuit 3> An example of the configuration of the binarization circuit 3 is shown in FIG. Since there are two representative colors in this embodiment, the binarization circuit 3 determines which of the above two representative colors each pixel is closer to for each pixel in the block, and outputs the determination result. Output as binary value. In FIG. 5, 51.52 is the first . This is a register that holds color image data of the second representative color for each color component.

減算回路53.54以降は、ブロック内の各画素につい
て、前記決定された2つの代表色のうちのいずれが色が
異なることが少ないかを決定するための回路である。即
ち、53.54はバッファメモリ1からのブロック内の
1画素のカラー画像データと、前記代表色との成分毎の
差をとる減算回路、55.56は前記差についての各成
分の重みをかける重み付は回路、57.58は平方和を
とる回路である。かくして、ブロック内の1画素のカラ
ー画像データと代表色との「画像データ距離」が計算さ
れる。1画素について、これと2つの代表色との画像デ
ータ距離に関する量が計算されると、比較回路59は距
離の少ない方、即ち平方和の小さい方の代表色を示す信
号を出力する。
The subtraction circuits 53 and 54 are circuits for determining, for each pixel in the block, which of the two determined representative colors is less likely to have a different color. That is, 53.54 is a subtraction circuit that calculates the difference for each component between the color image data of one pixel in the block from buffer memory 1 and the representative color, and 55.56 is a subtraction circuit that weights each component with respect to the difference. The weighting circuit is a circuit, and 57.58 is a circuit that calculates the sum of squares. In this way, the "image data distance" between the color image data of one pixel in the block and the representative color is calculated. When the amount related to the image data distance between one pixel and two representative colors is calculated, the comparison circuit 59 outputs a signal indicating the representative color with the smaller distance, that is, the smaller sum of squares.

例えば、第1の代表色を選ぶのであれば°゛1゛。For example, if you want to select the first representative color, select °゛1゛.

を、第2の代表色を選ぶのであれば0”を出力する。以
上のシーケンスを各画素についてくり返し、ブロック内
のすべての画素について、代表色との対応がつけられる
。代表色のカラー画像データと、各画素のいずれの代表
色に分類されたかを示す符号とは、符号化回路4によっ
て不可分な符号として整形される。即ち、符号化回路4
の出力は第6図の如くになる。そのフォーマットは、第
1の代表色信号、第2の代表色信号、そして00゜+ 
CI O””” 22の画素に対する分類結果等である
If the second representative color is selected, 0'' is output.The above sequence is repeated for each pixel, and all pixels in the block are associated with the representative color.Color image data of the representative color and a code indicating which representative color each pixel is classified into are formatted as inseparable codes by the encoding circuit 4. That is, the encoding circuit 4
The output is as shown in FIG. The format is a first representative color signal, a second representative color signal, and 00°+
These are the classification results for pixels of CI O"""22, etc.

〈多値性カラー画像符号化回路の概略〉第1図の101
は多値性カラー画像符号化回路である。この符号化回路
は色変化の少ないカラー画像を効率よく符号化するため
のものである。1ブロツク9つのカラー画像データは代
表色選択回路5に人力されて、1つ・の代表色が選択さ
れる。
<Outline of multivalued color image encoding circuit> 101 in Figure 1
is a multilevel color image encoding circuit. This encoding circuit is for efficiently encoding color images with little color change. One block of nine color image data is manually input to the representative color selection circuit 5, and one representative color is selected.

この代表色は一例として、色変化の少ないカラー画像を
扱う故に、ブロック内の9つのカラー画像データ中の中
間色とする。9つのカラー画像データは勾配算出回路6
に入力され、第7図に示す4方向について、カラー画像
データレベルの変化が算出され、最も変化の大きい方向
の符号と変化量が出力される。もつとも、前記4方向全
てについて、符号化順序を決めておき夫々類に勾配を符
号化するようにしてもよい。こうして、符号化回路7で
、1つの代表色と、勾配算出回路6の出力する勾配が最
大である方向と勾配とが1つのブロック符号となる。以
上が多値性カラー画像データ符号化回路101の概略で
ある。
For example, since a color image with little color change is handled, this representative color is an intermediate color among the nine color image data in the block. The nine color image data are sent to the gradient calculation circuit 6.
, the change in color image data level is calculated for the four directions shown in FIG. 7, and the sign and amount of change in the direction with the largest change are output. However, the encoding order may be determined for all of the four directions, and the gradients may be encoded in each class. In this way, in the encoding circuit 7, one representative color and the direction and gradient in which the gradient outputted by the gradient calculating circuit 6 is the maximum form one block code. The above is an outline of the multivalued color image data encoding circuit 101.

さらに細部にわたって説明する。先ず、代表色選択回路
5について説明する。
It will be explained in more detail. First, the representative color selection circuit 5 will be explained.

〈代表色選択回路5〉 第8図は代表色選択回路5の構成例である。第8図にお
いて、1ブロツク9画素にブロック化されたカラー画像
データは、信号分離回路61によって3つの成分Y(輝
度)、1.Q(色差)に分離される。これらの分離され
たカラー画像データは夫々、演算回路62,63.64
において、夫々の成分の最大値(Y、、1.、、  □
8等)と最小値(Y +aln + I +nln等)
を検出され、それら最大値と最小値の中央値 (Y□8
÷Y1n/2)等 が与えられる。信号合成回路65は
、各成分毎の中央値を合成して、代表色としてのカラー
画像データとする。
<Representative Color Selection Circuit 5> FIG. 8 shows an example of the configuration of the representative color selection circuit 5. In FIG. 8, color image data divided into nine pixels per block is processed by a signal separation circuit 61 into three components Y (luminance), 1. It is separated into Q (color difference). These separated color image data are processed by arithmetic circuits 62, 63 and 64, respectively.
, the maximum value of each component (Y, 1., □
8, etc.) and the minimum value (Y + aln + I + nln, etc.)
is detected, and the median value of the maximum and minimum values (Y□8
÷Y1n/2) etc. is given. The signal synthesis circuit 65 synthesizes the median value of each component to obtain color image data as a representative color.

〈勾配算出回路〉 第9図は勾配算出回路6の構成例である。この回路はバ
ッファメモリlによって切出されたブロックのカラー画
像データの色の勾配の傾向を抽出するもので、71はブ
ロック化されたカラー画像データを、第8図の分離回路
61と同様の成分(例えば、YIQ)に分離する分離回
路、72゜73.74は各成分の勾配を求める演算回路
である。演算回路72,73.74は夫々、第7図に示
したようなブロックについての、横方向の傾き、縦方向
の傾き、右下がり方向の傾き、右上がり方向の傾きを演
算する演算回路75,76.77.78と、その出力か
らブロック内のカラー画像データの、その成分の勾配を
符号として出力する符号化回路79等とから成っている
<Gradient Calculation Circuit> FIG. 9 shows a configuration example of the slope calculation circuit 6. This circuit extracts the tendency of the color gradient of the block color image data cut out by the buffer memory l, and 71 separates the blocked color image data into components similar to the separation circuit 61 of FIG. (for example, YIQ), and 72.73.74 is an arithmetic circuit that calculates the gradient of each component. The arithmetic circuits 72, 73, and 74 are arithmetic circuits 75, 74, respectively, which calculate the horizontal inclination, the vertical inclination, the downward slope to the right, and the upward slope to the right for the block shown in FIG. 76, 77, and 78, and an encoding circuit 79 that outputs the gradient of the component of the color image data within the block as a code.

先ず、1ブロツクの9つの画素の信号(Cao〜C2□
)は、信号分離回路71によって、Yについての成分(
c I。。 (l□。、・・・、C’22)と、■につ
いての成分(C2oo 、 C2+o 、 ・”、 C
22□)と、Qについての成分(C’Go + C31
0+  +C322)とに分離され、Yについての成分
は演算回路72へ、■についての成分は演算回路73へ
、Qについての成分は演゛算回路74へ、夫々人力され
る。各演算回路内部では、例として、Yの成分をとって
説明すると、第7図の記法に従って、 横方向の傾き((C’oo + C’or + C’0
2)−(C’2G  + C’21  + C’z2)
)  、縦方向の傾き((C’oo + C’lo +
 C’2G)−(C’02  + C’+2  + C
’22))  、右下がり方向の傾き((c ’o。+
01゜、十C’、。)(C’22 + C’ +2 +
 C’211)、右上り方向の傾き((C1゜2 + 
C’or + C’+2)−(C’2o+ C’to 
+ C’2+ )1が演算される。他のI、Q成分につ
いても同様である。これらの4つの傾き値によってブロ
ック内のカラー画像データの勾配の傾向を表現する。
First, the signals of nine pixels of one block (Cao to C2□
) is separated by the signal separation circuit 71 into a component for Y (
cI. . (l□.,..., C'22) and the component for ■ (C2oo, C2+o, ・'', C
22□) and the component for Q (C'Go + C31
0+ +C322), and the component for Y is manually inputted to an arithmetic circuit 72, the component for (2) to an arithmetic circuit 73, and the component for Q to an arithmetic circuit 74, respectively. Inside each arithmetic circuit, taking the component of Y as an example and explaining it, according to the notation in Fig. 7, the horizontal slope ((C'oo + C'or + C'0
2) - (C'2G + C'21 + C'z2)
), vertical slope ((C'oo + C'lo +
C'2G) - (C'02 + C'+2 + C
'22)), downward slope to the right ((c'o.+
01°, 10C'. )(C'22 + C' +2 +
C'211), upward slope to the right ((C1゜2 +
C'or + C'+2) - (C'2o+ C'to
+C'2+)1 is calculated. The same applies to the other I and Q components. These four gradient values represent the gradient tendency of the color image data within the block.

符号化回路79.80等は各々、上記4つの方向の勾配
のうち最大のものを選び符号化する。即ち、方向及び勾
配の符号化コードを出力する。従つて、勾配算出回路6
はYMQの3成分について、夫々勾配の最大の方向及び
その値を符号化したものが出力される。これらの符号化
コードは第1図の符号化回路7に出力される。この回路
7では、YIQの3成分を最終的な表色系のカラー画像
データに変換して、その表色系での勾配最大の方向及び
その勾配値を符号化し、更に第10図(a)に示す如く
、多値性カラー画像符号化回路によって符号化されたこ
とを示すユニークな識別コードと、そのブロック内の代
表色のカラー画像データデータ等を符号化する。
The encoding circuits 79, 80, etc. each select the largest gradient among the four directions and encode it. That is, the direction and slope encoded codes are output. Therefore, the slope calculation circuit 6
For the three YMQ components, the direction of the maximum gradient and its value are encoded and output. These encoded codes are output to the encoding circuit 7 in FIG. In this circuit 7, the three components of YIQ are converted into color image data of the final color system, and the direction of the maximum gradient and its gradient value in that color system are encoded. As shown in FIG. 2, a unique identification code indicating that the block has been encoded by a multivalued color image encoding circuit and color image data of the representative color within the block are encoded.

尚、第10図(b)は4方向のうちから最大勾配方向の
ものを選ぶということなしに、4方向全てについて符号
化する変形例である。
Incidentally, FIG. 10(b) is a modification example in which encoding is performed for all four directions without selecting the maximum gradient direction from among the four directions.

これらの符号化コードが第1図の信号選択回路9に人力
される。
These encoded codes are input manually to the signal selection circuit 9 in FIG.

以上のように、2つの符号回路100,101により、
異なる符号化法により別々に符号化した符号化コードが
2つ出力される。
As described above, by the two code circuits 100 and 101,
Two encoded codes encoded separately using different encoding methods are output.

〈符号化コードの選択〉 これらの符号化回路から出力されるのは、第6図又は第
10図の如き符号化コードであり、それらの−符号化コ
ードは信号選択回路9に入力される。第11図に、夫々
の符号化に従った再生像を模式的に表現したものを示す
<Selection of encoded code> What is output from these encoding circuits are encoded codes as shown in FIG. 6 or 10, and these encoded codes are input to the signal selection circuit 9. FIG. 11 shows a schematic representation of reproduced images according to each encoding.

さて、この2つのブロック符号化コードは符号化方式選
択回路8の出力する信号によってどちらかが選択される
。どちらが選択されたかを区別する情報は、信号選択回
路9の出力したブロック符号に付加される。
Now, one of these two block encoding codes is selected by the signal output from the encoding method selection circuit 8. Information for distinguishing which one has been selected is added to the block code output from the signal selection circuit 9.

〈符号化方式判定回路〉 上記2つの符号化コードのいずれかを選ぶ選択信号12
は符号化方式判定回路8から出力される。この符号化方
式判定回路8は、ブロック内の画素の画調又は像域を判
定すべき回路である。即ち、そのブロックが二値性カラ
ー画像データ符号化回路100によって符号化されるべ
ぎか、又は多値性カラー画像データ符号化回路101に
よって符号化されるべぎかを判定する。
<Encoding method determination circuit> Selection signal 12 for selecting one of the above two encoding codes
is output from the encoding method determination circuit 8. This encoding method determination circuit 8 is a circuit that determines the image tone or image area of pixels within a block. That is, it is determined whether the block should be encoded by the binary color image data encoding circuit 100 or the multilevel color image data encoding circuit 101.

この符号化判定回路はカラー画像データの分散σ2を演
算するものである。演算式は次の如くである。
This encoding determination circuit calculates the variance σ2 of color image data. The calculation formula is as follows.

σ2=Σα(CI −C’)・ (CI−C)/9ここ
で、CIはブロック内のi番目の画素のカラー画像ベク
トルで、RGB系で表わすと、C+=(RI、 G +
 、 B I)となる。又、Cはカラー画像データのブ
ロック内平均値、αは重みづけための対角行列成分であ
る。もし輝度Yの分散02を求めるときは、 もし色差■またはQの分散o2を求めるときは、 と決めることができる。これは、RGB信号とNTSC
信号との関係を使って決定したものである。もっと容易
には、RGB信号のG成分を用いて分散を求める場合、
αを とすることもできる。
σ2=Σα(CI-C')・(CI-C)/9 Here, CI is the color image vector of the i-th pixel in the block, and when expressed in RGB system, C+=(RI, G+
, B I). Further, C is the intra-block average value of color image data, and α is a diagonal matrix component for weighting. If you want to find the variance 02 of luminance Y, if you want to find the variance 02 of color difference ■ or Q, you can decide as follows. This is RGB signal and NTSC
This was determined using the relationship with the signal. More easily, when finding the dispersion using the G component of the RGB signal,
It is also possible to set α to .

符号化判定回路の一例を第11図に示す。第11図回路
においては、信号分離回路90によって例えばYIQに
分離されたカラー画像データの各成分について、分散演
算回路91,92.93が分散を演算する。これら3つ
の分散は比較回路95に入力され、その比較回路95に
おいて所定の閾値と比較される。この場合、比較回路9
5においては、例えばY(輝度)成分の分散値を重視す
るように重み付けする等して、選択信号12が生成され
る。分散はブロック内のカラー画像データのバラツキ度
合を示すものである。従って、線画等の二値性画像にお
いてはその値は大となり、逆ニ変化の少ない多値性カラ
ー画像においては小となるという性質をもつから、選択
信号12はブロック内を二値性画像か多値性画像かのい
ずれかに判定した結果を反映する。従って、この選択信
号12が信号選択回路9に入力して、選ばれた符号化コ
ードは、そのブロックの符号化に最も適した符号化法に
より符号化されたものである。
FIG. 11 shows an example of the encoding determination circuit. In the circuit of FIG. 11, dispersion calculation circuits 91, 92, and 93 calculate the dispersion for each component of the color image data separated into, for example, YIQ by the signal separation circuit 90. These three variances are input to a comparison circuit 95, where they are compared with a predetermined threshold value. In this case, the comparator circuit 9
In step 5, the selection signal 12 is generated by, for example, weighting the Y (luminance) component so that the variance value is emphasized. Dispersion indicates the degree of variation in color image data within a block. Therefore, in a binary image such as a line drawing, the value is large, and in a multivalued color image with little change, it is small. The result of the determination is reflected in either the multivalued image. Therefore, this selection signal 12 is input to the signal selection circuit 9, and the selected encoding code is encoded by the encoding method most suitable for encoding that block.

尚、ブロック内の像域又は画調を判断する手法として、
分散を求める他に、隣接する2画素間のデータ距離を求
め、その距離がある閾値よりも大きくなる画素のベアが
、そのブロック内でいくつ存在するかを検出し、そのペ
ア個数の多小によって、当該ブロックの像域又は画調を
認識するという手法もある。
In addition, as a method for determining the image area or image tone within a block,
In addition to finding the variance, we also find the data distance between two adjacent pixels, find out how many pixel bears where the distance is greater than a certain threshold exist in the block, and then calculate the There is also a method of recognizing the image area or image tone of the block.

〈復号化〉 次に復号化について簡単に説明する。復号化時は、復号
すべき符号化コードがどちらの符号化によって符号化さ
れたかは、第6図、第10図(a)又は(b)の識別コ
ードによって知る。二値性カラー画像データ符号化回路
100によって符号化されたのならば(第6図のコード
)、各画素を順にその種別コードに従って2つの代表色
のいずれかに振り分けて復号化する。多値性カラー画像
データ符号化回路101によって符号化されたのならば
(第10図のコード)、ブロックの中央画素(C++)
には代表色のカラー画像データを割当てる。中央の回り
の画素については、勾配を復号化して、その勾配から比
例配分して、夫々の画素のカラー画像データを得る。
<Decoding> Next, decoding will be briefly explained. At the time of decoding, which encoding method has been used to encode the encoded code to be decoded is known from the identification code shown in FIG. 6, FIG. 10(a), or FIG. 10(b). If encoded by the binary color image data encoding circuit 100 (code shown in FIG. 6), each pixel is sequentially assigned to one of two representative colors according to its type code and decoded. If it is encoded by the multilevel color image data encoding circuit 101 (code in FIG. 10), the central pixel of the block (C++)
Assign color image data of representative colors to . For pixels around the center, the gradient is decoded and proportionally distributed from the gradient to obtain color image data for each pixel.

く変形例〉 前述した実施例では、信号分離回路41,61.71.
90において、YIQの表色系を用いていたが、これら
に限定されず、L*a*b*系又はL*u*v*系でも
よい。
Modification> In the embodiment described above, the signal separation circuits 41, 61, 71 .
Although the YIQ color system was used in 90, the color system is not limited thereto, and may be the L*a*b* system or the L*u*v* system.

また、二値性カラー画像データ符号化回路100では、
2色の代表色を用いて説明したが、これは2色に限るわ
けではなく、n色として考えられる。同じ線画でも、背
景色の中に3色以上の線が存在することもあるからであ
る。
Furthermore, in the binary color image data encoding circuit 100,
Although the description has been made using two representative colors, this is not limited to two colors, and can be considered as n colors. This is because even in the same line drawing, lines of three or more colors may exist in the background color.

また、二値性カラー画像データ符号化回路100におい
て、画素のカラー画像データを代表カラー画像データの
距離を平方和を用いて演算しているが、信号の性質によ
って、絶対値の和で済んでしまうことも考えられる。そ
の際は、回路構成が簡単になるという利点をもっている
。また、代表色を、成分の最大・最小がもつとも離えれ
ているものという判断基準を使っているが、画素をいく
つかのグループに分け、その内の平均を代表色としても
よい。
In addition, in the binary color image data encoding circuit 100, the distance between the pixel color image data and the representative color image data is calculated using the sum of squares, but due to the nature of the signal, the sum of absolute values is sufficient. It is also possible to put it away. In this case, the advantage is that the circuit configuration becomes simple. Further, although the standard for determining the representative color is that the maximum and minimum components are far apart from each other, the pixels may be divided into several groups and the average of the groups may be used as the representative color.

また、多値性カラー画像データ符号化回路101では、
代表色は各成分の中央値をとっていたが、これがブロッ
ク内の特定の位置の画素の値でもよい。
Furthermore, in the multivalued color image data encoding circuit 101,
Although the representative color takes the median value of each component, this may also be the value of a pixel at a specific position within the block.

前記2つの符号化方式では共に、3×3のブロック化を
行うこを前提に説明したが、これは4×4でもその他の
ブロック化を採用することも可能である。
Both of the above two encoding methods have been described on the assumption that 3×3 blocking is performed, but it is also possible to adopt 4×4 or other blocking.

[発明の効果] 以上説明したように本発明によれば、並列に動作し、異
なる符号化方式を採用した2つの符号化手段を具備する
ことにより、多色性をもつカラー画像データを効率良く
圧縮して符号化できる。
[Effects of the Invention] As explained above, according to the present invention, multicolor color image data can be efficiently processed by providing two encoding means that operate in parallel and employ different encoding methods. Can be compressed and encoded.

又、他の発明によると、上記2つの符号化手段のいずれ
を用いて符号化すべきかを判断した上で符号化するので
、復号化時に原画に忠実に再生することができる。
Further, according to another invention, since encoding is performed after determining which of the above two encoding means should be used for encoding, it is possible to faithfully reproduce the original picture at the time of decoding.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明に係る実施例の符号化装置の全体概要を
示した図、 第2図(a)、(b)は従来例の欠点を説明する図、 第3図は実施例に用いられる画像ブロックを説明する図
、 第4図は代表色選択回路2の構成図、 第5図は画素を代表色に対応づける二値化回路の構成図
、 第6図は二値性カラー画像データ符号化回路による符号
化コードのフォーマット図、 第7図は勾配算出回路6により算出される勾配の方向を
示す図、 第8図は勾配算出回路6の構成図、 第9図は多値性カラー画像データ符号化回路に用いる代
表色選択回路回路5の構成図、第10図(a)、(b)
は多値性カラー画像データ符号化回路により符号化され
た符号化コードのフォーマット例を示す図、 第11図は符号化判定回路の一例の回路図、第12図(
a)〜(C)は本実施例に用いられる2つの符号化方式
の違いを模式的に図示した図である。 図中、 1・・・バッファメモリ、2.5・・・代表色選択回路
、3・・・二値化回路、4・・・符号化回路、6・・・
勾配算出回路、7・・・符号化回路、8・・・符号化方
式判定回路、9・・・信号選択回路、10.11・・・
ブロック符号、12・・・選択信号である。 特許出願人  キャノン株式会社 ヒーミリ、・  、冒 to ) 第10図
Fig. 1 is a diagram showing the overall outline of the encoding device of the embodiment according to the present invention, Fig. 2 (a) and (b) are diagrams explaining the drawbacks of the conventional example, and Fig. 3 is used in the embodiment. 4 is a block diagram of the representative color selection circuit 2, FIG. 5 is a block diagram of a binarization circuit that associates pixels with representative colors, and FIG. 6 is a block diagram of binary color image data. A format diagram of the encoded code by the encoding circuit, FIG. 7 is a diagram showing the direction of the gradient calculated by the gradient calculation circuit 6, FIG. 8 is a configuration diagram of the gradient calculation circuit 6, and FIG. 9 is a multivalued color A configuration diagram of the representative color selection circuit 5 used in the image data encoding circuit, FIGS. 10(a) and (b)
11 is a diagram showing an example of the format of the encoded code encoded by the multilevel color image data encoding circuit, FIG. 11 is a circuit diagram of an example of the encoding determination circuit, and FIG. 12 (
a) to (C) are diagrams schematically illustrating the differences between two encoding methods used in this embodiment. In the figure, 1... Buffer memory, 2.5... Representative color selection circuit, 3... Binarization circuit, 4... Encoding circuit, 6...
Gradient calculation circuit, 7... Encoding circuit, 8... Encoding method determination circuit, 9... Signal selection circuit, 10.11...
Block code, 12... selection signal. Patent applicant Canon Co., Ltd.

Claims (4)

【特許請求の範囲】[Claims] (1)二次元カラー画像データを隣接する複数の画素よ
りなるブロックに分割する分割手段と、このブロック化
されたカラー画像データから、代表する少なくとも一色
の代表カラー画像データを選び、当該ブロック内の各画
素を前記少なくとも一色の代表カラー画像データに対応
づけることにより第1の符号化コードに符号化する第1
の符号化手段と、 当該ブロックのカラー画像データを代表する一色の代表
カラー画像データを選ぶと共に、当該ブロック内でのカ
ラー画像データ値の勾配を算出し、前記一色の代表カラ
ー画像データと勾配とを第2の符号化コードに符号化す
る第2の符号化手段とを具備するカラー画像データ符号
化装置。
(1) A dividing means that divides two-dimensional color image data into blocks each consisting of a plurality of adjacent pixels, and selects representative color image data of at least one color from the blocks of color image data, and A first method for encoding each pixel into a first encoding code by associating each pixel with representative color image data of the at least one color.
an encoding means for selecting representative color image data of one color representing the color image data of the block, calculating the gradient of the color image data value within the block, and combining the representative color image data of the one color and the gradient; A color image data encoding device comprising: second encoding means for encoding into a second encoded code.
(2)二次元カラー画像データを隣接する複数の画素よ
りなるブロックに分割する分割手段と、このブロック化
されたカラー画像データから、代表する少なくとも一色
の代表カラー画像データを選び、当該ブロック内の各画
素を前記少なくとも一色の代表カラー画像データに対応
づけることにより第1の符号化コードに符号化する第1
の符号化手段と、 当該ブロックのカラー画像データを代表する一色の代表
カラー画像データを選ぶと共に、当該ブロック内でのカ
ラー画像データ値の勾配を算出し、前記一色の代表カラ
ー画像データと勾配とを第2の符号化コードに符号化す
る第2の符号化手段と、 当該ブロック内の像域を判断する判断手段と、該判断手
段の判断結果を第3の符号化コードに符号化する第3の
符号化手段と、 前記判断結果に応じて、前記第1の符号化コード又は第
2の符号化コードを選択し、該選択された第1若しくは
第2の符号化コードと前記第3の符号化コードとを出力
する選択手段を備えたカラー画像データ符号化装置。
(2) A dividing means that divides two-dimensional color image data into blocks each consisting of a plurality of adjacent pixels, and selects representative color image data of at least one color from the blocks of color image data, and A first method for encoding each pixel into a first encoding code by associating each pixel with representative color image data of the at least one color.
an encoding means for selecting representative color image data of one color representing the color image data of the block, calculating the gradient of the color image data value within the block, and combining the representative color image data of the one color and the gradient; a second encoding means for encoding into a second encoding code, a determining means for determining the image area within the block, and a third encoding means for encoding the determination result of the determining means into a third encoding code. 3 encoding means, selecting the first encoding code or the second encoding code according to the determination result, and combining the selected first or second encoding code with the third encoding code; A color image data encoding device comprising a selection means for outputting an encoded code.
(3)前記判断手段は、当該ブロック内のカラー画像デ
ータの分散度の値から、前記ブロックの像域が文字・線
画を表す第1の画像ブロックであるか、写真・絵画を表
わす第2の画像ブロックであるかを判断し、 前記選択手段は、前記判断手段が第1の画像ブロックと
判断したときは、前記第1の符号化コードを、第2の画
像ブロックと判断したときは前記第2の符号化コードを
選択する事を特徴とする特許請求の範囲第1項記載のカ
ラー画像データ符号化装置。
(3) The determining means determines whether the image area of the block is a first image block representing characters/line drawings or a second image block representing photographs/paintings based on the dispersion value of the color image data in the block. The selecting means selects the first encoded code when the determining means determines that the image block is a first image block, and selects the first encoded code when the determining means determines that the image block is a second image block. 2. The color image data encoding device according to claim 1, wherein two encoding codes are selected.
(4)前記判断手段は、当該ブロック内の隣接する2画
素であつて、そのカラー画像データ距離が所定の閾値よ
りも大であるところの画素の個数を判断し、 前記選択手段は上記画素の個数が大であるときは第1の
符号化コードを選択し、小であるときは第2の符号化コ
ードを選択する事を特徴とする特許請求の範囲第1項記
載のカラー画像データ符号化装置。
(4) The determining means determines the number of two adjacent pixels in the block whose color image data distance is greater than a predetermined threshold; Color image data encoding according to claim 1, characterized in that when the number is large, the first encoding code is selected, and when the number is small, the second encoding code is selected. Device.
JP62021847A 1987-02-03 1987-02-03 Color picture data coder Pending JPS63190474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62021847A JPS63190474A (en) 1987-02-03 1987-02-03 Color picture data coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62021847A JPS63190474A (en) 1987-02-03 1987-02-03 Color picture data coder

Publications (1)

Publication Number Publication Date
JPS63190474A true JPS63190474A (en) 1988-08-08

Family

ID=12066489

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62021847A Pending JPS63190474A (en) 1987-02-03 1987-02-03 Color picture data coder

Country Status (1)

Country Link
JP (1) JPS63190474A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02205982A (en) * 1989-02-06 1990-08-15 Canon Inc Picture processor
JPH03254573A (en) * 1990-03-05 1991-11-13 Canon Inc Encoding device for color picture
JPH03291059A (en) * 1990-04-09 1991-12-20 N T T Data Tsushin Kk Color picture encoding device
EP0507601A2 (en) * 1991-04-04 1992-10-07 Canon Kabushiki Kaisha Image processing method and apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5778278A (en) * 1980-10-31 1982-05-15 Ricoh Co Ltd Video coding method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5778278A (en) * 1980-10-31 1982-05-15 Ricoh Co Ltd Video coding method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02205982A (en) * 1989-02-06 1990-08-15 Canon Inc Picture processor
JPH03254573A (en) * 1990-03-05 1991-11-13 Canon Inc Encoding device for color picture
JPH03291059A (en) * 1990-04-09 1991-12-20 N T T Data Tsushin Kk Color picture encoding device
EP0507601A2 (en) * 1991-04-04 1992-10-07 Canon Kabushiki Kaisha Image processing method and apparatus

Similar Documents

Publication Publication Date Title
US5905579A (en) Image processing method and apparatus which separates an input image into character and non-character areas
US5535013A (en) Image data compression and expansion apparatus, and image area discrimination processing apparatus therefor
US4896364A (en) Method of detecting boundary structures in a video signal
JP2618988B2 (en) Color image expansion device
JP3596863B2 (en) Image compression device and image decompression device, and computer-readable recording medium in which a program for causing a computer to execute the image compression method and the image decompression method is recorded.
JPS63190474A (en) Color picture data coder
JPH0342969A (en) Color picture information encoding system
JPS621373A (en) Picture encoding system
JPS63182785A (en) Color picture processor
WO2000018133A1 (en) Encoding device and method, and decoding device and method
JP3062224B2 (en) Image coding method
JPH08298589A (en) Image processor of photograph/document mixed image
JP3387170B2 (en) Adaptive Y / C separation apparatus and method
JPH04142879A (en) Picture coding and decoding system
JPS5947916B2 (en) Color image encoding processing method
JPH0342968A (en) Color picture information encoding system
JPH01222575A (en) Binarizing circuit for picture signal
JPH0823550A (en) Compressing/expanding method for color image
JP3004272B2 (en) Color image coding method
JPH0993440A (en) Multi-value image processor
JP2966426B2 (en) Color image processing apparatus and method
JP3330308B2 (en) Color image information encoding processing method
JPS61169086A (en) Encoding system of half tone image
JPH08307666A (en) Data processing unit for multi-gradation image with document and photograph in existence in mixture
JPS62234466A (en) Picture processor